Data processing method, device, system, equipment, medium and program product

By approximating the nonlinear function with the Fourier series and homomorphic encryption, the power-square operation problem caused by polynomial approximation in secure multi-party calculations is solved, and efficient and fast secure multi-party calculations are achieved.

CN118643541BActive Publication Date: 2024-12-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411118116.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-27
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

In the prior art, when safe multi-party calculations are processed by nonlinear functions, polynomial approximation causes power-side calculations to increase calculation and communication overhead, making it difficult to efficiently and quickly realize secure multi-party calculations.

Method used

Fourier series are used to approximate nonlinear functions, and characterization vectors are obtained through Fourier series expressions for homomorphic encryption, reducing overhead and communication overhead, and simplifying the process through homomorphic calculation.

Benefits of technology

It realizes efficient and fast calculations in secure multi-party computing, reduces calculation and communication overhead, and makes data processing more rapid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643541B_ABST
    Figure CN118643541B_ABST
Patent Text Reader

Abstract

The present application relates to a data processing method, device, system, equipment, medium and program product. The method is executed by the first computing service provider in the secure multi-party computing, and includes: dividing the original computing function into a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, and the value range of the original computing function has a boundary; obtaining the first characterization vector of the first slice of the input data based on the Fourier series expression of the nonlinear function, and then homomorphically encrypting to obtain the first ciphertext, returning it to the second computing service provider, decrypting the blinded ciphertext returned by the second computing service provider based on the first ciphertext and the second slice, and obtaining the result slice of the nonlinear function corresponding to the first slice; obtaining the first result slice according to the result slice of the nonlinear function and the result slice of the linear function corresponding to the first slice, and using it with the second result slice of the second computing service provider to generate the calculation result of the input data, and realizing the secure multi-party computing efficiently and quickly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, system, device, medium and program product. Background Art

[0002] Computing services provided by cloud computing, deep learning models or large models are becoming more and more popular. While enjoying cloud computing services or model reasoning computing services, users do not want their data to be obtained and saved by computing service providers. How to ensure the normal operation of such computing services while ensuring data security is an ongoing topic. Secure Multi-Party Computation (MPC) is a cryptographic technology that allows multiple computing service providers to collaboratively calculate a function while ensuring that each computing service provider can only obtain its own calculation results, and cannot obtain or infer the input and output data of other computing service providers through interactive data during the calculation process, thereby ensuring data security.

[0003] At present, whether it is cloud computing services, deep learning models or large model reasoning computing services, the structure is generally complex, and the functions included are not only of various types (such as a large number of nonlinear activation functions), but also complex to calculate. In related technologies, secure multi-party computing for nonlinear functions usually finds a polynomial approximation of the function in a certain interval, securely calculates the polynomial, and obtains the approximate calculation result of the function in the interval. However, the power square operation brought about by the polynomial approximation will increase the number of multi-party interactions, resulting in large computing overhead and communication overhead. How to efficiently and quickly implement secure multi-party computing is a relatively difficult problem. Summary of the invention

[0004] Based on this, it is necessary to provide a data processing method, device, system, equipment, medium and program product that can efficiently and quickly implement secure multi-party computing in response to the above technical problems.

[0005] The present application provides a data processing method, which is performed by a first computing service provider in a secure multi-party computing, and includes:

[0006] Receive a slice of input data, where the slice is a first slice of two slices obtained by a data provider secretly slicing the input data;

[0007] The original calculation function used to process the input data is segmented according to intervals to obtain a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, and a Fourier series expression of the nonlinear function is obtained, and the value range of the original calculation function has a boundary;

[0008] Obtaining a first characterization vector of the first shard based on the Fourier series expression, sending a first ciphertext obtained by homomorphically encrypting the first characterization vector to a second computing service provider in the secure multi-party computation, obtaining a blinded ciphertext returned by the second computing service provider based on the first ciphertext and the second shard of the two shards, decrypting the blinded ciphertext, and obtaining a result shard of the first shard corresponding to the nonlinear function;

[0009] A first result slice is obtained according to the result slice of the nonlinear function corresponding to the first slice and the result slice of the linear function corresponding to the first slice; the first result slice is used to generate the calculation result corresponding to the input data with the second result slice obtained by the second computing service provider.

[0010] The present application also provides a data processing device, comprising:

[0011] A receiving module, configured to receive a slice of input data, wherein the slice is a first slice of two slices obtained by a data provider performing secret slice operation on the input data;

[0012] A segmentation module, used for segmenting the original calculation function used for processing the input data by intervals, obtaining a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, obtaining a Fourier series expression of the nonlinear function, and the value range of the original calculation function has a boundary;

[0013] A first acquisition module is configured to obtain a first characterization vector of the first shard based on the Fourier series expression, send a first ciphertext obtained by homomorphically encrypting the first characterization vector to a second computing service provider in secure multi-party computing, obtain a blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard of the two shards, decrypt the blinded ciphertext, and obtain a result shard of the first shard corresponding to the nonlinear function;

[0014] The second acquisition module is used to obtain a first result slice according to the result slice of the nonlinear function corresponding to the first slice and the result slice of the linear function corresponding to the first slice; the first result slice is used to generate a calculation result corresponding to the input data with the second result slice obtained by the second computing service provider.

[0015] The present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above data transmission method when executing the computer program.

[0016] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data transmission method are implemented.

[0017] The present application also provides a computer program product, including a computer program, which implements the steps of the above data transmission method when executed by a processor.

[0018] In an embodiment of the present application, after the first computing service provider in the secure multi-party computation receives the first shard of the input data, the first shard will be processed using the original computing function with a bounded value range. First, the original computing function used to process the input data is segmented by interval to obtain a nonlinear function in a symmetric interval and a linear function in an asymmetric interval. For nonlinear functions, in order to avoid the power square operation caused by the use of polynomial approximation to characterize the nonlinear function, the Fourier series is used to approximate the nonlinear function, which can reduce the overhead and communication overhead. Then, based on the Fourier series expression, the first characterization vector of the first shard is obtained, and the first ciphertext obtained by homomorphically encrypting the first characterization vector is sent to the second computing service provider in the secure multi-party computation, and the blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard of the two shards is obtained, and the blinded ciphertext is decrypted to obtain the result shard of the nonlinear function corresponding to the first shard; according to the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard, the first result shard is obtained. Among them, by converting the values ​​of the first shard of the input data in the Fourier series into homomorphic calculations, the calculation process can be simplified. According to the first result shard and the second result shard obtained by the second computing service provider, the data provider can more quickly determine the calculation results corresponding to the input data. In this way, secure multi-party computing can be achieved efficiently and quickly.

[0019] The present application provides a data processing method, which is performed by a data provider in a secure multi-party computation, and includes:

[0020] Secretly sharding the input data to obtain a first shard and a second shard, and sending the first shard and the second shard to a first computing service provider and a second computing service provider in a secure multi-party computation, respectively;

[0021] Among them, after obtaining the first shard, the first computing service provider segments the original computing function used to process the input data according to intervals, obtains a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, obtains a Fourier series expression of the nonlinear function, the value range of the original computing function has a boundary, and obtains a first characterization vector of the first shard based on the Fourier series expression, sends a first ciphertext obtained by homomorphically encrypting the first characterization vector to the second computing service provider in the secure multi-party computation, obtains a blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard, decrypts the blinded ciphertext, obtains a result shard of the nonlinear function corresponding to the first shard, and obtains a first result shard according to the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard;

[0022] Obtain a first result slice returned by the first computing service provider and a second result slice returned by the second computing service provider, and generate a computing result corresponding to the input data according to the first result slice and the second result slice.

[0023] The present application also provides a data processing device, comprising:

[0024] A sharding module, configured to secretly shard the input data to obtain a first shard and a second shard, and send the first shard and the second shard to a first computing service provider and a second computing service provider in a secure multi-party computing, respectively;

[0025] Among them, after obtaining the first shard, the first computing service provider segments the original computing function used to process the input data according to intervals, obtains a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, obtains a Fourier series expression of the nonlinear function, the value range of the original computing function has a boundary, and obtains a first characterization vector of the first shard based on the Fourier series expression, sends a first ciphertext obtained by homomorphically encrypting the first characterization vector to the second computing service provider in the secure multi-party computation, obtains a blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard, decrypts the blinded ciphertext, obtains a result shard of the nonlinear function corresponding to the first shard, and obtains a first result shard according to the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard;

[0026] A generation module is used to obtain a first result slice returned by the first computing service provider and a second result slice returned by the second computing service provider, and generate a computing result corresponding to the input data according to the first result slice and the second result slice.

[0027] The present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above data transmission method when executing the computer program.

[0028] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data transmission method are implemented.

[0029] The present application also provides a computer program product, including a computer program, which implements the steps of the above data transmission method when executed by a processor.

[0030] The present application also provides a data processing system, the system comprising a data provider, a first computing service provider and a second computing service provider in a secure multi-party computing:

[0031] A data provider, configured to secretly slice input data to obtain a first slice and a second slice, and send the first slice and the second slice to a first computing service provider and a second computing service provider in a secure multi-party computing, respectively;

[0032] The first computing service provider is used to receive the first slice sent by the data provider, and segment the original computing function used to process the input data by intervals to obtain a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, and obtain a Fourier series expression of the nonlinear function, wherein the value range of the original computing function has a boundary;

[0033] The first computing service provider is further configured to obtain a first characterization vector of the first shard based on the Fourier series expression, and send a first ciphertext obtained by homomorphically encrypting the first characterization vector to a second computing service provider in the secure multi-party computation;

[0034] The second computing service provider is used to receive the second shard sent by the data provider, obtain the first ciphertext sent by the first computing service provider, determine the blinded ciphertext according to the first ciphertext and the second shard, and return it to the first computing service provider;

[0035] The first computing service provider further obtains the blinded ciphertext returned by the second computing service provider, decrypts the blinded ciphertext, and obtains a result shard of the first shard corresponding to the nonlinear function;

[0036] The first computing service provider is further configured to obtain a first result slice according to the result slice of the nonlinear function corresponding to the first slice and the result slice of the linear function corresponding to the first slice, and send the first result slice to the data provider;

[0037] The second computing service provider is configured to obtain a second result slice according to the second slice, and send the second result slice to the data provider;

[0038] The data provider is further used to obtain the first result slice and the second result slice, and generate a calculation result corresponding to the input data according to the first result slice and the second result slice.

[0039] In an embodiment of the present application, after the data provider in the secure multi-party computation secretly slices the input data to obtain the first slice and the second slice, the first slice and the second slice are sent to the first computing service provider and the second computing service provider in the secure multi-party computation respectively. After the first computing service provider receives the first slice of the input data, it will use the original computing function with a bounded value range to process the first slice. First, the original computing function used to process the input data is segmented by interval to obtain a nonlinear function in a symmetric interval and a linear function in an asymmetric interval. For nonlinear functions, in order to avoid the power square operation caused by using polynomial approximation to characterize nonlinear functions, Fourier series is used to approximate nonlinear functions, which can reduce overhead and communication overhead. Next, based on the Fourier series expression, the first characterization vector of the first shard is obtained, and the first ciphertext obtained by homomorphically encrypting the first characterization vector is sent to the second computing service provider in the secure multi-party computation, and the blinded ciphertext returned by the second computing service provider based on the first ciphertext and the second shard of the two shards is obtained, and the blinded ciphertext is decrypted to obtain the result shard of the nonlinear function corresponding to the first shard; the first result shard is obtained based on the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard. Among them, by converting the value of the first shard of the input data in the Fourier series into homomorphic calculation, the calculation process can be simplified, and according to the first result shard and the second result shard obtained by the second computing service provider, the data provider can more quickly determine the calculation result corresponding to the input data, so that the secure multi-party computation is realized efficiently and quickly. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 is a schematic diagram of a floating point number encoding process in one embodiment;

[0042] Figure 2 A schematic diagram of a two-party truncation process in one embodiment;

[0043] Figure 3 A schematic diagram of the interaction between the data owner and the data provider in the relevant technology;

[0044] Figure 4 is a schematic diagram of secure computing in one embodiment;

[0045] Figure 5 An application environment diagram of a data processing method in an embodiment;

[0046] Figure 6 is a flow chart of a data processing method in one embodiment;

[0047] Figure 7 A schematic diagram of a flow chart of a first result slice determination step in an embodiment;

[0048] Figure 8 A schematic flow chart of a step of determining a first result slice in another embodiment;

[0049] Fig. 9 A schematic diagram of a flow chart of a second result slice determination step in one embodiment;

[0050] Fig.10 is a flow chart of a data processing method in another embodiment;

[0051] Fig.11 is a schematic diagram of a data processing system in one embodiment;

[0052] Fig.12 is a schematic diagram of a data processing process in one embodiment;

[0053] Fig.13 is a structural block diagram of a data processing device in one embodiment;

[0054] Fig.14 is a structural block diagram of a data processing device in another embodiment;

[0055] Fig.15 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] Before introducing this application, the terms involved are explained:

[0058] Floating point number encoding Encode: In the fixed loop On the top, enter a floating point number and stretch factor ,calculate , that is, multiply △ and x, and then round off. Here, the absolute value of t must not exceed ,when When ; Otherwise output ; The encoding process is recorded as: .

[0059] Among them, Figure 1 FIG. 1 is a schematic diagram of a floating point number encoding process in an embodiment. For a floating point number x, including an integer part and a decimal part, 64 bits are obtained after floating point number encoding, wherein the 64 bits include a stretch factor △, and the stretch factor in this example is a constant f.

