Community discovery method, device, apparatus and computer storage medium

By calculating the influence of edges to update the edge labels in the community detection algorithm, the problem of inaccurate community division caused by randomness in the label propagation process is solved, and more accurate and stable community division is achieved.

CN118827412BActive Publication Date: 2025-12-09CHINA MOBILE M2M +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410733437.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2025-12-09
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

In existing community detection algorithms, there is randomness in the label propagation process, which can cause user nodes to be assigned to inappropriate communities, resulting in inaccurate community division.

Method used

The influence of an edge is determined by calculating the ratio of its degree to the degree of the edges connecting to the user nodes. The edge labels are then updated in descending order of influence, and the target edge label is used as the label of the user nodes connected to that edge. This determines that user nodes with the same label belong to the same community.

Benefits of technology

This avoids randomness in the label propagation process, improves the accuracy and stability of community division, and ensures that user nodes are assigned to appropriate communities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118827412B_ABST
    Figure CN118827412B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a community discovery method, device, equipment and computer storage medium, and belongs to the field of network analysis. The embodiment of the present application obtains user nodes and edges in a community, the edges include behavior relationships between the user nodes, the edges include edge labels, calculates the influence of the edges by the ratio of the degree of the edges and the degree of the connecting edges of the user nodes connected with the edges, the degree of the edges includes the degree of the user nodes connected with the edges, and updates the edge label of the edges to the edge label with the highest appearance frequency in the edge labels of the connecting edges of the user nodes connected with the edges according to the order of the influence of the edges from large to small. The edge label of each edge is used as the label of the user nodes connected with the edge, and the user nodes with the same label are determined to be in the same community. The embodiment of the present application can avoid randomness in the label propagation process, and further avoid that the user nodes are divided into inappropriate communities, thereby improving the accuracy of community division.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of network analysis, and particularly relates to a community discovery method, device, equipment, computer storage medium and computer program product. BACKGROUND

[0002] In the current information age, the scale and complexity of network data are growing rapidly. How to mine valuable information from these complex network structures is of great importance to scientific research, social management, business decision-making and other fields. Community discovery, as a core technology in complex network analysis, has great scientific significance and practical application value for mining network data value and promoting interdisciplinary cooperation. Existing community discovery algorithms mainly include label propagation algorithm, local expansion optimal partition algorithm and graph-based discovery algorithm. However, the existing technology has the problem that randomness occurs in the label propagation process, resulting in that user nodes are divided into inappropriate communities, causing inaccurate community division. SUMMARY

[0003] The embodiments of the present application provide a community discovery method, device, equipment, computer storage medium and computer program product, which can avoid the problem of randomness in the label propagation process and improve the accuracy of community division.

[0004] In a first aspect, the embodiments of the present application provide a community discovery method, which comprises:

[0005] Obtaining user nodes in a community and edges between the user nodes, the edges including behavior relationships between the user nodes, and the edges including edge labels;

[0006] Calculating a degree of the edges, and obtaining an influence of the edges by a ratio of the degree of the edges to degrees of connection edges of the user nodes connected with the edges, the degree of the edges including degrees of the user nodes connected with the edges, and the degree of the user nodes being a number of the edges connected with the user nodes;

[0007] Updating the edge labels of the edges to target edge labels in order according to an order of the influences of the edges from large to small, the target edge label being an edge label with the highest frequency of occurrence in the edge labels of the connection edges of the user nodes connected with the edges;

[0008] Taking the target edge label of the edges as labels of the user nodes connected with the edges;

[0009] Determining that the user nodes with the same labels are in the same community.

[0010] In an implementable embodiment, the method further comprises:

[0011] Before the edge labels of the edges are updated to the target edge labels in order, the method further comprises:

[0012] determining whether the edge label appearing most frequently in the edge labels of the connecting edges of the edge-connected user nodes is unique;

[0013] in the case where the edge label appearing most frequently in the edge labels of the connecting edges of the edge-connected user nodes is not unique, determining a target edge corresponding to the edge label appearing most frequently in the edge labels of the connecting edges of the edge-connected user nodes;

[0014] calculating the same label times of the edge and the target edge from the same label times in the labels of the edge-connected user nodes of the edge and the target edge;

[0015] calculating the similarity of the edge and the target edge from the ratio of the same label times to the total appearance times of the labels of the edge-connected user nodes of the edge and the target edge;

[0016] determining the edge label with the highest similarity as the target edge label.

[0017] In an implementable embodiment, the method further comprises:

[0018] obtaining the user nodes and the edges between the user nodes in the community, comprising:

[0019] obtaining the user nodes and the edges between the user nodes in the community;

[0020] adding a user node connected to the user node as a background user node in the community, and obtaining a target influence of the user node according to the local clustering coefficient of the background user node and the user node, the target influence being used to evaluate the influence value of the user node on the user node-connected user nodes;

[0021] sequentially numbering the user nodes and the edges according to the target influence of the user nodes, the number of the edge being consistent with the first number in the numbers of the edge-connected user nodes;

[0022] determining the number of the edge as the edge label of the edge.

[0023] In an implementable embodiment, the method further comprises:

[0024] after obtaining the user nodes and the edges between the user nodes in the community, the method further comprises:

[0025] obtaining the ideal number of the connecting edges between the user nodes connected to the user node to obtain the ideal number of the connecting edges of the user node;

[0026] calculating the ratio of the number of the connecting edges between the user nodes connected to the user node to the ideal number of the connecting edges;

[0027] determining the ratio as the local clustering coefficient of the user node.

[0028] In an implementable embodiment, the method further comprises:

[0029] After determining the ratio as the local clustering coefficient of the user node, the method further comprises:

[0030] calculating a mean value of the local clustering coefficients of the user nodes connected to the user node;

[0031] summing the mean value of the local clustering coefficients of the user nodes connected to the user node and the value of the local clustering coefficient of the user node to obtain a preliminary influence of the user node;

[0032] obtaining a target influence of the user node according to the local clustering coefficients of the background user nodes and the user node, comprising:

[0033] distributing the value of the preliminary influence of the user node to the preliminary influences of the target user nodes connected to the user node, the target user nodes including the user nodes connected to the user node and the background user nodes;

[0034] distributing the value of the preliminary influence of the background user node to the preliminary influence of the user node to obtain the target influence of the user node.

[0035] In an implementable embodiment, the method further comprises:

[0036] distributing the value of the preliminary influence of the background user node to the preliminary influence of the user node to obtain the target influence of the user node, comprising:

[0037] judging whether the value of the preliminary influence of the background user node is within a preset interval threshold;

[0038] in a case that the value of the preliminary influence of the background user node is within the preset interval threshold, distributing the value of the preliminary influence of the background user node to the preliminary influence of the user node to obtain the target influence of the user node.

[0039] In an implementable embodiment, the method further comprises:

[0040] After distributing the value of the preliminary influence of the background user node to the preliminary influence of the user node to obtain the target influence of the user node, the method further comprises:

[0041] deleting the background user nodes in the community.

[0042] In a second aspect, the embodiments of the present application provide a community discovery device, the device comprising:

[0043] an obtaining module, configured to obtain user nodes in a community and edges between the user nodes, the edges including behavioral relationships between the user nodes, and the edges including edge labels;

[0044] a calculating module configured to calculate a degree of the edge, and the influence of the edge is obtained by a ratio of the degree of the edge to degrees of connecting edges of user nodes connected to the edge, the degree of the edge comprising degrees of user nodes connected to the edge, and the degree of the user node being a number of edges connected to the user node;

