Maximal equilibrium communities and their search methods based on signature networks

By introducing a huge balanced community model and search algorithm into the signature network, the problem of the existing technology in which the structure balanced community in the signature network is not effectively detected, and efficient and stable community detection is achieved, which is suitable for complex graph data applications.

CN114661977BActive Publication Date: 2025-02-11EAST CHINA NORMAL UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011523539.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-22
Publication Date
2025-02-11
Estimated Expiration
2040-12-22

AI Technical Summary

Technical Problem

The existing community model cannot effectively capture the complex relationship between structural balance and positive and negative edges in the signature network, resulting in the results of community detection in the signature network ignoring important information.

Method used

A highly balanced community model and search algorithm based on signature network is proposed to ensure the balance of the community through structural balance theory, and to use multi-core CPU parallel search and external storage search algorithm to improve efficiency and adapt to large-scale and dynamic graph data.

Benefits of technology

It realizes efficient search in the signature network to greatly balance the community, ensures the stability and information integrity of the community, and is suitable for complex application scenarios such as large-scale graph data and dynamic networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114661977B_ABST
    Figure CN114661977B_ABST
Patent Text Reader

Abstract

The present invention proposes a maximum balanced community based on a signature network, including: the balanced community is structurally balanced, that is, the points in the community can be divided into two subgraphs, any edge in the same subgraph is a positive edge, and any edge between different subgraphs is a negative edge; the balanced community is tightly structured, that is, any two points are connected by an edge; the number of points in the two subgraphs of the balanced community cannot be less than a threshold given by a user; the balanced community is a maximum subgraph, that is, no arbitrary point can be added to the current subgraph. The present invention also proposes a search method for a maximum balanced community.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of graph data query and analysis, specifically, the technical field of design and search of dense community models, and proposes a maximum balanced community based on a signature network and a search method thereof. Background Art

[0002] Signature networks have attracted much attention in recent years. In previous works, theories of the underlying social dynamics in signature networks have been extensively studied. Among these theories, the structural equilibrium theory is the most basic and dominant theory. Since then, the structural equilibrium theory has been widely developed. Among these works, it is worth noting that by modeling the evolution of signature networks, it is theoretically proved that when the average value of the initial friendship between vertices μ≤0, the network will evolve into an equilibrium community.

[0003] In addition to the signature network theory, a large number of literatures on mining signature networks have appeared. Among them, the work most closely related to the present invention is the (α, k)-community model. Given a signature network G, the (α, k)-community is defined as a maximum community C, such that the negative degree of each vertex in C is not greater than k, and the positive degree of each vertex in C is not less than αk. The (α, k)-community model only considers the number of positive and negative edges in the community, and completely ignores the structural balance of the community, making the (α, k)-community model essentially different from the model of the present invention.

[0004] The community model is one of the most basic cohesive subgraph models. Some scholars have studied the maximal bicommunity search problem on bipartite graphs. The maximal bicommunity is searched by keeping the vertex set on one side growing and the vertex set on the other side peeling off. It also uses some techniques to further improve the search performance, such as selecting vertices with smaller degrees from the candidate set to reduce the depth of the search tree, and pruning vertices that may produce non-maximal bicommunities. Note that the balanced community model of the present invention is different from the existing unsigned network cohesive subgraph model, and existing research cannot solve this problem well. If only the positive edges in the signed network are considered and the traditional unsigned network method is used for community detection, the results found will ignore the negative edges, thereby losing half of the meaningful information in the signed network.

[0005] A graph is an abstract model consisting of nodes and edges. With the surge in graph theory applications, researchers are committed to studying and analyzing many fundamental problems based on graph data. Community models have broad application prospects in fields such as social network mining, financial analysis, and computational biology, and have been widely studied. Existing research on communities mainly focuses on unsigned networks, that is, all edges in the graph have the same properties. Unfortunately, in many real-world application scenarios, the relationship between two entities has completely opposite properties, such as friend-enemy relationships between users in social networks, different opinions in support opinion networks, trust-distrust relationships in trust networks, and partner-adversary relationships in protein interaction networks. Modeling these applications as signed networks with positive and negative edges enables them to capture more complex semantics than unsigned networks. Therefore, existing research on communities based on unsigned networks may not be suitable for characterizing cohesive subgraphs in signed networks, so there is an urgent need to define a special community model for signed networks.

[0006] For signed networks, the most basic and dominant theory that reveals the dynamics and structure of signed networks is the structural equilibrium theory. The theoretical basis behind the structural equilibrium theory can be described as the aphorism: "a friend of my friend is my friend, an enemy of my friend is my enemy". Specifically, for a signed network G, if G can be split into two subgraphs such that the edges in the same subgraph are positive and the edges between subgraphs are negative, then G is structurally balanced. In signed networks, an unbalanced subgraph structure is unstable and tends to evolve to an equilibrium state.

