A Web Community Division Method Based on the Importance of Multi-order Neighborhood Information of Nodes

By representing the Web network as a graph and utilizing the importance of multi-order neighbor information of nodes to perform community division, the problem of insufficient information utilization in existing methods is solved, higher quality community division is achieved, and the accuracy and rationality of community division are improved.

CN115357640BActive Publication Date: 2025-10-14SHANXI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210952600.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-09
Publication Date
2025-10-14
Estimated Expiration
2042-08-09

AI Technical Summary

Technical Problem

Existing Web community segmentation methods lack effective utilization of Web page information, resulting in insufficient utilization of community segmentation information and difficulty in achieving high-quality community segmentation.

Method used

By representing the Web network as a graph, the importance of multi-order neighbor information of nodes is used to divide communities, including graph representation, preprocessing, feature propagation, calculating the importance of neighbors around nodes and updating graph topology. The attention mechanism is used to calculate the importance of neighbor information of each order and aggregate node features, update edge weights, and iterate training until the termination condition is met.

Benefits of technology

It improves the rationality and accuracy of community division results, can better reflect the comprehensive characteristics of the community, and enhances the rationality and accuracy of community division.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115357640B_ABST
    Figure CN115357640B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of Web data mining, and discloses a Web network community division method based on multi-order neighbor information importance. In the method, the network community division process comprises the following steps: Web network graph representation, pretreatment of graph data, feature propagation, calculation of neighbor importance around nodes, and updating of graph topology. After the Web network is represented in the form of a graph, the attributes of the nodes can describe Web pages, and the network topology can represent the connection between the Web pages. Since the information of a single Web page is often not comprehensive enough, feature propagation can be carried out on the basis of the graph topology, and then the features of the nodes and the surrounding neighbors can better describe the characteristics of a community. Meanwhile, the strategy of learning the multi-order neighbor information importance of the nodes can better distinguish the importance of the neighbor information of different orders for the Web pages. When the community structure feature is described, the method can fully reflect the comprehensive features of the community, so that the rationality and accuracy of the community division result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Web data mining, and particularly relates to a Web network community division method based on node multi-order neighbor information importance. BACKGROUND

[0002] With the citation network, social network, Web network, recommendation system, biological chemical molecular structure and other graph data being continuously mined, people have begun to explore the network structure and extract network information, especially the Web network containing rich information. In today's Internet everywhere, Web has become the main platform for information manufacturing, processing, handling and publishing, which provides entertainment, finance, advertising, business, sports, education and other information services. Compared with traditional data, Web data has the characteristics of massive scale, disorganization, heterogeneity, dispersion, dynamicity and the like. These characteristics make it difficult for traditional methods to effectively utilize Web data, and how to induce and promote Web data into knowledge for users to search and query has become an important problem in the development of Internet technology. Although Web data is disordered and dispersed, there are hidden rules and relevance between data. From the structure, Web network is usually composed of multiple communities, and Web community can be loosely defined as a set of Web pages based on a certain specific theme and linked to each other. Web pages in the same community have certain similarity in content, while the Web pages connected to each other also have differences, so they can complement the attribute information of the community, and the content of Web pages in different communities has great difference.

[0003] A large amount of information (including content information and structure information) can be obtained from Web, and we can use these information to find the Internet community to which the Web page belongs in the disordered and dispersed Internet environment, and systematically extract these communities from the Internet, which is called Web community division. Through community division of Web, users can evaluate the knowledge and sociality of Web, which is beneficial to intelligent commodity recommendation for customers, and can also study the organizational form of users interested in a certain aspect to provide an effective and convenient way for information query. Web community division makes it possible to effectively utilize link information to strengthen existing search and browsing technology, which can systematically extract communities from Web, and also has the important significance of realizing Web automatic classification, providing the most timely and reliable information for users, helping to understand the evolution process of Web, and the like, so it has attracted high attention of the academic and industrial circles at home and abroad.

[0004] The existing community division methods such as "Authoritative sources in a hyperlink environment" and "Self-Organization and Identification of Web Communities" mainly use the aggregation density, the link-intensive block in the network as the possible characteristics of the community, but lack the use of the Web page information. Generally, the keywords in the Web page can be used as the attribute information of the Web page to describe the characteristics of the Web page, and in the process of obtaining the Web page information, a small amount of community category information can also be obtained, in other words, a small amount of community to which the Web page belongs can be obtained as the tag information for community discovery. On the other hand, the attribute information of a single Web page is often not comprehensive, and the aggregation of the Web page information by using the link between the Web pages can to some extent supplement the missing information of the single Web page.

