Abstract
An improved Web community discovery algorithm is proposed in this paper based on the attraction between Web pages to effectively reduce the complexity of Web community discovery. The proposed algorithm treats each Web page in the Web pages collection as an individual with attraction based on the theory of universal gravitation, elaborates the discovery and evolution process of Web community from a Web page in the Web pages collection, defines the priority rules of Web community size and Web page similarity, and gives the calculation formula of the change in Web page similarity. Finally, an experimental platform is built to analyze the specific discovery process of the Web community in detail, and the changes in cumulative distribution of Web page similarity are discussed. The results show that the change in the similarity of a new page satisfies the power-law distribution, and the similarity of a new page is proportional to the size of Web community that the new page chooses to join.
Introduction
Web community is a unique group composed of units and individuals who share common topics or interests. It is manifested by the fact that they communicate with each other through a mutually agreed Web page under a certain content. Many researches are devoted to community discovery technologies [1–4] which are basically based on Web hyperlink analysis, apply the influence of Web structure on the community to discover the characteristics of the community and basically treat the Web as a huge graph.
In the current study, the definition of community characteristics is roughly divided into three categories [5–10]: first, the characteristics of link structure of the community are discovered by the hub and authority collections in the HITS algorithm defined by Gibson et al. [11]. The greater the degree of ordered structure extracted by HITS is, the greater the number of community-related pages and the density of hyperlinks. ARC and CLEVER implemented a complete Web community discovery system on the basis of pure HITS algorithm, and Toyoda and Kitsregawa proposed the Companion algorithm that considers the order of links on the page and improved the pure HITS algorithm; second, Flake et al. [12] proposed a method to discover the Web community from another perspective according to the graph theory, and treated the community as a collection of closely connected pages, that is, the number of links between nodes inside the community is greater than the number of links outside the community; the third category is the trawling algorithm proposed by Kumar et al. [13] and the loose reference proposed by Reddy et al. [14], which are based on the bipartite directed graph technology. The proposed method abstracts the community into a bipartite directed graph. A dense bipartite graph may contain at least one community. Unlike HITS, the source of data is not based on a specific topic, but on general crawling results.
Researchers have proposed a number of analytical methods. Justine et al. [15] proposed an algorithm to approximate Web communities from the topic related Web pages, and varied the approximation values to identify varied degrees of relationship between Web pages. Murata et al. [16] proposed a method for visualizing Web communities and their internal structures, and succeeded in clarifying various genres of Web communities. Paola et al. [17] proposed a semiautomated strategy to extract domain-specific taxonomies from Web documents and its application to model a network of excellence in the emerging research field of enterprise interoperability. Georgios et al. [18] explained how to draw together the different viewpoints on Web communities and introduced new opportunities for community-based personalization, and proposed the concept of active user community and showed how this related to recent efforts on mining networks. Tzekina et al. [19] proposed a novel content-ignorant Web community feature space which was created by exploiting link analysis, and experimental results showed that the proposed Web community feature space generated much better results than the URL feature space. Han et al. [20] proposed a Fact-based Quality Assessment approach, which captured the data quality based on content semantics by gleaning the Web community knowledge, and FQA could automatically rank the Web data quality in terms of the accuracy of three most important quality dimensions.
Most of the existing community discovery methods focus on static community discovery, which cannot effectively analyze the network evolution, and the entity data of the community is often interchangeable and temporal, so the dynamic community discovery algorithm has attracted extensive attention from researchers [21]. Cazabet et al. [22] proposed the iLCD algorithm to update and merge the communities of the previous snapshot network according to the changes of network topology, and generated a new community to discover the community structure of the current snapshot network. The proposed algorithm can discover the overlapping communities in dynamic networks. Agarwal et al. [23] integrated the node-level behavior evolution into the algorithm, which can be divided into node addition, node deletion, edge addition and edge deletion, and their corresponding methods. Cordeiro et al. [24] focused on the community where nodes and edges were added or deleted, and redivided the community only for the changed elements based on the idea of local modularity maximization, without operating on other elements, thus greatly improving the operating efficiency. Duan et al. [25] designed an incremental k-agglomeration cluster algorithm for community discovery in dynamic networks. Variable flow model was used, and the Cluster Percolation Method (CPM) was improved by the depth-first search. Dynamic community discovery is performed from the perspective of node-level behavior evolution. The running speed of the proposed algorithm on DBLP and Enron datasets is much faster than that of the corresponding static algorithm. Xin et al. [26] proposed the Adaptive Random Walk Sampling (ARWS) algorithm for dynamic community discovery. ARWS algorithm solves the instability problem caused by fixed random walk, and realizes the non-uniform random walk of the object. Moreover, ARWS algorithm enables the affected nodes to find new neighbors and changing communities adaptively. Sattari et al. [27] proposed a new dynamic network evolution clustering method based on label propagation algorithm. The community label of each node is determined by its neighbors, and the node label is updated in a special order related to the network structure, and an attribution factor is assigned to each label. One of the node labels is considered as the primary community, and the other labels are considered as part of the secondary community. By iteratively updating node labels, each node can retain one or more community labels, so as to detect non-overlapping and overlapping communities in dynamic networks. He et al. [28] proposed a fast algorithm for dynamic community detection in time network, which makes use of the historical community information in the previous time sequence, constructs a small network through the historical community structure, and detects the communities in new network using the Louvain [29] algorithm.
However, the traditional methods still have the following shortcomings: (1) They all require an equidistant diffusion search from a Web page, so the accuracy of these algorithms depends largely on the location of the selected start page in the Web community. The resulting Web community is valid only when the Web page is located at the center of the Web community; (2) They have high time complexity, generally O (n2), in which n is the number of Web pages in the Web pages collection; (3) They are unable to detect the changing trend of the Web community, which makes it impossible for us to know in real time how people’s concerns about society are reflected on the Internet. As a result, the time complexity of Web community discovery is reduced by the attraction between Web pages. We explained the basic evolution process of the Web community by introducing the WSP and PDP rules, and verified our points of view according to the actual situation of the Web.
Improved web community discovery algorithm
Universal gravitation is an interaction between objects due to their mass, and its magnitude depends on the mass of the object and the distance between two objects. The greater the mass of the object is, the greater the universal gravitation between them, and the farther the distance between objects, the smaller the universal gravitation between them.
Where, Gi,j is the attraction of Web page i to Web page j, k i and k j are the node degree of Web page i to Web page j respectively, ΔT = t - t i , t i represents that Web page i joins the network at t i , n i is the number of connections obtained by Web page i within ΔT, α and γ are adjusting parameters which satisfy α + γ = 1.
The attraction of a Web page in the Web pages collection is related to the degree of the Web page and the evolution of the Web community. The greater the similarity of a Web page is, the greater the attraction. If the similarity of a Web page is larger than that of all its neighbors, it will easily attract the surrounding Web pages to its own Web community. However, if the similarity of a Web page is smaller than that of all its neighbors, it will be easily attracted by the surrounding Web pages, and it tends to be attracted by the largest one in its neighbors to become a member of the Web community where such Web page is located. Degree represents the topological position of a Web page in the network, and is a static measure at a certain moment. The attraction between Web pages describes how the structure of a Web community changes over a period of time and is a measure of dynamic process.
Therefore, both static network structure and dynamic network structure changing with time can apply the proposed algorithm for Web community discovery. The algorithm process of finding the Web community where a Web page in the Web pages collection is located is as follows: The Web pages collection is read in. Each web page is recorded as a linked list structure in the following format (see Table 1). The time complexity of completing the linked list in the Web pages collection is O (E), where E is the number of hyperlinks in the Web pages collection. If a Web page is pa and its neighbor is npa, then it exists. If the attraction value of pa is greater than that of npa and the attraction value of pa is greater than that of npa’s other neighbors, then pa is npa’s Web page with the maximum attraction. So npa is attracted by pa and becomes a member of the Web community where pa is located; if the attraction value of pa is less than that of npa and the attraction value of pa’s other neighbor nodes is less than that of npa, then npa is pa’s Web page with the maximum attraction. So pa is attracted by npa and becomes a member of the Web community where npa is located; if neither of the above two conditions can be met, then pa and npa are considered to be unable to attract each other, and they belong to two different Web communities, and they are the demarcation points of these two Web communities. We take the Web page attracted by pa or npa as the new start page, and repeat step (2) until the demarcation point is discovered. Then, we find the structure of the whole Web community where a Web page is located. The time complexity is O(E).
Linked List Structure of Web Page
To get the Web community of the whole Web pages collection, we need to start from any Web page to find the Web community where it is located according to the above three steps, and then start from any Web page outside the Web community to find another Web community according to the above three steps until all the Web pages are divided into corresponding Web communities. Each Web page will be searched once in the whole search process. For the Web pages collection with E hyperlinks, the time complexity of the whole algorithm is O(E). The proposed algorithm has a considerable improvement in performance compared with the time complexity O(n2) of traditional algorithm, and we do not need to specify the Web page of authority center when selecting the start page (see Table 2).
The Structure of Algorithm
Evolution process of Web community
According to the daily average user attention data provided by Baidu, we selected several representative websites for data analysis, as shown in Table 3. From the listed data, we can see that the daily average user attention of Internet-based websites is much higher than that of non-Internet-based websites. In other words, a website with more pages and more types of pages will attract more users to visit. When users are interested in a topic, they often first choose the website to obtain information or first cite the URL of such website to reprint the topic. Therefore, for the Web community, the larger the Web community is, the more pages in the community focus on the same topic (which indicates that the topic is hot). Users have more opportunities to get access to such topics, and they often link this topic to their own Web pages out of curiosity. With the gradual expansion of the scope, the Web community is expanding rapidly.
Daily Average User Attentions of Different Websites From April to September 2007
Daily Average User Attentions of Different Websites From April to September 2007
Assuming that there are m Web communities in the initial Web, and each Web community consists of n1, n2,... nm Web pages linked by hyperlinks, and these m Web communities are also linked by hyperlinks. The Web pages used to contact these Web communities are randomly selected. During the evolution of the Web community, a new Web community is added to the Web with probability pro every time, and the new Web community contains nn Web pages linked by hyperlinks. A Web page is randomly selected from the new Web community and contacts with other Web communities through k hyperlinks. A new page is added to the Web with probability 1-pro. The Web page joins a Web community in the Web according to the WSP rule, and connects with other Web pages in the community with probability pro′ through K hyperlinks, and with other Web communities outside the community with probability 1- pro′. Among them, 0 ⩽ pro ⩽ 1, 0 ⩽ pro′ ⩽ 1. When pro = 0, there are no new Web communities formed in the Web. However, when pro = 1, a new Web community is formed in the Web. When a Web page selects the Web page in other Web communities as its neighbor, another Web community is first selected according to the WSP rule. According to our definition in the first section, the greater the similarity of a Web page is, the greater its attraction to other Web pages. Then, when a Web page joins a large Web community, it will select a Web page with greater similarity in the community to contact according to the PSP rule. These two priority rules are defined as follows:
Where, d ab is the similarity of the Web page b in the Web community a, n a means that there are n a Web pages in the Web community a, and λ is a weighted value, λ ∈ [- k, + ∞). We call this the PDP rule.
As can be seen from Fig. 1, there are three connected Web communities in the original Web, and the Web pages in the community are also connected, as shown in sub-figure (1); a new page is added to the Web with probability 1 - pro, and the Web page joins a Web community according to the WSP principle, and three hyperlinks are introduced into the Web page, two of which are connected with the Web pages in the community with probability pro′ according to the PDP principle, and the remaining hyperlink is connected with the Web pages in other Web communities outside the community with probability 1 - pro′. As shown in sub-figure (2), a new Web community is added to the Web with probability pro, and the Web pages in the new Web community are also connected, and a Web page is randomly selected from the community to connect with three Web pages in other Web communities. The method selected is also the same as in sub-figure (2), as shown in sub-figure (3).

