Data processing method and device, equipment, medium and product

By dividing the graph data into node vectors and edge vectors and mapping, copying, aggregation and remapping processing, the problem of high complexity of at a loss in cooperative graph calculations is solved, and efficient data transmission and calculation are achieved.

CN118916190APending Publication Date: 2024-11-08BEIJING SHUMU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411017585.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In the field of collaborative graph computing, the graph data propagation method based on secure multi-party computing and dazed algorithm has a high computational complexity, resulting in large data transmission overhead and unable to adapt to the growing scale of graph data.

Method used

The initial graph data is divided into node vectors and edge vectors and stored separately, and through data mapping, copying, aggregation and remapping processing, the confusing propagation from node to edge and edge to node is realized, avoiding the computational overhead of matrix multiplication.

Benefits of technology

This reduces the calculation and transmission overhead during data transmission, avoids the expansion storage overhead of node data or directed edge data, and significantly improves the processing efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916190A_ABST
    Figure CN118916190A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device, equipment, a medium and a product. The method comprises the steps of storing initial graph data as first data and second data, performing first mapping on the first data according to a source node corresponding to each edge vector in the second data to obtain third data, and performing aggregation on the mirror data according to a target node of each vector in the mirror data obtained by copying the third data to obtain fourth data; performing second mapping on the fourth data according to the first data to obtain fifth data; and merging the fifth data and the first data to obtain target data. By adopting the scheme provided by the invention, the technical problem of high calculation and transmission overhead of a system caused by high data calculation and transmission complexity in a contact propagation process in related technologies can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of collaborative graph computing technology, and in particular, relates to a data processing method, device, equipment, medium and product. Background Art

[0002] With the development of communication technology, people pay more and more attention to information security. To ensure information security, different measures are taken in different technical fields.

[0003] In the field of collaborative graph computing, multiple graph data owners need to contribute their private data for collaborative computing. In order to protect the data security of graph data, the uploaded graph data is usually encrypted. However, in related technologies, the graph data propagation method based on secure multi-party computing and perplexity algorithm has high computational complexity, resulting in high data transmission overhead and unable to adapt to the growing scale of graph data.

[0004] Therefore, it is very important to process the transmitted data to optimize the data calculation and transmission complexity during the data propagation process and reduce the calculation and transmission overhead of the system. Summary of the invention

[0005] The embodiments of the present application provide a data processing method, apparatus, device, storage medium and computer program product to solve the technical problem in the related art that in the process of random propagation, the complexity of data calculation and transmission is high, resulting in large calculation and transmission overhead of the system.

[0006] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:

[0007] The initial graph data is stored as first data and second data, wherein the first data includes N node vectors in the initial graph data, and the second data includes M edge vectors in the initial graph data, where N and M are integers greater than 1;

[0008] According to the source node corresponding to each edge vector in the second data, the first data is mapped first to obtain third data, where the third data includes M node vectors;

[0009] aggregating the mirrored data according to the target node of each vector in the mirrored data to obtain fourth data, where the mirrored data is data obtained based on the copy of the third data;

[0010] Performing a second mapping on the fourth data according to the first data to obtain fifth data, wherein the arrangement order of the vectors in the fifth data matches the first data;

[0011] The fifth data and the first data are combined to obtain target data.

[0012] In a second aspect, an embodiment of the present application provides a data processing device, the device comprising:

[0013] A storage module, used to store the initial graph data as first data and second data, the first data includes N node vectors in the initial graph data, the second data includes M edge vectors in the initial graph data, the initial graph data includes private graph data of multiple users, and N and M are integers greater than 1;

[0014] A first mapping module, configured to perform a first mapping on the first data according to a source node corresponding to each edge vector in the second data, to obtain third data, where the third data includes M node vectors;

[0015] an aggregation module, configured to aggregate the mirrored data according to a target node of each vector in the mirrored data to obtain fourth data, where the mirrored data is data obtained based on a copy of the third data;

[0016] A second mapping module, configured to perform a second mapping on the fourth data according to the first data to obtain fifth data, wherein an arrangement order of vectors in the fifth data matches the first data;

[0017] The processing module is used to combine the fifth data and the first data to obtain target data.

[0018] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising:

[0019] A processor and a memory storing programs or instructions;