[0060] Floating point number decoding Decode: input and stretch factor ,if and , then the output ; Otherwise output , the decoding process is recorded as: .

[0061] Data two-party secret sharding: floating point number After encoding, we get The A side gets , Party B gets , here it is required .but It is called the two-party shard of x, and Represents the secret shard of x Secret shards generally have linear properties (also called linear properties). For example, the superposition of a shard of a floating point number x and a shard of another floating point number y gives a shard of data z, that is, ; For another example, the product of the slice of the floating point number x and the constant γ is equivalent to the slice of the product of the data x and the constant, that is, . mod is the modulo operation.

[0062] Two-way safe comparison: given a constant and the secret shard of input x , that is, Party A inputs , Party B input , output fragment , that is, Party A gets , Party B gets , so that ,in, is an XOR operation, for example, , then it means is true, otherwise, , then it means is false.

[0063] Two-party secure mux: secret sharding of a given input float b , the slice of input x And the slices of y , where Party A has and enters , Party B owns and enters , output slices with respect to another floating point number z , so that Party A can get , Party B can obtain , and can make For example, if ,but , that is, select the shard of x to determine the shard of z, if ,but , that is, select the slice of y to determine the slice of z. In other words, according to the XOR result of the two slices of b, select a floating point number slice from the slice of x and the slice of y to determine the slice of z, which is recorded as , at this time, the last two items in mux (.) can be: and , respectively, as two paths, based on the first item in mux (.): , choose one of the two paths to determine the sharding of z.

[0064] Two-way Truncate operation: given an input x, slice it and constant f, that is, the input of party A , Party B input , output fragment , that is, Party A gets , Party B gets , so that , that is, the decoded After converting to binary, truncating Bit (i.e. left shift bits), and then encode the truncated result by the stretch factor to obtain . Thus, the low f of x is cut off (i.e. ) bits. A two-way truncate operation generally requires a two-way security comparison as a submodule.

[0065] Two-party secure multiplication: Assume that party A has x and party B has y. After secure calculation, party A gets , Party B gets , so that .

[0066] Among them, generally, a multiplication triple is needed to implement two-party secure multiplication, that is, Party A has a random number and , Party B has a random number and ,satisfy Under the premise of having a multiplication triplet, the calculation process of shard multiplication is as follows: Party A calculates and sent to Party B; Party B calculates , and Party B sends it to Party A, then Party A calculates , Party B calculates If x and y are input in the form of secret shards, record them as , which requires the use of two multiplication triplets. Note that and is the floating point number encoded secret fragment, such as Figure 2 FIG. 1 is a schematic diagram of a two-way truncation process in an embodiment. After the floating point number x and the floating point number y are multiplied by safe multiplication, the stretching factor in the obtained result is for , that is, before and after multiplication, the stretch factor becomes At this time, you need to use safe Truncate become , here it is required , the truncation length of Truncate is f, and the stretch factor in the result after truncation is for .

[0067] Fully homomorphic encryption: The encryption algorithm has the homomorphic property, that is, two ciphertexts and After homomorphic addition, we get , that is, plain text The corresponding ciphertext; after homomorphic multiplication, we get , that is, plain text The fully homomorphic encryption algorithm based on the RLWE (Ring Learning with Errors) assumption is defined in the polynomial residue class ring On, among them, Indicates that the coefficient X is In the polynomial set in , at this time, the plaintext is a polynomial with algebraic degree less than N, where N is a power of 2. Taking BGV (a homomorphic encryption algorithm) as an example, the ciphertext is: , the private key is ,satisfy ,here is the plaintext modulus, is a plaintext polynomial, each coefficient does not exceed p, e is an error polynomial, which can also be understood as noise, and each component has a standard deviation of Discrete Gaussian distribution of .when and When is a prime number, the plaintext polynomial m corresponds to N The elements on , and the plaintext polynomials are added (multiplied) corresponding to Add (multiply) the components of .

[0068] In the related art, the party that owns the data hopes to obtain the calculation result or reasoning result about the data by means of the computing service or reasoning service provided by the computing service provider. At this time, the party that owns the data, as the data provider, sends the data to the computing service provider. Figure 3 The figure shows the interaction diagram between the data owner and the data provider in the related technology. Then, the computing service provider performs outsourced computing or AI (Artificial Intelligence) reasoning (such as deep learning or large language model). Specifically, it uses the functions involved in outsourced computing or AI reasoning to calculate the acquired data, obtain the calculation results, and return the calculation results to the data provider. The computing service provider does not know the input, output, and intermediate results throughout the process.

[0069] For example, Figure 4 As shown, it is a schematic diagram of secure computing in an embodiment, the data provider secretly shares the sensitive data data1 to datak with the computing service provider, and the computing service provider performs secure linear computing, secure nonlinear computing, ..., secure linear computing, secure nonlinear computing based on the acquired sensitive data data1 to datak, respectively, and obtains k calculation results, and sends the k calculation results to the data provider. For example, the secure nonlinear computing is a common complex function such as a sigmoid function, an arctan function, and a gelu function.

[0070] That is, the executed function can be the calculation of a linear function (safe linear calculation) or the calculation of a nonlinear function (safe nonlinear calculation).

[0071] The calculation of the linear function can be directly calculated using the linear properties of the secret shards. For example, see the explanation of the linear properties in the secret shards of the two parties in the previous data.

[0072] The calculation of nonlinear functions can be divided into polynomial calculation and non-polynomial calculation. For polynomial calculation, the shard multiplication calculation in the secret sharding technology can be used to realize the secure power operation of the input, and then realize the secure polynomial calculation. A polynomial with algebraic degree of n generally requires n-2 shard multiplications, that is, it requires about 2(n-2) multiplication triplets, and the number of interaction rounds is about It is worth mentioning that the larger the power exponent, the larger the result of the power, and there is a risk of exceeding the lth power of the modulus 2, which will lead to incorrect calculation results. Among them, the range and algebraic number of input x should not be too large.

[0073] For non-polynomial calculations, one method is to find a polynomial approximation of the function in a certain interval, safely calculate the polynomial, and obtain the approximate calculation result of the function in the interval. Another method is to convert it into a Boolean circuit and then use a garbled circuit to perform the calculation. The accuracy of the polynomial approximation method is generally not as good as the method of Boolean circuit characterization. However, the Boolean circuit characterization leads to an excessive amount of calculation or communication, making it very practical. In order to ensure higher accuracy, the approximation polynomial generally has a higher algebraic degree, which means that the interval selected for function approximation cannot be too large.

[0074] Take the nonlinear function sigmoid as an example. When polynomial approximation is used, when the approximation interval is large, the algebraic degree of the selected polynomial is generally high. Although the accuracy is relatively high, it is easy to cause out-of-bounds problems (exceeding the modulus ); When the approximation interval is small, the algebraic degree of the selected polynomial is generally small, but the approximation effect of other intervals may not be good (for example, The value of is chosen as ,So With the sigmoid function The error between the values ​​of is too high). If the out-of-bounds problem can be solved (for example, if the algebraic degree is k, then the requirement is , and after each secure multiplication, a secure truncate operation needs to be called). The higher the algebraic degree of the polynomial, the more interaction rounds there are. When using secret shards to calculate secure power operations, the number of interaction rounds required increases (related to the logarithm of the algebraic degree), and the amount of communication increases (related to the algebraic degree). Specifically, the number of generated multiplication triplets and the number of secure comparisons required for secure truncate increase linearly with the increase in the algebraic degree. Therefore, the computational or communication overhead will increase.

[0075] In summary, in the relevant technologies, it is a relatively difficult problem to ensure high-precision availability and high-efficiency and fast implementation of secure computing based on secret sharing.

[0076] In view of this, an embodiment of the present application provides a data processing method. After the first computing service provider in the secure multi-party computing receives the first shard of the input data, the first shard will be processed using the original computing function with a bounded value range. First, the original computing function used to process the input data is segmented by interval to obtain a nonlinear function in a symmetric interval and a linear function in an asymmetric interval. For nonlinear functions, in order to avoid the power square operation caused by the use of polynomial approximation to characterize the nonlinear function, the Fourier series is used to approximate the nonlinear function, which can reduce the overhead and communication overhead. Then, based on the Fourier series expression, the first characterization vector of the first shard is obtained, and the first ciphertext obtained by homomorphically encrypting the first characterization vector is sent to the second computing service provider in the secure multi-party computing, and the blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard of the two shards is obtained, and the blinded ciphertext is decrypted to obtain the result shard of the nonlinear function corresponding to the first shard; according to the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard, the first result shard is obtained. Among them, by converting the values ​​of the first shard of the input data in the Fourier series into homomorphic calculations, the calculation process can be simplified. According to the first result shard and the second result shard obtained by the second computing service provider, the data provider can more quickly determine the calculation results corresponding to the input data. In this way, secure multi-party computing can be achieved efficiently and quickly.

[0077] The data processing method provided in the embodiment of the present application can be applied to Figure 5In the application environment shown. Among them, the data provider 502 communicates with the first computing service provider 504 through the network, and the data provider 502 communicates with the second computing service provider 506 through the network. Of course, the first computing service provider 504 and the second computing service provider 506 can also communicate through the network. The data provider 502 can be a terminal or a server for providing data. The first computing service provider 504 and the second computing service provider 506 are two different computing service providers, and both can provide computing services, for example, the computing service is a cloud computing service or an inference service. The first computing service provider 504 and the second computing service provider 506 can be regarded as servers.

[0078] In one embodiment, the data provider 502, the first computing service provider 504, and the second computing service provider 506 in the secure multi-party computing are used as an example for description. The data provider 502 secretly slices the input data to obtain the first slice and the second slice, and sends the first slice and the second slice to the first computing service provider 504 and the second computing service provider 506 respectively.

[0079] The first computing service provider 504 segments the original computing function used to process the input data by interval, obtains a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, obtains a Fourier series expression of the nonlinear function, and the value range of the original computing function has a boundary. The first computing service provider 504 obtains a first representation vector of the first shard based on the Fourier series expression, and sends the first ciphertext obtained by homomorphically encrypting the first representation vector to the second computing service provider 506 in the secure multi-party computation.

[0080] The second computing service provider 506 determines the blinded ciphertext according to the first ciphertext and the second slice, and returns it to the first computing service provider 504. The second computing service provider 506 also obtains a second result slice according to the second slice, and sends the second result slice to the data provider 502.

[0081] The first computing service provider 504 decrypts the blinded ciphertext to obtain a result shard of the nonlinear function corresponding to the first shard; obtains a first result shard based on the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard, and sends the first result shard to the data provider 502.

[0082] The data provider 502 generates a calculation result corresponding to the input data according to the first result slice and the second result slice.

[0083] In other embodiments, the data provider 502 may also be regarded as a computing service provider, that is, it involves two-way interaction, which can be referred to as Figure 4In this embodiment, Figure 4 The computing service provider in is the first computing service provider 504. At this time, after obtaining the first shard and the second shard, the data provider 502 sends the first shard to the first computing service provider 504. After obtaining the first shard, the first computing service provider 504 obtains the first ciphertext with reference to the foregoing text and sends the first ciphertext to the data provider 502.

[0084] The data provider 502 determines the blinded ciphertext based on the first ciphertext and the existing second shard, and sends it to the first computing service provider 504. The first computing service provider 504 determines the first result shard based on the acquired blinded ciphertext and refers to the previous text, and returns it to the data provider 502.

[0085] The data provider 502 obtains a second result slice according to the existing second slice, and generates a calculation result corresponding to the input data according to the second result slice and the obtained first result slice.

[0086] In other embodiments, to improve the computing efficiency of computing service providers, any two computing service providers are grouped as a computing service provider, for example, the first computing service provider 504 and the second computing service provider 506 are grouped as a computing service provider. Each group of computing service providers can process outsourced computing of multiple data providers in batches.

[0087] refer to Figure 5 , the data provider 502 sends the first shard and the second shard of the input data data1 to the first computing service provider 504 and the second computing service provider 506 respectively; at the same time, the data provider 508 sends the first shard and the second shard of the input data data2 to the first computing service provider 504 and the second computing service provider 506 respectively.

[0088] After determining the first characterization vector of each first shard, the first computing service provider 504 may simultaneously perform homomorphic encryption on the two first characterization vectors to obtain a ciphertext matrix, which includes the first ciphertexts corresponding to each first shard. At this time, the ciphertext matrix is ​​sent to the second computing service provider 506. The second computing service provider 506 obtains each first ciphertext from the ciphertext matrix, and determines the corresponding blinded ciphertext using the respective corresponding second ciphertexts, and sends the two blinded ciphertexts to the first computing service provider 504. The first computing service provider 504 processes each blinded ciphertext respectively to obtain the first result shard corresponding to each first shard. The second computing service provider 506 determines the corresponding second result shard based on each second shard.

[0089] In this way, batch processing of data processing requirements of multiple data providers is achieved, and data processing efficiency is improved. Wherein, the data provider 508 is also regarded as a server, and communicates with the first computing service provider 504 and the second computing service provider 506 respectively.

[0090] The terminals may be, but are not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, and projection devices. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, and the like. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, and the like. The server may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0091] In an exemplary embodiment, Figure 6 As shown, a data processing method is provided, which is applied to Figure 5 Taking the first computing service provider 504 in the example as an example, the method includes the following steps S602 to S608. Among them:

[0092] Step S602: receiving a slice of input data, where the slice is the first slice of two slices obtained by the data provider performing secret slice operation on the input data.