[0007] According to the above analysis, the community model is a basic cohesive subgraph model in graph analysis, which can be applied to many fields, but there is no suitable model in the signature network. At the same time, based on the structural balance theory, the structure of the signature network is expected to be balanced. Based on this, the present invention proposes a maximum balanced community model. It is defined as follows: given a signature network G, the maximum balanced community C is a maximum subgraph of G, such that (1) C is fully connected, that is, each pair of vertices in C has an edge. (2) C is balanced, that is, C can be divided into two parts, so that the edge of the same part is positive and the edge connecting the two parts is negative. This definition not only captures the essence of the community model in the unsigned network, but also ensures that the detected community is stable in the signature network. Summary of the invention

[0008] The purpose of this invention is to design an efficient algorithm to search for all maximal equilibrium communities in a given signature network, and the results can be updated in real time.

[0009] Based on the most basic and important theory in signature networks, namely the structural balance theory, this paper proposes a balanced community model and proposes a variety of balanced community search algorithms based on signature networks to cope with complex application scenarios, such as high time response requirements; graph data is too large and exceeds the scope of internal storage space; graph data is constantly updated dynamically, etc. The flowchart of the balanced community search system based on signature networks proposed by this invention is as follows: Figure 1 As shown, the specific process is as follows:

[0010] (1) Search all maximal equilibrium communities. For the equilibrium community model, the present invention utilizes the unique properties of the signature network to propose a maximal equilibrium community search algorithm, and on this basis, designs an optimization strategy to further improve the search efficiency. For multi-core CPU operating environments, the present invention proposes a parallel search algorithm that utilizes multi-core CPUs to improve operating efficiency. For limited memory environments and ultra-large-scale graph data, the present invention proposes a search algorithm based on external storage.

[0011] (2) Incremental calculation: For dynamic graphs, the present invention proposes an algorithm for real-time maintenance and updating of existing results through incremental calculation.

[0012] The present invention proposes a maximal balanced community based on a signature network, and the characteristics of the maximal balanced community include: the balanced community is structurally balanced, that is, the points in the community can be divided into two subgraphs, any edges in the same subgraph are positive edges, and any edges between different subgraphs are negative edges; the balanced community is tightly structured, that is, any two points are connected by edges; the number of points in the two subgraphs of the balanced community cannot be less than a threshold given by a user; the balanced community is a maximal subgraph, that is, no arbitrary point can be added to the current subgraph.

[0013] Among them, the maximal balanced community lemma includes: given a signature network and a balanced community, if a point is connected to every point in the balanced community by an edge, and the edges connected to a unilateral subgraph of the balanced community are all positive edges, and the edges connected to another unilateral subgraph are all negative edges, then this point can be added to the current balanced community to form a larger balanced community.

[0014] Based on the above maximum balanced community, the present invention also proposes a method for searching a maximum balanced community, comprising the following steps:

[0015] Step (1), given a signature network, select each point as the initial point of the balanced community, and the neighbors of the point are the candidate set;

[0016] Step (2), each time a point is selected from the candidate set and added to the current equilibrium community. If a point has been searched, it is removed from the candidate set and marked as searched. Step (2) is repeated until the candidate set is empty.

[0017] Step (3) determines whether the searched equilibrium community is reasonable. The judgment conditions are as follows:

[0018] Judge condition (3.1), whether there is a point that has been searched so that it can be added to the current equilibrium community. If so, the current equilibrium community has been searched and is not extremely large;

[0019] Judge condition (3.2) whether the points of the two subgraphs of the current equilibrium community are both greater than the threshold.

[0020] In the present invention, if the sum of the number of single-edge points in the current balanced community and the number of single-edge candidate set points is less than a threshold, the current search branch is invalid; or, if there is a point that has been searched and the point is connected to both the point in the current balanced community and the candidate set by a valid edge, the current search branch is invalid; or, if the current balanced community and the candidate set can form a maximum balanced community, the search is terminated directly; or, if the positive degree of a point is less than a threshold of -1, or the negative degree is less than a threshold, the point will not appear in any balanced community.

[0021] In the present invention, the process of each point searching for its own equilibrium community is independent of each other, and a multi-core CPU is used to perform parallel operations, creating a separate thread for each point, so that multiple points can search their own equilibrium communities at the same time.

[0022] In the present invention, the search range of each point is the subgraph composed of its neighbors, that is, the neighborhood; when the memory cannot accommodate the entire graph data, only some points and their neighbor subgraphs are loaded into the memory to reduce memory usage; each point is sorted, and for the current community, only when the lowest-ranked point in the community is searched, the community is output.

[0023] In the present invention, when the signature network changes dynamically, the steps for calculating the changed maximum equilibrium community for the case of adding an edge are as follows:

[0024] When an edge is added to the signature network, two existing balanced communities will generate a new balanced community. At the same time, the new balanced community will cover the old balanced community, and we can get:

[0025] Add an edge e = (u, v), then the equilibrium community containing edge e must be the intersection of the previous equilibrium communities containing u and v plus e; and,

[0026] Add an edge e = (u, v). If the balanced community containing edge e is the previous balanced community containing u plus v, then the balanced community containing u should be removed.

[0027] In the present invention, when the signature network changes dynamically, the steps for calculating the changed maximum equilibrium community for the case of reducing one edge are as follows:

[0028] If an edge e=(u,v) is deleted, the added balanced communities correspond to the deleted balanced communities when an edge is added, and the deleted balanced communities are all the balanced communities containing the edge e.

[0029] In the present invention, when the signature network changes dynamically, for the case of deleting multiple edges, the steps for calculating the changed maximum balanced community are as follows: when multiple edges are deleted, the added balanced community and the deleted balanced community are respectively the deleted balanced community and the added balanced community when multiple edges are added.

[0030] In the present invention, when the signature network changes dynamically, the steps for calculating the changed maximum equilibrium community for the case of adding multiple edges are as follows:

[0031] Multiple edges will merge to form a new equilibrium community. At the same time, the new equilibrium community will cover multiple old equilibrium communities. The steps to search for a new equilibrium community are as follows:

[0032] Step (1), given a signature network and several newly added edges, each newly added edge is selected as the initial edge of the balanced community, and the common neighbors of the edge are the candidate set;

[0033] Step (2), each time a point is selected from the candidate set, if the point does not introduce a new edge that has been searched, the point is added to the current equilibrium community and marked as searched, and step (2) is repeated until the candidate set is empty;

[0034] Step (3), determine whether the searched equilibrium community is reasonable.

[0035] The problem of searching for a maximum equilibrium community based on a signature network of the present invention is proven to be an NP-hard problem, that is, an exact solution cannot be obtained in polynomial time. In order to solve this technical problem, the present invention not only uses algorithm optimization strategies, such as center point selection and early termination of search, but also uses hardware optimization strategies, such as parallel search algorithm and external memory search algorithm. Through the above optimization strategies, the search algorithm of the present invention greatly improves the operation efficiency of the algorithm, so that it can complete the search for a maximum equilibrium community on a large-scale signature network in a considerable time. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a program flow chart.

[0037] Figure 2 Greatly balanced communities in signature networks.

[0038] Figure 3 For the search tree.

[0039] Figure 4 A search tree using a pivot.

[0040] Figure 5 is the algorithm running time under different thresholds.

[0041] Figure 6 The running time of the algorithm on graph data of different sizes.

[0042] Figure 7 It is the experimental data set. DETAILED DESCRIPTION

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0044] The community mining problem in the field of network analysis is a basic and meaningful problem. The present invention proposes a maximum equilibrium community model based on the most basic and main theory in signature networks, namely the structural equilibrium theory. For the maximum equilibrium community model, the present invention utilizes the unique properties of signature networks to propose a maximum equilibrium community search algorithm, and on this basis, designs an optimization strategy to further improve the search efficiency. For multi-core CPU operating environments, the present invention proposes a parallel search algorithm based on multi-core CPUs. For limited memory environments and ultra-large-scale graph data, the present invention proposes a search algorithm based on external storage. For dynamic graphs, the present invention proposes an algorithm for real-time maintenance and updating of existing results through incremental calculations.

[0045] The specific invention points of the balanced community search system based on signature network are as follows:

[0046] 1. The present invention designs a balanced community based on a signature network, the basic features of which are as follows:

[0047] Feature (1.1), a balanced community is structurally balanced, that is, the points in the community can be divided into two subgraphs, any edge in the same subgraph is a positive edge, and any edge between different subgraphs is a negative edge;

[0048] Characteristic (1.2), a balanced community is tightly structured, that is, there is an edge connecting any two points;

[0049] Feature (1.3), the number of points in the two subgraphs of the balanced community cannot be less than a user-given threshold;

[0050] Feature (1.4), a balanced community is a maximal subgraph, that is, no arbitrary point can be added to the current subgraph, and it satisfies features (1.1), (1.2) and (1.3).

[0051] 2. Aiming at the balanced community model, the present invention uses the unique properties of the signature network to propose a maximum balanced community search algorithm, and on this basis, designs an optimization strategy to further improve the search efficiency.

[0052] The characteristics of the equilibrium community, the maximum equilibrium community has the following important lemmas:

[0053] Lemma (2.1), given a signed network and a balanced community, if a point is connected to every point in the balanced community by an edge, and all the edges connected to a unilateral subgraph of the balanced community are positive, and all the edges connected to another unilateral subgraph are negative, then this point can be added to the current balanced community to form a larger balanced community.

[0054] Based on the important lemma of the balanced community of the signature network, the present invention proposes a maximum balanced community search algorithm, which mainly includes the following steps:

[0055] Step (1), given a signature network, select each point as the initial point of the balanced community, and the neighbors of the point are the candidate set;

[0056] Step (2), each time a point is selected from the candidate set and added to the current equilibrium community. If a point has been searched, it is removed from the candidate set and marked as searched. Step (2) is repeated until the candidate set is empty.

[0057] Step (3) determines whether the searched equilibrium community is reasonable. The judgment conditions are as follows:

[0058] Judge condition (3.1), whether there is a point that has been searched so that it can be added to the current equilibrium community. If so, the current equilibrium community has been searched and is not extremely large;

[0059] Judge condition (3.2) whether the points of the two subgraphs of the current equilibrium community are both greater than the threshold.