[0020] The above method is implemented when the processor executes the program or instruction.

[0021] In a fourth aspect, an embodiment of the present application provides a machine-readable storage medium, on which a program or instruction is stored, and the program or instruction implements the above method when executed by a processor.

[0022] In a fifth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the above method.

[0023] The method adopted by the present application is to store the node vectors and edge vectors in the initial graph data separately, and obtain the first data including N node vectors and the second data including M edge vectors. It is not necessary to keep the data length of the node vectors and the edge vectors consistent, thereby avoiding the large storage overhead of expanding the node data or directed edge data.

[0024] In addition, in the present application, the present application realizes the random propagation of data from node to edge and edge to node by processing data mapping, copying, aggregation and remapping, without the need for matrix multiplication, thereby greatly reducing the computational overhead in the data transmission process. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0026] Figure 1 is a flow chart of a data processing method according to an embodiment of the present invention;

[0027] Figure 2 is an overall flow chart of a data processing method according to an embodiment of the present invention;

[0028] Figure 3 is a perplexity vector element mapping protocol diagram of a data processing method according to an embodiment of the present invention;

[0029] Figure 4 is a diagram of a grouping aggregation protocol of a perplexed vector element according to a data processing method according to an embodiment of the present invention;

[0030] Figure 5 is a structural block diagram of a data processing device according to an embodiment of the present invention;

[0031] Figure 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0033] 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 device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0034] In addition, it should be noted that the acquisition, storage, use, and processing of data in the embodiments of this application are in compliance with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of this application, some existing solutions in the industry such as certain software, components, and models may be mentioned, and they should be considered as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.

[0035] The following are explanations of the terms in the embodiments of the present application:

[0036] (1) Collaborative graph computing: Graph computing involving multiple users. The goal is to stitch together the private graphs held by multiple users into a global graph through cross-graph edges, run graph algorithms based on the global graph, and output graph analysis results to the corresponding users. At the same time, it ensures that the private graph data of each user will not be leaked to other users, thus realizing the secret sharing of graph data.

[0037] (2) Oblivious message propagation: On the secret-sharing graph data, data is propagated from nodes to edges and from edges to nodes. The memory access path of this propagation process needs to be independent of the node vector and the edge vector to ensure the secret sharing of the first data corresponding to the node vector and the second data corresponding to the edge vector.

[0038] (3) Homomorphic encryption algorithm, which supports public key encryption technology based on ciphertext.

[0039] (4) Secure Multi-party Computation (MPC) is a cryptographic communication protocol with two or more users. Each user provides a portion of private input to complete a certain computing goal (function), and the calculation results are made public to each user. MPC can ensure that the original data privacy of each user will not be leaked during the protocol interaction process.

[0040] (5) Secret sharing, a data encryption method that splits data into several random fragments and then distributes them to several users; each fragment appears to be uniformly randomly distributed, but when combined together, the original data information can be restored.

[0041] (6) Oblivious Transfer (OT), a special secure multi-party computation protocol, assumes two users, one user P1 provides a list as input, and the other user P2 provides an index of a list, and outputs the list element corresponding to the index to P2, while P1 cannot obtain the index.

[0042] (7) Prefix addition network: a network structure that implements addition in parallel. The network topology is only related to the length of the input vector and has a logarithmic number of network layers.

[0043] For ease of understanding, before explaining the solution provided in the present application, the inventive concept of the solution provided in the present application is first explained.

[0044] The first prerequisite for conducting collaborative graph computing is to ensure the privacy of each user's private graph data and avoid leaking each user's private graph data to other users during the collaborative process.

[0045] At present, in order to solve this technical problem, privacy-preserving collaborative graph computing technology based on cryptography technology has been proposed in related technologies. Its main idea is to use cryptography technologies such as MPC to support multi-user collaborative graph computing, and combine the design of the perplexity algorithm to achieve privacy protection for collaborative graph computing. However, privacy-preserving collaborative graph computing technology based on cryptography technology has high computing and cross-user transmission overhead, which greatly affects the scale of data that can be calculated and the feasibility of actual application.

[0046] Among them, the execution of the oblivious algorithm is one of the important factors of computing and transmission overhead. The embodiments of the present application mainly optimize the complexity of the execution of the oblivious algorithm during the oblivious propagation process to reduce the complexity of data calculation and transmission during the oblivious propagation process, thereby reducing the computing and transmission overhead of the system.

