The discovery and analysis of community structure in complex networks is a hot issue in recent years. In this paper, based on the fast greedy clustering algorithm CNM with the thought of local search, the introduction of the idea of node centrality and the optimal division of the central nodes and their neighbor nodes into correct communities, a new algorithm CNM-Centrality of detecting communities in complex networks is proposed. In order to verify the accuracy and efficiency of this algorithm, the performance of this algorithm is tested on several representative real-world networks and a set...