A method, device, equipment and medium for processing graph data

By establishing additive shared secrets and using two-stage encrypted communication protocols in the security inference of graph neural networks, some operations are migrated to the user side, and obfuscated logic circuits are used for data processing, the problems of low security inference efficiency and large communication overhead in the existing technology are solved, and safe and efficient graph data processing is achieved.

CN115580443BActive Publication Date: 2025-03-14XI AN JIAOTONG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211155711.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-22
Publication Date
2025-03-14
Estimated Expiration
2042-09-22

AI Technical Summary

Technical Problem

In the prior art, the security inference of graph neural networks has problems such as low efficiency and large communication overhead, especially when processing graph data containing customer sensitive information, it is difficult to ensure information security and inference efficiency.

Method used

By establishing an additive shared secret between the user and the server, and using a two-stage encrypted communication protocol, some operations are migrated to the user for processing, and data processing is used to use obfuscation logic circuits to achieve safe and efficient graph data processing.

Benefits of technology

It realizes that while ensuring information security, the efficiency of graph data processing and reduce communication overhead are improved, ensuring that the server cannot obtain the privacy graph data of the user side, and at the same time avoiding the risk of the user side obtaining the server model parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115580443B_ABST
    Figure CN115580443B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and medium for processing graph data. A user end and a server end, as participants in a two-party semi-honest adversary model, execute the processing method: the user end receives input data and generates an additive shared secret; the user end performs a first operation based on the input data to obtain a noisy node embedding matrix; the user end transmits the noisy node embedding matrix to the server end in plain text; the server end processes using a neural network model to obtain an inference result, and the inference result and the additive shared secret constitute an additive secret sharing pair; the server end and the user end use an oblivious transfer protocol to exchange relevant labels; the user end uses an obfuscated logic circuit based on the inference result and the label of the additive shared secret to obtain the processing result. The present invention enables the user end and the server end to form a semi-honest adversary model, and realizes safe and efficient graph data processing under the premise that the graph data and the parameters of the neural network model are not obtained by the other party.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data analysis technology, and in particular to a method, device, equipment and medium for processing graph data. Background Art

[0002] In recent years, graph neural network models have gradually become one of the popular methods for solving various graph data tasks. Many companies regard graph neural network models as their core competitiveness and provide corresponding neural network reasoning services to customers. However, in the application practice of using graph neural network reasoning as a service, on the one hand, graph data may contain sensitive customer information, and the information security of graph data needs to be protected; on the other hand, the graph neural network model held by the service provider is its own core competitiveness, and there is a risk of model parameter leakage in the process of reasoning services.

[0003] In the prior art, the secure reasoning placement of graph neural networks is achieved by providing the user's graph data in the form of ciphertext to the server for reasoning, and the server then implements graph neural network reasoning on the ciphertext based on the graph data ciphertext. However, this method has problems such as long time consumption and high communication overhead.

[0004] Therefore, it is necessary to develop a graph data processing method to solve the problems of low security reasoning efficiency and high communication overhead in graph data processing. Summary of the invention

[0005] In view of the above problems, embodiments of the present invention provide a method, apparatus, device and medium for processing graph data, so as to overcome the above problems or at least partially solve the above problems.

[0006] In a first aspect of an embodiment of the present invention, a method for processing graph data is provided. A user end and a server end, as participants in a two-party semi-honest adversary model, execute the steps in the processing method:

[0007] The user end receives input data and generates an additive shared secret between the user end and the server end; the input data includes graph data to be processed and a propagation phase parameter K;

[0008] The user terminal performs a first operation according to the input data to obtain a noisy node embedding matrix; the noisy node embedding matrix represents a feature matrix that performs K-times neighborhood feature propagation and aggregation on graph nodes to achieve node embedding representation enhancement;

[0009] The user end transmits the noise-added node embedding matrix to the server end in plain text;

[0010] The server processes the noisy node embedding matrix using a graph neural network model to obtain an inference result, wherein the inference result and the additive shared secret constitute an additive secret sharing pair;

[0011] The server and the client exchange the label of the inference result and the label of the additive shared secret using an oblivious transfer protocol;

[0012] The user end obtains a processing result by using an obfuscated logic circuit according to the label of the inference result and the label of the additive shared secret.

[0013] Optionally, the client receives input data and generates an additive shared secret between the client and the server, including:

[0014] receiving the input data;

[0015] Establishing encryption communication rules between the user end and the server end, wherein the encryption communication rules include a public key and a private key;

[0016] An additive shared secret between the client and the server is generated according to the input data and the encryption communication rule.

[0017] Optionally, the server pre-stores graph neural model parameters M and model noise β; the user terminal generates an additive shared secret between the user terminal and the server terminal according to the input data and the encryption communication rule, including:

[0018] According to the graph data to be processed in the input data and the propagation stage parameter K, a characteristic propagation matrix is ​​obtained.

