Data cooperation extension arrangement method and device, equipment, medium and product

By batch generating random data in collaborative graph neural network learning and performing extended arrangement, the problem of high communication times and calculation transmission overhead during the extended arrangement process is solved, and the secret sharing of data and the improvement of system efficiency is achieved.

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

Patent Information

Application Number
CN202411017546.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 collaborative graph neural network learning, the prior art is difficult to reduce the number of communications and calculation transmission overhead during the extended arrangement process, resulting in higher system calculation and transmission overhead.

Method used

By batch generating random data and expanding arrangement based on random data, the even-allocated transmission and calculation overhead of multiple extended arrangement calls is significantly reduced. At the same time, the data is encrypted and random data is generated before transmission, ensuring the secret sharing of data among users.

Benefits of technology

It effectively reduces the calculation and transmission overhead in the extended arrangement process, ensures secret sharing of data among users, and improves the efficiency and security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921166A_ABST
    Figure CN118921166A_ABST
Patent Text Reader

Abstract

The invention provides a data cooperation extension arrangement method and device, equipment, a medium and a product. The method comprises the steps of obtaining first input data and an expansion arrangement relation; generating first random data in batches according to the first input data; receiving mask data sent by the computing collaboration party; performing extension arrangement on the mask data according to the extension arrangement relation to obtain first output data; under the condition that encrypted second random data sent by the computing cooperation party is received, performing extension arrangement on the encrypted second random data according to the extension arrangement relation to obtain ciphertext arrangement data; and encrypting the ciphertext arrangement data to obtain a target ciphertext vector, sending the target ciphertext vector to the computing cooperation party, so that the computing cooperation party decrypts the target ciphertext vector to obtain a target random vector, and splitting the target random vector to obtain second output data of the computing cooperation party. The technical problem of large communication times and calculation transmission overhead of expansion arrangement in the prior art is 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 collaborative expansion arrangement method, device, equipment, medium and product for data. Background Art

[0002] When designing and implementing a collaborative graph neural network learning system based on secure multi-party computing, it involves frequent changes in the order of graph data and copies of graph data. Its main purpose is to expand and arrange the graph data. However, in collaborative graph neural network learning, it is necessary to achieve secret sharing of data among users during the expansion and arrangement process.

[0003] The related art proposes two methods: extended permutation based on homomorphic encryption and extended permutation based on oblivious transmission. However, the extended permutation based on homomorphic encryption requires each element in the input vector to be encrypted separately, which has high computational and transmission overhead. The extended permutation based on oblivious transmission has a logarithmic number of communication rounds, which means more communication rounds.

[0004] Therefore, it is very important to reduce the number of communications and computational transmission overhead in the extended arrangement process to reduce the computational and transmission overhead of the system. Summary of the invention

[0005] Embodiments of the present application provide a collaborative extended arrangement method, apparatus, device, storage medium and computer program product for data to solve the technical problem of difficulty in reducing the number of communications and computing transmission overhead during the extended arrangement process.

[0006] In a first aspect, an embodiment of the present application provides a collaborative expansion arrangement method for data, which is applied to a computing leader, and the method includes:

[0007] Acquire first input data and an extended arrangement relationship, wherein the first input data is composed of a plurality of vectors; and the extended arrangement relationship is used to characterize a correspondence between a vector in the input data and a vector in the output data;

[0008] Generate first random data in batches according to first input data;

[0009] Receiving mask data sent by the computing collaborator, wherein the mask data is obtained by the computing collaborator by masking the second input data using the second random data, and the second random data is generated by the computing collaborator in batches according to the second input data;

[0010] Extending and arranging the mask data according to the extended arrangement relationship to obtain first output data;

[0011] When receiving the encrypted second random data sent by the computing collaborator, performing extended permutation on the encrypted second random data according to the extended permutation relationship to obtain ciphertext permutation data;

[0012] The ciphertext permutation data is encrypted to obtain a target ciphertext vector, and sent to the computing collaborator, so that the computing collaborator decrypts the target ciphertext vector to obtain a target random vector, and splits the target random vector to obtain the second output data of the computing collaborator.

