Differential privacy synthetic social graph generation method and device based on node similarity

By performing noise-added constraint inference on the node degree sequence and similarity matrix of the real social graph, differential privacy synthetic social graphs are generated, which solves the problem of insufficient privacy protection and availability in the existing technology, and achieves high privacy protection and high accuracy Social graph synthesis.

CN118504029BActive Publication Date: 2024-11-15CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410700425.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-11-15
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

The existing differential privacy social graph synthesis method cannot take into account high privacy protection and high availability, especially in terms of node similarity protection.

Method used

By obtaining the node degree sequence and similarity matrix of the real social graph, two noise constraint inferences are performed to generate differential privacy synthetic social graphs to ensure the privacy protection of node degree and similarity, while retaining the information characteristics of the real graph.

Benefits of technology

It improves the degree of privacy protection and the availability and accuracy of composite graphs, and is suitable for central differential privacy and local differential privacy scenarios, enhancing the accuracy of retention and analysis of real social graph information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118504029B_ABST
    Figure CN118504029B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for generating a differentially private synthetic social graph based on node similarity. The method comprises: obtaining a node degree sequence based on a real social graph, performing a first noise-added constraint reasoning on the node degree sequence to obtain an inferred node degree sequence; calculating the similarity between nodes in the real social graph to obtain a similarity matrix, performing a second noise-added constraint reasoning on the similarity matrix to obtain an inferred similarity matrix; and generating a differentially private synthetic social graph according to the inferred node degree sequence and the inferred similarity matrix. The present invention has the characteristics of high privacy protection, wide applicability, high availability, high accuracy and high computational efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of social privacy security protection, and in particular to a method and device for generating a differentially private synthetic social graph based on node similarity. Background Art

[0002] Social networks can be represented by graphs, forming social graphs, where each person or entity is a node and edges represent the relationships between people. Through graph algorithms, tasks such as community detection, influence analysis, and recommendation systems can be performed.

[0003] In some cases, some social networks may be private or restricted. Usually, based on the real social graph, a graph with similar network characteristics as the real social graph is synthesized, allowing researchers to simulate and analyze on the synthetic social graph without real data. For example, real social media data may involve users' personal information and social relationships, which require privacy protection. By synthesizing social network graph data, researchers can analyze and mine the interactions and information dissemination between users in the social media field while protecting user privacy.

[0004] However, synthetic social graph data may indirectly expose the privacy of users in some cases. Attackers can combine synthetic social graph data with other public information or external data sources to reorganize and infer information, thereby identifying the identity and relationship of real users. Therefore, with the increase in attacker computing power and various attacks based on background knowledge, early privacy protection methods such as anonymization and data desensitization can no longer effectively protect the privacy information in synthetic social graph data. In order to improve the level of privacy protection, differential privacy is used to generate synthetic social graph data. Differential privacy is a technology that analyzes and shares data while protecting personal privacy. In differential privacy, by adding a certain amount of noise, attackers cannot infer what the sensitive information of an individual is. However, the added noise may cause the deviation and inaccuracy of data analysis results, that is, the synthetic social graph has poor usability.

[0005] Some existing differentially private social graph synthesis methods attempt to retain more information about the real social graph during the synthesis process. For example, the DP-FT method attempts to retain the similarity between nodes, but it does not protect the privacy of the similarity between nodes, and the privacy protection level is insufficient; another example is the TriCL method, which attempts to retain the number of triangles in the real social graph, but the number of triangles is highly sensitive, resulting in low usability and can only run in a central differential privacy environment. Summary of the invention

[0006] The present invention aims to solve the technical problem that the existing differential privacy social graph synthesis method cannot take into account both high privacy protection level and high availability, and provides a differential privacy synthetic social graph generation method and device based on node similarity.

[0007] In order to achieve the above-mentioned purpose of the present invention, according to the first aspect of the present invention, the present invention provides a method for generating a differentially private synthetic social graph based on node similarity, including: obtaining a node degree sequence based on a real social graph, performing a first noisy constrained reasoning on the node degree sequence to obtain an inferred node degree sequence; calculating the similarity between nodes in the real social graph to obtain a similarity matrix, performing a second noisy constrained reasoning on the similarity matrix to obtain an inferred similarity matrix; and generating a differentially private synthetic social graph based on the inferred node degree sequence and the inferred similarity matrix.

