Local community detection method and system in online social network

By introducing improved similarity and closeness-isolation indicators into the local community detection algorithm, traversing nodes from bottom to top, and dynamically adjusting community divisions, the problem of high sensitivity and computational complexity of seed nodes in the existing technology is solved, and a more complete solution is achieved. Accurate and efficient community detection.

CN118628272APending Publication Date: 2024-09-10JIANGXI QIUSHI INST OF ADVANCED STUDIES
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410817479.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing local community detection algorithms are highly sensitive to seed nodes, are difficult to comprehensively identify community structures, have poor computational complexity and model scalability, and lack comprehensive indicators to evaluate community quality.

Method used

A local community detection method in online social networks is proposed. By obtaining the social network subgraph, initializing the local community and neighborhood sets, using the improved similarity index and closeness-isolation index to calculate node similarity, and traversing neighbor nodes from bottom to top. , dynamically adjust community divisions to maximize internal similarity and minimize external similarity.

Benefits of technology

It improves the accuracy and robustness of community detection, reduces the dependence on global information, is suitable for large-scale dynamic networks, and has high universality and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628272A
    Figure CN118628272A
Patent Text Reader

Abstract

The invention provides a local community detection method and system in an online social network, and the method comprises the steps: obtaining a social network sub-graph, initializing a local community set and a neighborhood set of the social network sub-graph, adding a sub-vertex into the local community set, meanwhile, neighbor nodes of the seeds are added into the neighborhood set; calculating a similarity index between the neighbor node and the vertex of the local community set by using an index formula, and searching value-added nodes in the neighborhood set based on the similarity index by using a search formula; inputting the value-added node into the local community set, and calculating a compactness isolation value of the local community set by using an isolation formula; whether the compactness isolation value is smaller than a threshold value or not is judged through a judgment formula, if the compactness isolation value is smaller than the threshold value, the value-added node is confirmed to be input into the local community set, and the accuracy of community detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of social network, and in particular relates to a local community detection method and system in an online social network. Background Art

[0002] The purpose of the local community detection (LCD) algorithm is to identify and divide a community structure, such as a social network, a karate club network, a network representing the topology of the Western United States power grid, etc. It is an algorithm for discovering local community structures in complex networks. It mainly starts from a given vertex in a network without global information as a seed, and relies on similarity measures between nodes to identify and divide communities. The core idea is to calculate the similarity between nodes in the network and classify nodes with higher similarity into the same community or subgroup, so as to discover local community structures in the network.

[0003] A local community discovery algorithm based on dynamic membership function is proposed. The basic idea is: first, according to the characteristics of the dynamic change of the structure of the local community as nodes are added during the formation process, it is divided into three stages based on the value of local modularity M and whether the subset N of the neighbor node set is empty as the standard, and three different dynamic membership functions are designed to measure the relationship between nodes and local communities. Nodes that meet the conditions of the dynamic membership function are added to the local community until all neighbor nodes are traversed, and the merging process is stopped. The whole process is a bottom-up process, and this process eventually obtains a tree graph, that is, the leaf nodes of the tree represent the vertices in the network, and each layer of the tree corresponds to a specific partition of the network. From all the hierarchical partitions of the tree graph, the partition with the largest modularity M value and dynamic membership is selected as the effective partition of the network.

[0004] Most classic local community detection algorithms are highly sensitive to seed nodes, and are likely to lose the core nodes of the local community and only discover a small part of the real community. In the process of local community formation, its structure changes dynamically as nodes join. This method uses three dynamic membership functions to better measure the closeness between nodes and local communities and improve detection efficiency.

[0005] Through the research and analysis of numerous documents, it can be found that the existing technology has the following shortcomings:

[0006] First, the selection of local community detection evaluation indicators is limited. Most of the seed similarity metrics proposed in existing research results, such as VSP, RSS, and compactness, only focus on adjacent vertices and their common neighbors, while ignoring the information between non-adjacent vertices. A comprehensive indicator is still needed to evaluate the quality of the community;

[0007] Second, it is highly sensitive to seed nodes. The results of community detection depend largely on the selection of seed nodes. Different seed node inputs may produce completely different outputs. Once the selected seed nodes are inappropriate or biased, some real communities may even be missed or missing. More importantly, in practical applications, manual selection and adjustment of seed nodes may be required, which not only increases the complexity and cost of using the algorithm, but may also introduce subjectivity and errors, thereby affecting the comprehensive identification and division of community structure;

