A method, device, computer equipment and program product for jointly performing graph processing

By employing privacy-preserving permutation algorithms and homomorphic encryption technology, the problem of privacy data leakage in multi-graph data processing is solved, achieving efficient and secure graph processing and iterative updates.

CN119646836BActive Publication Date: 2026-02-13ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411488935.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2026-02-13
Estimated Expiration
2044-10-23

AI Technical Summary

Technical Problem

In multi-party graph data processing, how to efficiently achieve joint graph processing while protecting the privacy data of all parties, especially in fields such as financial transaction risk analysis, and how to iteratively update the graph without disclosing privacy information.

Method used

The algorithm uses a privacy-preserving permutation algorithm to obtain the vertex index, constructs a weight sequence and performs homomorphic encryption, uses the edges of the graph to perform several rounds of iterative updates to the ciphertext weight sequence, and obtains the updated weight of the vertex after decryption, thereby reducing communication and ensuring security.

Benefits of technology

It enables efficient graph processing without revealing private information, reduces communication complexity, and ensures security through homomorphic encryption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646836B_ABST
    Figure CN119646836B_ABST
Patent Text Reader

Abstract

The present specification proposes a method of jointly processing a graph, a first party and a second party holding a first graph and a second graph respectively. The first party obtains the mapping sequence number value of each first vertex of the first graph through a privacy-preserving permutation algorithm jointly executed with the second party. The sequence number values of the vertices representing different objects in the first graph and the second graph are different, and the sequence number values of the vertices representing the same object are the same. Further, a first weight sequence is constructed according to the sequence number value and the weight value of each first vertex, and based on the first weight sequence and the second weight sequence constructed by the second party, a first joint operation is performed to obtain a first weight ciphertext sequence. The i-th bit of the first weight ciphertext sequence corresponds to the homomorphic ciphertext of the weight of the vertex with the sequence number value i. And by using the edges of the first graph, a plurality of rounds of graph iteration are jointly executed with the second party to update the first weight ciphertext sequence, and finally the updated first weight ciphertext sequence is decrypted to obtain the updated weight of the first vertex.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] One or more embodiments of the present specification relate to the technical field of privacy computing, and particularly relate to a method, apparatus, computer device and program product for jointly performing graph processing. BACKGROUND

[0002] A graph is a data structure composed of vertices and edges, and is widely used in social network analysis, financial transaction risk analysis, biochemistry, etc. In some scenarios of graph data, each vertex has a weight value, and each edge connects two vertices in the graph. The edges in the graph can have or can not have weight values. For such graph data, the weight values of the vertices in the graph can be updated according to the connection relationship and weight values of the edges in the graph, so as to analyze the graph.

[0003] In some technical scenarios, in order to obtain more comprehensive analysis results, multiple participants need to jointly use the locally held graphs to participate in the process of iteratively updating the vertex weights. However, the graph data held locally by each participant often contains private information. For example, multiple graphs have users or accounts as nodes, and the node weight values represent certain attributes or index data of the users. In this case, which user nodes are included in the graph, the connection relationship between the user nodes, and the weight values (attribute values or index values) of the user nodes all belong to private data. In this case, different participants cannot send the information in the graph to other participants in plaintext.

[0004] It is desirable to have an improved solution to efficiently implement multi-party joint graph processing while protecting the private data of each party. SUMMARY

[0005] Therefore, one or more embodiments of the present specification provide a method, apparatus, computer device and program product for jointly performing graph processing.

[0006] According to a first aspect of one or more embodiments of the present specification, a method for jointly performing graph processing is provided, involving a first party and a second party, which respectively hold a first graph and a second graph as private data, the method being applied to the first party, and the method comprising:

[0007] obtaining, by the first party, a sequence number value of each first vertex in the first graph in N sequences by jointly executing a privacy-preserving permutation algorithm with the second party, the permutation algorithm making the sequence number values of the vertices representing the same object in the first graph and the second graph the same, and the sequence number values of the vertices representing different objects different;

[0008] constructing a first weight sequence of N bits according to the sequence number value and the weight value of each first vertex;

[0009] perform a first joint operation with the second party by using the first weight sequence and a second weight sequence corresponding to the second party, to obtain a first weight ciphertext sequence of N bits, wherein the i-th bit corresponds to the homomorphic ciphertext of the weight of the vertex with the sequence number value i;

[0010] perform a plurality of rounds of graph iteration with the second party by using the edges in the first graph, to update the first weight ciphertext sequence;

[0011] decrypt the updated first weight ciphertext sequence to obtain the updated weight of the first vertex.

[0012] According to a second aspect of one or more embodiments of the present specification, a device for jointly performing graph processing is provided, involving a first party and a second party, which respectively hold a first graph and a second graph as private data, the device is applied to the first party, and the device comprises:

[0013] an arrangement module configured to obtain sequence number values of each first vertex in the first graph by performing a privacy-preserving arrangement algorithm with the second party, the arrangement algorithm makes the sequence number values of the vertices representing the same object in the first graph and the second graph the same, and the sequence number values of the vertices representing different objects different;

[0014] a sequence construction module configured to construct a first weight sequence of N bits according to the sequence number value and the weight of each first vertex;

[0015] a first joint operation module configured to perform a first joint operation with the second party by using the first weight sequence and a second weight sequence corresponding to the second party, to obtain a first weight ciphertext sequence of N bits, wherein the i-th bit corresponds to the homomorphic ciphertext of the weight of the vertex with the sequence number value i;

[0016] a sequence update module configured to perform a plurality of rounds of graph iteration with the second party by using the edges in the first graph, to update the first weight ciphertext sequence;

[0017] a sequence decryption module configured to decrypt the updated first weight ciphertext sequence to obtain the updated weight of the first vertex.

[0018] According to a third aspect of an embodiment of the present specification, a computer readable storage medium is provided, which stores computer instructions, and the instructions are executed by a processor to implement the method for jointly performing graph processing according to the first aspect of the embodiment of the present specification.

[0019] According to a fourth aspect of an embodiment of the present specification, a computer device is provided, which comprises:

[0020] a processor;

[0021] a memory for storing processor-executable instructions;

[0022] The processor implements the method for jointly performing graph processing by running the executable instructions.

[0023] According to a fifth aspect of the embodiments of the present specification, a computer program product is provided, which, when executed by a processor, implements the method for jointly performing graph processing according to the first aspect of the embodiments of the present specification.