[0093] The input data is the data to be calculated. The calculation here can be a cloud computing or model reasoning process. The input data can be a floating point number or a non-floating point number, and there is no specific limitation.

[0094] The input data may be business data belonging to a specific business scenario.

[0095] For example, in a financial scenario, a financial institution hopes to conduct credit assessment for a customer without disclosing the customer's privacy. The server where the financial institution is located can be regarded as the data provider, and the financial data of any customer of the financial institution (such as sensitive data such as expenditure) can be used as input data.

[0096] For example, in a medical scenario, the server of the medical institution acts as a data provider and uses an artificial intelligence model to assist in the diagnosis of the target object. The medical data of the target object (such as medical records and object information) is used as the input data for the medical scenario.

[0097] For example, in content push scenarios, such as video push and audio push, the content platform, as the data provider, pushes content to the target object based on the artificial intelligence model, and uses the target object's interaction data (such as content attention data and content purchase data) as the input data for the content push scenario.

[0098] The input data is split into multiple pieces of data, each piece of data is regarded as a shard, for example, the input data is split into the first shard and the second shard. The first shard and the second shard are both part of the input data.

[0099] Exemplarily, in a multi-party secure computation, according to the input data, a first shard and a second shard are generated by secret sharing, wherein the secret sharing includes arithmetic secret sharing, and the arithmetic secret sharing is used to generate arithmetic shards. For example, the input data is a fixed loop. A number on the input data is split into two arithmetic slices, namely the first slice and the second shard The first shard and the second shard It is also the number on the fixed ring.

[0100] The first shard and the second shard are respectively owned by different computing service providers. For example, the first computing service provider owns the first shard, and the second computing service provider owns the second shard.

[0101] Step S604, segment the original calculation function used to process the input data by intervals, obtain nonlinear functions in symmetric intervals and linear functions in asymmetric intervals, obtain the Fourier series expression of the nonlinear function, and the value range of the original calculation function has a boundary.

[0102] The original calculation function refers to a complex function, for example, the original calculation function may be a common complex function such as a sigmoid function, an arctan function, or a gelu function.

[0103] The interval of the original computation function contains symmetric intervals, for example, it can be , or , or , or .

[0104] It can be understood that the original calculation function contains a nonlinear function in a symmetric interval, in which the relationship between the dependent variable and the independent variable is not a linear relationship, but a very complex nonlinear relationship.

[0105] For example, the original calculation function is gelu function, and the interval is , divided into sections according to the interval The nonlinear functions in A linear function in .

[0106] In other embodiments, the original calculation function can also be segmented by interval to obtain a nonlinear function in a symmetric interval and a constant function in an asymmetric interval. The original calculation function is a sigmoid function as an example, and its interval is , where, by segmentation, we get The nonlinear function in The constant function 1 and The constant function 2, The internal value is always a constant value of 1. The internal value is always a constant value of 2.

[0107] The value range of the original calculation function has a limit, such as not exceeding the modulus .

[0108] As mentioned above, when a polynomial is used to represent (approximate) a nonlinear function, the high algebraic degree of the polynomial will result in high computational overhead. In this case, the Fourier series expression is used to represent the nonlinear function. The Fourier series expression is shown in formula (1):

[0109] (1)

[0110] in, is the coefficient of the Fourier series of the ith term, , L is a constant. It should be noted that L is the same as the are different constants, and x is the independent variable.

[0111] Step S606, obtaining a first characterization vector of the first shard based on the Fourier series expression, sending a first ciphertext obtained by homomorphically encrypting the first characterization vector to the second computing service provider in the secure multi-party computing, obtaining a blinded ciphertext returned by the second computing service provider based on the first ciphertext and the second shard of the two shards, decrypting the blinded ciphertext, and obtaining a result shard of the nonlinear function corresponding to the first shard.

[0112] Before explaining the first characterization vector of the first slice, we first introduce the first slice, the second slice, and the sine term of the input data. The associated relationship.

[0113] As mentioned above, for an input data x, secret sharing is performed to obtain the first shard and the second shard , assuming: ,So, , The sine term can be derived as the following formula (2): (2)

[0114] Therefore, the sine term Can be considered as a vector factor With vector factors The inner product of .

[0115] Since the Fourier series expression It can be regarded as the superposition of multiple expansion terms, and each expansion term can be regarded as a sine term. For example, the expansion term of the i-th term is Therefore, the Fourier series expression can be converted into the inner product of the first original vector originating from the first computing service provider and the second original vector originating from the second computing service provider.

[0116] The first original vector includes n first vector factors, each of which includes two corresponding components corresponding to the first original vector. For example, the first original vector is , where the first first vector factor is , the second first vector factor is ,…, the nth first vector factor is . is the independent variable of the first original vector (which can be regarded as the independent variable of each first vector factor), It may be a shard of some input data owned by the first computing service provider, that is, the first shard.

[0117] The second original vector includes n second vector factors, each of which includes two components corresponding to the second original vector. For example, the second original vector is , where the first second vector factor is ,…, the nth second vector factor is . is the independent variable of the second original vector (which can be regarded as the independent variable of each second vector factor), It may be another shard of some input data owned by the second computing service provider, that is, the second shard.

[0118] In some embodiments, the Fourier series expression is a superposition of multiple expansion terms, each expansion term is the inner product of the first vector factor and the second vector factor. Obtaining a first characterization vector of the first slice based on the Fourier series expression includes: inputting the first slice into the first vector factor in each expansion term to obtain the first characterization vector of the first slice.

[0119] As mentioned above, each expanded term can be regarded as the product of the first vector factor and the second vector factor of the same sequence number. For example, the product of the first first vector factor and the first second vector factor is the first expanded term. For another example, the product of the i-th first vector factor and the i-th second vector factor is the i-th expanded term.

[0120] The first computing service provider sends the first shard As the independent variable of the first original vector, they are substituted into the first vector factor in the first original vector to obtain the first representation vector, that is, .

[0121] In other examples, the second computing service provider sends the second shard As the independent variable of the second original vector, they are substituted into the second vector factors in the second original vector to obtain the second representation vector, that is, .

[0122] In this embodiment, in the process of approximating a nonlinear function using a Fourier series expression, each expanded term is regarded as the inner product of a first vector factor and a second vector factor. In this way, the first computing service provider can determine the first characterization vector based on the acquired first slice. As a result, the nonlinear function can be subsequently converted into the product of the first characterization vector and the second characterization vector without the need for power operations, thereby reducing computational overhead.

[0123] The first ciphertext is the ciphertext obtained by the first computing service provider through homomorphic encryption based on the first shard.

[0124] In some embodiments, the step of homomorphically encrypting the first representation vector to obtain the first ciphertext includes: performing floating point encoding on each component in the first representation vector to obtain the first encoded vector; and performing homomorphic encryption on each component in the first encoded vector to obtain the first ciphertext.

[0125] For the sake of convenience, the first component of the first characterization vector is Considered as , the second component Considered as , ..., the 2nth component Considered as , get the first characterization vector , the range of the first characterization vector belongs to .

[0126] Exemplarily, the first computing service provider calculates the first characterization vector Each component in is encoded by floating point numbers to obtain the first encoding vector, that is, , each component in the first encoding vector belongs to (the set of integers modulo p), it can be understood that at this time, the first encoding vector belongs to The first computing service provider obtains noise (random polynomial), and performs homomorphic encryption using the public key based on the noise and the first encoding vector to obtain a first ciphertext. The first ciphertext includes m ciphertexts (i.e., , …, ).

[0127] In this embodiment, the first computing service provider performs floating-point encoding on each component in the first representation vector and then performs homomorphic encryption to obtain a first ciphertext. In this way, the first ciphertext can be directly subjected to corresponding homomorphic operations based on the homomorphic properties of homomorphic encryption, without the need for decryption, thereby improving the convenience of data processing.

[0128] The blinded ciphertext refers to the ciphertext obtained by blinding processing. The result shard of the nonlinear function corresponding to the first shard refers to the result obtained after the first computing service provider calculates the nonlinear function using the first shard.

[0129] In some embodiments, the step of the second computing service provider calculating a blinded ciphertext based on the first ciphertext and the second shard of the two shards includes: obtaining a second characterization vector of the second shard based on a Fourier series expression, performing floating point encoding on each component in the second characterization vector to obtain a second encoding vector; performing homomorphic multiplication processing on the first ciphertext and the second encoding vector to obtain a second ciphertext; and blinding the second ciphertext based on a random number to obtain a blinded ciphertext.

[0130] After the second computing service provider determines the second characterization vector, for ease of explanation, the first component of the second characterization vector is Considered as , ..., the 2nth component Considered as , and obtain the second characterization vector , the second characterization vector value belongs to .

[0131] The second computing service provider calculates the second characterization vector Each component in is encoded with floating point numbers to obtain the second encoding vector, that is, After the second computing service provider obtains the first ciphertext sent by the first computing service provider, the second computing service provider homomorphically multiplies each vector in the second encoding vector (which can be regarded as plaintext) with the ciphertext in the first ciphertext to obtain m ciphertexts, which are , …, , and then perform homomorphic summation on these m ciphertexts, which is equivalent to The corresponding ciphertext, i.e. the second ciphertext . Where p is the plaintext modulus.

[0132] The second computing service provider randomly obtains a random number as the first random number r for blinding, and uses the first random number to blind the second ciphertext to obtain a blinded ciphertext For example, the second ciphertext is homomorphically subtracted from the first random number r to obtain the blinded ciphertext The blinded ciphertext Used to send to the first computing service provider.

[0133] It should be noted that based on the homomorphic properties of the homomorphic encryption algorithm, the blinded ciphertext The corresponding plaintext is .

[0134] In this embodiment, the second computing service provider performs homomorphic multiplication on the first ciphertext and the second coding vector to obtain the second ciphertext. Based on the homomorphic property of homomorphic encryption, it can be known that the second ciphertext is actually the ciphertext related to the product of the first coding vector and the second coding vector. Then, the second ciphertext is blinded based on random numbers to strengthen the privacy protection of the second ciphertext and ensure data security.

[0135] In some embodiments, the first random number r may blind only the plaintext portion of the second ciphertext. In this case, a second random value is randomly selected. ,Will Directly used as the first random number.

[0136] Of course, the plaintext part and the noise part in the second ciphertext can also be blinded at the same time. In some embodiments, the random number determination step includes: obtaining an upper limit value of the variance of the error corresponding to the second ciphertext; according to the upper limit value of the variance, determining a first random value that obeys a uniform distribution, and the first random value is used to blind the noise part in the second ciphertext; obtaining a second random value, and the second random value is used to blind the plaintext part in the second ciphertext; fusing the first random value and the second random value to obtain a random number.

[0137] It should be noted that the random number determined in this embodiment is the first random number r used for blinding.

[0138] Considering that BFV (a fully homomorphic encryption algorithm that focuses on homomorphic encryption on integers, allowing encrypted data to be calculated without decrypting the data, and the calculation result is still encrypted) or BGV (another fully homomorphic encryption algorithm that mainly manages noise through modulus switching) both use noisy encryption algorithms, that is, the first computing service provider will add noise during homomorphic encryption to ensure the randomness of the encryption result. When the first computing service provider decrypts, the noise needs to be eliminated. Taking the BGV algorithm as an example, suppose the blinded ciphertext to be decrypted is , the private key is ,satisfy .

[0139] After decrypting the plaintext m, the first computing service provider can obtain the noise ,in, , since the first computing service provider knows the noise e added during encryption, where Therefore, according to the determined With e, the first computing service provider can obtain part of the information of the plaintext polynomial encoded by the second computing service provider, which leads to the risk of data leakage of the second computing service provider.

[0140] In order to avoid data leakage, in the blinding process, not only the plaintext but also the noise needs to be blinded. Specifically, the second random value is randomly obtained , used to blind the plaintext, where .

[0141] Next, determine the first random value for blinding the noise , as follows:

[0142] When blinding noise, a first random value can be superimposed on the noise (Wherein, the first random value The maximum value of , is the standard deviation of the noise e before encryption, is a public parameter, not the endpoint of the previous interval), so that the superimposed noise has randomness, and the statistical distance between the superimposed noise and the noise is less than .

[0143] After the second computing service provider homomorphically multiplies each vector in the second encoding vector (which can be regarded as plaintext) with the ciphertext in the first ciphertext, the upper bound (maximum value) of the variance of the ciphertext corresponding error is , after homomorphic addition, the upper bound of the variance of the error corresponding to the ciphertext is , that is, the upper limit of the standard deviation is .

[0144] Therefore, the first random value The value range is , at this time, determine the first random value from the value range , then press , determine the first random number r. In this way, the distribution of noise can be concealed based on the first random number r, thereby avoiding the risk of data leakage of the second computing service provider. At this time, it is required .

[0145] For example, in practice, we usually choose , When N is 4096 and n is 8, p is selected as a prime number not exceeding 30 bits, and q is at least a 109-bit modulus. The corresponding BGV parameters are N = 4096, q is the product of 60-bit and 49-bit prime numbers, which meets 128-bit security. If the Fourier series expression is The absolute value of is not large (for example, not more than 1), and the output range of the expression is between [-1, 1], then select , the secure calculation of the Fourier series expression can be realized (the values ​​of sin and cos are both between [-1, 1], and the plaintext corresponding to the ciphertext after homomorphic calculation ,here ).