Evolution Process of Web Community.
After understanding the basic evolution process of the Web community, we need to theoretically analyze the changes in the size and Web page similarity of the Web community that play a decisive role during the evolution of the Web community.
When the Web community a with n
a
Web pages joins the Web at t
a
, then:
Therefore, the probability P (w
a
(t) ⩾ w) that the size of the Web community a is no less than w at t
a
is as follows:
We get P (t
a
) as follows to obtain the final solution of P (w
a
(t) ⩾ w):
Then:
According to the power-law distribution function P (k ⩾ k′) ∼ (k′) -γ, Equation (7) satisfies the power-law distribution.
The Web page similarity is measured by two parts: 1. the number of hyperlinks between a Web page in the Web community and other pages in the community; 2. The number of hyperlinks between a Web page in the Web community and the Web pages in other Web communities. So we will analyze the change of Web page similarity from the above two parts.
The change of Web page similarity in Web community. When a new Web community is added to the Web with probability pro, the Web page similarity in the existing Web community will not be affected. However, when a new page is added to the Web with probability pro, the new page will first join a Web community a according to the WSP rule, and then select a Web page from the selected Web community as its own neighbor with probabilitypro′ according to the PDP rule.
We assume that new Web communities or new pages are added to the Web at equal intervals, then
As a result, the probability P (d
ab
(t) ⩾ c) that the similarity of the Web page b in the Web community is no less than c at t
b
is as follows:
So the distribution probability P (d
ab
(t)) of the similarity of the Web page b in the Web community at t
b
is as follows:
Change in Web page similarity outside the Web community. The Web page similarity inside the Web community is far greater than that outside the Web community. So the Web page similarity outside the Web community can be negligible in the calculation of the Web page similarity in the Web community. Therefore, the similarity of the Web page b is approximately equal to the solution of Equation (12). The distribution of the Web page similarity satisfies the power-law distribution P (z ⩾ z′) ∼ (z′) -α. Then,
Experimental datasets
We build an experimental simulation platform to verify the effectiveness of the above model. This paper uses Vc++ for programming and SQL database. Experiments were conducted on four real networks, namely Karate Club Network (Karate), United Soccer League Network (Football), E-mail Network of European Research Institutes (Email-EU) and Political Blog Network (Polblogs).
Table 4 shows the attribute information of four real networks, including the number of nodes, edges and communities. Figure 2 shows the Web topology of simulation experiment, a total of 30 Web nodes.
Datasets of social networks
Datasets of social networks

