A community detection method based on node topology and semantic attributes

By combining network topology and semantic properties, using Jaccard distance and community tag propagation algorithm, the problem of low accuracy of traditional community detection methods is solved, and more accurate community division and recommendation system is achieved.

CN117493701BActive Publication Date: 2024-11-08LANZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311511390.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2024-11-08
Estimated Expiration
2043-11-14

AI Technical Summary

Technical Problem

Traditional community detection methods fail to effectively combine network topology structure and node semantic attributes, resulting in low accuracy of community division, especially poor division of isolated nodes.

Method used

The topological structure and semantic attribute similarity of the Jaccard distance calculation nodes are used to calculate the centrality and influence of nodes, and initial community division is divided through the community label propagation algorithm, and smaller community and boundary nodes are reassigned to improve community detection accuracy.

Benefits of technology

It improves the accuracy of online club detection, can divide clubs more accurately, and is suitable for complex networks and recommendation systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117493701B_ABST
    Figure CN117493701B_ABST
Patent Text Reader

Abstract

A community detection method based on node topology and semantic attributes, step 1: calculating the comprehensive similarity between a node and its neighbors; step 2: calculating the node centrality and the node influence in the first-order and second-order neighborhoods based on the node comprehensive similarity; step 3: propagating community labels based on the node influence; step 4: reallocating nodes for smaller communities; step 5: reallocating community boundary nodes. The present invention improves the accuracy of community detection in networks with node semantic attributes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of complex network analysis, and in particular relates to a community detection method based on node topology structure and semantic attributes. Background Art

[0002] The main problem with traditional community detection methods is that they are proposed for general networks, which do not have node semantic attributes. These methods can effectively divide communities, but they do not consider the semantic attributes of nodes when dividing the community a node belongs to, resulting in low accuracy, especially the inability to accurately divide isolated nodes into appropriate communities. With the widespread use of technologies such as Web 2.0, more and more networks provide semantic attributes of nodes, such as the age and hobbies of individuals in social networks. Therefore, it is necessary to combine network topology and node semantic attributes to divide communities, thereby improving the accuracy of community detection. Summary of the invention

[0003] In order to overcome the above technical problems, the purpose of the present invention is to provide a community detection method based on node topology structure and semantic attributes, which not only considers the topological structure of nodes in the network, but also takes into account the semantic attributes of the nodes, and at the same time, redistributes nodes for smaller communities and redistributes community boundary nodes to improve the accuracy of network community detection.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is:

[0005] Step 1: Use Jaccard distance to calculate the topological structure similarity and semantic attribute similarity between a node and its neighbors, and use α to measure the different contributions between the two to obtain the node comprehensive similarity HS; Jaccard distance is the ratio of the intersection and union of the elements in two vectors;

[0006] Step 2: Calculate the node centrality C based on the node comprehensive similarity HS hs and the node influence SI in the first-order and second-order neighborhoods;

[0007] Step 3: Propagate community labels based on node influence SI and return the community detection result cdr1;

[0008] Step 4: Redistribute nodes for smaller communities and return the community detection result cdr2;

[0009] Step 5: Redistribute the community boundary nodes and return the community detection result cdr3.

[0010] The process steps for calculating the comprehensive similarity of nodes in step 1 include:

[0011] Step 1.1: Use Jaccard distance to calculate the node topology similarity TS. The calculation process is as follows:

[0012]

[0013] Where Γ(v)′ represents the neighborhood node set of node v, which includes node v and the neighbor node set of node v. |Γ(v)′∩Γ(u)′| represents the number of nodes in the union of Γ(v)′ and Γ(u)′, and |Γ(v)′∪Γ(u′)| represents the number of nodes in the intersection of Γ(v)′ and Γ(u)′.

[0014] Step 1.2: Use Jaccard distance to calculate the node semantic attribute similarity AS. The calculation process is as follows:

[0015]

[0016] Where W(v) refers to the attribute vector of node v, |W(v)∩W(u)| refers to the number of common attributes of nodes v and u, and |W(v)∪W(u)| refers to the total number of attributes of nodes v and u.

[0017] Step 1.3: Use a super parameter α to flexibly adjust the contribution of node topology and semantic attributes to the node comprehensive similarity HS. The calculation process is as follows:

[0018]

[0019] In step 2, the node centrality C is calculated hs The process steps of node influence SI in the first-order and second-order neighborhoods include:

[0020] Step 2.1: Define the information volume NI(v) of a node v, and its calculation process is as follows:

[0021]

[0022] Step 2.2: Normalize the centrality C of a node v hs (v), the calculation process is as follows:

[0023]

[0024] Step 2.3: Define the influence of a node's first-order neighbors on it. The calculation process is as follows:

[0025]

[0026] Among them, v 1 Indicates that node v is a first-order neighbor of node u, that is, v 1 ∈Γ(u). Chs (v 1 ) represents node v 1 The centrality of HS(u, v) represents the comprehensive similarity between nodes u and v, and D(v 1 ) is the degree of node u;

[0027] Step 2.4: Define the influence of the second-order neighbors of a node on it. The calculation process is as follows:

[0028]

[0029] Among them, v 2 Indicates that node v is a second-order neighbor of node u, that is, v 2 ∈Γ(v 1 ).

[0030] In step 3, the steps of performing community label propagation based on node influence SI include:

[0031] Step 3.1: Calculate the centrality C of each node hs ;

[0032] Step 3.2: Iterate the change of node labels until the node labels no longer change. The process of updating node labels is as follows:

[0033] Step 3.2.1: Create a node label information dictionary;

[0034] Step 3.2.2: Find the first-order neighbor set of the node whose label needs to be updated;

[0035] Step 3.2.3: Save the information propagated by the node's first-order neighbors to the node into the node label information dictionary;

[0036] Step 3.2.4: Find the set of second-order neighbors of the node whose label needs to be updated;

[0037] Step 3.2.5: Save the information propagated by the node's second-order neighbors to the node into the node label information dictionary;

[0038] Step 3.2.6: Return the label corresponding to the maximum value of the node label dictionary information as the node label;

[0039] Step 3.3: Return the community detection result cdr1.

[0040] In step 4, the step of reallocating nodes for smaller communities includes:

[0041] Step 4.1: Find the communities whose number of nodes is less than the set threshold r, remove the nodes from these communities, and delete these communities;

[0042] Step 4.2: Reassign the nodes in the small-scale community to the community according to the community belonging index CA, where the calculation formula of the community belonging index CA is as follows:

[0043]

[0044] Among them, HS(u, v) is the comprehensive similarity between nodes u and v, |C i |It is Club C i The number of nodes in the

[0045] Step 4.3: Return the community detection result cdr2.

[0046] In step 5, the step of reallocating community boundary nodes includes:

[0047] Step 5.1: Find the boundary nodes of each community, where community C i The calculation process of the boundary nodes is as follows:

[0048]

[0049] Step 5.2: Reassign community boundary nodes to communities based on community belongingness index;

[0050] Step 5.3: Return the community detection result cdr3.

[0051] The present invention provides beneficial effects.

[0052] The present invention provides a community detection method based on node topology and semantic attributes. First, the node influence is obtained by calculating the comprehensive similarity of the nodes, and then the initial community division is obtained by the label propagation algorithm. Finally, the accuracy of the network community detection result is improved by using small-scale community redistribution and community boundary node re-checking. This method can not only be used for network community detection, but also can be used in recommendation systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 Schematic diagram of community detection of the NILPA method of the present invention.

[0054] Figure 2 Schematic diagram of updating node community labels of the NILPA method of the present invention.

[0055] Figure 3 It is a schematic diagram of small-scale community node redistribution of the NILPA method of the present invention.

[0056] Figure 4 It is a schematic diagram of community boundary node reallocation of the NILPA method of the present invention.

[0057] Figure 5 is an example of the present invention in a social network. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] The following is a specific embodiment of the present invention applied in the field of social media recommendation.

[0060] There are several pieces of interaction data between users (<u1,u2> , …, n ,u m >), where u represents a user, and a user can interact with multiple users. When building a user social network, users can be abstracted as nodes in the social network, and the interaction data between users can be abstracted as edges between the two. After the social network is built, the steps to use NLLPA to recommend other users to a user are as follows:

[0061] Step 1: Calculate the comprehensive similarity of nodes in the social network;

[0062] Step 1.1: Use Jaccard distance to calculate the node topology similarity TS. The calculation process is as follows:

[0063]

[0064] Where Γ(v)′ represents the neighborhood node set of node v, which includes node v and the neighbor node set of node v. |Γ(v)′∩Γ(u)′| represents the number of nodes in the union of Γ(v)′ and Γ(u)′, and |Γ(v)′∪Γ(u′)| represents the number of nodes in the intersection of Γ(v)′ and Γ(u)′.

[0065] Step 1.2: Use Jaccard distance to calculate the node semantic attribute similarity AS. The calculation process is as follows:

[0066]

[0067] Where W(v) refers to the attribute vector of node v, |W(v)∩W(u)| refers to the number of common attributes of nodes v and u, and |W(v)∪W(u)| refers to the total number of attributes of nodes v and u.

[0068] ​Step 1.3: Use a super parameter α to flexibly adjust the contribution of node topology and semantic attributes to the node comprehensive similarity HS. The calculation process is as follows:

[0069]

[0070] Step 2: Calculate the node centrality C in the social network hs The process steps of node influence SI in the first-order and second-order neighborhoods include:

[0071] Step 2.1: Define the information volume NI(v) of a node v, and its calculation process is as follows:

[0072]

[0073] Step 2.2: Normalize the centrality C of a node v hs (v), the calculation process is as follows:

[0074]

[0075] Step 2.3: Define the influence of a node's first-order neighbors on it. The calculation process is as follows:

[0076]

[0077] Among them, v 1 Indicates that node v is a first-order neighbor of node u, that is, v 1 ∈Γ(u). C hs (v 1 ) represents node v 1 The centrality of HS(u, v) represents the comprehensive similarity between nodes u and v, and D(v 1 ) is the degree of node u;

[0078] Step 2.4: Define the influence of the second-order neighbors of a node on it. The calculation process is as follows:

[0079]

[0080] Among them, v 2 Indicates that node v is a second-order neighbor of node u, that is, v 2 ∈Γ(v 1 ).

[0081] Step 3: The process of community label propagation based on node influence SI in social networks is shown in the attached Figure 1 and attached Figure 2 , the steps include:

[0082] Step 3.1: Calculate the centrality C of each node hs ;

[0083] Step 3.2: Iterate the change of node labels until the node labels no longer change. The process of updating node labels is as follows:

[0084] Step 3.2.1: Create a node label information dictionary;

[0085] Step 3.2.2: Find the first-order neighbor set of the node whose label needs to be updated;

[0086] Step 3.2.3: Save the information propagated by the node's first-order neighbors to the node into the node label information dictionary;

[0087] Step 3.2.4: Find the set of second-order neighbors of the node whose label needs to be updated;

[0088] Step 3.2.5: Save the information propagated by the node's second-order neighbors to the node into the node label information dictionary;

[0089] Step 3.2.6: Return the label corresponding to the maximum value of the node label dictionary information as the node label;

[0090] Step 3.3: Return the community detection result cdr1.

[0091] Step 4: Redistribute nodes for smaller communities in the social network. Figure 3 , the steps include:

[0092] Step 4.1: Find the communities whose number of nodes is less than the set threshold r, remove the nodes from these communities, and delete these communities;

[0093] Step 4.2: Reassign the nodes in the small-scale community to the community according to the community belonging index CA, where the calculation formula of the community belonging index CA is as follows:

[0094]

[0095] Among them, HS(u, v) is the comprehensive similarity between nodes u and v, |C i |It is Club C i The number of nodes in the

[0096] Step 4.3: Return the community detection result cdr2.

[0097] Step 5: Redistribute the community boundary nodes in the social network. Figure 4 , the steps include:

[0098] Step 5.1: Find the boundary nodes of each community, where community C i The calculation process of the boundary nodes is as follows:

[0099]

[0100] Step 5.2: Reassign community boundary nodes to communities based on community belongingness index;

[0101] Step 5.3: Return the community detection result cdr3.

[0102] The community detection result cdr3 can recommend other users to the user. If several users belong to the same community, it means that these users have strong similarities and should be recommended to each other. For a certain user, other users in the same community can be directly selected for recommendation.