[0146] In this embodiment, the first random value is selected by the upper limit value of the variance of the error corresponding to the second ciphertext to ensure that the noise distribution can be concealed and the decrypted noise is random. Thus, the information leakage of the second computing service provider based on the specific distribution of the decrypted noise can be avoided, thereby ensuring the security of the data processing process.

[0147] The result slice of the nonlinear function corresponding to the first slice refers to the slice of the result of the input data in the nonlinear function. For example, the nonlinear function is , substitute the input data x into the nonlinear function and get the result ; First fragment The corresponding nonlinear function result slice , for A fragment of .

[0148] In some embodiments, the first computing service provider obtains the blinded ciphertext Finally, the blinded ciphertext is decrypted according to the private key to obtain the decryption result s.

[0149] Since the second computing service provider has the first random number r, at this time, the sum of s and r is the inner product of the first encoding vector and the second encoding vector under the text modulus p, that is, .

[0150] exist and When both are positive, there exists Among them, the stretch factor △ is .

[0151] The following describes the process of converting the inner product of the first encoding vector and the second encoding vector into the inner product of the first representation vector and the second representation vector:

[0152] The first computing service provider calculates the plaintext modulus p and The product of the decryption result s and the ratio is calculated and rounded to obtain the first conversion fragment. ,Right now, The second computing service provider calculates the product of the first random number r and the ratio and rounds it off to obtain the second conversion fragment. ,Right now, .

[0153] at this time, , .

[0154] Since floating point numbers and The stretch factors required for encoding are , where the value of t is known, and f in this embodiment can be a decimal. , and ignoring the decimal f, ensure that Then, the first computing service provider and the second computing service provider respectively provide , call the truncation operator, perform truncation calculations on both slices, and obtain the corresponding first target conversion slice and the second target conversion shard Among them, the truncation operator is an operator that can realize the two-party truncation operation, which can be understood as a code program that realizes the truncation operation.

[0155] At this point, satisfaction , completing the conversion of the inner product of the first coding vector and the second coding vector into the inner product of the first characterization vector and the second characterization vector. It should be noted that the sharding is generally in the form of a power of 2, and the plaintext modulus p is usually a prime number, generally not in the form of a power of 2. Therefore, the above process can also realize the conversion of the plaintext modulus p into the form of a power of 2.

[0156] Finally, the first computing service provider uses the first target conversion slice as the result slice of the nonlinear function corresponding to the first slice The second computing service provider uses the second target conversion slice as the result slice of the nonlinear function corresponding to the second slice .

[0157] It should be noted that compared with the use of multiplication triples to securely calculate inner products in related technologies, this application combines Fourier series approximation and vector inner product calculation to reduce the amount of calculation and communication. This is because when related technologies use fully homomorphic encryption algorithms such as BGV to generate multiplication triples, if p is a 30-bit prime number, then at least ciphertext, where l represents the modulus The index part of .

[0158] Step S608, obtaining a first result slice according to the result slice of the nonlinear function corresponding to the first slice and the result slice of the linear function corresponding to the first slice; the first result slice is used to generate a calculation result corresponding to the input data with the second result slice obtained by the second computing service provider.

[0159] The first slice corresponds to the result slice of the linear function, which refers to the slice of the result of the input data in the linear function. For example, substitute the input data x into the linear function In the result , the first slice Substituting into the linear function In, get , For the result A fragment of .

[0160] The first result shard is a shard of the calculation result corresponding to the input data, and the second result shard is another shard of the calculation result corresponding to the input data.

[0161] It should be noted that when the data provider is unaware of the range of the input data (for example, the data provider calls the model for calculation based on demand, and an input data is calculated in the middle layer of the model. The input data is directly divided into the first shard and the second shard according to the preset sharding rule, and is directly sent to the first computing service provider and the second computing service provider. During the whole process, the data provider does not know the specific value of the input data, nor the range of the input data), the first computing service provider needs to combine the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard, to determine a result for the first shard in the original calculation function.

[0162] Similarly, the second computing service provider needs to combine the result slice of the nonlinear function corresponding to the second slice with the result slice of the linear function corresponding to the second slice to determine another result of the second slice in the original computing function, thereby fusing these two results to obtain the calculation result of the input data in the original computing function.

[0163] In some embodiments, Figure 7 FIG. 1 is a flow chart of a first result slice determination step in an embodiment. According to the result slice of the nonlinear function corresponding to the first slice and the result slice of the linear function corresponding to the first slice, the first result slice is obtained, including:

[0164] Step S702: Based on the first shard and the lower bound value in the symmetric interval, call the security comparison operator, perform a security size comparison on the input data and the lower bound value, and obtain a comparison shard corresponding to the first security size comparison of the first shard.

[0165] Among them, the safe comparison operator refers to an operator used to determine the sharding of the safe size comparison result. The operator can be understood as a code program for implementing the safe size comparison. The safe size comparison refers to a safe size comparison of two data.

[0166] The first slice corresponds to the comparison slice of the first safety size comparison, and can be regarded as a slice of the first safety size comparison result. The first safety size comparison result is the result of the safety size comparison between the input data and the lower limit value of the symmetric interval. The comparison slice is related to the first slice and the lower limit value.

[0167] For example, the symmetric interval , then the lower bound in the symmetric interval is , the first computing service provider will and Substitute into the security comparison operator to get the comparison fragment corresponding to the first security size comparison of the first fragment .

[0168] At the same time, the second computing service provider will and Substitute into the security comparison operator to get the comparison fragment of the second fragment corresponding to the first security size comparison .

[0169] at this time, and yes Two comparison slices of It reflects the first safety comparison result. If x is greater than or equal to ,but is 0, that is and The XOR result is 0; if x is less than ,but is 1, that is and The XOR result is 1.

[0170] It should be noted that is owned only by the first computing service provider, Owned only by the second computing service provider.

[0171] Step S704, based on the first shard and the upper limit value in the symmetric interval, call the security comparison operator, perform a security size comparison on the input data and the upper limit value, and obtain a comparison shard of the first shard corresponding to the second security size comparison.

[0172] The first slice corresponds to the comparison slice of the second safety size comparison, and can be regarded as a slice of the second safety size comparison result, which is the result of the safety size comparison between the input data and the upper limit value of the symmetric interval. The comparison slice is related to the first slice and the upper limit value.

[0173] For example, the upper limit of the symmetric interval is , the first computing service provider will and Substitute into the security comparison operator to get the comparison fragment of the first fragment corresponding to the second security size comparison .

[0174] At the same time, the second computing service provider will and Substitute into the safe comparison operator to obtain the comparison fragment corresponding to the second safe size comparison of the second fragment .

[0175] at this time, and yes Two comparison slices of It reflects the second safety comparison result. If x is greater than or equal to ,but is 0, that is and The XOR result is 0; if x is less than ,but is 1, that is and The XOR result is 1.

[0176] It should be noted that is owned only by the first computing service provider, Owned only by the second computing service provider.

[0177] Step S706, determine the first result slice based on the result slice of the nonlinear function corresponding to the first slice, the result slice of the linear function corresponding to the first slice, the comparison slice of the first safe size comparison corresponding to the first slice, and the comparison slice of the second safe size comparison corresponding to the first slice.

[0178] Exemplarily, in order to distinguish from the random number used for blinding mentioned above (i.e., the first random number r), the random number in the shard of the random number sent by the data provider is regarded as the second random number , the shard of the random number sent by the data provider obtained by the first computing service provider is regarded as the second random number Shard .

[0179] The interval of the original calculation function is In the case of The first linear function and The second linear function .

[0180] The first fragment Input to the first linear function , get the result slice of the first linear function corresponding to the first slice , the first slice is input to the second linear function , get the result slice of the second linear function corresponding to the first slice .

[0181] The first computing service provider , , , , , , determine the first result shard.

[0182] In this embodiment, the two endpoint values ​​(upper limit value and lower limit value) in the symmetric interval are combined to determine the comparison slices corresponding to the first slice, and then the first result slice is quickly determined based on the determined comparison slices and the result slices of the first slice in the nonlinear function and the linear function.

[0183] In some embodiments, Figure 8 FIG. 1 is a flow chart of a first result slice determination step in another embodiment. The first result slice is determined based on the result slice of the nonlinear function corresponding to the first slice, the result slice of the linear function corresponding to the first slice, the comparison slice of the first safety size comparison corresponding to the first slice, and the comparison slice of the second safety size comparison corresponding to the first slice, including:

[0184] Step S802, obtain the random number slices, use the random number slices as the first input slices for the first multi-way selection, and obtain the second input slices for the first multi-way selection according to the result slices of the linear function corresponding to the first slice, the result slices of the nonlinear function corresponding to the first slice, and the first input slices.

[0185] Among them, the first multi-way selection is a multi-way selection based on the lower boundary value of the interval, based on The multi-path selection result about the first slice and the lower limit value is calculated, that is, the first slice corresponds to the output slice of the first multi-path selection. The first input slice and the second input slice in this step are two inputs for the first multi-path selection of the first slice.

[0186] Exemplarily, the first computing service provider will Directly use it as the first input shard, and overlay , Subtract , and get the second input fragment, that is, .

[0187] Step S804, performing a first multi-way selection according to the comparison slice corresponding to the first security size comparison of the first slice, the first input slice for the first multi-way selection, and the second input slice, to obtain an output slice of the first multi-way selection corresponding to the first slice.

[0188] Exemplarily, the first computing service provider provides , the first input shard , the second input fragment , through the multi-way selection operator, the first multi-way selection is performed to obtain the output slice of the first slice corresponding to the first multi-way selection .

[0189] The multi-path selection operator is an operator used to determine the sharding of the result after the multi-path selection, and the operator can be understood as a code program for implementing the multi-path selection.

[0190] Step S806, based on the result slice of the linear function corresponding to the first slice and the first input slice used for the first multi-way selection, calculate the first input slice for the second multi-way selection; based on the result slice of the nonlinear function corresponding to the first slice and the first input slice used for the first multi-way selection, calculate the second input slice for the second multi-way selection.

[0191] Among them, the second multi-way selection is a multi-way selection based on the upper limit value of the interval, based on The multi-path selection result about the first slice and the lower limit value is calculated, that is, the first slice corresponds to the output slice of the second multi-path selection. The first input slice and the second input slice in this step are two inputs for the second multi-path selection of the first slice.

[0192] Exemplarily, the first computing service provider will and The difference between is determined as the first input fragment for the second multi-way selection, that is, .Will As the second input slice for the second multiplexing.

[0193] Step S808, performing a second multi-way selection according to the comparison slice corresponding to the second security size comparison of the first slice, the first input slice for the second multi-way selection, and the second input slice, to obtain the output slice of the second multi-way selection corresponding to the first slice.

[0194] Exemplarily, the first computing service provider provides , , Through the multi-way selection operator, a second multi-way selection is performed to obtain the output slice of the first slice corresponding to the second multi-way selection .

[0195] Step S810: Obtain a first result slice according to the output slice of the first multi-path selection corresponding to the first slice and the output slice of the second multi-path selection corresponding to the first slice.

[0196] Exemplarily, the first computing service provider superimposes the output slices of the first multi-path selection and the output slices of the second multi-path selection respectively corresponding to the first slice to obtain a first result slice.

[0197] In this embodiment, based on the lower boundary value and the comparison slice determined by the first slice, the output slice related to the lower boundary value is calculated through the first multi-way selection, and then based on the upper boundary value and the comparison slice determined by the first slice, the output slice related to the upper boundary value is calculated through the second multi-way selection. Combined with the first result slice determined by the two output slices, a slice of the calculation result corresponding to the input data can be more accurately represented.

[0198] In some embodiments, the step in which the second computing service provider obtains the second result shard includes: determining the result shard of the nonlinear function corresponding to the second shard based on the first random number used for blinding processing; and obtaining the second result shard based on the result shard of the nonlinear function corresponding to the second shard and the result shard of the linear function corresponding to the second shard.

[0199] The second shard corresponds to the result shard of the linear function, which is the shard of the result of the input data in the linear function. For example, Substituting into the linear function In, get , For the result Another slice of . The steps for determining the result slice of the second slice corresponding to the nonlinear function are detailed in the previous text, and the process of determining the second result slice is described below.

[0200] In some embodiments, a second result slice is obtained based on a result slice of a nonlinear function corresponding to the second slice and a result slice of a linear function corresponding to the second slice, including: based on the second slice and a lower boundary value in a symmetric interval, calling a safety comparison operator to perform a safety size comparison on the input data and the lower boundary value to obtain a comparison slice of a first safety size comparison corresponding to the second slice; based on the second slice and an upper boundary value in the symmetric interval, calling a safety comparison operator to perform a safety size comparison on the input data and the upper boundary value to obtain a comparison slice of a second safety size comparison corresponding to the second slice; determining the second result slice based on the result slice of the nonlinear function corresponding to the second slice, the result slice of the linear function corresponding to the second slice, the comparison slice of the first safety size comparison corresponding to the second slice, and the comparison slice of the second safety size comparison corresponding to the second slice.

[0201] The second slice corresponds to the comparison slice of the first security size comparison and can be regarded as another slice of the first security size comparison result. The comparison slice is related to the second slice and the lower limit value.

[0202] The second slice corresponds to the comparison slice of the second safety size comparison, and can be regarded as another slice of the second safety size comparison result. The comparison slice is related to the second slice and the upper limit value.

[0203] Exemplarily, the second computing service provider determines , Afterwards, the second computing service provider obtains the second random number sent by the data provider Another fragment of .

[0204] The interval of the original calculation function is In the case of The first linear function and The second linear function .