[0060] In order to further improve the efficiency of the above-mentioned maximum equilibrium community search algorithm, the present invention proposes the following lemma:

[0061] Lemma (2.2), if the sum of the number of single-edge points and the number of single-edge candidate points in the current equilibrium community is less than the threshold, the current search branch is invalid.

[0062] Lemma (2.3), if there is a point that has been searched and is connected to both the points in the current equilibrium community and the candidate set by a valid edge, then the current search branch is invalid.

[0063] Lemma (2.4), if the current equilibrium community and the candidate set can form a maximum equilibrium community, the search is terminated directly.

[0064] Lemma (2.5), if the positive degree of a point is less than the threshold -1, or the negative degree is less than the threshold, then this point will not appear in any equilibrium community.

[0065] In the present invention, in the process of searching for the maximum balanced community, based on these four lemmas, many unnecessary searches will be avoided, thereby improving the search efficiency.

[0066] 3. For the search algorithm, the present invention proposes a parallel algorithm using a multi-core CPU. The process of each point searching for its equilibrium community is independent of each other, so a multi-core CPU can be used for parallel computing, creating a separate thread for each point, so that multiple points can search their equilibrium communities at the same time.

[0067] 4. Under limited memory conditions, facing ultra-large-scale graph data, the present invention proposes a search algorithm based on external storage. The search range of each point is the subgraph (neighborhood) composed of its neighbors. Therefore, when the memory cannot accommodate the entire graph data, only some points and their neighbor subgraphs can be loaded into the memory to reduce memory usage. This may cause the same balanced community to be searched multiple times. The solution of the present invention is to sort each point, and for the current community, only when searching the lowest-ranked point in the community, the community is output.

[0068] 5. For dynamic graphs, the present invention proposes an algorithm for real-time maintenance and updating of existing results through incremental calculation. Based on the characteristics of the maximum balanced community, when the signature network undergoes dynamic changes, the algorithm can quickly calculate the maximum balanced community that has changed. The dynamic changes of the signature network are mainly divided into the following situations: situation (5.1), adding an edge; situation (5.2), deleting an edge; situation (5.3), adding multiple edges; situation (5.4), deleting multiple edges;

[0069] When an edge is added to the signature network in case (5.1), two existing equilibrium communities may generate a new equilibrium community. At the same time, the new equilibrium community may cover the old equilibrium community. The lemma is as follows:

[0070] Lemma (5.1.1), add an edge e = (u, v), then the equilibrium community containing edge e must be the intersection of the previous equilibrium communities containing u and v respectively plus e;

[0071] Lemma (5.1.2), add an edge e = (u, v), if the equilibrium community containing edge e is the previous equilibrium community containing u plus v, then the equilibrium community containing u should be removed.

[0072] When an edge is deleted in case (5.2), the lemma is as follows:

[0073] Lemma (5.2.1), if an edge e=(u,v) is deleted, the added balanced communities correspond to the deleted balanced communities in case (5.1), and the deleted balanced communities are all balanced communities containing edge e.

[0074] When multiple edges are added to the signature network, they may merge to form a new equilibrium community. At the same time, the new equilibrium community may cover multiple old equilibrium communities, and Lemma (5.1) and Lemma (5.2) are no longer applicable. The steps to search for a new equilibrium community are as follows:

[0075] Step (5.3.1), given a signature network and several newly added edges, select each newly added edge as the initial edge of the balanced community, and the common neighbors of the edge are the candidate set;

[0076] Step (5.3.2), each time a point is selected from the candidate set, if the point does not introduce a new edge that has been searched, add the point to the current balanced community and mark it as searched, repeat step (5.2) until the candidate set is empty;

[0077] Step (5.3.3) determines whether the searched equilibrium community is reasonable.

[0078] When multiple edges are deleted for case (5.4), the lemma is as follows:

[0079] Lemma (5.4.1), if multiple edges are deleted, the added equilibrium communities and deleted equilibrium communities are the deleted equilibrium communities and added equilibrium communities in case (5.2), respectively.

[0080] Based on Lemma (5.4.1), when multiple edges are deleted, the incremental calculation algorithm for adding multiple edges can be directly called, and the newly added (or removed) communities correspond to the communities that should be deleted (or added) at this time.

[0081] 1. Model design

[0082] In the present invention, for an undirected and unweighted signature network G = (V, E + , E- ), where V represents the vertex set, E + Indicates the positive side, E - Represents a negative edge, connecting the vertices in G. The present invention uses n and m to represent the number of vertices and the number of edges, namely n = |V| and m = |E + |+|E - |, for each vertex v∈G, let represents the positive neighbor of v, that is let represents the negative neighbor of v, that is The present invention uses and To represent the positive and negative degrees of v, that is and The present invention also uses N G (v) and d G (v) represents the neighbors and degree of v, that is, and For the sake of simplicity, the present invention omits G in the symbols hereinafter.

[0083] Definition 1.1 Balanced network Given a signature network G = (V, E + , E - ), when it can be divided into two subgraphs G L and G R , or Or u∈G L , v∈G R .