[0024] The present specification proposes a method for jointly performing graph processing, a first party and a second party hold a first graph and a second graph respectively, and the method is applied to the first party. The first party obtains the mapping serial number value of each first vertex of the first graph through a privacy-preserving permutation algorithm jointly executed with the second party, the size of all serial number values is not more than N, and the serial number values of vertices representing different objects in the first graph and the second graph are different, and the serial number values of vertices representing the same object are the same. Further, a first weight sequence is constructed according to the serial number value and the weight value of each first vertex, and based on the first weight sequence and the second weight sequence constructed by the second party, a first joint operation is performed to obtain a first weight ciphertext sequence, the i th bit of the first weight ciphertext sequence corresponds to the homomorphic ciphertext of the weight of the vertex with serial number value i. And by using the edges of the first graph, a plurality of rounds of graph iteration are jointly executed with the second party, the first weight ciphertext sequence is updated, and finally the updated first weight ciphertext sequence is decrypted to obtain the updated weight value of the first vertex.

[0025] In each iteration of the present specification, the information of the edge does not need to be sent, only the weight ciphertext sequence needs to be communicated, and the communication amount is less than that in the related art. Moreover, based on the serial number value obtained by the vertex mapping, the construction of the weight ciphertext sequence is facilitated, and through the serial number value, the two parties can determine which vertex each weight in the weight ciphertext sequence corresponds to, facilitating the communication between the two parties. Moreover, by homomorphic encryption of the weight, the two parties cannot obtain any intermediate result in the communication process, thereby ensuring the security.

[0026] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present specification. BRIEF DESCRIPTION OF DRAWINGS

[0027] The drawings incorporated into the specification and forming part of the specification, show embodiments consistent with the present specification, and together with the specification, serve to explain the principles of the present specification.

[0028] Figure 1 is a scenario diagram of an application of the present specification according to an exemplary embodiment.

[0029] Figure 2This is a flowchart illustrating a method for jointly performing graph processing according to an exemplary embodiment of this specification.

[0030] Figure 3 This is a schematic diagram illustrating a permutation algorithm according to an exemplary embodiment of this specification.

[0031] Figure 4 This is a block diagram illustrating an apparatus for jointly performing graph processing according to an exemplary embodiment.

[0032] Figure 5 This is a hardware structure diagram of a computer device illustrated in this specification according to an exemplary embodiment. Detailed Implementation

[0033] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0034] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.

[0035] In a scenario where two parties jointly perform graph analysis, each party possesses its own graph. Some vertices in the two graphs overlap, while others may not. For overlapping vertices, the weights and connectivity relationships of these vertices differ between the two graphs. During two-party graph analysis, the vertex weights, edge information, number of vertices, and the number of overlapping vertices in each party's graph are all private information that cannot be disclosed to the other party.

[0036] For example, in the field of financial transaction risk analysis, the two participants may be different holders of transaction data (such as banks or financial institutions), vertices may represent different accounts, and edges may represent relationships such as transfers between the two accounts. The weight of a vertex can represent the transaction risk information of the account. By jointly iterating the vertex weights, the two participants can combine information from both graphs to obtain more accurate vertex weights, thereby enabling better analysis of user transaction risk.

[0037] In the process of joint graph processing of two participants, highly sensitive information such as transaction information cannot be directly transmitted between different participants in plaintext. In order to ensure the security of private information, two parties usually jointly perform privacy computation to complete the graph processing.

[0038] Privacy computation is a computation completed by multiple participants. Each participant provides certain input data, and two parties jointly compute output data through a privacy computation algorithm. In the computation process, each participant cannot obtain the private information of other participants through cryptography and other means. Through privacy computation, two participants can process and compute on merged graph data while ensuring that the input private data and intermediate results are not disclosed.

[0039] In the process of joint analysis and processing of the graph, the vertex weight of the graph, the connection relationship of the edge, the total number of vertices, and the overlapping vertices between the two participants need to be ensured not to be disclosed.

[0040] In order to realize joint iterative update of the graph on the basis of ensuring the safety of the above data, the following methods exist in related technologies:

[0041] First, two-party privacy graph analysis is realized based on a garbled circuit. Bitonic sort is realized twice and parallel scanning is realized twice in each iteration. Although the safety of private information can be ensured in the above process, the communication and computation complexity is high in each iteration due to the two bitonic sorts.

[0042] Second, secret sharing is realized. Secret sharing fragments of edges and vertices are propagated in each iteration, and iterative update is completed based thereon. However, although the above method is improved compared with the first method, the complexity is still high.

[0043] Therefore, the present specification proposes a method for joint graph processing. A first party and a second party hold a first graph and a second graph respectively. The method is applied to the first party. The first party obtains the sequence number value of the mapping of each first vertex of the first graph through a privacy-protected permutation algorithm executed jointly with the second party. The size of all sequence number values is not more than N, and the sequence number values of vertices representing different objects in the first graph and the second graph are different, and the sequence number values of vertices representing the same object are the same. Further, a first weight sequence is constructed according to the sequence number value and the weight value of each first vertex, and a second weight sequence is constructed by the second participant. First joint operation is performed based on the first weight sequence and the second weight sequence to obtain a first weight ciphertext sequence. The i-th bit of the first weight ciphertext sequence corresponds to the homomorphic ciphertext of the weight of the vertex with the sequence number value i. The edges of the first graph are used to jointly execute a plurality of rounds of graph iteration with the second party, and the first weight ciphertext sequence is updated. Finally, the updated first weight ciphertext sequence is decrypted to obtain the updated weight value of the first vertex.

[0044] In each iteration of the specification, the information of the edges does not need to be sent, and only the weight ciphertext sequence needs to be communicated, which is less than the scheme in the related art. Moreover, based on the sequence number value obtained by the vertex mapping, the construction of the weight ciphertext sequence is facilitated, and through the sequence number value, the two parties can determine which vertex each weight in the weight ciphertext sequence corresponds to, facilitating the communication between the two parties. Moreover, by homomorphically encrypting the weight, the two parties cannot obtain any intermediate result in the communication process, thereby ensuring security.

[0045] Next, a method for joint graph processing shown in the specification will be described.

[0046] The application scenario corresponding to the method is as shown in Figure 1 The method involves a first party and a second party, and the first party and the second party respectively hold a first graph and a second graph as private data. In Figure 1 the example, the first graph of the first party includes four vertices b, c, r, and y, and the second graph of the second party includes three vertices b, j, and y. The weight of each vertex, the connection relationship and weight of the edge between the vertices, and the like in the first graph and the second graph are private data. The first graph and the second graph include at least one coincident vertex, and correspondingly, the two parties can include non-coincident vertices. The two parties jointly perform graph processing, that is, the weight of the vertex in the graph is updated in combination with the graph of the two parties.

[0047] Hereinafter, the method performed by the first party will be described as an example. It is easy to understand that the methods performed by the first party and the second party in the updating process are the same, and any party can perform the following method as the first party, that is, the second party also performs the same method. The method performed by the first party is as shown in Figure 2 and includes the following steps:

[0048] Step 101, by jointly performing a privacy-preserving permutation algorithm with the second party, obtaining a sequence number value of each first vertex in the first graph mapped in N sequence positions.

[0049] The permutation algorithm makes the sequence number values of the vertices representing the same object in the first graph and the second graph the same, and the sequence number values of the vertices of different objects different.

[0050] Correspondingly, the second party also obtains a sequence number value of each second vertex in the second graph mapped in N sequence positions by jointly performing a privacy-preserving permutation algorithm with the first party.

[0051] Specifically, through this step, vertex mapping is realized, which makes each participant only obtain the serial number value of the vertex in his own graph, and the serial number value corresponding to each object is unique (that is, the serial number values of the vertices representing the same object in the first graph and the second graph are the same, and the serial number values of different vertices are different), and the serial number value of each vertex does not exceed N. This makes it convenient to construct the weight ciphertext sequence in the following, specifically, the weight ciphertext sequence has a length of N, and the i-th bit is the weight of the vertex with the serial number value i.

[0052] Through the weight ciphertext sequence and the serial number value of each vertex of the party, both parties can easily determine the weight of each vertex of the party without revealing the vertex identifier. Moreover, since the serial number value of the opponent's vertex is unknown, and the weight ciphertext sequence is encrypted, it is also impossible to know which vertices the opponent has and the weight of each vertex through the weight ciphertext sequence.

[0053] In addition, since the serial number value is only mapped according to the permutation algorithm and is irrelevant to the specific weight, it is also impossible to know any private information such as the weight of the vertex through the serial number value.

[0054] Among them, the length of N needs to be greater than the total number of objects represented by the vertices in the first graph and the second graph. As for the way to obtain the number of N, N can be a large number generated randomly.

[0055] In addition, since the weight ciphertext sequence needs to be communicated in the subsequent iteration steps, the amount of communication can be reduced by reducing the size of N. For example, the N is determined according to the number of vertices of the first party and the second party, and is linearly positively correlated with the maximum value of the number of vertices of the first party and the second party.

[0056] Further, in some scenarios, how many vertices each participant has is also private data. Therefore, N can be determined according to the maximum value of the ceiling value of the logarithm of the number of vertices of the first party and the second party. Since the logarithm is rounded up, only a rough range of the number of vertices of the first party and the second party can be known, and the specific size of the number of vertices cannot be known, which ensures data privacy.

[0057] Under the above implementation idea, the specific size of N can be determined according to formula (1):

[0058] In the above formula (1), |V0| represents the number of vertices of the first party, |V1| represents the number of vertices of the second party, represents the value obtained by rounding up the logarithm of the number of vertices of the first party to the base 2, and correspondingly, represents a value obtained by taking the second party's vertex number to the logarithm with base 2 and rounding up. represents the maximum value in

[0059] In the above formula, N is greater than or equal to twice max(|V0|, |V1|), which ensures that N is greater than the sum of the number of vertices in the first graph and the second graph, and greater than the sum of the number of objects represented by the vertices in the first graph and the second graph. Moreover, the first party and the second party only disclose and This makes the number of vertices of the first party and the second party in the calculation process not be disclosed.

[0060] For the specific implementation of step 101, the mapping of vertices can be achieved by the method of careless mapping structure. It can also be achieved by executing a joint sorting protocol based on a privacy intersection PSI protocol.

[0061] In addition, the present specification also provides a vertex mapping method with low complexity.

[0062] Specifically, step 101 can include: obtaining a first vertex array corresponding to the first graph and containing vertex identifiers; performing joint merging with a second vertex array held by the second party to obtain a third vertex array; for the third vertex array, generating a sequence of serial number values corresponding to the elements of the third vertex array by jointly executing a privacy-protected random permutation generation algorithm with the second party; and determining the serial number value of each first vertex in N serial positions based on the sequence of serial number values.

[0063] Specifically, by the method of secure multi-party computation (MPC), the first vertex array and the second vertex array corresponding to the two parties are merged to obtain a third vertex array including all vertices of the first party and the second party, and then a random permutation generation algorithm is performed on the third vertex array to generate a serial number value corresponding to each vertex.

[0064] It should be noted that in the random permutation generation, it is necessary to ensure that the serial number values of the vertices with the same vertex identifier in the serial number values obtained by the first party and the second party are the same. In order to achieve this goal, it is possible to check whether there are the same vertex identifiers while generating the random permutation, and assign the same serial number value to the same vertex identifier.

[0065] In addition, the above goal can also be achieved by the following method.

[0066] ​​Specifically, first, the first vertex array and the second vertex array each include N elements, each element includes a vertex identifier and a number value selected from binary values, each vertex corresponds to two adjacent elements with the same vertex identifier and different number values.

[0067] As shown in Figure 3 , the first vertex array is as shown in A0, and the second vertex array is as shown in A1. One element corresponds to one vertical column. The upper row of the vertical column represents the vertex identifier, and the lower row represents the number value. As can be seen from Figure 1 , each vertex corresponds to two adjacent elements, and the two elements have the same vertex identifier but different number values.

[0068] Among them, the binary value can be 0 and 1. Figure 3 That is, the binary value is 0 and 1.

[0069] In addition, in some cases, the number of vertices of the first party or the second party is less than N / 2, in which case the insufficient elements can be filled with random vertex information. For example Figure 3 , the vertex z of the second party is the randomly generated vertex information.

[0070] The above first vertex array and second vertex array can be sorted according to the vertex identifier and number value (for example, as shown in Figure 3 ), which can facilitate the sorting of subsequent steps.

[0071] By setting the first vertex array and the second vertex array in the above form, in the process of executing the subsequent random arrangement generation algorithm, cooperating with other processing procedures, it is not necessary to detect whether there are two identical vertices, so as to ensure that the sequence numbers of the vertices representing the same object received by the first participant and the second participant are the same.

[0072] Corresponding to the structure of the above vertex array, the process of joint merging can be: performing a privacy-preserving sorting algorithm jointly with the second party, sorting the first vertex array and the second vertex array according to the vertex identifier and the number value, and obtaining a third vertex array, wherein the elements with the same vertex identifier and number value are arranged adjacent to each other.

[0073] That is, by sorting algorithm, the first vertex array and the second vertex array are sorted and merged. As shown in Figure 3 , A is the third vertex array.

[0074] In the case that both the first vertex array and the second vertex array are sorted arrays, in order to speed up the sorting, the above sorting algorithm can be an odd-even merge algorithm. That is, both parties can call a privacy-preserving odd-even merge process to merge the first vertex array and the second vertex array into a third vertex array in order.