[0008] Third, the computational complexity and model scalability are poor. Most community detection algorithms require known global network information, such as the number of nodes, the number of edges, and the connection information between nodes. However, in real life, especially in online social networks, the amount of information is often too large and too dynamic to fully obtain global information. For big Vs (popular social media accounts) and many other accounts, i.e. nodes, they have a high degree of similarity, and when there are overlaps or complex interactions, it is difficult to distinguish them, which poses a challenge to community detection algorithms. Summary of the invention

[0009] In order to solve the above technical problems, the present invention provides a method and system for detecting local communities in online social networks, which are used to solve the above background technical problems.

[0010] On the one hand, the invention provides the following technical solution: a method for detecting local communities in online social networks, the method comprising:

[0011] Acquire a social network subgraph, and initialize a local community set and a neighborhood set of the social network subgraph, wherein both the local community set and the neighborhood set are non-empty sets;

[0012] Adding a seed vertex to the local community set, and adding the neighbor nodes of the seed to the neighborhood set;

[0013] Looping through neighbor nodes in the domain set, calculating similarity indices between the neighbor nodes and vertices of the local community set using an index formula, and searching for value-added nodes in the neighborhood set based on the similarity index using a search formula;

[0014] Inputting the value-added node into the local community set, and calculating the compactness isolation value of the local community set using an isolation formula;

[0015] A judgment formula is used to judge whether the compactness isolation value is less than a threshold value. If the compactness isolation value is less than the threshold value, the value-added node is confirmed to be input into the local community set.

[0016] Compared with the prior art, the beneficial effects of this application are:

[0017] 1. Improve the similarity index or introduce a new measurement method. The choice of similarity measurement method directly affects the results of community detection. Different similarity measurement methods may be suitable for different network types and scenarios. Therefore, there is a lack of a universal similarity measurement method. It is necessary to comprehensively consider the association information between vertices and their fields in adjacent and non-adjacent situations to more accurately measure the similarity between nodes, thereby improving the accuracy of community detection.

[0018] 2. When the global information of the network is unknown, the local community is divided and identified based on the known local structural information in the network and the seeds to be detected.

[0019] 3. It estimates the similarity between vertices by investigating the neighborhood of vertices, and reveals local communities by maximizing their internal similarity and minimizing their external similarity at the same time, which has high universality and robustness.

[0020] Furthermore, the step of calculating the similarity index between the neighbor node and the vertex of the local community set by using the index formula includes:

[0021] A first indicator formula is selected based on the first algorithm to obtain a similarity index between the neighbor node and the vertex of the local community set, wherein the first indicator formula includes:

[0022]

[0023] φ(u, v, d) represents the vertex similarity, N u (d) N v (d) are the number of d-level neighbors of vertices u and v, respectively, where u and v are any two internal vertices in the local community set.

[0024] Furthermore, the step of calculating the similarity index between the neighbor node and the vertex of the local community set by using the index formula also includes:

[0025] Based on the second algorithm, a second indicator formula is selected to obtain a similarity index between the neighbor node and the vertex of the local community set, wherein the second indicator formula includes:

[0026]

[0027] Among them, I(·) is an indicator function, defined as:

[0028]

[0029] The numerator is obtained by giving each common d-level neighbor x a weight To calculate the sum of the weighted values ​​of common d-level neighbors, where R u (j), Rv (j) represent the level of x to u and v respectively.

[0030] Furthermore, the search formula includes:

[0031]

[0032] In the formula, a represents the value-added node, Φ(v, a, d) represents the similarity index, C represents the local community set, and N represents the neighborhood set.

[0033] Furthermore, the isolation formula includes:

[0034]

[0035] In the formula, It is expressed as the sum of the similarity indexes of the value-added node and the internal vertex v, It is expressed as the sum of the similarity index between the value-added node and the external vertex u, and ΔCI is expressed as the compactness isolation value.

[0036] Furthermore, after the step of using a judgment formula to judge whether the compactness isolation value is less than a threshold, the method further includes:

[0037] If the compactness isolation value is greater than a threshold, the value-added node is deleted, the loop traversing the neighbor nodes in the domain set is re-executed, the similarity index between the neighbor node and the vertices of the local community set is calculated using an index formula, and the value-added node in the neighborhood set is searched based on the similarity index using a search formula.

[0038] In a second aspect, the invention provides the following technical solution: a method system for detecting local communities in online social networks, the system comprising:

[0039] An acquisition module, configured to acquire a social network subgraph, and initialize a local community set and a neighborhood set of the social network subgraph, wherein both the local community set and the neighborhood set are non-empty sets;

[0040] A adding module, used for adding a seed vertex to the local community set, and adding the neighbor nodes of the seed to the neighborhood set;

[0041] A value-added module, for looping through neighbor nodes in the domain set, calculating similarity indices between the neighbor nodes and vertices of the local community set using an index formula, and searching for value-added nodes in the neighborhood set based on the similarity index using a search formula;

[0042] An isolation module, used for inputting the value-added node into the local community set, and calculating the compactness isolation value of the local community set using an isolation formula;

[0043] The confirmation module is used to determine whether the compactness isolation value is less than a threshold value by using a judgment formula, and if the compactness isolation value is less than the threshold value, the value-added node is confirmed to be input into the local community set.

[0044] In a third aspect, the invention provides the following technical solution: a computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for detecting local communities in online social networks as described above is implemented.

[0045] In a fourth aspect, the invention provides the following technical solution: a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the local community detection method in an online social network as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, 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 ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0047] Figure 1 A flowchart of a local community detection method in an online social network provided by the first embodiment of the present invention;

[0048] Figure 2 A structural block diagram of a method system for detecting local communities in online social networks provided in a second embodiment of the present invention;

[0049] Figure 3 A schematic diagram of the hardware structure of a computer provided in the third embodiment of the present invention.

[0050] The embodiments of the present invention will be further described below with reference to the accompanying drawings. DETAILED DESCRIPTION

[0051] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout are the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the embodiments of the present invention, and should not be construed as limiting the present invention.

[0052] In the description of the embodiments of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0053] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0054] Embodiment 1

[0055] In the first embodiment of the present invention, see Figure 1 , a local community detection method in an online social network, comprising the following steps S01 to S05:

[0056] S01, obtaining a social network subgraph, and initializing a local community set and a neighborhood set of the social network subgraph, wherein both the local community set and the neighborhood set are non-empty sets;

[0057] In this embodiment, using the local community quality metrics based on d-NS and wd-NS, GreedyMaximization of Compactness-Isolation (hereinafter referred to as GMAC) and Improved GMAC (hereinafter referred to as iGMAC) local community fast detection methods are proposed, and a greedy strategy is used to optimize the detected local community quality.

[0058] Specifically, initialize the local community set C and neighborhood set N in the subgraph G = (V, E), The local community set C and the neighborhood set N are both non-empty sets.

[0059] It is worth noting that the local community detection algorithm (LCD) starts from a seed s∈V to detect local communities in an undirected graph G=(V, E), where V is a set of vertices and E is a set of edges in the graph. The entire network structure is unknown at the beginning. In each detection process, in addition to the detected community, only partial information, namely the neighbors of the local community and their link information, is available. Specifically, a known region K is defined as a subgraph G K (VK , E K ), where the vertex set V K The definition is as follows:

[0060]

[0061] Among them, the vertex N and the neighbor L in the currently detected community C N and any other vertices that are connected neighbors.

[0062] S02, adding a seed vertex to the local community set, and adding the neighboring nodes of the seed to the neighborhood set;

[0063] Specifically, add a seed vertex s to the local community set C, and add the neighbor nodes of seed s to the neighborhood set N.

[0064] S03, looping through the neighbor nodes in the domain set, calculating the similarity index between the neighbor nodes and the vertices of the local community set using an index formula, and searching for value-added nodes in the neighborhood set based on the similarity index using a search formula;

[0065] Specifically, the step of calculating the similarity index between the neighbor node and the vertex of the local community set by using the index formula includes:

[0066] A first indicator formula is selected based on the first algorithm to obtain a similarity index between the neighbor node and the vertex of the local community set, wherein the first indicator formula includes:

[0067]

[0068] φ(u, v, d) represents the vertex similarity, N u (d) N v (d) are the number of d-level neighbors of vertices u and v, respectively, where u and v are any two internal vertices in the local community set.

[0069] Specifically, the step of calculating the similarity index between the neighbor node and the vertex of the local community set by using the index formula also includes:

[0070] Based on the second algorithm, a second indicator formula is selected to obtain a similarity index between the neighbor node and the vertex of the local community set, wherein the second indicator formula includes:

[0071]

[0072] Among them, I(·) is an indicator function, defined as:

[0073]

[0074] The numerator is obtained by giving each common d-level neighbor x a weight To calculate the sum of the weighted values ​​of common d-level neighbors, where R u (j), R v (j) indicates the level of x to u and v respectively.

[0075] In this embodiment, in order to comprehensively consider the information between adjacent vertices and non-adjacent vertices, the concept of d-level neighbors is proposed to study the associated information at a relatively large level. s (d) indicates that the d-level neighbors of a given vertex s are a set of vertices whose shortest path length to vertex s is within the range of d. The calculation formula is as follows:

[0076] N s (d)={υ|υ∈V, dist(υ, s)≤d}

[0077] where dist(v, s) is the length of the shortest path between vertices v and s and dist(s, s) = 0. s (d) represents the d-th level neighborhood of a vertex s, that is, the neighborhood vertices whose shortest path length to s is exactly d. The calculation formula is as follows:

[0078] R s (d)={υ|υ∈V, dist(υ, s)=d}

[0079] When d = 1, the d-level neighbors of a vertex are still its adjacent vertices. Therefore, d>1 is usually set to include non-adjacent neighbors in the detection range. In addition, if two vertices share more common neighbors, their similarity is higher. Therefore, for every two vertices u and v, the ratio of the common neighbors of the vertices in the d-level neighbors is used to evaluate the similarity, and the following similarity measure d-neighbors similarity (abbreviated as d-NS) is given, which is calculated as follows:

[0080]

[0081] Among them, φ(u, v, d) represents the vertex similarity, N u (d) N v (d), respectively, the number of d-level neighbors of vertices u and v, where u and v are any two internal vertices in the local community set. When d = 1, |N s (d)| reaches the minimum value, which actually represents all adjacent vertices of s; if the d value is very large, N s (d) will cover the entire known area, so we know that |N s (d)|≤|V K|. In addition, the (d+1)-level neighbors of vertex s can be obtained by expanding from the d-level neighbors of s. Therefore, the number of vertices in the (d+1) level cannot be less than the number of vertices in the d level, then |N s (d+1)|≥|N s (d)|. When d is very large, all vertices will become d-level neighbors of each vertex, and will also become common neighbors of any two vertices, causing the d-NS value of the vertex to be infinitely close to 1 and difficult to distinguish.

[0082] 1.2 Definition of weighted d-neighbors similarity index:

[0083] Neighbors with smaller d-levels usually have a greater impact on similarity calculations than neighbors with larger d-levels. Therefore, for each two vertices u and v, not only the proportion of common neighbors is used, but also different weights are given to common neighbors at different levels to evaluate the similarity between them, and the following similarity measure is given, called weighted d-neighbors similarity (abbreviated as wd-NS), and the calculation method is shown as follows:

[0084]

[0085] Among them, I(·) is an indicator function, defined as:

[0086]

[0087] The numerator is obtained by giving each common d-level neighbor x a weight To calculate the sum of the weighted values ​​of common d-level neighbors, where R u (j), R v (j) represents the level of x with respect to u and v respectively. The denominator calculates the sum of the weighted values ​​of the vertices at each level.

[0088] If a set X={x|x∈(N u (d)∩N v (d))} is not empty, then the d-NS and wd-NS values ​​between any two vertices u and v are non-zero. Therefore, as long as there are common d-level neighbors, even for non-adjacent vertices, the two similarity indicators d-NS and wd-NS can help quantitatively evaluate the similarity between two vertices.

[0089] 1.3 Tightness-Isolation Index Definition:

[0090] In community detection, two important features of a community are (1) compactness, i.e., a community is a subgraph where vertices are very similar to each other; and (2) isolation, i.e., the internal vertices of a community are different from the external vertices. Based on these two features and the proposed d-NS and wd-NS similarity metrics, a comprehensive local community quality metric is proposed, called the compactness-isolation index (CI for short).

[0091] For a local community C with a neighborhood set of N, CI(C, d) is used to represent its compactness-isolation value, and the calculation expression is shown as follows:

[0092]

