Social network key group searching method, device and equipment and storage medium
By calculating group proximity in social networks based on encrypted private data on cloud servers, the problem of secure and efficient computing in distributed environments is solved, efficient search of key groups is achieved, and data privacy protection is enhanced.
Patent Information
- Application Number
- CN202510300627.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-04-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In social network analysis, it is difficult for the prior art to safely and efficiently calculate group proximity centrality in a distributed environment, especially in scenarios where data privacy and independence are high.
By creating a social graph based on encrypted private data on a cloud server, the shortest path information and proximity centering of nodes is calculated, and secret sharing technology and Dijkstra algorithm are used to achieve searches for key groups.
It improves the security of private data of data providers, avoids the risk of privacy data breaches, ensures the security and reliability of the entire search process, and improves the efficiency of searching for key groups.
Smart Images

Figure CN119830349A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of social network analysis, and in particular to a method, device, equipment and storage medium for searching key groups in a social network. Background Art
[0002] As a widely-watched research field, social networks have become a hot topic in academia and industry after decades of in-depth research. Centrality, as a core indicator to measure the importance of individuals in a network, plays a key role in social network analysis. How to efficiently find a group of key entities in a network is a key issue in the process of in-depth exploration of the structure of social networks and their dynamic evolution.
[0003] Currently, in social network analysis, group proximity centrality (i.e., group proximity centrality) measures the global influence of a node group in the network. Its core lies in evaluating the distance and connection density between the group of nodes and other nodes in the network. By finding the node group with the largest group proximity centrality, it is possible to optimize the information propagation path, improve the system responsiveness, and identify strategically important node groups in complex networks. In practical applications, this analysis is widely used in areas such as information diffusion optimization in social media, node fault tolerance improvement in communication networks, and resource allocation optimization in smart city planning.
[0004] However, currently, when calculating the group proximity centrality of a specific node, a comprehensive understanding of the network topology is required, such as accessing and processing the node and edge information of the entire network, and considering all possible shortest paths between nodes. However, in actual scenarios, this process faces many challenges, because individuals or organizations often cannot obtain a global view of the network and can only access part of the network structure. In addition, network data is often distributed among multiple participants. Due to the need for data privacy protection, these data cannot be simply aggregated to calculate the centrality of nodes in the network. This is because traditional group proximity centrality solution methods are usually based on centralized computing models, rely on access to complete network data, lack consideration of the privacy and independence of data providers, and in actual scenarios, data between multiple participants cannot be easily integrated. Direct reliance on these data will lead to reduced analysis accuracy or difficulty in collaboration.
[0005] In summary, how to calculate the proximity centrality of a group through a secure and efficient computing method in a distributed environment has become a problem that needs to be further solved in the field of social network analysis. Summary of the invention
[0006] In view of this, the purpose of this application is to provide a method, device, equipment and storage medium for searching key groups in a social network, which can improve the security of the privacy data of the data provider and avoid the risk of privacy data being leaked, while ensuring the security and reliability of the entire search process and improving the efficiency of key group search. The specific scheme is as follows:
[0007] In a first aspect, the present application discloses a method for searching key groups in a social network, which is applied to a cloud server in a social network analysis system, comprising:
[0008] Creating a social graph based on encrypted private data sent by each data provider in the social network;
[0009] Calculating the shortest path lengths from any node in the social graph to each node in the social graph respectively, obtaining the shortest path information corresponding to each of the nodes, and calculating the node closeness centrality of the corresponding node based on all the shortest path information corresponding to each of the nodes;
[0010] Obtain the maximum value of all the current node proximity centralities, and save the target node corresponding to the maximum value into a preset set;
[0011] Compare in sequence whether each first shortest distance is greater than a second shortest distance; the first shortest distance is the shortest path length from each other node in the social graph except the target node to all nodes in the social graph; the second shortest distance is the shortest path length from the currently saved target node to all nodes in the social graph;
[0012] If the first shortest distance is greater than the second shortest distance, a target distance with the shortest distance is determined from the first shortest distances that are greater than the second shortest distance, and the node corresponding to the target distance is added to the preset set, and then the process is skipped to the step of obtaining the maximum value of the proximity centrality of all the nodes at present, until the number of all nodes in the preset set is equal to the preset number;
[0013] All nodes in the preset set are used as key groups in the social network.
[0014] Optionally, the creating a social graph based on the encrypted private data sent by each data provider in the social network includes:
[0015] Obtaining encrypted private data sent by each data provider in the social network; the private data includes a specific node set and a corresponding subgraph; the subgraph is an array consisting of the specific node set and the corresponding edge set;
[0016] A directed strongly connected graph is created based on the private data sent by all the data providers to obtain a social graph of the social network.
[0017] Optionally, respectively calculating the shortest path lengths from any node in the social graph to each node in the social graph to obtain the shortest path information corresponding to each of the nodes includes:
[0018] The Dijkstra algorithm is used to respectively calculate the shortest path lengths from any node in the social graph to each node in the social graph, and obtain the shortest path information corresponding to each of the nodes.
[0019] Optionally, after respectively calculating the shortest path lengths from any node in the social graph to each node in the social graph and obtaining the shortest path information corresponding to each of the nodes, the method further includes:
[0020] Record the shortest path information corresponding to all the nodes through a two-dimensional array;
[0021] Generating a matrix based on the two-dimensional array to obtain a distance matrix, and storing the distance matrix using an oblivious random access machine;
[0022] Accordingly, obtaining the maximum value of all the nodes currently approaching the centrality and saving the target node corresponding to the maximum value into a preset set includes:
[0023] The maximum value of all the current node proximity centralities is obtained from the inadvertent random access machine, and the target node corresponding to the maximum value is saved in a preset set.
[0024] The target node is optional, and after calculating the node proximity centrality of the corresponding any of the nodes based on all the shortest path information corresponding to each of the any of the nodes, it also includes:
[0025] The node proximity centrality of each of the nodes is saved in a preset array.
[0026] Optionally, the social network key group search method further includes:
[0027] If the first shortest distance is greater than the second shortest distance, updating the corresponding first shortest distance in the distance matrix based on the second shortest distance corresponding to the target node;
[0028] The closeness centrality of a new set obtained after each other node not added to the preset set is added to the preset set is calculated respectively relative to the social graph, the group closeness centrality corresponding to the corresponding node is obtained, and the group closeness centrality is saved in the preset array.
[0029] Optionally, after taking all nodes in the preset set as key groups in the social network, the method further includes:
[0030] Calculate the sum of the node proximity centralities corresponding to all nodes in the preset set to obtain a sum value;
[0031] The ratio of the preset number to the sum is calculated, and the ratio is used as the group proximity centrality value of the key group.
[0032] In a second aspect, the present application discloses a social network key group search device, which is applied to a cloud server in a social network analysis system, comprising:
[0033] A creation module, used to create a social graph based on encrypted private data sent by each data provider in the social network;
[0034] A calculation module, used to respectively calculate the shortest path length from any node in the social graph to each node in the social graph, obtain the shortest path information corresponding to each of the nodes, and calculate the node closeness centrality of the corresponding node based on all the shortest path information corresponding to each of the nodes;
[0035] An acquisition and saving module, used to acquire the maximum value of all the current node proximity centralities, and save the target node corresponding to the maximum value into a preset set;
[0036] A comparison module, used to compare in sequence whether each first shortest distance is greater than a second shortest distance; the first shortest distance is the shortest path length from each other node in the social graph except the target node to all nodes in the social graph; the second shortest distance is the shortest path length from the currently saved target node to all nodes in the social graph;
[0037] A jump module, configured to, if the first shortest distance is greater than the second shortest distance, determine a target distance with the shortest distance from the first shortest distances that are greater than the second shortest distance, add the node corresponding to the target distance to the preset set, and then jump to the step of obtaining the maximum value of the proximity centrality of all the nodes at present, until the number of all nodes in the preset set is equal to the preset number;
[0038] The key group determination module is used to take all nodes in the preset set as the key groups in the social network.
[0039] In a third aspect, the present application discloses an electronic device, comprising a processor and a memory; wherein the processor implements the aforementioned social network key group search method when executing a computer program stored in the memory.
[0040] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned social network key group search method is implemented.
[0041] It can be seen that the present application is applied to a cloud server in a social network analysis system, firstly creating a social graph based on the encrypted private data sent by each data provider in the social network, then respectively calculating the shortest path length from any node in the social graph to each node in the social graph, obtaining the shortest path information corresponding to each of the nodes, and calculating the node proximity centrality of the corresponding node based on all the shortest path information corresponding to each of the nodes, then obtaining the maximum value among all the current node proximity centralities, and saving the target node corresponding to the maximum value into a preset set, and then comparing in turn whether each first shortest distance is greater than the second shortest distance; wherein the first shortest distance is the target node in the social graph The shortest path length from each other node except the target node to all nodes in the social graph; the second shortest distance is the shortest path length from the currently saved target node to all nodes in the social graph; if the first shortest distance is greater than the second shortest distance, a target distance with the shortest distance is determined from the first shortest distances greater than the second shortest distance, and the node corresponding to the target distance is added to the preset set, and then the process is skipped to the step of obtaining the maximum value of the proximity centrality of all the nodes currently, until the number of all nodes in the preset set is equal to the preset number; finally, all nodes in the preset set are used as key groups in the social network. The present application implements social network key group search through a cloud server in a pre-created social network analysis system, and in the process of searching for key groups, the cloud server first creates a social graph based on the encrypted private data sent by each data provider in the social network, and then searches for the node with the maximum proximity centrality based on the shortest path length between any two nodes in the social graph and the proximity centrality of each node, so as to find a group of nodes that meet the preset number and have the maximum group proximity centrality, that is, the key group in the social network. The present application adopts secret sharing technology, and implements social network key group search through a cloud server and based on the encrypted private data sent by each data provider, which can enhance the data security of each data provider and protect the data privacy of each data provider. In addition, by searching for key groups through a cloud server instead of multiple data providers, the risk of privacy data leakage caused by all data being concentrated on a single device and directly sharing data between different data providers can be avoided, and the security and reliability of the entire search process can be ensured. In addition, the node with the maximum group proximity centrality is found by distance judgment, which has efficient computing performance, thereby improving the efficiency of key group search. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0043] Figure 1 A flow chart of a method for searching key groups in a social network disclosed in this application;
[0044] Figure 2 A flowchart of a specific social network key group search method disclosed in this application;
[0045] Figure 3 A flowchart of a specific social network key group search method disclosed in this application;
[0046] Figure 4 This is a schematic diagram of the structure of a key group search device for a social network disclosed in this application;
[0047] Figure 5 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0049] The present application embodiment discloses a method for searching key groups in a social network, which is applied to a cloud server in a social network analysis system. Figure 1 As shown, the method includes:
[0050] Step S11: creating a social graph based on the encrypted private data sent by each data provider in the social network.
[0051] It should be noted that the social network key group search method proposed in this application is applied to the cloud server in the social network analysis system, where the number of cloud servers can be multiple (for example, the social network analysis system includes 2 cloud servers), and multiple cloud servers can interact with each other, and each cloud server can receive the encrypted private data sent by the data provider. Figure 2As shown in FIG. 1 , the social network analysis system includes multiple data providers and two cloud servers, wherein the data provider can input its own private data in a privacy input manner, and split the private data into two parts, and then encrypt the two split private data, and send the two encrypted private data to the two cloud servers respectively, that is, the two cloud servers respectively hold a part of the private data of the data provider; then, the private data is split into multiple parts and sent to the two cloud servers, so as to collaboratively search for key groups in the social network through the two cloud servers. The above-mentioned secret sharing technology can ensure the data security of the entire search process, and avoid the risk of privacy data leakage caused by a single device mastering the private data of all data providers. In addition, the cloud server receives not the private data itself, but the encrypted private data, which further improves the data security of the entire search process and avoids the risk of privacy data leakage caused by direct contact with the original data. It should be pointed out that the cloud servers collaborate to search for key groups without leaking their own information, such as collaboratively calculating the maximum value of the group proximity centrality in the social network. By using multiple cloud servers instead of a single cloud server to search for key groups in a collaborative manner, we can avoid the risk of privacy data leakage caused by all data being concentrated on a single device and directly sharing data between different data providers, while ensuring the security and reliability of the entire search process.
[0052] In a specific application scenario, all participants (such as Figure 2 Multiple data providers and 2 cloud servers in the network can satisfy the Secure Multi-Party Computation (MPC) scenario of the semi-honest model. That is, all participants abide by the preset protocol (such as the secret sharing protocol used in the key group search process of the social network proposed in this application) and correctly perform the computing task (referring to the calculation process of the group approaching the maximum centrality), but may try to steal more information from it without violating the protocol. In this model, all parties will perform calculations and communications in accordance with the provisions of the protocol, but may analyze the privacy data to obtain additional information besides the protocol output. Based on security requirements, it is necessary to ensure that even if the participants are semi-honest, their personal privacy and protocol outputs remain confidential and are not leaked.
[0053] In another specific application scenario, it can be a secure multi-party computing scenario with an honest majority and non-collusion model. In this scenario, at most one participant may have the intention to confront, but they will also follow the established protocol rules and will not collude with each other to cheat.
[0054] In addition, during the entire social network key group search process, it is necessary to ensure that all sensitive data and its calculation results are only processed in a secure environment, and ultimately only authorized participants (such as data providers) can access the calculation results (such as the group is close to the maximum centrality), so that the entire group search process can not only protect individual data privacy, such as ensuring that the data provider does not leak the original data, but also effectively complete the search task of key groups in social networks.
[0055] In this embodiment, after receiving the encrypted private data sent by the data provider, each cloud server may create a social graph based on the encrypted private data sent by all data providers in the social network.
[0056] Specifically, the creation of a social graph based on the encrypted private data sent by each data provider in the social network may include: obtaining the encrypted private data sent by each data provider in the social network; the private data includes a specific node set and a corresponding subgraph; the subgraph is an array consisting of the specific node set and the corresponding edge set; creating a directed strongly connected graph based on the private data sent by all the data providers to obtain the social graph of the social network. For example, there are n data providers (respectively ) and two cloud servers, and n data providers jointly maintain a social graph , where each data provider Holds a specific node set V and its corresponding subgraph The private data of the data provider is encrypted, and the node set V is public, but the edge set E is dispersedly held by all data providers. This data holding method effectively protects the privacy information of each data provider. When the cloud server receives the encrypted private data sent by the data provider, it can create a directed strongly connected graph based on the private data sent by all data providers, that is, the social graph of the social network. Among them, there is a bidirectional path between any two nodes in the strongly connected graph, that is, each node can reach other nodes in some way, and can also return from other nodes.
[0057] It is important to point out that a social graph Through a pair of arrays To represent. Among them, The array is a node-organized neighbor list containing a series of triplets. When there are N nodes in the social graph and the nodes are numbered from 0 to N-1, The array is arranged in node order, first storing all neighbor nodes of node 0, then neighbor nodes of node 1, and so on. In addition, each neighbor node also contains a flag to indicate whether it is the last neighbor node of the current node. If a node v does not have any neighbor nodes, add an edge to itself in its neighbor list and set the distance of the edge to 0.
[0058] in addition, The array is used to store each node in The index of the first neighbor node in the array, whose length is For the node , Indicates that node v is in The first neighbor node in the array is .
[0059] Step S12: respectively calculating the shortest path lengths from any node in the social graph to each node in the social graph, obtaining the shortest path information corresponding to each of the nodes, and calculating the node closeness centrality of the corresponding node based on all the shortest path information corresponding to each of the nodes.
[0060] In this embodiment, after a social graph is created based on the encrypted private data sent by each data provider in the social network, the shortest path length from any node in the social graph to each node in the social graph is further calculated to obtain the shortest path information corresponding to each of the nodes, and then the node closeness centrality (i.e., Closeness Centrality) of the corresponding node is calculated based on all the shortest path information corresponding to each of the nodes. Among them, the node closeness centrality measures the distance between a node and all other points in the network. The greater the closeness centrality of a point, the higher the possibility that the point is not affected by other points, and the more likely the point is to be the core point of the network. Specifically, the closeness centrality of a single node u is the reciprocal of the average shortest path length from node u to all other nodes in the social graph.
[0061] Specifically, the shortest path length can be calculated using algorithms such as Floyd (an algorithm for solving the shortest path between any two points), Dijkstra (a classic method for solving the shortest path problem in a graph), and SPFA (Shortest Path Faster Algorithm).
[0062] Furthermore, after respectively calculating the shortest path length from any node in the social graph to each node in the social graph and obtaining the shortest path information corresponding to each of the nodes, the method may further include: recording the shortest path information corresponding to all of the nodes through a two-dimensional array; generating a matrix based on the two-dimensional array to obtain a distance matrix, and storing the distance matrix using an oblivious random access machine. In this embodiment, after obtaining the shortest path information corresponding to each of the nodes, the shortest path information corresponding to all of the nodes may be stored through a two-dimensional array, and then the two-dimensional array may be represented by a matrix to obtain a distance matrix M, wherein any element M[i][j] in the distance matrix M represents the shortest distance from node i to node j. In addition, in order to hide the access to the distance matrix M so that the attacker cannot distinguish whether each access is real or random, an oblivious random access machine (ORAM) may be used to store the distance matrix M.
[0063] It should be pointed out that each data provider only shares the number of nodes and edges of the social graph, while the calculated shortest path information remains completely confidential. In addition, when calculating the node proximity centrality of any node, the division rule in the secret sharing protocol is used. This step requires interaction between the two cloud servers to complete the division operation. Specifically, the two cloud servers first generate a random number (used to blind the private data of the cloud server itself) and share it secretly, then hide their own private data through mask calculation, and then collaborate to calculate the masked division result, and finally obtain the final result (that is, the result obtained by the division operation) through the unmasking operation. In this way, the calculation of node proximity centrality can be completed without leaking the private data of the cloud server itself.
[0064] In addition, after calculating the node proximity centrality of the corresponding any node based on all the shortest path information corresponding to each of the any nodes, the method may further include: saving the node proximity centrality of each of the any nodes into a preset array. In this embodiment, after obtaining the shortest path information corresponding to each of the any nodes, the node proximity centrality of each of the any nodes may be saved into a preset array. <score>middle.
[0065] Step S13: Obtain the maximum value of all the current node proximity centralities, and save the target node corresponding to the maximum value into a preset set.
[0066] In this embodiment, the maximum value of the proximity centrality of all current nodes can be obtained from the above-mentioned inadvertent random access machine, and then the target node v corresponding to the current maximum value is saved in the preset set S.
[0067] It should be pointed out that this solution is based on the greedy idea when searching for key groups (i.e., calculating a group of nodes with the largest group proximity centrality). This idea uses the largest node proximity centrality as the selection criterion for the current optimal node in each selection step, and then finds a group of nodes with the largest group proximity centrality after multiple iterations. Specifically, a preset set S can be used to record the optimal nodes selected in each iteration, and the distance matrix M is updated during the iteration process to record when a node u is added to S, the set S to other nodes on the social graph The shortest distance The value of .
[0068] In addition, in each iteration, a node v is selected from the social graph V, which is the node close to the centrality value of the group that provides the maximum gain, and is added to the set S; then, the shortest distance from the set S to other nodes w on the social graph is calculated, and it is determined whether the current shortest distance is the shortest. If it is the shortest, the distance matrix M and the preset array <score>That is, by comparing the distance between the node u not in the set S and all the nodes w in the social graph, whether it is greater than the distance between the node u and all the nodes w newly added to the set in this round. The distance information in the distance matrix M is updated by the distance from the node v to all nodes w in the social graph.
[0069] Step S14: Compare in turn whether each first shortest distance is greater than a second shortest distance; the first shortest distance is the shortest path length from each other node in the social graph except the target node to all nodes in the social graph; the second shortest distance is the shortest path length from the currently saved target node to all nodes in the social graph.
[0070] In this embodiment, after the target node v corresponding to the maximum value is saved in a preset set, the shortest path lengths (i.e., the first shortest distance, ), is it greater than the shortest path length from the target node v to all other nodes w in the social graph saved in this round of iteration (i.e., the second shortest distance, ), that is, to determine whether It should be pointed out that due to the existence of multiple And the target node v is associated with other nodes u, so when making a judgment, we can first fix node u and then traverse all nodes w in the social graph, where .
[0071] It should be pointed out that the data in the distance matrix M is Figure 2 The two cloud servers in the ,are in the form of secret sharing, and allow the two servers to ,collaborate and compare two values without revealing the secret shares they hold ,(i.e. and ) size. Both parties can first and The secrets are distributed in the form of additive secret sharing, and then collaboratively computed using secure computing protocols (such as methods based on garbled circuits or additive masks). The sign bit of Is it greater than .
[0072] Step S15: If the first shortest distance is greater than the second shortest distance, determine the shortest target distance from the first shortest distance that is greater than the second shortest distance, and add the node corresponding to the target distance to the preset set, and then jump to the step of obtaining the maximum value of the proximity centrality of all the current nodes until the number of all nodes in the preset set is equal to the preset number.
[0073] In this embodiment, if the first shortest distance is greater than the second shortest distance, that is, , the shortest target distance can be determined from all the first shortest distances that are greater than the second shortest distance, and the nodes corresponding to the target distance are added to the preset set S, and then the step of obtaining the maximum value of the proximity centrality of all the current nodes is jumped to continue the search for key nodes, and the above steps are repeated until the number of all nodes in the preset set S is equal to the preset number k.
[0074] In this embodiment, during the key group search, if the first shortest distance is greater than the second shortest distance, the corresponding first shortest distance in the distance matrix is updated based on the second shortest distance corresponding to the target node; the proximity centrality of the new set obtained after each other node not included in the preset set is added to the preset set relative to the social graph is calculated, the group proximity centrality corresponding to the corresponding node is obtained, and the group proximity centrality is saved in the preset array. That is, when When the target node v corresponds to For the corresponding Update and add each node u except the target node v to the preset set S to obtain multiple updated sets S', and then calculate each updated set S' to the social graph The closeness centrality of other nodes except the nodes in the updated set S' is obtained, and the group closeness centrality corresponding to each updated set S' (the set containing node u) is obtained, and each group closeness centrality is saved to the preset array <score>For example, when When , the elements in the distance matrix M are updated, specifically, the elements in the distance matrix M are updated. The element is updated to , and for all nodes u that are not added to the set S, calculate the group centrality value that each node u can obtain after joining S, and save the results to the preset array The corresponding position of the array, so that in the next iteration, the updated distance matrix M and the preset array can be used Array search key for nodes in the group.
[0075] Step S16: taking all nodes in the preset set as key groups in the social network.
[0076] In this embodiment, after obtaining a preset set S with k nodes, all nodes in the preset set S are directly used as a social network, that is, a social graph. key groups in the.
[0077] It can be seen that the embodiment of the present application is applied to the cloud server in the social network analysis system, firstly creates a social graph based on the encrypted private data sent by each data provider in the social network, then respectively calculates the shortest path length from any node in the social graph to each node in the social graph, obtains the shortest path information corresponding to each of the nodes, and calculates the node proximity centrality of the corresponding node based on all the shortest path information corresponding to each of the nodes, then obtains the maximum value of all the current node proximity centralities, and saves the target node corresponding to the maximum value into a preset set, and then compares in turn whether each first shortest distance is greater than the second shortest distance; wherein the first shortest distance is the target node in the social graph The shortest path length from each node other than the target node to all nodes in the social graph; the second shortest distance is the shortest path length from the target node to all nodes in the social graph that is currently saved; if the first shortest distance is greater than the second shortest distance, a target distance with the shortest distance is determined from the first shortest distances that are greater than the second shortest distance, and the node corresponding to the target distance is added to the preset set, and then the process is skipped to the step of obtaining the maximum value of the proximity centrality of all the nodes currently, until the number of all nodes in the preset set is equal to the preset number; finally, all nodes in the preset set are used as key groups in the social network. The embodiment of the present application implements the search for key groups in a social network through a cloud server in a pre-created social network analysis system. In the process of searching for key groups, the cloud server first creates a social graph based on the encrypted private data sent by each data provider in the social network, and then searches for the node with the maximum proximity centrality based on the shortest path length between any two nodes in the social graph and the proximity centrality of each node, thereby finding a group of nodes that meet a preset number and have the maximum group proximity centrality, that is, the key group in the social network. The embodiment of the present application adopts secret sharing technology, and implements the search for key groups in a social network through a cloud server and based on the encrypted private data sent by each data provider, which can enhance the data security of each data provider and protect the data privacy of each data provider. In addition, by searching for key groups through a cloud server instead of multiple data providers, the risk of privacy data leakage caused by all data being concentrated on a single device and directly sharing data between different data providers can be avoided, and the security and reliability of the entire search process can be ensured. In addition, the node with the maximum group proximity centrality is found by distance judgment, which has efficient computing performance, thereby improving the efficiency of key group search.
[0078] The present application embodiment discloses a specific social network key group search method, which is applied to a cloud server in a social network analysis system. Figure 3 As shown, the method includes:
[0079] Step S21: creating a social graph based on the encrypted private data sent by each data provider in the social network.
[0080] Step S22: using the Dijkstra algorithm to respectively calculate the shortest path length from any node in the social graph to each node in the social graph, obtain the shortest path information corresponding to each of the nodes, and calculate the node closeness centrality of the corresponding node based on all the shortest path information corresponding to each of the nodes.
[0081] Step S23: Obtain the maximum value of all the current node proximity centralities, and save the target node corresponding to the maximum value into a preset set.
[0082] Step S24: comparing in sequence whether each first shortest distance is greater than a second shortest distance; the first shortest distance is the shortest path length from each other node in the social graph except the target node to all nodes in the social graph; the second shortest distance is the shortest path length from the currently saved target node to all nodes in the social graph.
[0083] Step S25: If the first shortest distance is greater than the second shortest distance, determine the shortest target distance from the first shortest distance that is greater than the second shortest distance, and add the node corresponding to the target distance to the preset set, and then jump to the step of obtaining the maximum value of the proximity centrality of all the current nodes until the number of all nodes in the preset set is equal to the preset number.
[0084] Step S26: taking all nodes in the preset set as key groups in the social network.
[0085] Step S27: Calculate the sum of the node proximity centralities corresponding to all nodes in the preset set to obtain a sum value.
[0086] In this embodiment, after obtaining the key group in the social network based on the nodes in the preset set S, the group proximity centrality value of the key group can be calculated. Specifically, the sum of the node proximity centralities corresponding to all nodes v in the preset set S can be calculated first to obtain the sum value.
[0087] Step S28: Calculate the ratio of the preset number to the sum value, and use the ratio as the group proximity centrality value of the key group.
[0088] Next, the ratio of the preset number k to the sum value is calculated, and the ratio is used as the group proximity centrality value of the key group.
[0089] Among them, the maximum group closeness centrality value can be expressed as:
[0090] ;
[0091] in, ; represents the shortest path length from set S to node v; , k is a positive integer, is the optimal seed set, that is, the set of nodes with the highest group proximity centrality, and n is the number of current nodes in the set S; represents the value of the group proximity centrality of the set S; argmax is a maximum function, that is, for multiple , find the largest value, and returns the set S with the maximum group closeness centrality as the result.
[0092] It should be pointed out that The larger the value of means that the set S is more in the center of the social graph, and it can be used as a seed node to produce better propagation effect.
[0093] Furthermore, the group proximity centrality values of key groups can also be fed back to relevant data providers, but before the feedback, the identity and authority of the data provider need to be verified. Only the data provider who has passed the verification and has the authority can obtain the group proximity centrality values of key groups.
[0094] For more specific processing procedures of the above steps S21 to S26, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be described in detail here.
[0095] It can be seen that the embodiment of the present application uses secure multi-party computing and secret sharing technology, and calculates the group proximity centrality value of key groups in the social network through the cloud server in the pre-created social network analysis system, which can ensure the security of the privacy data of all parties and realize the maximum group proximity centrality calculation without exposing the original data content of each party, so that multiple data providers can complete the search task of key groups while maintaining data localization. In addition, encryption technology can protect data access, support multi-party collaboration, and ensure security, while adapting to changes in social networks; furthermore, using the Dijkstra algorithm to calculate the shortest path length from any node in the social graph to each node in the social graph, the group proximity centrality value can be efficiently calculated while reducing storage overhead; in addition, it breaks through the limitations of traditional privacy protection computing and provides technical support for the implementation of complex network analysis.
[0096] Accordingly, the present application also discloses a social network key group search device, which is applied to a cloud server in a social network analysis system, see Figure 4 As shown, the device comprises:
[0097] A creation module 11, used to create a social graph based on encrypted private data sent by each data provider in the social network;
[0098] A calculation module 12, configured to respectively calculate the shortest path length from any node in the social graph to each node in the social graph, obtain the shortest path information corresponding to each of the nodes, and calculate the node proximity centrality of the corresponding node based on all the shortest path information corresponding to each of the nodes;
[0099] The acquisition and storage module 13 is used to acquire the maximum value of all the node proximity centralities at present, and save the target node corresponding to the maximum value into a preset set;
[0100] A comparison module 14 is used to compare in sequence whether each first shortest distance is greater than a second shortest distance; the first shortest distance is the shortest path length from each other node in the social graph except the target node to all nodes in the social graph; the second shortest distance is the shortest path length from the currently saved target node to all nodes in the social graph;
[0101] A jump module 15 is used for determining the shortest target distance from the first shortest distances that are greater than the second shortest distance if the first shortest distance is greater than the second shortest distance, and adding the node corresponding to the target distance to the preset set, and then jumping to the step of obtaining the maximum value of the proximity centrality of all the nodes at present, until the number of all nodes in the preset set is equal to the preset number;
[0102] The key group determination module 16 is configured to take all nodes in the preset set as key groups in the social network.
[0103] Among them, the specific working processes of the above-mentioned modules can refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0104] It can be seen that the embodiment of the present application is applied to the cloud server in the social network analysis system, firstly creates a social graph based on the encrypted private data sent by each data provider in the social network, then respectively calculates the shortest path length from any node in the social graph to each node in the social graph, obtains the shortest path information corresponding to each of the nodes, and calculates the node proximity centrality of the corresponding node based on all the shortest path information corresponding to each of the nodes, then obtains the maximum value of all the current node proximity centralities, and saves the target node corresponding to the maximum value into a preset set, and then compares in turn whether each first shortest distance is greater than the second shortest distance; wherein the first shortest distance is the target node in the social graph The shortest path length from each node other than the target node to all nodes in the social graph; the second shortest distance is the shortest path length from the target node to all nodes in the social graph that is currently saved; if the first shortest distance is greater than the second shortest distance, a target distance with the shortest distance is determined from the first shortest distances that are greater than the second shortest distance, and the node corresponding to the target distance is added to the preset set, and then the process is skipped to the step of obtaining the maximum value of the proximity centrality of all the nodes currently, until the number of all nodes in the preset set is equal to the preset number; finally, all nodes in the preset set are used as key groups in the social network. The embodiment of the present application implements the search for key groups in a social network through a cloud server in a pre-created social network analysis system. In the process of searching for key groups, the cloud server first creates a social graph based on the encrypted private data sent by each data provider in the social network, and then searches for the node with the maximum proximity centrality based on the shortest path length between any two nodes in the social graph and the proximity centrality of each node, thereby finding a group of nodes that meet a preset number and have the maximum group proximity centrality, that is, the key group in the social network. The embodiment of the present application adopts secret sharing technology, and implements the search for key groups in a social network through a cloud server and based on the encrypted private data sent by each data provider, which can enhance the data security of each data provider and protect the data privacy of each data provider. In addition, by searching for key groups through a cloud server instead of multiple data providers, the risk of privacy data leakage caused by all data being concentrated on a single device and directly sharing data between different data providers can be avoided, and the security and reliability of the entire search process can be ensured. In addition, the node with the maximum group proximity centrality is found by distance judgment, which has efficient computing performance, thereby improving the efficiency of key group search.
[0105] In some specific embodiments, the creation module 11 may specifically include:
[0106] A data acquisition unit, used to acquire encrypted private data sent by each data provider in the social network; the private data includes a specific node set and a corresponding subgraph; the subgraph is an array consisting of the specific node set and the corresponding edge set;
[0107] A social graph creation unit is used to create a directed strongly connected graph based on the private data sent by all the data providers to obtain a social graph of the social network.
[0108] In some specific embodiments, the calculation module 12 may specifically include:
[0109] The first calculation unit is used to calculate the shortest path length from any node in the social graph to each node in the social graph by using the Dijkstra algorithm to obtain the shortest path information corresponding to each of the nodes.
[0110] In some specific embodiments, after the calculation module 12, the following may also be included:
[0111] A recording unit, used for recording the shortest path information corresponding to all the nodes through a two-dimensional array;
[0112] A matrix generation and storage unit, used for obtaining a distance matrix based on the two-dimensional array generation matrix, and storing the distance matrix using an oblivious random access machine;
[0113] Accordingly, the acquisition and storage module 13 may specifically include:
[0114] A first maximum value acquisition unit, used for acquiring the maximum value of all the current node proximity centralities from the oblivious random access machine;
[0115] The target node saving unit is used to save the target node corresponding to the maximum value into a preset set.
[0116] In some specific embodiments, after the calculation module 12, the target node may further include:
[0117] The second saving unit is used to save the node proximity centrality of each of the nodes into a preset array.
[0118] In some specific embodiments, the social network key group search method may further include:
[0119] an updating unit, configured to update the corresponding first shortest distance in the distance matrix based on the second shortest distance corresponding to the target node if the first shortest distance is greater than the second shortest distance;
[0120] A second calculation unit is used to respectively calculate the closeness centrality of a new set obtained after each other node not added to the preset set is added to the preset set relative to the social graph, and obtain the group closeness centrality corresponding to the corresponding node;
[0121] The third storage unit is used to store the group proximity centrality into the preset array.
[0122] In some specific embodiments, after the key group determination module 16, the following may also be included:
[0123] A third calculation unit is used to calculate the sum of the node proximity centrality corresponding to all nodes in the preset set to obtain a sum value;
[0124] The fourth calculation unit is used to calculate the ratio of the preset number to the sum value, and use the ratio as the group proximity centrality value of the key group.
[0125] Furthermore, the present application also discloses an electronic device. Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0126] Figure 5 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the social network key group search method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0127] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0128] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0129] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, and may be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the social network key group search method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 may further include a computer program that can be used to complete other specific tasks.
[0130] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed method for searching key groups in a social network. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.
[0131] Furthermore, an embodiment of the present application also discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the social network key group search method disclosed above.
[0132] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0133] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0134] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0135] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0136] The above is a detailed introduction to a social network key group search method, device, equipment and storage medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.< / score> < / score> < / score>
Claims
1. A method for searching key groups in a social network, characterized in that: The cloud server used in the social network analysis system includes: Creating a social graph based on encrypted private data sent by each data provider in the social network; Calculating the shortest path lengths from any node in the social graph to each node in the social graph respectively, obtaining the shortest path information corresponding to each of the nodes, and calculating the node closeness centrality of the corresponding node based on all the shortest path information corresponding to each of the nodes; Obtain the maximum value of all the current node proximity centralities, and save the target node corresponding to the maximum value into a preset set; Compare in sequence whether each first shortest distance is greater than a second shortest distance; the first shortest distance is the shortest path length from each other node in the social graph except the target node to all nodes in the social graph; the second shortest distance is the shortest path length from the currently saved target node to all nodes in the social graph; If the first shortest distance is greater than the second shortest distance, a target distance with the shortest distance is determined from the first shortest distances that are greater than the second shortest distance, and the node corresponding to the target distance is added to the preset set, and then the process is skipped to the step of obtaining the maximum value of the proximity centrality of all the nodes at present, until the number of all nodes in the preset set is equal to the preset number; All nodes in the preset set are used as key groups in the social network.
2. The method for searching key groups in a social network according to claim 1, characterized in that: The step of creating a social graph based on encrypted private data sent by each data provider in the social network includes: Obtaining encrypted private data sent by each data provider in the social network; the private data includes a specific node set and a corresponding subgraph; the subgraph is an array consisting of the specific node set and the corresponding edge set; A directed strongly connected graph is created based on the private data sent by all the data providers to obtain a social graph of the social network.
3. The method for searching key groups in a social network according to claim 1, characterized in that: The step of respectively calculating the shortest path lengths from any node in the social graph to each node in the social graph to obtain the shortest path information corresponding to each of the nodes includes: The Dijkstra algorithm is used to respectively calculate the shortest path lengths from any node in the social graph to each node in the social graph, and obtain the shortest path information corresponding to each of the nodes.
4. The method for searching key groups in a social network according to claim 1, characterized in that: After respectively calculating the shortest path lengths from any node in the social graph to each node in the social graph and obtaining the shortest path information corresponding to each of the nodes, the method further includes: Record the shortest path information corresponding to all the nodes through a two-dimensional array; Generating a matrix based on the two-dimensional array to obtain a distance matrix, and storing the distance matrix using an oblivious random access machine; Accordingly, obtaining the maximum value of all the nodes currently approaching the centrality and saving the target node corresponding to the maximum value into a preset set includes: The maximum value of all the current node proximity centralities is obtained from the inadvertent random access machine, and the target node corresponding to the maximum value is saved in a preset set.
5. The method for searching key groups in a social network according to claim 4, characterized in that: After calculating the node proximity centrality of the corresponding any node based on all the shortest path information corresponding to each of the any nodes, the method further includes: The node proximity centrality of each of the nodes is saved in a preset array.
6. The method for searching key groups in a social network according to claim 5, characterized in that: Also includes: If the first shortest distance is greater than the second shortest distance, updating the corresponding first shortest distance in the distance matrix based on the second shortest distance corresponding to the target node; The closeness centrality of a new set obtained after each other node not added to the preset set is added to the preset set is calculated respectively relative to the social graph, the group closeness centrality corresponding to the corresponding node is obtained, and the group closeness centrality is saved in the preset array.
7. The method for searching key groups in a social network according to any one of claims 1 to 6, characterized in that: After taking all nodes in the preset set as key groups in the social network, the method further includes: Calculate the sum of the node proximity centralities corresponding to all nodes in the preset set to obtain a sum value; The ratio of the preset number to the sum is calculated, and the ratio is used as the group proximity centrality value of the key group.
8. A device for searching key groups in a social network, characterized in that: The cloud server used in the social network analysis system includes: A creation module, used to create a social graph based on encrypted private data sent by each data provider in the social network; A calculation module, used to respectively calculate the shortest path length from any node in the social graph to each node in the social graph, obtain the shortest path information corresponding to each of the nodes, and calculate the node closeness centrality of the corresponding node based on all the shortest path information corresponding to each of the nodes; An acquisition and saving module, used to acquire the maximum value of all the current node proximity centralities, and save the target node corresponding to the maximum value into a preset set; A comparison module, used to compare in sequence whether each first shortest distance is greater than a second shortest distance; the first shortest distance is the shortest path length from each other node in the social graph except the target node to all nodes in the social graph; the second shortest distance is the shortest path length from the currently saved target node to all nodes in the social graph; A jump module, configured to, if the first shortest distance is greater than the second shortest distance, determine a target distance with the shortest distance from the first shortest distances that are greater than the second shortest distance, add the node corresponding to the target distance to the preset set, and then jump to the step of obtaining the maximum value of the proximity centrality of all the nodes at present, until the number of all nodes in the preset set is equal to the preset number; The key group determination module is used to take all nodes in the preset set as the key groups in the social network.
9. An electronic device, characterized in that: The method comprises a processor and a memory; wherein, when the processor executes the computer program stored in the memory, the method for searching key groups in a social network as claimed in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the social network key group search method according to any one of claims 1 to 7 is implemented.