Edge perturbation-based graph data privacy protection method and system

By employing a graph data privacy protection method based on edge perturbation, this method utilizes a graph embedding model to generate an adjacency strength matrix and performs edge perturbation. This addresses the issues of reduced usability and vulnerability to attacks associated with anonymized graph data in existing technologies, achieving a balance between preserving structural information and protecting privacy.

CN115906163BActive Publication Date: 2025-11-25BEIJING JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211463214.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2025-11-25
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

Existing graph privacy protection strategies ignore the structural information of the original graph when constructing anonymized graphs, which greatly reduces the usability of the anonymized graph data, and traditional methods are vulnerable to attacks.

Method used

A graph data privacy protection method based on edge perturbation is adopted. An adjacency strength matrix is ​​generated by a trained graph embedding model. The edge perturbation is performed by combining the difference between the degree sequence of the original graph and the anonymized degree sequence to generate an anonymous graph that meets the anonymity requirements and has the smallest sum of differences.

Benefits of technology

It effectively preserves the structural information of the original graph, improves the usability of anonymous graph data, and reduces the probability of successful attacks, thus achieving a balance between data availability and privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115906163B_ABST
    Figure CN115906163B_ABST
Patent Text Reader

Abstract

The application provides a kind of based on edge perturbation graph data privacy protection method and system, belong to data privacy protection technical field, obtain the original graph to be anonymized;The trained graph embedding model is used to process the original graph to be anonymized, and the adjacent strength matrix is obtained;According to the difference between the degree sequence of the original graph and the anonymity degree sequence, the edge perturbation is carried out on the original graph in combination with the adjacent strength matrix, and the final anonymous graph is obtained;Wherein, the degree sequence that meets the anonymity requirement and the total sum of difference with the original graph degree sequence is generated as the anonymity degree sequence according to the degree sequence of the original graph.The present application utilizes beam search and anonymous group, so that when generating k-anonymity degree sequence, the algorithm complexity is reduced, and the corresponding k-anonymity degree sequence is generated faster;Obtain distribution matrix, extract the structure feature information of the original graph;Based on the edge perturbation method of the difference between the adjacent strength matrix and the degree sequence before and after anonymity, the original graph structure information is retained to the greatest extent, and the balance problem between data availability and privacy protection is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data protection, and particularly relates to a graph data privacy protection method and system based on edge perturbation. BACKGROUND

[0002] With the rapid development of Internet technology, virtual relationships between people form a large-scale and complex social network. These social networks can be abstracted into graphs in data structures. Graphs, as a complex data structure type, can well represent various relationships between different objects and contain a wealth of information. However, there is a large amount of private information of users in social networks. If these data are directly opened to the public without anonymization, there is a risk of leaking user private information. Therefore, the privacy and security of social networks are attracting more and more attention.

[0003] Traditional graph privacy protection strategies first delete user private information and sensitive attributes in graph data, and then publish the topology structure of the original graph. However, when using this strategy to publish graph data with strong correlation, existing research results show that it is very easy to be attacked. Common graph anonymization methods include graph modification-based anonymization methods, clustering anonymization methods, differential privacy methods, etc. Existing graph k-anonymization methods mainly use dynamic programming or greedy algorithms to construct anonymous graphs, and the main operation is to add or delete nodes or edges. Since these methods only consider the k-degree constraint condition of nodes when constructing anonymous graphs and ignore the structure information of the original graph, the practicality of the anonymous graph data is greatly reduced. SUMMARY

[0004] The present application aims to provide a graph data privacy protection method and system based on edge perturbation which can guarantee k-degree anonymity and retain the structure information of the original graph to improve the practicality of the anonymous graph data, so as to solve at least one technical problem in the background art.

[0005] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:

[0006] On one hand, the present application provides a graph data privacy protection method based on edge perturbation, comprising:

[0007] obtaining an original graph to be anonymized;

[0008] processing the original graph to be anonymized by using a trained graph embedding model to obtain an adjacency strength matrix;

[0009] Based on the difference between the degree sequence of the original graph and the anonymized degree sequence, the original graph is perturbed by combining the adjacency strength matrix to obtain the final anonymized graph; among them, the degree sequence generated from the degree sequence of the original graph that meets the anonymity requirements and has the smallest sum of differences from the degree sequence of the original graph is the anonymized degree sequence.

[0010] Preferably, training the graph embedding model includes:

[0011] Obtain a training set, which includes multiple original images and anonymity sequence labels corresponding to the original images;

[0012] The predicted anonymity sequence labels corresponding to the nodes in the original graph are obtained through the GNN model; the gradient of the loss function between the predicted anonymity sequence labels and the actual anonymity sequence labels is backpropagated back into the model, and the assignment matrix is ​​updated through the Adam optimization algorithm; the adjacency strength matrix in the network is iteratively updated using the assignment matrix until the loss function value is minimized, thus obtaining the trained graph embedding model.

[0013] Preferably, the degree sequence of the original graph is obtained, including: an undirected graph represented as G(V,E), where V represents the set of nodes, E represents the set of edges, n=|V| represents the number of nodes in the graph, v i ∈V represents a node in the graph, e ij =(v i ,v j )∈E represents node v in the graph i and node v j There are adjacency relationships; the set of neighboring nodes of node v is N(v)={u∈V|(v,u)∈E}, representing the set of all nodes in the graph that are adjacent to node v; A∈R n×n Let e ​​be the adjacency matrix of the graph, representing the adjacency relationships between nodes in the graph. ij When ∈E, A ij =1; when At that time, A ij =0; node v i The degree is represented by node d i d i =|N(v)|, then the original graph degree sequence is represented by the vector d = [d1, d2, ..., dn]. n [Use ] to represent.