[0013] In a second aspect, an embodiment of the present application provides a collaborative expansion arrangement method for data, which is applied to a computing collaboration party, and the method includes:

[0014] Generating second random data in batches according to second input data, where the second input data consists of a plurality of vectors;

[0015] Encrypting the second random data, and sending the encrypted second random data to the computing leader, so that the computing leader performs extended permutation on the encrypted second random data according to the extended permutation relationship to obtain ciphertext permutation data, and encrypts the ciphertext permutation data to obtain a target ciphertext vector;

[0016] When receiving the target ciphertext vector sent by the computation leader, decrypt the target ciphertext vector to obtain the target random vector;

[0017] Splitting the target random vector to obtain the second output data of the computing collaborator;

[0018] The second input data is masked using the second random data to obtain masked data, and the masked data is sent to the computing leader so that the computing leader performs extended arrangement on the masked data according to the extended arrangement relationship to obtain the first output data of the computing leader.

[0019] In a third aspect, an embodiment of the present application provides a collaborative expansion arrangement device for data, which is applied to a computing leader, and the device includes:

[0020] An acquisition module, used to acquire first input data and an extended arrangement relationship, wherein the first input data is composed of a plurality of vectors; and the extended arrangement relationship is used to characterize a correspondence between a vector in the input data and a vector in the output data;

[0021] A generating module, used for generating first random data in batches according to first input data;

[0022] A receiving module, configured to receive mask data sent by a computing collaborator, wherein the mask data is obtained by the computing collaborator by masking the second input data with the second random data, and the second random data is generated in batches by the computing collaborator according to the second input data;

[0023] A first arrangement module, used for performing an extended arrangement on the mask data according to the extended arrangement relationship to obtain first output data;

[0024] A second arrangement module is used to, upon receiving the encrypted second random data sent by the computing collaboration party, perform extended arrangement on the encrypted second random data according to the extended arrangement relationship to obtain ciphertext arrangement data;

[0025] The encryption module is used to encrypt the ciphertext permutation data to obtain a target ciphertext vector, and send it to the computing collaborator, so that the computing collaborator decrypts the target ciphertext vector to obtain a target random vector, and splits the target random vector to obtain the second output data of the computing collaborator.

[0026] In a fourth aspect, an embodiment of the present application provides a collaborative expansion arrangement device for data, which is applied to a computing collaboration party, and the device includes:

[0027] A generating module, used for generating second random data in batches according to second input data, where the second input data consists of a plurality of vectors;

[0028] An encryption module is used to encrypt the second random data and send the encrypted second random data to a computing leader, so that the computing leader performs extended arrangement on the encrypted second random data according to an extended arrangement relationship to obtain ciphertext arrangement data, and encrypt the ciphertext arrangement data to obtain a target ciphertext vector;

[0029] A decryption module, used for decrypting the target ciphertext vector to obtain a target random vector when receiving the target ciphertext vector sent by the computation leader;

[0030] A splitting module, used for splitting the target random vector to obtain the second output data of the computing collaborator;

[0031] The mask module is used to mask the second input data with the second random data to obtain the mask data, and send it to the calculation leader so that the calculation leader performs extended arrangement on the mask data according to the extended arrangement relationship to obtain the first output data of the calculation leader.

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

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

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

[0035] In a sixth 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.

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

[0037] The collaborative extended arrangement method for data provided in the embodiment of the present application generates random data in batches by inputting data, and performs extended arrangement based on the random data, which significantly reduces the amortized transmission and computing overhead of multiple extended arrangement calls. At the same time, during the extended arrangement process, the present application ensures the secret sharing of data among users by encrypting the data and generating random data before transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] 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.

[0039] Figure 1 is a flow chart of a collaborative expansion arrangement method for data applied to a computing dominant party according to an embodiment of the present invention;

[0040] Figure 2 is a flow chart of a collaborative expansion arrangement method applied to computing data of a collaborative party according to an embodiment of the present invention;

[0041] Figure 3 is a schematic diagram of a splicing structure of a collaborative extension arrangement method of data according to an embodiment of the present invention;