[0205] The second fragment Input to the first linear function , get the result slice of the second slice corresponding to the first linear function , the second slice is input to the second linear function , get the result slice of the second linear function corresponding to the second slice .

[0206] The second computing service provider , , , , , , determine the second result fragment.

[0207] In this way, combined with the two endpoint values ​​(upper limit and lower limit) in the symmetric interval, the comparison slices corresponding to the second slice are determined respectively, and then the second result slice is quickly determined based on the determined comparison slices and the result slices of the second slice in the nonlinear function and the linear function.

[0208] In this embodiment, under the premise that the second computing service provider does not need to perform power operations, the second result slice can be quickly calculated through the result slice of the nonlinear function corresponding to the second slice and the result slice of the linear function corresponding to the second slice. In this way, the data provider can quickly and accurately determine the calculation result corresponding to the input data based on the obtained second result slice, thereby improving data processing efficiency.

[0209] In some embodiments, Fig. 9 The figure is a flow chart of the second result slice determination step in one embodiment. Based on the result slice of the nonlinear function corresponding to the second slice, the result slice of the linear function corresponding to the second slice, the comparison slice of the first safety size comparison corresponding to the second slice, and the comparison slice of the second safety size comparison corresponding to the second slice, the second result slice is determined, including:

[0210] Step S902, obtain the slice of the second random number, use the slice of the second random number as the first input slice for the first multi-way selection, and obtain the second input slice for the first multi-way selection according to the result slice of the linear function corresponding to the second slice and the result slice of the non-linear function corresponding to the first input slice and the second slice.

[0211] based on The multi-path selection result about the second slice and the lower limit value is calculated, that is, the second slice corresponds to the output slice of the second multi-path selection. The first input slice and the second input slice in this step are two inputs for the first multi-path selection of the second slice.

[0212] Exemplarily, the second computing service provider obtains another shard of the second random number ,Will Directly use it as the first input shard, and overlay , Subtract , and get the second input fragment, that is, .

[0213] Step S904, performing a first multi-way selection according to the comparison slice of the first security size comparison corresponding to the second slice, the first input slice for the first multi-way selection, and the second input slice, to obtain an output slice of the first multi-way selection corresponding to the second slice.

[0214] Exemplarily, the second computing service provider provides , the first input shard , the second input fragment , through the multi-way selection operator, the first multi-way selection is performed to obtain the second slice corresponding to the output slice of the first multi-way selection .

[0215] Step S906, based on the result slice of the linear function corresponding to the second slice and the first input slice used for the first multi-way selection, calculate the first input slice for the second multi-way selection; based on the result slice of the nonlinear function corresponding to the second slice and the first input slice used for the first multi-way selection, calculate the second input slice for the second multi-way selection.

[0216] based on The multi-path selection result about the second slice and the lower limit value is calculated, that is, the second slice corresponds to the output slice of the second multi-path selection. The first input slice and the second input slice in this step are two inputs for the second multi-path selection of the second slice.

[0217] Exemplarily, the second computing service provider will and The difference between is determined as the first input fragment for the second multi-way selection, that is, .Will As the second input slice for the second multiplexing.

[0218] Step S908, performing a second multi-way selection according to the comparison slice of the second security size comparison corresponding to the second slice, the first input slice for the second multi-way selection, and the second input slice, to obtain an output slice of the second multi-way selection corresponding to the second slice.

[0219] Exemplarily, the second computing service provider provides , , , through the multi-way selection operator, a second multi-way selection is performed to obtain the second slice corresponding to the output slice of the second multi-way selection .

[0220] Step S910: Obtain a second result slice according to the output slice of the first multi-path selection corresponding to the second slice and the output slice of the second multi-path selection corresponding to the second slice.

[0221] Exemplarily, the second computing service provider superimposes the output slices of the first multi-path selection and the output slices of the second multi-path selection respectively corresponding to the second slices to obtain second result slices.

[0222] It should be noted that when the function in the asymmetric interval is a constant function, for example, The value of the constant function is always In this interval, the sum of the result slice of the constant function corresponding to the first slice and the result slice of the constant function corresponding to the second slice is ; The value of the constant function is always In this interval, the sum of the result slice of the constant function corresponding to the first slice and the result slice of the constant function corresponding to the second slice is At this time, by substituting the above process into the above process and performing similar operations, the corresponding first result fragment and second result fragment can be obtained.

[0223] The accuracy of the first result segmentation and the second result segmentation is described below. For ease of understanding, the sigmoid function is used as an example. The sigmoid function is a piecewise function, which satisfies: That is, x is in During the interval, is 1, is 1, then the value is ; x is in During the interval, is 0, is 1, then the value is ; x is in During the interval, is 0, is 0, then the value is .

[0224] Based on this, construct the expression of the first multi-way selection: , and construct the expression for the second multi-way selection: ;satisfy and The sum of the values ​​is the calculation result corresponding to the input data.

[0225] For example, is 1, is 1, ; , the calculation result is ;

[0226] is 0, is 1, ; , the calculation result is ;

[0227] is 0, is 0, ; , the calculation result is .

[0228] Therefore, for the first computing service provider, according to the , , , , , , referring to the above steps S802-S810, through the multi-way selection operator, the first result fragment can be calculated, that is, .

[0229] For the second computing service provider, based on the , , , , , , referring to the above steps S902-S910, through the multi-way selection operator, the second result fragment can be calculated, that is, .

[0230] because and for The secret shard of and for The secret shard of the first result shard and the second result shard is thus equal to the calculation result corresponding to the input data.

[0231] In this embodiment, based on the lower boundary value and the comparison slice determined by the second slice, the output slice related to the lower boundary value is calculated through the first multi-way selection, and then based on the upper boundary value and the comparison slice determined by the second allocation, the output slice related to the upper boundary value is calculated through the second multi-way selection. Combined with the first result slice determined by the two output slices, it is possible to more accurately represent another slice of the calculation result corresponding to the input data.

[0232] In the above data processing method, after the first computing service provider in the secure multi-party computing receives the first shard of the input data, the first shard will be processed using the original computing function with a bounded value range. First, the original computing function used to process the input data is segmented by interval to obtain a nonlinear function in a symmetric interval and a linear function in an asymmetric interval. For nonlinear functions, in order to avoid the power square operation caused by the use of polynomial approximation to characterize nonlinear functions, the Fourier series is used to approximate the nonlinear function, which can reduce the overhead and communication overhead. Then, based on the Fourier series expression, the first representation vector of the first shard is obtained, and the first ciphertext obtained by homomorphically encrypting the first representation vector is sent to the second computing service provider in the secure multi-party computing, and the blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard of the two shards is obtained, and the blinded ciphertext is decrypted to obtain the result shard of the nonlinear function corresponding to the first shard; according to the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard, the first result shard is obtained. Among them, by converting the values ​​of the first shard of the input data in the Fourier series into homomorphic calculations, the calculation process can be simplified. According to the first result shard and the second result shard obtained by the second computing service provider, the data provider can more quickly determine the calculation results corresponding to the input data. In this way, secure multi-party computing can be achieved efficiently and quickly.

[0233] In some embodiments, the method further includes: sending the first result slice to the data provider of the input data, so that the data provider superimposes the first result slice with the second result slice sent by the second computing service provider and then decodes it to obtain the computing result corresponding to the input data.

[0234] Exemplarily, the data provider adds the sum value ( ) to decode the floating point number, and get , that is, the calculation result after the input data x is substituted into the original calculation function.

[0235] In this embodiment, in a case where each party in a secure multi-party computation (such as a data provider, a first computing service provider, and a second computing service provider) does not know the specific value of the input data, secure multi-party computation can be implemented efficiently and quickly without performing high-order exponentiation operations.

[0236] In some embodiments, when the data provider determines that the input data is in a symmetric interval, after obtaining the result slice of the nonlinear function corresponding to the first slice, the method also includes: sending the result slice of the nonlinear function corresponding to the first slice to the data provider of the input data, so that the data provider can superimpose the result slice of the nonlinear function corresponding to the first slice with the result slice of the nonlinear function corresponding to the second slice sent by the second computing service provider to obtain the calculation result corresponding to the input data.

[0237] For example, when the data provider knows the specific value of the input data, it can predetermine the interval in which it is located. If it is in a symmetric interval, the data provider only needs to obtain the calculation result of the input data in the symmetric interval. At this time, refer to the above to determine , In the process, the first computing service provider and the second computing service provider respectively , Return directly to the data provider, the data provider superimposes and , and the sum is obtained, which is the calculation result.

[0238] In this embodiment, when the data provider determines that the input data is in a symmetric interval, there is no need to calculate the result slices corresponding to the linear function. It is only necessary to obtain the result slices corresponding to the nonlinear function calculated by each computing service provider. The calculation process is simpler and the data processing efficiency is improved.

[0239] In an exemplary embodiment, Fig.10 As shown, a data processing method is provided, which is applied to Figure 5 Taking the data provider 502 in the example as an example, the method includes the following steps S1002 to S1004. Among them:

[0240] Step S1002, secretly sharding the input data to obtain a first shard and a second shard, and sending the first shard and the second shard to the first computing service provider and the second computing service provider in the secure multi-party computing, respectively; wherein, after obtaining the first shard, the first computing service provider segments the original computing function used to process the input data by interval, obtains a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, obtains a Fourier series expression of the nonlinear function, the value range of the original computing function has a boundary, and obtains a first characterization vector of the first shard based on the Fourier series expression, sends a first ciphertext obtained by homomorphically encrypting the first characterization vector to the second computing service provider in the secure multi-party computing, obtains a blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard, decrypts the blinded ciphertext, obtains a result shard of the nonlinear function corresponding to the first shard, and obtains a first result shard according to the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard.

[0241] Step S1004: Obtain a first result slice returned by the first computing service provider and a second result slice returned by the second computing service provider, and generate a computing result corresponding to the input data according to the first result slice and the second result slice.

[0242] In the above data processing method, after the data provider in the secure multi-party computing secretly shards the input data to obtain the first shard and the second shard, the first shard and the second shard are sent to the first computing service provider and the second computing service provider in the secure multi-party computing respectively. After the first computing service provider receives the first shard of the input data, it will use the original computing function with a bounded value range to process the first shard. First, the original computing function used to process the input data is segmented according to the interval to obtain a nonlinear function in a symmetric interval and a linear function in an asymmetric interval. For nonlinear functions, in order to avoid the power square operation caused by using polynomial approximation to represent nonlinear functions, Fourier series is used to approximate nonlinear functions, which can reduce overhead and communication overhead. Next, based on the Fourier series expression, the first characterization vector of the first shard is obtained, and the first ciphertext obtained by homomorphically encrypting the first characterization vector is sent to the second computing service provider in the secure multi-party computation, and the blinded ciphertext returned by the second computing service provider based on the first ciphertext and the second shard of the two shards is obtained, and the blinded ciphertext is decrypted to obtain the result shard of the nonlinear function corresponding to the first shard; the first result shard is obtained based on the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard. Among them, by converting the value of the first shard of the input data in the Fourier series into homomorphic calculation, the calculation process can be simplified, and according to the first result shard and the second result shard obtained by the second computing service provider, the data provider can more quickly determine the calculation result corresponding to the input data, so that the secure multi-party computation is realized efficiently and quickly.

[0243] In some embodiments, Fig.11 As shown, a data processing system is provided, the system includes a data provider 1102, a first computing service provider 1104 and a second computing service provider 1106 in a secure multi-party computing:

[0244] The data provider 1102 is used to secretly slice the input data to obtain a first slice and a second slice, and send the first slice and the second slice to the first computing service provider 1104 and the second computing service provider 1106 in the secure multi-party computing, respectively.

[0245] The first computing service provider 1104 is used to receive the first slice sent by the data provider 1102, and segment the original computing function used to process the input data by intervals, obtain a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, obtain the Fourier series expression of the nonlinear function, and the value range of the original computing function has a boundary.

[0246] The first computing service provider 1104 is further used to obtain a first characterization vector of the first shard based on a Fourier series expression, and send a first ciphertext obtained by homomorphically encrypting the first characterization vector to the second computing service provider 1106 in the secure multi-party computing.

[0247] The second computing service provider 1106 is used to receive the second fragment sent by the data provider 1102, and obtain the first ciphertext sent by the first computing service provider 1104, and determine the blinded ciphertext according to the first ciphertext and the second fragment, and return it to the first computing service provider 1104.

[0248] The first computing service provider 1104 also obtains the blinded ciphertext returned by the second computing service provider 1106, decrypts the blinded ciphertext, and obtains a result shard of the nonlinear function corresponding to the first shard.

[0249] The first computing service provider 1104 is further configured to obtain a first result slice according to the result slice of the nonlinear function corresponding to the first slice and the result slice of the linear function corresponding to the first slice, and send the first result slice to the data provider 1102.

[0250] The second computing service provider 1106 is configured to obtain a second result slice according to the second slice, and send the second result slice to the data provider 1102 .

[0251] The data provider 1102 is further used to obtain the first result slice and the second result slice, and generate a calculation result corresponding to the input data according to the first result slice and the second result slice.