[0014] Preferably, the anonymized degree sequence generated from the degree sequence of the original graph that meets the anonymity requirement and has the smallest sum of differences from the original graph's degree sequence is called the anonymized degree sequence, including:

[0015] Sort the degree sequence of the original graph and divide it into anonymous groups in descending order of degree;

[0016] Construct a difference matrix based on the anonymous group partitioning;

[0017] constructing a bundle search probability matrix according to the difference matrix;

[0018] constructing an anonymity degree sequence according to the bundle search probability matrix;

[0019] selecting a suitable anonymity degree sequence as a final anonymity degree sequence by the sum of differences between the anonymity degree sequences being minimum.

[0020] Preferably, according to the difference between the degree sequence of the original graph and the anonymity degree sequence, edge perturbation is performed on the original graph in combination with the adjacency strength matrix to obtain a final anonymous graph, including:

[0021] Two auxiliary arrays of each node of the original graph are constructed by the adjacency strength matrix and the adjacency matrix of the original graph: for each node of the original graph, the nodes in the neighbor set of the node are divided into a group, and each node in the group is sorted in ascending order according to the strength value corresponding to the node in the adjacency strength matrix to obtain a first auxiliary array; for each node, the nodes not belonging to the neighbor set of the node are divided into a group, and each node in the group is sorted in ascending order according to the strength value corresponding to the node in the adjacency strength matrix to obtain a second auxiliary array;

[0022] The difference between the degree sequence of the original graph and the anonymity degree sequence is calculated, and edge perturbation is performed on the original graph according to the first auxiliary array and the second auxiliary array to obtain an anonymous adjacency matrix;

[0023] The final anonymous graph is obtained according to the anonymous adjacency matrix.

[0024] Preferably, the edge perturbation includes edge addition, edge deletion and edge exchange:

[0025] When the sum of the node degrees after the graph is anonymized is greater than before the graph is anonymized, the edge addition operation is adopted;

[0026] When the sum of the node degrees after the graph is anonymized is less than before the graph is anonymized, the edge deletion operation is adopted;

[0027] When the sum of the node degrees after the graph is anonymized is equal to before the graph is anonymized, the edge exchange operation is adopted.

[0028] In a second aspect, the present application provides a graph data privacy protection system based on edge perturbation, including:

[0029] An acquisition module is configured to acquire an original graph to be anonymized;

[0030] A graph embedding module is configured to process the original graph to be anonymized by using a trained graph embedding model to obtain an adjacency strength matrix;

[0031] An edge perturbation module is configured to perform edge perturbation on the original graph according to the difference between the degree sequence of the original graph and the anonymous degree sequence and in combination with the adjacency strength matrix, so as to obtain the final anonymous graph; wherein the anonymous degree sequence is generated according to the degree sequence of the original graph, and the anonymous degree sequence meets the anonymity requirement and has the minimum sum of differences with the degree sequence of the original graph.

[0032] In a third aspect, the present application provides a non-transitory computer readable storage medium for storing computer instructions, which, when executed by a processor, implement the edge perturbation based graph data privacy protection method as described above.

[0033] In a fourth aspect, the present application provides a computer program product comprising a computer program, which, when running on one or more processors, is used to implement the edge perturbation based graph data privacy protection method as described above.

[0034] In a fifth aspect, the present application provides an electronic device comprising a processor, a memory and a computer program; wherein the processor is connected with the memory, and the computer program is stored in the memory; when the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes the instructions for implementing the edge perturbation based graph data privacy protection method as described above.

[0035] The present application has the following advantages: a new generation algorithm is proposed for the k-anonymous degree sequence, and the beam search and the anonymous group are used, so that when the k-anonymous degree sequence is generated, the algorithm complexity is reduced, and the corresponding k-anonymous degree sequence is generated faster; the graph is anonymized using the graph neural network model, the model adopts an end-to-end learning framework to be trained in a supervised manner, the trained allocation matrix is obtained, and the structure feature information of the original graph is extracted; the edge perturbation method based on the adjacency strength matrix and the difference between the degree sequences before and after anonymization maximally retains the structure information of the original graph, and effectively solves the balance problem between data availability and privacy protection.

[0036] The advantages of the additional aspects of the present application will be more apparent from the following description part or will be understood through the practice of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0038] Figure 1 The flowchart of the graph privacy protection technology based on the edge perturbation method described in the embodiments of the present application.

[0039] Figure 2 The schematic diagram of three basic operations corresponding to the edge modification method described in the embodiment of the present application.

[0040] Figure 3 The schematic diagram of the graph neural network model framework based on the embodiment of the present application. DETAILED DESCRIPTION

[0041] The embodiments of the present application will be described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as a limitation on the present application.

[0042] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs.

[0043] It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless defined as such.

[0044] Those skilled in the art can understand that, unless otherwise stated, the singular forms "a", "an" and "the" used herein also include the plural forms. It should be further understood that the phrase "comprising" used in the specification of the present application means that the features, integers, steps, operations, elements and / or groups exist, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements and / or groups thereof.

[0045] In order to facilitate the understanding of the present application, the present application will be further explained and described in specific embodiments in combination with the accompanying drawings, and the specific embodiments do not constitute a limitation on the embodiments of the present application.

[0046] Those skilled in the art should understand that the drawings are only schematic diagrams of the embodiments, and the components in the drawings are not necessarily necessary for the implementation of the present application.

[0047] Embodiment 1

[0048] The present embodiment 1 provides a graph data privacy protection system based on edge perturbation, comprising:

[0049] An acquisition module is configured to acquire an original graph to be anonymized.

[0050] A graph embedding module is configured to process the original graph to be anonymized by using a trained graph embedding model to obtain an adjacency strength matrix.

[0051] The edge perturbation module is used to perturb the edges of the original graph based on the difference between the degree sequence of the original graph and the anonymized degree sequence, combined with the adjacency strength matrix, to obtain the final anonymized graph. Among them, the degree sequence generated based on the degree sequence of the original graph that meets the anonymity requirements and has the smallest sum of differences from the degree sequence of the original graph is the anonymized degree sequence.

[0052] In this embodiment 1, the above-described system is used to implement a graph data privacy protection method based on edge perturbation. The method includes:

[0053] Use the acquisition module to obtain the original image to be anonymized;

[0054] Using the graph embedding module, the original graph to be anonymized is processed based on the trained graph embedding model to obtain the adjacency strength matrix;

[0055] Using the edge perturbation module, the original graph is perturbed based on the difference between the degree sequence of the original graph and the anonymized degree sequence, combined with the adjacency strength matrix, to obtain the final anonymized graph; among them, the degree sequence generated from the degree sequence of the original graph that meets the anonymity requirements and has the smallest sum of differences from the degree sequence of the original graph is the anonymized degree sequence.

[0056] Obtain the degree sequence of the original graph, including: an undirected graph represented as G(V,E), where V represents the set of nodes, E represents the set of edges, n = |V| represents the number of nodes in the graph, and v i ∈V represents a node in the graph, e ij =(v i ,v j )∈E represents node v in the graph i and node v j There are adjacency relationships; the set of neighboring nodes of node v is N(v)={u∈V|(v,u)∈E}, representing the set of all nodes in the graph that are adjacent to node v; A∈R n×n Let e ​​be the adjacency matrix of the graph, representing the adjacency relationships between nodes in the graph. ij When ∈E, A ij =1; when At that time, A ij =0; node v i The degree is represented by node d i d i =|N(v|), then the original graph degree sequence is represented by the vector d = [d1, d2, ..., dn]. n [Use ] to represent.

[0057] According to the degree sequence of the original graph, a degree sequence meeting the anonymity requirement and having the minimum difference sum with the original graph degree sequence is generated as the anonymous degree sequence, comprising: sorting the degree sequence of the original graph, and dividing the anonymous groups according to the degree sorting from large to small; constructing a difference matrix according to the anonymous group division; constructing a beam search probability matrix according to the difference matrix; constructing an anonymous degree sequence according to the beam search probability matrix; and selecting a suitable anonymous degree sequence as the final anonymous degree sequence by minimizing the sum of the differences of the anonymous degree sequences before and after. Specifically, it includes the following steps: given a undirected graph G of n nodes and a positive integer k, the graph is called k-anonymous graph if and only if each node in the graph has the same degree as at least k-1 other nodes, and the node degree sequence of the graph is the k-anonymous degree sequence.

[0058] The degree sequence of the original graph is divided into anonymous groups, comprising:

[0059] The k-anonymous degree sequence can protect the privacy of the graph data, so that the probability of successful attack on a specific node by an attacker is less than To reduce the computational complexity, the input degree sequence is sorted, and the anonymous groups are divided according to the degree sorting from large to small, and k nodes are selected in each anonymous group; when the number of nodes in the last group is less than k, the last group is merged with the previous group, so that the number of nodes in each group is greater than or equal to k. The number of anonymous groups is s, where The number of elements in each anonymous group s i is k≤s i ≤(2k-1).

[0060] A difference matrix F s×2 is constructed according to the anonymous group division

[0061] The difference matrix F s×2 is constructed according to the divided anonymous groups (a total of s groups), and the two columns of the matrix represent the difference between the degree within the group and the average degree within the group The difference between the degree within the group and the average degree within the group where j={1,2,...,s}. and are calculated as follows:

[0062]

[0063] where, represents the average value of d i ∈s j , i.e. the average value of the jth anonymous group.

[0064] A beam search (Beam search) probability matrix P s×2 is constructed according to the difference matrix F s×2 , comprising:

[0065] P s×2 the matrix element and is calculated as follows:

[0066]

[0067] and respectively represent the beam search selection and probability.

[0068] If the element is located in the first column of the beam search probability matrix, the degree sequence of the anonymous group corresponding to the element is reduced; otherwise, the degree sequence is increased. If the element value is 0, the average value of the degree sequence of the anonymous group corresponding to the element is taken.

[0069] The k-anonymous degree sequence is constructed according to the obtained beam search probability matrix, comprising:

[0070] First, the element with the maximum probability is selected from the matrix, and if the element is located in the first column of the probability matrix, the degree sequence of the anonymous group corresponding to the element is reduced; otherwise, the degree sequence is increased. Then, the element with the maximum probability is selected from other groups in the other column of the matrix, and if the element is located in the first column of the probability matrix, the degree sequence of the anonymous group corresponding to the element is reduced; otherwise, the degree sequence is increased. The above operation is alternately performed on the non-zero elements in the matrix until the k-anonymous degree sequence is constructed.

[0071] The appropriate k-anonymous degree sequence is selected by the sum of the differences between the front and rear degree sequences of the k-anonymous, comprising:

[0072] According to the obtained k-anonymous degree sequence, the sum of the differences between the front and rear degree sequences of the k-anonymous is calculated, and the calculation formula is as follows: wherein d i and respectively represent the degrees of the front and rear nodes of the k-anonymous. The selected k-anonymous degree sequence should make the sum of the differences between the front and rear degree sequences of the k-anonymous as small as possible, and the sum of the degrees of all nodes should be even.

