Data processing method, device, medium and electronic device for secure computing
By employing two rounds of secure permutation and replacement protocols, the method addresses inefficiencies in secure multi-party computing by reducing communication overhead, specifically for matrix and vector multiplication, enhancing the efficiency of secure computing tasks.
Patent Information
- Application Number
- CN202410190882.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-20
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-02-20
AI Technical Summary
Existing secure multi-party computing methods face inefficiencies in data communication and processing due to high communication overhead during matrix and vector multiplication operations, particularly in tasks like machine learning and joint statistical analysis, which hinder the efficiency of secure computing.
A method involving two rounds of secure permutation and replacement protocols to calculate the product of a target matrix and column vector, where each column of the matrix is an m-dimensional one-hot vector, reducing communication volume by limiting it to n-dimensional secure permutation protocols, independent of the size m.
This approach significantly reduces data communication volume and enhances processing efficiency by ensuring communication volume is only related to the dimension n, not m, thereby improving the overall efficiency of secure computing tasks.
Smart Images

Figure CN118070308B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of secure multi-party computing, and in particular, to a data processing method, device, medium and electronic device for secure computing. Background Art
[0002] Secure multi-party computing is also called multi-party secure computing. Multiple parties can jointly calculate the result of a function without disclosing the input data of each party in the function. The result of the calculation is made public to one or more of the parties. Typical applications of secure multi-party computing include joint statistical analysis of multi-party data with privacy protection, machine learning, etc. The function here is a statistical operation function, a machine learning algorithm, etc.
[0003] In the process of multi-party secure computing, in order to prevent the disclosure of data and intermediate computing results of each party, the data or intermediate results can be held by each party in a shared form. A single party holds a data shard, and the shards held by each party are merged together to restore the corresponding data. Usually, the calculation is kept in a shared state. In this way, the number of data communications and the amount of communication in multi-party secure computing are important factors affecting the efficiency of secure computing. Summary of the invention
[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] In a first aspect, the present disclosure provides a data processing method for secure computing, wherein the secure computing is used by a first participant and a second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is in a shared form between the first participant and the second participant, and the method is applied to the first participant, comprising:
[0006] Determining first permutation information and second permutation information according to the target matrix;
[0007] Performing a first round of security permutation together with the second participant at least according to the first permutation information to obtain a first permutation result slice of the target column vector;
[0008] Perform a second round of security replacement together with the second participant according to the first replacement result fragment and the second replacement information to obtain a second replacement result fragment;
[0009] Generating a first result slice of the product according to the second permutation result slice;
[0010] Execute the target data processing task based on the first result slice.
[0011] In a second aspect, the present disclosure provides a data processing method for secure computing, wherein the secure computing is used by a first participant and a second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is in a shared form between the first participant and the second participant, and the method is applied to the second participant, including:
[0012] Performing a first round of security permutation together with the first party according to the target column vector or the second slice of the target column vector held by the second party, to obtain a fourth permutation result slice of the target column vector;
[0013] Perform a second round of security replacement together with the first participant according to the fourth replacement result fragment to obtain a third replacement result fragment;
[0014] Generating a second result slice of the product according to the third permutation result slice;
[0015] Execute the target data processing task based on the second result slice.
[0016] In a third aspect, the present disclosure provides a data processing device for secure computing, wherein the secure computing is used by a first participant and a second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is in a shared form between the first participant and the second participant, and the device is applied to the first participant, comprising:
[0017] A first determination module, used to determine first permutation information and second permutation information according to the target matrix;
[0018] A first replacement module, configured to perform a first round of security replacement together with the second participant at least according to the first replacement information, to obtain a first replacement result slice of the target column vector;
[0019] A second replacement module, configured to perform a second round of security replacement together with the second participant according to the first replacement result fragment and the second replacement information, to obtain a second replacement result fragment;
[0020] A first generating module, configured to generate a first result slice of the product according to the second permutation result slice;
[0021] A first execution module is used to execute a target data processing task based on the first result slice.
[0022] In a fourth aspect, the present disclosure provides a data processing device for secure computing, wherein the secure computing is used by a first participant and a second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is in a shared form between the first participant and the second participant, and the device is applied to the second participant, comprising:
[0023] A third replacement module, configured to perform a first round of security replacement together with the first participant according to the target column vector or the second slice of the target column vector held by the second participant, to obtain a fourth replacement result slice of the target column vector;
[0024] A fourth replacement module, configured to perform a second round of security replacement together with the first participant according to the fourth replacement result fragment, to obtain a third replacement result fragment;
[0025] A second generating module, configured to generate a second result slice of the product according to the third permutation result slice;
[0026] A second execution module is used to execute a target data processing task based on the second result slice.
[0027] In a fifth aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the data processing method for secure computing provided in the first aspect of the present disclosure or the steps of the data processing method for secure computing provided in the second aspect of the present disclosure.
[0028] In a sixth aspect, the present disclosure provides an electronic device, including:
[0029] a storage device having a computer program stored thereon;
[0030] A processing device is used to execute the computer program in the storage device to implement the steps of the data processing method for secure computing provided in the first aspect of the present disclosure or the steps of the data processing method for secure computing provided in the second aspect of the present disclosure.
[0031] In the above technical solution, when calculating the product of the target matrix and the target column vector, the two participants can obtain the permutation result slices used to generate the above product through two rounds of secure permutation, and then the two participants generate the slice data of the above result according to the permutation result slices obtained by each party, which is convenient and fast, and improves the business processing efficiency of secure computing. In addition, the communication in the entire calculation process is to call the n-dimensional (because the target column vector is n-dimensional) secure permutation protocol twice, so that the data communication volume of the two rounds of secure permutation is only related to n, but not to m, and it does not increase with the increase of m. Therefore, the data communication volume of calculating the product of the target matrix and the target column vector can be greatly reduced, and the business processing efficiency of secure computing can be further improved.
[0032] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:
[0034] Figure 1 The invention is a flowchart showing a data processing method for secure computing applied to a first party according to an exemplary embodiment.
[0035] Figure 2 The invention is a flowchart showing a data processing method for secure computing applied to a second party according to an exemplary embodiment.
[0036] Figure 3 The invention is a block diagram showing a data processing device for secure computing applied to a first party according to an exemplary embodiment.
[0037] Figure 4 The invention is a block diagram showing a data processing device for secure computing applied to a second party according to an exemplary embodiment.
[0038] Figure 5 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0039] Before introducing the specific embodiments of the present disclosure, the specific application scenarios of multi-party secure computing and the terms involved in the present disclosure are first introduced and explained.
[0040] Ring: refers to a set that defines two operations, addition and multiplication, and forms a commutative group (i.e., Abelian group) for addition, a semigroup for multiplication for elements other than 0, and multiplication satisfies the distributive law for addition.
[0041] The ring of addition and multiplication is defined above, where addition is defined as integer addition modulo (mod) N, and multiplication is defined as integer multiplication mod N, where N is an integer greater than 1.
[0042] A one-to-one mapping of a finite set onto itself is called a permutation. The group consisting of all permutations of the elements in a finite set of n elements is called the nth-order symmetry group.
[0043] Secret Sharing is also called secret splitting or secret sharing. Its basic principle is to split a secret (such as a key, private data, etc.) into multiple shares and give them to different data parties for safekeeping. Only when parties exceeding a threshold number merge their shards can the secret be restored; Shares obtained from parties less than the threshold number cannot restore any information of the secret. In multi-party secure computing, the threshold number is usually the same as the number of participants, and the shares into which the secret is split can also be called shards.
[0044] The secure permutation protocol is also called the casual permutation protocol. Depending on the input, the secure permutation protocol can have multiple functions. In implementation 1, the functions of the secure permutation protocol are as follows: P0 inputs the permutation information σ, and P1 inputs the data set x; the output result is the fragments y0 and y1 of the permuted data set, where y0 is the output of P0 and y1 is the output of P1, and the following condition y0+y1=σ(x) is satisfied. Where σ∈S n , x∈A n , A is the Abelian group, n is the number of elements in A, S n is the n-th symmetry group.
[0045] There are many ways to implement the secure replacement protocol in the above implementation. This disclosure takes a typical three-party implementation (including P0, P1, and a semi-trusted third party P2) as an example for illustration. Among them, P2 and P0 share seed seed0, and P2 and P1 share seed seed1. The specific implementation is as follows:
[0046] P2 generates random permutation information based on seed seed0 and random column vector u0, generating random column vector based on seed1 And calculate Send u1 to P1 (this step can be performed offline), where u0、u1∈A n , u0 and Both are n-dimensional column vectors; P0 is generated based on seed seed0 and u0, and send δσ to party P1, where P1 generates based on seed seed1 And send δx to party P0, where, Based on σ, u0, δσ and δx received from P1, P0 generates the output result y0=σ(δx)+δσ*u0. Based on δσ received from P0 and u1 received from P2, P1 generates the output result y1=δσ*u1.
[0047] In implementation mode 2, the function of the secure permutation protocol is as follows: party P0 inputs the permutation information σ and the shard x0 of the data set x, and party P1 inputs another shard x1 of the data set x; the output results are the shards z0 and z1 of the permuted data set, where z0 is the output of party P0, z1 is the output of party P1, and the following condition z0+z1=σ(x0+x1) is satisfied.
[0048] There are many ways to implement the secure replacement protocol in the above implementation. This disclosure takes a typical three-party implementation (including P0, P1, and a semi-trusted third party P2) as an example for illustration. Among them, P2 and P0 share seed seed0, and P2 and P1 share seed seed1. The specific implementation is as follows:
[0049] P2 generates random permutation information based on seed seed0 and random column vector u0, generating random column vector based on seed1 And calculate Send u1 to P1 (this step can be performed offline); P0 generates u1 based on seed seed0 and u0, and send δσ to party P1, where P1 generates based on seed seed1 And send δx1 to P0, where, Based on σ, u0, δσ and δx1 received from P1, P0 generates the output result z0=σ(δx1)+δσ*u0+σ(x0). Based on δσ received from P0 and u1 received from P2, P1 generates the output result z1=δσ*u1.
[0050] Among them, the offline communication volume and online communication volume of the above-mentioned implementation mode 1 and implementation mode 2 are the same, wherein the offline communication volume is n*l, the online communication volume is nlogn+n*l, and the total communication volume is nlogn+2n*l, wherein l=log|A|, |A| is the number of elements in A.
[0051] In practical applications, for the purpose of privacy protection, multi-party secure computing algorithms are usually black box algorithms, and the data transmission behavior between the computing nodes equipped with multi-party secure computing algorithms is opaque. As discussed in the background technology, typical applications of multi-party secure computing include machine learning, among which multi-party secure computing technology can be used to protect privacy data during the reasoning and training stages of machine learning, mainly involving the protection of model parameters and the protection of the data of each participant during the training process.
[0052] At present, common privacy-preserving machine learning solutions based on secure multi-party computing include: privacy-preserving machine learning protocols based on obfuscated circuits, oblivious transmission and other technologies, and executing secure multi-party computing protocols to complete nonlinear operation calculations such as activation functions. Based on secret sharing technology, multiple parties are allowed to participate in machine learning network model training or prediction, and the process will not disclose data or model information.
[0053] In addition to the above application areas, multi-party secure computing can also be applied to privacy-protected network security detection, joint statistical analysis of privacy-protected multi-party data, spam cleaning and filtering of encrypted emails, advertising conversion and other fields.
[0054] Among them, bilateral secure computing is usually used for joint statistical analysis of multi-party data with privacy protection, that is, querying across the databases of both parties while protecting the private data of both parties.
[0055] For example, consider the following Structured Query Language (SQL) statement (hereinafter referred to as the first SQL statement):
[0056] select a.key,sum(aw*by)from a join b on a.id=b.id group by a.key;
[0057] This SQL statement is used to align table a and table b according to the id column, and then group each row of data according to the a.key field to obtain m groups (m is the number of possible value classes of a.key in the table shard after alignment), and sum aw*by for each group. Among them, table a is stored in the first participant P0, and table b is stored in the second participant P1. P0 and P1 perform SQL queries through the secure computing technology of both parties, without exposing their own private data to each other. After the query is completed, only the query results are exposed to the querying party. Specifically, P0 and P1 implement the query of the first SQL statement above in the following way:
[0058] First, both parties use Private Set Intersection (PSI) to align data according to the id column. After alignment, the data of the P0 party is an n*2 matrix consisting of two columns, "a.key" and "aw". The data of the P1 party is an n*1 matrix consisting of a "by" column, where n is the number of rows with the same value of the connection field (i.e., id) in table a and table b, i.e., the number of rows in the aligned table shards.
[0059] Then, the two parties collaboratively calculate aw*by through the bilateral secure computing technology and obtain the calculation result t, where t is an n*1 matrix and is stored in a shared form between the two parties;
[0060] Next, both parties use the bilateral secure computing technology to calculate the aggregation function sum_group_by(t,a.key) to obtain the calculation result, where the calculation result is an m*1 matrix, which is stored in a shared form between both parties;
[0061] Finally, P0 and P1 feed back the calculation results to the querying party, which then sums them up to obtain the plaintext query result.
[0062] Among them, PSI is a proprietary protocol in the field of secure multi-party computing, which allows both parties to input private sets to jointly calculate the intersection of sets, and ensures that no additional element information is leaked except the result of the set intersection.
[0063] For another example, consider the following SQL statement (hereinafter referred to as the second SQL statement):
[0064] select a.key,sum(by)from a join b on a.id=b.id group by a.key;
[0065] This SQL statement is used to align table a and table b according to the id column, and then group each row of data according to the a.key field to obtain m groups (m is the number of possible value classes of a.key in the table shard after alignment), and sum each group for by. Among them, table a is stored in the first participant P0, and table b is stored in the second participant P1. P0 and P1 perform SQL queries through the secure computing technology of both parties, without exposing their own private data to each other. After the query is completed, only the query results are exposed to the querying party. Specifically, P0 and P1 implement the query of the second SQL statement above in the following way:
[0066] First, both parties use PSI to align data according to the id column. After alignment, the data on the P0 side is an n*1 matrix consisting of the "a.key" column; the data on the P1 side is an n*1 matrix consisting of the "by" column, where n is the number of rows with the same value of the connection field (i.e., id) in table a and table b;
[0067] Then, both parties use the bilateral secure computing technology to calculate the aggregation function sum_group_by(t,a.key) to obtain the calculation result, where t is the column vector composed of the elements in the by column, and the calculation result is an m*1 matrix, which is stored in a shared form between both parties;
[0068] Finally, P0 and P1 feed back the calculation results to the querying party, which then sums them up to obtain the plaintext query result.
[0069] For the above two SQL examples, sum_group_by(t,a.key) is usually calculated in the following way:
[0070] First, P0 performs one-hot encoding on the "a.key" column in the aligned published fragment to obtain an n*m matrix K, where each row of K is an m-dimensional one-hot vector. Then, P0 and P1 calculate K by calling the scalar multiplication protocol or the matrix multiplication protocol. T t, these two methods usually have huge communication overhead, as shown in Table 1 below:
[0071] Table 1 Calculation of K T The communication overhead of t
[0072]
[0073] Where t∈A n .
[0074] In view of this, the present disclosure provides a data processing method, device, medium and electronic device for secure computing.
[0075] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0076] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0077] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0078] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0079] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0080] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0081] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0082] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's information. Thus, the user can autonomously choose whether to provide information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0083] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide information to the electronic device.
[0084] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0085] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0086] Figure 1 FIG. 1 is a flow chart showing a data processing method for secure computing applied to a first participant according to an exemplary embodiment. Figure 1 As shown, the method may include S101 to S105.
[0087] In S101, first permutation information and second permutation information are determined according to a target matrix.
[0088] In the present disclosure, secure computing is used for the first party and the second party to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector. Wherein, each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, and m≤n. It can be understood that the target matrix and target column vector in the present disclosure can be any data that the holder is not convenient to disclose, and may include but is not limited to model parameters of a neural network model, etc. The method provided in the embodiments of the present disclosure can be applied to ciphertext multiplication operations in tasks such as data calculation, cleaning, analysis, model training, storage, and database query based on ciphertext.
[0089] The target matrix is held by the first participant alone, the target column vector is held by the second participant alone, or the target column vector is shared between the first participant and the second participant, that is, the first participant holds part or all of the target column vector. For example, the target matrix is K in the above two SQL examples. T , the target column vector is t in the above two SQL examples, where the first party is P0 and the second party is P1.
[0090] In one implementation, the target matrix is held solely by the first participant, and the target column vector is held solely by the second participant, that is, the second participant holds all of the target column vectors. In the above second SQL statement example, P1 (ie, the second participant) holds t (ie, by) alone.
[0091] In another embodiment, the target matrix is held by the first participant alone, and the target column vector is shared between the first participant and the second participant, that is, the second participant holds a portion of the target column vector, wherein the first participant holds a first slice of the target column vector, and the second participant holds a second slice of the target column vector. In the above first SQL statement example, t is stored in a shared form in both parties.
[0092] In S102, at least according to the first permutation information, a first round of secure permutation is performed together with the second participant to obtain a first permutation result fragment of the target column vector.
[0093] In one embodiment, the target column vector is shared between the first participant and the second participant. At this time, the first participant can perform the first round of safe permutation with the second participant based on the first permutation information and the first slice of the target column vector held by itself, and obtain the first permutation result slice of the target column vector; the second participant can perform the first round of safe permutation with the first participant based on the second slice of the target column vector held by itself, and obtain the fourth permutation result slice of the target column vector. That is, the first participant inputs the first permutation information and the first slice, and the second participant inputs the second slice. The two parties obtain the first permutation result slice and the fourth permutation result slice of the target column vector respectively by calling the safe permutation protocol (see the above embodiment 2 for the specific implementation method).
[0094] In another embodiment, the target column vector is held by the second participant alone. In this case, the first participant can perform the first round of safe permutation with the second participant based on the first permutation information to obtain the first permutation result slice of the target column vector; the second participant can perform the first round of safe permutation with the first participant based on the target column vector held by itself to obtain the fourth permutation result slice of the target column vector. That is, the first participant inputs the first permutation information, and the second participant inputs the target column vector. The two parties obtain the first permutation result slice and the fourth permutation result slice of the target column vector respectively by calling the safe permutation protocol (see the above embodiment 1 for the specific implementation method).
[0095] In S103, according to the first replacement result fragment and the second replacement information, a second round of security replacement is performed together with the second participant to obtain a second replacement result fragment.
[0096] In the present disclosure, the first participant and the second participant jointly perform a first round of security replacement and a second round of security replacement with the help of a semi-trusted third party (ie, P2).
[0097] In S104, a first result fragment of the product is generated according to the second permutation result fragment.
[0098] In the present disclosure, the first participant can perform a second round of security permutation with the second participant based on the first permutation result slice and the second permutation information to obtain the second permutation result slice, and generate the first result slice of the product based on the second permutation result slice; at the same time, the second participant can perform a second round of security permutation with the first participant based on the fourth permutation result slice to obtain the third permutation result slice, and generate the second result slice of the above product based on the third permutation result slice. Afterwards, the first participant and the second participant can share the result slices generated by each of them, and aggregate and merge the result slices generated by the two to obtain the final calculation result (i.e., the product of the target matrix and the target column vector). Among them, the result of the product of the target matrix and the target column vector includes the first result slice and the second result slice, that is, the target matrix*target column vector=first result slice+second result slice.
[0099] The communication in the whole calculation process is to call the n-dimensional (since the target column vector is n-dimensional) security permutation protocol twice. Therefore, the online communication volume for calculating the product of the target matrix and the target column vector is twice the online communication volume of the security permutation protocol, and the offline communication volume for calculating the product of the target matrix and the target column vector is twice the offline communication volume of the security permutation protocol. Correspondingly, the total communication volume for calculating the product of the target matrix and the target column vector is twice the total communication volume of the security permutation protocol. Therefore, the offline communication volume for calculating the product of the target matrix and the target column vector is 2n*l, the online communication volume is 2nlogn+2n*l, and the total communication volume is 2nlogn+4n*l. It can be seen that the data communication volume for calculating the product of the target matrix and the target column vector is only related to n, but not to m, and it does not increase with the increase of m.
[0100] In S105, the target data processing task is executed based on the first result slice.
[0101] The above-mentioned target data processing tasks can be SQL query tasks, machine learning network model training tasks, machine learning network model prediction tasks, etc.
[0102] In one embodiment, when the target data processing task is an SQL query task, the first participant can feed back the first result slice to the query party, that is, execute the target data processing task; at the same time, the second participant can feed back the second result slice to the query party; thereafter, the query party aggregates and merges the first result slice and the second result slice to obtain the final query result.
[0103] In the above technical solution, when calculating the product of the target matrix and the target column vector, the two participants can obtain the permutation result slices used to generate the above product through two rounds of secure permutation, and then the two participants generate the slice data of the above result according to the permutation result slices obtained by each party, which is convenient and fast, and improves the business processing efficiency of secure computing. In addition, the communication in the entire calculation process is to call the n-dimensional (because the target column vector is n-dimensional) secure permutation protocol twice, so that the data communication volume of the two rounds of secure permutation is only related to n, but not to m, and it does not increase with the increase of m. Therefore, the data communication volume of calculating the product of the target matrix and the target column vector can be greatly reduced, and the business processing efficiency of secure computing can be further improved.
[0104] The following is a detailed description of the specific implementation of determining the first replacement information and the second replacement information according to the target matrix in the above S101. Specifically, it can be achieved through the following steps (11) and (12):
[0105] Step (11): Obtain a reference matrix and an n-order lower triangular matrix.
[0106] In the present disclosure, the reference matrix is an m*n matrix. When m=n, the reference matrix K1=d. When m<n, K1=(O m,n-m ,d),O m,n-m is the zero matrix of m*(nm).
[0107] Among them, d is an m-order square matrix, and The diagonal elements of the matrix d are all 1, the value of the element in the next adjacent row of each diagonal element and in the same column as the diagonal element is -1, and the other elements are all 0.
[0108] For example, m=4, n=5, then
[0109] Step (12): Perform matrix decomposition on the target matrix based on the reference matrix and the n-th order lower triangular matrix to obtain a reference matrix, a first permutation matrix, an n-th order lower triangular matrix, and a second permutation matrix which are multiplied in sequence.
[0110] In the present disclosure, the first permutation matrix is a matrix representation of the first permutation information, and the second permutation matrix is a matrix representation of the second permutation information. The first permutation information and the second permutation information can both be represented in the form of tuples, and after the first permutation matrix and the second permutation matrix are obtained, they can be converted into the form of tuples.
[0111] For example, the target matrix Q can be decomposed into the following form:
[0112] Q=K1*σ1*∫*σ2
[0113] Among them, σ1 is the first permutation matrix, σ2 is the second permutation matrix, and ∫ is the n-order lower triangular matrix.
[0114] For example, That is, m = 4, n = 5, then
[0115] The tuple form corresponding to σ1 is (2 3 1 5 4), that is, the first permutation information is (2 3 1 5 4), which means that the first element after permutation is the second element of the original data set, the second element after permutation is the third element of the original data set, the third element after permutation is the first element of the original data set, the fourth element after permutation is the fifth element of the original data set, and the fifth element after permutation is the fourth element of the original data set.
[0116] The tuple form corresponding to σ2 is (3 1 2 4 5), that is, the second permutation information is (3 1 2 4 5), indicating that the first element after permutation is the third element of the original data set, the second element after permutation is the first element of the original data set, the third element after permutation is the second element of the original data set, the fourth element after permutation is still the fourth element of the original data set, and the fifth element after permutation is still the fifth element of the original data set.
[0117] The following is a detailed description of the specific implementation method of performing a second round of secure replacement with the second participant according to the first replacement result fragment and the second replacement information in S103 to obtain the second replacement result fragment. Specifically, it can be achieved through the following steps (31) and (32):
[0118] Step (31): Calculate the product of the n-order lower triangular matrix and the first permutation result slice to obtain the first matrix.
[0119] Step (32): Based on the first matrix and the second permutation information, perform a second round of security permutation together with the second participant to obtain a second permutation result fragment.
[0120] In the disclosure, the first participant calculates the product of the n-order lower triangular matrix and the first permutation result slice to obtain the first matrix, and performs the second round of safe permutation with the second participant according to the first matrix and the second permutation information to obtain the second permutation result slice; at the same time, the second participant calculates the product of the n-order lower triangular matrix and the fourth permutation result slice to obtain the second matrix, and performs the second round of safe permutation with the first participant according to the second matrix to obtain the third permutation result slice. That is, the first participant inputs the first matrix and the second permutation information, and the second participant inputs the second matrix, and the two parties obtain the second permutation result slice and the third permutation result slice respectively by calling the safe permutation protocol (for the specific implementation method, see the above-mentioned implementation method 2).
[0121] The following is a detailed description of the specific implementation method of generating the first result fragment according to the second replacement result fragment in the above S104. Specifically, it can be implemented through steps (41) and (42):
[0122] Step (31): Obtain a reference matrix.
[0123] Step (32): Determine the first result slice as the product of the reference matrix and the second permutation result slice.
[0124] At the same time, the second participant can generate a second result slice of the above product according to the third permutation result slice in the following manner: obtaining a reference matrix; and determining the product of the reference matrix and the third permutation result slice as the second result slice of the above product.
[0125] After the first participant and the second participant obtain the first result slice and the second result slice respectively, they add the two together to obtain the final calculation result (i.e., the product of the target matrix and the target column vector). Specifically, the data processing method for secure calculation applied to the first participant may also include the following two steps:
[0126] Obtaining a second result slice of the product generated by the second participant, wherein the second result slice is generated based on a third permutation result slice, and the third permutation result slice is obtained when the second participant performs a second round of secure permutation;
[0127] The sum of the first result slice and the second result slice is determined as the product of the target matrix and the target column vector.
[0128] In addition to being executed by the first participant, the above steps can also be executed by other electronic devices other than the first participant and the second participant. In this case, the other electronic device obtains the first result slice and the second result slice from the first participant and the second participant respectively, and then determines the sum of the two as the product of the target matrix and the target column vector.
[0129] In addition, before the above S101, the above method may further include the following steps:
[0130] In response to receiving the target data processing task, performing a privacy set intersection on the first attribute column in the first data table and the second data table with the second participant to obtain a first table fragment of an inner join result set of the first data table and the second data table;
[0131] Generate a target matrix based on the attribute values of the grouping fields in the first table fragment.
[0132] In this embodiment, the target data processing task includes a structured query language statement, that is, the target data processing task is an SQL query task, wherein the structured query language statement is used to group and aggregate the inner join result set according to the grouping field in the first table shard at least according to the second attribute column in the second table shard, the second table shard is the table shard of the inner join result set obtained by the second participant after intersecting the privacy set, and the first data table and the second data table are held by the first participant and the second participant respectively.
[0133] m is the number of categories of the attribute value of the grouping field in the first table shard, and n is the number of rows in the first table shard. The first participant can generate a target matrix according to the attribute value of the grouping field in the first table shard in the following manner: convert each attribute value in the column where the grouping field in the first table shard is located into an m-dimensional one-hot vector.
[0134] For example, the attribute values of the grouping field in the first table shard include attribute value 1, attribute value 2, and attribute value 3, wherein the one-hot vector corresponding to attribute value 1 is 100, the one-hot vector corresponding to attribute value 2 is 010, and the one-hot vector corresponding to attribute value 3 is 001.
[0135] The target column vector is generated based on at least the second attribute column. In one embodiment, the target column vector is shared between the first participant and the second participant. At this time, the first participant and the second participant collaboratively calculate the product of the second attribute column and the third attribute column in the first table shard, and the first participant obtains the first shard of the target column vector held by the first participant, and at the same time, the second participant obtains the second shard of the target column vector. At this time, the SQL statement in the above-mentioned target data processing task is used to group and aggregate the inner join result set according to the grouping fields in the first table shard based on the second attribute column in the second table shard and the third attribute column in the first table shard.
[0136] For example, the SQL statement in the target data processing task is the first SQL statement mentioned above, that is, select a.key, sum(aw*by)from a join b on a.id=b.id group by a.key, wherein the first data table is table a, the second data table is table b, the first attribute column is the id column, the second attribute column is the by column in the second table shard, the third attribute column is the aw column in the first table shard, and the grouping field is a.key.
[0137] In another embodiment, the target column vector is held by the second participant alone, and in this case, the elements in the second attribute column in the second table shard constitute the target column vector. In this case, the SQL statement in the target data processing task is used to group and aggregate the inner join result set according to the grouping field in the first table shard based on the second attribute column in the second table shard.
[0138] For example, the SQL statement in the target data processing task is the second SQL statement mentioned above, that is, select a.key, sum(by)from a join b on a.id=b.id group by a.key, wherein the first data table is table a, the second data table is table b, the first attribute column is the id column, the second attribute column is the by column in the second table shard, and the grouping field is a.key.
[0139] Figure 2 FIG. 1 is a flow chart showing a data processing method for secure computing applied to a second participant according to an exemplary embodiment. Figure 2 As shown, the method may include S201 to S204.
[0140] In S201, according to the target column vector or the second slice of the target column vector held by the second participant, the first round of security permutation is performed together with the first participant to obtain a fourth permutation result slice of the target column vector.
[0141] In the present disclosure, secure computing is used for a first party and a second party to collaboratively compute the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first party, the target column vector is held solely by the second party, or the target column vector is shared between the first party and the second party.
[0142] In S202, according to the fourth replacement result fragment, a second round of security replacement is performed together with the first participant to obtain a third replacement result fragment.
[0143] In S203, a second result fragment of the product is generated according to the third permutation result fragment.
[0144] In S204, the target data processing task is executed based on the second result slice.
[0145] The above-mentioned target data processing tasks can be SQL query tasks, machine learning network model training tasks, machine learning network model prediction tasks, etc.
[0146] In one embodiment, when the target data processing task is an SQL query task, the first participant can feed back the first result slice to the query party; at the same time, the second participant can feed back the second result slice to the query party, that is, execute the target data processing task; thereafter, the query party aggregates and merges the first result slice and the second result slice to obtain the final query result.
[0147] In the above technical solution, when calculating the product of the target matrix and the target column vector, the two participants can obtain the permutation result slices used to generate the above product through two rounds of secure permutation, and then the two participants generate the slice data of the above result according to the permutation result slices obtained by each party, which is convenient and fast, and improves the business processing efficiency of secure computing. In addition, the communication in the entire calculation process is to call the n-dimensional (because the target column vector is n-dimensional) secure permutation protocol twice, so that the data communication volume of the two rounds of secure permutation is only related to n, but not to m, and it does not increase with the increase of m. Therefore, the data communication volume of calculating the product of the target matrix and the target column vector can be greatly reduced, and the business processing efficiency of secure computing can be further improved.
[0148] Optionally, according to the fourth replacement result fragment, a second round of security replacement is performed together with the first participant to obtain a third replacement result fragment, including:
[0149] Calculate the product of the n-order lower triangular matrix and the fourth permutation result slice to obtain a second matrix;
[0150] According to the second matrix, a second round of security permutation is performed together with the first participant to obtain a third permutation result fragment.
[0151] Optionally, generating a second result slice according to the third replacement result slice includes:
[0152] Get the reference matrix;
[0153] The product of the reference matrix and the third permuted result slice is determined as a second result slice.
[0154] Optionally, the data processing method for secure computing applied to the second party further includes:
[0155] Obtaining a first result slice of the product generated by the first participant, wherein the first result slice is generated based on a second permutation result slice, and the second permutation result slice is obtained when the first participant performs a second round of secure permutation;
[0156] The sum of the first result slice and the second result slice is determined as the product of the target matrix and the target column vector.
[0157] Optionally, the data processing method for secure computing applied to the second party further includes:
[0158] In response to receiving a target data processing task, a privacy set intersection is performed on the first attribute column in the first data table and the second data table with the first participant to obtain a second table shard of the inner join result set of the first data table and the second data table, wherein the target data processing task includes a structured query language statement, and the structured query language statement is used to group and aggregate the inner join result set according to the grouping field in the first table shard at least based on the second attribute column in the second table shard. The first table shard is a table shard of the inner join result set obtained by the first participant after the privacy set intersection, the first data table and the second data are held by the first participant and the second participant respectively, and the target column vector is generated based on at least the second attribute column.
[0159] Optionally, the first participant and the second participant jointly perform the first round of security replacement and the second round of security replacement with the help of a semi-trusted third party.
[0160] The specific implementation methods of each step in the data processing method for secure computing applied to the second participant according to the embodiment of the present disclosure have been described in detail in the data processing method for secure computing applied to the first participant according to the embodiment of the present disclosure, and will not be repeated here.
[0161] Figure 3 It is a block diagram of a data processing device for secure computing applied to a first participant according to an exemplary embodiment. The secure computing is used for the first participant and the second participant to collaboratively compute the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is shared between the first participant and the second participant. Figure 3 As shown, the device 300 includes:
[0162] A first determination module 301 is used to determine first permutation information and second permutation information according to the target matrix;
[0163] A first replacement module 302, configured to perform a first round of security replacement together with the second participant at least according to the first replacement information, to obtain a first replacement result slice of the target column vector;
[0164] A second replacement module 303, configured to perform a second round of security replacement together with the second participant according to the first replacement result fragment and the second replacement information, to obtain a second replacement result fragment;
[0165] A first generating module 304, configured to generate a first result slice of the product according to the second permutation result slice;
[0166] The first execution module 305 is used to execute the target data processing task based on the first result slice.
[0167] In the above technical solution, when calculating the product of the target matrix and the target column vector, the two participants can obtain the permutation result slices used to generate the above product through two rounds of secure permutation, and then the two participants generate the slice data of the above result according to the permutation result slices obtained by each party, which is convenient and fast, and improves the business processing efficiency of secure computing. In addition, the communication in the entire calculation process is to call the n-dimensional (because the target column vector is n-dimensional) secure permutation protocol twice, so that the data communication volume of the two rounds of secure permutation is only related to n, but not to m, and it does not increase with the increase of m. Therefore, the data communication volume of calculating the product of the target matrix and the target column vector can be greatly reduced, and the business processing efficiency of secure computing can be further improved.
[0168] Optionally, the first determining module 301 includes:
[0169] A first acquisition submodule is used to acquire a reference matrix and an n-order lower triangular matrix;
[0170] A matrix decomposition submodule is used to perform matrix decomposition on the target matrix according to the reference matrix and the n-order lower triangular matrix to obtain the reference matrix, the first permutation matrix, the n-order lower triangular matrix and the second permutation matrix which are multiplied in sequence, wherein the first permutation matrix is a matrix representation of the first permutation information, and the second permutation matrix is a matrix representation of the second permutation information.
[0171] Optionally, the second replacement module 303 includes:
[0172] A first calculation submodule, used for calculating the product of the n-order lower triangular matrix and the first permutation result slice to obtain a first matrix;
[0173] The first replacement submodule is used to perform a second round of security replacement together with the second participant according to the first matrix and the second replacement information to obtain a second replacement result fragment.
[0174] Optionally, the first generating module 304 includes:
[0175] The second acquisition submodule is used to acquire a reference matrix;
[0176] A determination submodule is used to determine the product of the reference matrix and the second permutation result slice as a first result slice.
[0177] Optionally, the target column vector is in a shared form between the first participant and the second participant;
[0178] The first replacement module 302 is used to perform a first round of security replacement with the second participant according to the first replacement information and the first slice of the target column vector held by the first participant, so as to obtain a first replacement result slice of the target column vector.
[0179] Optionally, the target column vector is held solely by the second participant;
[0180] The first replacement module 302 is used to perform a first round of security replacement together with the second participant according to the first replacement information to obtain a first replacement result slice of the target column vector.
[0181] Optionally, the device 300 further includes:
[0182] A first acquisition module is configured to acquire a second result slice of the product generated by the second participant, wherein the second result slice is generated based on a third permutation result slice, and the third permutation result slice is obtained when the second participant performs the second round of security permutation;
[0183] The second determination module is used to determine the sum of the first result slice and the second result slice as the product of the target matrix and the target column vector.
[0184] Optionally, the device 300 further includes:
[0185] A first privacy set intersection module is used to perform privacy set intersection on the first attribute column in the first data table and the second data table with the second participant in response to receiving the target data processing task, so as to obtain a first table fragment of the inner join result set of the first data table and the second data table, wherein the target data processing task includes a structured query language statement, and the structured query language statement is used to group and aggregate the inner join result set according to the grouping field in the first table fragment at least according to the second attribute column in the second table fragment, the second table fragment is the table fragment of the inner join result set obtained by the second participant after the privacy set intersection, and the first data table and the second data table are held by the first participant and the second participant respectively;
[0186] A third generating module, configured to generate the target matrix according to the attribute value of the grouping field in the first table shard, wherein m is the number of categories of the attribute value of the grouping field in the first table shard, and n is the number of rows of the first table shard;
[0187] The target column vector is generated based at least on the second attribute column.
[0188] Optionally, the first participant and the second participant jointly perform the first round of security replacement and the second round of security replacement with the help of a semi-trusted third party.
[0189] Figure 4 It is a block diagram of a data processing device for secure computing applied to a second participant according to an exemplary embodiment. The secure computing is used for the first participant and the second participant to collaboratively compute the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is shared between the first participant and the second participant. Figure 4 As shown, the device 400 includes:
[0190] A third replacement module 401 is used to perform a first round of security replacement with the first participant according to the target column vector or the second slice of the target column vector held by the second participant, to obtain a fourth replacement result slice of the target column vector;
[0191] A fourth replacement module 402, configured to perform a second round of security replacement together with the first participant according to the fourth replacement result fragment to obtain a third replacement result fragment;
[0192] A second generating module 403, configured to generate a second result slice of the product according to the third permutation result slice;
[0193] The second execution module 404 is used to execute the target data processing task based on the second result slice.
[0194] In the above technical solution, when calculating the product of the target matrix and the target column vector, the two participants can obtain the permutation result slices used to generate the above product through two rounds of secure permutation, and then the two participants generate the slice data of the above result according to the permutation result slices obtained by each party, which is convenient and fast, and improves the business processing efficiency of secure computing. In addition, the communication in the entire calculation process is to call the n-dimensional (because the target column vector is n-dimensional) secure permutation protocol twice, so that the data communication volume of the two rounds of secure permutation is only related to n, but not to m, and it does not increase with the increase of m. Therefore, the data communication volume of calculating the product of the target matrix and the target column vector can be greatly reduced, and the business processing efficiency of secure computing can be further improved.
[0195] Optionally, the fourth replacement module 402 includes:
[0196] A second calculation submodule is used to calculate the product of the n-order lower triangular matrix and the fourth permutation result slice to obtain a second matrix;
[0197] The second replacement submodule is used to perform a second round of security replacement together with the first participant according to the second matrix to obtain a third replacement result fragment.
[0198] Optionally, the second generating module 403 includes:
[0199] A second acquisition module is used to acquire a reference matrix;
[0200] The third determination module is used to determine the product of the reference matrix and the third permutation result slice as the second result slice.
[0201] Optionally, the device 400 further includes:
[0202] A third acquisition module is used to acquire a first result slice of the product generated by the first participant, wherein the first result slice is generated based on a second permutation result slice, and the second permutation result slice is obtained when the first participant performs the second round of security permutation;
[0203] A fourth determination module is used to determine the sum of the first result slice and the second result slice as the product of the target matrix and the target column vector.
[0204] Optionally, the device 400 further includes:
[0205] The second privacy set intersection module is used to perform privacy set intersection on the first attribute column in the first data table and the second data table with the first participant in response to receiving the target data processing task, so as to obtain a second table shard of the inner join result set of the first data table and the second data table, wherein the target data processing task includes a structured query language statement, and the structured query language statement is used to group and aggregate the inner join result set according to the grouping field in the first table shard at least according to the second attribute column in the second table shard, the first table shard is the table shard of the inner join result set obtained by the first participant after the privacy set intersection, the first data table and the second data are held by the first participant and the second participant respectively, and the target column vector is generated based on at least the second attribute column.
[0206] Optionally, the first participant and the second participant jointly perform the first round of security replacement and the second round of security replacement with the help of a semi-trusted third party.
[0207] The present disclosure also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the data processing method for secure computing provided by the present disclosure and applied to the first participant or the steps of the data processing method for secure computing provided by the present disclosure and applied to the second participant.
[0208] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0209] like Figure 5As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0210] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0211] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0212] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0213] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0214] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0215] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: determines first permutation information and second permutation information according to a target matrix, wherein the secure calculation is used by the first participant and the second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is shared between the first participant and the second participant; performs a first round of secure permutation with the second participant at least according to the first permutation information to obtain a first permutation result slice of the target column vector; performs a second round of secure permutation with the second participant according to the first permutation result slice and the second permutation information to obtain a second permutation result slice; generates a first result slice of the product according to the second permutation result slice; and performs a target data processing task based on the first result slice.
[0216] Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: performs a first round of security permutation with the first participant according to the target column vector held by the second participant or the second slice of the target column vector, to obtain a fourth permutation result slice of the target column vector, wherein the security calculation is used for the first participant and the second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is shared by the first participant and the second participant; performs a second round of security permutation with the first participant according to the fourth permutation result slice, to obtain a third permutation result slice; generates a second result slice of the product according to the third permutation result slice; and performs the target data processing task based on the second result slice.
[0217] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0218] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0219] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, the first acquisition module may also be described as a "module for acquiring the second result fragment of the product generated by the second participant".
[0220] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0221] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0222] According to one or more embodiments of the present disclosure, Example 1 provides a data processing method for secure computing, wherein the secure computing is used by a first participant and a second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is in a shared form between the first participant and the second participant, and the method is applied to the first participant, including:
[0223] Determining first permutation information and second permutation information according to the target matrix;
[0224] Performing a first round of security permutation together with the second participant at least according to the first permutation information to obtain a first permutation result slice of the target column vector;
[0225] Perform a second round of security replacement together with the second participant according to the first replacement result fragment and the second replacement information to obtain a second replacement result fragment;
[0226] Generating a first result slice of the product according to the second permutation result slice;
[0227] Execute the target data processing task based on the first result slice.
[0228] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein determining the first permutation information and the second permutation information according to the target matrix includes:
[0229] Get the reference matrix and the n-order lower triangular matrix;
[0230] According to the reference matrix and the n-order lower triangular matrix, the target matrix is decomposed to obtain the reference matrix, the first permutation matrix, the n-order lower triangular matrix and the second permutation matrix which are multiplied in sequence, wherein the first permutation matrix is a matrix representation of the first permutation information, and the second permutation matrix is a matrix representation of the second permutation information.
[0231] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1, wherein the second round of secure permutation is performed together with the second participant according to the first permutation result fragment and the second permutation information to obtain a second permutation result fragment, including:
[0232] Calculate the product of the n-order lower triangular matrix and the first permutation result slice to obtain a first matrix;
[0233] According to the first matrix and the second permutation information, a second round of security permutation is performed together with the second participant to obtain a second permutation result fragment.
[0234] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 1, wherein generating a first result slice according to the second replacement result slice includes:
[0235] Get the reference matrix;
[0236] The product of the reference matrix and the second permuted result slice is determined as a first result slice.
[0237] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, wherein the target column vector is in a shared form between the first participant and the second participant;
[0238] The step of performing a first round of security permutation together with the second participant at least according to the first permutation information to obtain a first permutation result slice of the target column vector includes:
[0239] According to the first permutation information and the first slice of the target column vector held by the first participant, a first round of secure permutation is performed together with the second participant to obtain a first permutation result slice of the target column vector.
[0240] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1, wherein the target column vector is held solely by the second participant;
[0241] The step of performing a first round of security permutation together with the second participant at least according to the first permutation information to obtain a first permutation result slice of the target column vector includes:
[0242] According to the first permutation information, a first round of secure permutation is performed together with the second participant to obtain a first permutation result fragment of the target column vector.
[0243] According to one or more embodiments of the present disclosure, Example 7 provides the method of any one of Examples 1-6, wherein the method further includes:
[0244] Obtaining a second result slice of the product generated by the second participant, wherein the second result slice is generated based on a third permutation result slice, and the third permutation result slice is obtained when the second participant performs the second round of security permutation;
[0245] A sum of the first result slice and the second result slice is determined as the product of the target matrix and the target column vector.
[0246] According to one or more embodiments of the present disclosure, Example 8 provides the method of any one of Examples 1-6, wherein the method further includes:
[0247] In response to receiving the target data processing task, performing privacy set intersection on the first attribute column in the first data table and the second data table with the second participant to obtain a first table shard of the inner join result set of the first data table and the second data table, wherein the target data processing task includes a structured query language statement, and the structured query language statement is used to group and aggregate the inner join result set according to the grouping field in the first table shard at least based on the second attribute column in the second table shard, the second table shard is the table shard of the inner join result set obtained by the second participant after the privacy set intersection, and the first data table and the second data table are held by the first participant and the second participant respectively;
[0248] Generate the target matrix according to the attribute value of the grouping field in the first table shard, where m is the number of categories of the attribute value of the grouping field in the first table shard, and n is the number of rows of the first table shard;
[0249] The target column vector is generated based at least on the second attribute column.
[0250] According to one or more embodiments of the present disclosure, Example 9 provides the method described in any one of Examples 1-6, wherein the first participant and the second participant jointly perform the first round of security replacement and the second round of security replacement with the aid of a semi-trusted third party.
[0251] According to one or more embodiments of the present disclosure, Example 10 provides a data processing method for secure computing, wherein the secure computing is used by a first participant and a second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is in a shared form between the first participant and the second participant, and the method is applied to the second participant, including:
[0252] Performing a first round of security permutation together with the first party according to the target column vector or the second slice of the target column vector held by the second party, to obtain a fourth permutation result slice of the target column vector;
[0253] Perform a second round of security replacement together with the first participant according to the fourth replacement result fragment to obtain a third replacement result fragment;
[0254] Generating a second result slice of the product according to the third permutation result slice;
[0255] Execute the target data processing task based on the second result slice.
[0256] According to one or more embodiments of the present disclosure, Example 11 provides the method of Example 10, wherein the step of performing a second round of security replacement with the first participant according to the fourth replacement result fragment to obtain a third replacement result fragment includes:
[0257] Calculate the product of the n-order lower triangular matrix and the fourth permutation result slice to obtain a second matrix;
[0258] According to the second matrix, a second round of security permutation is performed together with the first participant to obtain a third permutation result fragment.
[0259] According to one or more embodiments of the present disclosure, Example 12 provides the method of Example 10, wherein generating a second result slice according to the third replacement result slice comprises:
[0260] Get the reference matrix;
[0261] The product of the reference matrix and the third permuted result slice is determined as the second result slice.
[0262] According to one or more embodiments of the present disclosure, Example 13 provides the method of any one of Examples 10-12, wherein the method further includes:
[0263] Obtaining a first result slice of the product generated by the first participant, wherein the first result slice is generated based on a second permutation result slice, and the second permutation result slice is obtained when the first participant performs the second round of security permutation;
[0264] A sum of the first result slice and the second result slice is determined as the product of the target matrix and the target column vector.
[0265] According to one or more embodiments of the present disclosure, Example 14 provides the method of any one of Examples 10-12, wherein the method further includes:
[0266] In response to receiving the target data processing task, a privacy set intersection is performed on the first attribute column in the first data table and the second data table with the first participant to obtain a second table shard of the inner join result set of the first data table and the second data table, wherein the target data processing task includes a structured query language statement, and the structured query language statement is used to group and aggregate the inner join result set according to the grouping field in the first table shard at least based on the second attribute column in the second table shard, the first table shard is the table shard of the inner join result set obtained by the first participant after the privacy set intersection, the first data table and the second data are held by the first participant and the second participant respectively, and the target column vector is generated based on at least the second attribute column.
[0267] According to one or more embodiments of the present disclosure, Example 15 provides the method described in any one of Examples 10-12, wherein the first participant and the second participant jointly perform the first round of security replacement and the second round of security replacement with the aid of a semi-trusted third party.
[0268] According to one or more embodiments of the present disclosure, Example 16 provides a data processing device for secure computing, wherein the secure computing is used by a first participant and a second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is in a shared form between the first participant and the second participant, and the device is applied to the first participant, including:
[0269] A first determination module, used to determine first permutation information and second permutation information according to the target matrix;
[0270] A first replacement module, configured to perform a first round of security replacement together with the second participant at least according to the first replacement information, to obtain a first replacement result slice of the target column vector;
[0271] A second replacement module, configured to perform a second round of security replacement together with the second participant according to the first replacement result fragment and the second replacement information, to obtain a second replacement result fragment;
[0272] A first generating module, configured to generate a first result slice of the product according to the second permutation result slice;
[0273] A first execution module is used to execute a target data processing task based on the first result slice.
[0274] According to one or more embodiments of the present disclosure, Example 17 provides a data processing device for secure computing, wherein the secure computing is used by a first participant and a second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is in a shared form between the first participant and the second participant, and the device is applied to the second participant, including:
[0275] A third replacement module, configured to perform a first round of security replacement together with the first participant according to the target column vector or the second slice of the target column vector held by the second participant, to obtain a fourth replacement result slice of the target column vector;
[0276] A fourth replacement module, configured to perform a second round of security replacement together with the first participant according to the fourth replacement result fragment, to obtain a third replacement result fragment;
[0277] A second generating module, configured to generate a second result slice of the product according to the third permutation result slice;
[0278] A second execution module is used to execute a target data processing task based on the second result slice.
[0279] According to one or more embodiments of the present disclosure, Example 18 provides a computer-readable medium having a computer program stored thereon, which implements the steps of any of the methods described in Examples 1-15 when executed by a processing device.
[0280] According to one or more embodiments of the present disclosure, Example 19 provides an electronic device, including:
[0281] a storage device having a computer program stored thereon;
[0282] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in any one of Examples 1-15.
[0283] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0284] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0285] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A data processing method for secure computing, characterized in that: The secure calculation is used for a first participant and a second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is in a shared form between the first participant and the second participant, and the method is applied to the first participant, including: Determining first permutation information and second permutation information according to the target matrix; Performing a first round of security permutation together with the second participant at least according to the first permutation information to obtain a first permutation result slice of the target column vector; Perform a second round of security replacement together with the second participant according to the first replacement result fragment and the second replacement information to obtain a second replacement result fragment; Generating a first result slice of the product according to the second permutation result slice; Execute the target data processing task based on the first result slice; The step of determining the first permutation information and the second permutation information according to the target matrix includes: Get the reference matrix and the n-order lower triangular matrix; Performing matrix decomposition on the target matrix according to the reference matrix and the n-order lower triangular matrix to obtain the reference matrix, a first permutation matrix, the n-order lower triangular matrix, and a second permutation matrix that are multiplied in sequence, wherein the first permutation matrix is a matrix representation of the first permutation information, and the second permutation matrix is a matrix representation of the second permutation information; The first participant and the second participant jointly perform the first round of security replacement and the second round of security replacement with the help of a semi-trusted third party.
2. The method according to claim 1, characterized in that The performing a second round of security replacement together with the second participant according to the first replacement result fragment and the second replacement information to obtain a second replacement result fragment, including: Calculate the product of the n-order lower triangular matrix and the first permutation result slice to obtain a first matrix; According to the first matrix and the second permutation information, a second round of security permutation is performed together with the second participant to obtain a second permutation result fragment.
3. The method according to claim 1, characterized in that: The step of generating a first result segment according to the second replacement result segment comprises: Get the reference matrix; The product of the reference matrix and the second permuted result slice is determined as a first result slice.
4. The method according to claim 1, characterized in that: The target column vector is in a shared form between the first participant and the second participant; The step of performing a first round of security permutation together with the second participant at least according to the first permutation information to obtain a first permutation result slice of the target column vector includes: According to the first permutation information and the first slice of the target column vector held by the first participant, a first round of secure permutation is performed together with the second participant to obtain a first permutation result slice of the target column vector.
5. The method according to claim 1, characterized in that The target column vector is held solely by the second participant; The step of performing a first round of security permutation together with the second participant at least according to the first permutation information to obtain a first permutation result slice of the target column vector includes: According to the first permutation information, a first round of secure permutation is performed together with the second participant to obtain a first permutation result fragment of the target column vector.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Obtaining a second result slice of the product generated by the second participant, wherein the second result slice is generated based on a third permutation result slice, and the third permutation result slice is obtained when the second participant performs the second round of security permutation; A sum of the first result slice and the second result slice is determined as the product of the target matrix and the target column vector.
7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: In response to receiving the target data processing task, performing privacy set intersection on the first attribute column in the first data table and the second data table with the second participant to obtain a first table shard of the inner join result set of the first data table and the second data table, wherein the target data processing task includes a structured query language statement, and the structured query language statement is used to group and aggregate the inner join result set according to the grouping field in the first table shard at least according to the second attribute column in the second table shard, the second table shard is the table shard of the inner join result set obtained by the second participant after the privacy set intersection, and the first data table and the second data table are held by the first participant and the second participant respectively; Generate the target matrix according to the attribute value of the grouping field in the first table shard, where m is the number of categories of the attribute value of the grouping field in the first table shard, and n is the number of rows of the first table shard; The target column vector is generated based at least on the second attribute column.
8. A data processing method for secure computing, characterized in that: The secure calculation is used for a first participant and a second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is in a shared form between the first participant and the second participant, and the method is applied to the second participant, including: Performing a first round of security permutation together with the first party according to the target column vector or the second slice of the target column vector held by the second party, to obtain a fourth permutation result slice of the target column vector; Perform a second round of security replacement together with the first participant according to the fourth replacement result fragment to obtain a third replacement result fragment; Generating a second result slice of the product according to the third permutation result slice; Execute the target data processing task based on the second result slice; The first participant and the second participant jointly perform the first round of security replacement and the second round of security replacement with the help of a semi-trusted third party.
9. The method according to claim 8, characterized in that The step of performing a second round of security replacement together with the first participant according to the fourth replacement result fragment to obtain a third replacement result fragment includes: Calculate the product of the n-order lower triangular matrix and the fourth permutation result slice to obtain a second matrix; According to the second matrix, a second round of security permutation is performed together with the first participant to obtain a third permutation result fragment.
10. The method according to claim 8, characterized in that The step of generating a second result segment according to the third replacement result segment comprises: Get the reference matrix; The product of the reference matrix and the third permuted result slice is determined as the second result slice.
11. The method according to any one of claims 8 to 10, characterized in that: The method further comprises: Obtaining a first result slice of the product generated by the first participant, wherein the first result slice is generated based on a second permutation result slice, and the second permutation result slice is obtained when the first participant performs the second round of security permutation; A sum of the first result slice and the second result slice is determined as the product of the target matrix and the target column vector.
12. The method according to any one of claims 8 to 10, characterized in that: The method further comprises: In response to receiving the target data processing task, a privacy set intersection is performed on the first attribute column in the first data table and the second data table with the first participant to obtain a second table shard of the inner join result set of the first data table and the second data table, wherein the target data processing task includes a structured query language statement, and the structured query language statement is used to group and aggregate the inner join result set according to the grouping field in the first table shard at least based on the second attribute column in the second table shard, the first table shard is the table shard of the inner join result set obtained by the first participant after the privacy set intersection, the first data table and the second data are held by the first participant and the second participant respectively, and the target column vector is generated based on at least the second attribute column.
13. A data processing device for secure computing, characterized in that: The secure calculation is used for a first participant and a second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is in a shared form between the first participant and the second participant, and the device is applied to the first participant, including: A first determination module, used to determine first permutation information and second permutation information according to the target matrix; A first replacement module, configured to perform a first round of security replacement together with the second participant at least according to the first replacement information, to obtain a first replacement result slice of the target column vector; A second replacement module, configured to perform a second round of security replacement together with the second participant according to the first replacement result fragment and the second replacement information, to obtain a second replacement result fragment; A first generating module, configured to generate a first result slice of the product according to the second permutation result slice; A first execution module, configured to execute a target data processing task based on the first result slice; Wherein, the first determining module includes: A first acquisition submodule is used to acquire a reference matrix and an n-order lower triangular matrix; a matrix decomposition submodule, configured to perform matrix decomposition on the target matrix according to the reference matrix and the n-order lower triangular matrix, to obtain the reference matrix, a first permutation matrix, the n-order lower triangular matrix, and a second permutation matrix that are multiplied in sequence, wherein the first permutation matrix is a matrix representation of the first permutation information, and the second permutation matrix is a matrix representation of the second permutation information; The first participant and the second participant jointly perform the first round of security replacement and the second round of security replacement with the help of a semi-trusted third party.
14. A data processing device for secure computing, characterized in that: The secure calculation is used for a first participant and a second participant to collaboratively calculate the product of an m*n target matrix and an n-dimensional target column vector, wherein each column of the target matrix is an m-dimensional one-hot vector, each row of the target matrix contains non-zero elements, m≤n, the target matrix is held solely by the first participant, the target column vector is held solely by the second participant, or the target column vector is in a shared form between the first participant and the second participant, and the device is applied to the second participant, including: A third replacement module, configured to perform a first round of security replacement together with the first participant according to the target column vector or the second slice of the target column vector held by the second participant, to obtain a fourth replacement result slice of the target column vector; A fourth replacement module, configured to perform a second round of security replacement together with the first participant according to the fourth replacement result fragment, to obtain a third replacement result fragment; A second generating module, configured to generate a second result slice of the product according to the third permutation result slice; A second execution module, used to execute the target data processing task based on the second result slice; The first participant and the second participant jointly perform the first round of security replacement and the second round of security replacement with the help of a semi-trusted third party.
15. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 12 are implemented.
16. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 12.