[0005] In summary, the division of the Web community usually depends on the network topology structure, and the use of the Web page information can further supplement the community characteristics, which is beneficial to find the node set with the community characteristics and discover the possibility of the existence of the community. Therefore, the determination of the community characteristics is very important, and the internal density and the external sparsity are only the relatively recognized fuzzy definition of the community, and the degree is only one aspect of the measurement of the relationship between the node and the community. The existing method mainly uses the aggregation density, the link-intensive block in the network as the possible characteristics of the community, but lacks the use of the Web page information, which leads to the insufficient use of the information in the community division. Therefore, how to effectively measure and aggregate the importance of the different order neighbor information of the network node is a key problem for realizing the high-quality Web community division. SUMMARY

[0006] In response to the above problems, the purpose of the present invention is to use web page information and network structure to effectively extract web network features, thereby achieving reliable division of web network communities, that is, to provide a web network community division method based on the importance of multi-order neighbor information of nodes. The present invention represents the web network in the form of a graph, wherein web pages are used as nodes of the graph and links between web pages are used as edges of the graph. Accordingly, the presence of an edge is 1 and the absence of an edge is 0. The present invention uses neighbors to supplement node information based on the importance of multi-order neighbor information of nodes, thereby providing a reliable method for community division of web networks. In this method, the network community division process includes the steps of graph representation of the web network, preprocessing of graph data, feature propagation, calculation of the importance of neighbors around the node, and updating of the graph topology. The main parameters of the present invention include: node degree, node similarity, graph normalized adjacency matrix, attention coefficient, etc., among which the node degree represents the number of web pages that have a link relationship with a web page; feature propagation refers to the process by which a web page obtains neighbor page information through the adjacency matrix; node similarity is used to describe the correlation between two web pages in the network after feature transformation and aggregation; the graph normalized adjacency matrix represents the connection between different web pages; and the attention coefficient indicates the importance of each order of neighbor information of a web page to the web page.

[0007] To achieve the above objectives, the present invention provides the following technical solutions:

[0008] The present invention provides a method for dividing a Web network community based on the importance of multi-order neighbor information of a node, comprising the following steps:

[0009] Step 1: Represent the web network as a graph, using nodes in the graph to represent web pages, using feature matrices to describe node attributes, and using edges between nodes to represent links between web pages.

[0010] Step 2: Preprocess the Web network data, that is, symmetrically normalize the original graph adjacency matrix to obtain the normalized adjacency matrix, and perform feature transformation f on the node feature matrix. θ (X) obtain new node features;

[0011] Step 3: Use the normalized adjacency matrix to propagate neighbor features to obtain features containing node neighbor information. As the propagation range continues to increase, multi-order neighbor feature information around the node can be obtained;

[0012] Step 4: Use the attention mechanism to calculate the importance of neighbor information of each order around the node;

[0013] Step 5: Aggregate neighbor information of different orders according to importance to generate new node features, so that each node feature contains richer and more comprehensive community information;

[0014] Step 6: Update the edge weights of the Web network based on the new node features in step 5. The aggregated node features have a higher confidence level, and the edges between two nodes with higher similarity are given a higher weight.

[0015] Step 7: Iterate steps 2 to 6 until the termination condition is met, and classify the web pages represented by nodes with consistent community prediction labels in the web network into the same network community, completing the community division of the web network.

[0016] Furthermore, the specific process of step 1 is as follows: the Web network is represented as a graph, denoted as G(V,E), and the node set V=(v1,v2,…,v k ,…,v n ) represents the set of all web pages in the network, n is the number of web page nodes, and the kth node v k Represents the kth web page in the web network, where k ranges from 1 to n. Usually we use the vector X k Describe the kth Web page v k Attribute information; using the edge set E=(e1,e2,…,e j ,…,e m ) represents the set of links between Web pages, m is the number of edges, and the jth edge e j Represents the jth link in the network, where j ranges from 1 to m. In addition, when we collect Web network information, we will also obtain a small amount of community category information to which Web pages belong, which we call tags.

[0017] Furthermore, the specific process of step 2 is as follows: the web network data mainly includes structural data, i.e., the initial adjacency matrix of the network, and memory data, i.e., web page attributes. The web network data is preprocessed to obtain a normalized adjacency matrix and new node features suitable for information aggregation;

[0018] Step 2.1. Calculate the degree of each node in the Web network, that is, the number of edges directly connected to the node. i The degree of memory is d i ;

[0019] Step 2.2: Add self-loops to each node on the Web network. Specifically, set the diagonal of the adjacency matrix to 1 and use the node degree to calculate the normalized adjacency matrix of the network graph. The calculation method is shown in (1);

[0020]

[0021] Where D is the degree matrix, I is the identity matrix, and A is the initial adjacency matrix;