[0103] Attached Figure 5 Description, users with similar hobbies should belong to the same community and recommend each other. Figure 5 As shown, users who like fitness, users who like listening to music, and users who like walking should all belong to the same community, and they should recommend each other.

Claims

1. A community detection method based on node topology and semantic attributes, characterized in that: The steps include: Step 1: Use Jaccard distance to calculate the topological structure similarity and semantic attribute similarity between a node and its neighbors, and use α to measure the different contributions between the two to obtain the node comprehensive similarity HS; Jaccard distance is the ratio of the intersection and union of the elements in two vectors; Step 2: Calculate the node centrality C based on the node comprehensive similarity HS hs and the node influence SI in the first-order and second-order neighborhoods; Step 3: Propagate community labels based on node influence SI and return the community detection result cdr1; Step 4: Redistribute nodes for smaller communities and return the community detection result cdr2; Step 5: Redistribute the community boundary nodes and return the community detection result cdr3; In step 1, the process steps of calculating the comprehensive similarity of nodes include: Step 1.1: Use Jaccard distance to calculate the node topology similarity TS. The calculation process is as follows: Where Γ(v)′ represents the neighborhood node set of node v, which includes node v and the neighbor node set of node v, |Γ(v)′∩Γ(u)′| represents the number of nodes in the union of Γ(v)′ and Γ(u)′, and |Γ(v)′∩Γ(u)′| represents the number of nodes in the intersection of Γ(v)′ and Γ(u)′; Step 1.2: Use Jaccard distance to calculate the node semantic attribute similarity AS. The calculation process is as follows: Where W(v) refers to the attribute vector of node v, |W(v)∩W(u)| refers to the number of common attributes of nodes v and u, and |W(v)∪W(u)| refers to the total number of attributes of nodes v and u. Step 1.3: Use a super parameter α to flexibly adjust the contribution of node topology and semantic attributes to the node comprehensive similarity HS. The calculation process is as follows: In step 2, the node centrality C is calculated hs The process steps of node influence SI in the first-order and second-order neighborhoods include: Step 2.1: Define the information volume NI(v) of a node v, and its calculation process is as follows: Step 2.2: Normalize the centrality C of a node v hs (v), the calculation process is as follows: Step 2.3: Define the influence of a node's first-order neighbors on it. The calculation process is as follows: Among them, v 1 Indicates that node v is a first-order neighbor of node u, that is, v 1 ∈Γ(u),C hs (v 1 ) represents node v 1 The centrality of HS(u, v) represents the comprehensive similarity between nodes u and v, and D(v 1 ) is the degree of node u; Step 2.4: Define the influence of the second-order neighbors of a node on it. The calculation process is as follows: Among them, v 2 Indicates that node v is a second-order neighbor of node u, that is, v 2 ∈Γ(v 1 ); In step 3, the steps of performing community label propagation based on node influence SI include: Step 3.1: Calculate the centrality C of each node hs ; Step 3.2: Iterate the change of node labels until the node labels no longer change. The process of updating node labels is as follows: Step 3.2.1: Create a node label information dictionary; Step 3.2.2: Find the first-order neighbor set of the node whose label needs to be updated; Step 3.2.3: Save the information propagated by the node's first-order neighbors to the node into the node label information dictionary; Step 3.2.4: Find the set of second-order neighbors of the node whose label needs to be updated; Step 3.2.5: Save the information propagated by the node's second-order neighbors to the node into the node label information dictionary; Step 3.2.6: Return the label corresponding to the maximum value of the node label dictionary information as the node label; Step 3.3: Return the community detection result cdr1; In step 4, the step of reallocating nodes for smaller communities includes: Step 4.1: Find the communities whose number of nodes is less than the set threshold r, remove the nodes from these communities, and delete these communities; Step 4.2: Reassign the nodes in the small-scale community to the community according to the community belonging index CA, where the calculation formula of the community belonging index CA is as follows: Among them, HS(u, v) is the comprehensive similarity between nodes u and v, |C i |It is Club C i The number of nodes in the Step 4.3: Return the community detection result cdr2; In step 5, the step of reallocating community boundary nodes includes: Step 5.1: Find the boundary nodes of each community, where community C i The calculation process of the boundary nodes is as follows: Step 5.2: Reassign community boundary nodes to communities based on community belongingness index; Step 5.3: Return the community detection result cdr3.