[0084] Definition 1.2 Maximum equilibrium community Given a signature network G = (V, E + , E - ), a maximal equilibrium community C is a maximal subgraph of G that satisfies the following constraints:

[0085] Density: C is dense, that is,

[0086] Balance: C is balanced, that is, it can be divided into two subgraphs C R and or u,v∈C R ,and or u∈C L , v∈C R .

[0087] In this invention, the purpose is to list all maximal equilibrium communities in a given signature network. L and C RThe number of vertices in is not less than a fixed threshold k. The present invention adds a size constraint, that is, |C L |≥k and |C L |≥k, the user can control the size of the returned maximum equilibrium community according to their specific needs. In the present invention, given a signature network G and a threshold k, the maximum equilibrium community search algorithm can calculate all maximum equilibrium communities C in G that satisfy |C L |≥k and |C L |≥k, and supports dynamic updates.

[0088] Example: Figure 2 As shown, this is a signature network. According to the definition of the maximum equilibrium community, when the threshold is equal to 2, there are four maximum equilibrium communities in the network, namely C1 = {{v0, v1, v3}, {v5, v6, v7}}, C2 = {{v0, v1, v2, v3}, {v5, v6}}, C3 = {{v0, v1}, {v5, v6, v8}}, C4 = {{v0, v 14},{v 13 , v 15}}.

[0089] 2. Maximum Balanced Community Search Algorithm

[0090] 2.1 Basic framework of the maximum balance community search algorithm

[0091] This paper designs a new search algorithm based on the special properties of signature networks. The main idea comes from the following lemma:

[0092] Lemma 2.1 Given a signed network and a balanced community, if a point is connected to every point in the balanced community by an edge, and all the edges connected to a unilateral subgraph of the balanced community are positive, and all the edges connected to another unilateral subgraph are negative, then this point can be added to the current balanced community to form a larger balanced community.

[0093] Based on the above ideas, the present invention proposes a maximum balance community search algorithm, as shown in Algorithm 1. For each vertex v in G i The present invention lists all the i Great balance community, with C L and C R To represent a balanced community. i Initialize the candidate set P with high-order neighbors L and P R , P L Yes i The positive high-order neighbor, P R Yes iIn addition, the present invention also uses the selected set to record the vertices that have been processed to avoid outputting repeated maximal balanced communities. After initializing these sets, the present invention calls the local search sub-algorithm to search for the vertices that contain v i All great balance community.

[0094] The local search sub-algorithm searches for a maximum balanced community based on a given candidate set and a selected set. If both the candidate set and the selected set are empty, it means that the current balanced community is already a maximum balanced community and cannot be expanded. The algorithm needs to determine whether the current community meets the threshold size constraint. If it does, it outputs the current maximum balanced community to the result set. Otherwise, the algorithm adds a vertex v from the candidate set to the current community, and v is alternately added to C L or C R In , the corresponding candidate set and selected set are updated at the same time, and recursively call itself to further expand the balanced community. When v is processed, v is moved from the candidate set to the selected set.

[0095] Algorithm 1 Maximum Balanced Community Search Algorithm

[0096]

[0097]

[0098] Embodiment: The search process of the maximum balanced community search algorithm can be represented by a search tree. Figure 3 Shows the Figure 2 A part of the search tree when performing a search on the balanced network G in Algorithm 1. S1, S2, ... represent different search states during the search process. In the S1 state, the present invention assumes that there is a balanced community C = {C L ={v0,v1},C R ={v5,v6}},P L = {v2, v3} and P R ={v7, v8}. The present invention first converts v2 from P L Add to C L To expand the search branch. Since v7 and v8 are not negative neighbors of v2, they are at S2 from P R is removed. And because at S2 P R is empty, the present invention adds L v3 to continue expanding C L In the S3 state, P L , P R , Q L and Q RWhen it is empty, the present invention obtains a maximum equilibrium community C2 = {{v0, v1, v2, v3}, {v5, v6}}, and the search branch starting from v2 ends. The present invention returns to state S1, and v2 is moved to Q L Then, the present invention adds v3 to C at S4 L In the example, add v7 to C at S5. R In the above example, we get C1 = {{0, 1, 3}, {5, 6, 7}}. The search continues in a similar way until all P states in state S1 are traversed. L and P R All vertices in .

[0099] 2.2 Maximum Balance Community Search Optimization Algorithm

[0100] In the present invention, two optimization strategies are proposed to further improve the efficiency of the search, namely: center point selection and early termination.

[0101] Center point selection. Consider the maximum equilibrium community search process of Algorithm 1, assuming that the present invention currently has C L , C R , P L , P R The present invention is from P L To C L Add a vertex v. After the search from v is completed, there is no need to further explore v's neighbors. The reason is that all communities where v is located can be found through v, and those communities that do not contain v can definitely be found through v's non-neighbors.

[0102] Early termination. In the present invention, different conditions for early termination of the search are considered. For the current equilibrium community C = {C L , C R}, and ultimately greatly balance the community's C L (or C R ) has a maximum possible size of |C L |+|P L |(or |C R |+|P R |). Based on the size constraint of threshold k, if |C L |+|P L |<k or |C R |+|P R |<k, the present invention can directly terminate the current search.