[0022] Step 2.3, the obtained node attributes are usually sparse and insufficient, but the length of the vector describing the node attributes is often relatively long; therefore, the initial vector is transformed into a shorter vector by a weight matrix, that is, a new node feature is obtained, and the calculation method is shown in equation (2):

[0023] f θ (X) = ReLU(XW (1) )W (2) (2)

[0024] wherein the node attribute feature matrix X generates a new feature matrix through a mapping function f θ (X), W (1) is the first weight matrix, W (2) is the second weight matrix, and ReLU = max(0, x) is a nonlinear function; through the two weight matrices and the nonlinear function, the initial Web page attribute vector becomes a feature vector with a length of c, where c is the number of community categories, and the feature vectors of all Web pages form a feature matrix.

[0025] Further, the feature propagation in step 3 specifically refers to multiplying the feature matrix of the node and the adjacency matrix of the network graph, so that the new node contains the feature information of the surrounding neighbors, and after multiple propagation, a feature matrix containing the multi-order neighbor information of the node is obtained, and then the feature matrix generated by the propagation is saved, and the result of the l+1th propagation is shown in equation (3):

[0026]

[0027] wherein Z (l) represents the result of the lth feature propagation using the normalized adjacency matrix , and we call it a feature matrix containing l-order neighbor information; the feature matrix without feature propagation is Z (0) = f θ (X).

[0028] Further, the specific process of step 4 is as follows: stack the feature matrix obtained by multiple propagation into a three-dimensional tensor T, and calculate the importance of each order of neighbor information of each node to itself, and the calculation method is shown in equation (4):

[0029]

[0030] wherein is the attention function of node i, which is used to evaluate the importance of each order of neighbor information around node i; m i,l is the importance of each order of neighbor information of node i learned; is the node feature containing the lth order neighbor information.

[0031] Further, the specific process of step 5 is as follows: according to the importance of neighbors, the node and the characteristics of the neighbors around the node are weighted and summed to obtain new node characteristics, and the calculation method is shown in formula (5):

[0032]

[0033] wherein, represents the new node characteristics generated after aggregation of the neighbor information of each order.

[0034] Further, the specific process of step 6 is as follows:

[0035] Step 6.1, the similarity S between the node characteristics generated by step 5 and the direct neighbor is calculated, and the calculation is shown in formula (6):

[0036]

[0037] wherein, S i,j represents the similarity between node i and node j after generating new node characteristics, and the greater the similarity, the more likely the two nodes belong to a class;

[0038] Step 6.2, the value in the adjacency matrix is updated using the calculated similarity, and is recorded and saved, and the updating method is shown in (7):

[0039]

[0040] wherein, represents the weight of the edge between node i and node j, and can also determine the proportion of information aggregation when the neighbor information is aggregated, and the hyperparameter λ controls the updating range of the weight of the edge between nodes.

[0041] Further, the specific process of step 7 is as follows: steps 2 to 6 are iterated, and the adjacency matrix is updated once per round, and the stopping condition is determined by the loss. Specifically, if the loss does not decrease within a certain number of rounds, the stopping condition is met. In the process of calculating the loss, the node characteristics are first normalized by the Softmax normalization function to output the node prediction label, and then the cross-entropy loss function is used to measure the difference between the node prediction label and the node true label, and the loss is calculated as follows:

[0042]

[0043] wherein L represents the loss, r is the number of labeled nodes, y i represents the true label, and h iTo predict the label. The nodes in the network that predict the label are consistent, and the Web page represented by the node is classified into the same network community, and the result is output, and the community division of the Web network is completed. After completing the community division, it can be used for recommendation system. For example, topic push, the hobby of different community groups is different, and the topic interested by different community groups can be pushed to them.

[0044] The application also provides a Web community division system based on the importance of node multi-order neighbor information, which is used to realize the above-mentioned Web community division method, and comprises a computer memory and processor, a Web network data storage unit, a Web network graph data processing unit, a Web network community feature aggregation unit, a Web network community structure updating unit and a community division output unit.

[0045] Further, the Web network data storage unit is used to store Web network data, including structural data, i.e. the adjacency matrix of the network, and content data, i.e. the Web page attributes, and input them into the computer memory; the Web network graph data processing unit is used to preprocess the Web network data to obtain a normalized adjacency matrix and new node features suitable for information aggregation; the Web network community feature aggregation unit obtains a feature matrix containing node multi-order neighbor information through feature propagation, calculates the importance of each order of neighbor information to itself, and then aggregates different order neighbor information according to the importance to generate new node features; the Web network community structure updating unit and the community division output unit are used to update the edge weight of the Web network and output the community division structure; the specific data processing and calculation work in all units are completed by the computer processor, and all units interact with the data of the computer memory.