[0008] Further preferably, the performing of a first noise-constrained reasoning on the node degree sequence to obtain an inferred node degree sequence comprises: arranging the node degrees in the node degree sequence in non-descending order to obtain the first node degree sequence; adding noise to each node degree in the first node degree sequence to obtain a noise node degree sequence; performing a first non-descending arrangement constraint on the noise node degree sequence to obtain an inferred node degree sequence, wherein the first non-descending arrangement constraint is to adjust the values ​​of the inferred node degrees in the inferred node degree sequence so that the inferred nodes in the inferred node degree sequence are arranged in non-descending order.

[0009] Further preferably, the calculating the similarity between nodes in the real social graph includes: when calculating the similarity between node i and node j in the real social graph: if node i and node j in the real social graph have no common neighbor nodes and are not directly connected, then the similarity between node i and node j is assigned to 0; otherwise, the similarity between node i and node j is calculated through the node degree, connection relationship and shortest path length of the common neighbor nodes of node i and node j.

[0010] Further preferably, the similarity S between node i and node j is calculated by the node degree, connection relationship and shortest path length of the common neighbor nodes of node i and node j according to the following formula: [i][j] :

[0011]

[0012] Where N(i) represents the set of neighbor nodes of node i; N(j) represents the set of neighbor nodes of node j; node u is the common neighbor of node i and node j; d u is the node degree of node u; a represents the connection relationship between node i and node j. When there is an edge between node i and node j, a=1; when there is no edge between node i and node j, a=0; L represents the shortest path length between node i and node j.

[0013] Further preferably, the performing a second noise-added constraint reasoning on the similarity matrix to obtain an inference similarity matrix includes: taking out similarities with non-repeating values ​​from the similarity matrix and arranging them in non-descending order to obtain a similarity list; adding noise to each similarity in the similarity list to obtain a noise similarity list; performing a second non-descending arrangement constraint on the noise similarity list to obtain an inference similarity list, wherein the second non-descending arrangement constraint is that the values ​​of the inference similarities in the inference similarity list are arranged in non-descending order; and replacing the corresponding similarities in the similarity matrix with the inference similarities in the inference similarity list to obtain an inference similarity matrix.

[0014] Further preferably, the generating of the differential privacy synthetic social graph according to the inference node degree sequence and the inference similarity matrix includes: initializing the node set of the differential privacy synthetic social graph to the node set of the real social graph, and initializing the edge set of the differential privacy synthetic social graph to the empty set; obtaining the starting node sequence by inference node degree sequence, wherein the nodes in the starting node sequence are sorted in non-ascending order according to the node degree; traversing the nodes of the starting node sequence from beginning to end to obtain the edge set of the differential privacy synthetic social graph, and performing each traversal: assuming the traversal node i′ at this time; adding the nodes with non-zero similarity to the node i′ to the candidate list of the node i′ according to the inference similarity matrix; calculating the edge generation probability of each node in the candidate list of the node i′ and the node i′, and generating a candidate edge according to the edge generation probability between the node i′ and each node in the candidate list of the node i′; and merging the generated candidate edges into the edge set of the differential privacy synthetic social graph. The differential privacy synthetic social graph is generated by the edge set and node set of the differential privacy synthetic social graph.

[0015] More preferably,

[0016] The calculation formula for the edge generation probability p(i′, j′) between node i′ and node j′ in the candidate list of node i′ is:

[0017]

[0018] in, represents the inference node degree of node i′ in the inference node degree sequence; represents the inference node degree of node j′ in the inference node degree sequence; represents the inference node degree of node z in the candidate list can(i′) of node i′ in the inference node degree sequence; M represents the total number of edges in the real social graph; represents the inference similarity between node i′ and node j′ in the inference similarity matrix; Represents the inference similarity between node i′ and node z in the inference similarity matrix; j′∈can(i′).

[0019] Further preferably, it also includes post-processing the generated differentially private synthetic social graph, and the post-processing includes: for each unconnected node g in the generated differentially private synthetic social graph, selecting a node k from the node set according to the selection probability, if the node degree of node k in the generated differentially private synthetic social graph is less than or equal to the inference node degree of node k in the inference node degree sequence, and the edge (g, k) is not in the generated differentially private synthetic social graph, then adding the edge (g, k) to the generated differentially private synthetic social graph.