[0019] According to the preset data noise r, the characteristic propagation matrix Perform noise processing to obtain the feature propagation matrix after noise addition

[0020] According to the encryption communication rule, the noise-added feature propagation matrix Encrypt and get the first ciphertext

[0021] The first ciphertext The public key pk in the encryption communication rule is transmitted to the server;

[0022] The server, based on the model noise β and the graph neural model parameter M, And the public key pk, the calculated second ciphertext and sending it to the user terminal;

[0023] The user end uses the private key sk in the encryption communication rule to encrypt the second ciphertext Decrypt and get the plaintext Use it as an additive shared secret between the client and the server The data is stored on the user side.

[0024] Optionally, the user terminal performs a first operation according to the input data to obtain a noisy node embedding matrix, including:

[0025] According to the graph data to be processed, a normalized adjacency matrix is ​​obtained and node feature matrix X;

[0026] According to the propagation phase parameter K, and the normalized adjacency matrix Get the second adjacency matrix

[0027] Performing noise processing on the node feature matrix X to obtain a noisy node feature matrix (Xr);

[0028] According to the second adjacency matrix And the noise node feature matrix (Xr), perform neighborhood feature propagation and aggregation to obtain the noise node embedding matrix

[0029] Optionally, the server pre-stores the neural model parameter M and the model noise β; the server processes the noisy node embedding matrix using the neural network model to obtain an inference result, including:

[0030] According to the neural model parameter M and the model noise β, the server uses the neural network model to process the noisy node embedding matrix Get the inference result

[0031] Optionally, the server and the client use an oblivious transfer protocol to exchange the label of the inference result and the label of the additive shared secret, including:

[0032] The server constructs an obfuscated truth table corresponding to the obfuscated logic circuit and sends it to the user end;

[0033] The server and the client use the oblivious transfer protocol to exchange the obfuscated logic circuit, the label of the inference result, and the label of the additive shared secret.

[0034] Optionally, the user terminal obtains a processing result by using an obfuscated logic circuit according to the label of the inference result and the label of the additive shared secret, including:

[0035] Inputting the label of the inference result and the label of the additive shared secret into the summing circuit of the obfuscated logic circuit to obtain a processed inference result;

[0036] The processed inference result is input into the softmax circuit of the obfuscation logic circuit to obtain the processed result.

[0037] A second aspect of an embodiment of the present invention further provides a graph data processing device, characterized in that the device includes a user end and a server end;

[0038] The user terminal comprises:

[0039] A receiving module, used to receive input data and generate an additive shared secret between the user end and the server end; the input data includes the graph data to be processed and a propagation phase parameter K;

[0040] A first processing module is used to perform a first operation according to the input data to obtain a noisy node embedding matrix; the noisy node embedding matrix represents a feature matrix that performs K-times neighborhood feature propagation and aggregation on the graph nodes to achieve node embedding representation enhancement;

[0041] A first transmission module, used for transmitting the noise-added node embedding matrix to a server in plain text;

[0042] A first exchange module, configured to exchange the label of the inference result and the label of the additive shared secret with the server using an oblivious transfer protocol;

[0043] The determination module is used to obtain a processing result by using an obfuscated logic circuit according to the label of the inference result and the label of the additive shared secret.

[0044] The server includes:

[0045] An inference module, configured to process the noisy node embedding matrix using a neural network model to obtain an inference result, wherein the inference result and the additive shared secret constitute an additive secret sharing pair;

[0046] The second exchange module is used to exchange the label of the inference result and the label of the additive shared secret with the user terminal by using the oblivious transfer protocol.

[0047] A third aspect of an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps in the method for processing image data described in the first aspect of an embodiment of the present invention.

[0048] The fourth aspect of the embodiments of the present invention further provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps in the method for processing graph data described in the first aspect of the embodiments of the present invention are implemented.

[0049] The method provided by the embodiment of the present invention includes: first, a user end receives input data and generates an additive shared secret between the user end and a server end; the user end performs a first operation based on the input data to obtain a noisy node embedding matrix; then, the user end and the server end, as participants in a two-party semi-honest adversary model, perform the following steps: the user end transmits the noisy node embedding matrix to the server end in plain text; the server end processes using a neural network model to obtain an inference result, and the inference result and the additive shared secret constitute an additive secret sharing pair; the server end and the user end use an oblivious transfer protocol to exchange labels of the inference result and labels of the additive shared secret; finally, the user end uses an obfuscated logic circuit based on the label of the inference result and the label of the additive shared secret to obtain a processing result.

[0050] The beneficial effects of this embodiment are as follows:

[0051] 1) Information security. This embodiment assumes that the user end and the server end constitute a two-party semi-honest adversary model, and migrates part of the calculation to the user end for processing, so that the server end cannot obtain the user end's private graph data, and the user end cannot obtain the important parameters of the server end's graph neural network model.