[0252] In the above data system, after the first computing service provider in the secure multi-party computation receives the first shard of the input data, it will use the original computing function with a bounded value range to process the first shard. First, the original computing function used to process the input data is segmented by interval to obtain a nonlinear function in a symmetric interval and a linear function in an asymmetric interval. For nonlinear functions, in order to avoid the power square operation caused by the use of polynomial approximation to characterize nonlinear functions, the Fourier series is used to approximate the nonlinear function, which can reduce the overhead and communication overhead. Then, based on the Fourier series expression, the first representation vector of the first shard is obtained, and the first ciphertext obtained by homomorphically encrypting the first representation vector is sent to the second computing service provider in the secure multi-party computation, and the blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard of the two shards is obtained, and the blinded ciphertext is decrypted to obtain the result shard of the nonlinear function corresponding to the first shard; according to the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard, the first result shard is obtained. Among them, by converting the values ​​of the first shard of the input data in the Fourier series into homomorphic calculations, the calculation process can be simplified. According to the first result shard and the second result shard obtained by the second computing service provider, the data provider can more quickly determine the calculation results corresponding to the input data. In this way, secure multi-party computing can be achieved efficiently and quickly.

[0253] The present application also provides an application scenario, which applies the data processing method involved above. Specifically, the application of the data processing method in the application scenario is as follows: In a financial scenario, a financial institution hopes to determine the customer's credit score by jointly providing a first computing service provider and a second computing service provider that can provide credit computing services without disclosing the customer's privacy, wherein the server where the financial institution is located can be regarded as a data provider, and the financial data of any customer of the financial institution (such as sensitive data such as expenditure) is used as input data, and secret sharing is performed to obtain the first shard and the second shard, which are sent to the first computing service provider and the second computing service provider respectively. The first computing service provider segments the original computing function used to process the input data by intervals, obtains a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, obtains the Fourier series expression of the nonlinear function, and the value range of the original computing function has a boundary; based on the Fourier series expression, a first characterization vector of the first shard is obtained, and a first ciphertext obtained by homomorphically encrypting the first characterization vector is sent to the second computing service provider in the secure multi-party computing, and the second computing service provider obtains the blinded ciphertext returned by the second computing service provider based on the first ciphertext and the second shard of the two shards, decrypts the blinded ciphertext, and obtains a result shard of the nonlinear function corresponding to the first shard; a first result shard is obtained based on the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard; the first result shard is used to generate a credit score for the customer with the second result shard obtained by the second computing service provider.

[0254] Of course, it is not limited to this. The data processing method provided in the present application can also be applied to other application scenarios. For example, in a medical scenario, auxiliary diagnosis of a target object is performed. The input data is the medical data of the target object (such as medical records, object information). After the calculation result is determined using the data processing method provided in the embodiment of the present application, the calculation result is input into the artificial intelligence model to perform a diagnostic score on the target object, thereby achieving reasonable and effective auxiliary diagnosis of the target object.

[0255] For another example, in a content push scenario, in order to quickly push content to a target object, the interaction data of the target object is used as input data. The data processing method provided in an embodiment of the present application is used to determine the calculation result, and then the calculation result is input into a model for evaluating object description information to determine the object description information of the target object.

[0256] The above application scenarios are merely illustrative illustrations. It should be understood that the application of the data processing methods provided in the embodiments of the present application is not limited to the above scenarios.

[0257] In a specific embodiment, Fig.12 FIG. 1 is a schematic diagram of a data processing process in an embodiment.

[0258] Step 1: The data provider needs to calculate the result of the original calculation function F(x) (complex function, such as sigmoid) on the input data x. At this time, the input data x is secretly sharded to obtain the first shard. and the second shard , and the interval and Sent to the first computing service provider, the interval and The value range of the original computing function is bounded.

[0259] Step 2: The first computing service provider divides the interval into segments based on the interval according to a preset segmentation rule. For example, the interval is , it is divided into three sections by default, which are , , .and The function is a simple function 1, using Representation, such as a linear function, or a constant function, or a simple polynomial; The function is a complex function, such as a nonlinear function (The polynomial approximation calculation of this nonlinear function involves a relatively high algebraic degree of the polynomial. Since the number of safety comparisons increases linearly with the increase of the algebraic degree, the use of polynomial approximation will lead to a large computational overhead), and Fourier series expression is used for approximation; The function is a simple function 2, using Representation, such as linear function, constant function, or simple polynomial. The essence of the above process is to approximate the complex function by interval.

[0260] The Fourier series expression is a superposition of multiple expansion terms, each of which is the inner product of the first vector factor and the second vector factor. The Fourier series expression can be converted into the inner product of the first original vector from the first computing service provider and the second original vector from the second computing service provider. The first original vector is , the second original vector is .

[0261] Step 3: The first computing service provider will Input the first original vector and get the first representation vector , for the sake of convenience, the first component of the first characterization vector Considered as , the second component Considered as , ..., the 2nth component Considered as , get the first characterization vector .

[0262] Step 4: The first computing service provider Perform floating point encoding to obtain the first encoding vector, that is, ;right Each component in is homomorphically encrypted to obtain the first ciphertext, which includes m ciphertexts (i.e., , …, ), and sends it to the second computing service provider.

[0263] Step 5: The second computing service provider Input the second original vector and get the second representation vector , for the sake of convenience, the first component of the second characterization vector Considered as , ..., the 2nth component Considered as , and obtain the second characterization vector .

[0264] The second computing service provider Each component in is encoded with floating point numbers to obtain the second encoding vector, that is, , respectively Each vector in is homomorphically multiplied with the ciphertext in the first ciphertext to obtain m ciphertexts, which are , …, , and then perform homomorphic summation on these m ciphertexts, which is equivalent to The corresponding ciphertext, i.e. the second ciphertext .

[0265] In order to improve the efficiency of the algorithm, BFV / BGV fully homomorphic encryption is used to batch execute the function, that is, using the characteristic of BFV / BGV fully homomorphic encryption that a ciphertext corresponds to a plaintext vector, the secure calculation of Q Fourier approximation expressions is treated as a single calculation on the ciphertext. For example, input The corresponding fragment is , then each or Corresponding to a 2n-dimensional floating-point vector, where i=0, 1, ..., Q-1, the Q slices correspond to a Q×2n matrix, and each column is encrypted to obtain a ciphertext, so a total of 2n ciphertexts are obtained. In other words, homomorphic computation of ciphertexts corresponds to the secure computation of the Fourier approximation expression that processes Q input slices simultaneously.

[0266] It should be noted that the above steps are actually secure inner product operations based on BGV full homomorphism. This secure inner product operation can also be applied to the generation of multiplication triplets modulo p, and then converted into a secure multiplication operation for decimals in [-1, 1].

[0267] Step 6: The second computing service provider randomly selects a second random value , and determine the upper bound (maximum value) of the variance of the ciphertext corresponding error as , after homomorphic addition, the upper bound of the variance of the error corresponding to the ciphertext is , that is, the upper limit of the standard deviation is Thus, the first random value is determined The value range is , based on the value range, determine the first random value , then press , determine the first random number r.

[0268] Step 7: The second computing service provider calculates the second ciphertext based on the first random number r. Perform blinding processing to obtain blinded ciphertext , and returns it to the first computing service provider.

[0269] Step 8: The first computing service provider calculates the plaintext modulus p and The product of the decryption result s and the ratio is calculated and rounded to obtain the first conversion fragment. , for the first conversion slice According to the cut-off length , call the truncation operator to get the first target conversion fragment , which can be regarded as the result slice of the nonlinear function corresponding to the first slice (belong A fragment of ).

[0270] Step 9: The first computing service provider and Substitute into the security comparison operator to get the comparison fragment corresponding to the first security size comparison of the first fragment The first computing service provider will and Substitute into the security comparison operator to get the comparison fragment of the first fragment corresponding to the second security size comparison That is, based on , , Perform a safe size comparison to determine the comparison shards, which are , .

[0271] Step 10: The first computing service provider obtains a second random number Shard ,Will As the first input slice for the first multi-way selection.

[0272] The first computing service provider will Input to , perform secure calculations and obtain result shards (belong A fragment of ),Will Input to , perform secure calculations and obtain result shards (belong A fragment of ).

[0273] The first computing service provider will Directly use it as the first input shard, and overlay , Subtract , and get the second input fragment, that is, .according to , the first input shard , the second input fragment , through the multi-way selection operator, the first multi-way selection is performed to obtain the output slice of the first slice corresponding to the first multi-way selection .

[0274] The first computing service provider will and The difference between is determined as the first input fragment for the second multi-way selection, that is, ).Will As the second input slice for the second multi-way selection. , , Through the multi-way selection operator, a second multi-way selection is performed to obtain the output slice of the first slice corresponding to the second multi-way selection The first computing service provider superimposes and The first result fragment is obtained and returned to the data provider.

[0275] It should be noted that Fig.12 The secure computing process is the process of any computing service provider determining the result sharding. Taking the first computing service provider as an example, the process of steps 8-10 means that after performing secure computing on simple functions 1 and 2, the corresponding shards of the first computing service provider are obtained. , Based on the secure inner product operation of BGV fully homomorphic encryption and the Fourier series expression, the corresponding to the first computing service provider is determined , then, based on , , , by comparing the fragments , Perform multi-path selection to obtain the corresponding first result fragment.

[0276] Step 11: Second computing service provider Substitution In, get ,belong Another fragment of ),Will Input to , perform secure calculations and obtain result shards (belong Another fragment of ).

[0277] The second computing service provider will and Substitute into the security comparison operator to get the comparison fragment .Will and Substitute into the security comparison operator to get the comparison fragment That is, based on , , Perform a safe size comparison to determine the comparison shards, which are , .

[0278] The second computing service party calculates the plaintext modulus p and The product of the first random number r and the ratio is calculated and rounded to obtain the second conversion fragment. , for the second transformation fragment According to the cut-off length , call the truncation operator to get the second target conversion fragment , which can be regarded as the result slice of the nonlinear function corresponding to the second slice (belong Another fragment of can also be written as ).

[0279] Step 12: The second computing service provider obtains a second random number Another fragment of .Will Directly use it as the first input shard, and overlay , Subtract , and get the second input fragment, that is, .

[0280] The second computing service provider , the first input shard , the second input fragment , through the multi-way selection operator, the first multi-way selection is performed to obtain the second slice corresponding to the output slice of the first multi-way selection .Will and The difference between is determined as the first input fragment for the second multi-way selection, that is, .Will As the second input slice for the second multiplexing.

[0281] The second computing service provider , , , through the multi-way selection operator, a second multi-way selection is performed to obtain the second slice corresponding to the output slice of the second multi-way selection .

[0282] Second computing service provider superposition and The second result fragment is obtained and returned to the data provider.

[0283] Step 13: The data provider superimposes the first result slice and the second result slice and decodes them to obtain a calculation result corresponding to the input data.

[0284] It should be noted that the above steps 1-13 are implemented when the data provider is unaware of the interval in which the input data is located.

[0285] Step 14. When the data provider determines that the input data is in a symmetric interval, refer to the above steps, and after determining that the first slice corresponds to the result slice of the nonlinear function, and determining that the second slice corresponds to the result slice of the nonlinear function, directly return it to the data provider. The data provider directly superimposes the result slice of the nonlinear function corresponding to the first slice and the result slice of the nonlinear function corresponding to the second slice to determine the calculation result corresponding to the input data.

[0286] In the above data processing method, after the first computing service provider in the secure multi-party computing receives the first shard of the input data, the first shard will be processed using the original computing function with a bounded value range. First, the original computing function used to process the input data is segmented by interval to obtain a nonlinear function in a symmetric interval and a linear function in an asymmetric interval. For nonlinear functions, in order to avoid the power square operation caused by the use of polynomial approximation to characterize nonlinear functions, the Fourier series is used to approximate the nonlinear function, which can reduce the overhead and communication overhead. Then, based on the Fourier series expression, the first representation vector of the first shard is obtained, and the first ciphertext obtained by homomorphically encrypting the first representation vector is sent to the second computing service provider in the secure multi-party computing, and the blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard of the two shards is obtained, and the blinded ciphertext is decrypted to obtain the result shard of the nonlinear function corresponding to the first shard; according to the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard, the first result shard is obtained. Among them, by converting the value of the first slice of the input data in the Fourier series into a homomorphic calculation, the calculation process can be simplified, and the data provider can more quickly determine the calculation result corresponding to the input data according to the first result slice and the second result slice obtained by the second computing service provider, so that the secure multi-party calculation can be realized efficiently and quickly. By reasonably selecting the first random number and the parameters, not only the risk of leaking the original data information due to the error after decryption can be avoided, but also the calculation or communication overhead can be effectively reduced.

[0287] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0288] Based on the same inventive concept, the embodiment of the present application also provides a data processing device for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments provided below can refer to the limitations on the data processing method above, and will not be repeated here.

[0289] In an exemplary embodiment, Fig.13 As shown, a data processing device 1300 is provided, comprising: a receiving module 1302, a segmentation module 1304, a first acquisition module 1306 and a second acquisition module 1308, wherein:

[0290] A receiving module 1302 is used to receive a slice of input data, where the slice is the first slice of two slices obtained by the data provider by secretly slicing the input data;

[0291] A segmentation module 1304 is used to segment the original calculation function used to process the input data by intervals, obtain a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, obtain a Fourier series expression of the nonlinear function, and the value range of the original calculation function has a boundary;

[0292] A first acquisition module 1306 is configured to obtain a first characterization vector of the first shard based on a Fourier series expression, send a first ciphertext obtained by homomorphically encrypting the first characterization vector to a second computing service provider in secure multi-party computing, obtain a blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard of the two shards, decrypt the blinded ciphertext, and obtain a result shard of the nonlinear function corresponding to the first shard;