[0020] In order to achieve the above-mentioned purpose of the present invention, according to the second aspect of the present invention, the present invention provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the steps of the method for generating a differentially private synthetic social graph based on node similarity described in the first aspect of the present invention are implemented.

[0021] In order to achieve the above-mentioned purpose of the present invention, according to the third aspect of the present invention, the present invention provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the differential privacy synthetic social graph generation method based on node similarity described in the first aspect of the present invention.

[0022] The beneficial technical effects of the present invention include:

[0023] High privacy protection: Differential privacy protection is performed on both the node degree and the similarity between nodes in the real social graph, so that the generated differential privacy synthetic social graph has a stronger privacy protection effect;

[0024] Wide applicability: This application can be used in both central differential privacy and local differential privacy scenarios, and has a wide range of application scenarios;

[0025] High availability and high accuracy: The social network synthetic graph is generated based on node degree and similarity between nodes. Compared with the existing degree-based graph generation method, the availability of the synthetic social graph is improved. The node degree sequence of the real social graph is subjected to the first noise-added constraint reasoning to obtain the inferred node degree information, so that the inferred node degree information retains more node degree distribution information. The similarity matrix of the real social graph is subjected to the second noise-added constraint reasoning to obtain the inferred node degree information, ensuring that the originally large node similarity is still large in the node similarity after noise addition, so that the probability of generating edges between nodes with a large probability of generating edges is still large after noise addition, making the differential privacy synthetic social graph more accurate and more available. In addition, in the process of synthetic graph generation, each node only tries to generate edges with nodes with non-zero similarity to the node, and divides the generation probability of nodes with zero similarity in the original CL model to nodes with non-zero similarity, which improves the probability of the synthetic graph retaining the edges of the real graph, so that the synthetic social graph retains more information and characteristics of the real social graph, further improving the availability and accuracy of the synthetic social graph.

[0026] High computational efficiency: When calculating the similarity between nodes, not only the common neighbor nodes between the nodes, but also the connection relationship and the shortest path length between the nodes are taken into consideration, so that the similarity reflects the characteristics of whether there is a direct edge between the nodes. In addition, only the similarity between the node and the neighbor nodes, and the neighbor nodes of the neighbor nodes is calculated, without traversing all nodes, which speeds up the calculation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a flowchart of a method for generating a differentially private synthetic social graph based on node similarity in a preferred embodiment of the present invention;

[0028] Figure 2 It is a schematic structural diagram of an electronic device in a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0029] 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 represent 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 only used to explain the present invention, and cannot be understood as limiting the present invention.

[0030] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0031] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal connection between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.

[0032] The present invention provides a method for generating a differentially private synthetic social graph based on node similarity. In a preferred embodiment, referring to Figure 1 , the method comprising:

[0033] Step S1, obtaining a node degree sequence based on a real social graph, and performing a first noise-added constraint reasoning on the node degree sequence to obtain an inferred node degree sequence.

[0034] It should be noted that the real social graph G(V, E), the privacy budget ∈1 of the first noisy constraint reasoning, and the privacy budget ∈2 of the second noisy constraint reasoning can be input or pre-stored through the server. The server is preferably, but not limited to, a social network software platform server. In the real social graph G(V, E), V represents a node set and E represents an edge set.

[0035] The node degree represents the number of edges connected to the node. If the number of edges connected to node i is x, then the node degree of node i is x. The node degrees of all nodes are extracted from the real social graph to form a sequence, namely the node degree sequence. The first noisy constraint reasoning includes two parts: noise addition and constraint reasoning. The privacy of the node degree values ​​is protected by noise addition. The constraint reasoning is used to make the reasoned node degree sequence retain as much real node degree sequence information and characteristics as possible, such as value distribution, so as to increase the availability and accuracy of the social network composite graph. In the first noisy constraint reasoning, the constraint reasoning preferably adopts but is not limited to the non-descending distribution constraint reasoning, proportional constraint reasoning or average value constraint reasoning disclosed in the Chinese patent with publication number CN118095417A, which will not be repeated here.

[0036] Step S2, calculating the similarity between nodes in the real social graph to obtain a similarity matrix, and performing a second noise-added constrained reasoning on the similarity matrix to obtain a reasoned similarity matrix.