[0046] Compared with the prior art, the application has the following beneficial effects:

[0047] The method provided in the application has the following significant features compared with the prior art: after the Web network is represented in the form of a graph, the attributes of the nodes can describe Web pages, and the network topology can represent the connection between Web pages. Since the information of a single Web page is often not comprehensive enough, feature propagation can be performed on the basis of the graph topology, and the features of the nodes and the surrounding neighbors can better describe the characteristics of a community. Meanwhile, the strategy of learning the importance of node multi-order neighbor information is adopted, which can better distinguish the importance of different order neighbor information for Web pages. The method can fully reflect the comprehensive characteristics of the community when describing the community structure features, so that the rationality and accuracy of the community division result are improved. BRIEF DESCRIPTION OF DRAWINGS

[0048] Figure 1 The computer implementation system structure diagram of the Web network community division method of the application.

[0049] Figure 2 The figure is a flow chart of the method for dividing Web network communities according to the present invention.

[0050] Figure 3 This is an example of a Web network that uses the method described in the present invention to perform community division. DETAILED DESCRIPTION

[0051] The following is a specific and detailed description of the technical solutions in the embodiments of the present invention in conjunction with the embodiments of the present invention and the accompanying drawings. It should be noted that, for those skilled in the art, several modifications and improvements can be made without departing from the principles of the present invention, and these should also be considered to fall within the scope of protection of the present invention.

[0052] A method for dividing a Web network community based on the importance of multi-order neighbor information of a node includes the following steps:

[0053] Step 1: Represent the Web network in the form of a graph, use the nodes in the graph to represent Web pages, use the feature matrix to describe the attribute information of the nodes, and use the edges between nodes to represent the links between Web pages; the specific process is: Represent the Web network in the form of a graph, denoted as G(V,E), use the node set V = (v1,v2,…,v k ,…,v n ) represents the set of all web pages in the network, n is the number of web page nodes, and the kth node v k Represents the kth web page in the web network, where k ranges from 1 to n. Usually we use the vector X k Describe the kth Web page v k Attribute information; using the edge set E=(e1,e2,…,e j ,…,e m ) represents the set of links between Web pages, m is the number of edges, and the jth edge e j represents the jth link in the network, where j ranges from 1 to m. In addition, when we collect Web network information, we will also obtain a small amount of community category information to which Web pages belong, which we call tags.

[0054] Step 2: Web network data mainly includes structural data (network adjacency matrix) and memory data (Web page attributes). Preprocess the Web network data by symmetrically normalizing the original graph adjacency matrix to obtain the normalized adjacency matrix and performing feature transformation f on the node feature matrix. θ (X) obtain new node features;

[0055] Step 2.1. Calculate the degree of each node in the Web network, that is, the number of edges directly connected to the node.i The degree of each node is denoted as d i ;

[0056] Step 2.2, add a self-loop to each node on the Web network, specifically, set the diagonal of the adjacency matrix to 1, and calculate the network graph normalized adjacency matrix using the degree of the node The calculation method is shown in (1);

[0057]

[0058] Where D is the degree matrix, I is the unit matrix, and A is the initial adjacency matrix;

[0059] Step 2.3, the obtained node attributes are usually sparse and insufficient, but the length of the vector describing the node attributes is often relatively long; therefore, the initial vector is transformed into a shorter vector by a weight matrix, that is, a new node feature is obtained, and the calculation method is shown in equation (2):

[0060] f θ (X) = ReLU(XW (1) )W (2) (2)

[0061] Where the node attribute feature matrix X generates a new feature matrix through the mapping function f θ (X), W (1) is the first weight matrix, W (2) is the second weight matrix, and ReLU = max(0, x) is a nonlinear function; after two weight matrices and a nonlinear function, the initial Web page attribute vector becomes a feature vector with a length of c, where c is the number of community categories, and the feature vectors of all Web pages form a feature matrix.

[0062] Step 3, propagate neighbor features using the normalized adjacency matrix to obtain features containing node neighbor information, and as the propagation range increases, multi-order neighbor feature information around the node can be obtained; feature propagation specifically refers to multiplying the feature matrix of the node and the adjacency matrix of the network graph, so that the new node contains the feature information of the surrounding neighbors, and after multiple propagation, a feature matrix containing multi-order neighbor information of the node is obtained, then the feature matrix generated by the propagation is saved, and the l+1th propagation result is shown in (3):

[0063]

[0064] Where Z (l) represents the result of the lth feature propagation using the normalized adjacency matrix , we call it a feature matrix containing l-order neighbor information; the feature matrix that has not been subjected to feature propagation is Z (0) = f θ(X).