[0103] In the present invention, Q is used L and Q R to store the vertices that can be added to the current equilibrium community. Therefore, during the search process, if and as well as Q R Similarly, the present invention can conclude that the maximum balanced community has been listed, and the present invention can directly terminate the current search.

[0104] In the present invention, if P L and P R All vertices in can form a positive community respectively, and P L For each vertex pair P R All vertices in have negative edges, then P L and P R form a balanced community. By definition, C L ∪P L and C R ∪P R A maximum balanced community can be formed. The present invention can output C = {C L ∪P L , C R ∪P R} and directly interrupt the existing search.

[0105] Algorithm 2 Maximum Balance Community Search Optimization Algorithm

[0106]

[0107] Example: For Figure 2 The balancing network, Figure 4 is the search tree after using the center point. In state S1, for the current balanced community, v3 is selected as the center point, because in the current candidate set, only v8 is not a neighbor of v3, and the new candidate set is {v3, v8}. In S2, v3 is added to the current community. At this time, v2 is selected as the center point. S3 and S4 obtain two maximum balanced communities by adding v7 and v2 respectively, and the search branch starting from v3 ends. At this time, we return to S1 and obtain the last maximum balanced community by adding v8. Compared with the search tree of Algorithm 1, Figure 3 As shown in the figure, the search branches of the search tree are greatly reduced after using the central point, avoiding invalid calculations.

[0108] 2.3 Parallel-based Maximum Balance Community Search Algorithm

[0109] Since computing environments equipped with multi-core CPUs are becoming more and more common, in the present invention, in order to further speed up the efficiency of the maximum equilibrium community search algorithm so that it can process larger signature networks, the present invention proposes a maximum equilibrium community search algorithm based on parallelism, so that the search algorithm can run efficiently in a multi-core CPU environment. Algorithm 2 can be easily extended to run in parallel. In Algorithm 2, the present invention explores the maximum equilibrium community from each vertex and its neighbors in line 1 (line 1 of Algorithm 1). Since the search of different vertices is completely independent, for each point v i The present invention creates a new thread to search for v i Related maximal balanced communities. When all threads terminate, all maximal balanced communities will be searched. In the present invention, the parallel-based maximal balanced community search algorithm uses OpenMP. OpenMP is a set of multi-threaded concurrent programming APIs that support cross-platform shared memory. Due to the uneven distribution of neighborhood ranges of different points, there may be an imbalance in the computational load between threads. In order to balance the computational load of each thread as much as possible, the present invention adopts a dynamic thread application method, and each point will be randomly assigned to a thread. For the modification of common data between threads, such as result sets, the present invention uses atomic operations to achieve asynchronous access and modification to ensure data consistency. Since the parallel-based maximal balanced community search algorithm is modified on the basis of Algorithm 2, the range of change is not large, and the pseudo code is omitted here.

[0110] 2.4 Maximum Balance Community Search Algorithm Based on External Memory

[0111] In the real world, as the scale of graph data continues to grow, it is possible that the memory cannot accommodate the entire graph data. Therefore, in the present invention, when the signature network G is stored on the disk, the goal of the maximum balanced community search algorithm based on external memory is to search for the maximum balanced community with as little I / O as possible.

[0112] Let S i is a set of vertices in G, for S i , S i The subgraph composed of the vertices and their neighbors in is denoted as G' i Since the diameter of the maximal equilibrium community is 1, for S i , the present invention can ensure that in S i The maximal equilibrium community of each point in G' i This means that the present invention can be in G' i Based on the local enumeration and S i Therefore, the present invention first divides the vertices of G into several sets S1, S2, ..., S t , so that S i The corresponding G'i can be loaded into the memory, 1≤i≤t. Then, in the present invention, for each subgraph G' i , use the memory-based maximum balanced community algorithm proposed in this invention to search for G' i The only remaining problem is that some maximal balanced communities may be output multiple times if they contain vertices from different sets. To avoid this problem, when in G' i When searching in , if C contains a vertex v∈S j , where j<i, then C will not be output. Since the present invention can obtain G' by scanning G on the disk i , so the I / O complexity of the maximum balanced community search algorithm based on external memory is Where t is the number of partitions and B is the disk block size.

[0113] 3. Incremental search algorithm for extremely balanced communities based on dynamic graphs

[0114] In real applications, with the interaction between various nodes, the signature network cannot remain unchanged, and edges may be added or subtracted at any time. In the present invention, based on the result set obtained by the maximum equilibrium community search algorithm, an incremental algorithm is proposed. The incremental algorithm is divided into an incremental algorithm for adding edges and an incremental algorithm for subtracting edges. The incremental algorithm for adding edges is further divided into an incremental algorithm for adding a single edge and an incremental algorithm for adding multiple edges, corresponding to the cases of adding one edge and adding multiple edges respectively. The incremental algorithm for subtracting edges can be derived by inversely deducing the incremental algorithm for adding edges. Therefore, in the present invention, the incremental algorithm for adding edges is mainly introduced.