[0052] 2) High data processing efficiency. This embodiment adopts a two-stage encryption communication protocol, which is different from the direct full-process encryption communication protocol. The time-consuming and communication-intensive ciphertext calculation process mainly exists in the preprocessing stage of the system (the corresponding part is: the user end receives input data and generates an additive shared secret between the user end and the server end); so that subsequent operations mainly perform plaintext calculations, and thus high-performance concurrent operations can be performed with the help of GPUs, effectively reducing the time and communication overhead of online reasoning.

[0053] 3) Wide range of applications. This embodiment uses obfuscated logic circuits to represent nonlinear functions. For different functions, a suitable layer, such as MLP, can be added to the output end of the graph neural network model layer, and then a logic circuit is used to construct an appropriate output nonlinear function to meet different task requirements. Therefore, the method proposed in this embodiment can be widely used in various task scenarios such as node classification, graph classification, and relationship extraction. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0055] Figure 1 It is a flowchart of a method for processing graph data provided by an embodiment of the present invention;

[0056] Figure 2 It is a schematic diagram of a calculation process of a confusion logic circuit provided by an embodiment of the present invention;

[0057] Figure 3 is a structural schematic diagram of a graph data processing device provided by an embodiment of the present invention;

[0058] Figure 4 It is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The exemplary embodiments of the present invention will be described in more detail below in conjunction with the accompanying drawings in the embodiments of the present invention. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0060] The embodiment of the present invention provides a method for processing graph data, referring to Figure 1 , Figure 1 A flowchart of a method for processing graph data provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the user end and the server end, as participants in the two-party semi-honest adversary model, execute the steps in the processing method:

[0061] Step 101, the user terminal receives input data and generates an additive shared secret between the user terminal and the server terminal; the input data includes graph data to be processed and a propagation phase parameter K;

[0062] In order to improve the processing efficiency of the subsequent server-side reasoning stage using the graph neural network model, this embodiment first creates an additive shared secret between the user end and the server end to facilitate secure denoising based on the additive shared secret in the graph neural network model reasoning stage. In this embodiment, the input data at least includes the graph data to be processed. In general, graph data represents a set of nodes and edges, and the input graph data is generally expressed as G = (V, E) or G = (V, E, X), where V represents nodes, E represents edges, and X represents the graph node feature matrix. The propagation stage parameter K here belongs to the non-private model parameter in the graph neural network model of the server end, that is, the user end cannot obtain the relevant information of the server end's training data only from the K value, so in an embodiment of the present application, the propagation stage parameter K can be sent to the user end through the server end.

[0063] In this embodiment, the user end and the server end are used as participants to form a two-party semi-honest adversary model. In this model, both parties will correctly execute the protocol and will not violate the protocol, but both parties will save the intermediate calculation state of the protocol and will try to obtain the other party's private information from various types of information they have obtained. The privacy protection goal of this embodiment can be expressed as: under the premise of ensuring that the user end's private graph data and the value of the graph neural network model parameter M of the server end are not obtained by the other party, the user end can finally obtain the result of the graph data inferenced by the graph neural network model of the server end. The above-mentioned graph data processing method proposed in this embodiment can be widely used in various image processing technology fields such as image classification and image recognition.

[0064] In one embodiment, a client receives input data and generates an additive shared secret between the client and a server, including:

[0065] receiving the input data;

[0066] Establishing an encryption communication rule between the user end and the server end, wherein the encryption communication rule includes a public key pk and a private key sk;

[0067] An additive shared secret between the client and the server is generated according to the input data and the encryption communication rule.

[0068] This embodiment first generates an encryption communication rule, and uses the encryption communication rule and the graph data in the input data to generate an additive shared secret between the user end and the server end, so as to facilitate secure denoising based on the additive shared secret in the graph neural network model reasoning phase, facilitate the subsequent generation of complete reasoning results, and lay the foundation for improving the efficiency of the online reasoning part.

[0069] In one embodiment, the server pre-stores graph neural model parameters M and model noise β; the client generates an additive shared secret between the client and the server according to the input data and the encryption communication rule, including:

[0070] According to the graph data to be processed in the input data and the propagation stage parameter K, a characteristic propagation matrix is ​​obtained.

[0071] According to the preset data noise r, the characteristic propagation matrix Perform noise processing to obtain the feature propagation matrix after noise addition

[0072] According to the encryption communication rule, the noise-added feature propagation matrix Encrypt and get the first ciphertext

[0073] The first ciphertext The public key pk in the encryption communication rule is transmitted to the server;

[0074] The server side calculates the first ciphertext according to the preset model noise β, the graph neural model parameter M, And the public key pk, the calculated second ciphertext and sending it to the user terminal;

[0075] The user end uses the private key sk in the encryption communication rule to encrypt the second ciphertext Decrypt and get the plaintext Use it as an additive shared secret between the client and the server The data is stored on the user side.