[0293] The second acquisition module 1308 is used to obtain a first result slice according to the result slice of the nonlinear function corresponding to the first slice and the result slice of the linear function corresponding to the first slice; the first result slice is used to generate a calculation result corresponding to the input data with the second result slice obtained by the second computing service provider.

[0294] In some embodiments, the Fourier series expression is a superposition of multiple expanded terms, each expanded term is the inner product of a first vector factor and a second vector factor; the first acquisition module 1306 is used to input the first slice into the first vector factor in each expanded term to obtain a first characterization vector of the first slice.

[0295] In some embodiments, the first acquisition module 1306 is further used to perform floating point encoding on each component in the first representation vector to obtain a first encoding vector; and perform homomorphic encryption on each component in the first encoding vector to obtain a first ciphertext.

[0296] In some embodiments, the first acquisition module 1306 is also used to obtain a second characterization vector of the second slice based on a Fourier series expression, perform floating point encoding on each component in the second characterization vector to obtain a second encoding vector; perform homomorphic multiplication on the first ciphertext and the second encoding vector to obtain a second ciphertext; and blind the second ciphertext based on a random number to obtain a blinded ciphertext.

[0297] In some embodiments, the first acquisition module 1306 is also used to obtain an upper limit value of the variance of the error corresponding to the second ciphertext; based on the upper limit value of the variance, determine a first random value that obeys a uniform distribution, and the first random value is used to blind the noise part in the second ciphertext; obtain a second random value, and the second random value is used to blind the plaintext part in the second ciphertext; and fuse the first random value and the second random value to obtain a random number.

[0298] In some embodiments, the second acquisition module 1308 is used to call the safety comparison operator based on the first slice and the lower boundary value in the symmetric interval, and perform a safety size comparison on the input data with the lower boundary value to obtain a comparison slice of the first slice corresponding to the first safety size comparison; call the safety comparison operator based on the first slice and the upper boundary value in the symmetric interval, and perform a safety size comparison on the input data with the upper boundary value to obtain a comparison slice of the first slice corresponding to the second safety size comparison; determine the first result slice based on the result slice of the first slice corresponding to the nonlinear function, the result slice of the first slice corresponding to the linear function, the comparison slice of the first slice corresponding to the first safety size comparison, and the comparison slice of the first slice corresponding to the second safety size comparison.

[0299] In some embodiments, the second acquisition module 1308 is used to obtain the shards of random numbers, and use the shards of random numbers as the first input shards for the first multi-way selection, and obtain the second input shards for the first multi-way selection according to the result shards of the linear function corresponding to the first shards, the result shards of the nonlinear function corresponding to the first shards, and the first input shards; perform the first multi-way selection according to the comparison shards of the first security size comparison corresponding to the first shards, the first input shards for the first multi-way selection, and the second input shards, and obtain the output shards of the first multi-way selection corresponding to the first shards; and obtain the output shards of the first multi-way selection corresponding to the first shards according to the result shards of the linear function corresponding to the first shards and the shards for the first multi-way selection. The first input slice of the multi-way selection is calculated to obtain the first input slice for the second multi-way selection, and the second input slice for the second multi-way selection is calculated according to the result slice of the nonlinear function corresponding to the first slice and the first input slice for the first multi-way selection; according to the comparison slice of the second safety size comparison corresponding to the first slice, the first input slice and the second input slice for the second multi-way selection, the second multi-way selection is performed to obtain the output slice of the first slice corresponding to the second multi-way selection; according to the output slice of the first multi-way selection corresponding to the first slice and the output slice of the second multi-way selection corresponding to the first slice, the first result slice is obtained.

[0300] In some embodiments, the second acquisition module 1308 is also used to determine the result slice of the nonlinear function corresponding to the second slice according to the first random number used for blinding processing; and obtain the second result slice according to the result slice of the nonlinear function corresponding to the second slice and the result slice of the linear function corresponding to the second slice.

[0301] In some embodiments, the second acquisition module 1308 is also used to call the safety comparison operator based on the second slice and the lower boundary value in the symmetric interval, and perform a safety size comparison on the input data with the lower boundary value to obtain a comparison slice of the first safety size comparison corresponding to the second slice; call the safety comparison operator based on the second slice and the upper boundary value in the symmetric interval, and perform a safety size comparison on the input data with the upper boundary value to obtain a comparison slice of the second safety size comparison corresponding to the second slice; determine the second result slice based on the result slice of the nonlinear function corresponding to the second slice, the result slice of the linear function corresponding to the second slice, the comparison slice of the first safety size comparison corresponding to the second slice, and the comparison slice of the second safety size comparison corresponding to the second slice.

[0302] In some embodiments, the second acquisition module 1308 is further used to obtain a slice of a second random number, and use the slice of the second random number as a first input slice for the first multi-way selection, and obtain the second input slice for the first multi-way selection according to the result slice of the linear function corresponding to the second slice, the first input slice, and the result slice of the nonlinear function corresponding to the second slice; perform the first multi-way selection according to the comparison slice of the first security size comparison corresponding to the second slice, the first input slice for the first multi-way selection, and the second input slice, and obtain the output slice of the first multi-way selection corresponding to the second slice; and compare the result slice of the linear function corresponding to the second slice and the result slice of the nonlinear function corresponding to the second slice. The first input slice of the first multi-way selection is used to calculate the first input slice for the second multi-way selection, and the second input slice for the second multi-way selection is calculated according to the result slice of the nonlinear function corresponding to the second slice and the first input slice used for the first multi-way selection; the second multi-way selection is performed according to the comparison slice of the second security size comparison corresponding to the second slice, the first input slice and the second input slice used for the second multi-way selection, to obtain the output slice of the second multi-way selection corresponding to the second slice; the second result slice is obtained according to the output slice of the first multi-way selection corresponding to the second slice and the output slice of the second multi-way selection corresponding to the second slice.

[0303] In some embodiments, the device also includes a sending module, which is used to send the first result slice to the data provider of the input data, so that the data provider can superimpose the first result slice with the second result slice sent by the second computing service provider and then decode it to obtain the calculation result corresponding to the input data.

[0304] In some embodiments, when the data provider determines that the input data is in a symmetric interval, the sending module is also used to send the result slice of the nonlinear function corresponding to the first slice to the data provider of the input data, so that the data provider can superimpose the result slice of the nonlinear function corresponding to the first slice with the result slice of the nonlinear function corresponding to the second slice sent by the second computing service provider to obtain the calculation result corresponding to the input data.

[0305] Based on the same inventive concept, the embodiment of the present application also provides a data processing device for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments provided below can refer to the limitations on the data processing method above, and will not be repeated here.

[0306] In an exemplary embodiment, Fig.14 As shown, a data processing device 1400 is provided, including: a slicing module 1402 and a generating module 1404, wherein:

[0307] A sharding module 1402 is used to secretly shard the input data to obtain a first shard and a second shard, and send the first shard and the second shard to a first computing service provider and a second computing service provider in a secure multi-party computing, respectively;

[0308] Among them, after obtaining the first shard, the first computing service provider segments the original computing function used to process the input data according to the interval, obtains a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, obtains the Fourier series expression of the nonlinear function, the value range of the original computing function has a boundary, and obtains the first characterization vector of the first shard based on the Fourier series expression, and sends the first ciphertext obtained by homomorphically encrypting the first characterization vector to the second computing service provider in the secure multi-party computing, obtains the blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard, decrypts the blinded ciphertext, and obtains the result shard of the nonlinear function corresponding to the first shard, and obtains the first result shard according to the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard;

[0309] The generation module 1404 is used to obtain the first result slice returned by the first computing service provider and the second result slice returned by the second computing service provider, and generate a computing result corresponding to the input data according to the first result slice and the second result slice.

[0310] Each module in the above data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0311] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.15 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above-mentioned data processing method is implemented.

[0312] Those skilled in the art will understand that Fig.15 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0313] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0314] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0315] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0316] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0317] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0318] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0319] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data processing method, characterized in that: The method is performed by a first computing service provider in a secure multi-party computing, and the method includes: Receive a slice of input data, where the slice is a first slice of two slices obtained by a data provider secretly slicing the input data; The original calculation function used to process the input data is segmented according to intervals to obtain a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, and a Fourier series expression of the nonlinear function is obtained, and the value range of the original calculation function has a boundary; Obtaining a first characterization vector of the first shard based on the Fourier series expression, sending a first ciphertext obtained by homomorphically encrypting the first characterization vector to a second computing service provider in the secure multi-party computation, obtaining a blinded ciphertext returned by the second computing service provider based on the first ciphertext and the second shard of the two shards, decrypting the blinded ciphertext, and obtaining a result shard of the first shard corresponding to the nonlinear function; A first result slice is obtained according to a result slice of the nonlinear function corresponding to the first slice and a result slice of the linear function corresponding to the first slice; the first result slice is used to generate a calculation result corresponding to the input data with a second result slice obtained by the second computing service provider; wherein the second result slice is obtained by the second computing service provider by combining a result slice of the nonlinear function corresponding to the second slice and a result slice of the linear function corresponding to the second slice.

2. The method according to claim 1, characterized in that The Fourier series expression is a superposition of multiple expansion terms, each expansion term is the inner product of the first vector factor and the second vector factor; The step of obtaining a first characterization vector of the first slice based on the Fourier series expression includes: The first slice is input into the first vector factor in each expansion term to obtain a first representation vector of the first slice.

3. The method according to claim 1, characterized in that The step of homomorphically encrypting the first representation vector to obtain a first ciphertext includes: Perform floating point encoding on each component in the first representation vector to obtain a first encoding vector; Homomorphically encrypt each component in the first encoding vector to obtain a first ciphertext.

4. The method according to claim 1, characterized in that: The step of the second computing service provider calculating a blinded ciphertext according to the first ciphertext and the second shard of the two shards comprises: Acquire a second characterization vector of the second slice based on the Fourier series expression, and perform floating point encoding on each component in the second characterization vector to obtain a second encoding vector; Performing homomorphic multiplication processing on the first ciphertext and the second encoding vector to obtain a second ciphertext; The second ciphertext is blinded based on a random number to obtain a blinded ciphertext.

5. The method according to claim 4, characterized in that The random number determination step comprises: Obtaining an upper bound value of a variance of an error corresponding to the second ciphertext; Determine, according to the upper bound value of the variance, a first random value that obeys a uniform distribution, where the first random value is used to blind a noise part in the second ciphertext; Obtaining a second random value, where the second random value is used to blind a plaintext portion of the second ciphertext; The first random value and the second random value are combined to obtain the random number.

6. The method according to claim 1, characterized in that The obtaining a first result slice according to the result slice of the nonlinear function corresponding to the first slice and the result slice of the linear function corresponding to the first slice comprises: Based on the first shard and the lower bound value in the symmetric interval, calling a security comparison operator, performing a security size comparison between the input data and the lower bound value, and obtaining a comparison shard of the first shard corresponding to the first security size comparison; Based on the first shard and the upper bound value in the symmetric interval, calling a security comparison operator, performing a security size comparison between the input data and the upper bound value, and obtaining a comparison shard of the first shard corresponding to the second security size comparison; A first result slice is determined based on the result slice of the nonlinear function corresponding to the first slice, the result slice of the linear function corresponding to the first slice, the comparison slice of the first safe size comparison corresponding to the first slice, and the comparison slice of the second safe size comparison corresponding to the first slice.

7. The method according to claim 6, characterized in that The determining of the first result slice based on the result slice of the nonlinear function corresponding to the first slice, the result slice of the linear function corresponding to the first slice, the comparison slice of the first safety size comparison corresponding to the first slice, and the comparison slice of the second safety size comparison corresponding to the first slice, comprises: Obtain a shard of random numbers, use the shard of random numbers as a first input shard for a first multi-way selection, and obtain a second input shard for the first multi-way selection according to a result shard of the linear function corresponding to the first shard, a result shard of the nonlinear function corresponding to the first shard, and the first input shard; Perform a first multi-way selection according to the comparison slice for the first security size comparison corresponding to the first slice, the first input slice and the second input slice for the first multi-way selection, to obtain an output slice of the first multi-way selection corresponding to the first slice; According to the result slice of the linear function corresponding to the first slice and the first input slice for the first multi-way selection, the first input slice for the second multi-way selection is calculated; according to the result slice of the nonlinear function corresponding to the first slice and the first input slice for the first multi-way selection, the second input slice for the second multi-way selection is calculated; Perform a second multi-way selection according to the comparison slice for the second security size comparison corresponding to the first slice, the first input slice and the second input slice for the second multi-way selection, to obtain an output slice for the second multi-way selection corresponding to the first slice; A first result slice is obtained according to the output slice of the first multiplexing corresponding to the first slice and the output slice of the second multiplexing corresponding to the first slice.

8. The method according to claim 1, characterized in that: The result slice of the second slice corresponding to the nonlinear function is determined according to the first random number used for blinding processing.

9. The method according to claim 1, characterized in that: The specific steps of obtaining the second result fragment include: Based on the second shard and the lower bound value in the symmetric interval, calling a security comparison operator, performing a security size comparison between the input data and the lower bound value, and obtaining a comparison shard of the first security size comparison corresponding to the second shard; Based on the second shard and the upper bound value in the symmetric interval, calling a security comparison operator, performing a security size comparison between the input data and the upper bound value, and obtaining a comparison shard for a second security size comparison corresponding to the second shard; A second result slice is determined based on the result slice of the nonlinear function corresponding to the second slice, the result slice of the linear function corresponding to the second slice, the comparison slice of the first safe size comparison corresponding to the second slice, and the comparison slice of the second safe size comparison corresponding to the second slice.