[0065] Step 4, the importance of each order of neighbor information around the node is calculated by using the attention mechanism, and the specific process is: the feature matrix obtained by multiple propagation is stacked into a three-dimensional tensor T, and the importance of each order of neighbor information of each node to itself is calculated, and the calculation method is shown in formula (4):

[0066]

[0067] wherein, is the attention function of node i, which is used to evaluate the importance of each order of neighbor information around node i; m i,l is the importance of each order of neighbor information of node i learned; is the node feature containing the lth order neighbor information.

[0068] Step 5, different order neighbor information is aggregated according to the importance to generate new node features, so that each node feature contains more rich and comprehensive community information; the specific process is: the node and the neighbor feature around the node are weighted and summed to obtain new node features according to the neighbor importance, and the calculation method is shown in formula (5):

[0069]

[0070] wherein, represents the new node feature of node i generated after aggregating each order of neighbor information.

[0071] Step 6, the edge weight of Web network is updated based on the new node feature of step 5, and the edge between two nodes with higher similarity is given higher weight through the aggregated node feature with higher confidence; the specific process is:

[0072] Step 6.1, the similarity S between the node feature generated in step 5 and the direct neighbor is calculated, and the calculation is shown in formula (6);

[0073]

[0074] wherein, S i,j represents the similarity between node i and node j after generating new node features, and the greater the similarity, the more likely the two nodes belong to a class;

[0075] Step 6.2, the value in the adjacency matrix is updated using the calculated similarity, and is recorded and saved, and the update method is shown in (7):

[0076]

[0077] wherein, It represents the weight of the edge between node i and node j, and can also determine the proportion of information aggregation when aggregating neighbor information. The hyperparameter λ controls the update amplitude of the edge weights between nodes.

[0078] Step 7: Iterate steps 2 to 6 until the termination condition is met. The web pages represented by nodes with the same predicted community label in the network are grouped into the same network community, completing the community division of the web network. The specific process is: iterate steps 2 to 6, updating the adjacency matrix once each round. The stopping condition is determined by the loss. Specifically, if the loss does not decrease within a certain number of rounds, the stopping condition is considered met. During the loss calculation process, the node features are first normalized using the Softmax function to output the node predicted label. The Softmax normalization function is:

[0079] Then the cross entropy loss function is used to measure the difference between the node prediction label and the node's true label. The loss calculation is shown in (8):

[0080]

[0081] Where L represents the loss, r is the number of labeled nodes, and y i represents the true label, h i To predict labels, the web pages represented by nodes with consistent predicted labels in the network are grouped into the same network community, and the results are output to complete the community division of the web network.

[0082] A system for implementing the above method is as follows Figure 1 As shown, the system comprises: a computer memory and processor, a web network data storage unit, a web network graph data processing unit, a web network community feature aggregation unit, a web network community structure update unit, and a community partition output unit. Specifically, the web network data storage unit is used to store web network data, including structural data, i.e., the network adjacency matrix, and content data, i.e., web page attributes, and input them into the computer memory; the web network graph data processing unit is used to preprocess the web network data to obtain a normalized adjacency matrix suitable for information aggregation and new node features; the web network community feature aggregation unit obtains a feature matrix containing multi-order neighbor information of a node through feature propagation, calculates the importance of each node's neighbor information of each order to itself, and then aggregates the neighbor information of different orders based on the importance to generate new node features; the web network community structure update unit and the community partition output unit are used to update the web network edge weights and output the community partition structure; the specific data processing and calculation work in all units is completed by the computer processor, and all units interact with the data in the computer memory.

[0083] Example 1

[0084] The Web community division method of the present invention is implemented by a computer program. Figure 1 Shown is a diagram of the system structure implemented by a computer.

[0085] The following will be Figure 2 The implementation process shown in the figure is combined with a specific Web network (such as Figure 3 As shown), the specific implementation of the technical solution proposed by the present invention is described in detail. Figure 3 In the web network shown, the circular nodes represent web pages in the web network, and the lines between the nodes represent the links between the web pages. A total of 51 web pages and 104 links between them are included. Each node contains a sparse node feature vector, which is used to describe the attribute information of each web page. Figure 3 The web network shown is divided into K = 4 communities. Its implementation mainly includes the following key contents:

[0086] Step 1: Represent the Web network as a graph, denoted as G(V,E), where the node set V = (v1, v2, ..., v i ,…,v 51 ) represents a set of 51 web pages in the network, n = 51 is the number of nodes, and the kth node v k represents the kth web page in the web network, where k ranges between 1 and 51; the set of edges E in the graph is (e1, e2,…, e j ,…,e 104 ) represents the set of links between Web pages, m = 104 is the number of edges, and the jth edge e j represents the jth link in the network, where j ranges between 1 and 104.