[0037] The similarity between nodes can be the weighted sum of the number of common neighbor nodes, the number of common edges, the number of common neighbor nodes, and the number of common edges of the two nodes. Generating a synthetic social graph in combination with the similarity between nodes in a real social graph can further improve the usability of the synthetic social graph. In order to improve the level of privacy protection, the real similarity matrix is ​​protected, noise is added to each similarity in the second noisy constraint reasoning, and constraint reasoning is performed on the noise similarity after adding noise, so that the obtained reasoning similarity matrix retains as much real information and characteristics of the similarity matrix as possible, such as numerical range or numerical distribution. The constraint reasoning in the second noisy constraint reasoning is preferably, but not limited to, the non-descending distribution constraint reasoning, proportional constraint reasoning, or average constraint reasoning disclosed in the Chinese patent with publication number CN118095417A, which will not be repeated here.

[0038] Step S3, generating a differentially private synthetic social graph based on the inference node degree sequence and the inference similarity matrix. The nodes of the real social graph are used as the node set of the differentially private synthetic social graph, and then the edge set of the differentially private synthetic social graph is generated based on the inference node degree sequence and the inference similarity matrix.

[0039] In this embodiment, the execution order of the above steps can be to execute step S1 / S2 in parallel first, and then execute step S3, or to execute in the order of step S1, S2, S3 or step S2, S1, S3. This embodiment retains the node degree distribution of the real social graph, uses the similarity between nodes, retains the edge relationship of the real social graph as much as possible, and uses differential privacy technology to protect the data (degree sequence and node similarity) of the real graph used in the process of generating the synthetic graph, thereby enhancing the privacy protection level and increasing the utility of the synthetic social graph.

[0040] In a preferred embodiment, in step S2, performing a first noise-added constraint reasoning on the node degree sequence to obtain a reasoned node degree sequence includes:

[0041] Step S21, arranging the node degrees in the node degree sequence in non-descending order to obtain a first node degree sequence.

[0042] Extract the nodes and corresponding node degrees of the real social graph G(V, E), sort the node degrees in non-descending order to obtain the sorted first node degree sequence D. Calculate the number of edges in the real social graph G(V, E), denoted as M. Let p be both the first node degree sequence D and the noise node degree sequence The position index of the element in the real social graph is P, and 1≤p≤P, satisfying D[p]≤D[p+1].

[0043] Step S22: adding noise to each node degree in the first node degree sequence to obtain a noise node degree sequence

[0044] For the degree d of node j in the first node degree sequence D j Add independent Laplace noise, preferably, the Laplace noise is generated by Laplace distribution:

[0045]

[0046] Among them, x1 is the added noise value, b1 is the first scale parameter, and it is set as follows: b1=2 / ∈1, 2 is the sensitivity. Under edge differential privacy, the sensitivity of node degree is always 2. The sensitivity of degree is 2, which has a smaller sensitivity, so that a smaller privacy budget can be used when adding Laplace noise, which has a stronger protection effect on node degree privacy.

[0047] Therefore, the noise adding process is expressed as: Noisy node degree sequence with Lap1ace noise added Non-descending order may no longer be satisfied.

[0048] Step S23: Perform a first non-descending order constraint on the noise node degree sequence to obtain an inference node degree sequence Among them, the first non-descending arrangement constraint is to adjust the value of the inference node degree in the inference node degree sequence so that the inference nodes in the inference node degree sequence are arranged in non-descending order, that is, satisfying:

[0049]

[0050] In one example, step S23 of this implementation specifically includes:

[0051] p is both the first node degree sequence D and the noise node degree sequence The position index of the element in, q is the inference node degree sequence The position index of the element in, 1≤q≤P.

[0052] Calculate M between all nodes [i″,j″] , 1≤i″≤j″≤P, Index variable p1∈[i″,j″].

[0053] Traverse the index q, that is, q takes 1 to P in sequence, and execute the following steps to obtain the inference node degree sequence The qth element value of Let p take [1, q] in sequence and extract M [p,p] To M [p,P] Get the minimum value min corresponding to index p p ; The minimum value min corresponding to the index p that satisfies 1≤p≤qp Select the largest one as

[0054] In another example, step S23 of this embodiment specifically includes:

[0055] p is both the first node degree sequence D and the noise node degree sequence The position index of the element in, q is the inference node degree sequence The position index of the element in, 1≤q≤P.