[0076] In this embodiment, first, according to the graph data G = (V, E) or G = (V, E, X) to be processed in the input data and the propagation stage parameter K, the characteristic propagation matrix is ​​obtained. Specifically, first calculate the normalized adjacency matrix of the graph based on the graph data in for The degree matrix, A is the adjacency matrix, I is the identity matrix, and the normalized adjacency matrix Elements Represents the topological importance of node j relative to node i in the graph, where d i is the degree of node i, a ij is the corresponding value in the adjacency matrix A. After determining the normalized adjacency matrix Then, the characteristic propagation matrix is ​​calculated using the propagation phase parameter K

[0077] Then, according to the preset data noise r, the feature propagation matrix Perform noise processing to obtain the feature propagation matrix after noise addition Specifically, a random vector may be generated according to the graph data structure as the preset data noise r. The preset data noise r is determined by the structure and size of the graph data to be processed, so a random data noise r needs to be regenerated each time the input graph data to be processed is different.

[0078] Then, according to the encrypted communication rules, the noise-added feature propagation matrix Encrypt and get the first ciphertext The first ciphertext The public key pk in the encryption communication rule is transmitted to the server. Specifically, the user end can use a random key generation tool to generate a public key pk and a private key sk, and then encrypt them to obtain the first ciphertext The ciphertext and the public key pk are transmitted to the server, where Enc() represents the encryption operation.

[0079] The server calculates the first ciphertext based on the model noise β, the graph neural model parameter M, and the And the public key pk, the calculated second ciphertext Specifically, the server generates a random vector as the model noise β according to the graph neural network model parameters in advance. The model noise β is determined by the graph neural network model parameters. Compared with the previous data noise r, since the model parameters do not change easily, the model noise β can be used continuously and does not need to change with the changes of the graph data to be processed. Then, based on the ciphertext, the second ciphertext is calculated according to the linear homomorphic encryption algorithm rules And send it to the user end.

[0080] The client receives the second ciphertext Afterwards, the private key sk in the encrypted communication rule is used to decrypt and obtain the plaintext Use it as an additive shared secret between the client and the server The data is stored in the user terminal. Thus, an additive shared secret is created between the user terminal and the server terminal, and the additive shared secret can provide support for the subsequent noise removal of the inference result of the model.

[0081] In this process, the data sent by the client to the server is encrypted. Since the user end uses an asymmetric encryption algorithm, the server end cannot decrypt the ciphertext and cannot infer the specific graph data from the ciphertext, which ensures that the user end’s private data will not be leaked. After the server end completes the calculation, the data obtained by the user end is Assume that the user is malicious at this time, but since the user has no way of knowing the value of the model noise β, he naturally cannot use the information he has mastered The value of the parameter M of the graph neural network model on the server is inferred, which effectively prevents inference attacks from malicious users. It can be seen that in this part of the operation process, the user and the server together constitute a two-party semi-honest adversary model, ensuring the information security of the operation reasoning.

[0082] In addition, under the premise of ensuring the security of the reasoning of the graph neural network model, in order to improve the reasoning efficiency, this embodiment adopts a two-stage encryption communication protocol. Different from the direct full-process encryption communication protocol (i.e., the user end encrypts the graph data and sends it to the server end, and the server end directly processes the encrypted graph data), the ciphertext calculation process of this embodiment mainly exists in the preprocessing stage (corresponding to the content of step 101 of this embodiment). In other words, the content of subsequent steps 102 to 106 belongs to the secure online reasoning stage, which mainly performs plaintext calculations, because it can effectively reduce the time overhead and communication overhead of online reasoning.

[0083] Step 102, the user terminal performs a first operation according to the input data to obtain a noisy node embedding matrix; the noisy node embedding matrix represents a feature matrix that implements K-times neighborhood feature propagation and aggregation of graph nodes to achieve node embedding representation enhancement;

[0084] In general, in order to ensure the privacy of graph data, the graph data to be processed is encrypted and sent directly from the user end to the server end, which performs all calculations and reasoning, and finally returns the reasoning results to the user end. However, this will cause the server end to have a large communication overhead and take a long time to operate on the encrypted graph data. This embodiment migrates part of the operations (corresponding to the first operation) in the graph neural network model that do not depend on the model parameter M to the user end, so that part of the operations can be performed in advance on the user end. This part of the operation does not need to consider the information interaction problem between the user end and the server end, and naturally there is no privacy and security problem, while avoiding the communication overhead based on encrypted graph data.

[0085] In one embodiment, the user terminal performs a first operation according to the input data to obtain a noisy node embedding matrix, including:

[0086] Step 1021, obtaining a normalized adjacency matrix according to the graph data to be processed and node feature matrix X;

[0087] First, according to the graph data G = (V, E, X), the node feature matrix X and the normalized adjacency matrix of the graph data are obtained. in for The degree matrix, A is the adjacency matrix, the normalized adjacency matrix Elements Represents the topological importance of node j relative to node i in the graph, where d i is the degree of node i, a ij is the corresponding value in the adjacency matrix A.

