One way to understand the network function and analyze the network structure is to find the communities of the network accurately. Now, there are many works about designing algorithms for community detection. Most community detection algorithms are based on modularity optimization. However, these methods not only have disadvantages in computational complexity, but also have the problem of resolution restriction. Designing a community detection algorithm that is fast and effective remains a challenge in the field. We attempt to solve the community detection problem in a new perspective in this paper, believing that the assumption used to solve the link prediction problem is useful for the problem of community detection. By using the similarity between modules of the network, we propose a new method to extract the community structure in this paper. Our algorithm consists of three steps. First, we initialize a community partition based on the distribution of the node degree; second, we calculate the similarity between different communities, where the similarity is the index to describe the closeness of the different communities. We assume that the much closer the two different communities are, the greater the likelihood of being divided together; finally, merge the pairs of communities which has the highest similarity value as possible as we can and stop when the condition is not satisfied. Because the convergence of our algorithm is very fast in the process of merging, we find that our method has advantages both in the computational complexity and in the accuracy when compared with other six classical algorithms. Moreover, we design a new measure to describe how difficulty the network division is.