[0093] Where Φ(u, v, d) is φ(u, v, d) or φ′(u, v, d), the numerator is the sum of the d-NS or wd-NS values ​​of any two internal vertices u and v of the local community C, and the denominator is 1 plus the sum of the d-NS or wd-NS values ​​between the internal vertices of community C and their adjacent external vertices. According to the compactness and isolation properties, the vertices of a good local community should have high internal similarity and low external similarity, resulting in a high CI value. Therefore, we can quantitatively evaluate the quality of a local community by calculating its CI value. Since both our d-NS and wd-NS metrics evaluate the similarity of vertices at a relatively large level, rather than focusing only on one-step connection relationships, they help to better reflect the similarity of real vertices in the local area. Therefore, when a local community is about to absorb an external vertex, the CI metric based on d-NS or wd-NS will better reflect the real change in the ratio of internal similarity to external similarity in the local community, thereby improving detection correctness and efficiency.

[0094] Specifically, in order to absorb vertices with high potential to become members of the local community, the neighbor nodes in the domain set are traversed in a loop, and nodes are searched according to the current maximum sum of the d-NS or wd-NS similarity index between the neighbor nodes and the vertices of the community C. The search formula includes:

[0095]

[0096] In the formula, a represents the value-added node, Φ(v, a, d) represents the similarity index, C represents the local community set, and N represents the neighborhood set.

[0097] It can be understood that the first algorithm is Greedy Maximization of Compactness-Isolation (hereinafter referred to as GMAC) and the second algorithm is Improved GMAC (hereinafter referred to as iGMAC) local community rapid detection method, wherein, if the GMAC algorithm is used, the Φ(v, a, d) of the search formula is Φ(v, a, d) = φ(v, a, d); if the iGMAC algorithm is used, the Φ(v, a, d) of the search formula is Φ(v, a, d) = φ′(v, a, d ) .

[0098] S04, inputting the value-added node into the local community set, and calculating the compactness isolation value of the local community set using an isolation formula;

[0099] The isolation formula includes:

[0100]

[0101] In the formula, It is expressed as the sum of the similarity indexes of the value-added node and the internal vertex v, It is expressed as the sum of similarity indices between the value-added node and the external vertex u, and ACI is expressed as the compactness isolation value.

[0102] Specifically, when a searched node a is added to C, the CI value of the new local community C∪{a} will increase. Specifically, the increase in the CI value ΔCI can be calculated as:

[0103]

[0104] in It refers to the sum of the d-NS or wd-NS values ​​of node a and internal vertex v. It refers to the sum of the d-NS or wd-NS values ​​of node a and external vertex u.

[0105] If the condition If it is satisfied, CI(C∪{a}, d)>CI(C, d), which proves that the searched node a and the seed similarity meet the closeness-isolation index, and will be added to the local community C, and the neighborhood N will be updated at the same time. Otherwise, a will be deleted from the current N. The loop will terminate when the neighborhood N is an empty set, and then the current new local community C will be used as the final detected local community result.

[0106] S05, using a judgment formula to judge whether the compactness isolation value is less than a threshold value, if the compactness isolation value is less than the threshold value, confirming that the value-added node is input into the local community set.

[0107] Specifically, after the step of using a judgment formula to judge whether the compactness isolation value is less than a threshold, the method further includes:

[0108] If the compactness isolation value is greater than a threshold, the value-added node is deleted, the steps of looping through the neighbor nodes in the domain set, calculating the similarity index between the neighbor node and the vertex of the local community set using an index formula, and searching for the value-added node in the neighborhood set based on the similarity index using a search formula are performed again. In this embodiment, the local community detection method in an online social network can be used to identify member groups of different sports in a sports club social network.

[0109] In summary, 1. Innovation of local community fast detection indicators. Taking into account the information between adjacent vertices, their common neighbors, and non-adjacent vertices, the d-NS and wd-NS measurement methods are proposed to more effectively evaluate the similarity between seeds. Based on this, a local community quality indicator called compactness-isolation (CI for short) is proposed to further improve the accuracy and efficiency of community detection;

[0110] 2. The seed-insensitive GMAC algorithm and its variant iGMAC algorithm are proposed. They estimate the similarity between vertices by investigating the neighborhood of vertices and reveal local communities by maximizing their internal similarity and minimizing their external similarity. They have high universality and robustness.

[0111] 3. Starting from a given vertex in a network without global information as a seed, it focuses on the local structure of the network and identifies communities by calculating the similarity between nodes. This local analysis method enables the algorithm to avoid dependence on global network information, so that it has high efficiency when processing large-scale networks. It is suitable for detecting online social networks, has certain privacy, and has low time complexity, which enables this method to effectively process large-scale network data.

[0112] Embodiment 2