[0042] Figure 4 is a structural block diagram of a collaborative expansion arrangement device for computing data of a dominant party according to an embodiment of the present invention;

[0043] Figure 5 is a structural block diagram of a collaborative expansion arrangement device applied to computing data of a collaborative party according to an embodiment of the present invention;

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

[0045] 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.

[0046] 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.

[0047] 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.

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

[0049] (1) Graph neural network refers to a type of neural network that performs calculations on data with a graph structure (edges + nodes).

[0050] (2) Privacy-preserving graph neural network learning: Private graphs held by multiple users are spliced ​​into a global graph through cross-graph edges, and graph neural network training and inference are performed based on the global graph. The node embedding representation of each private graph and the trained graph neural network parameters are output to the corresponding user, while ensuring that the private graph data of each user will not be leaked to other users.

[0051] (3) Fully homomorphic encryption, which supports public key encryption technology that performs multiplication and addition operations based on ciphertext.

[0052] (4) 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.

[0053] (5) Oblivious transmission, a special secure multi-party computing 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.

[0054] 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.

[0055] When designing and implementing a collaborative graph neural network learning system based on secure multi-party computing, it involves frequent changes in the order of graph data and copies of graph data. Its main purpose is to expand and arrange the graph data. However, in collaborative graph neural network learning, in order to achieve secret sharing during the expansion and arrangement process, the memory access path of the expansion and arrangement should be independent of the ID and value of the input and output vector elements, but only related to the length of the input and output vectors.

[0056] The related art proposes two methods: extended permutation based on homomorphic encryption and extended permutation based on oblivious transmission. However, the extended permutation based on homomorphic encryption requires each element in the input vector to be encrypted separately, which has high computational and transmission overhead. The extended permutation based on oblivious transmission has a logarithmic number of communication rounds, which means more communication rounds. It is impossible to meet the requirements of low transmission overhead and low communication rounds at the same time.

[0057] In order to solve the problems of the prior art, an embodiment of the present application provides a collaborative expansion arrangement method for data, which can be applied to the design of collaborative graph neural network learning systems, collaborative database query and analysis, collaborative decision tree learning and other scenarios. Figure 1 FIG. 1 is a flow chart of a collaborative expansion arrangement method for data of a computing leader according to an embodiment of the present invention. Figure 1 As shown, the collaborative expansion arrangement method of the data may include the following steps:

[0058] S110, obtaining first input data and an extended arrangement relationship,

[0059] In S110, the input data may be composed of multiple vectors, and each vector may be composed of an identifier (ID) and a value. The extended arrangement relationship is used to characterize the corresponding relationship between the vectors in the input data and the vectors in the output data.

[0060] S120: Generate first random data in batches according to first input data.

[0061] In S120, the first random data may be generated in batches by randomly sampling vectors of the first input data based on a preset batch size. The first random data may include several batches of random vectors.

[0062] S130, receiving mask data sent by the computing collaborator, wherein the mask data is obtained by the computing collaborator by masking the second input data with second random data, and the second random data is generated by the computing collaborator in batches according to the second input data.

[0063] In S130, the second random data may also be generated in batches by randomly sampling the second input data. For example, masking the second input data using the second random data may be achieved by calculating the difference between the second input data and the second random data.

[0064] S140, performing extended arrangement on the mask data according to the extended arrangement relationship to obtain first output data.

[0065] In S140, for example, before the mask data is extended and arranged according to the extended arrangement relationship, the sum of the mask data and the first input data can be first calculated, and then the sum of the mask data and the first input data is extended and arranged according to the extended arrangement relationship, and the result of the extended arrangement is added to the first random data to obtain the first output data.

[0066] S150, when receiving the encrypted second random data sent by the computing collaborator, perform extended permutation on the encrypted second random data according to the extended permutation relationship to obtain ciphertext permutation data.

[0067] S160, encrypt the ciphertext permutation data to obtain a target ciphertext vector, and send it to the computing collaborator, so that the computing collaborator decrypts the target ciphertext vector to obtain a target random vector, and splits the target random vector to obtain the second output data of the computing collaborator.

[0068] In S160, a homomorphic ciphertext algorithm may be used to encrypt the ciphertext permutation data to obtain a target ciphertext vector.