[0075] Compared with other sorting algorithms, the odd-even merge algorithm does not need to sort the entire third vertex array, but only needs to sort between the two already sorted arrays, which can improve the processing efficiency.

[0076] In the above case, for the third vertex array, both parties can call a privacy-preserving random permutation generation algorithm to generate a sequence of serial number values, wherein the 2i-th bit and the 2i-1-th bit of the sequence of serial number values have the same value. The sequence of serial number values can be as shown in L of FIG. 1. Figure 3 Through the random permutation generation algorithm, it can be ensured that the serial number value of the generated random number does not exceed half of the length of A, i.e., N, so as to ensure that all the mapped serial number values are positive integers not exceeding N.

[0077] Correspondingly, determining the serial number value of each first vertex in the N serial positions based on the sequence of serial number values comprises: for the sequence of serial number values, performing an inverse process of the sorting algorithm jointly with the second party to obtain a first sub-sequence of serial number values. The serial number value at a specific position in the first sub-sequence is taken as the serial number value of each first vertex; the specific position is one of an odd position or an even position agreed by the second party.

[0078] By jointly calling the inverse process of the privacy-preserving odd-even merge with the second party, the first sub-sequence of serial number values can be obtained, and correspondingly, the second party can obtain a second sub-sequence of serial number values. The first sub-sequence of serial number values and the second sub-sequence of serial number values can be as shown in L0 and L1 of FIG. 1. Figure 3

[0079] Then both parties convert the elements at the even positions of the sub-sequence of serial number values held by themselves into plaintext to obtain the mapped serial number values of the vertices held by themselves; or both parties convert the elements at the odd positions of the sub-sequence of serial number values held by themselves into plaintext to obtain the mapped serial number values of the vertices held by themselves. As shown in FIG. 1, Figure 3 Figure 3 wherein v represents a vertex identifier, p(v) represents a serial number value, P0 represents the first party, and P1 represents the second party. Both parties take the values at the even positions in the sub-sequence of serial number values as the mapped values.

[0080] Through the above process, Figure 3 ​​It can be seen that the sequence number values obtained by each participant are the same for the same vertex, such as the sequence number values of vertex b obtained by the two parties are both 8. Moreover, the sequence number values of vertices representing different objects do not coincide.

[0081] Next, the rationality of the above method will be explained. In the above method, the sorting algorithm is used to arrange the vertices with the same vertex identifier together in the third vertex array A, and the elements with the same number value are arranged together. For example, the first party and the second party both have vertex b, and in the third vertex array A, the elements corresponding to vertex b in the first vertex array A0 and the elements corresponding to vertex b in the second vertex array A1 are arranged together. Moreover, since the third vertex array A is also sorted according to the number value, the four elements corresponding to b in the third vertex array A belong to A0, A1, A0, and A1 in turn, respectively.

[0082] When the random permutation generation algorithm is called, it is ensured that the sequence number values generated by two adjacent elements are the same. Although this causes the coinciding vertices of the two participants to generate two mapping sequence number values, such as b generating 4 and 8 sequence number values. However, through the above sorting algorithm, each participant includes two sequence number values corresponding elements. Further through the inverse process of the odd-even merging algorithm, each participant has two sequence number values of vertex b. Finally, by taking the odd positions in the subsequence number value sequence or taking the even positions in the subsequence number value sequence, it is ensured that the sequence number values of the vertices representing the same object are the same for the two participants.

[0083] Through the above algorithm, the sequence number values corresponding to each vertex are generated with less complexity. Moreover, there is no information leakage in the above process (such as which vertices of the two participants coincide), only and are disclosed, which ensures data security.

[0084] Back to Figure 3 . On the basis that the two parties obtain the mapping sequence number values of their own vertices through the above various vertex mapping methods, subsequent weight sequence construction and update processing can be carried out. For the first party in the example, in step 103, an N-bit first weight sequence is constructed according to the sequence number values of each first vertex and its weight.

[0085] In step 105, the first weight sequence is used to perform a first joint operation with the second weight sequence corresponding to the second party to obtain an N-bit first weight ciphertext sequence.

[0086] The i-th bit corresponds to the homomorphic ciphertext of the weight of the vertex with the sequence number value i.

[0087] Correspondingly, the second participant also constructs a second weight sequence according to the sequence number values of the respective second vertices and the weight values thereof, and also performs a first joint operation by using the second weight sequence and the first weight sequence corresponding to the first participant, to obtain a second weight ciphertext sequence of N bits.

[0088] Specifically, the initial weights for the two participants to jointly interact are determined through the interaction of the two participants in steps 103 and 105.

[0089] In order to protect privacy, the plaintexts corresponding to the first weight ciphertext sequence and the second weight ciphertext sequence can be the same, but the encryption keys thereof are different. The first weight ciphertext sequence can be encrypted by the public key of the second participant, and the second weight ciphertext sequence can be encrypted by the public key of the first participant, so that any participant cannot decrypt the weight ciphertext sequence held by the participant to obtain the private data of the intermediate result.

[0090] For the specific implementation method of step 103, when constructing the weight sequence, the sequence number values obtained in the foregoing can be used for construction. An N-bit long sequence structure or an empty sequence can be constructed, and the weight of the vertex with the sequence number value i is filled in the i-th bit. For example, Figure 4 The sequence number values shown in the table are filled in the first weight sequence constructed by the first participant. The weight of vertex y is filled in the second bit, the weight of vertex c is filled in the fifth bit, the weight of vertex r is filled in the seventh bit, and the weight of vertex b is filled in the eighth bit.

[0091] In this way, the two participants construct the corresponding weight sequences through the sequence number values when interacting, so that the two participants can obtain the weight ciphertext sequences without revealing the intersection of the vertices of the first graph and the second graph.

[0092] The above process can be represented by formula (2):

[0093]

[0094] The above b represents the identifier of the participant. For example, the identifier b of the first participant is 0, and the identifier b of the second participant is 1. represents the weight sequence constructed by the b-th participant in the 0-th iteration (i.e., the initial value), represents the weight of the vertex with the identifier v of the b-th participant in the 0-th iteration (i.e., the initial value). represents the p(v)-th bit of represents the weight of the vertex with the identifier v of the b-th participant in the 0-th iteration (i.e., the initial value).

[0095] In addition, for other positions in the first weight ciphertext sequence, default values can be used for filling, that is, step 103 comprises: for any first vertex, filling the weight of the vertex in the first graph into the position corresponding to the sequence number of the vertex in the sequence structure of N bits; after filling the weight of each first vertex, filling the unfilled positions in the sequence structure with default values.