[0088] Step 1022: According to the propagation phase parameter K and the normalized adjacency matrix Get the second adjacency matrix

[0089] Step 1023, performing noise processing on the node feature matrix X to obtain a noisy node feature matrix (Xr);

[0090] Step 1024: According to the second adjacency matrix And the noise node feature matrix (Xr), perform neighborhood feature propagation and aggregation to obtain the noise node embedding matrix

[0091] Specifically, normalize the adjacency matrix The matrix obtained by performing a matrix multiplication with the noisy node feature matrix (Xr) is equivalent to the updated node embedding matrix obtained after each graph node receives the feature propagation from the first-order neighbor nodes and aggregates them. In order to make each graph node receive enough feature information from neighbor nodes, we can first repeat the normalized adjacency matrix Perform neighborhood feature propagation to obtain the second adjacency matrix The resulting noisy node embedding matrix It means that K times of feature propagation and aggregation are performed on the graph nodes (i.e., feature aggregation of neighbor nodes in K-hop neighborhoods is achieved), thus enhancing the node embedding representation.

[0092] Step 103, the user end transmits the noise-added node embedding matrix to the server end in plain text;

[0093] The noisy node embedding matrix obtained in step 102 is obtained by performing noise processing on the node feature matrix X of the graph data to obtain the noisy feature matrix (Xr), and then performing neighborhood propagation and aggregation on it to obtain the neighborhood-enhanced noisy node embedding matrix It can be seen that since the matrix has been noised, it can be directly transmitted to the server in plain text. However, since the server cannot obtain the data noise r, it is naturally unable to directly use the plain text to calculate the matrix. infer X or Therefore, in the two-party semi-honest adversary model, the user side directly sends the noisy node embedding matrix to the server side in plain text without causing the leakage of graph data.

[0094] Step 104, the server uses a graph neural network model to process the noisy node embedding matrix to obtain an inference result, and the inference result and the additive shared secret constitute an additive secret sharing pair;

[0095] The server embeds the noisy node matrix in the plain text received After that, the graph neural network model can be directly used to perform reasoning calculations on the plaintext noisy node embedding matrix, and perform noise processing to obtain the final reasoning result. In this embodiment, the server can directly perform reasoning operations on the plaintext data. Compared with the previous operation on encrypted graph data, this embodiment can use GPU for high-performance concurrent operations, because it can effectively reduce the time overhead of online reasoning and improve reasoning efficiency.

[0096] In one embodiment, the server pre-stores the neural model parameter M and the model noise β; the server processes the noisy node embedding matrix using the neural network model to obtain an inference result, including:

[0097] According to the neural model parameter M and the model noise β, the server uses the neural network model to process the noisy node embedding matrix Get the inference result

[0098] The server uses the graph neural network model to embed the noisy node into the matrix Perform inference and use model noise β to add noise, thus obtaining the inference result The inference result thus obtained is combined with the additive shared secret previously stored on the user side Constitute an additive secret sharing pair. Specifically, the reasoning result Shared Secret with Additive By summing, we can get

[0099] Step 105, the server and the client exchange the label of the inference result and the label of the additive shared secret using an oblivious transfer protocol;

[0100] After determining the inference result, the server constructs the obfuscated logic circuit and sends it to the user, allowing both parties to exchange the inference results based on the oblivious transfer protocol. The label and additive shared secret This is because if the inference result is directly returned to the user in plain text, the user can use the additive shared secret to infer Then the graph neural network model parameter M is obtained. This embodiment establishes a logical obfuscation circuit and then exchanges the labels of related lines based on the oblivious transfer protocol. In this process, even if the user end obtains the label of the inference result, it cannot obtain the true value of the inference result, and naturally cannot infer the graph neural network model parameter M, thereby ensuring the privacy security of the data of both parties under the condition that the user end and the server end are two semi-honest adversary models.

[0101] In one embodiment, the server and the client use an oblivious transfer protocol to exchange the label of the inference result and the label of the additive shared secret, including:

[0102] The server constructs an obfuscated truth table corresponding to the obfuscated logic circuit and sends it to the user end;

[0103] The server and the client use the oblivious transfer protocol to exchange the obfuscated logic circuit, the label of the inference result, and the label of the additive shared secret.

[0104] The server constructs an obfuscated circuit corresponding to the logic circuit for calculating the softmax function and sends it to the user. Specifically, first, the logical values ​​of all lines on the logic circuit are marked with string labels; then, the labels are used to replace the logical values ​​in the truth table and symmetrically encrypted to obtain an obfuscated truth table; finally, the truth table is sent to the user, and the server and the user use the oblivious transfer protocol to exchange the logic circuit and the labels on the relevant lines for subsequent calculation of the prediction results.

[0105] Step 106: The user terminal uses an obfuscated logic circuit to obtain a processing result according to the label of the inference result and the label of the additive shared secret.

