Multi-party data processing method and device, equipment and storage medium
By performing bit-level decomposition and secret sharding of floating-point numbers, the problem of insufficient floating-point number operation accuracy in the three-party secure computing environment is solved, and high-precision and efficient floating-point number calculation are achieved.
Patent Information
- Application Number
- CN202411709039.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-04
AI Technical Summary
In a three-party secure computing environment, the accuracy of floating-point number operations is difficult to guarantee, especially when dealing with a large number of floating-point multiplication operations, direct truncation operations will introduce errors, and the use of larger modulus will increase the computational burden and communication complexity.
By performing digit-level decomposition of floating-point numbers, the first to be processed and the second to be processed are respectively performed to prepare the calculation process, and the preprocessed data provided by the three data processing participants are used for secret fragmentation processing. Finally, each data processing participant processs the calculated data and reconstructs the floating-point number to obtain the target secret data.
The accuracy of floating-point number calculation is improved, the problem of error introduction and increased computational burden is avoided, and the high accuracy and efficiency of floating-point number calculation in a three-party secure computing environment is ensured.
Smart Images

Figure CN119556881A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of multi-party secure computing technology, and in particular to a multi-party data processing method, device, equipment and storage medium. Background Art
[0002] In recent years, the demand for data sharing has been growing, but at the same time, data privacy protection and security issues have become increasingly prominent. In this context, multi-party secure computation, a technology that allows participants to collaboratively complete computing tasks without leaking their sensitive data, is gradually becoming the focus of academia and industry.
[0003] In a three-party secure computing (3PC, or three phase commit) environment, a common practice is to convert a decimal into an integer by multiplying it by a large factor, and use a large modulus to avoid the problem of loop overflow. However, this strategy exposes limitations when dealing with a large number of floating-point multiplication operations: using a larger modulus significantly increases the computational burden and communication complexity, and the direct truncation operation ignores the carry after the dth bit, thereby introducing errors. In view of the above challenges, there is a fixed-point decimal multiplication scheme under the three-party secret sharing framework, and a protocol for calculating piecewise linear polynomial functions is designed to advance the technical boundaries in this field. However, it has not fundamentally solved the problem of the accuracy of floating-point operations in the 3PC scenario. Therefore, how to improve the accuracy of floating-point operations is something that needs to be solved. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a multi-party data processing method, device, equipment and storage medium, which can improve the accuracy of floating-point number calculation. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a multi-party data processing method, comprising:
[0006] Based on the floating point number composition structure, the first data to be processed provided by the first secret data holder and the second data to be processed provided by the second secret data holder are respectively decomposed at a digit level to obtain first decomposed data and second decomposed data;
[0007] Based on the target data processing task, the first decomposed data and the second decomposed data are processed for operation preparation to obtain first processed data and second processed data;
[0008] Using the pre-processed data provided by the three data processing participants respectively, the first processed data and the second processed data are secretly sharded to obtain the data to be calculated corresponding to each of the data processing participants respectively;
[0009] Each of the data processing participants processes the corresponding data to be calculated to obtain initial secret data, and reconstructs the initial secret data into a floating point number to obtain target secret data.
[0010] Optionally, the data processing participants are sequentially connected end to end in communication to form a ring data transmission architecture;
[0011] Accordingly, the method further includes:
[0012] Based on a preset three-party random function, a corresponding first local random number and a second local random number are generated for each of the data processing participants respectively; the first local random number is used in the secret data processing process of the first data to be processed; the second local random number is used in the secret data processing process of the second data to be processed;
[0013] Sending the first local random number and the second local random number of any data processing participant to the next data processing participant in the ring data transmission architecture, and simultaneously obtaining the first remote random number and the second remote random number generated and provided by the previous data processing participant in the ring data transmission architecture;
[0014] The first pre-processed data corresponding to each of the data processing participants is determined based on the difference between the first local random number and the first remote random number of each of the data processing participants, and the second pre-processed data corresponding to each of the data processing participants is determined based on the difference between the second local random number and the second remote random number of each of the data processing participants; wherein the sum of the first pre-processed data is equal to zero; and the sum of the second pre-processed data is equal to zero.
[0015] Optionally, the using the pre-processed data respectively provided by the three data processing participants to perform secret slicing processing on the first processed data and the second processed data to obtain the data to be calculated corresponding to each of the data processing participants respectively includes:
[0016] Obtaining, through the secret data holder, first pre-processed data and the second pre-processed data respectively provided by three data processing participants;
[0017] Based on the difference between the first preprocessed data and the first processed data, the first data to be calculated corresponding to each data processing participant is determined, and based on the difference between the second preprocessed data and the second processed data, the second data to be calculated corresponding to each data processing participant is determined.
[0018] Optionally, the step of performing bit-level decomposition on first data to be processed provided by the first secret data holder and second data to be processed provided by the second secret data holder based on the floating point number composition structure to obtain first decomposed data and second decomposed data includes:
[0019] The first data to be processed provided by the first secret data holder is split into exponent data, sign bit data and mantissa data locally at the first secret data holder to obtain first decomposed data, and the second data to be processed provided by the second secret data holder is split into exponent data, sign bit data and mantissa data locally at the second secret data holder to obtain second decomposed data.
[0020] Optionally, when the target data processing task is a data summation task, before performing computation preparation processing on the first decomposed data and the second decomposed data based on the target data processing task to obtain the first processed data and the second processed data, the method further includes:
[0021] Determine a shift number based on a difference between exponential data in the first decomposed data and exponential data in the second decomposed data, and perform an exponential alignment operation on the first decomposed data and the second decomposed data based on the shift number;
[0022] Accordingly, performing computation preparation processing on the first decomposed data and the second decomposed data based on the target data processing task to obtain first processed data and second processed data includes:
[0023] The sign bit data and the mantissa data in the first decomposed data are combined to obtain first processed data, and the sign bit data and the mantissa data in the second decomposed data are combined to obtain second processed data.
[0024] Optionally, when the target data processing task is a data product task, before performing computation preparation processing on the first decomposed data and the second decomposed data based on the target data processing task to obtain the first processed data and the second processed data, the method further includes:
[0025] Determine a target index value by summing the index data in the first decomposed data and the index data in the second decomposed data;
[0026] Accordingly, performing computation preparation processing on the first decomposed data and the second decomposed data based on the target data processing task to obtain first processed data and second processed data includes:
[0027] The mantissa data in the first decomposed data is determined as the first processed data, and the mantissa data in the second decomposed data is determined as the second processed data.
[0028] Optionally, the step of processing the corresponding data to be calculated by each of the data processing participants to obtain initial secret data, and reconstructing the initial secret data into a floating point number to obtain target secret data includes:
[0029] Each of the data processing participants processes the corresponding data to be calculated to obtain each secret sub-data, and determines the initial secret data based on the sum of each of the secret sub-data;
[0030] The exponent value of the initial secret data is adjusted based on the target exponent value to obtain target secret data.
[0031] In a second aspect, the present application discloses a multi-party data processing device, comprising:
[0032] A floating point number splitting module, used for performing bit-level decomposition on first data to be processed provided by the first secret data holder and second data to be processed provided by the second secret data holder respectively based on the floating point number composition structure, so as to obtain first decomposed data and second decomposed data;
[0033] A calculation preparation module, used for performing calculation preparation processing on the first decomposed data and the second decomposed data based on a target data processing task to obtain first processed data and second processed data;
[0034] A data operation module, used to perform secret slicing processing on the first processed data and the second processed data using the pre-processed data respectively provided by the three data processing participants, so as to obtain the data to be calculated corresponding to each of the data processing participants;
[0035] The secret data determination module is used to process the corresponding data to be calculated through each of the data processing participants to obtain initial secret data, and reconstruct the initial secret data into a floating point number to obtain target secret data.
[0036] In a third aspect, the present application discloses an electronic device, comprising:
[0037] Memory, used to store computer programs;
[0038] A processor is used to execute the computer program to implement the aforementioned multi-party data processing method.
[0039] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned multi-party data processing method when executed by a processor.
[0040] It can be seen that in the present application, the first data to be processed provided by the first secret data holder and the second data to be processed provided by the second secret data holder are respectively decomposed at the digital level based on the floating point composition structure to obtain the first decomposed data and the second decomposed data; the first decomposed data and the second decomposed data are pre-processed based on the target data processing task to obtain the first processed data and the second processed data; the first processed data and the second processed data are secretly sliced using the pre-processed data provided by the three data processing participants to obtain the data to be calculated corresponding to each of the data processing participants; the corresponding data to be calculated is processed by each of the data processing participants to obtain the initial secret data, and the initial secret data is reconstructed into a floating point number to obtain the target secret data. That is, the decomposed data after the digital level decomposition of the first data to be processed and the second data to be processed provided by the secret data holder are respectively calculated, and the target secret data is obtained by reconstructing the floating point number according to the calculation result. In this way, the calculation accuracy of floating point number processing can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0042] Figure 1 A flow chart of a multi-party data processing method disclosed in this application;
[0043] Figure 2 This is a schematic diagram of the structure of a multi-party data processing device disclosed in this application;
[0044] Figure 3 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] In modern computer systems, floating point numbers are binary numbers used to approximate real numbers. In order to accurately define the representation of floating point numbers, this application introduces parameters p and q, which represent the number of bits of the exponent and mantissa of the floating point number, respectively. Specifically, a floating point number x is defined, which consists of a triple (s, e, m), where s {0,1} is the sign bit of the floating point number, and e=E-Bias is in the range of [-2 p-1 +1,2 p-1 ], where E is a p-bit binary code and Bias is a value of 2 p-1 -1 bias. m=1+0.M is an unsigned fixed-point mantissa, where the value range of M is [0,2 q-1 ], 0.M is a decimal greater than 0 and less than 1. Since the mantissa contains an implicit 1, the actual range of m is: 1≤m<2. Given a floating point number x, the normalized representation of the IEEE floating point standard (also known as the IEEE binary floating point arithmetic standard) is: x=(-1) s ×m×2 e First, split a floating point number x into three integer parts for sharing, that is, ⟨x>=(x 1 ,x 2 ,x 3 )=[( , , ),( , , ),( , , )]. Where x i is a slice of the floating point number x, , , It is the slice of the sign, exponent, and mantissa corresponding to x. It is worth noting that for single-precision floating-point numbers, p=8, q=23, and for double-precision floating-point numbers, p=11, q=52.
[0047] See also Figure 1 As shown, the embodiment of the present application discloses a multi-party data processing method, including:
[0048] Step S11: performing bit-level decomposition on first data to be processed provided by the first secret data holder and second data to be processed provided by the second secret data holder respectively based on the floating point number composition structure to obtain first decomposed data and second decomposed data.
[0049] In this embodiment, each of the data processing participants is connected to each other end to end in turn to form a ring data transmission architecture; accordingly, the method also includes: generating a corresponding first local random number and a second local random number for each of the data processing participants based on a preset three-party random function; the first local random number is used for the secret data processing process of the first data to be processed; the second local random number is used for the secret data processing process of the second data to be processed; the first local random number and the second local random number of any data processing participant are sent to the next data processing participant in the ring data transmission architecture, and the first remote random number and the second remote random number generated and provided by the previous data processing participant in the ring data transmission architecture are obtained; based on the difference between the first local random number and the first remote random number of each data processing participant, the first pre-processed data corresponding to each data processing participant is determined, and based on the difference between the second local random number and the second remote random number of each data processing participant, the second pre-processed data corresponding to each data processing participant is determined; wherein the sum of each first pre-processed data is equal to zero; the sum of each second pre-processed data is equal to zero. For three data processing participants, this application is set to P respectively. 1 , P 2 , P 3 Then, the offline preprocessing phase of the three-party high-precision confidential data is specifically as follows: 1 Generate random numbers locally 1 , and 1 Send to P 2 ;Participant P 2 Generate random numbers locally 2 , and 2 Send to P 2 ;Participant P 3 Generate random numbers locally 3 , and 3 Send to P 1 . Participant P 1 Calculate a locally 1 = 1 - 3 ;Participant P 2 Calculate a locally 2 = 2 - 1 ;Participant P 3Calculate a locally 3 = 3 - 2 . With properties: a 1 +a 2 +a 3 = 0. Using the same method, participant P 1 Generate random numbers locally 1 , and 1 Send to P 2 ;Participant P 2 Generate random numbers locally 2 , and 2 Send to P 2 ;Participant P 3 Generate random numbers locally 3 , and 3 Send to P 1 . Participant P 1 Calculate b locally 1 = 1 - 3 ;Participant P 2 Calculate b locally 2 = 2 - 1 ;Participant P 3 Calculate b locally 3 = 3 - 2 . With properties: b 1 +b 2 +b 3 = 0. Furthermore, P 1 We can get: c 1 =a 1 +b 1 , P2 can get: c 2 =a 2 +b 2 , P 3 We can get: c 3 =a 3 +b 3 .
[0050] In this embodiment, the first secret data holder holds the first secret data A, and the second secret data holder holds the second secret data B. The first data to be processed provided by the first secret data holder is split into exponent data, sign bit data, and mantissa data at the local side of the first secret data holder to obtain the first decomposed data, and the second data to be processed provided by the second secret data holder is split into exponent data, sign bit data, and mantissa data at the local side of the second secret data holder to obtain the second decomposed data. For the two floating-point numbers A and B that need to be summed in ciphertext, data splitting is performed locally respectively. For the value A of the first secret data holder, it is split locally into exponent A.e, sign bit A.s, and mantissa A.m. For the value B of the second secret data holder, it is split locally into exponent B.e, sign bit B.s, and mantissa B.m.
[0051] Step S12: Perform operation preparation processing on the first decomposed data and the second decomposed data based on the target data processing task to obtain the first processed data and the second processed data.
[0052] In a specific embodiment, when the target data processing task is a data summation task, before performing operation preparation processing on the first decomposed data and the second decomposed data based on the target data processing task to obtain the first processed data and the second processed data, it further includes: determining the shift number based on the difference between the exponent data in the first decomposed data and the exponent data in the second decomposed data, and performing exponent alignment operation on the first decomposed data and the second decomposed data based on the shift number. Calculate the distance d = ⟨A.e - B.e⟩ between the exponents of the two floating-point numbers based on the three-party secret sharing, obtain the shift numbers of A and B according to d, and perform corresponding shifts on A and B. The moving range of the values participating in the operation is [0, q + 1], and A and B do not move simultaneously. If d > q + 1 or -d > q + 1, it indicates that the two values are quite different, and then the other value is discarded without loss of precision. Among them, the corresponding shifts during exponent alignment are as follows: If A.e > B.e, then A is shifted left for exponent alignment, and after alignment, A.m > B.m. If A.e < B.e, then B is shifted left, and after alignment, A.m < B.m. Then, combine the sign bit data and the mantissa data in the first decomposed data to obtain the first processed data, and combine the sign bit data and the mantissa data in the second decomposed data to obtain the second processed data. After exponent alignment, combine the value x obtained by combining the sign bit A.s and the mantissa A.m of the participant, and the value y obtained by combining the sign bit B.s and the mantissa B.m of the participant for the addition based on the three-party secret sharing.
[0053] In another specific embodiment, when the target data processing task is a data product task, before performing operation preparation processing on the first decomposed data and the second decomposed data based on the target data processing task to obtain the first processed data and the second processed data, it also includes: determining the target exponent value by summing the exponential data in the first decomposed data and the exponential data in the second decomposed data. Adding two exponents based on three-party secret sharing e=⟨A.e+Be> [-2 q +2,2 q Then, the mantissa data in the first decomposed data is determined as the first processed data, and the mantissa data in the second decomposed data is determined as the second processed data. The mantissa Am of participant 1 is recorded as x, and the mantissa Bm of participant 2 is recorded as y.
[0054] Step S13: Use the pre-processed data provided by the three data processing participants to perform secret slicing on the first processed data and the second processed data to obtain the data to be calculated corresponding to each of the data processing participants.
[0055] In this embodiment, the use of the pre-processed data provided by the three data processing participants to perform secret slicing on the first processed data and the second processed data to obtain the data to be calculated corresponding to each of the data processing participants includes: obtaining the first pre-processed data and the second pre-processed data provided by the three data processing participants through the secret data holder; determining the first data to be calculated corresponding to each of the data processing participants based on the difference between the first pre-processed data and the first processed data, and determining the second data to be calculated corresponding to each of the data processing participants based on the difference between the second pre-processed data and the second processed data. In a specific embodiment, when the target data processing task is a data summation task, the secret holder x performs secret slicing: x 1 =a 3 –x,x 2 =a 1 -x,x 3 =a 2 -x. Secret holder y, secret sharding: y 1 =b 3 –y,y 2 =b 1 -y,y 3 =b 2 -y. Then, the participating parties in P 1 Get x 1 ,y 1 , local computing: P 1 :z 1=x 1 +y 1 , the participants in P 2 Get x 2 ,y 2 , local computing: P 2 :z 2 =x 2 +y 2 , the participants in P 3 Get x 3 ,y 3 , local computing: P 3 :z 3 =x 3 +y 3 It should be noted here that the reason for using x 1 ,y 1 Send to P 1 Because x 1 ,y 1 A used in the generation process 3 and b 3 , P 1 It is impossible to decipher the random number generated by itself, which can ensure the privacy of the data sharing process. In another specific embodiment, when the target data processing task is a data product task, the secret holder x performs secret sharding: x 1 =a 3 –x,x 2 =a 1 -x,x 3 =a 2 -x; secret holder y, secret sharding: y 1 =b 3 –y,y 2 =b 1 -y,y 3 =b 2 -y; Participating party P 1 Get x 1 ,y 1 , local calculation: 1 =(x 1 y 1 -a 1 b 1 +c 1 ) / 3, and 1 Send to P 2 ; Participating Calculator P 2 Get x 2 ,y 2 , local calculation: 2 =(x 2 y2 -a 2 b 2 +c 2 ) / 3, and 2Send to P 3 ; Participant P3 obtains x3 and y3 and performs local calculation: 3 =(x 3 y 3 -a 3 b 3 +c 3 ) / 3, and 2 Send to P 1 ; Participating Calculator P 1 Calculation: z 1 =-2 3 - 1 ; Participating Calculator P 2 Calculation: z 2 =-2 1 - 2 ,;Participating calculation party P 3 Calculation: z 3 =-2 2 - 3 .
[0056] Step S14: each of the data processing participants processes the corresponding data to be calculated to obtain initial secret data, and reconstructs the initial secret data into a floating point number to obtain target secret data.
[0057] In this embodiment, each data processing participant processes the corresponding data to be calculated to obtain each secret sub-data, and determines the initial secret data based on the sum of each secret sub-data; and adjusts the exponent value of the initial secret data based on the target exponent value to obtain the target secret data. In a specific embodiment, when the target data processing task is a data summation task, Z=z 1 +z 2 +z 3 , then the mantissa of Z is normalized, and the exponent is adjusted to create a normalized floating point output to obtain the target secret data. In another specific embodiment, when the target data processing task is a data product task, the result is: Z=z 1 +z 2 +z 3 , after multiplication, we get a fixed-point number of 2p+2 bits, and m [0,4]. Finally, the mantissa is normalized and the exponent is adjusted to create a standardized floating point output to obtain the target secret data. For the product task, the algorithm mainly consists of two parts. The first step is the exponential summation based on secret sharing. The exponential summation value range is e [-2 p +2,2 p ], the exponent occupies p+2 bits. The second part is the multiplication of the mantissa, which is the sum of the bit widths of the input mantissas m [2 2q ,(2q+1-1) 2 ]. m is a fixed-point integer with 2q fractional bits. For division, in order to maintain the same error as the plaintext, a local calculation is first performed on the dividend. When A is the dividend, A=1 / A, and when B is the dividend, B=1 / B. The remaining steps are the same as multiplication.
[0058] It can be seen that in this embodiment, in order to solve the problem of insufficient floating-point calculation accuracy in the three-party secret sharing scenario, the floating-point sign bit, exponent bit and mantissa bit are carefully decomposed at the bit level. Based on the bit-level decomposition, a three-party floating-point secret sharing calculation technology that does not require truncation is designed to perform three-party floating-point basic operations. After the operation is completed, the original floating-point representation is restored by bit-level reorganization. That is, the first data to be processed and the second data to be processed provided by the secret data holder are respectively subjected to bit-level decomposition and the decomposed data are operated, and the target secret data is obtained by reconstructing the floating-point number according to the operation result. In this way, the calculation accuracy of floating-point processing can be improved.
[0059] refer to Figure 2 The embodiment of the present application also discloses a multi-party data processing device, including:
[0060] The floating point number splitting module 11 is used to perform bit-level decomposition on the first data to be processed provided by the first secret data holder and the second data to be processed provided by the second secret data holder respectively based on the floating point number composition structure, so as to obtain first decomposed data and second decomposed data;
[0061] A calculation preparation module 12, configured to perform calculation preparation processing on the first decomposed data and the second decomposed data based on a target data processing task to obtain first processed data and second processed data;
[0062] The data operation module 13 is used to perform secret slicing processing on the first processed data and the second processed data using the pre-processed data provided by the three data processing participants, so as to obtain the data to be calculated corresponding to each of the data processing participants;
[0063] The secret data determination module 14 is used to process the corresponding data to be calculated through each of the data processing participants to obtain initial secret data, and reconstruct the initial secret data into a floating point number to obtain target secret data.
[0064] It can be seen that in this embodiment, the first data to be processed and the second data to be processed provided by the secret data holder are respectively subjected to bit-level decomposition and the decomposed data are operated, and reconstructed into floating-point numbers according to the operation results to obtain the target secret data. In this way, the calculation accuracy of floating-point number processing can be improved.
[0065] In some specific embodiments, the secret data processing device may further include:
[0066] A random number generation module, used to generate a corresponding first local random number and a second local random number for each of the data processing participants based on a preset three-party random function; the first local random number is used in the secret data processing process of the first data to be processed; the second local random number is used in the secret data processing process of the second data to be processed;
[0067] A data transmission module, used to send the first local random number and the second local random number of any data processing participant to the next data processing participant in the ring data transmission architecture, and simultaneously obtain the first remote random number and the second remote random number generated and provided by the previous data processing participant in the ring data transmission architecture;
[0068] A data processing module, used to determine the first pre-processed data corresponding to each data processing participant based on the difference between the first local random number and the first remote random number of each data processing participant, and to determine the second pre-processed data corresponding to each data processing participant based on the difference between the second local random number and the second remote random number of each data processing participant; wherein the sum of the first pre-processed data is equal to zero; and the sum of the second pre-processed data is equal to zero.
[0069] In some specific embodiments, the data operation module 13 may specifically include:
[0070] A data acquisition unit, configured to acquire, through the secret data holder, first pre-processed data and second pre-processed data respectively provided by three data processing participants;
[0071] A data calculation unit is used to determine the first data to be calculated corresponding to each data processing participant based on the difference between the first preprocessed data and the first processed data, and to determine the second data to be calculated corresponding to each data processing participant based on the difference between the second preprocessed data and the second processed data.
[0072] In some specific embodiments, the floating-point number splitting module 11 can be specifically used to split the first to-be-processed data provided by the first secret data holder into exponent data, sign bit data and mantissa data locally at the first secret data holder to obtain first decomposed data, and to split the second to-be-processed data provided by the second secret data holder into exponent data, sign bit data and mantissa data locally at the second secret data holder to obtain second decomposed data.
[0073] In some specific embodiments, the secret data processing device may further include:
[0074] a data shift module, configured to determine a shift number based on a difference between the exponential data in the first decomposed data and the exponential data in the second decomposed data, and perform an exponential alignment operation on the first decomposed data and the second decomposed data based on the shift number;
[0075] Accordingly, the operation preparation module 12 may specifically include:
[0076] The data combining unit is used to combine the sign bit data and the mantissa data in the first decomposed data to obtain the first processed data, and to combine the sign bit data and the mantissa data in the second decomposed data to obtain the second processed data.
[0077] In some specific embodiments, the secret data processing device may further include:
[0078] An index value determination unit, configured to determine a target index value by summing the index data in the first decomposed data and the index data in the second decomposed data.
[0079] Accordingly, the operation preparation module 12 may specifically include:
[0080] A data determination unit is used to determine the mantissa data in the first decomposed data as the first processed data, and to determine the mantissa data in the second decomposed data as the second processed data.
[0081] In some specific embodiments, the secret data determination module 14 may specifically include:
[0082] an initial secret determination unit, configured to obtain secret sub-data by processing the corresponding data to be calculated by each of the data processing participants, and determine initial secret data based on the sum of the secret sub-data;
[0083] A target secret determination unit is used to adjust the exponent value of the initial secret data based on the target exponent value to obtain target secret data.
[0084] Furthermore, the present application also discloses an electronic device. Figure 3 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0085] Figure 3 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the multi-party data processing method disclosed in any of the above embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0086] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0087] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0088] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, and may be Windows Server, Netware, Unix, Linux, etc. In addition to computer programs that can be used to complete the multi-party data processing method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks.
[0089] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed multi-party data processing method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0090] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0091] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0092] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0093] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0094] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A multi-party data processing method, characterized in that: include: Based on the floating point number composition structure, the first data to be processed provided by the first secret data holder and the second data to be processed provided by the second secret data holder are respectively decomposed at a digit level to obtain first decomposed data and second decomposed data; Based on the target data processing task, the first decomposed data and the second decomposed data are processed for operation preparation to obtain first processed data and second processed data; Using the pre-processed data provided by the three data processing participants respectively, the first processed data and the second processed data are secretly sharded to obtain the data to be calculated corresponding to each of the data processing participants respectively; Each of the data processing participants processes the corresponding data to be calculated to obtain initial secret data, and reconstructs the initial secret data into a floating point number to obtain target secret data.
2. The multi-party data processing method according to claim 1, characterized in that: The data processing participants are connected to each other end to end in sequence to form a ring data transmission architecture; Accordingly, the method further includes: Based on a preset three-party random function, a corresponding first local random number and a second local random number are generated for each of the data processing participants respectively; the first local random number is used in the secret data processing process of the first data to be processed; the second local random number is used in the secret data processing process of the second data to be processed; Sending the first local random number and the second local random number of any data processing participant to the next data processing participant in the ring data transmission architecture, and simultaneously obtaining the first remote random number and the second remote random number generated and provided by the previous data processing participant in the ring data transmission architecture; The first pre-processed data corresponding to each of the data processing participants is determined based on the difference between the first local random number and the first remote random number of each of the data processing participants, and the second pre-processed data corresponding to each of the data processing participants is determined based on the difference between the second local random number and the second remote random number of each of the data processing participants; wherein the sum of the first pre-processed data is equal to zero; and the sum of the second pre-processed data is equal to zero.
3. The multi-party data processing method according to claim 2, characterized in that: The method of performing secret slicing processing on the first processed data and the second processed data using the pre-processed data respectively provided by the three data processing participants to obtain the data to be calculated respectively corresponding to each of the data processing participants includes: Obtaining, through the secret data holder, first pre-processed data and the second pre-processed data respectively provided by three data processing participants; Based on the difference between the first preprocessed data and the first processed data, the first data to be calculated corresponding to each data processing participant is determined, and based on the difference between the second preprocessed data and the second processed data, the second data to be calculated corresponding to each data processing participant is determined.
4. The multi-party data processing method according to claim 3, characterized in that: The method of performing bit-level decomposition on the first data to be processed provided by the first secret data holder and the second data to be processed provided by the second secret data holder based on the floating point number composition structure to obtain first decomposed data and second decomposed data includes: The first data to be processed provided by the first secret data holder is split into exponent data, sign bit data and mantissa data locally at the first secret data holder to obtain first decomposed data, and the second data to be processed provided by the second secret data holder is split into exponent data, sign bit data and mantissa data locally at the second secret data holder to obtain second decomposed data.
5. The multi-party data processing method according to claim 4, characterized in that: When the target data processing task is a data summation task, before performing calculation preparation processing on the first decomposed data and the second decomposed data based on the target data processing task to obtain the first processed data and the second processed data, the method further includes: Determine a shift number based on a difference between exponential data in the first decomposed data and exponential data in the second decomposed data, and perform an exponential alignment operation on the first decomposed data and the second decomposed data based on the shift number; Accordingly, performing computation preparation processing on the first decomposed data and the second decomposed data based on the target data processing task to obtain first processed data and second processed data includes: The sign bit data and the mantissa data in the first decomposed data are combined to obtain first processed data, and the sign bit data and the mantissa data in the second decomposed data are combined to obtain second processed data.
6. The multi-party data processing method according to claim 4, characterized in that: When the target data processing task is a data product task, before performing calculation preparation processing on the first decomposed data and the second decomposed data based on the target data processing task to obtain the first processed data and the second processed data, the method further includes: Determine a target index value by summing the index data in the first decomposed data and the index data in the second decomposed data; Accordingly, performing computation preparation processing on the first decomposed data and the second decomposed data based on the target data processing task to obtain first processed data and second processed data includes: The mantissa data in the first decomposed data is determined as the first processed data, and the mantissa data in the second decomposed data is determined as the second processed data.
7. The multi-party data processing method according to claim 6, characterized in that: The processing of the corresponding data to be calculated by each of the data processing participants to obtain initial secret data, and reconstructing the initial secret data into a floating point number to obtain target secret data includes: Each of the data processing participants processes the corresponding data to be calculated to obtain each secret sub-data, and determines the initial secret data based on the sum of each of the secret sub-data; The exponent value of the initial secret data is adjusted based on the target exponent value to obtain target secret data.
8. A multi-party data processing device, characterized in that: include: A floating point number splitting module, used for performing bit-level decomposition on first data to be processed provided by the first secret data holder and second data to be processed provided by the second secret data holder respectively based on the floating point number composition structure, so as to obtain first decomposed data and second decomposed data; A calculation preparation module, used for performing calculation preparation processing on the first decomposed data and the second decomposed data based on a target data processing task to obtain first processed data and second processed data; A data operation module, used to perform secret slicing processing on the first processed data and the second processed data using the pre-processed data respectively provided by the three data processing participants, so as to obtain the data to be calculated corresponding to each of the data processing participants; The secret data determination module is used to process the corresponding data to be calculated through each of the data processing participants to obtain initial secret data, and reconstruct the initial secret data into a floating point number to obtain target secret data.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the multi-party data processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the multi-party data processing method according to any one of claims 1 to 7.