[0113] like Figure 2 As shown, in a second embodiment of the present invention, a local community detection method system in an online social network is provided, and the system includes:

[0114] An acquisition module 10 is used to acquire a social network subgraph and initialize a local community set and a neighborhood set of the social network subgraph, wherein both the local community set and the neighborhood set are non-empty sets;

[0115] An adding module 20, used to add a seed vertex to the local community set, and add the neighbor nodes of the seed to the neighborhood set;

[0116] A value-added module 30, for looping through neighbor nodes in the domain set, calculating similarity indices between the neighbor nodes and vertices of the local community set using an index formula, and searching for value-added nodes in the neighborhood set based on the similarity index using a search formula;

[0117] An isolation module 40, configured to input the value-added node into the local community set and calculate the compactness isolation value of the local community set using an isolation formula;

[0118] The confirmation module 50 is used to determine whether the compactness isolation value is less than a threshold value by using a judgment formula, and if the compactness isolation value is less than the threshold value, confirm the value-added node and input it into the local community set.

[0119] In some optional embodiments, the value-added module includes:

[0120] A first calculation unit is configured to select a first index formula based on the first algorithm to calculate a similarity index between the neighbor node and the vertex of the local community set, wherein the first index formula includes:

[0121]

[0122] φ(u, v, d) represents the vertex similarity, N u (d) N v (d) are the number of d-level neighbors of vertices u and v, respectively, where u and v are any two internal vertices in the local community set.

[0123] In some optional embodiments, the value-added module further includes:

[0124] A second calculation unit is configured to select a second index formula based on the second algorithm to obtain a similarity index between the neighbor node and the vertex of the local community set, wherein the second index formula includes:

[0125]

[0126] Among them, I(·) is an indicator function, defined as:

[0127]

[0128] The numerator is obtained by giving each common d-level neighbor x a weight To calculate the sum of the weighted values ​​of common d-level neighbors, where R u (j), R v (j) represent the level of x to u and v respectively.

[0129] In some optional embodiments, the value-added module further includes:

[0130] The third calculation unit is used for the search formula comprising:

[0131]

[0132] In the formula, a represents the value-added node, Φ(v, a, d) represents the similarity index, C represents the local community set, and N represents the neighborhood set.

[0133] In some optional embodiments, the isolation module further includes:

[0134] The fourth calculation unit is used for the isolation formula including:

[0135]

[0136] In the formula, It is expressed as the sum of the similarity indexes of the value-added node and the internal vertex v, It is expressed as the sum of the similarity index between the value-added node and the external vertex u, and ΔCI is expressed as the compactness isolation value.

[0137] In some optional embodiments, the system further comprises:

[0138] A re-module is used to delete the value-added node if the compactness isolation value is greater than a threshold, re-execute the step of looping through the neighbor nodes in the domain set, calculate the similarity index between the neighbor node and the vertices of the local community set using an index formula, and search for the value-added node in the neighborhood set based on the similarity index using a search formula.

[0139] The implementation principle and technical effects of the local community detection method system in an online social network provided in the embodiment of the present invention are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the system embodiment, reference can be made to the corresponding contents in the aforementioned method embodiment.

[0140] Embodiment 3

[0141] like Figure 3 As shown, in the third embodiment of the present invention, the embodiment of the present invention provides the following technical solution: a computer, comprising a memory 202, a processor 201, and a computer program stored in the memory 202 and executable on the processor 201, wherein the processor 201 implements the local community detection method in an online social network as described above when executing the computer program.

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

[0143] Among them, the memory 202 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 202 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 202 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 202 may be inside or outside a data processing device. In a specific embodiment, the memory 202 is a non-volatile memory. In a specific embodiment, the memory 202 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (ErasableProgrammable Read-Only Memory, EPROM for short), an electrically erasable PROM (Electrically ErasableProgrammable Read-Only Memory, EEPROM for short), an electrically alterable ROM (ElectricallyAlterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0144] The memory 202 may be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 201 .

[0145] The processor 201 implements the above-mentioned local community detection method in an online social network by reading and executing the computer program instructions stored in the memory 202 .

[0146] In some embodiments, the computer may further include a communication interface 203 and a bus 200. Figure 3 As shown, the processor 201, the memory 202, and the communication interface 203 are connected via a bus 200 and communicate with each other.

[0147] The communication interface 203 is used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication interface 203 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.

[0148] The bus 200 includes hardware, software or both, and couples the components of the computer to each other. The bus 200 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 200 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 200 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0149] Embodiment 4