[0047] In the related art, the most direct way to achieve blind propagation is to represent the edges as adjacency matrices, the nodes as corresponding node vectors, and then use secure multi-party computing to perform matrix-vector multiplication to achieve graph message propagation. However, this method has O(|V| 2 ), where |V| is the number of nodes. Another approach, the GraphSC paradigm, proposes to store nodes and edges in the same vector and implements the complexity of O((|V|+|E|)log(|V|+|E|)) with a special algorithm design, which significantly reduces the computational and transmission overhead of the existing blind propagation. However, the computational and transmission overhead of blind propagation is still very high.

[0048] In order to solve the above technical problems, the present application embodiment provides a data processing method. Figure 1 is a flow chart of a data processing method according to an embodiment of the present invention. Figure 1 As shown, the data processing method may include the following steps:

[0049] S110, storing the initial graph data as first data and second data, the first data including N node vectors in the initial graph data, the second data including M edge vectors in the initial graph data, and N and M are integers greater than 1.

[0050] In S110, the initial graph data may be composed of multiple private graph data provided by multiple users, each private graph data includes some nodes and edges, and these private graph data may together form a complete global graph. Users may run graph algorithms based on the global graph and output the analysis results of the global graph to other users.

[0051] The embodiment of the present application can store the node vectors and edge vectors in the initial graph data separately, and obtain the first data including N node vectors and the second data including M edge vectors. Therefore, it is not necessary to keep the data length of the node vectors and the edge vectors consistent, thereby avoiding a large amount of storage overhead for expanding the node data or directed edge data.

[0052] S120, performing a first mapping on the first data according to a source node corresponding to each edge vector in the second data to obtain third data, where the third data includes M node vectors.

[0053] like Figure 2 As shown, the first data V may include v0, v1...v3, and the second data E may include e 10 、e 20 …e 23 The first data V can be mapped according to the source node corresponding to each edge vector in the second data E to obtain the third data V SRC .

[0054] For example, we can use the edge vector e 10 The source node performs a first mapping on the first data to obtain a mapped vector v1; according to the edge vector e 20 The source node performs a first mapping on the first data to obtain a mapped vector v2; according to the edge vector e 23 The source node of the first data performs the first mapping to obtain the mapped vector v2... After the source nodes corresponding to all edge vectors in the second data E perform the first mapping to the first data, all the mapped vectors obtained can form the third data V SRC .

[0055] It can be understood that, since the first data stores node vectors and the second data stores edge vectors, the first data is subjected to the first mapping processing through the mapping relationship established by the source node, so as to realize the data propagation from node to edge.

[0056] S130, aggregating the mirrored data according to the target node of each vector in the mirrored data to obtain fourth data, where the mirrored data is data obtained based on the copy of the third data.

[0057] In S130, the mirror data can be obtained based on the copy of the third data. The specific copying step may include: copying the third data, and obtaining the data of the target node in the second data, and assigning the third data and the data of the target node in the second data to the empty data set to obtain the mirror data U.

[0058] like Figure 2 As shown, the third data V SRC The vectors v1, v2, v0...v2 after each edge vector of the second data E maps the first data. The data of the target node in the second data is obtained to obtain e0, e0, e1...e3; the third data V SRC Assign the data of the target node to the empty data, and the obtained mirror data U can include u 10 、u 20 …u 23 .

[0059] After the mirror data is obtained based on the third data copy, in order to reduce the amount of data for the subsequent second mapping, the mirror data may be aggregated to obtain fourth data. For example, vectors with the same target node in the mirror data may be aggregated, such as Figure 2 As shown, the vector u with the same target node in the mirror data U can be 10 and u 20 Aggregate them together and take them as a segment, store the aggregation result in the first vector element slot of each segment, and obtain the reordered fourth data.

[0060] It can be understood that by aggregating the mirrored data, the amount of data in the subsequent second mapping can be reduced, thereby reducing the data transmission overhead in the blind propagation process.

[0061] S140, performing a second mapping on the fourth data according to the first data to obtain fifth data, wherein an arrangement order of vectors in the fifth data matches the first data.

