The original K-means clustering algorithm is prone to local optima and sensitive to the initial clustering center, which have a great impact on accuracy and stability of clustering results in practical applications. To overcome this limitation, an innovative K-means clustering method based on modified rat swarm optimization (RSO) algorithm is proposed. A nonlinear convergence factor is introduced into the RSO to adjust convergence speed of different data sets and improve the global search ability. Then, a reverse initial population strategy is adopted to increase population diversity, thus improving the robustness of the algorithm to the initial conditions. The modified RSO algorithm is used to find the initial optimal cluster centroid, and then K-means algorithm is used to refine the optimized initial cluster centroid to improve the clustering accuracy. The experimental results show that compared with the original K-means clustering algorithm, the improved algorithm has achieved significant improvement in each index of iris, wine and glass datasets, which proves the effectiveness and superiority of the algorithm. This paper presents a new hybrid clustering algorithm which combines the improved swarm intelligent optimization algorithm with K-means clustering algorithm. This method effectively solves the problem that K-means clustering algorithm is sensitive to the initial cluster center. In this study, a novel optimization algorithm improvement strategy, namely reverse elite population strategy and nonlinear convergence factor, is adopted.