Community discovery method based on maximum directed dense subgraph enumeration
By converting social network data into a graph structure and using a maximum directed dense subgraph enumeration method, the maximum subgraph that satisfies specific constraints is identified, thereby solving the problem of discovering large-scale communities in large-scale social platforms and improving The recommendation effect is achieved.
Patent Information
- Application Number
- CN202410755778.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-12
AI Technical Summary
It is difficult for existing technology to accurately discover large-scale communities in large social platforms, resulting in poor social recommendation and content recommendation effects.
A method based on maximal directed dense subgraph enumeration is used to convert social network data into a graph structure. The target subgraph is generated through vertex sorting and recursive enumeration, and the maximal subgraph satisfies the out-degree and in-degree constraints, thereby Identify communities.
It achieves accurate discovery of large-scale communities from social network data and improves the accuracy of social recommendations and content recommendations.
Smart Images

Figure CN118710429A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a community discovery method based on maximal directed dense subgraph enumeration. Background Art
[0002] There are a large number of social users on large social platforms. Communities refer to groups of social users with the same social circle or the same interests and preferences. Identifying communities on social platforms can achieve more accurate social recommendations or content recommendations. However, due to the large number of social users on large social platforms, a large amount of social network data will be generated. There is currently no good way to accurately discover large-scale communities based on these social network data. Summary of the invention
[0003] The present invention provides a community discovery method based on maximal directed dense subgraph enumeration, which is used to solve the defect in the prior art that all large-scale communities cannot be accurately discovered based on social network data, and realize accurate discovery of large-scale communities from social network data.
[0004] The present invention provides a community discovery method based on maximal directed dense subgraph enumeration, comprising: Converting the to-be-processed social network data into a to-be-processed graph, wherein the to-be-processed graph includes a plurality of vertices and a plurality of directed edges, wherein the vertices in the to-be-processed graph correspond to social network users in the to-be-processed social network data, and the directed edges in the to-be-processed graph correspond to association information between various social network users in the to-be-processed social network data; Sort the vertices in the to-be-processed graph based on the minimum in-and-out degrees of the vertices to obtain a first sorting result, generate total branches corresponding to the vertices based on the first sorting result, the total branches correspond to a set group, the set group includes a mutually non-intersecting mandatory set, a candidate set and an exclusion set, the mandatory set and the exclusion set corresponding to the total branch respectively include relevant points after and before the vertex corresponding to the total branch in the first sorting result, and the distance between the relevant point and the vertex corresponding to the total branch in the to-be-processed graph is less than or equal to 2; Recursively enumerate each of the total branches to obtain a target subgraph corresponding to the total branch. In the process of recursively enumerating the total branches, the set group corresponding to the branch is updated based on the hub point to generate multiple branches, each branch corresponds to one set group, and the target branch is determined in each branch of the total branch. The point in the required set corresponding to the target branch is used as the target vertex. The hub point is the vertex in the required set and the candidate set in the set group. The required set corresponding to the target branch corresponds to the target subgraph. The target subgraph is a maximal subgraph in the graph to be processed whose scale exceeds a preset limit value and satisfies a first constraint condition. The first constraint condition is that the out-degree of each vertex is not less than nk, and the in-degree is not less than nl, n is the number of vertices in the graph to be processed, and k, l are positive integers greater than or equal to 1; A target community is determined based on all the target subgraphs, and social network users in the target community are social network users corresponding to vertices in the target subgraph.
[0005] According to a community discovery method based on maximal directed dense subgraph enumeration provided by the present invention, the related points also satisfy a second constraint condition, which is: If there is a directed edge between the relevant point and the vertex corresponding to the total branch, the number of points in the intersection of the first connection point set and the second connection point set is greater than a first value, the first connection points are neighbors of the relevant point and the vertex corresponding to the total branch, respectively, and the first value is the difference between the preset limit value and twice the minimum value of k, l; If there is no directed edge between the relevant point and the vertex corresponding to the total branch, the number of points in the intersection of the first connection point set and the second connection point set is greater than a second value, and the second value is the difference between the preset limit value and twice the minimum value of k, l plus 2.
[0006] According to a community discovery method based on maximal directed dense subgraph enumeration provided by the present invention, the hub-based updating of the set group corresponding to the branch to generate multiple branches includes: When the pivot point belongs to the mandatory set in the set group: Adding the first type of points in the candidate set to the mandatory set and the exclusion set in batches to generate a plurality of first branches, and determining whether to continue a branch or to prune a branch based on the mandatory set corresponding to each of the first branches; Adding the remaining second type points in the candidate set to the mandatory set or the exclusion set in batches to generate a plurality of second branches, and determining a continued branch or a pruned branch based on the mandatory set corresponding to each second branch, wherein the remaining second type points are points of the second type after removing the first type points corresponding to the pruned first branch; When the first type of point is an outbound neighbor of the hub point, the second type of point is an inbound neighbor of the hub point; when the first type of point is an inbound neighbor of the hub point, the second type of point is an outbound neighbor of the hub point; When the pivot point belongs to the candidate set in the set group: Adding the pivot point to the exclusion set to generate a new branch; Obtain the upper bound corresponding to the branch after adding the hub point to the required set, and determine whether the upper bound exceeds the preset limit value. If so, add the hub point to the required set to generate a new branch. Otherwise, prune the branch. The upper bound corresponding to the branch reflects the maximum size of the maximal subgraph consisting of the points in the required set and the candidate set corresponding to the branch that satisfies the first constraint condition.
[0007] According to a community discovery method based on maximal directed dense subgraph enumeration provided by the present invention, the determining of continuing branches or pruning branches based on the mandatory set corresponding to each first branch, and the determining of continuing branches or pruning branches based on the mandatory set corresponding to each second branch include: When a branch is constructed based on the pivot point of the mandatory set, it is determined whether the mandatory set corresponding to the branch satisfies the first constraint condition, and if so, the branch is continued, and if not, the branch is pruned.
[0008] According to a community discovery method based on maximal directed dense subgraph enumeration provided by the present invention, the obtaining of the upper bound corresponding to the branch after the hub point is added to the mandatory set includes: Sort the outgoing neighbors of the hub point in ascending order according to the number of non-incoming neighbors in the required set to obtain a second sorting result; Obtain the maximum i that makes the number of newly added non-out-edge neighbors not greater than the limit of the number of non-out-edge neighbors as the out-degree reference value, wherein the number of newly added non-out-edge neighbors is the number of non-out-edge neighbors at least newly added in the mandatory set after the first i points in the second sorting result are added to the mandatory set corresponding to the branch, and the number of non-out-edge neighbors is the sum of the maximum number of non-out-edge neighbors that can be accommodated under the premise that the out-degrees of all points in the mandatory set corresponding to the branch are not less than nk; The size of the required set corresponding to the branch, the out-degree reference value, k and the difference between the number of non-out-edge neighbors of the hub point in the required set corresponding to the branch are summed to obtain the out-degree upper bound value corresponding to the branch; Obtain the in-degree upper bound value corresponding to the branch, and take the minimum value between the out-degree upper bound value and the in-degree upper bound value as the upper bound.
[0009] According to a community discovery method based on maximal directed dense subgraph enumeration provided by the present invention, the obtaining of the upper bound corresponding to the branch after the hub point is added to the mandatory set includes: Sort the neighbors of the hub point in ascending order according to the minimum in-and-out degree in the required set corresponding to the branch, to obtain a third sorting result; Traversing the points in the third sorting result in order as to-be-processed points for processing so as to remove the to-be-processed points from the third sorting result or retain them; The upper bound is obtained by summing the size of the required set, the number of points retained in the third sorting result, and the maximum number of neighbors of the hub point that can be accommodated in the required set under the first preset condition; When processing each of the points to be processed, the following operations are performed: Selecting a point with the smallest number of non-out-edge neighbors to be accommodated from the non-in-edge neighbors of the point to be processed in the mandatory set as the first point, and selecting a point with the smallest number of non-in-edge neighbors to be accommodated from the non-out-edge neighbors of the point in the mandatory set as the second point, wherein the number of non-out-edge neighbors to be accommodated is the number of non-out-edge neighbors that can be accommodated in the mandatory set, and the number of non-in-edge neighbors to be accommodated is the number of non-in-edge neighbors that can be accommodated in the mandatory set; If the number of non-out-edge neighbors of the first point and the number of non-in-edge neighbors of the second point are both greater than 0, then the number of non-out-edge neighbors of the first point and the number of non-in-edge neighbors of the second point are both reduced by 1; If the number of non-out-edge neighbors that the first point has or the number of non-in-edge neighbors that the second point has is not greater than 0, the point to be processed is removed from the third sorting result.
[0010] The present invention also provides a community discovery device based on maximal directed dense subgraph enumeration, comprising: A graph conversion module, used to convert the to-be-processed social network data into a to-be-processed graph, wherein the to-be-processed graph includes a plurality of vertices and a plurality of directed edges, wherein the vertices in the to-be-processed graph correspond to social network users in the to-be-processed social network data, and the directed edges in the to-be-processed graph correspond to the association information between the social network users in the to-be-processed social network data; a preprocessing module, used to sort the vertices in the to-be-processed graph based on the minimum in-and-out degree of the vertices to obtain a first sorting result, and to generate a total branch corresponding to each vertex based on the first sorting result, wherein the total branch corresponds to a set group, wherein the set group includes a required set, a candidate set, and an exclusion set that do not intersect each other, and the initial values of the required set and the exclusion set corresponding to the total branch respectively include relevant points after and before the vertex corresponding to the total branch in the first sorting result, and the distance between the relevant point and the vertex corresponding to the total branch in the to-be-processed graph is less than or equal to 2; A recursive enumeration module, used to recursively enumerate each of the total branches to obtain a target subgraph corresponding to the total branch. In the process of recursively enumerating the total branch, the set group corresponding to the branch is updated based on the hub point to generate multiple branches, each branch corresponds to one set group, and a target branch is determined in each branch of the total branch. The point in the required set corresponding to the target branch is used as the target vertex. The hub point is the vertex in the required set and the candidate set in the set group. The required set corresponding to the target branch corresponds to the target subgraph. The target subgraph is a maximal subgraph in the graph to be processed whose scale exceeds a preset limit value and satisfies a first constraint condition. The first constraint condition is that the out-degree of each vertex is not less than nk, and the in-degree is not less than nl, n is the number of vertices in the graph to be processed, and k, l are positive integers greater than or equal to 1; The community determination module is used to determine a target community based on all the target subgraphs, wherein the social network users in the target community are the social network users corresponding to the vertices in the target subgraph.
[0011] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the community discovery method based on maximal directed dense subgraph enumeration as described above is implemented.
[0012] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the community discovery methods based on maximal directed dense subgraph enumeration as described above.
[0013] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned community discovery methods based on maximal directed dense subgraph enumeration.
[0014] The present invention provides a community discovery method based on maximal directed dense subgraph enumeration, comprising: converting to-be-processed social network data into a to-be-processed graph, wherein the to-be-processed graph includes a plurality of vertices and a plurality of directed edges, wherein the points in the to-be-processed graph correspond to social network users in the to-be-processed social network data, and the directed edges in the to-be-processed graph correspond to the association information between the social network users in the to-be-processed social network data; sorting the vertices in the to-be-processed graph based on the minimum in-and-out degree of each vertex to obtain a first sorting result, and generating a total branch corresponding to each vertex based on the first sorting result, wherein the total branch corresponds to a set group, wherein the set group includes a mutually non-intersecting mandatory set, a candidate set and an exclusion set, wherein the initial values of the mandatory set and the exclusion set corresponding to the total branch respectively include relevant points after and before the vertex corresponding to the total branch in the first sorting result, and the distance between the relevant point and the vertex corresponding to the total branch in the to-be-processed graph is less than is equal to 2; recursively enumerate each total branch to obtain the target subgraph corresponding to the total branch. In the process of recursively enumerating the total branch, the set group corresponding to the branch is updated based on the hub point to generate multiple branches, each branch corresponds to a set group, and the target branch is determined in each branch of the total branch. The point in the required set corresponding to the target branch is used as the target vertex. The hub point is the vertex in the required set and the candidate set in the set group. The required set corresponding to the target branch corresponds to the target subgraph. The target subgraph is a maximum subgraph in the graph to be processed whose scale exceeds the preset limit value and satisfies the first constraint condition. The first constraint condition is that the out-degree of each vertex is not less than nk, and the in-degree is not less than nl, n is the number of vertices in the graph to be processed, and k, l are positive integers greater than or equal to 1; determine the target community based on all the target subgraphs, and the social network users in the target community are the social network users corresponding to the vertices in the target subgraph.
[0015] The method provided by the present invention converts the to-be-processed social network data into a to-be-processed graph, generates a corresponding set group for each vertex in the to-be-processed graph, updates the set group corresponding to the vertex by recursive enumeration to generate branches, and finally obtains a target subgraph. The target subgraph is a maximal subgraph in the to-be-processed graph whose scale exceeds a preset limit value, and the out-degree of each vertex is not less than nk, and the in-degree is not less than nl. The target community is determined based on the target subgraph. In this way, large-scale communities can be accurately discovered from the social network by searching for a maximal dense subgraph whose scale exceeds the preset limit value in the graph corresponding to the to-be-processed social network data. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flow chart of a community discovery method based on maximal directed dense subgraph enumeration provided by the present invention; Figure 2 It is a schematic diagram of a directed graph; Figure 3 It is a pseudo code schematic diagram of the overall framework of a community discovery method based on maximal directed dense subgraph enumeration provided by the present invention; Figure 4 It is a pseudo code schematic diagram of updating the to-be-selected set and the excluded set in a social discovery method based on maximal directed dense subgraph enumeration provided by the present invention; Figure 5 It is a pseudo code schematic diagram of preprocessing in a community discovery method based on maximal directed dense subgraph enumeration provided by the present invention; Figure 6 This is a pseudo code diagram of branching rules in a community discovery method based on maximal directed dense subgraph enumeration provided by the present invention. Figure 1 ; Figure 7 This is a pseudo code diagram of branching rules in a community discovery method based on maximal directed dense subgraph enumeration provided by the present invention. Figure 2 ; Figure 8 It is a structural schematic diagram of a community discovery device based on maximal directed dense subgraph enumeration provided by the present invention; Fig. 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] Combine the following Figure 1-Figure 7The present invention describes a community discovery method based on maximal directed dense subgraph enumeration. The method provided by the present invention can be applied to electronic devices with computing capabilities, and the electronic devices can be but are not limited to various computers, mobile terminals, wearable smart devices, etc.
[0020] like Figure 1 As shown, the method provided by the present invention comprises the steps of: S110, converting the to-be-processed social network data into a to-be-processed graph, wherein the to-be-processed graph includes a plurality of vertices and a plurality of directed edges, wherein the vertices in the to-be-processed graph correspond to social network users in the to-be-processed social network data, and the directed edges in the to-be-processed graph correspond to association information between various social network users in the to-be-processed social network data; S120, sorting each vertex in the to-be-processed graph based on the minimum in-and-out degree of each vertex to obtain a first sorting result, generating a total branch corresponding to each vertex based on the first sorting result, the total branch corresponds to a set group, the set group includes a required set, a candidate set and an exclusion set that do not intersect each other, the initial values of the required set and the exclusion set corresponding to the total branch respectively include relevant points after and before the vertex corresponding to the total branch in the first sorting result, and the distance between the relevant point and the vertex corresponding to the total branch in the to-be-processed graph is less than or equal to 2; S130, recursively enumerate each main branch to obtain the target subgraph corresponding to the main branch. In the process of recursively enumerating the main branch, the set group corresponding to the branch is updated based on the hub point to generate multiple branches, each branch corresponds to a set group, and the target branch is determined in each branch of the main branch. The point in the required set corresponding to the target branch is used as the target vertex. The hub point is a vertex in the required set and the candidate set in the set group. The required set corresponding to the target branch corresponds to the target subgraph. The target subgraph is a maximum subgraph in the graph to be processed whose scale exceeds a preset limit value and satisfies the first constraint condition. The first constraint condition is that the out-degree of each vertex is not less than nk, and the in-degree is not less than nl, n is the number of vertices in the graph to be processed, and k, l are positive integers greater than or equal to 1; S140: Determine a target community based on all target subgraphs, where social network users in the target community are social network users corresponding to vertices in the target subgraph.
[0021] The social network data to be processed may be generated in the process of social users using the social platform. The acquisition and storage of the social network data to be processed in the present invention may be obtained, stored and used with the consent of the social users and within the scope permitted by applicable laws and regulations.
[0022] When the social network data to be processed is converted into a graph to be processed, each social user in the social network data to be processed is taken as a vertex in the graph to be processed, and directed edges in the graph to be processed are generated based on the association information between the social users in the social network data to be processed. The association information can reflect the attention and interaction between social users. For example, when social user A follows social user B on a social platform, a directed edge from A to B can be generated, or when A frequently likes and comments on the content posted by B, a directed edge from A to B can be generated.
[0023] The scale of a graph refers to the number of vertices included in the graph. First, the (k, l)-plex is explained. In a directed (k, l)-plex with n vertices, the out-degree of any vertex is required to be at least n_k and the in-degree of any vertex is required to be at least n_l. For a large graph, there are many (k, l)-plex subgraphs (for k, l≥2, any two points can form a (k, l)-plex). In the method provided by the present invention, the extremely large (k, l)-plex subgraph whose scale exceeds the preset scale limit is found to achieve the purpose of discovering large-scale communities.
[0024] In a simple directed graph G with n vertices, if a vertex in the graph satisfies the condition that its out-degree is greater than or equal to n_k, then the vertex is called k-satisfied, otherwise it is called k-unsatisfied. Similarly, if a vertex in-degree is greater than or equal to n_l, then the vertex is called l-satisfied, otherwise it is called l-unsatisfied. In a directed graph G, given two positive integers k, l≥1, for an induced subgraph H of the graph, if H is a (k, l)-plex, and there does not exist another induced subgraph H' of the graph such that And H' is also a (k, l)-plex, then H is called a maximal (k, l)-plex of the graph. Figure 2 The graph shown can be derived that the subgraph {0,1,2} is a maximal (1,1)-plex.
[0025] Therefore, in a directed graph G, given two positive integers k, l≥1 and a positive integer q≥1, for a maximal (k, l)-plex H of the graph, if |H|≥q, then H is called a maximal (k, l)-plex of the graph G with a size restricted to q.
[0026] like Figure 3 As shown, the basic process of the method provided by the present invention is: 1. After obtaining the graph to be processed, it is first preprocessed to obtain multiple set groups, each of which includes mutually disjoint mandatory set P, candidate set C and exclusion set X. For each set group obtained by preprocessing, the recursive enumeration method (MBDP) is called to perform the first recursive enumeration ( Figure 3 1-2 in ).
[0027] 2. Determine whether P (lines 4-6) or P∪C (lines 8-11) in the current recursion has satisfied the maximum and scale constraints.
[0028] 3. Using the multi-branch algorithm based on the pivot point (pivot, line 7), perform a second recursive enumeration (lines 12-21) according to the ownership of the pivot point v.
[0029] 4. When v∈C and put it into P, the upper bound algorithm is called to check the rationality of the new branch (line 19), that is, whether the upper bound of the point set size of the maximum (k, l)-plex in the new branch exceeds the scale limit q.
[0030] The method provided by the present invention divides the vertex set of the graph to be processed into three non-intersecting parts: a required set P, a candidate set C, and an exclusion set X. The required set P represents the set of vertices belonging to the (k, l)-plex that have been selected in this round of recursion; the candidate set C represents the set of vertices that have not been selected before this round of recursion and can still make P satisfy the (k, l)-plex after adding P; the exclusion set X represents the set of vertices that have been selected before this round of recursion and can still make P satisfy the (k, l)-plex after adding P. Obviously, when C and X are both empty sets, the (k, l)-plex obtained in P is already a maximal (k, l)-plex. Among them, whenever P changes, C and X will be updated through the update method (such as Figure 3 9, 15, and 20 in ) to ensure that its own definition is met, such as Figure 4 shown.
[0031] The process of preprocessing the graph to be processed is the process of generating the set groups corresponding to each total branch, that is, the process of generating the first branch corresponding to each vertex in the graph to be processed. This process is based on Theorem 1 and Theorem 2: Theorem 1: In a directed graph G, given a (k, l)-plex H. If |H|>k+l-2, then the distance between any two points in H is diam(G[H])≤2, |H| represents the number of vertices in H, and the distance between any two points in the graph refers to the minimum number of edges in the graph that can form a path between the two points.
[0032] Theorem 2 (pruning rule): In a directed graph G = (V, E), given a (k, l)-plex H. If |H|>k+l-2, then for any two points u, v∈V: If there is an edge<u,v> ∈E or directed edge<v,u> ∈E, then |N G (u)∩N G (v)|≥|H|-2min{k,l}.
[0033] If there is an edge And there is a directed edge Then |N G (u)∩N G (v)|≥|H|-2min{k,l}+2.
[0034] Based on Theorem 1, the total branch corresponding to each vertex can be preliminarily generated, such as Figure 5 As shown, Indicates v i out-degree neighbors in G, Indicates v i In-degree neighbors in G, Indicates v i In G, the point with a distance of 2 (that is, there is an intermediate point v i The out-degree neighbors of is the out-degree neighbor of the point), Indicates v i In G, the point with in-degree distance 2 (that is, there is an intermediate point v i The in-degree neighbors of is the in-degree neighbor of the point). That is, the required set and the excluded set corresponding to the total branch include the relevant points after and before the vertex corresponding to the total branch in the first sorting result, and the distance between the relevant point and the vertex corresponding to the total branch in the graph to be processed is less than or equal to 2.
[0035] Based on Theorem 2, further constraint judgment can be made on the total branch to reduce the number of total branches and reduce the subsequent data processing volume. That is to say, the second related point also needs to satisfy the second constraint condition, which is: if there is a directed edge between the related point and the vertex corresponding to the total branch, then the number of points in the intersection of the first connection point set and the second connection point set is greater than the first value, and the first connection point is the neighbor of the vertex corresponding to the related point and the total branch, respectively, and the first value is the difference between the preset limit value and twice the minimum value in k, l; if there is no directed edge between the related point and the vertex corresponding to the total branch, then the number of points in the intersection of the first connection point set and the second connection point set is greater than the second value, and the second value is the difference between the preset limit value and twice the minimum value in k, l plus 2.
[0036] The present invention sorts the vertices in ascending order according to the minimum value of the out-degree and in-degree of each vertex into {v1, ..., v n}( Figure 3 For each branch, only keep the branches that match v iThe points between them satisfy Theorem 1 and Theorem 2, which constitute the candidate set C and the exclusion set X( Figure 3 Each set of P, C, X thus obtained calls the MBDP method for the first recursive enumeration ( Figure 3 8 in ).
[0037] In the method provided by the present invention, in the process of recursive enumeration, new branches are generated and processed separately based on the attribution of the pivot point. When a new branch is generated based on a branch, each point in the intersection of the required set and the candidate set of the branch is used as a pivot point, and branches are generated based on the pivot point. Figure 3 As shown, before updating the set group corresponding to the branch based on the hub point to generate multiple points, first determine whether the branch set where the hub point is located satisfies Figure 3 In lines 8-10 of , if it is not satisfied, the set group corresponding to the branch is updated based on the pivot point to generate multiple branches.
[0038] Based on the pivot point, the set group corresponding to the branch is updated to generate multiple branches, including: When the pivot point belongs to a mandatory set in a collection group: Adding the first type of points in the candidate set to the mandatory set and the exclusion set in batches to generate multiple first branches, and determining whether to continue the branch or to prune the branch based on the mandatory set corresponding to each first branch; Add the remaining second type points in the candidate set to the mandatory set or the exclusion set in batches to generate multiple second branches, determine whether to continue branching or to prune branches based on the mandatory set corresponding to each second branch, and the remaining second type points are the points after removing the first type points corresponding to the pruned first branch from the second type points; When the first type of point is the outgoing neighbor of the hub point, the second type of point is the incoming neighbor of the hub point; when the first type of point is the incoming neighbor of the hub point, the second type of point is the outgoing neighbor of the hub point; When the pivot point belongs to the candidate set in the set group: Add the pivot point to the exclusion set to generate new branches; Get the upper bound corresponding to the branch after adding the hub point to the required set, and determine whether the upper bound exceeds the preset limit value. If so, add the hub point to the required set to generate a new branch. Otherwise, prune the branch. The upper bound corresponding to the branch reflects the maximum size of the maximal subgraph consisting of the points in the required set and candidate set corresponding to the branch that meets the first constraint condition.
[0039] Specifically, when v∈P, the out-degree of v in P is Then the number of outgoing neighbors in P that are not v is To keep v k-satisfied, we can choose at most v’s non-outgoing neighbors are put into the required set P. Similarly, to keep v l-satisfied, at most The non-incoming edge neighbors of v are put into the mandatory set P. Therefore, in the method provided by the present invention, the following branching rules are given for the pivot point v: Take out-degree as an example.
[0040] make That is, the number of non-outgoing neighbors of v in the candidate set C is m, and the number of non-outgoing neighbors that v can accommodate in the required set P is p. Figure 6 The rule shown constructs r+1 branches (r=min(m, p)). The same is true for the in-degree.
[0041] In one possible implementation, branches can be generated independently based on out-degree and in-degree, respectively. In order to reduce the amount of calculation, in another possible implementation, the process of generating new branches based on the hub point is as follows: Figure 7 shown. Figure 7 In , when v∈P, the number of out-degree branches (lines 2 and 4) and the number of in-degree branches (lines 3-4) are calculated respectively. Considering that outSet∩inSet may not be an empty set, the side with the smallest number of branches is selected to branch first, which can reduce the set of the other side. Therefore, according to the number of branches, the set of branches first and the set of branches later are obtained respectively ( Figure 7 ), and then according to the branching rule ( Figure 6 ) build branches in sequence ( Figure 7 6th and 10th rows in ).
[0042] For the branches obtained after two constructions, if P′ satisfies the (k, l)-plex, the MBDP method is continued to be called ( Figure 7 That is, determining whether to continue the branch or to cut the branch based on the mandatory set corresponding to each first branch, and determining whether to continue the branch or to cut the branch based on the mandatory set corresponding to each second branch, includes: When a branch is constructed based on a pivot point of a mandatory set, it is determined whether the mandatory set corresponding to the branch satisfies the first constraint condition, if so, the branch is continued, otherwise the branch is pruned.
[0043] When v∈C, we only need to consider the branch that puts it into the required set P or the excluded set X. When v is put into X, since P has not changed, there is no need to update and directly call the MBDP method ( Figure 7 When v is put into P, since P will be updated, it is necessary to call the upper bound algorithm to calculate whether the upper bound of the point set size of the maximum (k, l)-plex in this branch exceeds the size limit q. If it is satisfied, the branch can continue to call the MBDP method ( Figure 7), otherwise the branch can be pruned.
[0044] That is to say, when v∈C, before putting v into P to realize branching of the current branch, first determine whether the upper bound of the point set size of the maximal (k, l)-plex in the branch generated after v is put into P exceeds the preset size limit value. If so, generate a new branch to put v into P, otherwise do not generate a new branch to put v into P.
[0045] The method provided by the present invention provides two ways of determining the upper bound: a way of determining the upper bound by considering the in-degree and out-degree accommodation relationships respectively and a way of determining the upper bound by considering the in-degree and out-degree accommodation relationships simultaneously. They are described below respectively.
[0046] When the upper bound is determined by considering the in-and-out degree accommodation relationship respectively, the upper bound corresponding to the branch after adding the pivot point to the required set is obtained, including: Sort the outgoing neighbors of the hub point in ascending order according to the number of non-incoming neighbors in the required set, and obtain a second sorting result; Obtain the maximum i that makes the number of newly added non-out-edge neighbors not greater than the limit of the number of non-out-edge neighbors as the out-degree reference value, where the number of newly added non-out-edge neighbors is the number of non-out-edge neighbors at least added in the mandatory set after the first i points in the second sorting result are added to the mandatory set corresponding to the branch, and the number of non-out-edge neighbors is the sum of the maximum number of non-out-edge neighbors that can be accommodated under the premise that the out-degrees of all points in the mandatory set corresponding to the branch are not less than nk; The size of the required set corresponding to the branch, the out-degree reference value, and the difference between k and the number of non-out-edge neighbors of the hub point in the required set corresponding to the branch are summed to obtain the out-degree upper bound value corresponding to the branch; Get the in-degree upper bound value corresponding to the branch, and use the minimum value between the out-degree upper bound value and the in-degree upper bound value as the upper bound.
[0047] The method of determining the upper bound by considering the in-degree and out-degree accommodation relations respectively is based on Theorem 3 and Theorem 4.
[0048] Theorem 3: In an undirected graph G = (V, E), given a required set P and a to-be-selected set C.
[0049] For v∈C, all u∈N C (v) According to the number of non-neighbors of point u in P Sort in ascending order, set the sort result to N C (v) = {u1, ..., u d}.set up N C (v) the first i points, i.e.
[0050] make After all points in P are put into P, the minimum number of new non-neighbors in P is Let the maximum sum of the number of non-neighbors that all points in P can accommodate under the premise of being k-satisfied be
[0051] Then, among all the k-plexes containing P in the induced subgraph G[P∪C], the size ω of the k-plex with the largest point set is:
[0052] In the above formula, |P| is the number of points that must exist in the maximal k-plex, It represents the number of non-neighbors that can be accommodated for v while satisfying the k-satisfied premise. The last part represents the number of points that can be selected in C as much as possible.
[0053] In the last part, since it is from N C (v), so v is always k-satisfied. However, the algorithm does not strictly guarantee whether the points in P are still k-satisfied, but when fill(P, C, i) exceeds sup(P), It is definitely not a k-plex, thus obtaining a tight upper bound.
[0054] Applying Theorem 3 to the directed graph, we can obtain: Theorem 4: In a directed graph G = (V, E), given a required set P and a to-be-selected set C.
[0055] For v∈C, all According to the number of non-incoming neighbors of point u in P Sort in ascending order, and set the sort result to Another for The first i points in
[0056] make After all points in P are placed in P, the number of non-outgoing neighbors added in P is Let the sum of the maximum number of non-outgoing neighbors that all points in P can accommodate under the premise of being k-satisfied be
[0057] Then, among all the (k, l)-plexes containing P in the induced subgraph G[P∪C], the size ω of the (k, l)-plex with the largest point set is: Similarly, only considering the in-degree, that is, considering the out-degree calculation The out-degree used in the process is replaced by the in-degree, and the in-degree is replaced by the out-degree, and we can get: Therefore, choose and The minimum of the two is taken as the upper bound.
[0058] When the upper bound is determined by considering the in-and-out degree accommodation relationship at the same time, the upper bound corresponding to the branch after adding the hub point to the required set is obtained, including: Sort the neighbors of the hub point in ascending order according to the minimum in-and-out degree in the required set corresponding to the branch to obtain a third sorting result; traverse the points in the third sorting result in order as pending points for processing to remove the pending points from the third sorting result or retain them; The upper bound is obtained by summing the size of the required set, the number of points retained in the third sorting result, and the maximum number of neighbors of the hub point that can be accommodated in the required set under the first preset condition; When processing each point to be processed, perform the following operations: Select a point with the smallest number of non-out-edge neighbors to be accommodated from the non-in-edge neighbors of the point to be processed in the required set as the first point, and select a point with the smallest number of non-in-edge neighbors to be accommodated from the non-out-edge neighbors of the point in the required set as the second point, the number of non-out-edge neighbors to be accommodated is the number of non-out-edge neighbors that can be accommodated in the required set, and the number of non-in-edge neighbors to be accommodated is the number of non-in-edge neighbors that can be accommodated in the required set; If the number of non-outgoing neighbors of the first point and the number of non-incoming neighbors of the second point are both greater than 0, then the number of non-outgoing neighbors of the first point and the number of non-incoming neighbors of the second point are both reduced by 1; If the number of non-out-edge neighbors that the first point has or the number of non-in-edge neighbors that the second point has is not greater than 0, the point to be processed is removed from the third sorting result.
[0059] At the same time, the method of determining the upper bound by considering the in-and-out degree accommodation relationship is based on Theorem 5.
[0060] Theorem 5: In a directed graph G = (V, E), given a required set P and a to-be-selected set C. For v∈C, set all u∈N C (v) Sort the points u in P in ascending order according to their minimum out-degree and in-degree values into {u1, ..., u n}.
[0061] For any w∈P, calculate the number of non-outgoing neighbors it can accommodate in P. and the number of non-incoming neighbors
[0062] Select v in order i Do the following: From u i Non-incoming neighbors in P and non-outgoing neighbors Select the points w1, w2 with the smallest sup(w1, P) and sup_(w2, P) values (where ).
[0063] If sup + If (w1,P)>0 and sup_(w2,P)>0, then reduce sup+(w1,P) and sup_(w2,P) by 1.
[0064] Otherwise, u i From N C (v) is removed.
[0065] Let R be N after the operation is completed C (v), then among all the (k,l)-plexes containing P in the induced subgraph G[P∪C], the size ω of the (k,l)-plex with the largest point set is: In this theorem, |P| is the number of points that must exist in the maximal (k,l)-plex. It represents the maximum number of non-neighbors (including non-outgoing neighbors and non-incoming neighbors) that can be accommodated for point v under the premise of satisfying k-satisfied and l-satisfied. R represents the number of points selected as much as possible in C.
[0066] Before recursively enumerating the set group corresponding to a branch each time, if the candidate set and the exclusion set in the set group are both empty sets, and the number of points in the required set is greater than the preset limit value, the branch will no longer be recursively enumerated, and the subgraph of the vertices in the required set in the data graph to be processed will be output as the target subgraph.
[0067] All target subgraphs are regarded as target communities, so that communities with a size larger than a preset limit value can be accurately found from the social data to be processed.
[0068] The following is a description of a community discovery device based on maximal directed dense subgraph enumeration provided by the present invention. The community discovery device based on maximal directed dense subgraph enumeration described below and the community discovery method based on maximal directed dense subgraph enumeration described above can be referred to each other. Figure 8 As shown, the present invention provides a community discovery device based on maximal directed dense subgraph enumeration, comprising: A graph conversion module 810 is used to convert the to-be-processed social network data into a to-be-processed graph, wherein the to-be-processed graph includes a plurality of vertices and a plurality of directed edges, wherein the vertices in the to-be-processed graph correspond to the social network users in the to-be-processed social network data, and the directed edges in the to-be-processed graph correspond to the association information between the social network users in the to-be-processed social network data; A preprocessing module 820 is used to sort each vertex in the to-be-processed graph based on the minimum in-and-out degree of each vertex to obtain a first sorting result, and generate a total branch corresponding to each vertex based on the first sorting result, wherein the total branch corresponds to a set group, and the set group includes a required set, a candidate set, and an exclusion set that do not intersect each other, and the initial values of the required set and the exclusion set corresponding to the total branch respectively include relevant points after and before the vertex corresponding to the total branch in the first sorting result, and the distance between the relevant point and the vertex corresponding to the total branch in the to-be-processed graph is less than or equal to 2; The recursive enumeration module 830 is used to recursively enumerate each main branch to obtain the target subgraph corresponding to the main branch. In the process of recursively enumerating the main branch, the set group corresponding to the branch is updated based on the hub point to generate multiple branches, each branch corresponds to a set group, and the target branch is determined in each branch of the main branch. The point in the required set corresponding to the target branch is used as the target vertex. The hub point is a vertex in the required set and the candidate set in the set group. The required set corresponding to the target branch corresponds to the target subgraph. The target subgraph is a maximum subgraph in the graph to be processed whose scale exceeds a preset limit value and satisfies the first constraint condition. The first constraint condition is that the out-degree of each vertex is not less than nk, and the in-degree is not less than nl, n is the number of vertices in the graph to be processed, and k and l are positive integers greater than or equal to 1. The community determination module 840 is used to determine a target community based on all target subgraphs, where social network users in the target community are social network users corresponding to vertices in the target subgraph.
[0069] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9As shown, the electronic device may include: a processor (processor) 910, a communication interface (Communications Interface) 920, a memory (memory) 930 and a communication bus 940, wherein the processor 910, the communication interface 920, and the memory 930 communicate with each other through the communication bus 940. The processor 910 can call the logic instructions in the memory 930 to execute a community discovery method based on maximal directed dense subgraph enumeration, the method comprising: converting the to-be-processed social network data into a to-be-processed graph, the to-be-processed graph comprising a plurality of vertices and a plurality of directed edges, the points in the to-be-processed graph corresponding to the social network users in the to-be-processed social network data, and the directed edges in the to-be-processed graph corresponding to the association information between the social network users in the to-be-processed social network data; sorting the vertices in the to-be-processed graph based on the minimum in-and-out degree of each vertex to obtain a first sorting result, generating a total branch corresponding to each vertex based on the first sorting result, the total branch corresponding to a set group, the set group comprising mutually non-intersecting mandatory sets, candidate sets and exclusion sets, the initial values of the mandatory sets and exclusion sets corresponding to the total branches respectively including the relevant points after and before the vertex corresponding to the total branches in the first sorting result, the relevant points and the vertex corresponding to the total branches The distance in the graph to be processed is less than or equal to 2; it is used to recursively enumerate each main branch to obtain the target subgraph corresponding to the main branch. In the process of recursively enumerating the main branch, the set group corresponding to the branch is updated based on the hub point to generate multiple branches, each branch corresponds to a set group, and the target branch is determined in each branch of the main branch. The point in the required set corresponding to the target branch is used as the target vertex. The hub point is the vertex in the required set and the candidate set in the set group. The required set corresponding to the target branch corresponds to the target subgraph. The target subgraph is a maximum subgraph in the graph to be processed whose scale exceeds the preset limit value and satisfies the first constraint condition. The first constraint condition is that the out-degree of each vertex is not less than nk, and the in-degree is not less than nl, n is the number of vertices in the graph to be processed, and k, l are positive integers greater than or equal to 1; it is used to determine the target community based on all target subgraphs, and the social network users in the target community are the social network users corresponding to the vertices in the target subgraph.
[0070] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0071] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the community discovery method based on maximal directed dense subgraph enumeration provided by the above methods. The method includes: converting the social network data to be processed into a graph to be processed, the graph to be processed includes multiple vertices and multiple directed edges, the points in the graph to be processed correspond to social network users in the social network data to be processed, and the directed edges in the graph to be processed correspond to the association information between the social network users in the social network data to be processed; sorting each vertex in the graph to be processed based on the minimum in-and-out degree of each vertex to obtain a first sorting result, generating a total branch corresponding to each vertex based on the first sorting result, the total branch corresponds to a set group, the set group includes mutually non-intersecting required sets, candidate sets and exclusion sets, and the initial values of the required sets and exclusion sets corresponding to the total branch respectively include the first sorting result The related points after and before the vertex corresponding to the general branch in the graph to be processed are less than or equal to 2; used to recursively enumerate each general branch to obtain the target subgraph corresponding to the general branch. In the process of recursively enumerating the general branch, the set group corresponding to the branch is updated based on the hub point to generate multiple branches, each branch corresponds to a set group, and the target branch is determined in each branch of the general branch. The point in the required set corresponding to the target branch is used as the target vertex. The hub point is the vertex in the required set and the candidate set in the set group. The required set corresponding to the target branch corresponds to the target subgraph. The target subgraph is a maximum subgraph in the graph to be processed whose scale exceeds the preset limit value and satisfies the first constraint condition. The first constraint condition is that the out-degree of each vertex is not less than nk, and the in-degree is not less than nl, n is the number of vertices in the graph to be processed, and k, l are positive integers greater than or equal to 1; used to determine the target community based on all the target subgraphs, and the social network users in the target community are the social network users corresponding to the vertices in the target subgraph.
[0072] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when executed by a processor to execute the community discovery method based on maximal directed dense subgraph enumeration provided by the above methods, the method comprising: converting the to-be-processed social network data into a to-be-processed graph, the to-be-processed graph comprising a plurality of vertices and a plurality of directed edges, the points in the to-be-processed graph corresponding to the social network users in the to-be-processed social network data, and the directed edges in the to-be-processed graph corresponding to the association information between the social network users in the to-be-processed social network data; sorting the vertices in the to-be-processed graph based on the minimum in-and-out degree of each vertex to obtain a first sorting result, generating a total branch corresponding to each vertex based on the first sorting result, the total branch corresponding to a set group, the set group comprising mutually non-intersecting required sets, candidate sets and exclusion sets, the initial values of the required sets and exclusion sets corresponding to the total branches respectively including the first sorting result after and before the vertex corresponding to the total branch. The related points before, the distance between the related points and the vertex corresponding to the main branch in the to-be-processed graph is less than or equal to 2; used to recursively enumerate each main branch to obtain the target subgraph corresponding to the main branch, in the process of recursively enumerating the main branch, based on the hub point, the set group corresponding to the branch is updated to generate multiple branches, each branch corresponds to a set group, and the target branch is determined in each branch of the main branch, and the point in the required set corresponding to the target branch is used as the target vertex, the hub point is the vertex in the required set and the candidate set in the set group, the required set corresponding to the target branch corresponds to the target subgraph, the target subgraph is a maximum subgraph in the to-be-processed graph whose scale exceeds the preset limit value and satisfies the first constraint condition, the first constraint condition is that the out-degree of each vertex is not less than nk, the in-degree is not less than nl, n is the number of vertices in the to-be-processed graph, k, l are positive integers greater than or equal to 1; used to determine the target community based on all the target subgraphs, and the social network users in the target community are the social network users corresponding to the vertices in the target subgraph.
[0073] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0074] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A community discovery method based on maximal directed dense subgraph enumeration, It is characterized in that include: Converting the to-be-processed social network data into a to-be-processed graph, wherein the to-be-processed graph includes a plurality of vertices and a plurality of directed edges, wherein the vertices in the to-be-processed graph correspond to social network users in the to-be-processed social network data, and the directed edges in the to-be-processed graph correspond to association information between various social network users in the to-be-processed social network data; Sort the vertices in the to-be-processed graph based on the minimum in-and-out degrees of the vertices to obtain a first sorting result, generate total branches corresponding to the vertices based on the first sorting result, the total branches correspond to a set group, the set group includes a mutually non-intersecting mandatory set, a candidate set and an exclusion set, the mandatory set and the exclusion set corresponding to the total branch respectively include relevant points after and before the vertex corresponding to the total branch in the first sorting result, and the distance between the relevant point and the vertex corresponding to the total branch in the to-be-processed graph is less than or equal to 2; Recursively enumerate each of the total branches to obtain a target subgraph corresponding to the total branch. In the process of recursively enumerating the total branches, the set group corresponding to the branch is updated based on the hub point to generate multiple branches, each branch corresponds to one set group, and the target branch is determined in each branch of the total branch. The point in the required set corresponding to the target branch is used as the target vertex. The hub point is the vertex in the required set and the candidate set in the set group. The required set corresponding to the target branch corresponds to the target subgraph. The target subgraph is a maximal subgraph in the graph to be processed whose scale exceeds a preset limit value and satisfies a first constraint condition. The first constraint condition is that the out-degree of each vertex is not less than nk, and the in-degree is not less than n-1, n is the number of vertices in the graph to be processed, and k, l are positive integers greater than or equal to 1; A target community is determined based on all the target subgraphs, and social network users in the target community are social network users corresponding to vertices in the target subgraph.
2. The community discovery method based on maximal directed dense subgraph enumeration according to claim 1, It is characterized in that The related points also satisfy a second constraint condition, which is: If there is a directed edge between the relevant point and the vertex corresponding to the total branch, the number of points in the intersection of the first connection point set and the second connection point set is greater than a first value, the first connection points are neighbors of the relevant point and the vertex corresponding to the total branch, respectively, and the first value is the difference between the preset limit value and twice the minimum value of k, l; If there is no directed edge between the relevant point and the vertex corresponding to the total branch, the number of points in the intersection of the first connection point set and the second connection point set is greater than a second value, and the second value is the difference between the preset limit value and twice the minimum value of k, l plus 2.
3. The community discovery method based on maximal directed dense subgraph enumeration according to claim 1, It is characterized in that The updating of the set group corresponding to the branch based on the pivot point to generate multiple branches includes: When the pivot point belongs to the mandatory set in the set group: Adding the first type of points in the candidate set to the mandatory set and the exclusion set in batches to generate a plurality of first branches, and determining whether to continue a branch or to prune a branch based on the mandatory set corresponding to each of the first branches; Adding the remaining second type points in the candidate set to the mandatory set or the exclusion set in batches to generate a plurality of second branches, and determining a continued branch or a pruned branch based on the mandatory set corresponding to each second branch, wherein the remaining second type points are points of the second type after removing the first type points corresponding to the pruned first branch; When the first type of point is an outbound neighbor of the hub point, the second type of point is an inbound neighbor of the hub point; when the first type of point is an inbound neighbor of the hub point, the second type of point is an outbound neighbor of the hub point; When the pivot point belongs to the candidate set in the set group: Adding the pivot point to the exclusion set to generate a new branch; Obtain the upper bound corresponding to the branch after adding the hub point to the required set, and determine whether the upper bound exceeds the preset limit value. If so, add the hub point to the required set to generate a new branch. Otherwise, prune the branch. The upper bound corresponding to the branch reflects the maximum size of the maximal subgraph consisting of the points in the required set and the candidate set corresponding to the branch that satisfies the first constraint condition.
4. The community discovery method based on maximal directed dense subgraph enumeration according to claim 3, It is characterized in that The determining of continuing a branch or pruning a branch based on the mandatory set corresponding to each of the first branches, and the determining of continuing a branch or pruning a branch based on the mandatory set corresponding to each of the second branches, include: When a branch is constructed based on the pivot point of the mandatory set, it is determined whether the mandatory set corresponding to the branch satisfies the first constraint condition, and if so, the branch is continued, and if not, the branch is pruned.
5. The community discovery method based on maximal directed dense subgraph enumeration according to claim 4, It is characterized in that The obtaining the upper bound corresponding to the branch after the pivot point is added to the mandatory set includes: Sort the outgoing edge neighbors of the hub point in ascending order according to the number of non-incoming edge neighbors in the required set to obtain a second sorting result; Obtain the maximum i that makes the number of newly added non-out-edge neighbors not greater than the limit of the number of non-out-edge neighbors as the out-degree reference value, wherein the number of newly added non-out-edge neighbors is the number of non-out-edge neighbors at least newly added in the mandatory set after the first i points in the second sorting result are added to the mandatory set corresponding to the branch, and the number of non-out-edge neighbors is the sum of the maximum number of non-out-edge neighbors that can be accommodated under the premise that the out-degrees of all points in the mandatory set corresponding to the branch are not less than nk; The size of the required set corresponding to the branch, the out-degree reference value, k and the difference between the number of non-out-edge neighbors of the hub point in the required set corresponding to the branch are summed to obtain the out-degree upper bound value corresponding to the branch; Obtain the in-degree upper bound value corresponding to the branch, and take the minimum value between the out-degree upper bound value and the in-degree upper bound value as the upper bound.
6. The community discovery method based on maximal directed dense subgraph enumeration according to claim 5, It is characterized in that The obtaining the upper bound corresponding to the branch after the pivot point is added to the mandatory set includes: Sort the neighbors of the hub point in ascending order according to the minimum in-and-out degree in the required set corresponding to the branch, to obtain a third sorting result; Traversing the points in the third sorting result in order as to-be-processed points for processing so as to remove the to-be-processed points from the third sorting result or retain them; The upper bound is obtained by summing the size of the required set, the number of points retained in the third sorting result, and the maximum number of neighbors of the hub point that can be accommodated in the required set under the first preset condition; When processing each of the points to be processed, the following operations are performed: Selecting a point with the smallest number of non-out-edge neighbors to be accommodated from the non-in-edge neighbors of the point to be processed in the mandatory set as the first point, and selecting a point with the smallest number of non-in-edge neighbors to be accommodated from the non-out-edge neighbors of the point in the mandatory set as the second point, wherein the number of non-out-edge neighbors to be accommodated is the number of non-out-edge neighbors that can be accommodated in the mandatory set, and the number of non-in-edge neighbors to be accommodated is the number of non-in-edge neighbors that can be accommodated in the mandatory set; If the number of non-out-edge neighbors of the first point and the number of non-in-edge neighbors of the second point are both greater than 0, then the number of non-out-edge neighbors of the first point and the number of non-in-edge neighbors of the second point are both reduced by 1; If the number of non-out-edge neighbors that the first point has or the number of non-in-edge neighbors that the second point has is not greater than 0, the point to be processed is removed from the third sorting result.
7. A community discovery device based on maximal directed dense subgraph enumeration, It is characterized in that include: A graph conversion module, configured to convert the to-be-processed social network data into a to-be-processed graph, wherein the to-be-processed graph includes a plurality of vertices and a plurality of directed edges, wherein the vertices in the to-be-processed graph correspond to social network users in the to-be-processed social network data, and the directed edges in the to-be-processed graph correspond to association information between the social network users in the to-be-processed social network data; A preprocessing module, used for sorting each vertex in the to-be-processed graph based on the minimum in-and-out degree of each vertex to obtain a first sorting result, generating a total branch corresponding to each vertex based on the first sorting result, wherein the total branch corresponds to a set group, wherein the set group includes a required set, a candidate set, and an exclusion set that do not intersect each other, and the initial values of the required set and the exclusion set corresponding to the total branch respectively include relevant points after and before the vertex corresponding to the total branch in the first sorting result, and the distance between the relevant point and the vertex corresponding to the total branch in the to-be-processed graph is less than or equal to 2; A recursive enumeration module, used to recursively enumerate each of the total branches to obtain a target subgraph corresponding to the total branch. In the process of recursively enumerating the total branch, the set group corresponding to the branch is updated based on the hub point to generate multiple branches, each branch corresponds to one set group, and a target branch is determined in each branch of the total branch. The point in the required set corresponding to the target branch is used as the target vertex. The hub point is the vertex in the required set and the candidate set in the set group. The required set corresponding to the target branch corresponds to the target subgraph. The target subgraph is a maximal subgraph in the graph to be processed whose scale exceeds a preset limit value and satisfies a first constraint condition. The first constraint condition is that the out-degree of each vertex is not less than nk, and the in-degree is not less than nl, n is the number of vertices in the graph to be processed, and k, l are positive integers greater than or equal to 1; The community determination module is used to determine a target community based on all the target subgraphs, wherein the social network users in the target community are the social network users corresponding to the vertices in the target subgraph.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the community discovery method based on maximal directed dense subgraph enumeration as claimed in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the community discovery method based on maximal directed dense subgraph enumeration as claimed in any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the community discovery method based on maximal directed dense subgraph enumeration as claimed in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Community discovery method in social network based on maximum group enumeration
CN109978705A
(p, q)-bipartite cluster enumeration and counting method of bipartite graph
CN114048207A
Method for searching target sub-graph in directed graph and related equipment
CN115438088A
Optimized novel dense subgraph extraction method, system and device and medium
CN116578752A
Maximum binary cluster enumeration method based on candidate vertex merging technology
CN117349289A
Cited By
Group discovery method based on search condition dense subgraph in large symbol graph
CN119322892A
A group discovery method based on searching conditional dense subgraphs in large symbolic graphs
CN119322892B
Group search method and device based on maximum group search on uncertain graph
CN121639201A