[0062] In S140, a second mapping may be performed on the target node corresponding to the vector in the fourth data based on the first data to extract and sort the fourth data to obtain fifth data U matching the first data. dstFor example, one segment of the vector u in the fourth data can be 10 、u 20 Map and get the mapped vector u *0 ; For another segment vector u in the fourth data 01 、u 31 Map and get the mapped vector u *1 ...map all segment vectors in the fourth data, and all the mapped vectors obtained can form the fifth data U dst .

[0063] It can be understood that the first data stores the node vector, and the fourth data is the data that has been propagated from the node to the edge, and therefore also includes the relevant information of the edge. Therefore, by performing a second mapping of the fourth data on the first data to obtain the fifth data, it can be understood that the data propagation from the edge to the node has been realized.

[0064] S150, merging the fifth data and the first data to obtain target data.

[0065] In an example, Figure 2 As shown, the fifth data U dst Each vector in is added to the corresponding vector in the first data V. For example, u *0 Adding u to v0 can *1 Add to v1... All the vectors obtained by adding can constitute the target data.

[0066] Based on the scheme defined in the above steps S101 to S205, it can be seen that the method adopted by the present application is to store the node vectors and edge vectors in the initial graph data separately, and obtain the first data including N node vectors and the second data including M edge vectors. Therefore, compared with the existing scheme based on GraphSC, it is not necessary to keep the data length of the node vector and the edge vector consistent, thereby avoiding a large amount of storage overhead for expanding the node data or directed edge data.

[0067] In addition, in the present application, the present application realizes the blind propagation of data from node to edge and edge to node by processing data mapping, copying, aggregation and re-mapping. Compared with the existing scheme based on adjacency matrix, there is no need to convert the edge vector into a matrix first, nor is there a need to multiply the matrix with the node vector to realize the propagation of data from node to edge and edge to node. Therefore, the computational overhead in the data transmission process is greatly reduced.

[0068] In some embodiments, performing a first mapping on the first data according to a source node corresponding to each edge vector in the second data to obtain the third data includes:

[0069] Performing a first mapping on the first data according to a source node corresponding to each edge vector in the second data through a vector element mapping protocol to obtain third data;

[0070] Performing a second mapping on the fourth data according to the first data to obtain fifth data includes:

[0071] Performing a second mapping on the fourth data according to the first data through a vector element mapping protocol to obtain fifth data;

[0072] Among them, the vector element mapping protocol is built based on the homomorphic encryption algorithm.

[0073] In this embodiment, the vector element mapping protocol is used to ensure the secret sharing of graph data during the process of data transmission. In the process of performing the first mapping on the first data or the second mapping on the fourth data, since the first data or the fourth data are both obtained based on the initial graph data, and the initial graph data is provided by multiple users. Therefore, in order to ensure the secret sharing of data among multiple parties, this solution adopts the vector element mapping protocol built based on the homomorphic encryption algorithm to map the data. It ensures the secret sharing of data among multiple parties during the data mapping process.

[0074] In some embodiments, performing a first mapping on the first data according to a source node corresponding to each edge vector in the second data through a vector element mapping protocol to obtain third data includes:

[0075] Randomly sampling N node vectors of the first data according to a preset batch size to generate several batches of associated random vectors;

[0076] A homomorphic encryption algorithm is used to encrypt several batches of associated random vectors to obtain encrypted random vectors;

[0077] The encrypted random vector is extended and arranged according to the first preset mapping relationship and the second data to obtain third data, wherein the vector element mapping protocol includes the first preset mapping relationship, and the first preset mapping relationship is used to characterize the correspondence between the node vector and the source node corresponding to the edge vector.

[0078] In this embodiment, mapping data through the vector element mapping protocol may include an offline phase and an online phase. Among them, the process of randomly sampling the node vector of the first data to generate an associated random vector and sampling the homomorphic encryption algorithm to obtain an encrypted random vector can be completed in the offline phase. Extending and arranging the encrypted random vector according to the first preset mapping relationship and the second data can be completed in the online phase.

[0079] The following combination Figure 3 The above embodiment is explained in detail with reference to the perplexity vector element mapping protocol diagram shown.