[0073] wherein the graph embedding model is trained, comprising:

[0074] obtaining a training set, the training set comprising a plurality of original graphs and anonymous degree sequence labels corresponding to the original graphs;

[0075] obtaining the predicted anonymous degree sequence label corresponding to the node in the original graph through the GNN model; the loss function between the predicted anonymous degree sequence label and the real anonymous degree sequence label is used to propagate the loss function gradient back to the model, and the distribution matrix is updated through the Adam optimization algorithm; the adjacency strength matrix in the network is iteratively updated using the distribution matrix until the loss function value is minimized, and the trained graph embedding model is obtained.

[0076] Specifically, taking the original graph as input and the anonymity sequence as label, a model for learning graph embedding through deep neural network is trained, and an adjacency strength matrix is outputted, including:

[0077] S31: the label of node v i is denoted as y i , and the labels of all nodes constitute a node label set Y, i.e. the predicted label of node v i is denoted as , and the predicted label set is denoted as X represents a feature matrix of the graph G, X∈R n×F , represents a feature vector of the i-th node, F represents a feature dimension of the node, and the feature matrix initialization X adopts a method in the GNN network.

[0078] In the GNN network, a GNN layer is mainly composed of a GCN network and an MLP hidden layer, the GCN is a neural network layer, and the propagation mode from the l-th layer to the l+1-th layer is:

[0079]

[0080] wherein, represents an adjacency matrix containing itself, I n represents a unit matrix, represents a degree matrix containing itself, H (l) is a representation matrix of nodes in the l-th layer, W (l) is a trainable parameter matrix, and σ represents a nonlinear activation function.

[0081] The propagation mode of the MLP hidden layer is:

[0082] H (l+1) =σ(W (l) H (l) +b (l) );

[0083] wherein b (l) is a bias term, H (l) is a representation matrix of nodes in the l-th layer, W (l) is a trainable parameter matrix, and σ represents a nonlinear activation function. The input of the network at the beginning is H (0) , b (0) and W (0) , wherein H (0) is a feature matrix X of the graph G, and the values of b (0) and W (0) are obtained by random initialization.

[0084] S32: Obtain the representation matrix H of the node by taking the adjacency matrix A and the feature matrix X of the original graph as input through the GNN network (l) .

[0085] The GNN network is constructed as follows:

[0086] H (l+1) = GCN(MLP(A, H (l) ));

[0087] S33: Take the k-anonymity sequence obtained in the previous step as the label of the node.

[0088] S34: Use the graph neural network to learn and generate the allocation matrix C (l) and simultaneously learn the representation feature matrix H (l) :

[0089] C (l) = σ(ε(A (l) ,X (l) ))

[0090] H (l) = ε(A (l) ,X (l) )

[0091] where ε(·) represents the graph neural network GNN, A (l) and X (l) represent the l-layer adjacency strength matrix and the node feature matrix, respectively.

[0092] S35: According to the learned allocation matrix C (l) , obtain the l+1-layer adjacency strength matrix A (l+1) and the node feature matrix X (l+1) :

[0093]

[0094] S36: When reaching the last layer of the GNN network, output the embedding matrix E, and map the graph embedding matrix to the predicted label through a specific function Z(·).

[0095] where the embedding matrix E is the representation matrix H (l) of the last layer.

[0096] S37: Through the results of the true label and the predicted label, the parameter matrix W (l) is modified and updated to update the allocation matrix C (l) .

[0097] To solve the non-convex optimization problem existing in the training process, the method uses auxiliary connection prediction targets to train the GNN, and minimizes the loss function L in each layerl :

[0098]

[0099] where L c represents the node label classification cross-entropy loss function, ‖·‖ F represents the Frobenius norm.

[0100] S38: After m iterations of repeating steps S33 to S37, the final generated adjacency strength matrix A s is obtained.

[0101] According to the difference between the degree sequence of the original graph and the anonymous degree sequence, the original graph is edge disturbed in combination with the adjacency strength matrix to obtain the final anonymous graph, including:

[0102] Two auxiliary arrays of each node of the original graph are constructed through the adjacency strength matrix and the adjacency matrix of the original graph: for each node of the original graph, the nodes in the neighbor set of the node are divided into a group, and each node in the group is sorted in ascending order according to the strength value corresponding to the node in the adjacency strength matrix to obtain a first auxiliary array; for each node, the nodes not belonging to the neighbor set of the node are divided into a group, and each node in the group is sorted in ascending order according to the strength value corresponding to the node in the adjacency strength matrix to obtain a second auxiliary array.

[0103] The difference between the degree sequence of the original graph and the anonymous degree sequence is calculated, and the original graph is edge disturbed according to the first auxiliary array and the second auxiliary array to obtain an anonymous adjacency matrix.

[0104] The final anonymous graph is obtained according to the anonymous adjacency matrix.

[0105] Specifically, the edge disturbance involved in the method includes three basic operations of edge addition, edge deletion and edge exchange, which are as follows:

[0106] 1) Edge addition: according to the need of the k-anonymous sequence, the edge (v i ,v j ) is added. When the sum of the node degrees after the graph is anonymous is greater than that before the graph is anonymous, the edge addition operation is adopted;

[0107] 2) Edge deletion: according to the need of the k-anonymous sequence, the edge (v j ,v p ) is deleted. When the sum of the node degrees after the graph is anonymous is less than that before the graph is anonymous, the edge deletion operation is adopted;

[0108] 3) Edge exchange: according to the need of the k-anonymous sequence, the edge (v j ,v p ) is added and the edge (v i ,v j). The sum of the node degrees after anonymization is equal to the sum of the node degrees before anonymization. The edge exchange operation is used.