[0096] The default value can be a value that does not affect subsequent graph updates. Since the value in the weight ciphertext sequence and the edge are needed to update the weight ciphertext sequence in the process of subsequent local updates, in order not to affect the subsequent calculation, the default value needs to not affect the update. For example, the default value can be 0.

[0097] For the specific implementation of step 105, step 105 needs to ensure that the two participants cannot obtain the plaintext of the weight of any vertex in this process. Here, the implementation of step 105 will be described through an embodiment, which does not represent a limitation of the present specification.

[0098] Specifically, the first weight sequence and the second weight sequence can be first split into total fragments by the secret sharing protocol, and each party obtains its own total fragment. The sum of the two total fragments is the weight required for the two parties to update the graph, but in order to protect data privacy, the plaintext sum of the two total fragments cannot be directly obtained. Therefore, the first weight ciphertext sequence and the second weight ciphertext sequence held by the first party and the second party can be obtained from the two total fragments by using the secret sharing to homomorphic ciphertext conversion protocol.

[0099] In other words, the first party performs the following steps in the first joint operation:

[0100] splitting the first weight sequence into a first-party fragment and a second-party fragment by secret sharing;

[0101] sending the second-party fragment of the first weight sequence to the second party and receiving the first-party fragment of the second weight sequence sent by the second party;

[0102] determining a first total fragment according to the first-party fragment of the first weight sequence and the first-party fragment of the second weight sequence;

[0103] obtaining the first weight ciphertext sequence by jointly invoking the first conversion protocol of secret sharing to homomorphic encryption with the second total fragment held by the second party.

[0104] The method of determining the first total fragment can be determined according to the requirements of graph processing. For example, for the vertices of the first graph and the second graph, in some cases, the weight used for updating needs to be determined according to the sum of the weights of the two parties; in some cases, the weight of one of the parties is used as the reference; in some cases, the maximum or minimum value of the weights of the two parties is used as the reference, etc.

[0105] The method of determining the first total slice will be described below by way of example of determining the weight used for updating by summing the weights of the two parties. Specifically, determining the first total slice comprises: calculating the sum of the first partial slice of the first weight sequence and the second weight sequence as the first total slice.

[0106] Correspondingly, the second party also obtains the second total slice by the above method.

[0107] A specific example of the first conversion protocol will also be shown below, and the following example does not represent a limitation on the present specification.

[0108] Specifically, the process of the first party obtaining the first weight ciphertext sequence by the first conversion protocol can comprise: homomorphically encrypting the first total slice using the public key of the first party and the public key of the second party respectively to obtain first ciphertext and second ciphertext; sending the first ciphertext to the second party and receiving the third ciphertext sent by the second party; the third ciphertext is obtained by homomorphically encrypting the second total slice using the public key of the second party; and determining the first weight ciphertext sequence according to the homomorphic sum of the second ciphertext and the third ciphertext.

[0109] Correspondingly, the second party also homomorphically encrypts the second total slice using the public key of the first party and the public key of the second party respectively to obtain fourth ciphertext and third ciphertext. And sends the third ciphertext to the other party, and receives the first ciphertext sent by the other party. And determines the second weight ciphertext sequence according to the homomorphic sum of the first ciphertext and the fourth ciphertext.

[0110] That is, the two parties homomorphically encrypt their respective total slices using the public keys of the two parties, and send the data encrypted using their own public keys to the other party, so that any party can use the homomorphic sum of the two total slices homomorphically encrypted using the public key of the other party to determine the corresponding weight ciphertext sequence.

[0111] Step 107, using the edges in the first graph, jointly performing several rounds of graph iteration with the second party to update the first weight ciphertext sequence.

[0112] Correspondingly, the second party also uses the edges in the second graph to jointly perform several rounds of graph iteration with the first party to update the second weight ciphertext sequence.

[0113] Specifically, the two parties each use the edges of the graph held locally to update the weight ciphertext sequence locally, and further integrate the values in the two weight ciphertext sequences according to the local weight ciphertext sequence and the weight ciphertext sequence updated by the other party to obtain the weight ciphertext sequence used for the next round of updating.

[0114] To perform step 107, each party can establish a local adjacency list. Specifically, the first party and the second party can respectively establish a local adjacency list from the known edge set. The method of establishing the adjacency list and related techniques are the same, and will not be repeated here. The connection information between edges can be represented by the adjacency list. The establishment of the adjacency list also does not require interaction between multiple parties. The adjacency list can also be established before step 103 is performed, and the timing of establishing the adjacency list is not limited in this specification.

[0115] After the adjacency list is established, the adjacency list can be used to update the weight ciphertext sequence. After updating, the integration and updating of the weight ciphertext sequence can be realized by using similar ideas as in step 105. For example, it can be realized by secret sharing and homomorphic encryption.

[0116] Next, a specific implementation of step 107 will be described by taking the first party as an example.

[0117] Step 107 can include: first, the first party uses the edges in the first graph to locally update the first weight ciphertext sequence to obtain a first incremental ciphertext sequence.

[0118] The process of local updating can be similar to the updating method in related technologies, and the method of local updating is not limited in this specification.

[0119] An example of local updating can be shown in formula (3):

[0120]

[0121] represents the weight value of node v obtained by the participating party b in the t-th local update. E b represents the adjacency list of the b party, (u, v, w) represents an edge from vertex u to vertex v, and the weight of the edge is w, w t-1 (u) represents the weight value of vertex u after the t-1 iteration. f G and f S represent the collection function and the diffusion function in the gather-apply-scatter (GAS) model. may represent the sum under the action of f G The operation in formula (3) is a homomorphic operation in the form of homomorphic ciphertext. The updated weight values of each node obtained in this way constitute the first / second incremental ciphertext sequence.

[0122] Then, the first party performs a second joint operation on the first incremental ciphertext sequence and the second incremental ciphertext sequence corresponding to the second party, to obtain an updated first weight ciphertext sequence of the current round. The second joint operation and the first joint operation have similar implementation ideas, both of which are to realize the values in the weight ciphertext sequences of the two parties without obtaining any plaintext intermediate results.

[0123] In an optional embodiment, the second joint operation performed by the first party can include the following process.

[0124] 1) Obtain the first incremental ciphertext sequence and the second incremental ciphertext sequence corresponding to the first party's first incremental shard of the respective plaintext by calling the second conversion protocol of homomorphic encryption to secret sharing.