[0045] an updating module configured to update the edge label of the edge to a target edge label in turn according to an order of the influence of the edge from large to small, the target edge label being an edge label with the highest frequency of occurrence among edge labels of connecting edges of user nodes connected to the edge;

[0046] a determining module configured to determine the target edge label of the edge as a label of the user node connected to the edge, and determine that user nodes with the same label are in the same community.

[0047] In a third aspect, an embodiment of the present application provides a device for community discovery, and the device comprises:

[0048] a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the method for community discovery according to any one of claims 1-7.

[0049] In a fourth aspect, an embodiment of the present application provides a computer storage medium, and the computer storage medium stores computer program instructions, and the computer program instructions are executed by a processor to implement the method for community discovery according to any one of claims 1-7.

[0050] In a fifth aspect, a computer program product, and instructions in the computer program product are executed by a processor of an electronic device to enable the electronic device to implement the method for community discovery according to any one of claims 1-7.

[0051] The method, device, equipment and computer storage medium for community discovery according to the embodiments of the present application can obtain user nodes in a community and edges between the user nodes, first calculate an influence of each edge obtained by a ratio of a degree of the edge to degrees of adjacent edges of the edge, the degree of the edge comprising a number of connecting edges of user nodes connected to the edge, determine an order of the influence of the edge from large to small, and update edge labels of the edges in turn, then update a label of the edge to an edge label with the highest frequency of occurrence among edge labels of adjacent edges of the edge, thereby avoiding randomness in the label updating process; the edge label of the edge is transmitted as a label of the user node connected to the edge, and user nodes with the same label are determined to be in the same community, thereby dividing a community with clear boundaries. Therefore, the embodiments of the present application can avoid randomness in the label propagation process, and further avoid user nodes from being divided into inappropriate communities, thereby improving the accuracy of community division. BRIEF DESCRIPTION OF DRAWINGS

[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced. Those drawings can help the ordinary skilled in the art to obtain other drawings without any creative effort.

[0053] Figure 1 is a flow diagram of a community discovery method provided by an embodiment of the present application;

[0054] Figure 2 is a network structure diagram of a community discovery provided by an embodiment of the present application;

[0055] Figure 3 is a flow diagram of another community discovery method provided by an embodiment of the present application;

[0056] Figure 4 is a structure diagram of a community discovery device provided by an embodiment of the present application;

[0057] Figure 5 is a structure diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0058] The features and exemplary embodiments of various aspects of the present application will be described in detail below, in order to make the purposes, technical solutions and advantages of the present application more clear and apparent, the present application will be further described in detail below with reference to the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. The present application can be implemented without some of these specific details by those skilled in the art. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.

[0059] It should be noted that, in this paper, relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the elements defined by the statement "include" do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0060] In the embodiments of the present application, a community refers to a group composed of individuals with common characteristics, common interests or similar relationships. In a graph structure, a community represents a group of closely connected and interrelated user nodes, forming a structure with close internal connections and sparse external connections. Community discovery refers to the process of finding a group of closely interrelated user nodes, i.e., the above-mentioned community, in a given network through algorithms and analysis methods. Through community discovery, the hidden organizational structure, social groups and information flow patterns in the network can be revealed, not only better understanding and analyzing complex networks, but also identifying user groups with similar interests or behavior patterns, and then providing personalized recommendation services to the user groups, etc.

[0061] The current society is in the period of information explosion, and users' attention is increasingly focused on the field of personal interest, which makes them tend to join the relevant community or interest group. In view of this, the community discovery technology is particularly important for large social platforms such as WeChat, Weibo, Facebook, Douban and Baidu Post Bar, which not only helps to build a more closely-knit user group, but also optimizes the user experience. For example, in the field of commercial advertising, accurately positioning the target audience has become the key to improving the effectiveness of advertising. By deeply analyzing the behavior information such as the behavior patterns and behavior relationships between users, the community affiliation of users can be divided, and the enterprise can realize the accurate placement of targeted advertising, which not only improves the advertising effect but also effectively saves network resources. This strategy ensures that the advertising content can hit potential customers and maximize profits. For example, community discovery also has a revolutionary significance for the marketing strategy of enterprises. Enterprises can use community structure mining technology to analyze the complex network relationship between user and product purchase and evaluation, and then provide personalized product recommendations based on understanding consumer preferences, which not only enhances the user experience, but also promotes the dual improvement of sales efficiency and customer satisfaction.

[0062] Current community discovery algorithms mainly fall into the following categories:

[0063] (1) Label Propagation Algorithm (LPA) is a fast method to assign user nodes community membership by using labels, where a user node carries a label that indicates its community membership. This process involves the transmission of labels between neighboring user nodes, and the label that each user node eventually accepts defines its community membership. After that, the Concurrent Optimization of Partitioning and Recomputation Algorithm (COPRA) improves the process of community assignment of user nodes by synchronizing the average of all neighboring user nodes' membership coefficients. Then, the Self-organizing Label Propagation Algorithm (SLPA) introduces a new dimension to propagate labels according to the direct interaction rules between user nodes, and configures a buffer for each user node to save the received information, which improves the processing detail and information utilization. Although the label propagation algorithm is favored for its fast running speed, its random label propagation mechanism also raises some problems: this directly leads to the output community structure of the algorithm may have high instability and the division result is not accurate, often forming smaller or fragmented communities.

[0064] (2) Local expansion optimal partition algorithm, the local expansion optimal partition algorithm is an algorithm that is committed to optimizing the community structure by maximizing the local quality function of the user node dense area. The function measures the tightness inside the community, allows user nodes to share across different communities, and embodies the concept of overlapping communities. Among them, the iterative scanning algorithm (Iterative Scan Algorithm, IS) starts from a set of candidate user nodes, gradually increases or removes user nodes according to the evaluation function related to link density, to continuously improve the local optimization index of the community, until it cannot be further improved. The local function maximization algorithm (Local Function Maximization Algorithm, LFM) expands the community from a randomly selected starting user node, gradually expands the community, until adding new user nodes no longer improves the value of the target optimization function, showing a parameter-sensitive characteristic. The efficient affinity-based graph linking community detection algorithm (Efficient Affinity-based Graph Linking for Community Detection, EAGLE) generates a hierarchical structure of communities using an aggregation framework. First, all the largest factions (the densest subgraphs) are identified as the initial community basis, and then these factions are gradually merged according to the high similarity criterion. The community discovery algorithm based on lattice evolution (GCE) reduces redundancy by quantifying the distance between different communities to enhance the uniqueness and distinction of community division. However, these algorithms also have some limitations, for example, the performance of the LFM algorithm is greatly affected by the selected parameters, and the EAGLE algorithm can accurately handle overlapping communities, but due to the high time complexity, it is not convenient to process large-scale networks.

[0065] (3) Graph-based discovery algorithm, the graph-based community discovery algorithm divides network links by analyzing the multi-level similarity of edges, which means that when the edges pointing to a user node are associated with multiple communities, the user node is considered as an overlapping user node, that is, it belongs to multiple communities at the same time. However, the disadvantage of this method is that since the overlapping user node serves as a bridge connecting different communities, it may cause the community boundary to be unclear, thereby affecting the clarity and independence of community division.

[0066] In the above community discovery algorithm, the label propagation process is affected by factors such as label initialization randomness, parallel update uncertainty, label propagation selection randomness, and overlapping user node processing complexity, which sometimes leads to incorrect classification of user nodes, reducing the accuracy and stability of community division.

[0067] In order to solve the problems in the prior art, the embodiments of the present application provide a community discovery method, device, equipment and computer storage medium.

[0068] Firstly, the community discovery method provided by the embodiments of the present application is introduced.