[0069] In an embodiment of the present application, by generating random data in batches from input data and performing extended arrangement based on the random data, the amortized transmission and computational overhead of multiple extended arrangement calls are significantly reduced. At the same time, during the extended arrangement process, the present application ensures secret sharing of data among users by encrypting the data and generating random data before transmission.

[0070] In some embodiments, performing extended arrangement on the mask data according to the extended arrangement relationship to obtain the first output data includes:

[0071] Merging the mask data and the first input data to obtain merged input data;

[0072] Performing extended arrangement on the combined input data according to the extended arrangement relationship to obtain target arrangement data;

[0073] The sum of the target arrangement data and the first random data is determined as the first output data.

[0074] In this embodiment, the masked data is obtained by the computing collaborator by masking the second input data with the second random data. By sending the masked data from the computing collaborator to the computing dominant party, the secret sharing of the second data can be achieved without fully homomorphically encrypting the second input data. At the same time, the masked data is still plaintext data. In the process of extending and arranging the masked data according to the extended permutation relationship, the first input data, the masked data, and the first random data are all plaintext data, and there is no ciphertext data. In this way, compared with the method of encrypting the masked data, the process of extending and arranging the masked data according to the extended permutation relationship only involves plaintext operations, thereby reducing the system's computing and transmission overhead.

[0075] In some embodiments, encrypting the ciphertext permutation data to obtain a target ciphertext vector includes:

[0076] The difference between the ciphertext permutation data and the first random data is calculated according to the homomorphic encryption algorithm to obtain the target ciphertext vector.

[0077] In this embodiment, since the first random data is plaintext and the ciphertext arrangement data is ciphertext, direct calculation cannot be performed between plaintext and ciphertext. Therefore, homomorphic ciphertext-plaintext subtraction can be used to calculate the difference between the ciphertext arrangement data and the second random data to encrypt the ciphertext arrangement data to obtain the target ciphertext vector.

[0078] In this way, the difference between the ciphertext permutation data and the second random data is calculated by homomorphic ciphertext-plaintext subtraction to obtain the target ciphertext vector, thereby ensuring secret sharing among users.

[0079] In some embodiments, the input data includes first input data or second input data, the output data includes first output data or second output data, and when the input data is the first input data, the output data is the first output data, and when the input data is the second input data, the output data is the second output data;

[0080] In the extended permutation relationship, for each output vector of the output data, the output vector is mapped to a target vector of the input data, wherein the target vector is the first input vector in the input data that has the same vector identifier as the output vector.

[0081] In this embodiment, if there are input vectors with the same identification ID in the input data, during the mapping process, the vector of the output data cannot determine the input vector to which it will be mapped based on the vector identification. Therefore, the vector in the input data of the prior art solution requires a unique identification ID.

[0082] The solution of the present application ensures that any vector in the output data will be mapped to the first vector of the input data with the same identification ID by extending the permutation protocol, thereby supporting the vector in the input data to be a non-unique identification ID, thereby improving the robustness of the input.

[0083] In some embodiments, in the extended arrangement relationship, for each output vector in the output data, if there is no vector with the same vector identifier as the output vector in the input data, the output vector is mapped to an empty vector, wherein the empty vector is a vector pre-added in the input data.

[0084] In this embodiment, if the vector identifier of the output vector is different from the vector identifier of each input vector in the input data, in order to ensure that the output vector can be mapped smoothly, a dummy vector can be added at the end of the input data, and the value of the vector is empty (the dummy vector is an empty vector). If a vector in the output data does not have an input data vector with the same ID, it is mapped to the dummy vector.

[0085] In this way, when the output data is output, the output vector mapped to the empty vector is assigned a value of empty, thereby supporting the output vector of the output data without a corresponding input vector, thereby improving the robustness of the output.

[0086] Figure 2 FIG. 1 is a flow chart of a collaborative expansion arrangement method for computing data of a collaborative party according to an embodiment of the present invention. Figure 2 As shown, the collaborative expansion arrangement method of the data may include the following steps:

[0087] S210, generating second random data in batches according to second input data, where the second input data consists of a plurality of vectors.

[0088] In S210, the second random data may be generated in batches by randomly sampling the second input data.

[0089] S220, encrypt the second random data, and send the encrypted second random data to the computing leader, so that the computing leader performs extended permutation on the encrypted second random data according to the extended permutation relationship to obtain ciphertext permutation data, and encrypts the ciphertext permutation data to obtain the target ciphertext vector.

[0090] In S220, the second random data may be encrypted by using a vector-by-vector fully homomorphic encryption method.

[0091] S230, when receiving the target ciphertext vector sent by the computation leader, decrypt the target ciphertext vector to obtain a target random vector.

[0092] In S230, the target ciphertext vector may be decrypted based on the public-private key pair generated by the vector-by-vector fully homomorphic encryption to obtain a target random vector.

[0093] S240, splitting the target random vector to obtain second output data of the computing collaborator.

[0094] In S240, the target random vector may be split based on a preset concatenation order to obtain second random data.

[0095] S250, masking the second input data with the second random data to obtain masked data, and sending the masked data to the computing leader, so that the computing leader performs extended arrangement on the masked data according to the extended arrangement relationship to obtain the first output data of the computing leader.

[0096] In S250 , masking the second input data using the second random data may be achieved by calculating a difference between the second input data and the second random data.

[0097] In some embodiments, encrypting the second random data and sending the encrypted second random data to the computing leader includes:

[0098] splicing the vectors in the second random data based on a preset splicing order to obtain a single random vector;

[0099] Perform full homomorphic encryption on the random vector to obtain an encrypted random vector;

[0100] Send the encrypted random vector to the computation leader.

[0101] In this embodiment, the preset concatenation order may be column-first, and the second random data may be encrypted by vector-by-vector fully homomorphic encryption to obtain an encrypted random vector.

[0102] Figure 3 is a schematic diagram of a splicing structure of a collaborative expansion arrangement method of data according to an embodiment of the present invention, such as Figure 3As shown in the figure, there are epoch slots in the fully homomorphic ciphertext. Epoch is the number of complete traversals of the training data set in the neural network, which refers to the number of times the entire training data set is forward propagated and backward propagated in the neural network. In this scheme, each epoch has multiple graph neural network layers, where the forward propagation layers are arranged as r0…r K-1 , the rear propagation layer is arranged as r k …r 2k-1 . Since the dimensions of the embedded representations of nodes in different neural network layers are different, the sizes of the input data involved in the extended permutation are also different. Therefore, the splicing mechanism can be divided into two dimensions. For example, the two dimensions are the splicing of different neural network layers and the splicing of different epochs. Therefore, the number of vectors spliced ​​into a single ciphertext can be selected based on the number of ciphertext slots provided by the fully homomorphic encryption technology and the dimensions of each layer of the neural network to obtain a single random vector.

[0103] In this way, by concatenating the vectors in the second random data to obtain a single random vector, compared with the solutions in the prior art, the input and output data can be of arbitrary lengths, and there is no need to control the length of the input data to be smaller than the length of the output data, thereby improving the robustness of the input data. At the same time, before performing homomorphic encryption, the vectors of the second random data are concatenated to obtain a single random vector, which can effectively avoid the transmission burden caused by the ciphertext-plaintext expansion ratio of fully homomorphic encryption, thereby reducing the data transmission overhead.

[0104] In some embodiments, the collaborative extended arrangement method of data may include an offline phase and an online phase. Among them, the process of randomly sampling the input data to generate random data in batches and sampling the homomorphic encryption algorithm to obtain encrypted random data can be completed in the offline phase. Extending and arranging the encrypted random data according to the extended arrangement relationship to obtain output data can be completed in the online phase.

[0105] In this way, the input data is preprocessed in the offline stage, and cryptographic calculations are only involved in the preprocessing calculations in the offline stage, that is, fully homomorphic encryption public key cryptographic calculations. By batch preprocessing the extended permutations required for multiple graph neural network layers and even multiple graph neural network training epochs, this proposal significantly reduces the preprocessing amortized computational overhead of a single extended permutation; for online calculations, this proposal only involves non-cryptographic calculations, so the computational efficiency is significantly improved compared to the existing technology.

