The heuristic k-means algorithm predicts the subset of clusters to each data point which is likely to be classified by looking at nearby clusters after the first iteration of k-means, effectively speeding up the oper-ation of the algorithm. However, due to the shortcomings of the heuristic algorithm in randomly selecting the initial clustering center and being unable to effectively identify outliers in the data set, the sum of squared errors in the clustering results is large, and the silhouette coefficient is small. To address this problem, the CHk-means algorithm is proposed. This algorithm introduces a careful seeding method to overcome the local optimal solution problem caused by the heuristic k-means algorithm random selection of the initial cluster center. This algo-rithm introduces the local outlier factor LOF algorithm to detect outliers, reducing the impact of outlier data on clustering results. Comparative experiments were conducted on three algorithms on multiple data sets. The re-sults show that the CHk-means algorithm can effectively reduce the sum of square errors of clustering results, enhance the silhouette coefficient of clustering, and significantly improve the clustering quality.