Experimental Web topology.
In most cases, there are no standard results for community discovery. For real datasets, the modularity function proposed by Newman [30] is generally used as an algorithm evaluation index, but the evaluation criterion is not well suitable for overlapping communities. Therefore, on this basis, Shen et al. [31] proposed an overlapping modularity function that can measure the division result of overlapping communities, which is defined as:
Where, m is the total number of edges in the network, A is the adjacency matrix of the network, k u is the degree of the node u, and Q u is the number of communities where the node u is located.
(1) Test results and analysis on real network datasets.
The proposed improved Web community discovery, HITS, maximal-flow, bipartite directed graph, Fluidc, GN, Louvain and Spectral algorithms were tested on real network datasets, and EQ evaluation index was used to evaluate the community division structure. The test results are shown in Table 5.
EQ test results on real network datasets
EQ test results on real network datasets
From the test analysis results on real datasets, the proposed algorithm gets the maximum EQ value on the other three datasets except that the EQ value on Football dataset is lower than that of GN algorithm. Spectral algorithm also gets the same maximum EQ value on Karate dataset as the proposed algorithm. To sum up, the community structure of the proposed algorithm is better than that of other community discovery algorithms, which reflects the effectiveness and feasibility of the algorithm.
(2) Test results and analysis on simulation network dataset.
The proposed improved Web community discovery algorithm gets the first Web community from page 15, as shown in the red box in Fig. 3.