[0056] Calculate M between all nodes [i″,j″] , 1≤i″≤j″≤P, Index variable p1∈[i″,j″].

[0057] Traverse the index q, that is, q takes 1 to P in sequence, and execute the following steps to obtain the inference node degree sequence The qth element value of Let p take [q, P] in turn and extract M [1,1] To M [1,p] The maximum value in the index p is obtained. p ; From the maximum value max corresponding to the index p that satisfies q≤p≤P p Select the smallest one as

[0058] In a preferred embodiment, in order to improve the calculation efficiency, in step S2, calculating the similarity between nodes in the real social graph includes:

[0059] Step S21, when calculating the similarity S between node i and node j in the real social graph [i][j] :

[0060] Step S22: If nodes i and j in the real social graph have no common neighbor nodes and are not directly connected, the similarity between nodes i and j is assigned to 0, that is, S [i][j] =0; otherwise, the similarity between node i and node j is calculated by the node degree, connection relationship and shortest path length of the common neighbor nodes of node i and node j. When node i and node j are directly connected, the shortest path length is 1, and when node i and node j are connected with one node apart, the shortest path length is 2.

[0061] In this embodiment, preferably, the similarity S between node i and node j is calculated by the node degree, connection relationship and shortest path length of the common neighbor nodes of node i and node j according to the following formula: [i][j] :

[0062]

[0063] Where N(i) represents the set of neighbor nodes of node i; N(j) represents the set of neighbor nodes of node j; node u is the common neighbor of node i and node j; d u is the node degree of node u; a represents the connection relationship between node i and node j. When there is an edge between node i and node j, a=1, and when there is no edge between node i and node j, a=0; L represents the shortest path length between node i and node j. i, j, and z are all node indexes, all positive integers. It represents the effect of the shortest path length between node i and node j on node similarity. The closer the two nodes are, the greater the similarity.

[0064] When calculating the similarity between nodes, this implementation not only takes into account the common neighbor nodes between the nodes, but also the connection relationship and the shortest path length between the nodes, so that the similarity can reflect the characteristics of whether there is a direct edge between the nodes. In addition, only the similarity between the node and the neighbor node, and the similarity between the node and the neighbor node of the neighbor node is calculated, without traversing all nodes, thereby speeding up the calculation efficiency.

[0065] In a preferred embodiment, in step S2, performing a second noise-added constraint reasoning on the similarity matrix to obtain a reasoned similarity matrix includes:

[0066] Step B1: extract similarities with non-repeating values ​​from the similarity matrix S and arrange them in non-descending order to obtain a similarity list SL. [j][i] With S [i][j] Only one of them is taken out for sorting, because the two are completely equivalent) and arranged in non-descending order according to the similarity to obtain a list SL. Let the position index of the element in the similarity list SL be p′, the number of elements be P′, 1≤p′≤P′. , satisfying SL[p′]≤SL[p′+1].

[0067] Step B2: Add noise to each similarity in the similarity list SL to obtain a noise similarity list

[0068] An independent Laplace noise is added to each similarity in the similarity list SL. Preferably, the Laplace noise is generated by a Laplace distribution:

[0069]

[0070] Among them, x2 is the added noise value, b2 is the first scale parameter, and it is set as follows: b2=2 / ∈2, 2 is the sensitivity. Under edge differential privacy, the sensitivity of node degree is always 2. The sensitivity of degree is 2, which has a smaller sensitivity, so that a smaller privacy budget can be used when adding Laplace noise, and it has a stronger protection effect on similarity privacy.

[0071] Therefore, the noise adding process is expressed as: Add Laplace noise to the noise similarity list Non-descending order may no longer be satisfied.

[0072] Step B3: noise similarity list Perform the second non-descending sort constraint to obtain the inference similarity list Among them, the second non-descending sort constraint is to adjust the inference similarity list The value of the inference similarity in makes the inference similarity list The inference similarity is arranged in non-descending order, that is, it satisfies:

[0073]

[0074] In one example, step B3 of this implementation specifically includes:

[0075] p′ is both the similarity list SL and the noise similarity list The position index of the element in , q′ is the inference similarity list The position index of the element in, 1≤q′≤P′.

[0076] Calculate M1 between all nodes [i″,j″] , 1≤i″≤j″≤P′, Index variable p2∈[i″,j″].