[0109] S41: The adjacency strength matrix A is used to construct two auxiliary arrays for each node v s i For each node v i , the nodes in its neighbor set N(v i ) are divided into a group, and each node in the group is sorted in ascending order according to the strength value corresponding to v s in the adjacency strength matrix A i , and the resulting auxiliary array is denoted as Correspondingly, for each node v i , the nodes not in its neighbor set N(v i ) are divided into a group, and each node in the group is sorted in ascending order according to the strength value corresponding to v s in the adjacency strength matrix A i , and the resulting auxiliary array is denoted as Therefore and represent the two nodes with the weakest strength in the two auxiliary arrays, respectively.

[0110] S42: The difference between the degree sequence before and after anonymization is calculated, and edge perturbation is performed based on the arrays obtained in S41.

[0111] First, the degree difference α i is determined by comparing d and d i , where d is the degree after anonymization. That is, the appropriate k-anonymity degree sequence is selected. Specifically, the calculation formula of the degree difference α i is as follows:

[0112] Then, according to the sign of the degree difference α i , the original graph is perturbed. The specific method is as follows:

[0113] 1) When the degree difference α i of v i <0, perform edge deletion operation, delete edge

[0114] 2) When the degree difference α i of v i >0, perform edge addition operation, add edge

[0115] 3) When the degree difference α i of v i =0, perform edge exchange operation, first add edge then delete edge

[0116] S43: The anonymous adjacency matrix A obtained after edge perturbation in S42. * :S p (A,A s → A * ;

[0117] Where S p (·) denotes the edge perturbation operation, based on the anonymous adjacency matrix A. * Finally, the anonymous graph G was obtained. * .

[0118] Example 2

[0119] like Figures 1 to 3 As shown in this embodiment 2, a graph anonymity protection technique based on edge perturbation is provided, including the following steps:

[0120] Step S1: Obtain the degree sequence of the original graph as the attribute sequence of the graph.

[0121] S11: An undirected graph is represented as G(V,E), where V represents the set of nodes, E represents the set of edges, n = |V| represents the number of nodes in the graph, and v i ∈V represents a node in the graph, e ij =(v i ,v j )∈E represents node v in the graph i and node v j There are adjacency relationships; the set of neighboring nodes of node v is N(v)={u∈V|(v,u)∈E}, representing the set of all nodes in the graph that are adjacent to node v; A∈R n×n Let e ​​be the adjacency matrix of the graph, representing the adjacency relationships between nodes in the graph. ij When ∈E, A ij =1; when At that time, A ij =0; node v i The degree is represented by node d i d i =|N(v)|, then the original graph degree sequence is represented by the vector d = [d1, d2, ..., dn]. n ] is used to represent this.

[0122] S12: Obtain the degree sequence d = [d1, d2, ..., dn] of graph G. n ] as its attribute sequence.

[0123] Step S2: Generate a degree sequence that meets the k-anonymity requirement and has the smallest sum of differences from the original degree sequence based on the degree sequence of the original graph.

[0124] S21: Given a undirected graph G with n nodes and a positive integer k, the graph is called k-anonymous if and only if each node in the graph has the same degree as at least k-1 other nodes, and the degree sequence of the graph is called k-anonymous degree sequence.

[0125] S22: Anonymity group division is performed on the degree sequence of the original graph.

[0126] The k-anonymous degree sequence can be used to protect the privacy of graph data, so that the probability of successful attack on a specific node by an attacker is less than To reduce the computational complexity, the degree sequence input is sorted, and the anonymity groups are divided according to the degree sorting from large to small, and k nodes are selected in each anonymity group; when the number of nodes in the last group is less than k, the last group is merged with the previous group, so that the number of nodes in each group is greater than or equal to k. The number of anonymity groups is s, where The number of elements in each anonymity group s i is k≤s i ≤(2k-1).

[0127] S23: Difference matrix F s×2 is constructed according to the anonymity group division.

[0128] Difference matrix F s×2 is constructed according to the divided anonymity groups (a total of s groups), and the two columns of the matrix represent the difference between the degree within the group and the average degree within the group The difference between the degree within the group and the average degree within the group where j={1,2,...,s}. and are calculated as follows:

[0129]

[0130] where, represents the average value of d i ∈s j , that is, the average value of the jth anonymity group.

[0131] S24: Beam search probability matrix P s×2 is constructed according to difference matrix F s×2 , including:

[0132] The matrix elements of P s×2 and and are calculated as follows:

[0133]

[0134] and respectively represent the beam search selection with the probability.

[0135] If the element is in the first column of the beam search probability matrix, the degree sequence of the corresponding anonymous group is reduced; otherwise, it is increased. If the element value is 0, the degree sequence of the corresponding anonymous group is taken as the average value of the group.

[0136] S25: Construct the k-anonymous degree sequence according to the obtained beam search probability matrix.

[0137] First, select the element with the maximum probability from the matrix, and if the element is in the first column of the probability matrix, the degree sequence of the corresponding anonymous group is reduced; otherwise, it is increased. Then select the element with the maximum probability from the other groups in the other column of the matrix, and if the element is in the first column of the probability matrix, the degree sequence of the corresponding anonymous group is reduced; otherwise, it is increased. The above operation is alternately performed on the non-zero elements in the matrix until the k-anonymous degree sequence is constructed.

[0138] S26: Select the appropriate k-anonymous degree sequence by the sum of the differences between the front and back degree sequences of the k-anonymous.

