Text intelligent classification model based on improved KNN algorithm in library service transformation
Changjun Wang, Fengxia You, Yu Wang · Systems and Soft Computing · 2025
With the development of the digital age, library services are facing the challenge of fast and accurate text classification. The traditional K-nearest neighbor algorithm is limited by low classification efficiency and high computational complexity when processing big data. This makes it difficult to meet the dual requirements of real-time processing and high-precision classification of large amounts of literature in the digital transformation of libraries. To address this issue, this study proposes an improved K-nearest neighbor algorithm (CCVKNN), which optimizes the algorithm structure to significantly improve processing speed while ensuring classification accuracy. First, this method constructs a text intelligent classification model and uses K-means to create a multi-level clustering center system within the category. This transforms global search into local computation. To improve processing speed and meet the requirements of intelligent text classification, a K-nearest neighbor text intelligent classification algorithm on the ground of clustering and center vectors is further proposed. The experimental results showed that the K-nearest neighbor text intelligent classification algorithm on the ground of clustering and center vectors improved the accuracy of sports, tourism, and education categories by 2.9%, 2.4%, and 2.35%, respectively. Meanwhile, it saved 200 s in classification time compared to the density-based K-nearest neighbor training data reduction algorithm, and 560 s compared to the traditional K-Nearest Neighbor. These findings indicate that the K-nearest neighbor text intelligent classification algorithm on the ground of clustering and center vectors can improve efficiency while maintaining high accuracy. This indicates that the algorithm is suitable for processing large-scale text data in library services, effectively improving classification speed and accuracy. This study provides an efficient text classification solution for the digital transformation of library services.