[0077] Traverse the index q′, that is, q′ takes 1 to P′ in sequence, and execute the following steps to obtain the inference similarity list The q′th element value of Let p′ take [1, q′] in turn, extract M1 [p′,p′] To M1 [p′,P′] The minimum value in the index p′ is obtained. p′ ; From the minimum value min corresponding to the index p that satisfies 1≤p′≤q′ p′ Select the largest one as

[0078] In another example, step B3 of this embodiment specifically includes:

[0079] p′ is both the similarity list SL and the noise similarity list The position index of the element in , q′ is the inference similarity list The position index of the element in, 1≤q′≤P′.

[0080] Calculate M1 between all nodes [i″,j″], 1≤i″≤j″≤P′, Index variable p2∈[i″,j″].

[0081] Traverse the index q′, that is, q′ takes 1 to P′ in sequence, and execute the following steps to obtain the inference similarity list The q′th element value of Let p′ take [q′, P′] in turn, extract M1 [1,1] To M1 [1,p′] The maximum value in the index p′ is obtained. p′ ; From the maximum value max corresponding to the index p′ that satisfies q′≤p′≤P′ p′ Select the smallest one as

[0082] Step B4: Using the inference similarity list The inference similarity in is used to replace the corresponding similarity in the similarity matrix to obtain the inference similarity matrix.

[0083] Preferably, in step B1, the row and column positions of each similarity in the similarity list SL in the similarity matrix are recorded. Each similarity in the similarity list SL may record more than one row and column position, and the row and column position of each similarity record is associated with the position index of the similarity in the similarity list SL. Finally, the inferred similarity of each position index is used to replace the similarity of the row and column positions associated with the position index in the similarity matrix.

[0084] In a preferred embodiment, step S3, generating a differentially private synthetic social graph according to the inference node degree sequence and the inference similarity matrix, includes:

[0085] Step S31, the node set of the differentially private synthetic social graph G1=(V, E1) is initialized to the node set V of the real social graph, and the edge set E1 of the differentially private synthetic social graph is initialized to an empty set.

[0086] Step S32, obtain the starting node sequence by inferring the node degree sequence, and the nodes in the starting node sequence are sorted in non-ascending order according to the node degree. If the inferred node degree sequence is constrained to be inferred to be arranged in non-descending order, select the nodes with large inferred node degrees from the inferred node degree sequence in turn as the starting nodes, that is, start the cycle from the end of the inferred node degree sequence, and select the previous node as the starting node in the next round until all nodes are selected as starting nodes, that is, cycle from the end to the beginning.

[0087] Step S33, traverse the nodes of the starting node sequence from the beginning to the end to obtain the edge set of the differential privacy synthetic social graph, and perform each traversal:

[0088] Suppose the node i′ is traversed this time; according to the inference similarity matrix, add the nodes with non-zero similarity to node i′ to the candidate list of node i′; calculate the edge generation probability between node i′ and each node in the candidate list of node i′, and generate candidate edges between node i′ and each node in the candidate list of node i′ according to the edge generation probability; merge the generated candidate edges into the edge set of the differentially private synthetic social graph.

[0089] The specific process of merging is: if the candidate edge is not in the edge set E1 of the differentially private synthetic social graph, then the candidate edge is added to E1; if the candidate edge is already in the edge set E1, then the candidate edge is discarded. When generating edges, only nodes with a non-zero similarity to the current node are considered, which increases the probability that the synthetic social graph retains more information of the real social graph.

[0090] Step S34, generating a differentially private synthetic social graph G1(V, E1) through the edge set and node set of the differentially private synthetic social graph.

[0091] In this embodiment, it is further preferred that

[0092] The calculation formula for the edge generation probability p(i′, j′) between node i′ and node j′ in the candidate list of node i′ is:

[0093]

[0094] in, represents the inference node degree of node i′ in the inference node degree sequence; represents the inference node degree of node j′ in the inference node degree sequence; represents the inference node degree of node z in the candidate list can(i′) of node i′ in the inference node degree sequence; M represents the total number of edges in the real social graph; represents the inference similarity between node i′ and node j′ in the inference similarity matrix; Represents the inference similarity between node i′ and node z in the inference similarity matrix; j′∈can(i′). i′ and j′ are both node indexes, which are positive integers.