[0139] According to the k-anonymous degree sequence obtained in step S25, calculate the sum of the differences between the front and back degree sequences of the k-anonymous Δd, and the calculation formula is as follows: where d i and represent the degrees of the front and back nodes of the k-anonymous respectively. The selected k-anonymous degree sequence should make Δd as small as possible, and the sum of the degrees of all nodes should be even.

[0140] Step S3: input the original graph and the anonymous degree sequence as labels, learn the graph embedding model through the deep neural network, and output the generated adjacency strength matrix.

[0141] When generating the adjacency strength matrix of the graph, the structure information and topological features of the original graph should be fully utilized to obtain the predicted labels of the nodes in the original graph through the GNN model. Through the loss function between the predicted labels and the real labels, the loss function gradient is propagated back to the model, and the allocation matrix is updated through the Adam optimization algorithm. The adjacency strength matrix in the network is updated using the allocation matrix, and the final adjacency matrix strength A s is output.

[0142] S31: The label of node v i is denoted as y i , and the labels of all nodes form a node label set Y, i.e. The predicted label of node v i is denoted as , and the predicted label set is denoted as X represents the feature matrix of the graph G, X R n×F , F represents the feature dimension of the node, and the feature matrix initialization X adopts a method in the GNN network.

[0143] In the GNN network, the GNN layer is mainly composed of a GCN network and an MLP hidden layer, the GCN is a neural network layer, and the propagation mode from the l layer to the l+1 layer is:

[0144]

[0145] Among them, A represents an adjacency matrix containing itself, I n represents a unit matrix, D represents a degree matrix containing itself, H (l) is the representation matrix of the node in the l layer, W (l) is a trainable parameter matrix, and sigma represents a nonlinear activation function.

[0146] The propagation mode of the MLP hidden layer is:

[0147] H (l+1) =σ(W (l) H (l) +b (l) );

[0148] Among them, b (l) is a bias term, H (l) is the representation matrix of the node in the l layer, W (l) is a trainable parameter matrix, and sigma represents a nonlinear activation function. The input of the network at the beginning is H (0) , b (0) and W (0) , wherein H (0) is the feature matrix X of the graph G, and the values of b (0) and W (0) are obtained by random initialization.

[0149] S32: Taking the adjacency matrix A and the feature matrix X of the original graph as input, the representation matrix H (l) of the node is obtained through the GNN network.

[0150] The GNN network is constructed as follows:

[0151] H (l+1) =GCN(MLP(A,H (l) ));

[0152] S33: Taking the k-anonymity sequence obtained in step 2 as the label of the node.

[0153] S34: learning to generate assignment matrix C using graph neural network (l) and simultaneously learning representation feature matrix H (l) :

[0154] C (l) = σ(ε(A (l) , X (l) ))

[0155] H (l) = ε(A (l) , X (l) )

[0156] where ε(·) denotes graph neural network GNN, A (l) and X (l) denote l-layer adjacency strength matrix and node feature matrix, respectively.

[0157] S35: according to the learned assignment matrix C (l) , get l+1-layer adjacency strength matrix A (l+1) and node feature matrix X (l+1) :

[0158]

[0159]

[0160] S36: when reaching the last layer of GNN network, output embedding matrix E, and map the graph embedding matrix to the predicted label through a specific function Z(·).

[0161] where embedding matrix E is the last layer representation matrix H (l) .

[0162] S37: through the results of real label and predicted label, back-propagation modifies parameter matrix W (l) and updates assignment matrix C (l) .

[0163] To solve the non-convex optimization problem existing in the training process, the method uses auxiliary connection prediction target to train GNN, and minimizes loss function L l in each layer:

[0164]

[0165] where L c denotes node label classification cross-entropy loss function, and ‖·‖ F denotes Frobenius norm.

[0166] S38: After repeating steps S33 to S37 for m iterations, a final generated adjacency strength matrix A is obtained s .

[0167] Step S4: According to the difference between the degree sequence before and after anonymization, the original graph is subjected to edge perturbation (adding edges, deleting edges, and exchanging edges) based on the generated adjacency strength matrix, and finally an anonymous graph is obtained.

[0168] S41: The edge perturbation involved in this method includes three basic operations: edge addition, edge deletion, and edge exchange, as follows:

[0169] 1) Edge addition: add edges (v i ,v j ) according to the needs of the k-anonymous sequence. When the sum of the degrees of the nodes after graph anonymization is greater than that before anonymization, the edge addition operation is adopted;

[0170] 2) Edge deletion: delete edges (v j ,v p ) according to the needs of the k-anonymous sequence. When the sum of the degrees of the nodes after graph anonymization is less than that before anonymization, the edge deletion operation is adopted;

[0171] 3) Edge exchange: add edges (v j ,v p ) and delete edges (v i ,v j ) according to the needs of the k-anonymous sequence. When the sum of the degrees of the nodes after graph anonymization is equal to that before anonymization, the edge exchange operation is adopted.

[0172] S42: Two auxiliary arrays for each node v s are constructed based on the adjacency strength matrix A i and the adjacency matrix A. For each node v i , the nodes in its neighbor set N(v i ) are divided into a group, and each node in the group is sorted in ascending order according to the strength value corresponding to v s in the adjacency strength matrix A i , and the resulting auxiliary array is denoted as Correspondingly, for each node v i , the nodes not in its neighbor set N(v i ) are divided into a group, and each node in the group is sorted in ascending order according to the strength value corresponding to v s in the adjacency strength matrix A i , and the resulting auxiliary array is denoted as Therefore and represent the two nodes with the weakest strength in the two auxiliary arrays, respectively.