[0080] like Figure 3 As shown, the vector element mapping protocol implements mapping of vector elements based on the perspectives of multiple users. In one example, the vector element mapping protocol is applied to P i and P j Two users, P i As the leading party of the calculation, P j In the scenario where P is the assistant of the calculation, i Compared with P j Holding more information, namely the preset mapping relationship π, the vector element mapping protocol can include the following four stages:

[0081] Input stage, P i supply P j supply in, Together they form the initial graph data That is, the number of vector elements in the input vector is a, and the preset batch size is m. Indicates that the element size of the kth input vector in a single batch is L k Bit.

[0082] Output stage, P i get P j get in That is, the number of vector elements in the output vector is b, and the element size of the kth output vector in the batch is L k Bit.

[0083] Offline stage,

[0084] S31. Randomly sample all edge vectors of the input data according to the preset batch size: for any k∈[m], P j (P i ) Random sampling Get a batch of random vectors {R k}({S k}),k∈[m];

[0085] S32. Concatenate batch ciphertext random vectors into a single random vector: P j (P i ) Column-first concatenation {R k}({S k})get in

[0086] S33. Encrypt the random vector and send it: P j right Perform element-by-element fully homomorphic encryption to obtain Send it to P i ;

[0087] S34. Receive the ciphertext random vector and perform expansion permutation: right The ciphertext elements in are expanded and arranged to obtain

[0088] S35. Perform homomorphic ciphertext-plaintext subtraction and send the resulting ciphertext vector: P i Perform homomorphic ciphertext-plaintext subtraction to obtain Then P i send Give P j ;

[0089] S36. Decrypt the ciphertext vector and split it into batch-associated random vectors: P j Decryption And disassemble For the set {π(R k )-S k};

[0090] S37. Generate and store several batches of associated random vectors: Then P i Storage k}, P j Storage k} and {π(R k )-S k}.

[0091] Online stage:

[0092] For any k∈[m]: Mask the input vector based on the associated random vector and send: P j calculate Send it to P i ; Merge the input vectors and perform extended permutation: P i calculate get Then P i Calculated Store output vector: P i set up for P j set up is π(R k )-S k .