[0115] 3.1 Adding a unilateral incremental algorithm

[0116] In the present invention, the present invention first considers the case of adding an edge, and the core idea is derived from the following two lemmas:

[0117] Lemma 3.1.1: If we add an edge e = (u, v), the equilibrium community containing edge e must be the intersection of the previous equilibrium communities containing u and v respectively plus e.

[0118] Lemma 3.1.2 adds an edge e = (u, v). If the equilibrium community containing edge e is the previous equilibrium community containing u plus v, then the equilibrium community containing u should be removed.

[0119] According to the above two lemmas, the present invention proposes an algorithm for adding a single edge increment. For the newly added edge e=(u, v), the algorithm creates a variable current community parent id to record which original communities the current community is derived from. The community parent id is initialized to the union of the community id where u is located and the community id where v is located. In the present invention, the present invention creates a superpoint for the point set with the same community parent id. Different from the previous search algorithm, the algorithm for adding a single edge increment proposed in the present invention no longer expands the current community by adding points, but expands the current community by adding superpoints. When a superpoint is selected, the point set it represents is added to the current community. The new superpoint set will remove the superpoints that have no id intersection with the current superpoint, and the intersection of the current community parent id and S becomes the new current community parent id. When the superpoint set and the selected set are empty, the present invention obtains a new maximally balanced community. At the same time, the current community parent id is used to determine whether the parent id is covered by the current community. If so, the old community represented by the parent id is removed.

[0120] Algorithm 3 plus unilateral incremental algorithm

[0121]

[0122]

[0123] 3.2 Multilateral Incremental Algorithm

[0124] Now consider the case of adding multiple edges. Since when adding multiple edges, the newly generated maximal balanced community no longer has an inheritance relationship with the old community, a new balanced community may be composed of multiple unrelated old communities. Therefore, Lemma 3.1.1 and Lemma 3.1.2 are no longer applicable. The multi-edge incremental algorithm proposed in the present invention continues the style of the maximal balanced community search algorithm, and continuously expands the current new community by adding points. At the same time, when there are more than one new edge in a new community, in order to avoid repeated calculations, when a new edge is searched, it is recorded as a searched state. In subsequent searches, if adding a point will introduce this searched edge, the point is directly moved into the selected set to ensure that each new edge combination will only be searched once. For the old maximal balanced community that needs to be deleted, since the parent ID of the current community cannot be tracked, it is necessary to traverse all local old communities contained in the current community and determine whether the local old community is maximal. If so, remove the old community.

[0125] Algorithm 4 plus multilateral incremental algorithm

[0126]

[0127]

[0128] In the multi-edge incremental algorithm, since the speed of adding points is relatively slow, and in the process of removing old communities, it is necessary to traverse possible existing communities and judge the maximality, which all take a certain amount of time. Therefore, the present invention heuristically adopts a combination of a single-edge incremental algorithm and a multi-edge incremental algorithm. If there is no other new edge in the neighborhood where a new edge is located, then this new edge will definitely not exist in a new maximum equilibrium community, and this community contains multiple new edges. For such new edges, the present invention uses the single-edge incremental algorithm to calculate the community changes it brings. The other edges are batch calculated using the multi-edge incremental algorithm.

[0129] In order to clearly and objectively describe the invention effect brought by the technical innovation of the present invention, the present invention reflects the system's efficiency and scalability. The experimental objects are the maximum equilibrium community search algorithm ("search algorithm") and the maximum equilibrium community search optimization algorithm ("optimized search algorithm"). The experimental data are five real signature networks, and the specific data details are as follows Figure 7 Set the maximum acceptable run time to 12 hours, recorded as "INF".

[0130] First, in the efficiency experiment, the present invention tests the running time of the two algorithms on different data sets for different thresholds. The results are as follows: Figure 5 As shown. On all data sets, for all thresholds, the running time of the optimized search algorithm is shorter than that of the search algorithm, which directly verifies the effectiveness of the optimization strategy proposed in the present invention. This is because the optimization strategy of the present invention combines the characteristics of threshold restrictions and signature networks to avoid a large number of unnecessary search calculations. Secondly, on any data set, when the threshold changes from small to large, the running time of the search algorithm and the optimized search algorithm both show a downward trend. This is because as the threshold increases, more points and edges will be pruned by the pruning strategy proposed in the present invention, thereby greatly reducing the search space and improving search efficiency.

[0131] Then, in the scalability experiment, the present invention tests the scalability of the search algorithm and the optimization search algorithm on two large data sets, DBLP and Douban, and gradually expands the scale of the graph by randomly selecting vertices on the graph. The random selection probability is 20%-100%. Figure 6 The experimental results are shown in Figure 2. Figure 6 As shown in the figure, when the number of points increases, the running time of both algorithms will also increase, but the optimized search algorithm outperforms the search algorithm in all cases in both data sets. For example, on DBLP, when the present invention samples 20% of the vertices, the running time of the search algorithm and the optimized search algorithm is 0.6 seconds and 0.5 seconds, respectively, while when 80% of the vertices are sampled, their running times are 770.6 seconds and 4.0 seconds, respectively. Practice shows that the optimized search algorithm has better scalability.