[0095] When synthesizing a social graph, this embodiment retains the existence information of the edges of the real social graph as much as possible. While ensuring that the expected degree of the nodes in the synthesized social graph is equal to the number of nodes in the real social graph, it only attempts to generate edges with nodes whose similarity is not zero, and divides the probability of nodes with a similarity of 0 in the original CL model into nodes with a similarity of non-zero, thereby increasing the probability of the synthesized social graph retaining the edges in the real social graph, allowing the synthesized social graph to retain more information and characteristics of the real social graph, thereby improving the availability and accuracy of the synthesized social graph.

[0096] In a preferred embodiment, the generated differentially private synthetic social graph is further post-processed, and the post-processing includes:

[0097] For each unconnected node g (i.e., an isolated node that is not connected to any node) in the generated differentially private synthetic social graph, select a node k from the node set V according to the selection probability; if the node degree of node k in the generated differentially private synthetic social graph is less than or equal to the inference node degree of node k in the inference node degree sequence, and the edge (g, k) is not in the generated differentially private synthetic social graph, then add the edge (g, k) to the generated differentially private synthetic social graph.

[0098] In this embodiment, when a node k is selected from the node set for node g, the selection probability is: Among them, k and m are node indexes, which are positive integers.

[0099] In an application example of this embodiment, unconnected nodes in the differential privacy synthetic social graph G1 are found and added to a queue. The loop starts: an unconnected node g is popped from the queue: The probability of selecting a node k in G1 is If edge (g, k) is not in G1, add edge (g, k) to G1. Repeat until the queue is empty.

[0100] The present invention also discloses a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the above-mentioned method for generating a differentially private synthetic social graph based on node similarity provided by the present invention are implemented. The computer program product should be understood as a software product that mainly implements its solution through a computer program, such as a program product integrated in the cloud or a software library.

[0101] The present invention also discloses an electronic device. In one embodiment, the electronic device includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the differential privacy synthetic social graph generation method based on node similarity provided by the present invention.

[0102] like Figure 2 As shown, it is a schematic diagram of the structure of an electronic device for a method for generating a differentially private synthetic social graph based on node similarity provided by an embodiment of the present invention. The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a program for a method for generating a differentially private synthetic social graph based on node similarity.

[0103] Among them, the processor 10 may be composed of an integrated circuit in some embodiments, for example, it may be composed of a single packaged integrated circuit, or it may be composed of multiple integrated circuits packaged with the same function or different functions, including one or more central processing units (CPU), microprocessors, digital processing chips, graphics processors, and a combination of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing a differential privacy synthetic social graph generation method based on node similarity, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device and process data.

[0104] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of the program of the differential privacy synthetic social graph generation method based on node similarity, but also can be used to temporarily store data that has been output or is to be output.

[0105] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0106] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Disp1ay), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visualized user interface.

[0107] Figure 2 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 2 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown, or combine certain components, or arrange the components differently. For example, although not shown, the electronic device may also include a power supply (such as a battery) for supplying power to each component. Preferably, the power supply may be logically connected to at least one processor 10 through a power management device, so that functions such as charging management, discharging management, and power consumption management are implemented through the power management device. The power supply may also include any components such as one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0108] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited by this structure.

[0109] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0110] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", "an implementation", "a preferred implementation" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0111] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. A method for generating a differentially private synthetic social graph based on node similarity, characterized in that: include: Obtaining a node degree sequence based on a real social graph, and performing a first noise-added constraint reasoning on the node degree sequence to obtain an inferred node degree sequence; Calculate the similarity between nodes in the real social graph to obtain a similarity matrix, and perform a second noise-added constraint reasoning on the similarity matrix to obtain a reasoned similarity matrix; Generate a differentially private synthetic social graph based on the inference node degree sequence and the inference similarity matrix, including: Initialize the node set of the differential privacy synthetic social graph to the node set of the real social graph, and initialize the edge set of the differential privacy synthetic social graph to the empty set; Obtaining a starting node sequence by inferring a node degree sequence, wherein the nodes in the starting node sequence are sorted in non-ascending order according to the node degrees; Traverse the nodes of the starting node sequence from beginning to end to obtain the edge set of the differentially private synthetic social graph. Each traversal executes: Assume that the node i′ is traversed this time; according to the inference similarity matrix, add the nodes with non-zero similarity to the node i′ to the candidate list of the node i′; calculate the edge generation probability between the node i′ and each node in the candidate list of the node i′, and generate a candidate edge between the node i′ and each node in the candidate list of the node i′ according to the edge generation probability; merge the generated candidate edges into the edge set of the differential privacy synthetic social graph; A differentially private synthetic social graph is generated by synthesizing the edge set and node set of the differentially private synthetic social graph.