[0093] By performing offline Random sampling is performed according to the preset batch size m to obtain the associated random vector {S k} and {R k}, the input data can be the first data. In the online stage, the associated random vector is encrypted using the homomorphic encryption algorithm to obtain and {π(R k )-S k Finally, the encrypted random vector vector is extended and arranged according to the first preset mapping relationship π and the second data to obtain the third data and Can be set to Can be set to π(R k )-S k .

[0094] In this way, by randomly sampling the first data and encrypting the associated random vector generated by the random sampling with a homomorphic encryption algorithm, it is ensured that in the process of mapping the first data, the first data is secretly shared among multiple parties. In addition, by dividing the mapping of the first data by the vector element mapping protocol into an offline stage and an online stage, the transmission overhead at the current stage is greatly reduced. The transmission overhead of the first mapping is only m|V|, which is significantly lower than the transmission overhead generated by the prior art.

[0095] In some embodiments, performing a second mapping on the fourth data according to the first data to obtain the fifth data through a vector element mapping protocol includes:

[0096] Randomly sampling all edge vectors of the fourth data according to a preset batch size to generate several batches of associated random vectors;

[0097] A homomorphic encryption algorithm is used to encrypt several batches of associated random vectors to obtain encrypted random vectors;

[0098] The encrypted random vector is extended and arranged according to the second preset mapping relationship and the first data to obtain fifth data, wherein the vector element mapping protocol includes the second preset mapping relationship, and the second preset mapping relationship is used to characterize the correspondence between the node vector and the target node corresponding to the edge vector.

[0099] In this embodiment, the description of the vector element mapping protocol is as mentioned above and will not be repeated here.

[0100] By randomly sampling the fourth data and encrypting the associated random vectors generated by the random sampling with a homomorphic encryption algorithm, it is ensured that in the process of mapping the fourth data, the fourth data is secretly shared among multiple parties. In addition, by dividing the mapping of the fourth data by a vector element mapping protocol into an offline stage and an online stage, the transmission overhead at the current stage is greatly reduced. The transmission overhead of the second mapping is only m|E|, which is significantly lower than the transmission overhead generated by the prior art.

[0101] In some embodiments, the mirror data is aggregated according to the target node of each vector in the mirror data to obtain fourth data, including:

[0102] The mirror data is aggregated according to the target node of each vector in the mirror data through a vector element grouping aggregation protocol to obtain fourth data, wherein the vector element grouping aggregation protocol is constructed based on a prefix addition network.

[0103] In this embodiment, the vector element aggregation grouping protocol may be a recursive structure constructed based on the architecture of the prefix addition network.

[0104] In this way, by adopting a recursive structure constructed based on a prefix addition network architecture to aggregate the mirror data, the storage space occupied by the obtained fourth data is smaller, the amount of data transmitted in the subsequent fourth data is reduced, network congestion is avoided, and the overall performance of the transmission network is improved.

[0105] In some embodiments, the mirror data is aggregated according to the target node of each vector in the mirror data through a vector element grouping aggregation protocol to obtain fourth data, including:

[0106] Determine whether there is a vector with the same target node in the mirror data;

[0107] In the case where there are vectors with the same target node, the vectors with the same target node are aggregated in parallel based on a prefix addition network to obtain fourth data.

[0108] In this embodiment, before aggregating vectors with the same target node, the vectors with the same target node may be grouped first, and the grouped vectors are stored in corresponding groups respectively. In this way, by performing parallel aggregation on the grouped vectors based on the prefix addition network, there is no need to traverse the entire data each time to search for the vectors with the same target node, which can effectively shorten the parallel aggregation time. In addition, the grouped vectors are more regular and can better adapt to the recursive structure, thereby speeding up the aggregation.

[0109] The following combination Figure 4 The data aggregation method provided by the present application is explained in detail by using the diagram of the random vector element grouping aggregation protocol shown.

[0110] like Figure 4 As shown, the mirror data includes P i Provided by (G, ) and P j Provided <T U >1. In the case of vectors with the same target node, a recursive algorithm based on the structure of the prefix addition network is used to aggregate the vectors with the same target node in parallel. The random vector grouping aggregation protocol includes Merge operation and Aggregate operation, wherein the Merge operation is used to control the merging of two elements (x1 and x2) according to the condition c, and the Aggregate operation is used to construct a recursive structure to realize grouping and aggregation of vectors.

[0111] In an example, the length of the input vector to be grouped and aggregated is n, and OG (ObliviousMerge, vector element grouping aggregation protocol) contains a total of 2 [log (n)] layers of aggregation. In the first [log (n)] layer of aggregation, the number of participating vector elements is halved layer by layer, and in the second [log (n)] layer, the number of participating vector elements is doubled layer by layer. Overall, during the execution of OG, the total number of times the two-element merging is involved is 2n, corresponding to 2n OT calls, which means that the protocol has linear computation and transmission complexity.

[0112] In this way, by using a recursive algorithm built based on a prefix addition network, and by aggregating vectors with the same target node in parallel according to the recursive algorithm, the computational complexity of vector merging is reduced, and the speed of vector aggregation is improved through parallel processing.

[0113] By adopting the solution of the present application, the transmission overhead of the first OM protocol call is m|V|, the transmission overhead of the second OM protocol call is m|E|, and the OG protocol call involves 2|E| OT executions. Therefore, the present solution needs to transmit a total of 4m|E| bits of data, and the total transmission overhead is reduced to m|V|+5m|E|. In the prior art, even if the GraphSC paradigm with the smallest transmission overhead is used for the perplexed graph message propagation, the total transmission overhead is at least 10m(|E|+|V|). The present application significantly reduces the computation and transmission overhead.

[0114] Figure 5 A schematic diagram of the structure of a data processing device provided in another embodiment of the present application is shown. For the convenience of explanation, only the parts related to the embodiment of the present application are shown.

[0115] Reference Figure 5 , the data processing device 500 may include:

[0116] Storage module 501, used to store initial graph data as first data and second data, the first data includes N node vectors in the initial graph data, the second data includes M edge vectors in the initial graph data, the initial graph data includes private graph data of multiple users, and N and M are integers greater than 1;

[0117] A first mapping module 502, configured to perform a first mapping on the first data according to a source node corresponding to each edge vector in the second data, to obtain third data, where the third data includes M node vectors;

[0118] Aggregation module 503, used for aggregating the mirrored data according to the target node of each vector in the mirrored data to obtain fourth data, where the mirrored data is data obtained based on the copy of the third data;

[0119] A second mapping module 504 is used to perform a second mapping on the fourth data according to the first data to obtain fifth data, wherein the arrangement order of the vectors in the fifth data matches the first data;

[0120] The processing module 505 is used to combine the fifth data and the first data to obtain target data.

[0121] In some embodiments, the first mapping module 502 is further used to perform a first mapping on the first data according to a source node corresponding to each edge vector in the second data through a vector element mapping protocol to obtain third data;

[0122] The second mapping module 504 is further configured to perform a second mapping on the fourth data according to the first data through a vector element mapping protocol to obtain fifth data.

[0123] In some embodiments, the data processing device 500 may further include the following modules:

[0124] A sampling module, used for randomly sampling N node vectors of the first data according to a preset batch size to generate several batches of associated random vectors;

[0125] An encryption module, used to encrypt several batches of associated random vectors using a homomorphic encryption algorithm to obtain encrypted random vectors;

[0126] The arrangement module is used to expand and arrange the encrypted random vector vector according to the first preset mapping relationship and the second data to obtain the third data, wherein the vector element mapping protocol includes the first preset mapping relationship, and the first preset mapping relationship is used to characterize the correspondence between the node vector and the source node corresponding to the edge vector.

[0127] In some embodiments, the sampling module is further used to randomly sample all edge vectors of the fourth data according to a preset batch size to generate several batches of associated random vectors;

[0128] The encryption module is also used to encrypt several batches of associated random vectors using a homomorphic encryption algorithm to obtain encrypted random vectors;

[0129] The arrangement module is also used to expand and arrange the encrypted random vector according to the second preset mapping relationship and the first data to obtain fifth data, wherein the vector element mapping protocol includes the second preset mapping relationship, and the second preset mapping relationship is used to characterize the correspondence between the node vector and the target node corresponding to the edge vector.

[0130] In some embodiments, the aggregation module 503 is further used to aggregate the mirror data according to the target node of each vector in the mirror data through a vector element grouping aggregation protocol to obtain fourth data, wherein the vector element grouping aggregation protocol is constructed based on a prefix addition network.

[0131] In some embodiments, the data processing device 500 may further include the following modules:

[0132] A determination module, used to determine whether there is a vector identical to the target node in the mirror data;

[0133] The aggregation module 503 is further configured to aggregate the vectors with the same target node in parallel based on a prefix addition network when there are vectors with the same target node, so as to obtain fourth data.

[0134] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application, and are devices corresponding to the above-mentioned data processing method. All implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device. Its specific functions and the technical effects brought about can be found in the method embodiment part, which will not be repeated here.

[0135] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0136] Figure 6 is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 6 As shown:

[0137] The device may include a processor 601 and a memory 602 storing programs or instructions.

[0138] When the processor 601 executes the program, the steps in any of the above method embodiments are implemented.

[0139] Exemplarily, the program may be divided into one or more modules / units, one or more modules / units are stored in the memory 602 and executed by the processor 601 to complete the present application. One or more modules / units may be a series of program instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the program in the device.

[0140] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0141] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 602 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 602 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 602 is a non-volatile solid-state memory.

[0142] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) machine-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0143] The processor 601 implements any one of the methods in the above embodiments by reading and executing the program or instruction stored in the memory 602 .

[0144] In one example, the electronic device may further include a communication interface 603 and a bus 604. The processor 601, the memory 602, and the communication interface 603 are connected via the bus 604 and communicate with each other.

[0145] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0146] Bus 604 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 604 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0147] In addition, in combination with the method in the above embodiment, the embodiment of the present application may provide a machine-readable storage medium for implementation. The machine-readable storage medium stores a program or instruction; when the program or instruction is executed by a processor, any one of the methods in the above embodiment is implemented. The machine-readable storage medium can be read by a machine such as a computer.

[0148] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0149] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0150] An embodiment of the present application provides a computer program product, which is stored in a machine-readable storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0151] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0152] The functional modules shown in the above block diagram can be implemented as hardware, software, firmware or their combination. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), suitable firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments can be downloaded via computer grids such as the Internet, intranets, etc.