[0132] Judging from the above experimental results, the search algorithm based on optimization strategy has good performance in both efficiency and scalability.

[0133] The protection content of the present invention is not limited to the above embodiments. Without departing from the spirit and scope of the inventive concept, changes and advantages that can be thought of by those skilled in the art are included in the present invention and are protected by the attached claims.

Claims

1. A method for searching a maximum equilibrium community based on a signature network, characterized in that: The Great Balance Community includes: The balanced community is structurally balanced, that is, the points in the community can be divided into two subgraphs, any edge in the same subgraph is a positive edge, and any edge between different subgraphs is a negative edge; the balanced community is structurally tight, that is, any two points are connected by an edge; the number of points in the two subgraphs of the balanced community cannot be less than a threshold given by a user; the balanced community is a maximal subgraph, that is, no point will be added to the current subgraph; The search method comprises the following steps: Step (3.1), given a signature network, select each point as the initial point of the balanced community, and the neighbors of the point are the candidate set; Step (3.2), each time a point is selected from the candidate set and added to the current equilibrium community. If a point has been searched, it is removed from the candidate set and marked as searched. Repeat step (3.2) until the candidate set is empty; Step (3.3) determines whether the searched equilibrium community is reasonable. The judgment conditions are as follows: Judge the condition (3.3.1) to see if there is a point that has been searched so that it can be added to the current balance. In the community, if there is, the current equilibrium community has been searched and is not extremely large; Judgment condition (3.3.2): whether the points of the two subgraphs of the current balanced community are both greater than the threshold; The process of each point searching for its equilibrium community is independent of each other. Multi-core CPUs are used for parallel computing, creating a separate thread for each point, so that multiple points can search their equilibrium communities at the same time.

2. The method for searching a maximum balanced community according to claim 1, characterized in that: If the sum of the number of unilateral points and the number of unilateral candidate points in the current equilibrium community is less than the threshold, the current search branch is invalid; or, If there is a point that has been searched and is connected to both the points in the current equilibrium community and the candidate set by valid edges, the current search branch is invalid; or, If the current equilibrium community and the candidate set form a maximum equilibrium community, the search is terminated directly; or, If the positive degree of a point is less than the threshold -1, or the negative degree is less than the threshold, the point will not appear in any equilibrium community.

3. The method for searching a maximum balanced community according to claim 1, characterized in that: The search range of each point is the subgraph formed by its neighbors, i.e. the neighborhood. When the memory cannot accommodate the entire graph data, only some points and their neighbor subgraphs are loaded into the memory to reduce memory usage. Sort each point. For the current community, only when searching for the lowest-ranked point in the community, output the community.

4. The method for searching a maximum balanced community according to claim 1, characterized in that: When the signature network changes dynamically, the steps to calculate the changed maximum equilibrium community for the case of adding an edge are as follows: When an edge is added to the signature network, two existing balanced communities will generate a new balanced community. At the same time, the new balanced community will cover the old balanced community, and we can get: Add an edge e = (u, v), then the equilibrium community containing edge e must be the intersection of the previous equilibrium communities containing u and v plus e; and, Add an edge e = (u, v). If the balanced community containing edge e is the previous balanced community containing u plus v, then the balanced community containing u should be removed.

5. The method for searching a maximum balanced community according to claim 4, characterized in that: When the signature network changes dynamically, the steps to calculate the maximum equilibrium community that has changed in the case of reducing an edge are as follows: If an edge e=(u,v) is deleted, the added balanced communities correspond to the deleted balanced communities when an edge is added, and the deleted balanced communities are all the balanced communities containing the edge e.

6. The method for searching a maximum balanced community according to claim 5, characterized in that: When the signature network changes dynamically, for the case of deleting multiple edges, the steps to calculate the changed maximum balance community are as follows: if multiple edges are deleted, the added balance community and the deleted balance community are respectively the deleted balance community and the added balance community when adding multiple edges.

7. The method for searching a maximum balanced community according to claim 1, characterized in that: When the signature network changes dynamically, the steps to calculate the maximum equilibrium community that has changed when multiple edges are added are as follows: Multiple edges will merge to form a new equilibrium community. At the same time, the new equilibrium community will cover multiple old equilibrium communities. The steps to search for a new equilibrium community are as follows: Step (10.1), given a signature network and several newly added edges, select each newly added edge as the initial edge of the balanced community, and the common neighbors of the edge are the candidate set; Step (10.2), each time a point is selected from the candidate set, if the point does not introduce a new edge that has been searched, add the point to the current balanced community and mark it as searched, repeat step (10.2) until the candidate set is empty; Step (10.3) determines whether the searched equilibrium community is reasonable.

8. The method for searching a maximum balanced community according to claim 1, characterized in that: The maximal balanced community lemma includes: given a signed network and a balanced community, if a point is connected to every point in the balanced community by an edge, and the edges connected to a unilateral subgraph of the balanced community are all positive edges, and the edges connected to another unilateral subgraph are all negative edges, then this point is added to the current balanced community to form a larger balanced community.