To overcome the shortcomings of the K-means clustering algorithm, an improved artificial bee colony algorithm is proposed. By adding a dynamic adjustment factor to the honey source search strategy, the algorithm can automatically adjust the search range in different evolutionary periods, enhancing the algorithm's global search ability and local exploitation ability. The central solution idea, which contains more optimal solution information, is introduced to improve the swarm's search efficiency and accelerate the algorithm's convergence speed. The improved bee colony algorithm is used to optimise the K-means algorithm to improve the performance of the clustering effect. The simulation results show that the optimised K-means algorithm has strong stability, and the clustering effect has been significantly improved.