[0087] Step 2: Preprocess the web data to obtain a normalized adjacency matrix and new node features suitable for feature propagation. This includes the following steps:

[0088] Step 2.1. Calculate the degree of each node in the Web network, that is, the number of edges directly connected to the node. i The degree of memory is d i For example, for Figure 3 In the network shown, the number of edges directly connected to node v1 is 4, and the degree of v1 is d1 = 4;

[0089] Step 2.2: Add self-loops to each node in the graph. In the adjacency matrix, the value of the edge between two nodes is 1, and the value of the edge without is 0. The diagonal is set to 1 to prevent the loss of self-information in the process of aggregating neighbor information. Using the node degree to calculate the normalized adjacency matrix of the network graph can average the amount of information flow, thereby ensuring that the feature propagation process remains stable. Recalculate the weight of the edge between the two nodes as shown in (1):

[0090]

[0091] Where D is the degree matrix, I is the identity matrix, and A is the initial adjacency matrix.

[0092] For example, for Figure 3 In the network shown, the edge weights of nodes v1, v2, v3, v4, and v6 connected by node v1 in the normalized adjacency matrix are approximately (0.2, 0.18, 0.26, 0.17, and 0.15);

[0093] Step 2.3, W (1) and W (2) Transform the initial vector into a shorter vector, that is, obtain new node features. The feature transformation process is as follows:

[0094] f θ (X) = ReLU(XW (1) )W (2) (2)

[0095] For example, for Figure 3 The network shown has four community classifications. We first map the original 200-dimensional sparse vector to 64 dimensions, and then map it to 4 dimensions to obtain preliminary features, and use the feature information for propagation.

[0096] Step 3: Use the normalized adjacency matrix to propagate neighbor features to obtain features containing node neighbor information. Feature propagation specifically refers to multiplying the node's feature matrix with the network graph's adjacency matrix so that the new node contains the feature information of its surrounding neighbors. After multiple propagations, a feature matrix containing multi-order neighbor information of the node is obtained, and the feature matrix generated by the propagation is saved. Feature propagation is usually performed twice. We can obtain the l+1 order neighbor information around the node:

[0097]

[0098] For example, for Figure 3In the network shown above, before neighbor feature information propagation, the features of node v1 are (0.4, 0.5, 0.1, 0.1), the features of node v2 are (0.5, 0.2, 0.1, 0.3), the features of node v3 are (0.8, 0.2, 0.3, 0.1), the features of node v4 are (0.6, 0.1, 0.4, 0.1), and the features of node v6 are (0.9, 0.1, 0.1, 0.3). Using the normalized adjacency matrix obtained above, we can aggregate the surrounding neighbor information. This supplementation of neighbor information makes the results more stable and reliable. After one aggregation, we can obtain the features of node v1 as (0.615, 0.222, 0.199, 0.162).

[0099] Step 4: Stack the feature matrices obtained through multiple propagations into a three-dimensional tensor T, and calculate the importance of each node's neighbor information of each order to itself. The calculation method is shown in formula (4):

[0100]

[0101] For example, for Figure 3 For the network shown in the figure, we first obtain a new feature matrix through feature transformation, and stack the two new feature matrices obtained by two feature propagations into a feature tensor. For node v1, we need to learn the importance of v1's own features, first-order neighbor information, and second-order neighbor information for feature fusion, and obtain (0.5, 0.7, 0.7). Finally, we normalize it to obtain (m 1,0 , m 1,1 , m 1,2 ) coefficients are approximately (0.290, 0.355, 0.355).

[0102] Step 5: According to the importance of neighbor information, the feature information of the node and its neighbors of each order around the node is weighted and summed to obtain the new node feature:

[0103]

[0104] in, Represents the new node feature generated by node i after aggregating neighbor information of each order.

[0105] For example, when node v1 weightedly aggregates its second-order neighbor information, if its own node features are (0.4, 0.5, 0.1, 0.1), the node features of its first-order neighbor information are (0.615, 0.222, 0.199, 0.162), and the node features of its second-order neighbor information are (0.58, 0.18, 0.25, 0.15), and the importance coefficients are (0.290, 0.355, 0.355) respectively, then the final node feature weighted sum is approximately (0.54, 0.29, 0.19, 0.14).

[0106] Step 6, update the network topology according to the obtained node features, the specific steps are as follows:

[0107] Step 6.1, the similarity S between the node features generated by step 5 and the direct neighbor is calculated, which is shown in formula (6);