[0069] In the embodiments of the present application, a user node can represent an individual (user) in a group (community), the user node can represent each user node in the community, and an edge represents a behavior pattern or behavior relationship between users, the edge can represent each edge in the community, and edges connecting the user nodes represent that the users have the same, similar or associated behavior patterns or behavior relationships.

[0070] Figure 1 A flowchart of the community discovery method provided by an embodiment of the present application is shown.

[0071] As shown in Figure 1 , the method can include the following steps:

[0072] S110: Obtain user nodes in a community and edges between the user nodes, the edges including behavior relationships between the user nodes, and the edges including edge labels.

[0073] In the embodiments of the present application, a directed graph can be constructed according to the behavior patterns or behavior relationships between users in the community, and G={V, E} is used to represent the graph, where V is a user node set, i.e., an individual user set, E is a set of edges of the graph, i.e., a set of behavior patterns or behavior relationships between users, the graph G has n=|V| user nodes and m=|E| edges, and 1, 2, 3,..., n are used to assign each user node with a user node label, the user node label is used to identify the community attribution of the user node in the network, the degree of the user node v i is represented by d i , the edge between the user node v i and the user node v j is represented by e ij , the weight of each edge in the directed graph is set to 1, the weight is represented by w ij , and w ij =1. The graph G includes a set of user nodes and edges (G={V n ,E m}, E m ={e ij i,j∈V n}).

[0074] Obtain all user nodes (users) in a community and edges between the user nodes representing behavior patterns or behavior relationships between users, each user node includes a label used to identify the community attribution of the user node in the network, and each edge includes an edge label used to identify the community attribution of the edge in the network.

[0075] S120: calculating the degree of the edge, the influence of the edge being the ratio of the degree of the edge to the degree of the connecting edges of the user nodes connected to the edge, the degree of the edge including the degrees of the user nodes connected to the edge, the degree of the user node being the number of edges connected to the user node.

[0076] In the embodiments of the present application, the degree of the user node refers to the number of edges connected to the user node, which can be obtained by using formula (1):

[0077] d u =∑ u∈N e uv (1)

[0078] wherein d u denotes the degree of the user node v u , and e uv represents the edge between the user node v u and the user node v v .

[0079] The degree of the edge refers to the degrees of the user nodes connected to the edge, which can be obtained by using formula (2):

[0080]

[0081] wherein e ij denotes the edge between the user node v i and the user node v j , deg(e ij ) denotes the degree of the edge e ij , N(i) denotes the user node connected to the user node v i , N(j) denotes the user node connected to the user node v j , e iu denotes the edge between the user node v i and the user node v u , and e jv denotes the edge between the user node v j and the user node v v .

[0082] The influence of the edge refers to the ratio of the degree of the edge to the degrees of the connecting edges of the user nodes connected to the edge, which can be obtained by using formula (3):

[0083]

[0084] wherein P(e ij ) denotes the influence of the edge e ij , deg(e ij ) denotes the degree of the edge e ij , and N(e ij ) denotes the edges connected to the edge eij and edge e ij The set of connecting edges between connected user nodes, deg(w) represents the set of edges N(e). ij The sum of the degrees of ).

[0085] Calculate the degree of each edge. The influence of an edge is the ratio of the degree of the edge to the degree of the edges connecting it to the user nodes connected to it. The degree of an edge includes the degree of the user nodes connected to it. The degree of a user node is the number of edges connected to it.

[0086] S130: Based on the order of influence of the edges from largest to smallest, update the edge labels of the edges to the target edge labels in turn. The target edge label is the edge label that appears most frequently among the edge labels of the connecting edges of the user nodes connected to the edge.

[0087] In this embodiment of the application, the label update phase in the label propagation process includes synchronous update and asynchronous update. The label update phase in this embodiment can be asynchronous because in synchronous update, the k-th update is based on the label of the connected user node from the (k-1)-th update. x (k)=f(C x1 (k-1),C x2 (k-1),...,C xi (k-1)), C x (k) is the label updated by user node x for the kth time, but if the network contains a binary graph or a binary-like graph, it will cause label oscillation; C x (k)=f(C xi1 (k-1),...,C xim (k-1),C xi(m+1) (k-1),...,C xin (k-1)), where x i1 ,…,x im It is the user node whose label has been updated among the connected user nodes of user node x. i(m+i) ,…,x in For connected user nodes that have not updated their labels, edge label propagation also suffers from the bipartite graph problem. Therefore, asynchronous updates can be used to avoid infinite loops caused by label oscillation.

[0088] In the embodiment of this application, during the tag selection stage of the tag propagation process, the tag with the highest frequency of occurrence is usually selected from the tags of the user node's connected user nodes as the new tag for that user node.

[0089] Based on the same idea of the asynchronous updating strategy of the label updating stage in the label propagation process of the user node, the embodiment adopts asynchronous updating as the strategy of the label updating stage in the edge label propagation process of the edge. In order to solve the inaccuracy and instability of community division caused by the random factors of using random order as the label updating order, the influence of the edge is set from large to small, and the edge label updating priority of the edge is set from large to small. The edge label of each edge is updated in turn according to the influence of the edge from large to small. When updating the edge label of each edge, the highest frequency edge label in the edge label of the connection edge of the user node connected with the edge is selected as the target edge label, and the target edge label is taken as the new label of the edge label of the edge.

[0090] S140: The target edge label of the edge is taken as the label of the user node connected with the edge.

[0091] Each edge has two user nodes connected therewith, each edge in the graph is traversed, and the edge label of each edge is propagated to the two user nodes connected therewith, and each user node obtains at least one new label.

[0092] S150: The user nodes with the same label are determined to be in the same community.

[0093] The user nodes with the same label are classified into the same community, and the whole network (community) is divided into multiple communities, the labels of the user nodes in each community are the same, which reflects the close contact or similarity between them. When the user node has two or more labels, it means that the user node belongs to multiple communities, and the user node is an overlapping user node.

[0094] Exemplarily, as shown in a network structure diagram of community discovery. Figure 2 After the edge label updating of all edges in the community is completed, the edge labels of the edges [e 12 13 14 23 34 45 47 56 57 67 ] are: ①, ①, ①, ①, ①, ②, ②, ②, ②, ② respectively. After the edge label of each edge is propagated to the two user nodes connected therewith, the labels corresponding to the user nodes [v1, v2, v3, v4, v5, v6, v7] are: ①, ①, ①, ①, ②, ②, ②, ② respectively. The user nodes with the same label are classified into the same community, so two communities {1, 2, 3, 4} and {4, 5, 6, 7} are obtained.

[0095] ​​​​​​​​​The method, device, equipment and computer storage medium for community discovery of the embodiment first calculate the influence of each edge by obtaining the user nodes in the community and the edges between the user nodes, the influence being the ratio of the degree of each edge to the degrees of adjacent edges of the edge, the degree of the edge including the number of adjacent edges of the user nodes connected to the edge, determine the order from large to small according to the influence of the edges, and update the edge labels of the edges in turn, then update the label of the edge to the edge label with the highest frequency among the edge labels of the adjacent edges of the edge, thereby avoiding the randomness in the label updating process; and the edge label of the edge is transmitted as the label of the user node connected to the edge, so that the user nodes with the same label are determined to be in the same community, and a community with clear boundaries can be divided. Therefore, the embodiment can avoid randomness in the label propagation process, thereby avoiding that the user nodes are divided into inappropriate communities, and improving the accuracy of community division.

[0096] As another implementation manner of the application, before the edge label of the edge is updated to the target edge label in step S130, the method can further include the following steps:

[0097] S1301: Determine whether the edge label with the highest frequency among the edge labels of the connection edges of the user nodes connected to the edge is unique.

[0098] In the embodiment of the application, when the edge label of the edge is updated, the edge label with the highest frequency among the edge labels of the connection edges of the user nodes connected to the edge is selected as the new label of the edge label of the edge, which inevitably causes the problem of the same number of labels, and if a random selection method is used, the community division result will be unstable and inaccurate, therefore, the problem of random selection needs to be considered when the edge label with the highest frequency among the edge labels of the connection edges of the user nodes connected to the edge is not unique.

[0099] According to the order from large to small according to the influence of the edges, first determine whether the edge label with the highest frequency among the edge labels of the connection edges of the user nodes connected to the edge is unique, and whether the edge label with the highest frequency among the edge labels of the connection edges of the user nodes connected to the edge has two or more than two cases.

[0100] S1302: In the case that the edge label with the highest frequency among the edge labels of the connection edges of the user nodes connected to the edge is not unique, determine the target edges corresponding to the edge label with the highest frequency among the edge labels of the connection edges of the user nodes connected to the edge.

[0101] In the case that the edge label with the highest frequency among the edge labels of the connection edges of the user nodes connected to the edge is not unique, subsequently determine which target edges correspond to the edge label with the highest frequency among the edge labels of the connection edges of the user nodes connected to the edge.

[0102] S1303: Calculate the number of times the same label appears in the labels of user nodes connected to the edge and the target edge to obtain the number of times the edge and the target edge have the same label.

[0103] In this embodiment of the application, in order to avoid the problem of random selection when the most frequent edge label in the edge label of the user node connected to a certain edge is not unique, the similarity of user nodes is extended to the similarity evaluation of edges.

[0104] The number of times the same label appears in the labels of user nodes connected to the edge and each corresponding target edge is obtained.

[0105] S1304: Calculate the ratio of the number of times the same label appears to the total number of times the label appears in the user nodes connected to the edge and the target edge to obtain the similarity between the edge and the target edge.

[0106] In this embodiment of the application, the similarity between two connected edges of a user node can be calculated using formula (4):

[0107]

[0108] Where Γ(i) is the user node v i and user node v i The set of labels included in the connected user nodes, where Γ(j) is the user node v. j and user node v j The set of labels of connected user nodes, S(e ik ,e jk ) represents edge e ik ,e jk Similarity between the two sides.

[0109] By using the number of times the same label appears between the edge and each corresponding target edge, we can calculate the ratio of the number of times the same label appears to the total number of times the labels of the user nodes connected to the edge and each corresponding target edge, and thus obtain the similarity between the edge and each corresponding target edge.

[0110] S1305: The edge label with the highest similarity is determined as the target edge label.

[0111] The edge label with the highest similarity among the given edge and all corresponding target edges is determined as the target edge label.

[0112] For example, such as Figure 2 The diagram illustrates a network structure for community detection. Assume that when... Figure 2 edge e in 12 When updating the edge label, with edge e 12 The edge e connecting user nodes v1 and v2 13e 14 e 23 The edge label of each edge is different and has the same frequency, and the edge labels of the three edges e 13 e 14 e 23 The similarity of the edge e 12 The similarity of the edge e 13 e 14 e 23 The similarity of the edge e 12 The similarity of the edge e 23 The edge label of the edge e 12 The edge label of the edge e

[0113] In the embodiment, whether the edge label with the highest frequency in the edge label of the edge connected to the user node is unique is determined, and in the case of non-uniqueness, all target edges corresponding to the edge label with the highest frequency in the edge label of the edge connected to the user node are determined. The number of same labels between the label of the edge and the label of each target edge connected to the user node is calculated, the ratio of the number of same labels to the total number of labels of the edge and each target edge connected to the user node is calculated, the similarity of the edge and each target edge is obtained, and finally the edge label with the highest similarity is determined as the target edge label. The edge label updating order of the edge is well determined, the system calculation speed is not reduced due to the linear calculation of the degree of the edge, and the randomness in the edge label updating process in special cases is avoided, so that the user nodes are not divided into unsuitable communities, and the accuracy of community division is improved.

[0114] As another implementation of the present application, the step S110 of acquiring the user nodes in the community and the edges between the user nodes comprises the following steps:

[0115] S101: acquiring the user nodes in the community and the edges between the user nodes, comprising: acquiring the user nodes in the community and the edges between the user nodes.

[0116] All user nodes (users) in the community and edges between the user nodes representing the behavior patterns or behavior relationships between the users are acquired, each user node includes a label for identifying the community attribution of the user node in the network, and each edge includes an edge label for identifying the community attribution of the edge in the network.

[0117] S102: add a user node connected with each user node in the community as a background user node, obtain a target influence of each user node according to a local clustering coefficient of the background user node and each user node, and the target influence is used for evaluating an influence value of each user node on a user node connected with the user node.

[0118] In the embodiment of the present application, the LeaderRank algorithm is an algorithm for evaluating the importance of a user node on a network, which identifies a user node with greater influence or centrality by ranking the user nodes in the network. The core idea of the algorithm is to introduce a virtual "background user node" (Ground Node) in the original network, which has a bidirectional connection with all other user nodes, thus constructing a strongly connected graph, and then updating the LeaderRank score of each user node through a series of iterative calculation processes, which reflects the leadership or influence of the user node in the network. The LeaderRank algorithm sets the initial influence (NIELR) of each user node to the same value, and then distributes the value of the initial influence, but this makes the gap between the user nodes with large initial influence and the user nodes with small initial influence will be reduced, and cannot truly reflect the role of the user nodes with large initial influence. The embodiment of the present application proposes to increase the pre-evaluation of the initial influence of the user node on the basis of LeaderRank to propose NIELeaderRank algorithm for initial influence evaluation of the user node. The NIELeaderRank algorithm uses the pre-evaluation value (NIE) of the initial influence of the user node to replace the value of the initial influence of each user node in LeaderRank, and uses the pre-evaluation value of the initial influence of the user node as the value of the initial influence of each user node, so that the initial influence of all user nodes is not the same.

[0119] In the community (network), a user node connected with each user node is added as a background user node, which has a bidirectional connection with all other user nodes, thus constructing a strongly connected graph, and the pre-evaluation value of the initial influence of the background user node is 0. According to the local clustering coefficient of the background user node and each user node, the target influence of each user node is obtained, and the target influence is used for evaluating the influence value of each user node on a user node connected with the user node.

[0120] S103: number the user nodes and edges in turn according to the size of the target influence of the user nodes, and the number of the edge is consistent with the first number in the order of the numbers of the user nodes connected with the edge.

[0121] After the target influence of each user node is calculated, each user node and each edge are numbered in turn according to the size of the target influence of the user node, and the number of each edge is consistent with the first number in the number of the user nodes connected to the edge.

[0122] In step S104, the number of the edge is determined as the edge label of the edge.

[0123] The number of each edge is taken as the edge label of the edge, and because the number of each edge is consistent with the first number in the number of the user nodes connected to the edge, the edge label of each edge is consistent with the first number in the number of the user nodes connected to the edge.

[0124] In one embodiment, the number of the edge is determined as the edge label of the edge according to the size of the target influence of the user node, and the number of the edge is consistent with the first number in the number of the user nodes connected to the edge, which can include the following steps: sorting according to the target influence of the user node, then numbering all the user nodes and the edges connected to the user nodes in sequence, then extracting the edges connected to the first user node, and taking the number of the user node as the edge label of the edges, the edge label of the edge and the number of the edge are distinguished, the edges with the same number and edge label are an initial community, then extracting all the edges connected to the second user node, and taking the number of the second user node as the label of the edges, and taking them as the second initial connection community. Cycle in turn until all the edges of the graph have an edge label and belong to a specified initial community. The edges that have been given an edge label in the initialization process are deleted from the graph, so an edge is given the label of the user node with greater target influence among the two user nodes connected to the edge.