[0173] S43: Calculate the difference between the anonymized and unanonymized degree sequences, and perform edge perturbation based on the array obtained in S42.

[0174] First, by comparing the nodes... and d i To determine whether to add or delete an edge, where the degree after anonymization is... This involves selecting a suitable k-anonymity sequence. Specifically, the degree difference α i The calculation formula is as follows:

[0175] Then based on the degree difference α i The symbols are used to perturb the edges of the original graph. The specific method is as follows:

[0176] 1) When v i degree difference α i When the value is less than 0, perform an edge deletion operation and delete the edge.

[0177] 2) When v i degree difference α i When the value is greater than 0, perform an edge addition operation to add edges.

[0178] 3) When v i degree difference α i When the edge ratio is 0, perform an edge swap operation, first adding an edge. Delete the edge again

[0179] S44: Anonymous adjacency matrix A obtained after edge perturbation in S43. * :S p (A,A s → A * ;

[0180] Where S p (·) denotes the edge perturbation operation, based on the anonymous adjacency matrix A. * Finally, the anonymous graph G was obtained. * .

[0181] S45: The anonymous graph G obtained from the output * To conduct an evaluation.

[0182] Evaluation metrics include average shortest path length, clustering coefficient, node degree centripetality, etc.

[0183] In summary, in this embodiment, a new generation algorithm is proposed for k-anonymity sequence, and beam search and anonymous group are used to reduce the algorithm complexity and generate the corresponding k-anonymity sequence faster. The proposed graph neural network model is used for anonymization of the graph, and the model is trained in an end-to-end learning framework in a supervised manner to obtain the trained allocation matrix and extract the structural feature information of the original graph. The edge perturbation method based on the adjacent strength matrix and the difference between the degree sequence before and after anonymization maximizes the preservation of the structural information of the original graph and effectively solves the balance problem between data availability and privacy protection.

[0184] Embodiment 3

[0185] Embodiment 3 of the present application provides a non-transitory computer readable storage medium for storing computer instructions, which, when executed by a processor, implements a graph data privacy protection method based on edge perturbation, which comprises:

[0186] obtaining an original graph to be anonymized;

[0187] processing the original graph to be anonymized using the trained graph embedding model to obtain an adjacent strength matrix;

[0188] performing edge perturbation on the original graph according to the difference between the degree sequence of the original graph and the anonymous degree sequence, combined with the adjacent strength matrix, to obtain a final anonymous graph; wherein the degree sequence that meets the anonymity requirement and has the minimum difference sum with the degree sequence of the original graph is generated as the anonymous degree sequence according to the degree sequence of the original graph.

[0189] Embodiment 4

[0190] Embodiment 4 of the present application provides a computer program (product) comprising a computer program which, when running on one or more processors, is used to implement a graph data privacy protection method based on edge perturbation, which comprises:

[0191] obtaining an original graph to be anonymized;

[0192] processing the original graph to be anonymized using the trained graph embedding model to obtain an adjacent strength matrix;

[0193] performing edge perturbation on the original graph according to the difference between the degree sequence of the original graph and the anonymous degree sequence, combined with the adjacent strength matrix, to obtain a final anonymous graph; wherein the degree sequence that meets the anonymity requirement and has the minimum difference sum with the degree sequence of the original graph is generated as the anonymous degree sequence according to the degree sequence of the original graph.

[0194] Embodiment 5

[0195] Embodiment 5 of the present application provides an electronic device, comprising: a processor, a memory and a computer program; wherein the processor is connected with the memory, and the computer program is stored in the memory; when the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes instructions for implementing an edge perturbation-based graph data privacy protection method, the method comprising:

[0196] obtaining an original graph to be anonymized;

[0197] processing the original graph to be anonymized by using a trained graph embedding model to obtain an adjacency strength matrix;

[0198] performing edge perturbation on the original graph according to a difference between a degree sequence of the original graph and an anonymous degree sequence in combination with the adjacency strength matrix to obtain a final anonymous graph; wherein the anonymous degree sequence is generated according to the degree sequence of the original graph and meets the anonymity requirement and has a minimum difference sum with the degree sequence of the original graph.

[0199] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0200] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system) and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that performs the functions specified in one or more flows and / or blocks.

[0201] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction apparatus, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that performs the functions specified in one or more flows and / or blocks.

[0202] These computer program instructions can also be loaded into computer or other programmable data processing devices, to cause a series of operational steps to be performed on the computer or other programmable devices, so that the computer implemented processes are generated, and the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in the flowchart Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0203] The above description is made in connection with the preferred embodiments of the application, and is not intended to limit the scope of the application. Those skilled in the art should understand that various modifications or variations can be made to the disclosed technical solutions without departing from the scope of the application.

Claims

1. A method for privacy protection of graph data based on edge perturbation, characterized in that, The method comprises the following steps: obtaining an original graph to be anonymized; processing the original graph to be anonymized by using a trained graph embedding model to obtain an adjacency strength matrix; performing edge perturbation on the original graph according to the difference between the degree sequence of the original graph and the anonymity degree sequence and combining the adjacency strength matrix to obtain a final anonymous graph; wherein the anonymity degree sequence is generated according to the degree sequence of the original graph, and the degree sequence meets the anonymity requirement and has the minimum difference sum with the degree sequence of the original graph; wherein the degree sequence of the original graph is sorted, and the original graph is divided into anonymity groups from large to small according to the degree sorting; a difference matrix is constructed according to the anonymity group division; a beam search probability matrix is constructed according to the difference matrix; the anonymity degree sequence is constructed according to the beam search probability matrix; and the appropriate anonymity degree sequence is selected as the final anonymity degree sequence by minimizing the total sum of the difference between the degree sequences before and after anonymity. Two auxiliary arrays of each node of the original graph are constructed by using the adjacency strength matrix and the adjacency matrix of the original graph: for each node of the original graph, the nodes in the neighbor set of the node are divided into a group, and each node in the group is sorted from small to large according to the strength value corresponding to the node in the adjacency strength matrix to obtain a first auxiliary array; for each node, the nodes not belonging to the neighbor set of the node are divided into a group, and each node in the group is sorted from small to large according to the strength value corresponding to the node in the adjacency strength matrix to obtain a second auxiliary array; the difference between the degree sequence of the original graph and the anonymity degree sequence is calculated, and edge perturbation is performed on the original graph according to the first auxiliary array and the second auxiliary array to obtain an anonymous adjacency matrix; and the final anonymous graph is obtained according to the anonymous adjacency matrix.