[0106] The following is an introduction to this solution using a complete implementation example:

[0107] The collaborative expansion arrangement method of data is applied to P i and P j Two users, P i As the leading party of the calculation, Pj 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 collaborative expansion arrangement method of data can include the following four stages:

[0108] Input stage, P i Provide π←(Id in ,Id out ), P j supply in, Together they form the initial graph data That is, the number of vectors of input data is a, and the preset batch size is m. Indicates that the size of the kth input vector in a single batch is L k Bit.

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

[0110] Offline stage,

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

[0112] S2. Concatenate batches of random vectors into a single random vector: P j (P i ) Column-first concatenation {R k}({S k})get in

[0113] S3. The computing collaborator encrypts the random vector and sends it to the computing leader: P j right Perform element-by-element fully homomorphic encryption to obtain Send it to P i ;

[0114] S4. The calculation leader receives the encrypted random vector and performs extended permutation to obtain the ciphertext permutation data: P i right The ciphertext elements in are expanded and arranged to obtain

[0115] S5. The calculation leader performs homomorphic ciphertext-plaintext subtraction on the ciphertext permutation data to obtain the target ciphertext vector: P i Perform homomorphic ciphertext-plaintext subtraction to obtain Then P i Send [π Give P j ;

[0116] S6. The calculation assistant decrypts the target ciphertext vector and splits it into batch-associated random vectors: P j Decryption And disassemble For the set {π(R k )-S k};

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

[0118] Online stage:

[0119] For any k∈[m]: The computing collaborator masks the second input data based on the associated random vector and sends it to the computing leader: P j calculate Send it to P i ;

[0120] Merge the input vectors and perform extended permutation: P i calculate get Then P i Calculated

[0121] Store output data: P i set up for P j set up for

[0122]

[0123] By first inputting data in an offline phase and the second input data Random sampling is performed according to the preset batch size m to obtain the associated random vector {S k} and {R k}. 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 is extended and arranged according to the extended arrangement relation π to obtain the output data and First output data Can be set to Second output data Can be set to π(R k )-S k .

[0124] Figure 4 A schematic diagram of the structure of a collaborative expansion arrangement device for computing data provided by another embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0125] Reference Figure 4 , the collaborative expansion arrangement device 400 of data may include:

[0126] An acquisition module 400 is used to acquire first input data and an extended arrangement relationship, wherein the first input data is composed of a plurality of vectors; and the extended arrangement relationship is used to characterize a correspondence between a vector in the input data and a vector in the output data;

[0127] A generating module 401, configured to generate first random data in batches according to first input data;

[0128] A receiving module 402 is used to receive mask data sent by a computing collaborator, wherein the mask data is obtained by the computing collaborator by masking the second input data with the second random data, and the second random data is generated by the computing collaborator in batches according to the second input data;

[0129] A first arrangement module 403, configured to perform an extended arrangement on the mask data according to the extended arrangement relationship to obtain first output data;

[0130] The second arrangement module 404 is used to, upon receiving the encrypted second random data sent by the computing collaboration party, perform extended arrangement on the encrypted second random data according to the extended arrangement relationship to obtain ciphertext arrangement data;

[0131] The encryption module 405 is used to encrypt the ciphertext permutation data to obtain a target ciphertext vector, and send it to the computing collaborator, so that the computing collaborator decrypts the target ciphertext vector to obtain a target random vector, and splits the target random vector to obtain the second output data of the computing collaborator.

[0132] In some embodiments, the first arrangement module 403 may include the following units:

[0133] A merging unit, used for merging the mask data and the first input data to obtain merged input data;

[0134] An arrangement unit, used for performing an extended arrangement on the combined input data according to an extended arrangement relationship to obtain target arrangement data;

[0135] The determining unit is used to determine the sum of the target arrangement data and the first random data as the first output data.

[0136] In some embodiments, the encryption module 405 may include the following units:

[0137] The calculation unit is used to calculate the difference between the ciphertext arrangement data and the first random data according to the homomorphic encryption algorithm to obtain a target ciphertext vector.