10. The method according to claim 9, characterized in that The determining of the second result slice based on the result slice of the nonlinear function corresponding to the second slice, the result slice of the linear function corresponding to the second slice, the comparison slice of the first safety size comparison corresponding to the second slice, and the comparison slice of the second safety size comparison corresponding to the second slice, comprises: Obtain a slice of a second random number, use the slice of the second random number as a first input slice for a first multi-path selection, and obtain a second input slice for the first multi-path selection according to a result slice of the linear function corresponding to the second slice, the first input slice, and the result slice of the nonlinear function corresponding to the second slice; Perform a first multi-way selection according to the comparison slice of the first security size comparison corresponding to the second slice, the first input slice and the second input slice for the first multi-way selection, to obtain an output slice of the first multi-way selection corresponding to the second slice; The first input slice for the second multi-way selection is calculated based on the result slice of the linear function corresponding to the second slice and the first input slice for the first multi-way selection; the second input slice for the second multi-way selection is calculated based on the result slice of the nonlinear function corresponding to the second slice and the first input slice for the first multi-way selection; Perform a second multi-way selection according to the comparison slice of the second security size comparison corresponding to the second slice, the first input slice and the second input slice for the second multi-way selection, to obtain an output slice of the second multi-way selection corresponding to the second slice; A second result slice is obtained according to the output slice of the first multiplexing corresponding to the second slice and the output slice of the second multiplexing corresponding to the second slice.

11. The method according to claim 1, characterized in that The method further comprises: The first result slice is sent to the data provider of the input data, so that the data provider superimposes the first result slice with the second result slice sent by the second computing service provider and then decodes it to obtain the computing result corresponding to the input data.

12. The method according to claim 1, characterized in that When the data provider determines that the input data is in the symmetric interval, after obtaining the result slice of the first slice corresponding to the nonlinear function, the method further includes: The result slice of the first slice corresponding to the nonlinear function is sent to the data provider of the input data, so that the data provider superimposes the result slice of the first slice corresponding to the nonlinear function with the result slice of the second slice corresponding to the nonlinear function sent by the second computing service provider to obtain the calculation result corresponding to the input data.

13. A data processing method, characterized in that: The method is performed by a data provider in a secure multi-party computation, and the method includes: Secretly sharding the input data to obtain a first shard and a second shard, and sending the first shard and the second shard to a first computing service provider and a second computing service provider in a secure multi-party computation, respectively; Among them, after obtaining the first shard, the first computing service provider segments the original computing function used to process the input data according to intervals, obtains a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, obtains a Fourier series expression of the nonlinear function, the value range of the original computing function has a boundary, and obtains a first characterization vector of the first shard based on the Fourier series expression, sends a first ciphertext obtained by homomorphically encrypting the first characterization vector to the second computing service provider in the secure multi-party computation, obtains a blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard, decrypts the blinded ciphertext, obtains a result shard of the nonlinear function corresponding to the first shard, and obtains a first result shard according to the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard; the second computing service provider obtains a second result shard by combining the result shard of the nonlinear function corresponding to the second shard and the result shard of the linear function corresponding to the second shard; Obtain a first result slice returned by the first computing service provider and a second result slice returned by the second computing service provider, and generate a computing result corresponding to the input data according to the first result slice and the second result slice.

14. A data processing system, characterized in that: The system includes a data provider, a first computing service provider and a second computing service provider in a secure multi-party computing: A data provider, configured to secretly slice input data to obtain a first slice and a second slice, and send the first slice and the second slice to a first computing service provider and a second computing service provider in a secure multi-party computing, respectively; The first computing service provider is used to receive the first slice sent by the data provider, and segment the original computing function used to process the input data by intervals to obtain a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, and obtain a Fourier series expression of the nonlinear function, wherein the value range of the original computing function has a boundary; The first computing service provider is further configured to obtain a first characterization vector of the first shard based on the Fourier series expression, and send a first ciphertext obtained by homomorphically encrypting the first characterization vector to a second computing service provider in the secure multi-party computation; The second computing service provider is used to receive the second shard sent by the data provider, obtain the first ciphertext sent by the first computing service provider, determine the blinded ciphertext according to the first ciphertext and the second shard, and return it to the first computing service provider; The first computing service provider further obtains the blinded ciphertext returned by the second computing service provider, decrypts the blinded ciphertext, and obtains a result shard of the first shard corresponding to the nonlinear function; The first computing service provider is further configured to obtain a first result slice according to the result slice of the nonlinear function corresponding to the first slice and the result slice of the linear function corresponding to the first slice, and send the first result slice to the data provider; The second computing service provider is used to obtain a second result slice by synthesizing the result slice of the nonlinear function corresponding to the second slice and the result slice of the linear function corresponding to the second slice, and send the second result slice to the data provider; The data provider is further used to obtain the first result slice and the second result slice, and generate a calculation result corresponding to the input data according to the first result slice and the second result slice.

15. A data processing device, characterized in that: The device comprises: A receiving module, configured to receive a slice of input data, where the slice is a first slice of two slices obtained by a data provider performing secret slice operation on the input data; A segmentation module, used for segmenting the original calculation function used for processing the input data by intervals, obtaining a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, obtaining a Fourier series expression of the nonlinear function, and the value range of the original calculation function has a boundary; A first acquisition module is configured to obtain a first characterization vector of the first shard based on the Fourier series expression, send a first ciphertext obtained by homomorphically encrypting the first characterization vector to a second computing service provider in secure multi-party computing, obtain a blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard of the two shards, decrypt the blinded ciphertext, and obtain a result shard of the first shard corresponding to the nonlinear function; The second acquisition module is used to obtain a first result slice according to the result slice of the nonlinear function corresponding to the first slice and the result slice of the linear function corresponding to the first slice; the first result slice is used to generate a calculation result corresponding to the input data with the second result slice obtained by the second computing service provider; wherein the second result slice is obtained by the second computing service provider by combining the result slice of the nonlinear function corresponding to the second slice and the result slice of the linear function corresponding to the second slice.

16. The device according to claim 15, characterized in that The Fourier series expression is a superposition of multiple expanded terms, each expanded term is the inner product of a first vector factor and a second vector factor; the first acquisition module is used to input the first slice into the first vector factor in each expanded term to obtain a first characterization vector of the first slice.

17. The device according to claim 15, characterized in that The first acquisition module is used to perform floating point encoding on each component in the first representation vector to obtain a first encoding vector; and perform homomorphic encryption on each component in the first encoding vector to obtain a first ciphertext.

18. The device according to claim 15, characterized in that The first acquisition module is used to obtain a second characterization vector of the second slice based on the Fourier series expression, perform floating point encoding on each component in the second characterization vector to obtain a second encoding vector; perform homomorphic multiplication on the first ciphertext and the second encoding vector to obtain a second ciphertext; and blind the second ciphertext based on a random number to obtain a blinded ciphertext.

19. The device according to claim 18, characterized in that The first acquisition module is used to obtain an upper limit value of the variance of the error corresponding to the second ciphertext; determine a first random value that obeys a uniform distribution according to the upper limit value of the variance, and the first random value is used to blind the noise part in the second ciphertext; obtain a second random value, and the second random value is used to blind the plaintext part in the second ciphertext; The first random value and the second random value are combined to obtain the random number.

20. The device according to claim 15, characterized in that The second acquisition module is used to call a security comparison operator based on the first shard and the lower bound value in the symmetric interval, perform a security size comparison on the input data and the lower bound value, and obtain a comparison shard of the first shard corresponding to the first security size comparison; Based on the first shard and the upper bound value in the symmetric interval, calling a security comparison operator, performing a security size comparison between the input data and the upper bound value, and obtaining a comparison shard of the first shard corresponding to the second security size comparison; A first result slice is determined based on the result slice of the nonlinear function corresponding to the first slice, the result slice of the linear function corresponding to the first slice, the comparison slice of the first safe size comparison corresponding to the first slice, and the comparison slice of the second safe size comparison corresponding to the first slice.

21. The device according to claim 20, characterized in that The second acquisition module is used to acquire a slice of a random number, use the slice of the random number as a first input slice for the first multi-path selection, and obtain a second input slice for the first multi-path selection according to a result slice of the linear function corresponding to the first slice, a result slice of the nonlinear function corresponding to the first slice, and the first input slice; Perform a first multi-way selection according to the comparison slice for the first security size comparison corresponding to the first slice, the first input slice and the second input slice for the first multi-way selection, to obtain an output slice of the first multi-way selection corresponding to the first slice; According to the result slice of the linear function corresponding to the first slice and the first input slice for the first multi-way selection, the first input slice for the second multi-way selection is calculated; according to the result slice of the nonlinear function corresponding to the first slice and the first input slice for the first multi-way selection, the second input slice for the second multi-way selection is calculated; Perform a second multi-way selection according to the comparison slice for the second security size comparison corresponding to the first slice, the first input slice and the second input slice for the second multi-way selection, to obtain an output slice for the second multi-way selection corresponding to the first slice; A first result slice is obtained according to the output slice of the first multiplexing corresponding to the first slice and the output slice of the second multiplexing corresponding to the first slice.

22. The device according to claim 15, characterized in that The result slice of the second slice corresponding to the nonlinear function is determined according to the first random number used for blinding processing.

23. The device according to claim 15, characterized in that The second acquisition module is used to call a security comparison operator based on the second slice and the lower bound value in the symmetric interval, perform a security size comparison on the input data and the lower bound value, and obtain a comparison slice of the first security size comparison corresponding to the second slice; Based on the second shard and the upper bound value in the symmetric interval, calling a security comparison operator, performing a security size comparison between the input data and the upper bound value, and obtaining a comparison shard for a second security size comparison corresponding to the second shard; A second result slice is determined based on the result slice of the nonlinear function corresponding to the second slice, the result slice of the linear function corresponding to the second slice, the comparison slice of the first safe size comparison corresponding to the second slice, and the comparison slice of the second safe size comparison corresponding to the second slice.

24. The device according to claim 23, characterized in that The second acquisition module is used to acquire a slice of a second random number, use the slice of the second random number as a first input slice for the first multi-path selection, and obtain a second input slice for the first multi-path selection according to a result slice of the linear function corresponding to the second slice, the first input slice, and the result slice of the nonlinear function corresponding to the second slice; Perform a first multi-way selection according to the comparison slice of the first security size comparison corresponding to the second slice, the first input slice and the second input slice for the first multi-way selection, to obtain an output slice of the first multi-way selection corresponding to the second slice; The first input slice for the second multi-way selection is calculated based on the result slice of the linear function corresponding to the second slice and the first input slice for the first multi-way selection; the second input slice for the second multi-way selection is calculated based on the result slice of the nonlinear function corresponding to the second slice and the first input slice for the first multi-way selection; Perform a second multi-way selection according to the comparison slice of the second security size comparison corresponding to the second slice, the first input slice and the second input slice for the second multi-way selection, to obtain an output slice of the second multi-way selection corresponding to the second slice; A second result slice is obtained according to the output slice of the first multiplexing corresponding to the second slice and the output slice of the second multiplexing corresponding to the second slice.

25. The device according to claim 15, characterized in that The device also includes a sending module, which is used to send the first result slice to the data provider of the input data, so that the data provider can superimpose the first result slice with the second result slice sent by the second computing service provider and then decode it to obtain the computing result corresponding to the input data.

26. The device according to claim 25, characterized in that When the data provider determines that the input data is in the symmetric interval, the sending module is used to send the result slice of the first slice corresponding to the nonlinear function to the data provider of the input data, so that the data provider superimposes the result slice of the first slice corresponding to the nonlinear function with the result slice of the second slice corresponding to the nonlinear function sent by the second computing service provider to obtain the calculation result corresponding to the input data.

27. A data processing device, characterized in that: The device comprises: A sharding module, configured to secretly shard the input data to obtain a first shard and a second shard, and send the first shard and the second shard to a first computing service provider and a second computing service provider in a secure multi-party computing, respectively; Among them, after obtaining the first shard, the first computing service provider segments the original computing function used to process the input data according to intervals, obtains a nonlinear function in a symmetric interval and a linear function in an asymmetric interval, obtains a Fourier series expression of the nonlinear function, the value range of the original computing function has a boundary, and obtains a first characterization vector of the first shard based on the Fourier series expression, sends a first ciphertext obtained by homomorphically encrypting the first characterization vector to the second computing service provider in the secure multi-party computation, obtains a blinded ciphertext returned by the second computing service provider according to the first ciphertext and the second shard, decrypts the blinded ciphertext, obtains a result shard of the nonlinear function corresponding to the first shard, and obtains a first result shard according to the result shard of the nonlinear function corresponding to the first shard and the result shard of the linear function corresponding to the first shard; the second computing service provider obtains a second result shard by combining the result shard of the nonlinear function corresponding to the second shard and the result shard of the linear function corresponding to the second shard; A generation module is used to obtain a first result slice returned by the first computing service provider and a second result slice returned by the second computing service provider, and generate a computing result corresponding to the input data according to the first result slice and the second result slice.

28. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.

29. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.

30. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.

Citation Information

Patent Citations

  • Secure multi-party computing method and device for trigonometric function

    CN114462092A

  • Privacy protection nonlinear federated support vector machine training method and system based on homomorphic encryption

    CN115392487A

  • Multiplication Operations on Homomorphic Encrypted Data

    US20180375639A1

  • Deep learning system for performing private inference and operating method thereof

    US20230368019A1

  • Inner products with secure multi-party computations

    WO2023161508A1