[0108]

[0109] Where S i,j represents the similarity between node i and node j after generating new node features, and the greater the similarity indicates that the two nodes are more likely to belong to a class. Where node i and j originally have an edge, and we need to update the edge weight using the similarity between the node pair. For example, node v 11 and node v 12 The feature vectors are very similar, so they are probably the same class of Web pages.

[0110] Step 6.2, update the values in the adjacency matrix using the calculated similarity and save, the specific update method is shown in (7):

[0111]

[0112] Where, represents the weight of the edge between node i and node j, and can also determine the proportion of information aggregation when the feature propagates. We need to set the amplitude of edge update, for example, v 11 and v 12 are more similar, then the update amplitude is larger, and v 12 and v 42 are not similar, then the update amplitude needs to be reduced. At the same time, we set λ to be a small value such as 5e-3 to ensure the stability of the adjacency matrix. After enough iterations, the edge weight values of the entire adjacency matrix will change greatly, thereby optimizing the aggregation process of the adjacency matrix.

[0113] Step 7, iterate steps 2 to 6, update the adjacency matrix once per round, and the stopping condition is determined by the loss. Specifically, if the loss does not decrease within 50 iterations, it can be considered to meet the stopping condition. If node v1 finally predicts the label as (0.7 0.1 0.1 0.1), and the true label is (1, 0, 0, 0), then use the cross-entropy loss function to measure the difference between the node predicted label and the node true label, and the loss is calculated as follows:

[0114]

[0115] Where L represents the loss, r is the number of labeled nodes, y i represents the true label, and h iTo predict labels, the loss of v1 alone is calculated to be 0.36. After the iteration, the predicted labels for all nodes are output. Web pages represented by nodes with consistent predicted labels in the network are grouped into the same community, completing the community segmentation of the web network. This community segmentation can be used in recommendation systems. For example, topic push can be used to push topics of interest to people in different communities, as people in different communities have different interests.

Claims

1. A method for dividing web network communities based on the importance of node multi-order neighbor information, characterized in that: The following steps are involved: Step 1: Represent the web network as a graph, using nodes in the graph to represent web pages, using feature matrices to describe node attributes, and using edges between nodes to represent links between web pages. Step 2: Preprocess the Web network data, that is, symmetrically normalize the original graph adjacency matrix to obtain the normalized adjacency matrix, and perform feature transformation on the node feature matrix. Get new node features; Step 3: Use the normalized adjacency matrix to propagate neighbor features to obtain features containing node neighbor information. As the propagation range continues to increase, multi-order neighbor feature information around the node can be obtained; Step 4: Use the attention mechanism to calculate the importance of neighbor information of each order around the node; Step 5: Aggregate neighbor information of different orders according to importance to generate new node features, so that each node feature contains richer and more comprehensive community information; Step 6: Update the edge weights of the Web network based on the new node features in step 5. The aggregated node features have a higher confidence level, and the edges between two nodes with higher similarity are given a higher weight. Step 7: Iterate steps 2 to 6 until the termination condition is met, and classify the web pages represented by nodes with consistent community prediction labels in the web network into the same network community, completing the community division of the web network.

2. A method for dividing web network communities based on the importance of node multi-order neighbor information according to claim 1, characterized in that: The specific process of step 1 is: represent the Web network in the form of a graph, denoted as , using the node set in the graph Represents the collection of all web pages on the network. is the number of Web page nodes, nodes Represents the first Web pages, including The range is from 1 to Between, usually we use vector Description Web pages Attribute information of the graph; using the edge set in the graph Represents a collection of links between Web pages. is the number of edges, where Edge Indicates the first links, of which The range is 1 to In addition, when collecting Web network information, a small amount of community category information to which the Web pages belong will be obtained, which is called a label.

3. The method for dividing Web communities based on the importance of node multi-order neighbor information according to claim 1, characterized in that: The specific process of step 2 is as follows: the web network data mainly includes structural data, i.e., the initial adjacency matrix of the network, and memory data, i.e., web page attributes. The web network data is preprocessed to obtain a normalized adjacency matrix and new node features suitable for information aggregation; Step 2.

1. Calculate the degree of each node in the Web network, that is, the number of edges directly connected to the node. Degree to remember ; Step 2.2: Add self-loops to each node on the Web network. Specifically, set the diagonal of the adjacency matrix to 1 and use the node degree to calculate the normalized adjacency matrix of the network graph. , the calculation method is shown in (1); (1) in, is the degree matrix, is the identity matrix, is the initial adjacency matrix; Step 2.3: The obtained node attributes are usually sparse and insufficient, but the length of the vector describing the node attributes is often long. Therefore, the initial vector is transformed into a shorter vector through the weight matrix, that is, the new node feature is obtained. The calculation method is shown in formula (2): (2) Among them, the node attribute feature matrix After mapping function Generate a new feature matrix, is the first weight matrix, is the second weight matrix, It is a nonlinear function. After two weight matrices and nonlinear functions, the initial web page attribute vector becomes a feature vector of length c, where c is the number of community categories. The feature vectors of all web pages form a feature matrix.