[0138] In some embodiments, the collaborative extension arrangement device 400 of the above data may include:

[0139] A mapping module is used to map the output vector to a target vector of the input data for each output vector of the output data in the extended arrangement relationship, wherein the target vector is the first input vector in the input data having the same vector identifier as the output vector.

[0140] In some embodiments, the mapping module may include the following units:

[0141] A mapping unit is used to map, in the extended arrangement relationship, for each output vector in the output data to an empty vector when there is no vector with the same vector identifier as the output vector in the input data, wherein the empty vector is a vector pre-added in the input data.

[0142] Figure 5 A schematic diagram of the structure of a collaborative extension arrangement device for computing data of collaborating parties provided in another embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0143] Reference Figure 5 , the collaborative expansion arrangement device 500 of data may include:

[0144] A generating module 501, configured to generate second random data in batches according to second input data, where the second input data consists of a plurality of vectors;

[0145] The encryption module 502 is used to encrypt the second random data and send the encrypted second random data to the computing leader, so that the computing leader performs extended arrangement on the encrypted second random data according to the extended arrangement relationship to obtain ciphertext arrangement data, and encrypts the ciphertext arrangement data to obtain a target ciphertext vector;

[0146] A decryption module 503 is used to decrypt the target ciphertext vector to obtain a target random vector when receiving the target ciphertext vector sent by the computation leader;

[0147] A splitting module 504, used for splitting the target random vector to obtain second output data of the computing collaboration party;

[0148] The mask module 505 is used to mask the second input data with the second random data to obtain mask data, and send it to the computing leader so that the computing leader performs extended arrangement on the mask data according to the extended arrangement relationship to obtain the first output data of the computing leader.

[0149] In some embodiments, the encryption module 502 may include the following units:

[0150] A splicing unit, configured to splice the vectors in the second random data based on a preset splicing order to obtain a single random vector;

[0151] An encryption unit, used for performing fully homomorphic encryption on the random vector to obtain an encrypted random vector;

[0152] The sending unit is used to send the encrypted random vector to the computing leader.

[0153] 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 collaborative expansion arrangement method of the above-mentioned data. 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.

[0154] 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.

[0155] 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:

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

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

[0158] 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.

[0159] 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.

[0160] 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.

[0161] 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.

[0162] 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 .

[0163] 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.

[0164] 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.

[0165] 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.

[0166] 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.

[0167] 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.

[0168] 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.

[0169] 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.

[0170] 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.

[0171] 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.

[0172] 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.

[0173] 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.

[0174] 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 collaborative extended arrangement method for data, It is characterized in that Applied to the computing leader, the method includes: Acquire first input data and an extended arrangement relationship, wherein the first input data is composed of a plurality of vectors; and the extended arrangement relationship is used to characterize a correspondence between a vector in the input data and a vector in the output data; Generate first random data in batches according to the first input data; Receiving mask data sent by a computing collaborator, wherein the mask data is obtained by the computing collaborator by masking second input data using second random data, and the second random data is generated by the computing collaborator in batches according to the second input data; Extending and arranging the mask data according to the extended arrangement relationship to obtain first output data; Upon receiving the encrypted second random data sent by the computing collaborator, performing extended permutation on the encrypted second random data according to the extended permutation relationship to obtain ciphertext permutation data; The ciphertext permutation data is encrypted to obtain a target ciphertext vector, and sent to the computing collaborator, so that the computing collaborator decrypts the target ciphertext vector to obtain a target random vector, and splits the target random vector to obtain second output data of the computing collaborator.

2. The method according to claim 1, It is characterized in that The step of performing an extended arrangement on the mask data according to the extended arrangement relationship to obtain first output data includes: Merging the mask data and the first input data to obtain merged input data; Performing extended arrangement on the combined input data according to the extended arrangement relationship to obtain target arrangement data; The sum of the target arrangement data and the first random data is determined as the first output data.

3. The method according to claim 1, It is characterized in that The step of encrypting the ciphertext arrangement data to obtain a target ciphertext vector includes: The difference between the ciphertext arrangement data and the first random data is calculated according to a homomorphic encryption algorithm to obtain the target ciphertext vector.