[0125] In this embodiment, the user nodes in the community and the edges between the user nodes are obtained, a background user node connected to each user node is added in the community, the target influence of the user node for evaluating the influence value of the user node on the user nodes connected to the user node is obtained according to the local clustering coefficient of the background user node and the user node, the user nodes and the edges are numbered in turn according to the size of the target influence of the user node, and the number of the edge and the edge label are both determined as the first number in the number of the user nodes connected to the edge. The user nodes with high influence in the community can be quickly identified, the relationship between the user nodes and the influence distribution are understood, the network structure of the community is more clearly visualized, and the accuracy of community division is improved.

[0126] As another implementation manner of the present application, after the user nodes in the community and the edges between the user nodes are obtained in step S101, the method further includes the following steps:

[0127] S105: Obtain the number of ideal maximum connected edges between user nodes.

[0128] In this embodiment, the Local Clustering Coefficient (LCC) is an important concept in network analysis, used to quantify the degree of clustering or local density of user nodes in a network. Specifically, it measures the degree of interconnectivity between a user node's neighbors. This embodiment constructs an undirected, unweighted graph G based on the behavioral patterns or relationships between users in the community. User node v in graph G... i The local clustering coefficient Lc can be calculated using the following formula (5):

[0129]

[0130] Where Lc(vi) is the user node v i The local clustering coefficient, k i For user node v i The sum of edges connecting to other user nodes, e jk It is user node v j and user node v k The edge, N(i) is the user node v i Connected user nodes.

[0131] The ideal number of connected edges for a user node is obtained by finding the maximum possible number of connected edges between user nodes connected to it.

[0132] S106: Calculate the ratio of the number of edges connecting user nodes to the ideal number of connected edges.

[0133] The actual number of edges connected to the user node is obtained to determine the actual connection variable of the user node. The ratio of the actual connection variable to the ideal number of connected edges is then calculated.

[0134] S107: Determine the ratio as the local clustering coefficient of the user nodes.

[0135] The ratio of the actual number of connected variables to the ideal number of connected edges for a user node is determined as the local clustering coefficient of that user node. Lc(v) i The value of Lc(v) ranges from 0 to 1. i A value close to 1 indicates that the user node v i The neighbors are highly interconnected, and Lc(vi) being close to 0 means that user node v iThere are almost no direct connections between the neighbors.

[0136] This embodiment obtains the ideal number of connected edges for each user node by acquiring the number of ideal maximum connected edges between each user node and other connected user nodes after obtaining the user nodes in the community. The ratio of the number of connected edges between the user nodes to the ideal number of connected edges is then calculated and used as the local clustering coefficient for that user node. This method effectively assesses the density and structure of communities in the network, identifies key user nodes, contributes to a deeper understanding of network dynamics, and improves the accuracy of community segmentation.

[0137] As another implementation of this application, after step S107: determining the ratio as the local clustering coefficient of the user node, the method further includes the following steps:

[0138] S108: Calculate the mean of the local clustering coefficients of the user nodes connected to the user node.

[0139] Calculate the mean of the local clustering coefficients of all connected user nodes for each user node.

[0140] S109: The initial influence of a user node is obtained by summing the mean of the local clustering coefficients of the connected user nodes with the values ​​of the local clustering coefficients of the user nodes.

[0141] In this embodiment, the local clustering coefficient only considers the local influence of the current user node on its connected user nodes (neighbors). In reality, a person's influence not only affects those around them through themselves, but also indirectly affects others through those around them. Therefore, based on the local clustering coefficient, the idea of ​​diffusion is added to the local clustering coefficient of the neighbors and the value of the local clustering coefficient of the current user node is added to improve the preliminary influence evaluation of the user node. The proposed preliminary influence evaluation of the user node is as follows (6):

[0142]

[0143] Among them, NIE(v i ) represents user node v i The initial influence, Lc(v i ) for user node v i The local clustering coefficient, e jk It is user node v j and user node v k The edge, N(i) is the user node v i Connected user nodes, N(j) is user node v j Connected user nodes, k i It is related to user node vi the number of connected user nodes.

[0144] The preliminary influence of the user node is obtained by summing the average of the local clustering coefficients of all connected user nodes of the user node and the value of the local clustering coefficient of the user node.

[0145] As another implementation manner of the present application, the target influence of each user node is obtained according to the local clustering coefficients of the background user node and each user node in step S102, and the step S102 includes:

[0146] S1021: The value of the preliminary influence of the user node is evenly divided into the preliminary influences of the target user nodes connected to the user node, and the target user nodes include the connected user nodes of the user node and the background user node.

[0147] In the embodiment of the present application, the preliminary influence of the user node is the pre-evaluation value of the initial influence of the user node (NIE), and according to the NIELeaderRank algorithm, the value of NIELR (initial influence) of the original n user nodes is NIE (pre-evaluation value of initial influence). Therefore, the value of the initial influence of the user node is assigned to the preliminary influence of the user node, and then each user node evenly distributes its NIELR to all connected user nodes.

[0148] The value of the initial influence of each user node is evenly divided into the initial influences of the target user nodes connected to the user node, and the target user nodes include all user nodes connected to the user node and the background user node.

[0149] S1022: The value of the preliminary influence of the background user node is evenly divided into the preliminary influence of the user node to obtain the target influence of the user node.

[0150] In the embodiment of the present application, the preliminary influence of the user node is the pre-evaluation value of the initial influence of the user node, and the value of the initial influence of the user node is assigned to the pre-evaluation value of the initial influence. Therefore, the value of the initial influence of the user node is assigned to the preliminary influence of the user node, and the value of the initial influence of the background user node is evenly divided into the initial influences of all user nodes, and all user nodes do not include the background user node. Finally, the initial influence of each user node obtained after the distribution is the target influence of the user node. The target influence of the user node can be obtained by the following formula (7):

[0151]