[0125] In a specific implementation of the second conversion protocol, the first party first homomorphically adds each value in the first incremental ciphertext sequence to a set of random numbers respectively to obtain ciphertext E1. The first party sends the ciphertext E1 to the second party and receives the plaintext corresponding to the ciphertext E1 sent by the second party. The first party subtracts the set of random numbers from the plaintext to obtain the plaintext of the first incremental ciphertext sequence, and obtains two shards of the plaintext of the first incremental ciphertext sequence through secret sharing. Similarly, the second party can also obtain two plaintext shards corresponding to the second incremental ciphertext sequence by performing the above method.

[0126] 2) Determine the first party's shard of the total weight of the current round according to the first party's shard of the total weight of the last round and the first party's incremental shard.

[0127] For example, the sum of the first party's shard [W t-1 ]0 of the total weight W t-1 of the last round, the first party's incremental shard corresponding to the first incremental ciphertext sequence, and the first party's incremental shard corresponding to the second incremental ciphertext sequence can be taken as the value of the first party's shard [W t ]0 of the total weight W t of the current round. The first party's shard [W t ]0 of the total weight of the current round is stored for the next round of iteration.

[0128] 3) Jointly call the first conversion protocol of secret sharing to homomorphic encryption with the first party's shard [W t ]0 of the total weight of the current round and the second party's shard [W t ]1 of the total weight of the current round held by the second party, to obtain an updated first weight ciphertext sequence of the current round. The first conversion protocol is described in detail in the foregoing, and will not be described again here.

[0129] That is, the second conversion protocol of the homomorphic encryption is used to convert the secret sharing first, and the increment of the weight value generated by the local update is obtained, and the increment of the total weight value of the last round of update is obtained according to the increment of the total weight value of the last round of update. The total weight value of the current iteration is obtained.

[0130] It should be understood that step 107 generally needs to be executed multiple times. The number of iterations is usually related to the vertex aggregation order, which can be a pre-set value.

[0131] After performing several iterations of the update, in step 109, the first weight ciphertext sequence after the update is decrypted to obtain the updated weight of the first vertex.

[0132] Specifically, through multiple iterations in step 107, the final update result of the vertex can be obtained. The first weight ciphertext sequence after the update is decrypted, and the updated plaintext of the corresponding position of the vertex can be obtained.

[0133] As described above, in order to ensure security, the first weight ciphertext sequence held by the first party is encrypted by the public key of the second party during the update process, so the first weight ciphertext sequence needs to be decrypted by the key of the second party. At the same time, the second party cannot know the plaintext corresponding to the first weight ciphertext sequence when decrypting.

[0134] Next, an embodiment will be described to illustrate a method that can achieve the above requirements, which does not represent a limitation of the present specification.

[0135] Specifically, step 109 can include: homomorphically adding the ciphertext value in the local first weight ciphertext sequence to a group of random numbers respectively to obtain a fifth ciphertext; sending the fifth ciphertext to the second party and receiving the plaintext corresponding to the fifth ciphertext sent by the second party; and subtracting the group of random numbers from the plaintext to obtain the updated weight.

[0136] This step 109 is similar to the decryption part in the second conversion protocol described above. The second party can only obtain the plaintext corresponding to the sum of the weight and the random number, and cannot obtain the weight itself, which ensures security.

[0137] In addition, in order to ensure security, the first weight ciphertext sequence can be decrypted as a whole when decrypting, or several ciphertext weights owned by the first party and a random value encrypted by the public key of the second party are sent to the second party for decryption. In this way, the number of vertices of the first party can be ensured not to be known by the second party.

[0138] Corresponding to the embodiments of the foregoing method, the specification also provides an embodiment of an apparatus for jointly processing a graph and a computer device to which the apparatus is applied.

[0139] As shown in Figure 4 Figure 5 is a block diagram of an apparatus for jointly processing a graph according to an exemplary embodiment of the specification, involving a first party and a second party, which respectively hold a first graph and a second graph as private data, the apparatus being applied to the first party, the apparatus comprising:

[0140] an arrangement module 410, configured to obtain, by jointly executing a privacy-protected arrangement algorithm with the second party, a serial number value of each first vertex in the first graph in N serial positions; the arrangement algorithm makes the serial number values of vertices representing the same object in the first graph and the second graph the same, and the serial number values of vertices of different objects different;

[0141] a sequence construction module 420, configured to construct a first weight sequence of N bits according to the serial number value of each first vertex and its weight value;

[0142] a first joint operation module 430, configured to perform a first joint operation with the second party using the first weight sequence and a second weight sequence corresponding obtained by the second party, to obtain a first weight ciphertext sequence of N bits, wherein the i-th bit corresponds to the homomorphic ciphertext of the weight value of the vertex with the serial number value i;

[0143] a sequence update module 440, configured to update the first weight ciphertext sequence by jointly executing a plurality of rounds of graph iteration with the second party using the edges in the first graph;

[0144] a sequence decryption module 450, configured to decrypt the updated first weight ciphertext sequence to obtain the updated weight value of the first vertex.

[0145] In an optional implementation, the sequence construction module 420 is specifically configured to, for any first vertex, fill its weight value in the first graph into the position corresponding to its serial number value in the sequence structure of N bits; and after filling the weight value of each first vertex, fill the unfilled positions in the sequence structure with default values.

[0146] In an optional implementation, the first joint operation module 430 comprises:

[0147] a secret sharing sub-module 431 (not shown in the figure), configured to split the first weight sequence into a first-party shard and a second-party shard by secret sharing;

[0148] a shard sending sub-module 432 (not shown in the figure), configured to send the second-party shard of the first weight sequence to the second party, and receive the first-party shard of the second weight sequence sent by the second party; ​

[0149] The total shard determining submodule 433 (not shown in the figure) is configured to determine a first total shard according to the first shard of the first party and the first shard of the second party respectively.

[0150] The first conversion protocol calling submodule 434 (not shown in the figure) is configured to call a first conversion protocol of secret sharing to homomorphic encryption, by using the first total shard and a second total shard held by the second party, to obtain the first sequence of weight ciphertexts.

[0151] In an optional implementation, the total shard determining submodule 433 is specifically configured to calculate a sum of the first shard of the first party and the first shard of the second party as the first total shard.

[0152] In an optional implementation, the first conversion protocol calling submodule 434 is specifically configured to homomorphically encrypt the first total shard by using the public key of the first party and the public key of the second party respectively to obtain a first ciphertext and a second ciphertext; send the first ciphertext to the second party and receive a third ciphertext sent by the second party; the third ciphertext is obtained by homomorphically encrypting the second total shard by using the public key of the second party; and determine the first sequence of weight ciphertexts according to a homomorphic sum of the second ciphertext and the third ciphertext.

[0153] In an optional implementation, the arrangement module 410 comprises:

[0154] The vertex array obtaining submodule 411 (not shown in the figure) is configured to obtain a first vertex array corresponding to the first graph and comprising vertex identifiers.