4. The method according to any one of claims 1 to 3, It is characterized in that The input data includes the first input data or the second input data, the output data includes the first output data or the second output data, and when the input data is the first input data, the output data is the first output data, and when the input data is the second input data, the output data is the second output data; In the extended arrangement relationship, for each output vector of the output data, the output vector is mapped to a target vector of the input data, wherein the target vector is the first input vector in the input data having the same vector identifier as the output vector.

5. The method according to claim 4, It is characterized in that In the extended arrangement relationship, for each output vector in the output data, if there is no vector with the same vector identifier as the output vector in the input data, the output vector is mapped to an empty vector, wherein the empty vector is a vector pre-added in the input data.

6. A collaborative extended arrangement method for data, It is characterized in that Applied to a computing collaboration party, the method comprises: Generating second random data in batches according to second input data, where the second input data consists of a plurality of vectors; Encrypting the second random data, and sending the encrypted second random data to a computing leader, so that the computing leader performs extended permutation on the encrypted second random data according to an extended permutation relationship to obtain ciphertext permutation data, and encrypting the ciphertext permutation data to obtain a target ciphertext vector; Upon receiving the target ciphertext vector sent by the computation leader, decrypting the target ciphertext vector to obtain a target random vector; Splitting the target random vector to obtain second output data of the computing collaborator; The second input data is masked using the second random data to obtain masked data, and the masked data is sent to the computation leader so that the computation leader performs extended arrangement on the masked data according to the extended arrangement relationship to obtain the first output data of the computation leader.

7. The method according to claim 6, It is characterized in that The encrypting the second random data and sending the encrypted second random data to the computing leading party includes: splicing the vectors in the second random data based on a preset splicing order to obtain a single random vector; Performing fully homomorphic encryption on the random vector to obtain an encrypted random vector; The encrypted random vector is sent to the computation leader.

8. A collaborative expansion arrangement device for data, It is characterized in that Applied in the computing leading party, the device comprises: An acquisition module, used to acquire first input data and an extended arrangement relationship, wherein the first input data is composed of a plurality of vectors; the extended arrangement relationship is used to characterize the correspondence between the vectors in the input data and the vectors in the output data; A generating module, used for generating first random data in batches according to the first input data; A receiving module, configured to receive mask data sent by a computing collaborator, wherein the mask data is obtained by the computing collaborator by masking second input data using second random data, and the second random data is generated by the computing collaborator in batches according to the second input data; A first arrangement module, configured to perform an extended arrangement on the mask data according to the extended arrangement relationship to obtain first output data; A second arrangement module is used for, upon receiving the encrypted second random data sent by the computing collaboration party, performing an extended arrangement on the encrypted second random data according to the extended arrangement relationship to obtain ciphertext arrangement data; An encryption module is used to encrypt the ciphertext permutation data to obtain a target ciphertext vector, and send it to the computing collaborator, so that the computing collaborator decrypts the target ciphertext vector to obtain a target random vector, and splits the target random vector to obtain the second output data of the computing collaborator.

9. A collaborative expansion arrangement device for data, It is characterized in that Applied in a computing collaboration party, the device comprises: A generating module, used for generating second random data in batches according to second input data, where the second input data consists of a plurality of vectors; an encryption module, configured to encrypt the second random data, and send the encrypted second random data to a computing leader, so that the computing leader performs an extended arrangement on the encrypted second random data according to an extended arrangement relationship to obtain ciphertext arrangement data, and encrypt the ciphertext arrangement data to obtain a target ciphertext vector; A decryption module, configured to decrypt the target ciphertext vector to obtain a target random vector upon receiving the target ciphertext vector sent by the computation leader; A splitting module, used for splitting the target random vector to obtain second output data of the computing collaborator; A masking module is used to use the second random data to mask the second input data to obtain masked data, and send it to the computing leader so that the computing leader performs extended arrangement on the masked data according to the extended arrangement relationship to obtain the first output data of the computing leader.

10. An electronic device, It is 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 7 is implemented.

11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 7.

12. A computer program product, It is 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 7.