[0106] The user end inputs the inference result and the label of the additive shared secret into the obfuscation logic circuit. Since the inference result and the additive shared secret constitute an additive secret sharing pair, the obfuscation logic circuit can input the sum of the additive shared secret pair into the softmax function for calculation to obtain the final processing result.

[0107] The method provided in this embodiment includes: first, the user end receives input data and generates an additive shared secret between the user end and the server end; the user end performs a first operation based on the input data to obtain a noisy node embedding matrix; then, the user end and the server end, as participants in a two-party semi-honest adversary model, perform the following steps: the user end transmits the noisy node embedding matrix to the server end in plain text; the server end processes using a neural network model to obtain an inference result, and the inference result and the additive shared secret constitute an additive secret sharing pair; the server end and the user end use an oblivious transfer protocol to exchange the label of the inference result and the label of the additive shared secret; finally, the user end uses an obfuscated logic circuit based on the label of the inference result and the label of the additive shared secret to obtain the processing result. On the one hand, this embodiment sets the user end and the server end as a two-party semi-honest adversary model, and migrates part of the operation to the user end for processing, so that it is ensured that the server end cannot obtain the private graph data of the user end, and the user end cannot obtain the important parameters of the graph neural network model of the server end. On the other hand, this embodiment adopts a two-stage encryption communication protocol, which is different from the direct full-process encryption communication protocol. The time-consuming and communication-intensive ciphertext calculation process mainly exists in the preprocessing stage of the system (the corresponding part is: the user end receives input data and generates an additive shared secret between the user end and the server end; the user end performs a first operation based on the input data to obtain a noisy node embedding matrix); thereby, subsequent operations mainly perform plaintext calculations, and thus high-performance concurrent operations can be performed with the help of GPUs, effectively reducing the time and communication overheads of online reasoning.

[0108] In one embodiment, reference Figure 2 , Figure 2 A schematic diagram of the calculation process of a confusing logic circuit is shown, Figure 2 As shown, the user terminal uses an obfuscated logic circuit to obtain a processing result according to the label of the inference result and the label of the additive shared secret, including:

[0109] Inputting the label of the inference result and the label of the additive shared secret into the summing circuit of the obfuscated logic circuit to obtain a processed inference result;

[0110] The processed inference result is input into the softmax circuit of the obfuscation logic circuit to obtain the processed result.

[0111] Specifically, the input of the logic obfuscation circuit consists of two parts, namely the additive shared secret factor of the user side and the server side, that is, the inference result and additive shared secret In the operation of the obfuscated logic circuit, the summing circuit is first used to sum the two to obtain the processed inference result. This is then input into the logic circuit that implements the softmax function In the end, the processing result is output and returned to the user. Taking the node classification task as an example, the final output processing result in the logic circuit represents the node category information. Similarly, if this system is applied to other graph data analysis tasks such as graph classification and relationship extraction, it can be achieved by simply modifying the logic circuit according to the final analysis function.

[0112] The present invention also provides a device for processing graph data. Figure 3 , Figure 3 A schematic diagram of the structure of a graph data processing device is shown in FIG. Figure 3 As shown, the device includes a user end and a server end;

[0113] The user terminal comprises:

[0114] A receiving module, used to receive input data and generate an additive shared secret between the user end and the server end; the input data includes the graph data to be processed and a propagation phase parameter K;

[0115] A first processing module is used to perform a first operation according to the input data to obtain a noisy node embedding matrix; the noisy node embedding matrix represents a feature matrix that performs K-times neighborhood feature propagation and aggregation on the graph nodes to achieve node embedding representation enhancement;

[0116] A first transmission module, used for transmitting the noise-added node embedding matrix to a server in plain text;

[0117] A first exchange module, configured to exchange the label of the inference result and the label of the additive shared secret with the server using an oblivious transfer protocol;

[0118] The determination module is used to obtain a processing result by using an obfuscated logic circuit according to the label of the inference result and the label of the additive shared secret.

[0119] The server includes:

[0120] An inference module, configured to process the noisy node embedding matrix using a neural network model to obtain an inference result, wherein the inference result and the additive shared secret constitute an additive secret sharing pair;

[0121] The second exchange module is used to exchange the label of the inference result and the label of the additive shared secret with the user terminal by using the oblivious transfer protocol.

[0122] In one embodiment, the receiving module includes:

[0123] A first receiving submodule, configured to receive the input data;

[0124] A second receiving submodule is used to establish an encryption communication rule between the user end and the server end, wherein the encryption communication rule includes a public key and a private key;

[0125] The third receiving submodule is used to generate an additive shared secret between the user end and the server end according to the input data and the encryption communication rule.

[0126] In one embodiment, the server pre-stores graph neural model parameters M and model noise β, and the third receiving submodule includes:

[0127] The first receiving unit is used to obtain a characteristic propagation matrix according to the graph data to be processed in the input data and the propagation stage parameter K

[0128] The second receiving unit is used to receive the characteristic propagation matrix according to the preset data noise r. Perform noise processing to obtain the feature propagation matrix after noise addition

[0129] The third receiving unit is used to receive the noise-added characteristic propagation matrix according to the encryption communication rule. Encrypt and get the first ciphertext

[0130] The fourth receiving unit is used to receive the first ciphertext The public key pk in the encryption communication rule is transmitted to the server;

[0131] The fifth receiving unit is used to receive the first ciphertext according to the model noise β and the graph neural model parameter M. And the public key pk, the calculated second ciphertext

[0132] The sixth receiving unit is used to use the private key sk in the encryption communication rule to encrypt the second ciphertext Decrypt and get the plaintext Use it as an additive shared secret between the client and the server The data is stored on the user side.

[0133] In one embodiment, the first processing module includes:

[0134] The first processing submodule is used to obtain a normalized adjacency matrix according to the graph data to be processed. and node feature matrix X;

[0135] The second processing submodule is used to process the propagation phase parameter K and the normalized adjacency matrix Get the second adjacency matrix

[0136] The third processing submodule is used to perform noise processing on the node feature matrix X to obtain a noisy node feature matrix (Xr);

[0137] A fourth processing submodule is used to process the second adjacency matrix And the noise node feature matrix (Xr), perform neighborhood feature propagation and aggregation to obtain the noise node embedding matrix

[0138] In one embodiment, the server pre-stores the neural model parameter M and the model noise β; the reasoning module includes:

[0139] The first inference submodule is used to process the noisy node embedding matrix using a neural network model according to the neural model parameter M and the model noise β. Get the inference result

[0140] In one embodiment, the second switching module includes:

[0141] A first switching submodule, used for constructing an obfuscated truth table corresponding to the obfuscated logic circuit, and sending it to the user end;

[0142] The second exchange submodule is used to exchange the obfuscated logic circuit, the label of the inference result and the label of the additive shared secret with the user end using the oblivious transfer protocol.

[0143] The first switching module includes:

[0144] The third exchange submodule is used to exchange the obfuscated logic circuit, the label of the inference result and the label of the additive shared secret with the server using the oblivious transfer protocol.

[0145] In one embodiment, the determining module includes:

[0146] A first determination submodule, configured to input the label of the inference result and the label of the additive shared secret into a summing circuit of the obfuscation logic circuit to obtain a processed inference result;

[0147] The second determining submodule is used to input the processed reasoning result into the softmax circuit of the obfuscated logic circuit to obtain the processing result.

[0148] The embodiment of the present invention further provides an electronic device, referring to Figure 4 , Figure 4 Schematic diagram of an electronic device proposed in an embodiment of the present application. Figure 4 As shown, the electronic device 100 includes: a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus communication. A computer program is stored in the memory 110. The computer program can be run on the processor 120 to implement the steps in a method for processing graph data disclosed in an embodiment of the present application.

[0149] An embodiment of the present application also provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps in a method for processing graph data as disclosed in an embodiment of the present application are implemented.

[0150] The embodiment of the present invention provides a method, device, equipment and medium for processing graph data. The user end and the server end, as participants in a two-party semi-honest adversary model, execute the processing method: the user end receives input data and generates an additive shared secret; the user end performs a first operation based on the input data to obtain a noisy node embedding matrix; the user end transmits the noisy node embedding matrix to the server end in plain text; the server end processes using a neural network model to obtain an inference result, and the inference result and the additive shared secret constitute an additive secret sharing pair; the server end and the user end use an oblivious transfer protocol to exchange relevant labels; the user end uses an obfuscated logic circuit based on the inference result and the label of the additive shared secret to obtain the processing result. The present invention enables the user end and the server end to form a semi-honest adversary model, and realizes safe and efficient graph data processing under the premise that the graph data and the parameters of the neural network model are not obtained by the other party.

[0151] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0152] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, apparatuses, electronic devices, and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.