[0155] The joint merging submodule 412 (not shown in the figure) is configured to perform joint merging with a second vertex array held by the second party to obtain a third vertex array.

[0156] The sequence value sequence generating submodule 413 (not shown in the figure) is configured to generate a sequence number value sequence corresponding to elements of the third vertex array by jointly executing a privacy protection random arrangement generation algorithm with the second party.

[0157] The sequence number value determining submodule 414 (not shown in the figure) is configured to determine a sequence number value of each first vertex in N sequence positions based on the sequence number value sequence.

[0158] In an optional implementation, the first vertex array and the second vertex array each comprise N elements, each element comprising a vertex identifier and a number value selected from binary values, and each vertex corresponds to two adjacent elements with the same vertex identifier and different number values.

[0159] Correspondingly, the joint merging submodule 412 is specifically configured to: sort the first vertex array and the second vertex array according to vertex identifiers and number values by jointly executing a privacy-protected sorting algorithm with the second party, to obtain a third vertex array, wherein elements with the same vertex identifier and number value are arranged adjacently.

[0160] Correspondingly, the sequence number value determination submodule 414 is specifically configured to: for the sequence number value sequence, obtain a first sub-sequence number value sequence by jointly executing an inverse process of the sorting algorithm with the second party; take a sequence number value at a specific position in the first sub-sequence as a sequence number value of each first vertex; the specific position is one of an odd position or an even position agreed with the second party; the values of the 2i th bit and the 2i-1 th bit in the sequence number value sequence are the same.

[0161] In an optional implementation, the binary values are 0 and 1, and the sorting algorithm is an odd-even merging algorithm.

[0162] In an optional implementation, the N is determined according to the number of vertices of the first party and the second party, and is positively linearly related to the maximum value of the number of vertices of the first party and the second party.

[0163] In an optional implementation, the N is determined according to the maximum value of the ceiling values of the logarithms of the number of vertices of the first party and the second party.

[0164] In an optional implementation, the sequence updating module 440 includes:

[0165] A local updating submodule 441 (not shown in the figure) is configured to update the first weight ciphertext sequence locally by using edges in the first graph to obtain a first incremental ciphertext sequence;

[0166] A second joint operation submodule 442 (not shown in the figure) is configured to perform a second joint operation by using the first incremental ciphertext sequence and a second incremental ciphertext sequence corresponding to the second party to obtain an updated first weight ciphertext sequence of the current round.

[0167] In an optional implementation, the second joint operation submodule 442 is specifically configured to: obtain first-party incremental shards of respective plaintexts of the first incremental ciphertext sequence and the second incremental ciphertext sequence by calling a second conversion protocol of homomorphic encryption to secret sharing; determine a first-party shard of a total weight of the current round according to a first-party shard of a total weight of the last round and the first-party incremental shards; and jointly call a first conversion protocol of secret sharing to homomorphic encryption by using the first-party shard of the total weight of the current round and a second-party shard of the total weight of the current round held by the second party, to obtain the updated first weight ciphertext sequence of the current round.

[0168] In an optional embodiment, the sequence decryption module 450 is specifically configured to: homomorphically add the ciphertext values in the local first weight ciphertext sequence with a set of random numbers respectively to obtain a fifth ciphertext; send the fifth ciphertext to the second party and receive the plaintext corresponding to the fifth ciphertext sent by the second party; and subtract the set of random numbers from the plaintext to obtain the updated weight.

[0169] The implementation process of the functions and roles of each module in the above apparatus is specifically described in the implementation process of the corresponding steps in the above method, which will not be repeated here.

[0170] For the device embodiment, since it basically corresponds to the method embodiment, the relevant part can be seen from the part of the method embodiment. The above described device embodiment is only illustrative, wherein the modules described as separate components can be or can not be physically separated, and the components shown as modules can be or can not be physical modules, that is, they can be located in one place or distributed on multiple network modules. According to the actual needs, some or all of the modules can be selected to achieve the purpose of the scheme of the present specification. Those skilled in the art can understand and implement it without creative labor.

[0171] As shown in Figure 5 , ​ A hardware structure diagram of a computer device in which the apparatus for jointly performing graph processing in the embodiment is shown, which can include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040 and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030 and the communication interface 1040 are connected to each other through the bus 1050 for communication within the device.

[0172] The processor 1010 can be implemented in the form of a general-purpose CPU (Central Processing Unit, central processor), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits, etc., for executing related programs to implement the technical solutions provided by the embodiments of the present specification. The processor implements the above method by running executable instructions.

[0173] The memory 1020 for storing processor-executable instructions can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 can store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the related program codes are saved in the memory 1020.

[0174] The input / output interface 1030 is configured to connect an input / output module to realize information input and output. The input / output module can be configured in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. The input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc.

[0175] The communication interface 1040 is configured to connect a communication module (not shown in the figure) to realize the communication interaction between the device and other devices. The communication module can realize communication through a wired manner (such as a USB, a network cable, etc.) or a wireless manner (such as a mobile network, WIFI, Bluetooth, etc.).

[0176] The bus 1050 includes a channel for transmitting information between various components (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040) of the device.

[0177] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, the device can also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device can also only include the components necessary to implement the solutions of the embodiments of the present specification, and does not have to include all the components shown in the figure.

[0178] The embodiments of the present specification also provide a computer program product, which, when executed by a processor, implements the above-mentioned method for jointly processing a graph.

[0179] The embodiments of the present specification also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned method for jointly processing a graph.

[0180] Computer-readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for information storage. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0181] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, method, article or apparatus that includes a list of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0182] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve the desired result. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired result. In some embodiments, multi-task processing and parallel processing are possible or can be advantageous.

[0183] The user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

Claims

1. A method for jointly processing a graph, involving a first party and a second party, each holding a first graph and a second graph as private data, the method being applied to the first party, the method comprising: obtaining, by jointly executing a privacy-preserving permutation algorithm with the second party, a sequence number value of each first vertex in the first graph in N positions; the permutation algorithm being such that the sequence number values of vertices representing a same object in the first graph and the second graph are the same, and the sequence number values of vertices representing different objects are different; constructing a first weight sequence of N bits according to the sequence number value of each first vertex and its weight value; performing a first joint operation with the second party using the first weight sequence and a second weight sequence corresponding thereto, to obtain a first weight ciphertext sequence of N bits, wherein the i-th bit corresponds to the homomorphic ciphertext of the weight value of the vertex with the sequence number value i; performing a plurality of rounds of graph iteration with the second party using edges in the first graph to update the first weight ciphertext sequence; any one of the plurality of rounds of graph iteration comprising: performing a local update on the first weight ciphertext sequence using edges in the first graph to obtain a first incremental ciphertext sequence; performing a second joint operation with the second party using the first incremental ciphertext sequence and a second incremental ciphertext sequence corresponding thereto to obtain the first weight ciphertext sequence after the current round of update; decrypting the updated first weight ciphertext sequence to obtain the updated weight value of the first vertex.