[0152] Wherein, S i represents the user node v ithe final influence value of the user node v i (k c ) represents the initial influence value of the user node v i (k g (k c ) is the initial influence value of the background user node.

[0153] The target influence of each user node is obtained by averaging the preliminary influence value of the background user node to the preliminary influence of all user nodes.

[0154] As another implementation of the present application, step S1022: dividing the preliminary influence value of the background user node equally to the preliminary influence of the user node to obtain the target influence of the user node, comprises the following steps:

[0155] S1023: determining whether the preliminary influence value of the background user node is within a preset interval threshold.

[0156] In the embodiment of the present application, the initial influence value of each user node is repeatedly divided into the initial influence of the target user node connected to the user node, and the target user node includes all user nodes and background user nodes connected to the user node, until the initial influence value of the background user node converges stably, i.e. the initial influence value of the background user node does not exceed a preset interval threshold. The iteration formula for repeatedly dividing the initial influence value of each user node into the initial influence of the target user node connected to the user node is as follows:

[0157]

[0158] wherein, NIELR i (t+1) represents the initial influence of the user node v i , N represents the number of user nodes, i, j = 1, 2,..., N+1, t represents the iteration step number, k i represents the degree of the user node v i , a ij represents whether the user node v i is connected to the user node v j , when a ij = 1, it represents that the user node v i is connected to the user node v j , when a ij = 0, it represents that the user node v i is not connected to the user node v j .

[0159] The initial influence of the background user node can be calculated by iteration formula (8), and it is determined whether the value of the initial influence of the background user node is in the preset interval threshold, that is, whether the value of the initial influence of the background user node is convergent and stable.

[0160] S1024: In the case that the value of the initial influence of the background user node is in the preset interval threshold, the value of the initial influence of the background user node is evenly divided to obtain the target influence of each user node.

[0161] After it is determined that the value of the initial influence of the background user node is convergent and stable, that is, the values of the initial influences of other user nodes are also stable, the value of the initial influence of the background user node is evenly distributed to obtain the final influence of each user node, that is, the target influence.

[0162] In this embodiment, the initial influence of each user node is obtained by calculating the average of the local clustering coefficients of the user nodes connected to the user node and summing the value of the local clustering coefficient of the user node. The value of the initial influence of the user node is evenly divided into the initial influences of the target user nodes connected to the user node, and the target user nodes include all user nodes connected to the user node and the background user node. In the case that the value of the initial influence of the background user node is stable and convergent, the value of the initial influence of the background user node is evenly divided to obtain the target influence of each user node. The introduction of the background user node and the stable convergence process of the influence of the background user node help to better identify the user nodes with real influence in a complex community network and reduce the influence of abnormal relationship of individual user nodes on the community division result.

[0163] As another implementation manner of the present application, after the value of the initial influence of the background user node is evenly divided to obtain the target influence of the user node, the method comprises the following steps:

[0164] The background user node in the community is deleted.

[0165] After the value of the initial influence of the background user node is evenly distributed to obtain the final influence of each user node, that is, the target influence, the background user node loses its effect. In order not to affect the subsequent calculation, the background user node in the community is deleted.

[0166] In one embodiment, the community discovery method can further comprise:

[0167] After the edge labels are propagated and passed to the labels of the connected user nodes, it is determined that user nodes with the same label belong to the same community. If the edges of a user node belong to different communities, the user node is considered to be an overlapping user node belonging to different communities. In order to avoid excessive overlap of communities and to better detect overlapping communities, the method may also include the following steps: handling excessive overlap and merging similar communities.

[0168] To reduce excessive community overlap caused by an excessive number and variety of labels on user nodes after edge labels are passed to them, labels with a frequency lower than a set threshold are deleted from user nodes. The process for determining the set threshold is as follows:

[0169] Given a network G = {V, E}, where V represents the set of user nodes in the network and E represents the set of edges in the network. A user node with multiple labels is identified as an overlapping user node v. The community set to which the overlapping user node v belongs is represented by Com(v) = {c | v ∈ c, v ∈ V, c ∈ C}. The average number of edges within the community of the overlapping user node v is calculated using formula (9):

[0170]

[0171] Where Γ'(v) is the number of user nodes connected to user node v, and Γ'(u) = {v∈V, {u,v}∈E}, user node u represents the user node connected to user node v.

[0172] For a given overlapping user node v and its community label c, user node v belongs to community c only if the number of connected user nodes of user node v in community c is greater than or equal to AVEE(v). Otherwise, delete labels on overlapping user node v that have a frequency less than AVEE(v).

[0173] For example, such as Figure 2 The diagram illustrates a network structure for community detection. It identifies user nodes with the same label as belonging to two overlapping communities. To better detect overlap and avoid weak affiliation due to excessive overlap, the overlapping user node v4 is analyzed. The number of connected user nodes to overlapping user node v4 is |Γ'|=|{1,3,5,7}|=4, and the number of labels belonging to different communities is Com(v4)=2, therefore AVEE(v4)=2. Among the labels of overlapping user node v4, the frequency of labels belonging to both communities is 2, which is no less than AVEE(v4)=2. Therefore, overlapping user node v4 belongs to two communities simultaneously. For example, if user node v4 has two connected user nodes in both communities, then user node v4 is an overlapping user node. Finally, the two detected communities are {1,2,3,4} and {4,5,6,7}.

[0174] The method can further include merging the communities by using the similarity of the communities. A merging coefficient λ is defined, the value of the coefficient being between 0 and 1, 1 indicating that the merging is performed when one community is a proper subset of another community, and 0 indicating that the merging is performed even if there is no repeated sharing of a user node. The similarity of the communities is defined as the number of common user nodes of the two communities.

[0175] Figure 3 A flowchart of a method of community discovery provided by another embodiment of the present application is shown. As shown in the flowchart, the method can include the following steps: Figure 3

[0176] S310: Calculate the local density coefficient of each user node in the community.

[0177] Obtain all user nodes (users) in the community and edges between the user nodes representing the behavior patterns or behavior relationships between the users, each user node including a label identifying the community attribution of the user node in the network, and each edge including an edge label identifying the community attribution of the edge in the network; obtain the maximum possible number of connected edges between the user nodes connected to the user node to obtain the ideal number of connected edges of the user node; obtain the actual number of connected edges between the user nodes connected to the user node to obtain the actual number of connected variables of the user node, and calculate the ratio of the actual number of connected variables and the ideal number of connected edges of the user node; and the ratio of the actual number of connected variables and the ideal number of connected edges of the user node is determined as the local clustering coefficient of the user node.

[0178] S320: Determine the preliminary influence of each user node based on the local clustering coefficient of the user node and the neighbor user nodes adjacent to the user node.

[0179] Calculate the average of the local clustering coefficients of all connected user nodes of each user node; and sum the average of the local clustering coefficients of all connected user nodes of the user node and the value of the local clustering coefficient of the user node to obtain the preliminary influence of the user node.

[0180] S330: Determine the final influence of each user node based on the preliminary influence of the user node.

[0181] ​The initial influence value of each user node is evenly distributed to the initial influence of the target user node connected to the user node, and the target user node includes all user nodes and background user nodes connected to the user node; the initial influence of the background user node can be calculated through the iterative formula (8), and it is judged whether the initial influence value of the background user node is within the preset interval threshold, that is, whether the initial influence value of the background user node is convergent and stable; after it is judged that the initial influence value of the background user node is convergent and stable, that is, the initial influence value of other user nodes is also stable, the initial influence value of the background user node is evenly distributed to the initial influence of all user nodes to obtain the final influence, that is, the target influence of each user node.

[0182] S340: The user nodes are sorted and the labels of the user nodes are passed to the edges.

[0183] After the target influence of each user node is calculated, each user node and each edge are numbered in turn according to the size of the target influence of the user node, and the number of each edge is consistent with the first number in the order of the number of the user node connected to the edge; the number of each edge is used as the edge label of the edge, and because the number of each edge is consistent with the first number in the order of the number of the user node connected to the edge, the edge label of each edge is consistent with the first number in the order of the number of the user node connected to the edge.

[0184] S350: The influence of the edge and the similarity of the edge are used for label propagation, and the community is divided according to the end of the label propagation.

[0185] The influence of each edge is calculated by the ratio of the degree of the edge and the degrees of the edges connected to the user nodes connected to the edge, the degree of the edge including the degrees of the user nodes connected to the edge, and the degree of the user node being the number of edges connected to the user node; based on the same idea of the asynchronous updating strategy in the label updating stage of the label propagation process of the user nodes, the embodiment adopts asynchronous updating as the strategy in the label updating stage of the edge label propagation process of the edges, and in order to solve the inaccuracy and instability of community division caused by the random factors of using random order as the label updating order, the edge label updating priority of the edges from large to small influence is set, and the edge label of each edge is updated in turn according to the influence from large to small. When updating the edge label of each edge, the edge label with the highest frequency in the edge labels of the edges connected to the user nodes connected to the edge is selected as the target edge label, and the target edge label is taken as the new label of the edge label of the edge; each edge has two user nodes connected thereto, each edge in the graph is traversed, and the edge label of each edge is transmitted to the two user nodes connected thereto, and each user node obtains at least one new label; the user nodes with the same label are classified into the same community, and the whole network (community) is divided into multiple communities, the labels of the user nodes in each community are the same, reflecting the close contact or similarity between them. When the user node has two or more labels, it means that the user node belongs to multiple communities, and the user node is an overlapping user node.

[0186] S360: comprehensive processing of the community after the label propagation.

[0187] In order to avoid excessive overlap of communities and better detect overlapping communities, the method can further include the following steps: excessive overlap processing and merging of similar communities.

[0188] Excessive overlap processing: in order to reduce the excessive overlap of communities caused by too many types and quantities of labels on the user nodes after the edge label of the edge is transmitted to the user nodes, the labels with a frequency less than a set threshold value are deleted from the labels on the user nodes.

[0189] Merging similar communities: a merging coefficient is defined, the value of the coefficient being between 0 and 1, 1 indicating that a community will be merged when it is a proper subset of another community, and 0 indicating that a community will be merged even if no user node is shared, and the similarity of the community is defined as the number of common user nodes of the two communities.

[0190] The embodiment can improve the accuracy of community division by eliminating the randomness of label propagation, ensuring that the user nodes are classified into the most suitable community, and effectively reducing the interference of abnormal user node relationships on community structure recognition by using the step-by-step convergence of background user nodes and their influence.

[0191] Based on the same concept, the embodiment of the present application provides a community discovery device, which is described in detail below in combination with Figure 4 The community discovery device provided by the embodiment of the present application is described in detail.

[0192] Figure 4 FIG. 1 is a structural block diagram of a community discovery device according to an exemplary embodiment.

[0193] As shown in FIG. 1, the community discovery device can include: Figure 4 The obtaining module 410 is configured to obtain user nodes in a community and edges between the user nodes, the edges including behavioral relationships between the user nodes, and the edges including edge labels.

[0194] The calculating module 420 is configured to calculate a degree of the edge, and an influence of the edge is obtained according to a ratio of the degree of the edge to degrees of connecting edges of user nodes connected to the edge, the degree of the edge including degrees of the user nodes connected to the edge, and the degree of the user node being a number of edges connected to the user node.

[0195] The updating module 430 is configured to update the edge label of the edge to a target edge label in order according to an order of the influence of the edge from large to small, the target edge label being an edge label with a highest frequency of occurrence among the edge labels of the connecting edges of the user nodes connected to the edge.

[0196] The confirming module 440 is configured to take the target edge label of the edge as a label of the user node connected to the edge, and determine that user nodes with the same label are in the same community.

[0197] In one embodiment, the updating module 430 is further configured to, before updating the edge label of the edge to the target edge label in order, determine whether the edge label with the highest frequency of occurrence among the edge labels of the connecting edges of the user nodes connected to the edge is unique, in the case that the edge label with the highest frequency of occurrence among the edge labels of the connecting edges of the user nodes connected to the edge is not unique, determine a target edge corresponding to the edge label with the highest frequency of occurrence among the edge labels of the connecting edges of the user nodes connected to the edge, calculate a same label number of the edge and the target edge according to a number of times of occurrence of the same label between the label of the edge and a label of the target edge, calculate a similarity of the edge and the target edge according to a ratio of the same label number to a total number of times of occurrence of the label of the edge and the label of the target edge, and determine the edge label with the highest similarity as the target edge label.

[0198]

[0199] ​In an embodiment, the obtaining module 410 is further configured to obtain the user nodes and the edges between the user nodes in the community, add a user node connected with the user node as a background user node in the community, obtain a target influence of the user node according to the local clustering coefficients of the background user node and the user node, the target influence being used to evaluate an influence value of the user node on the user nodes connected with the user node, sequentially number the user nodes and the edges according to the target influences of the user nodes, the number of the edge being consistent with the first number in the numbers of the user nodes connected with the edge, and determine the number of the edge as an edge label of the edge.

[0200] In an embodiment, the obtaining module 410 is further configured to, after obtaining the user nodes and the edges between the user nodes in the community, obtain an ideal number of edges connected between the user nodes connected with the user node to obtain an ideal edge number of the user node, calculate a ratio of the number of the edges connected between the user nodes connected with the user node to the ideal edge number, and determine the ratio as a local clustering coefficient of the user node.

[0201] In an embodiment, the obtaining module 410 is further configured to, after determining the ratio as the local clustering coefficient of the user node, calculate a mean value of the local clustering coefficients of the user nodes connected with the user node, sum the mean value of the local clustering coefficients of the user nodes connected with the user node and the value of the local clustering coefficient of the user node to obtain a preliminary influence of the user node, and obtain a target influence of the user node according to the local clustering coefficients of the background user node and the user node, including: dividing the value of the preliminary influence of the user node equally into the preliminary influences of the target user nodes connected with the user node, the target user nodes including the user nodes connected with the user node and the background user node, and dividing the value of the preliminary influence of the background user node equally into the preliminary influence of the user node to obtain the target influence of the user node.

[0202] In an embodiment, the obtaining module 410 is further configured to, after dividing the value of the preliminary influence of the background user node equally into the preliminary influence of the user node to obtain the target influence of the user node, determine whether the value of the preliminary influence of the background user node is within a preset interval threshold, and in a case where the value of the preliminary influence of the background user node is within the preset interval threshold, divide the value of the preliminary influence of the background user node equally into the preliminary influence of the user node to obtain the target influence of the user node.

[0203] In an embodiment, the obtaining module 410 is further configured to, after dividing the value of the preliminary influence of the background user node equally into the preliminary influence of the user node to obtain the target influence of the user node, delete the background user node in the community.

[0204] Figure 4 Each module in the apparatus shown has the function of realizing Figure 1 , andFigure 3 The functions of each step and the corresponding technical effects can be achieved. For brevity, details are not repeated here.

[0205] Figure 5 A hardware structure schematic diagram of an electronic device provided by an embodiment of the present application is shown.

[0206] The electronic device can include a processor 510 and a memory 520 storing computer program instructions.

[0207] Specifically, the processor 510 described above can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured to implement one or more integrated circuits of the embodiments of the present application.

[0208] The memory 520 can include a mass storage for data or instructions. By way of example and not limitation, the memory 520 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 520 can include removable or non-removable (or fixed) media. Where appropriate, the memory 520 can be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, the memory 520 is non-volatile solid-state memory.

[0209] The memory can include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software that, when executed (e.g., by one or more processors), is operable to perform operations described with reference to methods according to aspects of the present disclosure.

[0210] The processor 510 implements any one of the community discovery methods in the above embodiments by reading and executing the computer program instructions stored in the memory 520.

[0211] In one example, the electronic device can further include a communication interface 530 and a bus 540. Among them, as Figure 5As shown, the processor 510, the memory 520, and the communication interface 530 are connected and communicate with each other through the bus 540.

[0212] The communication interface 530 is mainly used to realize the communication between the modules, devices, units and / or equipment in the embodiments of the present application.

[0213] The bus 540 includes hardware, software or both to couple the components of the online data traffic billing device to each other. By way of example, and not limitation, the bus can include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand (IB) interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or another suitable bus or a combination of two or more of these. Where suitable, the bus 510 can include one or more buses. Although specific buses are described and shown in the embodiments of the present application, the present application contemplates any suitable bus or interconnect.

[0214] The electronic device can execute the community discovery method in the embodiments of the present application, thereby realizing the community discovery method and device described in the embodiments of the present application. Figure 1 and Figure 3 The community discovery method and device.

[0215] In addition, in combination with the community discovery method in the above embodiments, the embodiments of the present application can provide a computer storage medium to realize. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to realize any one of the community discovery methods in the above embodiments.

[0216] The embodiments of the present application also provide a computer program product, which includes a computer program, and the computer program is executed by a processor to realize any one of the community discovery methods in the above embodiments.

[0217] It needs to be clear that the present application is not limited to the specific configurations and processes described above and shown in the drawings. For the sake of brevity, the detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps, after understanding the spirit of the present application.

[0218] The functions noted in the description of the structural block diagrams above can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, functional cards, and the like. When implemented in software, the elements of the present application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. A "machine-readable medium" includes any medium that can store or transport information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like. The code segments can be downloaded via computer networks such as the Internet, intranets, and the like.

[0219] It is also important to note that the examples mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the steps mentioned above, that is, the steps can be performed in the order mentioned in the examples, or in an order different from the examples, or several steps can be performed simultaneously.

[0220] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer program instructions can also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other processing device to operate in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function / act specified in the flowchart and / or block diagram block or blocks. The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer program instructions can also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other processing device to operate in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function / act specified in the flowchart and / or block diagram block or blocks.

[0221] The above merely describes a specific implementation of the present application. Those skilled in the art can clearly understand the specific working processes of the system, modules and units described above for the convenience and brevity of description, and can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein again. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application.

Claims

1. A method for community detection, characterized in that, include: Obtain the user nodes in the community and the edges between them, where the edges include the behavioral relationships between the user nodes and the edges include edge labels; The influence of an edge is determined by the ratio of the degree of the edge to the degree of the user nodes connected to it, where the degree of the edge includes the degree of the user nodes connected to it, and the degree of each user node is the number of edges connected to it. According to the order of influence of the edges from largest to smallest, the edge labels of the edges are updated to the target edge labels in turn. The target edge label is the edge label that appears most frequently among the edge labels of the connecting edges of the user nodes connected to the edge. Use the target edge label of the edge as the label of the user node connected to the edge; Identify user nodes with the same tags that belong to the same community; The step of obtaining the edges between user nodes in the community includes: Obtain the user nodes in the community and the edges between the user nodes; Add a user node connected to the user node as a background user node in the community. Obtain the target influence of the user node based on the local clustering coefficients of the background user node and the user node. The target influence is used to evaluate the influence value of the user node on the user nodes connected to the user node. The user nodes and edges are numbered sequentially according to the target influence of the user nodes, and the number of the edge is consistent with the first number of the user nodes connected to the edge. The edge number is determined as the edge label of the edge; After obtaining the user nodes in the community and the edges between the user nodes, the method further includes: The ideal number of connected edges of a user node is obtained by obtaining the number of the ideal maximum number of connected edges between the user nodes connected to the user node. Calculate the ratio of the number of edges connecting user nodes to the ideal number of connected edges; The ratio is determined as the local clustering coefficient of the user node; After determining the ratio as the local clustering coefficient of the user node, the method further includes: Calculate the mean of the local clustering coefficients of the user nodes connected to the user node; The initial influence of a user node is obtained by summing the mean of the local clustering coefficients of the user nodes connected to the user node with the value of the local clustering coefficient of the user node. The step of obtaining the target influence of the user node based on the background user node and the local clustering coefficient of the user node includes: The initial influence value of the user node is evenly distributed to the initial influence of the target user nodes connected to the user node, wherein the target user nodes include the user nodes connected to the user node and the background user nodes; The target influence of the user node is obtained by equally distributing the initial influence value of the background user node to the initial influence of the user node.

2. The method according to claim 1, characterized in that, Before sequentially updating the edge labels of the edges to the target edge labels, the method further includes: Determine whether the most frequently occurring edge label among the edge labels of the connecting edges of the user nodes connected by the edge is unique; If the most frequent edge label among the edge labels of the connected user nodes is not unique, determine the target edge corresponding to the most frequent edge label among the edge labels of the connected user nodes. The number of times the same label appears in the labels of user nodes connected to the edge and the target edge is obtained by calculating the number of times the same label appears in the edge and the target edge. The similarity between the edge and the target edge is obtained by calculating the ratio of the number of times the same label appears to the total number of times the labels of the user nodes connected to the edge and the target edge. The edge label with the highest similarity is determined as the target edge label.

3. The method according to claim 1, characterized in that, The step of evenly distributing the initial influence value of the background user node to the initial influence of the user node to obtain the target influence of the user node includes: Determine whether the initial influence value of the background user node is within a preset threshold range; If the initial influence value of the background user node is within the preset threshold range, the initial influence value of the background user node is evenly distributed among the initial influence values ​​of the user node to obtain the target influence of the user node.

4. The method according to claim 1, characterized in that, After dividing the initial influence value of the background user node equally among the initial influence values ​​of the user nodes to obtain the target influence of the user nodes, the method further includes: Delete the background user node within the community.

5. A community-based detection device, characterized in that, The device includes: The acquisition module is used to acquire user nodes in the community and the edges between the user nodes, the edges including the behavioral relationships between user nodes, and the edges including edge labels; The calculation module is used to calculate the degree of the edge, and the influence of the edge is obtained by the ratio of the degree of the edge to the degree of the user node connected to the edge. The degree of the edge includes the degree of the user node connected to the edge, and the degree of the user node is the number of edges connected to the user node. The update module is used to update the edge labels of the edges in descending order of their influence to target edge labels, where the target edge label is the edge label that appears most frequently among the edge labels of the connecting edges of the user nodes connected to the edge. The determination module is used to use the target edge label of the edge as the label of the user node connected to the edge; and to determine that user nodes with the same label are in the same community. The step of obtaining the edges between user nodes in the community includes: Obtain the user nodes in the community and the edges between the user nodes; Add a user node connected to the user node as a background user node in the community. Obtain the target influence of the user node based on the local clustering coefficients of the background user node and the user node. The target influence is used to evaluate the influence value of the user node on the user nodes connected to the user node. The user nodes and edges are numbered sequentially according to the target influence of the user nodes, and the number of the edge is consistent with the first number of the user nodes connected to the edge. The edge number is determined as the edge label of the edge; After obtaining the user nodes in the community and the edges between the user nodes, the process further includes: The ideal number of connected edges of a user node is obtained by obtaining the number of the ideal maximum number of connected edges between the user nodes connected to the user node. Calculate the ratio of the number of edges connecting user nodes to the ideal number of connected edges; The ratio is determined as the local clustering coefficient of the user node; After determining the ratio as the local clustering coefficient of the user node, the method further includes: Calculate the mean of the local clustering coefficients of the user nodes connected to the user node; The initial influence of a user node is obtained by summing the mean of the local clustering coefficients of the user nodes connected to the user node with the value of the local clustering coefficient of the user node. The step of obtaining the target influence of the user node based on the background user node and the local clustering coefficient of the user node includes: The initial influence value of the user node is evenly distributed to the initial influence of the target user nodes connected to the user node, wherein the target user nodes include the user nodes connected to the user node and the background user nodes; The target influence of the user node is obtained by equally distributing the initial influence value of the background user node to the initial influence of the user node.

6. A community-discovered device, characterized in that, The device includes: a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the community discovery method as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the community discovery method as described in any one of claims 1-4.

8. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the community discovery method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Edge clustering coefficient-based social network group division method

    CN105279187A

  • Social community division method based on random walk

    CN106886524A