The First Discovered Web Community in Web.
After discovering the first Web community, we get the second Web community from the page 16 outside the community using the improved Web community discovery algorithm, as shown in the triangle in Fig. 4.

The Second Discovered Web Community in Web.
The performance of various Web community discovery algorithms is compared in Table 6. As can be seen from Table 6, compared with other Web community discovery algorithms, the improved Web community discovery algorithm has obvious advantages: it has linear search time complexity, which can search the Web community from any page in the Web, and is simple and easy to implement.
Performance Comparison of Different Web Community Discovery Algorithms
In addition, a Web community a with the size w a is added to the Web of the simulation platform with probability pro in the simulation experiment. After 1000 steps, we get the cumulative distribution data of the Web community a, as shown in Tables 7–10.
The result of P (w a (t) ⩾ w) when w a = 6
The result of P (w a (t) ⩾ w) when w a = 7
The result of P (w a (t) ⩾ w) when w a = 8
The result of P (w a (t) ⩾ w) when w a = 8
From the data in Tables 7–10, we can see that the Web pages with high similarity always attract those with low similarity to join their own Web communities, so their Web pages are lost when a new Web community enters the Web, that is to say, when a new Web community joins the Web, it will be torn apart by other existing Web communities, and the fragmented Web pages are then added to the corresponding Web communities, resulting in the increase of information in the existing Web community and the decrease of information in the new Web community, or even disappearance in the Web.
Assuming that the Web page b is connected with the Web pages in the Web community a with probability pro′, we got the cumulative distribution data of the Web page similarity of the Web community, as shown in Tables 11–12.
The result of P (d) when pro = 0.1
The result of P (d) when pro = 0.2
From the data in Tables 11–12, we can see that the probability pro′ is proportional to the similarity of the new page. Figure 5 shows the cumulative distribution of the Web page similarity, where (a) and (b) represent pro = 0.1 and pro = 0.2, respectively. As can be seen from the figure, the change in the similarity of the new page satisfies the power-law distribution. Equation (13) shows that the similarity of a new page is proportional to the size of Web community that the new page chooses to join. Therefore, if a new page joins the largest Web community according to the WSP and PDP rules and tries to be a neighbor of the Web page with the highest similarity in the community, then the similarity of the new page will reach the highest level. The more opportunities it has to spread its information in the Web community, the more likely it is to be noticed, and vice versa.

The Cumulative Distribution of Web Page Similarity.
This paper proposes to reduce the time complexity of the Web community discovery using the attraction between Web pages. The proposed algorithm treats each Web page in the Web pages collection as an individual with attraction, elaborates the discovery process of the Web community from a Web page in the Web pages collection, and introduces the WSP and PDP rules to explain the basic evolution process of the Web community. Finally, we build an experimental platform to analyze the specific discovery process of the Web community in detail. Experimental results show that the attraction between Web pages is employed during the discovery of the Web community, and the complexity of search time is linear, and there is no need to determine the Web page of authority center, and the performance is far better than the existing algorithms. The change in the similarity of the new page satisfies the power-law distribution, and the similarity of a new page is proportional to the size of the Web community that the new page chooses to join. According to various data of Web community evolution, we always obey the WSP and PDP rules to some extent during the evolution of the Web community, so that more users can focus on the information.
Footnotes
Acknowledgments
This research was supported by Open Fund of Articial Intelligence Key Laboratory of Sichuan Province under Grant No.2020RYJ01, and supported by Supported by Innovation Team of Chengdu Normal University under Grant No. CSCXTD2020B09.