2. The method for generating a differentially private synthetic social graph based on node similarity according to claim 1, characterized in that: The step of performing a first noise-added constraint reasoning on the node degree sequence to obtain a reasoned node degree sequence includes: Arrange the node degrees in the node degree sequence in non-descending order to obtain a first node degree sequence; Adding noise to each node degree in the first node degree sequence to obtain a noisy node degree sequence; A first non-descending arrangement constraint is applied to the noise node degree sequence to obtain an inference node degree sequence, wherein the first non-descending arrangement constraint is to adjust the values ​​of the inference node degrees in the inference node degree sequence so that the inference nodes in the inference node degree sequence are arranged in non-descending order.

3. The method for generating a differentially private synthetic social graph based on node similarity according to claim 1 or 2, characterized in that: The calculating the similarity between nodes in the real social graph includes: When calculating the similarity between node i and node j in a real social graph: If nodes i and j in the real social graph have no common neighbor nodes and are not directly connected, the similarity between nodes i and j is assigned to 0; otherwise, the similarity between nodes i and j is calculated by the node degree, connection relationship and shortest path length of the common neighbor nodes of nodes i and j.

4. The method for generating a differentially private synthetic social graph based on node similarity according to claim 3, characterized in that: The similarity S between node i and node j is calculated by the node degree, connection relationship and shortest path length of the common neighbor nodes of node i and node j according to the following formula: [i][j] : Where N(i) represents the set of neighbor nodes of node i; N(j) represents the set of neighbor nodes of node j; node u is the common neighbor of node i and node j; d u is the node degree of node u; a represents the connection relationship between node i and node j. When there is an edge between node i and node j, a=1; when there is no edge between node i and node j, a=0; L represents the shortest path length between node i and node j.

5. The method for generating a differentially private synthetic social graph based on node similarity according to claim 1, 2 or 4, characterized in that: The performing second noise-added constraint reasoning on the similarity matrix to obtain a reasoned similarity matrix includes: Take out the similarities with non-repeated values ​​from the similarity matrix and arrange them in non-descending order to obtain a similarity list; Add noise to each similarity in the similarity list to obtain a noise similarity list; Performing a second non-descending arrangement constraint on the noise similarity list to obtain an inference similarity list, wherein the second non-descending arrangement constraint is that the values ​​of the inference similarities in the inference similarity list make the inference similarities in the inference similarity list arranged in non-descending order; The inference similarities in the inference similarity list are used to replace the corresponding similarities in the similarity matrix to obtain the inference similarity matrix.

6. The method for generating a differentially private synthetic social graph based on node similarity according to claim 1, characterized in that: The calculation formula for the edge generation probability p(i′, j′) between node i′ and node j′ in the candidate list of node i′ is: in, represents the inference node degree of node i′ in the inference node degree sequence; represents the inference node degree of node j′ in the inference node degree sequence; represents the inference node degree of node z in the candidate list can(i′) of node i′ in the inference node degree sequence; M represents the total number of edges in the real social graph; represents the inference similarity between node i′ and node j′ in the inference similarity matrix; Represents the inference similarity between node i′ and node z in the inference similarity matrix; j′∈can(i′).

7. The method for generating a differentially private synthetic social graph based on node similarity according to claim 1 or 6, characterized in that: The method further includes performing post-processing on the generated differential privacy synthetic social graph, wherein the post-processing includes: For each unconnected node g in the generated differentially private synthetic social graph, select a node k from the node set according to the selection probability. If the node degree of node k in the generated differentially private synthetic social graph is less than or equal to the inference node degree of node k in the inference node degree sequence, and the edge (g, k) is not in the generated differentially private synthetic social graph, then add the edge (g, k) to the generated differentially private synthetic social graph.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, A memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for generating a differentially private synthetic social graph based on node similarity as described in any one of claims 1 to 7.