[0153] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0154] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0155] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0156] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0157] The above is a detailed introduction to a method, device, equipment and medium for processing graph data provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for processing graph data, characterized in that: The user end and the server end, as participants in the two-party semi-honest adversary model, execute the steps in the processing method: The user end receives input data and generates an additive shared secret between the user end and the server end; the input data includes graph data to be processed and a propagation phase parameter K; The user terminal performs a first operation according to the input data to obtain a noisy node embedding matrix; the noisy node embedding matrix represents a feature matrix that performs K-times neighborhood feature propagation and aggregation on graph nodes to achieve node embedding representation enhancement; The user end transmits the noise-added node embedding matrix to the server end in plain text; The server processes the noisy node embedding matrix using a graph neural network model to obtain an inference result, wherein the inference result and the additive shared secret constitute an additive secret sharing pair; The server and the client exchange the label of the inference result and the label of the additive shared secret using an oblivious transfer protocol; The user end obtains a processing result by using an obfuscated logic circuit according to the label of the inference result and the label of the additive shared secret; The client receives input data and generates an additive shared secret between the client and the server, including: receiving the input data; Establishing encryption communication rules between the user end and the server end, wherein the encryption communication rules include a public key and a private key; generating an additive shared secret between the client and the server according to the input data and the encryption communication rule; The server pre-stores graph neural model parameters M and model noise β; the client generates an additive shared secret between the client and the server according to the input data and the encryption communication rule, including: According to the graph data to be processed in the input data and the propagation phase parameter K, the characteristic propagation matrix is ​​obtained. ; According to the preset data noise r, the characteristic propagation matrix Perform noise processing to obtain the feature propagation matrix after noise addition ; According to the encryption communication rule, the noise-added feature propagation matrix Encrypt and get the first ciphertext ; The first ciphertext The public key pk in the encryption communication rule is transmitted to the server; The server, based on the model noise β and the graph neural model parameter M, , and the public key pk, the second ciphertext calculated , and send it to the user terminal; The user end uses the private key sk in the encryption communication rule to encrypt the second ciphertext Decrypt and get the plaintext , which is used as the additive shared secret between the client and the server , stored in the user terminal.

2. The processing method according to claim 1, characterized in that: The user terminal performs a first operation according to the input data to obtain a noisy node embedding matrix, including: According to the graph data to be processed, a normalized adjacency matrix is ​​obtained and the node feature matrix ; According to the propagation phase parameter K, and the normalized adjacency matrix , get the second adjacency matrix ; For the node feature matrix Perform noise processing to obtain the noise node feature matrix ; According to the second adjacency matrix And the noise node feature matrix , perform neighborhood feature propagation and aggregation to obtain the noisy node embedding matrix .

3. The processing method according to claim 2, characterized in that: The server pre-stores the neural model parameter M and the model noise β; the server processes the noisy node embedding matrix using the neural network model to obtain an inference result, including: According to the neural model parameter M and the model noise β, the server uses the neural network model to process the noisy node embedding matrix , and obtain the inference result .

4. The processing method according to claim 1, characterized in that: The server and the client use an oblivious transfer protocol to exchange the label of the inference result and the label of the additive shared secret, including: The server constructs an obfuscated truth table corresponding to the obfuscated logic circuit and sends it to the user end; The server and the client use the oblivious transfer protocol to exchange the obfuscated logic circuit, the label of the inference result, and the label of the additive shared secret.

5. The processing method according to claim 4, characterized in that: The user end obtains a processing result by using an obfuscated logic circuit according to the label of the inference result and the label of the additive shared secret, including: Inputting the label of the inference result and the label of the additive shared secret into the summing circuit of the obfuscated logic circuit to obtain a processed inference result; The processed inference result is input into the softmax circuit of the obfuscation logic circuit to obtain the processed result.

6. A graph data processing device, characterized in that: The device includes a user end and a server end; The user terminal comprises: A receiving module, used to receive input data and generate an additive shared secret between the user end and the server end; the input data includes the graph data to be processed and a propagation phase parameter K; A first processing module is used to perform a first operation according to the input data to obtain a noisy node embedding matrix; the noisy node embedding matrix represents a feature matrix that performs K-times neighborhood feature propagation and aggregation on the graph nodes to achieve node embedding representation enhancement; A first transmission module, used for transmitting the noise-added node embedding matrix to a server in plain text; A first exchange module, configured to exchange the label of the inference result and the label of the additive shared secret with the server using an oblivious transfer protocol; A determination module, configured to obtain a processing result by using an obfuscated logic circuit according to the label of the inference result and the label of the additive shared secret; The first processing module comprises: The first processing submodule is used to obtain a normalized adjacency matrix according to the graph data to be processed. and the node feature matrix ; The second processing submodule is used to process the propagation phase parameter K and the normalized adjacency matrix , get the second adjacency matrix ; The third processing submodule is used to process the node feature matrix Perform noise processing to obtain the noise node feature matrix ; A fourth processing submodule is used to process the second adjacency matrix And the noise node feature matrix , perform neighborhood feature propagation and aggregation to obtain the noisy node embedding matrix ; The server includes: An inference module, configured to process the noisy node embedding matrix using a neural network model to obtain an inference result, wherein the inference result and the additive shared secret constitute an additive secret sharing pair; A second exchange module, configured to exchange the label of the inference result and the label of the additive shared secret with the user end using an oblivious transfer protocol; The server pre-stores the neural model parameter M and the model noise β; the reasoning module includes: The first inference submodule is used to process the noisy node embedding matrix using a neural network model according to the neural model parameter M and the model noise β. , and obtain the inference result .

7. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps in the method for processing graph data according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps in the method for processing graph data as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Efficient oblivious neural network conversion method

    CN113869499A