[0153] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0154] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by a computer program or instruction. These programs or instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0155] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A data processing method, characterized in that: The method comprises: Storing the initial graph data as first data and second data, wherein the first data includes N node vectors in the initial graph data, and the second data includes M edge vectors in the initial graph data, where N and M are integers greater than 1; According to the source node corresponding to each edge vector in the second data, the first data is mapped first to obtain third data, where the third data includes M node vectors; aggregating the mirrored data according to a target node of each vector in the mirrored data to obtain fourth data, where the mirrored data is data obtained based on a copy of the third data; Performing a second mapping on the fourth data according to the first data to obtain fifth data, wherein an arrangement order of vectors in the fifth data matches the first data; The fifth data and the first data are combined to obtain target data.

2. The method according to claim 1, characterized in that The performing a first mapping on the first data according to the source node corresponding to each edge vector in the second data to obtain the third data includes: Performing a first mapping on the first data according to a source node corresponding to each edge vector in the second data through a vector element mapping protocol to obtain third data; The performing a second mapping on the fourth data according to the first data to obtain fifth data includes: Performing a second mapping on the fourth data according to the first data through the vector element mapping protocol to obtain fifth data; Among them, the vector element mapping protocol is constructed based on a homomorphic encryption algorithm.

3. The method according to claim 2, characterized in that The step of performing a first mapping on the first data according to a source node corresponding to each edge vector in the second data through a vector element mapping protocol to obtain third data includes: Randomly sampling the N node vectors of the first data according to a preset batch size to generate several batches of associated random vectors; Encrypting the associated random vectors of the batches by using a homomorphic encryption algorithm to obtain an encrypted random vector; The encrypted random vector is extended and arranged according to a first preset mapping relationship and the second data to obtain the third data, wherein the vector element mapping protocol includes the first preset mapping relationship, and the first preset mapping relationship is used to characterize the correspondence between the node vector and the source node corresponding to the edge vector.

4. The method according to claim 2, characterized in that: The step of performing a second mapping on the fourth data according to the first data through the vector element mapping protocol to obtain fifth data includes: Randomly sampling all edge vectors of the fourth data according to a preset batch size to generate several batches of associated random vectors; Using the homomorphic encryption algorithm to encrypt the associated random vectors of the batches to obtain encrypted random vectors; The encrypted random vector is extended and arranged according to a second preset mapping relationship and the first data to obtain the fifth data, wherein the vector element mapping protocol includes the second preset mapping relationship, and the second preset mapping relationship is used to characterize the correspondence between the node vector and the target node corresponding to the edge vector.

5. The method according to claim 1, characterized in that The step of aggregating the mirror data according to the target node of each vector in the mirror data to obtain fourth data includes: The mirror data is aggregated according to a target node of each vector in the mirror data through a vector element grouping aggregation protocol to obtain fourth data, wherein the vector element grouping aggregation protocol is constructed based on a prefix addition network.

6. The method according to claim 5, characterized in that The step of aggregating the mirror data according to the target node of each vector in the mirror data by using the vector element grouping aggregation protocol to obtain fourth data includes: Determine whether there is a vector with the same target node in the mirror data; In the case where there are vectors with the same target node, the vectors with the same target node are aggregated in parallel based on the prefix addition network to obtain the fourth data.

7. A data processing device, characterized in that: The device comprises: A storage module, configured to store the initial graph data as first data and second data, wherein the first data includes N node vectors in the initial graph data, and the second data includes M edge vectors in the initial graph data, wherein the initial graph data includes private graph data of multiple users, and N and M are integers greater than 1; A first mapping module, configured to perform a first mapping on the first data according to a source node corresponding to each edge vector in the second data, to obtain third data, wherein the third data includes M node vectors; an aggregation module, configured to aggregate the mirrored data according to a target node of each vector in the mirrored data to obtain fourth data, wherein the mirrored data is data obtained based on a copy of the third data; a second mapping module, configured to perform a second mapping on the fourth data according to the first data to obtain fifth data, wherein an arrangement order of vectors in the fifth data matches the first data; A processing module is used to combine the fifth data and the first data to obtain target data.

8. An electronic device, characterized in that: The device comprises: a processor and a memory storing a computer program or instruction; When the processor executes the computer program instructions, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method according to any one of claims 1 to 6.