4. The method for dividing Web communities based on the importance of node multi-order neighbor information according to claim 1, characterized in that: The feature propagation in step 3 specifically refers to multiplying the feature matrix of the node and the adjacency matrix of the network graph so that the new node contains the feature information of the surrounding neighbors. After multiple propagations, a feature matrix containing the multi-order neighbor information of the node is obtained, and then the feature matrix generated by the propagation is saved. The result of the secondary propagation is shown in (3): (3) in, Represents the use of normalized adjacency matrix No. The result of the secondary feature propagation is called inclusion The feature matrix of the order neighbor information; the feature matrix without feature propagation is .

5. The method for dividing Web communities based on the importance of node multi-order neighbor information according to claim 1, characterized in that: The specific process of step 4 is: stacking the feature matrices obtained by multiple propagations into a three-dimensional tensor , and calculate the importance of each node's neighbor information of each order to itself. The calculation method is shown in formula (4): (4) in, is a node The attention function is used to evaluate the node The importance of neighbor information of all levels; is the learned node The importance of neighbor information at each order; It contains Node characteristics of the first-order neighbor information.

6. The method for dividing Web communities based on the importance of node multi-order neighbor information according to claim 1, characterized in that: The specific process of step 5 is: according to the importance of neighbors, the node and the neighbor features around the node are weighted and summed to obtain the new node feature. The calculation method is shown in formula (5): (5) in, Representation node New node features are generated after aggregating neighbor information of each order.

7. The method for dividing Web communities based on the importance of node multi-order neighbor information according to claim 1, characterized in that: The specific process of step 6 is as follows: Step 6.1: Calculate the similarity between the node features generated in step 5 and the direct neighbors , calculated as shown in formula (6); (6) in, Indicates the node after generating new node features and nodes The greater the similarity, the more likely the two nodes are to belong to the same category; Step 6.2: Use the calculated similarity to update the values ​​in the adjacency matrix and save the records. The update method is shown in (7): (7) in, Representation node and nodes The weight of the edge can also determine the proportion of information aggregation when aggregating neighbor information, a hyperparameter Controls how much weights are updated between nodes.

8. The method for dividing Web communities based on the importance of node multi-order neighbor information according to claim 1, characterized in that: The specific process of step 7 is: iterate steps 2 to 6, update the adjacency matrix once each round, and the stopping condition is determined by the loss; specifically, if the loss no longer decreases within a certain number of rounds, it can be considered that the stopping condition is met; in the process of calculating the loss, the node features are first normalized by the Softmax function to output the node prediction label, and the Softmax normalization function is: ; Then the cross entropy loss function is used to measure the difference between the node prediction label and the node true label. The loss calculation is shown in (8): (8) Where L represents the loss, r is the number of labeled nodes, represents the true label, To predict labels, the web pages represented by nodes with consistent predicted labels in the network are grouped into the same network community, and the results are output to complete the community division of the web network.

9. A Web community partitioning system based on the importance of node multi-level neighbor information, characterized by: The method for implementing the Web community division method according to any one of claims 1 to 8 comprises a computer memory and a processor, a Web network data storage unit, a Web network graph data processing unit, a Web network community feature aggregation unit, a Web network community structure updating unit and a community division output unit.

10. The web community division system based on the importance of node multi-level neighbor information according to claim 9, characterized in that: The web network data storage unit is used to store web network data, including structural data, i.e., the adjacency matrix of the network, and content data, i.e., web page attributes, and input them into a computer memory; the web network graph data processing unit is used to preprocess the web network data to obtain a normalized adjacency matrix and new node features suitable for information aggregation; The web network community feature aggregation unit obtains a feature matrix containing multi-order neighbor information of a node through feature propagation, calculates the importance of each node's neighbor information of each order to itself, and then aggregates the neighbor information of different orders according to the importance to generate a new node feature; The Web network community structure updating unit and the community division output unit are used to update the Web network edge weights and output the community division structure; the specific data processing and calculation work in all units is completed by the computer processor, and all units interact with the data in the computer memory.

Citation Information

Patent Citations

  • Community discovery method based on label propagation with local influence

    CN108073944A

  • Community division method and system based on social network, and storage medium

    CN113407784A