[0150] In a fourth embodiment of the present invention, in combination with the above-mentioned local community detection method in an online social network, the embodiment of the present invention provides the following technical solution: a storage medium having a computer program stored thereon, and the computer program implements the above-mentioned local community detection method in an online social network when executed by a processor.

[0151] Those skilled in the art will appreciate that the logic and / or steps described in the flowchart as data or in other ways herein, for example, can be considered as a sequenced data table of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses.

[0152] More specific examples of computer-readable media (non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0153] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0154] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0155] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A local community detection method in an online social network, characterized in that: The method comprises: Acquire a social network subgraph, and initialize a local community set and a neighborhood set of the social network subgraph, wherein both the local community set and the neighborhood set are non-empty sets; Adding a seed vertex to the local community set, and adding the neighbor nodes of the seed to the neighborhood set; Looping through neighbor nodes in the domain set, calculating similarity indices between the neighbor nodes and vertices of the local community set using an index formula, and searching for value-added nodes in the neighborhood set based on the similarity index using a search formula; Inputting the value-added node into the local community set, and calculating the compactness isolation value of the local community set using an isolation formula; A judgment formula is used to judge whether the compactness isolation value is less than a threshold value. If the compactness isolation value is less than the threshold value, the value-added node is confirmed to be input into the local community set.

2. The local community detection method in online social network according to claim 1, characterized in that: The step of calculating the similarity index between the neighbor node and the vertex of the local community set by using the index formula includes: A first indicator formula is selected based on the first algorithm to obtain a similarity index between the neighbor node and the vertex of the local community set, wherein the first indicator formula includes: φ(u, v, d) represents the vertex similarity, N u (d) N v (d) are the number of d-level neighbors of vertices u and v, respectively, where u and v are any two internal vertices in the local community set.

3. The local community detection method in online social network according to claim 1, characterized in that: The step of calculating the similarity index between the neighbor node and the vertex of the local community set by using the index formula also includes: Based on the second algorithm, a second indicator formula is selected to obtain a similarity index between the neighbor node and the vertex of the local community set, wherein the second indicator formula includes: Among them, I(·) is an indicator function, defined as: The numerator is obtained by giving each common d-level neighbor x a weight To calculate the sum of the weighted values ​​of common d-level neighbors, where R u (j), R v (j) represent the level of x to u and v respectively.

4. The local community detection method in online social network according to claim 1, characterized in that: The search formula includes: In the formula, a represents the value-added node, Φ(v, a, d) represents the similarity index, C represents the local community set, and N represents the neighborhood set.

5. The local community detection method in online social network according to claim 1, characterized in that: The isolation formula includes: In the formula, It is expressed as the sum of the similarity indexes of the value-added node and the internal vertex v, It is expressed as the sum of the similarity index between the value-added node and the external vertex u, and ΔCI is expressed as the compactness isolation value.

6. The local community detection method in online social network according to claim 1, characterized in that: After the step of using a judgment formula to judge whether the compactness isolation value is less than a threshold, the method further includes: If the compactness isolation value is greater than a threshold, the value-added node is deleted, the loop traversing the neighbor nodes in the domain set is re-executed, the similarity index between the neighbor node and the vertices of the local community set is calculated using an index formula, and the value-added node in the neighborhood set is searched based on the similarity index using a search formula.

7. A local community detection method system in an online social network, the system comprising: An acquisition module, configured to acquire a social network subgraph, and initialize a local community set and a neighborhood set of the social network subgraph, wherein both the local community set and the neighborhood set are non-empty sets; A adding module, used for adding a seed vertex to the local community set, and adding the neighbor nodes of the seed to the neighborhood set; A value-added module, for looping through neighbor nodes in the domain set, calculating similarity indices between the neighbor nodes and vertices of the local community set using an index formula, and searching for value-added nodes in the neighborhood set based on the similarity index using a search formula; An isolation module, used for inputting the value-added node into the local community set, and calculating the compactness isolation value of the local community set using an isolation formula; The confirmation module is used to determine whether the compactness isolation value is less than a threshold value by using a judgment formula, and if the compactness isolation value is less than the threshold value, the value-added node is confirmed to be input into the local community set.

8. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for detecting a local community in an online social network according to any one of claims 1 to 6 is implemented.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the method for detecting a local community in an online social network according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Trajectory privacy protection method and system based on community division

    CN119538307A