2. The method of claim 1, wherein, constructing the first weight sequence of N bits comprises: for any first vertex, filling its weight value in the first graph into the position corresponding to its sequence number value in the sequence structure of N bits; after filling the first vertices, filling the unfilled positions in the sequence structure with default values.

3. The method of claim 1, wherein, the first joint operation comprises: splitting the first weight sequence into a first-party shard and a second-party shard by secret sharing; sending the second-party shard of the first weight sequence to the second party, and receiving the first-party shard of the second weight sequence sent by the second party; determining a first total shard according to the first-party shard of the first weight sequence and the first-party shard of the second weight sequence; jointly invoking a first conversion protocol from secret sharing to homomorphic encryption with the second party using the first total shard and a second total shard held by the second party, to obtain the first weight ciphertext sequence.

4. The method of claim 3, wherein, determining the first total shard comprises: calculating the sum of the first-party shard of the first weight sequence and the first-party shard of the second weight sequence as the first total shard.

5. The method of claim 3, wherein, jointly invoking the first conversion protocol from secret sharing to homomorphic encryption to obtain the first weight ciphertext sequence comprises: performing homomorphic encryption on the first total shard using the public key of the first party and the public key of the second party to obtain a first ciphertext and a second ciphertext; sending the first ciphertext to the second party, and receiving a third ciphertext sent by the second party; the third ciphertext being obtained by performing homomorphic encryption on the second total shard using the public key of the second party; determining the first weight ciphertext sequence according to the homomorphic sum of the second ciphertext and the third ciphertext.

6. The method of claim 1, wherein, The sequence number value of each first vertex in the first graph in N sequences is obtained by jointly executing a privacy-protected permutation algorithm with a second party, including: Obtaining a first vertex array corresponding to the first graph, which contains vertex identifiers; Performing joint merging with a second vertex array corresponding to the second party to obtain a third vertex array; For the third vertex array, a sequence number value sequence corresponding to the elements of the third vertex array is generated by jointly executing a privacy-protected random permutation generation algorithm with the second party; Determine the sequence number value of each first vertex in N sequences based on the sequence number value sequence.

7. The method of claim 6, wherein, The first vertex array and the second vertex array each include N elements, each element including a vertex identifier and a number value selected from a binary value, and each vertex corresponds to two adjacent elements with the same vertex identifier and different number values; The joint merging includes: Sort the first vertex array and the second vertex array according to the vertex identifier and the number value by jointly executing a privacy-protected sorting algorithm with the second party to obtain a third vertex array, wherein elements with the same vertex identifier and number value are arranged adjacent to each other; Determine the sequence number value of each first vertex in N sequences based on the sequence number value sequence, including: For the sequence number value sequence, the inverse process of the sorting algorithm is executed with the second party to obtain a first sub-sequence number value sequence; the sequence number value at a specific position in the first sub-sequence is used as the sequence number value of each first vertex; the specific position is one of an odd position or an even position agreed upon by the second party; the values at the 2i and 2i-1 positions in the sequence number value sequence are the same.

8. The method of claim 7, wherein, The binary value is 0 and 1, and the sorting algorithm is an odd-even merging algorithm.

9. The method of claim 1, wherein, N is determined according to the number of vertices of the first party and the second party, and is positively correlated with the maximum value of the number of vertices of the first party and the second party.

10. The method of claim 9, wherein, N is determined according to the maximum value of the logarithmic value of the number of vertices of the first party and the second party.

11. The method of claim 1, wherein, The second joint operation includes: Obtain the first party's first increment shard corresponding to the respective plaintext of the first increment ciphertext sequence and the second increment ciphertext sequence by calling a second conversion protocol of homomorphic encryption to secret sharing; Determine the first party's shard of the total weight of this round according to the first party's shard of the total weight of the last round and the first party's increment shard; Determine the first party's shard of the total weight of this round according to the first party's shard of the total weight of the last round and the first party's increment shard; 12. The method of claim 1, wherein, Obtain the first weight ciphertext sequence of this round after updating by jointly calling a first conversion protocol of secret sharing to homomorphic encryption with the second party's shard of the total weight of this round. Decrypt the first weight ciphertext sequence after updating to obtain the updated weight of the first vertex, including: Homomorphically add the ciphertext values in the local first weight ciphertext sequence to a set of random numbers respectively to obtain a fifth ciphertext; Send the fifth ciphertext to the second party and receive the plaintext corresponding to the fifth ciphertext sent by the second party; Subtract the set of random numbers from the plaintext to obtain the updated weight.

13. An apparatus for jointly processing a graph, involving a first party and a second party, each holding a first graph and a second graph as private data, the apparatus being applied to the first party, the apparatus comprising: an arrangement module configured to obtain, by jointly executing a privacy-preserving arrangement algorithm with the second party, a sequence number value of each first vertex in the first graph in N order positions, the arrangement algorithm being such that sequence number values of vertices representing a same object in the first graph and the second graph are the same, and sequence number values of vertices representing different objects are different; a sequence construction module configured to construct a first weight sequence of N bits according to the sequence number value of each first vertex and a weight value of each first vertex; a first joint operation module configured to perform a first joint operation using the first weight sequence and a second weight sequence corresponding obtained by the second party, to obtain a first weight ciphertext sequence of N bits, wherein an i-th bit corresponds to a homomorphic ciphertext of the weight value of the vertex with the sequence number value i; a sequence update module configured to update the first weight ciphertext sequence by jointly executing a plurality of rounds of graph iterations with the second party using edges in the first graph; any one of the plurality of rounds of graph iterations comprising: performing a local update on the first weight ciphertext sequence using edges in the first graph to obtain a first incremental ciphertext sequence; performing a second joint operation using the first incremental ciphertext sequence and a second incremental ciphertext sequence corresponding obtained by the second party to obtain the first weight ciphertext sequence updated in the round; a sequence decryption module configured to decrypt the updated first weight ciphertext sequence to obtain updated weight values of the first vertices.

14. A computer program product, when executed by a processor, implementing the method of any one of claims 1-12.

15. A computer device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor implements the method of any one of claims 1-12 by running the executable instructions.

Citation Information

Patent Citations

  • Distributed graph data feature decomposition method and system for privacy protection

    CN114692200A

  • Joint prediction method and device, storage medium, equipment and program product

    CN118573471A