2. The edge-perturbation-based graph data privacy protection method according to claim 1, characterized in that, The graph embedding model is trained, comprising: obtaining a training set, the training set comprising a plurality of original graphs and corresponding anonymity degree sequence labels of the original graphs; obtaining a predicted anonymity degree sequence label of each node in the original graph by using a GNN model; and updating a distribution matrix by back-propagating the loss function gradient between the predicted anonymity degree sequence label and the real anonymity degree sequence label back to the model and using the Adam optimization algorithm; and iteratively updating the adjacency strength matrix in the network by using the distribution matrix until the loss function value is minimized to obtain the trained graph embedding model.

3. The edge-perturbation-based graph data privacy protection method according to claim 2, characterized in that, Obtain the degree sequence of the original graph, including: an undirected graph represented as G(V,E), where V represents the set of nodes, E represents the set of edges, n = |V| represents the number of nodes in the graph, and v i ∈V represents a node in the graph, e ij =(v i ,v j )∈E represents node v in the graph i and node v j There are adjacency relationships; the set of neighboring nodes of node v is N(v)={u∈V|(v,u)∈E}, representing the set of all nodes in the graph that are adjacent to node v; A∈R n×n Let e ​​be the adjacency matrix of the graph, representing the adjacency relationships between nodes in the graph. ij When ∈E, A ij =1; when At that time, A ij =0; node v i The degree is represented by node d i d i =|N(v)|, then the original graph degree sequence is represented by the vector d = [d1, d2, ..., dn]. n [Use ] to represent.

4. The edge-perturbation-based graph data privacy protection method according to claim 3, characterized in that, The edge perturbation comprises edge addition, edge deletion and edge exchange: when the sum of the node degrees after graph anonymity is greater than that before anonymity, the edge addition operation is adopted; when the sum of the node degrees after graph anonymity is less than that before anonymity, the edge deletion operation is adopted; when the sum of the node degrees after graph anonymity is equal to that before anonymity, the edge exchange operation is adopted.

5. A system for privacy preserving of graph data based on edge perturbation, the system comprising: The method comprises the following steps: an acquisition module is configured to acquire an original graph to be anonymized; a graph embedding module is configured to process the original graph to be anonymized by using a trained graph embedding model to obtain an adjacency strength matrix; The edge perturbation module is configured to perform edge perturbation on the original graph according to the difference between the degree sequence of the original graph and the anonymous degree sequence and in combination with the adjacency strength matrix, to obtain the final anonymous graph; wherein the anonymous degree sequence is generated according to the degree sequence of the original graph, and the anonymous degree sequence meets the anonymity requirement and has the minimum sum of differences from the degree sequence of the original graph; wherein the degree sequence of the original graph is sorted, and the anonymous groups are divided according to the degree sorting from large to small; the difference matrix is constructed according to the anonymous group division; the beam search probability matrix is constructed according to the difference matrix; the anonymous degree sequence is constructed according to the beam search probability matrix; and the appropriate anonymous degree sequence is selected as the final anonymous degree sequence by minimizing the sum of differences between the anonymous degree sequences before and after the degree sequence. Two auxiliary arrays of each node of the original graph are constructed through the adjacency strength matrix and the adjacency matrix of the original graph: for each node of the original graph, the nodes in the neighbor set of the node are divided into a group, and each node in the group is sorted in ascending order according to the strength value corresponding to the node in the adjacency strength matrix, to obtain a first auxiliary array; for each node, the nodes not belonging to the neighbor set of the node are divided into a group, and each node in the group is sorted in ascending order according to the strength value corresponding to the node in the adjacency strength matrix, to obtain a second auxiliary array; the difference between the degree sequence of the original graph and the anonymous degree sequence is calculated, and the original graph is subjected to edge perturbation according to the first auxiliary array and the second auxiliary array, to obtain an anonymous adjacency matrix; and the final anonymous graph is obtained according to the anonymous adjacency matrix.

6. A non-transitory computer-readable storage medium, comprising, The non-transitory computer readable storage medium is configured to store computer instructions, which are executed by a processor to implement the edge-perturbation-based graph data privacy protection method according to any one of claims 1-4.

7. A computer program product, characterised in that, The computer program is configured to implement the edge-perturbation-based graph data privacy protection method according to any one of claims 1-4 when running on one or more processors.

8. An electronic device, comprising: The computer program is configured to implement the edge-perturbation-based graph data privacy protection method according to any one of claims 1-4 when running on one or more processors. The computer program is configured to implement the edge-perturbation-based graph data privacy protection method according to any one of claims 1-4 when running on one or more processors.

Citation Information

Patent Citations

  • Social network data privacy protection method based on graph primitives

    CN107729767A

  • Vehicle driving behavior prediction method based on WGCN

    CN114926823A