CN112000990B - Data processing method, device and equipment for privacy protection and machine learning system - Google Patents

Data processing method, device and equipment for privacy protection and machine learning system Download PDF

Info

Publication number
CN112000990B
CN112000990B CN202011164969.4A CN202011164969A CN112000990B CN 112000990 B CN112000990 B CN 112000990B CN 202011164969 A CN202011164969 A CN 202011164969A CN 112000990 B CN112000990 B CN 112000990B
Authority
CN
China
Prior art keywords
party
activation function
participant
fragment
operation part
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011164969.4A
Other languages
Chinese (zh)
Other versions
CN112000990A (en
Inventor
陈超超
周俊
王力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202011164969.4A priority Critical patent/CN112000990B/en
Publication of CN112000990A publication Critical patent/CN112000990A/en
Application granted granted Critical
Publication of CN112000990B publication Critical patent/CN112000990B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Telephonic Communication Services (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The specification provides a data processing method, a data processing device, equipment and a machine learning system for privacy protection. In one method embodiment, when a data processing result of a nonlinear activation function used in a machine learning algorithm needs to be obtained in a multi-party participated data sharing application scene, a lossless expression of the nonlinear activation function can be used, and each subentry is calculated by utilizing multi-party safe calculation in a coordinated manner, so that the subentry can be prevented from being expanded into an approximate evaluation algorithm of a polynomial, the calculation complexity is reduced, and the efficiency of calculating the nonlinear activation function data by computer equipment is improved. Furthermore, the complexity and precision loss of approximate calculation of the nonlinear activation function such as Taylor expansion can be greatly reduced.

Description

Data processing method, device and equipment for privacy protection and machine learning system
Technical Field
The embodiment of the specification belongs to the technical field of privacy protection of cryptography, and particularly relates to a data processing method, a data processing device, data processing equipment and a machine learning system for privacy protection.
Background
The machine learning model may include an activation function. The activation function in some machine learning models is a transcendental function (e.g., Sigmoid function) that involves operations that typically include non-linear operations such as exponential operations, trigonometric function operations, and the like. When a computer processes the nonlinear activation function data, a taylor expansion calculation method is usually used for processing, the calculation data is exponential, and the calculation process is relatively complex.
In the current data sharing application scenario of multi-party participation, a plurality of parties are often required to cooperate together to establish or use a machine learning model together. When the private data of multiple participants need to use the operation result of the machine learning model, the multiple participants are usually required to participate in computation and interaction together, and each participant is ensured to output a private output result which is invisible to other participants. Data is a very important asset to the private data owner. The participants want to use the private data of each other together to obtain the operation result of the machine learning model, but do not want to provide the private data of each other to other participants so as to prevent the private data of the participants from being leaked.
Disclosure of Invention
The present specification aims to provide a data processing method, an apparatus, a device and a machine learning system for privacy protection, which can efficiently, safely and losslessly obtain a processing result of a nonlinear activation function operation in a machine learning algorithm on the basis of protecting respective data privacy in multiple ways.
The data processing method, the device, the equipment and the machine learning system for privacy protection provided by the embodiment of the specification are at least realized in the following modes:
a privacy-preserving data processing method, comprising:
determining a lossless expression of a nonlinear activation function used in a machine learning algorithm, the lossless expression comprising a first operational portion and a second operational portion of the nonlinear activation function;
a first participant and a second participant cooperatively calculate the first operation part based on multi-party security calculation, wherein the first participant obtains a first fragment of the first operation part, and the second participant obtains a second fragment of the first operation part;
the first participant determines a first fragment of the second operation part based on the first fragment, the second participant determines a second fragment of the second operation part based on the second fragment, and the first participant and the second participant perform multi-party safe calculation based on the first fragment of the second operation part and the second fragment of the second operation part to obtain an operation result of the second operation part;
the first participant performs the operation of the nonlinear activation function on the first fragment of the first operation part and the operation result of the second operation part to obtain a first result fragment of the operation result of the nonlinear activation function, and the second participant performs the operation of the nonlinear activation function on the second fragment of the first operation part and the operation result of the second operation part to obtain a second result fragment of the operation result of the nonlinear activation function.
A privacy-preserving data processing method, comprising:
a first participant calculates a first operation part of a lossless expression through cooperation with multi-party safety calculation of the rest participants to obtain a first segment of the first operation part, wherein the lossless expression comprises a lossless expression of a nonlinear activation function used in a multi-party participating machine learning algorithm;
the first participant determines a first slice of a second operational portion of the nonlinear activation function based on the first slice;
and the first participant performs operation of the nonlinear activation function on the first segment of the first operation part and the operation result of the second operation part to obtain a first result segment of the operation result of the nonlinear activation function, and the operation result of the second operation part is obtained by performing multi-party safety calculation recovery on the basis of the first segment of the second operation part and the remaining segments of the second operation part owned by the remaining participants.
A privacy-preserving data processing apparatus comprising:
the first operation module is used for cooperatively calculating a first operation part of a lossless expression through multiparty security calculation of the rest participants to obtain a first segment of the first operation part, wherein the lossless expression comprises a lossless expression of a nonlinear activation function used in a multiparty machine learning algorithm;
the second operation module is used for determining a first fragment of a second operation part of the nonlinear activation function based on the first fragment, and the first participant performs multi-party safe calculation based on the first fragment of the second operation part and the remaining fragments of the second operation part owned by the remaining participants to obtain an operation result of the second operation part;
and the result fragment calculation module is used for performing operation of the nonlinear activation function on the operation result of the first fragment and the second operation part to obtain a first result fragment of the operation result of the nonlinear activation function, and the operation result of the second operation part is obtained by performing multi-party safety calculation recovery on the basis of the first fragment of the second operation part and the remaining fragments of the second operation part owned by the remaining participants.
A privacy-preserving terminal device comprising: at least one processor and a memory for storing processor-executable instructions, which when executed by the processor perform the steps of any one of the method embodiments described herein.
A machine learning algorithm of the machine learning system comprises a nonlinear activation function, the nonlinear activation function obtains a result through multi-party security calculation of at least two parties, and a processor of any one of the at least two parties realizes the terminal device according to any one embodiment of the specification when executing executable instructions stored in a memory.
According to the data processing method, device, equipment and machine learning system for privacy protection, when a data processing result of a nonlinear activation function used in a machine learning algorithm needs to be obtained in a multi-party participatory data sharing application scene, original or properly changed lossless expressions of the nonlinear activation function can be used, and various sub-items are cooperatively calculated by utilizing multi-party safe calculation, so that the sub-items can be prevented from being expanded into a polynomial approximate evaluation algorithm, the calculation complexity is reduced, and the efficiency of calculating nonlinear activation function data by computer equipment is improved. In addition, compared with the polynomial calculation of taylor expansion, for example, each participant in the embodiment can calculate the result fragment of the operation result of the nonlinear activation function in a simpler manner, thereby greatly reducing the complexity and precision loss of approximate calculation of the nonlinear activation function such as taylor expansion. The method in the embodiment of the specification can realize efficient and lossless acquisition of one result fragment of the operation result of the nonlinear activation function of each participant based on privacy protection in data processing of multi-party participation. Furthermore, the method can efficiently and nondestructively acquire the operation result of the nonlinear activation function based on privacy protection, can improve the calculation speed of a computer and the precision of an output result, and can also integrally improve the data processing efficiency of machine learning based on privacy protection.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a schematic flow chart diagram of an embodiment of a privacy preserving data processing method provided herein;
FIG. 2 is a schematic flow chart diagram of another embodiment of a data processing method that may be applied to privacy protection on the single participant side provided by the present specification;
FIG. 3 is a block diagram of a hardware architecture of a server device of a participant to which an embodiment of a privacy-preserving data processing method of the present invention is applied;
fig. 4 is a schematic block diagram of an embodiment of a data processing apparatus for privacy protection provided in this specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
As mentioned above, in the current data sharing application scenario involving multiple parties, shared data is usually provided by multiple parties, and the data is kept locally without aggregation of plaintext. In some machine learning data sharing application scenarios, a variety of activation functions, such as Sigmoid function, tanh function, etc., are required to be used in many machine learning algorithms, such as logistic regression, neural network, etc. For example in neural networks, to avoid simplificationsThe linear combination of (3) may add a non-linear activation function after the output of each layer. The nonlinear activation function may include an activation function with a nonlinear relationship between input and output, such as a Sigmoid function, a tanh function, and the like. In a computing network, the activation function of a node defines the output of the node at a given input or set of inputs. The processing of the conventional nonlinear activation function (such as Sigmoid function) in a computer is complex, and the approximation value is usually obtained by a polynomial fitting method, so that the efficiency is low. And the hardware of the computer logic circuit is limited (such as root finding by using Newton iteration method), and the high power calculation of the polynomial (such as
Figure 539967DEST_PATH_IMAGE001
Figure 780455DEST_PATH_IMAGE002
Etc.) may result in a large loss of accuracy in the calculation results. A method of approximately computing a Sigmoid function by taylor expansion such as shown below:
Figure 419509DEST_PATH_IMAGE003
the more terms the taylor expands, the higher the power of the argument, and the more significant the efficiency of the computer processing decreases. Conversely, if the number of terms of taylor expansion is small, the greater the accuracy loss, and the accuracy of the calculation result of the activation function deteriorates. In contrast, the present specification provides another more efficient data processing method for privacy protection, which can efficiently, safely and accurately obtain a processing result using a nonlinear activation function in a data sharing application scenario involving multiple parties, thereby improving the data processing efficiency of machine learning of a computer under privacy protection.
Privacy protection may be implemented in some embodiments of the present description in conjunction with secret sharing. Secret sharing is an important means for solving privacy leakage and realizing privacy protection in cryptography-based Multi-party security computing (MPC). Secret sharing currently commonly used secret sharing schemes include the threshold secret sharing concept proposed by Shamir and Blakley, the basic idea being to divide the shared secret s into multiple shards (shares) that are respectively handed to different parties for storage. Secrets can only be recovered if more than a threshold number of participants merge their shares. For example, it suffices that only a certain number or more of server federation can reconstruct the shared secret, and any server less than the certain data cannot obtain any information of the secret.
Secret sharing may be used in privacy protected multiparty security computing. In specific application, input data of each participant is respectively used as shards (shares) of data to be processed in joint calculation. Sharding local to a participant is its private data, which is generally unknown to other participants. In general multi-party security computation, each participant possesses respective private data, and can compute a result about a public function (such as a Sigmoid function) without leaking the respective private data. When the entire computation is completed, generally, only the computation result is known to the participant, and the participant usually does not know the data of other participants and the intermediate data of the computation process. The result after the computation is finished can still be dispersed in a secret sharing manner among all the participants. When the operation results of all the fragments are needed, the data of all the participants can be combined together to restore the real original data. Of course, the shards obtained by each participant in the secret sharing are typically not the same. Of course, the embodiments of this specification do not exclude other ways of multi-party security computation after the improvement or modification, transformation based on the multi-party security computation described above can be applied.
A specific implementation scenario of calculating the result of Sigmoid function based on two parties under privacy protection will be described below. Specifically, fig. 1 is a schematic flowchart of an embodiment of a data processing method for privacy protection provided in this specification. Although the present specification provides method operational steps or devices, system configurations, etc., as illustrated in the following examples or figures, more or less operational steps or modular units may be included in the methods or devices, as may be conventional or may be part of the inventive subject matter, based on conventional or non-inventive considerations. In the case of steps or structures which do not logically have the necessary cause and effect relationship, the execution sequence of the steps or the module structure of the apparatus is not limited to the execution sequence or structure shown in the embodiment or the drawings in this specification. When the apparatus, server, system or end product of the method or system architecture is applied in an actual device, server, system or end product, the method or module architecture according to the embodiment or the drawings may be executed sequentially or executed in parallel (for example, in an environment of parallel processors or multi-thread processing, or even in an environment of distributed processing, server clustering, or implementation in combination with cloud computing or block chain technology).
Of course, the following description of the embodiments does not limit other scalable solutions obtained based on the embodiments of the present disclosure. If the number of the participants can be three or more, the nonlinear activation function can also be other activation functions, such as tanh function, and the lossless expression is also limited to the expression provided by the embodiment of the present specification or the expression of the variation or the modification thereof. In the application scenario of the present embodiment, two parties a and B are assumed. Wherein the first participant A owns the first slice
Figure 36436DEST_PATH_IMAGE004
The second participant B has a second slice
Figure 185657DEST_PATH_IMAGE005
. Party A and B protect their respective private data
Figure 597047DEST_PATH_IMAGE004
And
Figure 707085DEST_PATH_IMAGE005
on the basis of (1) calculating
Figure 127702DEST_PATH_IMAGE006
The output result may be that parties A and B respectively possess
Figure 131431DEST_PATH_IMAGE006
A portion of the results is calculated. In particular, the method comprises the following steps of,one embodiment of the method provided in this specification is shown in fig. 1, and may include:
s0: determining a lossless expression of a nonlinear activation function used in a machine learning algorithm, the lossless expression comprising a first operational portion and a second operational portion of the nonlinear activation function;
s2: a first participant and a second participant cooperatively calculate the first operation part based on multi-party security calculation, wherein the first participant obtains a first fragment of the first operation part, and the second participant obtains a second fragment of the first operation part;
s4: the first participant determines a first fragment of the second operation part based on the first fragment, the second participant determines a second fragment of the second operation part based on the second fragment, and the first participant and the second participant perform multi-party safe calculation based on the first fragment of the second operation part and the second fragment of the second operation part to obtain an operation result of the second operation part;
s6: the first participant performs the operation of the nonlinear activation function on the first fragment of the first operation part and the operation result of the second operation part to obtain a first result fragment of the operation result of the nonlinear activation function, and the second participant performs the operation of the nonlinear activation function on the second fragment of the first operation part and the operation result of the second operation part to obtain a second result fragment of the operation result of the nonlinear activation function.
It should be noted that the execution sequence of S2 and S4 is not limited to executing S4 after executing S2. In some embodiments, S4 may be performed first, and then S2 (shown by the dashed line in fig. 1) may be performed, or S2 and S4 may be performed simultaneously or part of the data processing process may be performed simultaneously (shown by the dashed line in fig. 1). The order in which some implementations perform the steps may be determined based on the sequential logical relationship of the data processing actions.
The lossless expression includes a first operation portion and a second operation portion that perform a nonlinear activation function operation. The operation of the nonlinear activation function may typically include four arithmetic operations. Such asThe lossless expression may be a division, the first operation portion may be a numerator portion and the second operation portion may be a denominator portion. If the lossless expression is an addition, the first operation portion may be an addend (or referred to as a first addend) and the second portion may be an addend (or referred to as a second addend). Of course, the operations may also be correspondingly transformed into each other, e.g. a division operation may be transformed into a product of a dividend and an inverse divisor, i.e. a division operation may be transformed into a product of a dividend and an inverse divisor
Figure 900672DEST_PATH_IMAGE007
Is converted into
Figure 560324DEST_PATH_IMAGE008
Generally, a nonlinear activation function has a corresponding expression (analytic expression). In some embodiments of the present description, the nonlinear activation function may include a nonlinear activation function that can be expressed using a taylor expansion. Some embodiments of the present invention can convert the nonlinear activation function into a Taylor-expanded polynomial expression when the actual computer performs the calculation. The method described in this specification can use another calculation processing mode for the nonlinear activation function that can be expressed by using the taylor expansion, and can determine the lossless expression of the nonlinear activation function based on the original expression, and then calculate each operation part of the operation in the lossless expression based on the multi-party secure calculation. The lossless expression may generally include a functional expression of the original nonlinear activation function, for example, the lossless expression of Sigmoid function may be
Figure 581369DEST_PATH_IMAGE009
The lossless expression of the tanh function is also
Figure 642866DEST_PATH_IMAGE010
And the like. A nonlinear activation function is not limited to a lossless expression, and can also correspond to a plurality of lossless expressions. Through the calculation, each participant can obtain one result fragment of the operation result of the nonlinear activation function, and further privacy protection based,The method has the advantages that the operation result of the nonlinear activation function is efficiently and losslessly obtained, the calculation speed of a computer and the precision of an output result can be improved, and meanwhile, the data processing efficiency of machine learning based on privacy protection can be integrally improved. The lossless method described in the embodiments of the present specification can be understood as that the calculation result of the nonlinear activation function obtained by the calculation using the scheme of the present embodiment has a significantly reduced precision loss or a negligible precision loss compared to the taylor expansion calculation method.
In some implementation scenarios, some lossless expressions of the nonlinear activation function may contain only terms with arguments, no constant terms. While the lossless expressions in some implementation scenarios may contain constant terms. An expression such as Sigmoid may be expressed as:
Figure 599321DEST_PATH_IMAGE011
in the above formula, the first and second carbon atoms are,
Figure 480689DEST_PATH_IMAGE012
is a term with an independent variable, 1 in the numerator or denominator: (
Figure 305426DEST_PATH_IMAGE013
) 1 in the above is a constant term (the value of the constant term is 1) described in this embodiment. In the privacy-preserving multiparty secure computing embodiments provided by the present specification, constant terms in the lossless expression may be similarly privacy-preserved. In a specific implementation, a constant term may be transformed into a non-fixed value parameter, and may be used for a variable to represent the constant term, but the participators may not know the specific value of the variable. Thus, in another embodiment of the method provided herein, if the lossless expression contains a constant term, the constant term is transformed into a non-fixed value parameter;
correspondingly, the items containing the independent variables in the lossless expression are transformed correspondingly according to the transformation mode of transforming the constant items to the non-fixed value parameters, and the transformed lossless expression of the nonlinear activation function is determined.
For example, the constant term 1 in the above-mentioned Sigmoid expression is transformed into
Figure 221429DEST_PATH_IMAGE014
Then it is equivalent to the molecule being enlarged
Figure 99518DEST_PATH_IMAGE014
And (4) doubling. Then, the terms of the argument are protected
Figure 733761DEST_PATH_IMAGE012
Can also be enlarged
Figure 96610DEST_PATH_IMAGE014
And (4) doubling. Then, when the Sigmoid function contains constant term 1, its expression can be represented by
Figure 867119DEST_PATH_IMAGE015
Is converted into
Figure 165377DEST_PATH_IMAGE016
. Of course, the above conversion process may also include other intermediate conversion processes, such as
Figure 21337DEST_PATH_IMAGE012
Is converted into
Figure 187876DEST_PATH_IMAGE017
In the actual multiparty security computing process based on privacy protection, because the constant term is converted, each participant usually does not know the corresponding non-fixed value parameter after the constant term is converted
Figure 78472DEST_PATH_IMAGE014
Because each participant stores a constant term equivalent to the non-fixed value parameter
Figure 796898DEST_PATH_IMAGE014
One of the sliced data of (1). Thus, eachThe non-fixed value parameter can be obtained by the participators through multi-party security calculation based on privacy protection
Figure 936893DEST_PATH_IMAGE014
The operation result of (1). In a specific embodiment provided by this specification, the transformation manner may include:
transforming the constant term to a non-zero real number
Figure 579226DEST_PATH_IMAGE014
And taking a first random number acquired by a first participant as a first fragment of the non-fixed value parameter, and taking a second random number acquired by a second participant as a second fragment of the non-fixed value parameter.
The method described in the above embodiment can be applied to a nonlinear activation function used in various machine learning models (algorithms). Especially for Sigmoid functions, compared with the conventional approximate calculation method adopting a taylor expansion, the embodiment of the specification creatively combines privacy protection, multi-party safe calculation and a lossless expression using functions, can calculate the function operation result more efficiently, and simultaneously realizes privacy protection. In addition, because a lossless expression of the nonlinear activation function is used, the precision loss can be greatly reduced, and the calculation precision of the Sigmoid function operation result under privacy protection is improved.
In the data sharing application scenario where two parties participate, the embodiments of the present specification are further described below with a Sigmoid function as a nonlinear activation function used by a machine learning model. The specific treatment process may include:
s00: the nonlinear activation function comprises
Figure 262012DEST_PATH_IMAGE018
The function, its lossless expression can be expressed as:
Figure 964388DEST_PATH_IMAGE011
in this embodiment, the above formula is transformed, and the obtained lossless expression may be:
Figure 857258DEST_PATH_IMAGE019
then correspondingly, have the first fragment
Figure 303283DEST_PATH_IMAGE004
May generate a random number
Figure 856886DEST_PATH_IMAGE020
Having a second section
Figure 730164DEST_PATH_IMAGE005
The second party B generates a random number
Figure 844751DEST_PATH_IMAGE021
Wherein, in the step (A),
Figure 94467DEST_PATH_IMAGE022
Figure 751844DEST_PATH_IMAGE023
s02: the first participant A and the second participant B cooperatively calculate a first operation part based on the multi-party security calculation MPC
Figure 796023DEST_PATH_IMAGE024
The first party A gets
Figure 397906DEST_PATH_IMAGE024
First segment of<
Figure 107105DEST_PATH_IMAGE024
>1, the second party B gets
Figure 681306DEST_PATH_IMAGE024
To (1) aTwo-part tablet<
Figure 958703DEST_PATH_IMAGE024
>2。
In the transformed lossless expression,
Figure 251144DEST_PATH_IMAGE025
the first party A owns
Figure 514767DEST_PATH_IMAGE020
Figure 209053DEST_PATH_IMAGE004
And can be calculated locally
Figure 657352DEST_PATH_IMAGE026
. Second party A owns
Figure 171510DEST_PATH_IMAGE021
Figure 977837DEST_PATH_IMAGE005
And can be calculated locally
Figure 526630DEST_PATH_IMAGE027
. For the
Figure 145830DEST_PATH_IMAGE028
The first party A can be calculated locally
Figure 147284DEST_PATH_IMAGE029
And then cooperatively calculate with the second party B by using a secure calculation method (such as secret sharing)
Figure 18288DEST_PATH_IMAGE028
. The result is that the first party a and the second party B respectively possess
Figure 421588DEST_PATH_IMAGE028
Calculation resultsA part of (a). E.g. first party a owns
Figure 211689DEST_PATH_IMAGE028
One piece of the calculation result<
Figure 700439DEST_PATH_IMAGE028
>1, the second party B owns
Figure 624402DEST_PATH_IMAGE028
One piece of the calculation result<
Figure 882208DEST_PATH_IMAGE028
>2. The multi-party safe computing cooperative computing mainly solves the cooperative computing problem of protecting privacy among a group of mutually untrusted participants in the field of cryptology research, can provide multi-party cooperative computing capability on the premise of not revealing original data for a data demand party, and provides results after data computing of all parties for the demand party.
Similarly, for
Figure 843211DEST_PATH_IMAGE030
The second party B may first calculate itself locally
Figure 491361DEST_PATH_IMAGE031
And then cooperatively computing with the first party A by using a secure computing technology (such as secret sharing)
Figure 766484DEST_PATH_IMAGE030
. Similarly, after the calculation is completed, the first party A and the second party B respectively possess
Figure 941114DEST_PATH_IMAGE030
A portion of the results is calculated. E.g. first party a owns
Figure 276280DEST_PATH_IMAGE030
One piece of the calculation result<
Figure 162459DEST_PATH_IMAGE030
>1, the first party B owns
Figure 241273DEST_PATH_IMAGE030
One piece of the calculation result<
Figure 270409DEST_PATH_IMAGE030
>2。
At this point, the first party A owns<
Figure 776477DEST_PATH_IMAGE028
>1 and<
Figure 399219DEST_PATH_IMAGE030
>1, the second party B owns<
Figure 16145DEST_PATH_IMAGE028
>2 and<
Figure 165367DEST_PATH_IMAGE030
>2. further, the first party a may be to<
Figure 842336DEST_PATH_IMAGE028
>1 and<
Figure 201642DEST_PATH_IMAGE030
>1 are added and summed, this sum being
Figure 622259DEST_PATH_IMAGE024
A slicing result of (1), is recorded as<
Figure 625987DEST_PATH_IMAGE024
>1. Likewise, the second party B will<
Figure 473857DEST_PATH_IMAGE028
>2 and<
Figure 71192DEST_PATH_IMAGE030
>2 are added and summed, this sumIs composed of
Figure 29921DEST_PATH_IMAGE024
Is marked as another slicing result<
Figure 153734DEST_PATH_IMAGE024
>2。
S04: the first participant is based on a first slice of the first operational portion<
Figure 906927DEST_PATH_IMAGE024
>1 determining a first slice of the second arithmetic portion<
Figure 742290DEST_PATH_IMAGE032
>1, the second party being based on the first slice of the first arithmetic part<
Figure 504709DEST_PATH_IMAGE024
>2 second slice determining a second slice of the second arithmetic part<
Figure 483030DEST_PATH_IMAGE032
>2, the first party and the second party perform multi-party safe calculation based on the first fragment of the second operation part and the second fragment of the second operation part to obtain the operation result of the second operation part
Figure 344807DEST_PATH_IMAGE033
The first party a gets
Figure 713471DEST_PATH_IMAGE033
First segment of<
Figure 76319DEST_PATH_IMAGE032
>1, the second party B gets
Figure 112408DEST_PATH_IMAGE033
Second section of<
Figure 659933DEST_PATH_IMAGE032
>2. The first participant A and the second participant B are recovered through MPC cooperative computing based on multi-party security computing
Figure 515894DEST_PATH_IMAGE033
The operation result of (1). When the operation result of the second operation part is calculated, data transmission and interaction are required, and multi-party safe calculation can still be used.
First and second parties A and B use multiparty secure computing for collaborative computing
Figure 682433DEST_PATH_IMAGE033
. The first party A owns
Figure 573029DEST_PATH_IMAGE024
A slice of<
Figure 42187DEST_PATH_IMAGE024
>1 and
Figure 385444DEST_PATH_IMAGE014
can be calculated to obtain<
Figure 90095DEST_PATH_IMAGE024
>1+
Figure 835197DEST_PATH_IMAGE014
1. The first party being to compute locally<
Figure 225989DEST_PATH_IMAGE024
>1+
Figure 56542DEST_PATH_IMAGE014
1 as
Figure 564883DEST_PATH_IMAGE033
One piece of the calculation result<
Figure 164492DEST_PATH_IMAGE032
>1. Likewise, the second party B can calculate<
Figure 975453DEST_PATH_IMAGE024
>2+
Figure 293302DEST_PATH_IMAGE014
2, obtaining
Figure 605335DEST_PATH_IMAGE033
To another slice
Figure 980821DEST_PATH_IMAGE034
2. The first party A and the second party B are obtained by using the multi-party security computing collaborative computing recovery
Figure 25001DEST_PATH_IMAGE033
The operation result of (1).
First party A and second party B want to recover
Figure 892463DEST_PATH_IMAGE033
The first party A may be<
Figure 680290DEST_PATH_IMAGE032
>1 to the second party B. And the second party B may also be going to<
Figure 192174DEST_PATH_IMAGE032
>2 to the second party a. And then each participant is locally added and summed respectively. Of course, it may be that one of the participants needs to be recovered
Figure 407255DEST_PATH_IMAGE033
The result of the operation of, e.g. the first party A needs
Figure 762013DEST_PATH_IMAGE033
As a result of the operations of (1), the slices can be divided<
Figure 87952DEST_PATH_IMAGE032
>1 slicing with a received second participant<
Figure 205074DEST_PATH_IMAGE032
>2 are added to obtain
Figure 856636DEST_PATH_IMAGE033
The operation result of (1).
S06: first Party A computation
Figure 433111DEST_PATH_IMAGE035
As a
Figure 562741DEST_PATH_IMAGE006
Part of the result (which may be referred to as the first result fragment) may be retained locally by the first participant a itself; likewise, the second party B calculates
Figure 49217DEST_PATH_IMAGE036
As a final
Figure 606100DEST_PATH_IMAGE006
Another part of the result, which may be referred to as a second result slice, may be kept locally by the second participant B itself.
And calculating
Figure 669871DEST_PATH_IMAGE033
Similarly, a first party A and a second party B want to recover
Figure 603192DEST_PATH_IMAGE037
The first party A may segment the first result into segments
Figure 193442DEST_PATH_IMAGE035
To the second party B, which may also fragment the second result
Figure 921227DEST_PATH_IMAGE038
To be transmitted toAnd a second participant A, and then locally adding and summing all the participants respectively. Of course, it may be that one of the participants needs to be recovered
Figure 472294DEST_PATH_IMAGE037
The result of the operation of, e.g. the first party A needs
Figure 943726DEST_PATH_IMAGE037
The first result may be sliced
Figure 139215DEST_PATH_IMAGE035
Second result slicing with a received second participant
Figure 303481DEST_PATH_IMAGE038
Add to obtain
Figure 341844DEST_PATH_IMAGE039
The operation result of (1).
Thus, by the method described in the above embodiment, when acquiring the Sigmoid data processing result, the multi-party secure computation cooperative computation may be used, another processing scheme different from the approximate evaluation algorithm that expands the Sigmoid data processing result into a polynomial may be provided, and the efficiency of processing data by using the Sigmoid function is improved. Moreover, compared with polynomial calculation such as taylor expansion, each participant in this embodiment can calculate the slicing result in a simpler manner, which reduces the complexity and accuracy loss of approximate calculation Sigmoid such as taylor expansion, and even there may be no accuracy loss (the accuracy loss may be negligible) of calculating Sigmoid. The method in the embodiment of the specification can realize efficient and lossless acquisition of a result fragment of a Sigmoid operation result of each participant based on privacy protection in data processing of multi-party participation. Furthermore, the method can realize efficient and lossless acquisition of Sigmoid operation results based on privacy protection, can improve the calculation speed of a computer and the precision of output results, and can also improve the data processing efficiency of machine learning based on privacy protection of terminal equipment by using a Sigmoid function.
Of course, in other embodiments of the present disclosure, the nonlinear activation function may be other functions. Such as tanh function, the lossless expression of which may be
Figure 351388DEST_PATH_IMAGE010
. In other embodiments, the lossless expression of the tanh function may also be a transformed or transformed lossless expression, such as:
Figure 417695DEST_PATH_IMAGE040
other specific implementation manners of the nonlinear activation function such as the tanh function can refer to the implementation manner of the sigmoid function, and specific implementation processes are not described in detail.
The above embodiments describe the processing procedure of two participants to obtain result fragmentation of Sigmoid operation result. In other implementations scenarios, the participants may not be limited to two, and there may be three, four, etc. multiple participants. Three, four, etc. multiple parties may also each obtain a result fragment based on the operation result of the non-linear activation function of privacy protection with reference to the foregoing two party embodiments. Therefore, based on the foregoing multiple method embodiments of participating in interactive processing, the present specification further provides another data processing method that can be applied to privacy protection on the side of a single participant, as shown in fig. 2, where the method may include:
s20: a first participant calculates a first operation part of a lossless expression through cooperation with multi-party safety calculation of the rest participants to obtain a first segment of the first operation part, wherein the lossless expression comprises a lossless expression of a nonlinear activation function used in a multi-party participating machine learning algorithm;
s22: the first participant determines a first slice of a second operational portion of the nonlinear activation function based on the first slice;
s24: and the first participant performs operation of the nonlinear activation function on the first segment of the first operation part and the operation result of the second operation part to obtain a first result segment of the operation result of the nonlinear activation function, and the operation result of the second operation part is obtained by performing multi-party safety calculation recovery on the basis of the first segment of the second operation part and the remaining segments of the second operation part owned by the remaining participants.
Similarly, as described with reference to the previous method embodiment, in another embodiment of the method, if the lossless expression contains a constant term, the constant term is transformed into a non-fixed value parameter;
and the items containing independent variables in the lossless expression are transformed into the non-fixed value parameters according to the constant items, corresponding transformation is executed, and the transformation lossless expression of the nonlinear activation function is determined.
Also, while described with reference to the foregoing method embodiment, in another embodiment of the method,
the transformation mode comprises the following steps:
transforming the constant term to a non-zero real number
Figure 487282DEST_PATH_IMAGE014
And taking a first random number acquired by a first participant as a first fragment of the non-fixed value parameter, and taking a second random number acquired by a second participant as a second fragment of the non-fixed value parameter.
Also, in another embodiment of the method, described with reference to the previous method embodiment, the nonlinear activation function comprises a nonlinear activation function that can be expressed using a taylor expansion.
As described above, the data processing method for privacy protection provided in this specification may be applied to an application scenario in which a Sigmoid function is used as a nonlinear activation function used in a machine learning model, and may utilize multi-party secure computation for collaborative computation when obtaining a Sigmoid data processing result, reduce precision loss in approximate evaluation by expanding the Sigmoid function into a polynomial, and improve efficiency of data processing by using the Sigmoid function. Thus, another of the methodsIn an embodiment, the non-linear activation function comprises
Figure 12942DEST_PATH_IMAGE018
A function, the lossless expression being:
Figure 826177DEST_PATH_IMAGE041
then, have the first fragment
Figure 996258DEST_PATH_IMAGE004
Generates a first random number
Figure 502326DEST_PATH_IMAGE020
Wherein the first segment
Figure 249702DEST_PATH_IMAGE004
The sum of the shards with the remaining participants is
Figure 866628DEST_PATH_IMAGE042
First random number
Figure 140484DEST_PATH_IMAGE020
The sum of the random numbers of the remaining participants is
Figure 817453DEST_PATH_IMAGE014
The first party calculates the first operation part by cooperating with the multi-party security calculation of the rest parties
Figure 52125DEST_PATH_IMAGE024
To obtain
Figure 207163DEST_PATH_IMAGE024
First segment of<
Figure 351836DEST_PATH_IMAGE024
>1;
First party passing multiple with remaining partiesSecond operation part for square safety calculation cooperation calculation
Figure 199706DEST_PATH_IMAGE033
To obtain
Figure 921675DEST_PATH_IMAGE033
First segment of<
Figure 880404DEST_PATH_IMAGE032
>1;
First party computing
Figure 364737DEST_PATH_IMAGE043
To obtain
Figure 383508DEST_PATH_IMAGE018
A first result slice of the operation result.
Each participant may have a corresponding shard
Figure 327194DEST_PATH_IMAGE044
And random number
Figure 27296DEST_PATH_IMAGE045
Figure 943300DEST_PATH_IMAGE046
Is shown as
Figure 929710DEST_PATH_IMAGE046
The number of the participating parties is increased,
Figure 563954DEST_PATH_IMAGE044
is shown as
Figure 51436DEST_PATH_IMAGE046
The shards that are owned by an individual participant,
Figure 353104DEST_PATH_IMAGE046
the value may be [1,2 … ]
Figure 244837DEST_PATH_IMAGE047
],
Figure 366377DEST_PATH_IMAGE047
Is the number of participants, wherein,
Figure 408282DEST_PATH_IMAGE048
Figure 33298DEST_PATH_IMAGE049
Figure 361512DEST_PATH_IMAGE046
a variety of representations may be included. For example
Figure 393184DEST_PATH_IMAGE046
Values can be taken as positive integers greater than 1,
Figure 301097DEST_PATH_IMAGE004
may represent a slice owned by the first participant,
Figure 108516DEST_PATH_IMAGE005
may represent a shard owned by a second party,
Figure 810893DEST_PATH_IMAGE050
shards owned by a third party may be represented, and so on. Alternatively A, B, C, etc. may be used to represent different parties, and so on
Figure 579129DEST_PATH_IMAGE051
May represent a slice owned by the first party a,
Figure 25153DEST_PATH_IMAGE052
the shards owned by the second participant B may be represented, and so on. Of course, other embodiments may include other identification methods. For convenience of description, use is made of
Figure 687079DEST_PATH_IMAGE046
The identities of the parties involved are represented uniformly,
Figure 560357DEST_PATH_IMAGE046
the specific value is representative of the different parties. Such as sharding of the first party a
Figure 65157DEST_PATH_IMAGE051
Show that
Figure 49293DEST_PATH_IMAGE004
Indicating that, correspondingly, the sharding of the second party B may be
Figure 831304DEST_PATH_IMAGE005
And so on. The participants may use a locally used pseudo-random number generator to generate random numbers.
Fragmentation may be used in this embodiment
Figure 875484DEST_PATH_IMAGE044
Is shown as
Figure 618312DEST_PATH_IMAGE046
Shards of individual participants, corresponding, random numbers
Figure 406139DEST_PATH_IMAGE045
Can represent the first
Figure 42657DEST_PATH_IMAGE046
Random number of each participant. It is assumed that the sum of the pieces of all participants is the data to be processed in this embodiment that needs to be calculated using Sigmoid, i.e. the
Figure 257738DEST_PATH_IMAGE053
. Then, the first party calculates the first operation part by cooperating with the multiparty security calculation of the remaining parties
Figure 984734DEST_PATH_IMAGE024
To obtain
Figure 576252DEST_PATH_IMAGE024
First segment of<
Figure 67276DEST_PATH_IMAGE024
>1; the first party calculates the second operation part by cooperating with the multi-party security calculation of the rest parties
Figure 453258DEST_PATH_IMAGE033
To obtain
Figure 170678DEST_PATH_IMAGE033
First segment of<
Figure 300308DEST_PATH_IMAGE032
>1; first party computing
Figure 645839DEST_PATH_IMAGE043
To obtain
Figure 468302DEST_PATH_IMAGE018
A first result slice of the operation result.
The above embodiments may be applied to privacy preserving Sigmoid computations of two or more participants. In the calculation process, a plurality of participants can participate in the calculation together, and in some embodiments, the calculation of a third party (such as an intermediate platform) can also be included. For example, the participants may be provided with respective private data
Figure 656706DEST_PATH_IMAGE044
And random number
Figure 590027DEST_PATH_IMAGE045
And sending the data to a semi-trusted third-party platform, and carrying out calculation and interaction by the third-party platform.
In the foregoing embodiment, for the single participant side, the single participant side can efficiently, safely and losslessly obtain the result fragmentation of the Sigmoid operation result on the basis of protecting the data privacy of the single participant side. For ease of description, the single participant-side embodiment may refer to the participant of the embodiment as a first participant and the remaining participants (e.g., a second participant, a third participant, etc.) with respect to other participants on the single participant side.
As described in the foregoing method implementation, in another embodiment, the first party calculates the first computation portion by cooperating with the MPC of the remaining parties for multi-party security computation
Figure 790065DEST_PATH_IMAGE024
To obtain
Figure 455532DEST_PATH_IMAGE024
First segment of<
Figure 944282DEST_PATH_IMAGE024
>1, can include:
the first party being based on local computing
Figure 478032DEST_PATH_IMAGE054
Collaborative computing with remaining participants based on multi-party security computing
Figure 735838DEST_PATH_IMAGE055
To obtain
Figure 588519DEST_PATH_IMAGE055
One piece of the calculation result<
Figure 564565DEST_PATH_IMAGE055
>1;
Figure 839688DEST_PATH_IMAGE046
Is shown as
Figure 14318DEST_PATH_IMAGE046
The number of the participating parties is increased,
Figure 21588DEST_PATH_IMAGE044
is shown as
Figure 484930DEST_PATH_IMAGE046
The shards that are owned by an individual participant,
Figure 360482DEST_PATH_IMAGE046
has a value of [1,2 …
Figure 592881DEST_PATH_IMAGE047
],
Figure 20320DEST_PATH_IMAGE047
As to the number of the participating parties,
Figure 970958DEST_PATH_IMAGE048
the first party can calculate the cooperative calculation based on the multi-party safety calculation according to the first party
Figure 650201DEST_PATH_IMAGE055
Further calculate
Figure 737106DEST_PATH_IMAGE056
Figure 351758DEST_PATH_IMAGE057
Etc. calculating
Figure 524113DEST_PATH_IMAGE058
Can obtain
Figure 741468DEST_PATH_IMAGE058
Corresponding remaining slice<
Figure 948459DEST_PATH_IMAGE056
>1、<
Figure 219165DEST_PATH_IMAGE057
>1, etc. Thus, a first participant acquires collaborative computing with a remaining participant through multi-party secure computing
Figure 878817DEST_PATH_IMAGE058
To obtainIs/are as follows
Figure 899862DEST_PATH_IMAGE058
Remaining fragmentation of computed results<
Figure 961359DEST_PATH_IMAGE058
>1,
Figure 917814DEST_PATH_IMAGE045
Is shown as
Figure 64761DEST_PATH_IMAGE046
The random number of the individual participating parties,
Figure 623919DEST_PATH_IMAGE049
the first party will<
Figure 539922DEST_PATH_IMAGE055
>1、<
Figure 916546DEST_PATH_IMAGE056
>1、…、<
Figure 550789DEST_PATH_IMAGE058
>1…、<
Figure 913638DEST_PATH_IMAGE059
>1 are added and summed to obtain
Figure 684148DEST_PATH_IMAGE024
First segment of<
Figure 982405DEST_PATH_IMAGE024
>1。
In the above embodiment, the first party a owns
Figure 103945DEST_PATH_IMAGE024
A slice of<
Figure 4905DEST_PATH_IMAGE024
>1 and
Figure 895500DEST_PATH_IMAGE014
can be calculated from the slice of (1)<
Figure 115391DEST_PATH_IMAGE024
>1+
Figure 458648DEST_PATH_IMAGE014
1, can be used as
Figure 428878DEST_PATH_IMAGE033
One piece of the calculation result<
Figure 173980DEST_PATH_IMAGE032
>1. Then can be used for computing cooperation with other participants based on multi-party security computing
Figure 814040DEST_PATH_IMAGE033
. Similarly, the remaining participants can be calculated in the manner of the first participant
Figure 644593DEST_PATH_IMAGE033
E.g. the second party B may calculate<
Figure 887355DEST_PATH_IMAGE024
>2+
Figure 752543DEST_PATH_IMAGE014
2, obtaining<
Figure 812772DEST_PATH_IMAGE032
>2. Thus, similarly, as described for the preceding method implementation, in another embodiment of the method, the first party computes the second computation portion in cooperation with the multi-party secure computation of the remaining parties
Figure 130621DEST_PATH_IMAGE033
The method comprises the following steps:
the first party being to compute locally<
Figure 177074DEST_PATH_IMAGE024
>1+
Figure 896768DEST_PATH_IMAGE014
1 as
Figure 878631DEST_PATH_IMAGE033
One piece of the calculation result<
Figure 683776DEST_PATH_IMAGE032
>1;
The first party obtaining local computations of the remaining parties by means of a multiparty security computation
Figure 533920DEST_PATH_IMAGE033
Is divided into remaining slices<
Figure 108121DEST_PATH_IMAGE032
>
Figure 746038DEST_PATH_IMAGE060
、<
Figure 38479DEST_PATH_IMAGE032
>
Figure 426735DEST_PATH_IMAGE061
、<
Figure 793125DEST_PATH_IMAGE032
>
Figure 179107DEST_PATH_IMAGE046
、<
Figure 21161DEST_PATH_IMAGE032
>
Figure 150791DEST_PATH_IMAGE047
The first party will<
Figure 699584DEST_PATH_IMAGE032
>1、<
Figure 708998DEST_PATH_IMAGE032
>2、<
Figure 710452DEST_PATH_IMAGE032
>
Figure 440510DEST_PATH_IMAGE061
、…、
Figure 515914DEST_PATH_IMAGE062
…、
Figure 509277DEST_PATH_IMAGE063
Add and sum to obtain
Figure 794765DEST_PATH_IMAGE033
The operation result of (1).
In the data processing method for privacy protection provided in the embodiments of the present specification, when a data processing result of a nonlinear activation function used in a machine learning algorithm needs to be obtained in a data sharing application scenario in which multiple parties participate, an original or appropriately changed lossless expression may be used, and multiple parties may be used to perform secure computation to cooperatively compute each subentry, so that the subentry may be prevented from being expanded into an approximate evaluation algorithm of a polynomial, computation complexity is reduced, and efficiency of computing nonlinear activation function data by a computer device is improved. In addition, compared with the polynomial calculation of taylor expansion, for example, each participant in the embodiment can calculate the result fragment of the operation result of the nonlinear activation function in a simpler manner, thereby greatly reducing the complexity and precision loss of approximate calculation of the nonlinear activation function such as taylor expansion. The method in the embodiment of the specification can realize efficient and lossless acquisition of one result fragment of the operation result of the nonlinear activation function of each participant based on privacy protection in data processing of multi-party participation. Furthermore, the method can efficiently and nondestructively acquire the operation result of the nonlinear activation function based on privacy protection, can improve the calculation speed of a computer and the precision of an output result, and can also integrally improve the data processing efficiency of machine learning based on privacy protection.
In the present specification, each embodiment of the method is described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. Reference is made to the description of the method embodiments.
It is understood that all or part of the steps of the method described in the above embodiments may be executed on a computing device of a certain participant or performed by computing and communication among multiple participants, may be executed by a server of a third party, or may be executed by a third server and one or more participants together (e.g., a platform used by the participants together).
The method embodiments provided in the embodiments of the present specification may be executed in a handheld terminal, a computer terminal, a server cluster, a mobile terminal, a blockchain node, a distributed network, or a similar computing device. The apparatus may include a system (including a distributed system), software (applications), modules, components, servers, clients, etc. that employ embodiments of the present description in conjunction with any necessary hardware for implementation. Taking a server running on a server as an example, fig. 3 is a hardware structure block diagram of a server device of a participant to which an embodiment of a data processing method for privacy protection according to the present invention is applied. As shown in fig. 3, the server 10 may include one or more (only one shown) processors 100 (the processors 100 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 200 for storing data, and a transmission module 300 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 3 is merely an illustration and is not intended to limit the structure of the electronic device. For example, the server 10 may also include more or fewer components than shown in FIG. 3, and may also include other processing hardware, such as an internal bus, memory, database or multi-level cache, a display, or have other configurations than shown in FIG. 3, for example.
The memory 200 may be used to store software programs and modules of application software, and the processor 100 executes various functional applications and data processing by operating the software programs and modules stored in the memory 200. Memory 200 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 200 may further include memory located remotely from processor 100, which may be connected to server 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission module 300 is used for receiving or transmitting data via a network. Examples of such networks may include a blockchain private network of the server 10 or a network provided by the world wide web or a communications provider. In one example, the transmission module 300 includes a Network adapter (NIC) that can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission module 300 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Based on the above description of the embodiments of the data processing method for privacy protection, the present specification further provides a data processing apparatus for privacy protection. The device can be used in a data sharing application scene with multi-party participation. The apparatus may include systems (including distributed systems), software (applications), modules, components, servers, clients, etc. that use the methods described in the embodiments of the present specification in conjunction with any necessary apparatus to implement the hardware. Based on the same innovative conception, embodiments of the present specification provide an apparatus as described in the following embodiments. Since the implementation scheme of the apparatus for solving the problem is similar to that of the method, the specific implementation of the apparatus in the embodiment of the present specification may refer to the implementation of the foregoing method, and repeated details are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Specifically, fig. 4 is a schematic block diagram of an embodiment of a data processing apparatus for privacy protection provided in this specification, and as shown in fig. 4, the apparatus may include:
a first operation module 40, configured to compute a first operation portion of a lossless expression in cooperation with multiparty security computation of remaining participants, to obtain a first segment of the first operation portion, where the lossless expression includes a lossless expression of a non-linear activation function used in a multiparty machine learning algorithm;
the second operation module 42 may determine a first fragment of a second operation portion of the nonlinear activation function based on the first fragment, and the first participant performs multi-party secure computation based on the first fragment of the second operation portion and remaining fragments of the second operation portion owned by remaining participants to obtain an operation result of the second operation portion;
the result fragment calculation module 44 may be configured to perform the operation of the nonlinear activation function on the operation result of the first fragment and the second operation portion to obtain a first result fragment of the operation result of the nonlinear activation function, where the operation result of the second operation portion is obtained by performing multi-party secure calculation recovery based on the first fragment of the second operation portion and remaining fragments of the second operation portion owned by remaining participants.
As also described above, the above device embodiment does not limit that the second operation module 42 is required to execute the related processing after the first operation module 40, and in other embodiments, the first operation module 40 and the second operation module 42 may be connected to the result slice calculation module 44 respectively, and transmit the result of their respective calculation outputs to the result slice calculation module 44 (as shown in the dotted line in fig. 4).
Based on the foregoing description of the method embodiment, in another embodiment of the apparatus, if the lossless expression contains a constant term, the constant term is transformed into a non-fixed value parameter;
and the items containing independent variables in the lossless expression are transformed into the non-fixed value parameters according to the constant items, corresponding transformation is executed, and the transformation lossless expression of the nonlinear activation function is determined.
Based on the foregoing description of the method embodiment, in another embodiment of the apparatus, the transformation manner includes:
transforming the constant term to a non-zero real number
Figure 531777DEST_PATH_IMAGE014
And taking a first random number acquired by a first participant as a first fragment of the non-fixed value parameter, and taking a second random number acquired by a second participant as a second fragment of the non-fixed value parameter.
Based on the description of the foregoing method embodiment, in another embodiment of the apparatus, the nonlinear activation function comprises a nonlinear activation function that can be expressed using a taylor expansion.
In a further embodiment of the device, based on the description of the preceding method embodiment, the non-linear activation function comprises
Figure 477999DEST_PATH_IMAGE018
A function, the lossless expression being:
Figure 376685DEST_PATH_IMAGE064
the device further comprises: a shard storage module to store a first shard of a first participant
Figure 415048DEST_PATH_IMAGE004
And generating a first random number
Figure 690171DEST_PATH_IMAGE020
Wherein the first segment
Figure 740167DEST_PATH_IMAGE004
The sum of the shards with the remaining participants is
Figure 75333DEST_PATH_IMAGE042
First random number
Figure 335413DEST_PATH_IMAGE020
The sum of the random numbers of the remaining participants is
Figure 414228DEST_PATH_IMAGE014
The first operation module is used for cooperatively calculating a first operation part through multi-party security calculation with the rest participants
Figure 833577DEST_PATH_IMAGE024
To obtain
Figure 74065DEST_PATH_IMAGE024
First segment of<
Figure 87020DEST_PATH_IMAGE024
>1;
The second operation module is used for cooperatively calculating a second operation part through multi-party security calculation with the rest participants
Figure 703947DEST_PATH_IMAGE033
To obtain
Figure 728534DEST_PATH_IMAGE033
First segment of<
Figure 139924DEST_PATH_IMAGE032
>1;
The result slicing calculation module calculates
Figure 374596DEST_PATH_IMAGE043
Obtained by
Figure 795213DEST_PATH_IMAGE065
A first result slice of the operation result.
Based on the foregoing description of the method embodiment, in another embodiment of the apparatus, the first operation module calculates the first operation by cooperating with the multiparty security calculation of the remaining participants
Figure 425040DEST_PATH_IMAGE024
To obtain
Figure 272910DEST_PATH_IMAGE024
First segment of<
Figure 994879DEST_PATH_IMAGE024
>1, comprising:
based on local computing
Figure 953608DEST_PATH_IMAGE054
Collaborative computing with remaining participants based on multi-party security computing
Figure 952788DEST_PATH_IMAGE055
To obtain
Figure 971559DEST_PATH_IMAGE055
One piece of the calculation result<
Figure 915244DEST_PATH_IMAGE055
>1;
Figure 677664DEST_PATH_IMAGE046
Is shown as
Figure 780618DEST_PATH_IMAGE046
The number of the participating parties is increased,
Figure 970291DEST_PATH_IMAGE044
is shown as
Figure 666852DEST_PATH_IMAGE046
Each takes part inThe shard that a party owns,
Figure 967383DEST_PATH_IMAGE046
has a value of [1,2 …
Figure 675576DEST_PATH_IMAGE047
],
Figure 832888DEST_PATH_IMAGE047
As to the number of the participating parties,
Figure 688848DEST_PATH_IMAGE048
obtaining secure computations with remaining participants through multiple parties
Figure 481486DEST_PATH_IMAGE058
Obtained
Figure 372082DEST_PATH_IMAGE058
Remaining fragmentation of computed results<
Figure 965874DEST_PATH_IMAGE058
>1,
Figure 309131DEST_PATH_IMAGE045
Is shown as
Figure 889148DEST_PATH_IMAGE046
The random number of the individual participating parties,
Figure 634250DEST_PATH_IMAGE049
will be provided with<
Figure 398944DEST_PATH_IMAGE055
>1、<
Figure 229496DEST_PATH_IMAGE056
>1、…、<
Figure 862472DEST_PATH_IMAGE058
>1…、<
Figure 727660DEST_PATH_IMAGE059
>1 are added and summed to obtain
Figure 663255DEST_PATH_IMAGE024
First segment of<
Figure 715524DEST_PATH_IMAGE024
>1。
Based on the foregoing description of the method embodiment, in another embodiment of the apparatus, the second calculation module calculates the second calculation part in cooperation with the multiparty security calculation of the remaining participants
Figure 902923DEST_PATH_IMAGE033
The method comprises the following steps:
the first party being to compute locally<
Figure 622617DEST_PATH_IMAGE024
>1+
Figure 729114DEST_PATH_IMAGE014
1 as
Figure 268679DEST_PATH_IMAGE033
One piece of the calculation result<
Figure 322086DEST_PATH_IMAGE032
>1;
The first party obtaining local computations of the remaining parties by means of a multiparty security computation
Figure 307404DEST_PATH_IMAGE033
Is divided into remaining slices<
Figure 584802DEST_PATH_IMAGE032
>
Figure 877243DEST_PATH_IMAGE060
、<
Figure 140865DEST_PATH_IMAGE032
>
Figure 835152DEST_PATH_IMAGE061
、<
Figure 486713DEST_PATH_IMAGE032
>
Figure 63188DEST_PATH_IMAGE046
、<
Figure 192818DEST_PATH_IMAGE032
>
Figure 928562DEST_PATH_IMAGE047
The first party will<
Figure 485445DEST_PATH_IMAGE032
>1、<
Figure 549216DEST_PATH_IMAGE032
>2、<
Figure 154641DEST_PATH_IMAGE032
>
Figure 823519DEST_PATH_IMAGE061
、…、
Figure 551304DEST_PATH_IMAGE062
…、
Figure 102371DEST_PATH_IMAGE063
Add and sum to obtain
Figure 839383DEST_PATH_IMAGE033
The operation result of (1).
It should be noted that the above-mentioned description of the apparatus according to the method embodiment may also include other implementation manners, and the specific implementation manner may refer to the description of the related method embodiment, which is not described in detail herein.
In the present specification, each embodiment of the apparatus is described in a progressive manner, and the same and similar parts among the embodiments are mutually referred to or described with reference to the corresponding method embodiment, and each embodiment focuses on the differences from the other embodiments. Reference is made to the description of the method embodiments. The specific details can be obtained according to the descriptions of the foregoing method embodiments, and all of them should fall within the scope of the implementation protected by this application, and no further description is given to implementation schemes of the embodiments one by one.
The data processing method or apparatus for privacy protection provided in the embodiment of the present specification may be implemented by a processor executing a corresponding program instruction in a computer, for example, implemented in a PC end using a C + + language of a Windows operating system, implemented based on a Linux system, or implemented in an intelligent terminal using Android and iOS system programming languages, or implemented in a server cluster, a cloud processing/cloud computing/cloud server, a block chain, and a processing logic based on quantum computing. Based on the description of the foregoing method embodiments, this specification further provides a device for privacy protection. The device may be a terminal device used by a participant in the embodiments of the present specification, or a terminal that is included in or mechanically or electrically connected to a device used by the participant. In one embodiment, the terminal device may include: at least one processor and a memory for storing processor-executable instructions, the instructions when executed by the processor implementing the steps of the method of any one of the present descriptions.
The privacy-preserving apparatus may comprise an apparatus employing any one of the method embodiments of the present description or comprising any one of the apparatus embodiments of the present description in combination with the necessary implementation hardware.
Storage media that store processor-executable instructions may include physical devices used to store information, typically digitized information and then stored using electrical, magnetic, or optical media. The storage medium may include: devices that store information using electrical energy, such as various types of memory, e.g., RAM, ROM, etc.; devices that store information using magnetic energy, such as hard disks, floppy disks, tapes, core memories, bubble memories, and usb disks; devices that store information optically, such as CDs or DVDs. Of course, there are other ways of storing media that can be read, such as quantum memory, graphene memory, and so forth.
In an application scenario of data sharing with multi-party participation, a plurality of parties usually correspond to a plurality of devices. Each device can implement the method described in the embodiments of the present specification, so that the entire data sharing system can implement efficient and lossless computation for protecting privacy, and perform secure computation of a nonlinear activation function in a machine learning model such as Sigmoid. Therefore, the present specification further provides a privacy-preserving machine learning system, where a machine learning algorithm of the machine learning system includes a non-linear activation function, the non-linear activation function obtains a result through multi-party security calculation of at least two parties, and a processor of any one of the at least two parties implements the steps of the method in the specification when executing executable instructions stored in a memory.
As mentioned above, for specific implementation of the embodiments of the privacy-preserving apparatus and the machine learning system, reference may be made to the description of the foregoing method embodiments. The description according to the method related embodiment may further include other embodiments, and the specific implementation may refer to the description of the corresponding method embodiment, which is not described in detail herein.
The foregoing description has been directed to specific embodiments of this disclosure. The embodiments described based on the above embodiments are extensible and still fall within the scope of implementations provided in the present specification. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the hardware + program class embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to the partial description of the method embodiment.
According to the data processing method, device, equipment and machine learning system for privacy protection, when a data processing result of a nonlinear activation function used in a machine learning algorithm needs to be obtained in a multi-party participatory data sharing application scene, original or appropriately changed lossless expressions can be used, multi-party safe calculation is utilized to cooperatively calculate each subentry, the subentry can be prevented from being expanded into an approximate evaluation algorithm of a polynomial, calculation complexity is reduced, and efficiency of calculating nonlinear activation function data processing by computer equipment is improved. In addition, compared with the polynomial calculation of taylor expansion, for example, each participant in the embodiment can calculate the result fragment of the operation result of the nonlinear activation function in a simpler manner, thereby greatly reducing the complexity and precision loss of approximate calculation of the nonlinear activation function such as taylor expansion. The method in the embodiment of the specification can realize efficient and lossless acquisition of one result fragment of the operation result of the nonlinear activation function of each participant based on privacy protection in data processing of multi-party participation. Furthermore, the method can efficiently and nondestructively acquire the operation result of the nonlinear activation function based on privacy protection, can improve the calculation speed of a computer and the precision of an output result, and can also integrally improve the data processing efficiency of machine learning based on privacy protection.
The embodiments of the present description are not necessarily limited to
Figure 785604DEST_PATH_IMAGE066
Sigmoid function expression of (a), a processing method conforming to standard secret sharing or MPC, an industry communication standard, a standard programming language, a data storage rule, or one or more of the specificationThe examples describe the case. Certain industry standards, or implementations modified slightly from those described using custom modes or examples, may also achieve the same, equivalent, or similar, or other, contemplated implementations of the above-described examples. The embodiments using the modified or transformed data acquisition, storage, judgment, processing and the like can still fall within the scope of the alternative embodiments of the embodiments in this specification.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The server, the apparatus, and the module illustrated in the above embodiments may be implemented by a computer chip or an entity, or implemented by an article with certain functions. One typical implementation device is a server system. Of course, this application does not exclude that with future developments in computer technology, the computer implementing the functionality of the above described embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device or a combination of any of these devices.
Although one or more embodiments of the present description provide method operational steps as described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive approaches. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or end product executes, it may execute sequentially or in parallel (e.g., parallel processors or multi-threaded environments, or even distributed data processing environments) according to the method shown in the embodiment or the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded. For example, if the terms first, second, etc. are used to denote names, they do not denote any particular order.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, when implementing one or more of the present description, the functions of each module may be implemented in one or more software and/or hardware, or a module implementing the same function may be implemented by a combination of multiple sub-modules or sub-units, etc. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the present specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. In the description of the specification, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
The above description is merely exemplary of one or more embodiments of the present disclosure and is not intended to limit the scope of one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present specification should be included in the scope of the claims.

Claims (21)

1. A privacy-preserving data processing method, comprising:
determining a lossless expression of a nonlinear activation function used in a machine learning algorithm, the lossless expression comprising a first operational portion and a second operational portion of the nonlinear activation function;
a first participant and a second participant cooperatively calculate the first operation part based on multi-party security calculation, wherein the first participant obtains a first fragment of the first operation part, and the second participant obtains a second fragment of the first operation part;
the first participant determines a first fragment of the second operation part based on the first fragment, the second participant determines a second fragment of the second operation part based on the second fragment, and the first participant and the second participant perform multi-party safe calculation based on the first fragment of the second operation part and the second fragment of the second operation part to obtain an operation result of the second operation part;
the first participant performs the operation of the nonlinear activation function on the first fragment of the first operation part and the operation result of the second operation part to obtain a first result fragment of the operation result of the nonlinear activation function, and the second participant performs the operation of the nonlinear activation function on the second fragment of the first operation part and the operation result of the second operation part to obtain a second result fragment of the operation result of the nonlinear activation function.
2. The method of claim 1, wherein if the lossless expression contains a constant term, transforming the constant term to a non-fixed value parameter;
and the items containing independent variables in the lossless expression are transformed into the non-fixed value parameters according to the constant items, corresponding transformation is executed, and the transformation lossless expression of the nonlinear activation function is determined.
3. The method of claim 2, the transformation mode comprising:
transforming the constant term to a non-zero real number
Figure DEST_PATH_IMAGE001
And taking a first random number acquired by a first participant as a first fragment of the non-fixed value parameter, and taking a second random number acquired by a second participant as a second fragment of the non-fixed value parameter.
4. The method of claim 1, the nonlinear activation function comprising a nonlinear activation function expressible using taylor expansion.
5. The method of claim 4, the nonlinear activation function comprising
Figure 517468DEST_PATH_IMAGE002
A function, the lossless expression being:
Figure 700187DEST_PATH_IMAGE004
then, have the first fragment
Figure DEST_PATH_IMAGE005
Generates a first random number
Figure 948766DEST_PATH_IMAGE006
Having a second section
Figure DEST_PATH_IMAGE007
The second party of (2) generates a second random number
Figure 265347DEST_PATH_IMAGE008
Wherein, in the step (A),
Figure DEST_PATH_IMAGE009
Figure 548561DEST_PATH_IMAGE010
first and second parties cooperatively compute a first party based on multi-party secure computingOperation section
Figure DEST_PATH_IMAGE011
The first party gets
Figure 839865DEST_PATH_IMAGE011
First segment of<
Figure 372477DEST_PATH_IMAGE011
>1, the second party gets
Figure 793881DEST_PATH_IMAGE011
Second section of<
Figure 666022DEST_PATH_IMAGE011
>2;
The first participant and the second participant cooperatively calculate a second operation part based on multi-party security calculation
Figure 924965DEST_PATH_IMAGE012
First party computing
Figure DEST_PATH_IMAGE013
To obtain
Figure 148136DEST_PATH_IMAGE014
First result slicing of operation results, second party computation
Figure DEST_PATH_IMAGE015
To obtain
Figure 353989DEST_PATH_IMAGE014
And slicing a second result of the operation result.
6. A privacy-preserving data processing method, comprising:
a first participant calculates a first operation part of a lossless expression through cooperation with multi-party safety calculation of the rest participants to obtain a first segment of the first operation part, wherein the lossless expression comprises a lossless expression of a nonlinear activation function used in a multi-party participating machine learning algorithm;
the first participant determines a first slice of a second operational portion of the nonlinear activation function based on the first slice;
and the first participant performs operation of the nonlinear activation function on the first segment of the first operation part and the operation result of the second operation part to obtain a first result segment of the operation result of the nonlinear activation function, and the operation result of the second operation part is obtained by performing multi-party safety calculation recovery on the basis of the first segment of the second operation part and the remaining segments of the second operation part owned by the remaining participants.
7. The method of claim 6, wherein if the lossless expression contains a constant term, transforming the constant term to a non-fixed value parameter;
and the items containing independent variables in the lossless expression are transformed into the non-fixed value parameters according to the constant items, corresponding transformation is executed, and the transformation lossless expression of the nonlinear activation function is determined.
8. The method of claim 7, the transformation mode comprising:
transforming the constant term to a non-zero real number
Figure 329904DEST_PATH_IMAGE001
And taking a first random number acquired by a first participant as a first fragment of the non-fixed value parameter, and taking a second random number acquired by a second participant as a second fragment of the non-fixed value parameter.
9. The method of claim 6, the nonlinear activation function comprising a nonlinear activation function expressible using a Taylor expansion.
10. The method of claim 6, the non-linear activation function comprising
Figure 25328DEST_PATH_IMAGE002
A function, the lossless expression being:
Figure 470216DEST_PATH_IMAGE004
then, have the first fragment
Figure 214181DEST_PATH_IMAGE005
Generates a first random number
Figure 123231DEST_PATH_IMAGE006
Wherein the first segment
Figure 661660DEST_PATH_IMAGE005
The sum of the shards with the remaining participants is
Figure 656161DEST_PATH_IMAGE016
First random number
Figure 688970DEST_PATH_IMAGE006
The sum of the random numbers of the remaining participants is
Figure 452527DEST_PATH_IMAGE001
The first party calculates the first operation part by cooperating with the multi-party security calculation of the rest parties
Figure 427436DEST_PATH_IMAGE011
To obtain
Figure 846916DEST_PATH_IMAGE011
First segment of<
Figure 995000DEST_PATH_IMAGE011
>1;
The first party calculates the second operation part by cooperating with the multi-party security calculation of the rest parties
Figure 550747DEST_PATH_IMAGE012
To obtain
Figure 758874DEST_PATH_IMAGE012
First segment of<
Figure DEST_PATH_IMAGE017
>1;
First party computing
Figure 914918DEST_PATH_IMAGE013
To obtain
Figure 538797DEST_PATH_IMAGE002
A first result slice of the operation result.
11. The method of claim 10, wherein the first party computes the first computation portion in cooperation with a multi-party secure computation of the remaining parties
Figure 276946DEST_PATH_IMAGE011
To obtain
Figure 593658DEST_PATH_IMAGE011
First segment of<
Figure 987730DEST_PATH_IMAGE011
>1, comprising:
the first party being based on local computing
Figure 477617DEST_PATH_IMAGE018
Collaborative computing with remaining participants based on multi-party security computing
Figure DEST_PATH_IMAGE019
To obtain
Figure 755758DEST_PATH_IMAGE019
One piece of the calculation result<
Figure 243372DEST_PATH_IMAGE019
>1;
Figure 921478DEST_PATH_IMAGE020
Is shown as
Figure 418318DEST_PATH_IMAGE020
The number of the participating parties is increased,
Figure DEST_PATH_IMAGE021
is shown as
Figure 68742DEST_PATH_IMAGE020
The shards that are owned by an individual participant,
Figure 710945DEST_PATH_IMAGE020
has a value of [1,2 …
Figure 876347DEST_PATH_IMAGE022
],
Figure 645720DEST_PATH_IMAGE022
As to the number of the participating parties,
Figure DEST_PATH_IMAGE023
first participant acquisition and remaining participants collaborate with computation through multi-party secure computing
Figure 416230DEST_PATH_IMAGE024
Obtained
Figure 245646DEST_PATH_IMAGE024
Remaining fragmentation of computed results<
Figure 898344DEST_PATH_IMAGE024
>1,
Figure DEST_PATH_IMAGE025
Is shown as
Figure 487719DEST_PATH_IMAGE020
The random number of the individual participating parties,
Figure 581577DEST_PATH_IMAGE026
the first party will<
Figure 644211DEST_PATH_IMAGE019
>1、<
Figure DEST_PATH_IMAGE027
>1、…、<
Figure 721889DEST_PATH_IMAGE024
>1…、<
Figure 364223DEST_PATH_IMAGE028
>1 are added and summed to obtain
Figure 827434DEST_PATH_IMAGE011
First segment of<
Figure 60969DEST_PATH_IMAGE011
>1。
12. The method of claim 11, the first party traversing multiple parties with remaining partiesSecure computation cooperative computation second operation part
Figure 360363DEST_PATH_IMAGE012
The method comprises the following steps:
the first party being to compute locally<
Figure 337547DEST_PATH_IMAGE011
>1+
Figure 405997DEST_PATH_IMAGE001
1 as
Figure 810433DEST_PATH_IMAGE012
One piece of the calculation result<
Figure 597124DEST_PATH_IMAGE017
>1;
The first party obtaining local computations of the remaining parties by means of a multiparty security computation
Figure 112419DEST_PATH_IMAGE012
Is divided into remaining slices<
Figure 308477DEST_PATH_IMAGE017
>
Figure DEST_PATH_IMAGE029
、<
Figure 87077DEST_PATH_IMAGE017
>
Figure 361064DEST_PATH_IMAGE030
、…、<
Figure 680050DEST_PATH_IMAGE017
>
Figure 723092DEST_PATH_IMAGE020
、…、<
Figure 469331DEST_PATH_IMAGE017
>
Figure 214302DEST_PATH_IMAGE022
The first party will<
Figure 336979DEST_PATH_IMAGE017
>1、<
Figure 234528DEST_PATH_IMAGE017
>2、<
Figure 354931DEST_PATH_IMAGE017
>
Figure 665826DEST_PATH_IMAGE030
、…、
Figure DEST_PATH_IMAGE031
、…、
Figure 529877DEST_PATH_IMAGE032
Add and sum to obtain
Figure 32665DEST_PATH_IMAGE012
The operation result of (1).
13. A privacy-preserving data processing apparatus comprising:
the first operation module is used for cooperatively calculating a first operation part of a lossless expression through multiparty security calculation of the rest participants to obtain a first segment of the first operation part, wherein the lossless expression comprises a lossless expression of a nonlinear activation function used in a multiparty machine learning algorithm;
the second operation module is used for determining a first fragment of a second operation part of the nonlinear activation function based on the first fragment, and the first participant performs multi-party safe calculation based on the first fragment of the second operation part and the remaining fragments of the second operation part owned by the remaining participants to obtain an operation result of the second operation part;
and the result fragment calculation module is used for performing operation of the nonlinear activation function on the operation result of the first fragment and the second operation part to obtain a first result fragment of the operation result of the nonlinear activation function, and the operation result of the second operation part is obtained by performing multi-party safety calculation recovery on the basis of the first fragment of the second operation part and the remaining fragments of the second operation part owned by the remaining participants.
14. The apparatus of claim 13, transforming the constant term into a non-fixed value parameter if the lossless expression contains the constant term;
and the items containing independent variables in the lossless expression are transformed into the non-fixed value parameters according to the constant items, corresponding transformation is executed, and the transformation lossless expression of the nonlinear activation function is determined.
15. The apparatus of claim 14, the transformation comprising:
transforming the constant term to a non-zero real number
Figure 386286DEST_PATH_IMAGE001
And taking a first random number acquired by a first participant as a first fragment of the non-fixed value parameter, and taking a second random number acquired by a second participant as a second fragment of the non-fixed value parameter.
16. The apparatus of claim 13, the nonlinear activation function comprising a nonlinear activation function expressible using taylor expansion.
17. The apparatus of claim 13, the non-wireThe sexual activation function includes
Figure 856581DEST_PATH_IMAGE002
A function, the lossless expression being:
Figure 524323DEST_PATH_IMAGE004
the device further comprises: a shard storage module to store a first shard of a first participant
Figure 193202DEST_PATH_IMAGE005
And generating a first random number
Figure 655407DEST_PATH_IMAGE006
Wherein the first segment
Figure 675316DEST_PATH_IMAGE005
The sum of the shards with the remaining participants is
Figure 864857DEST_PATH_IMAGE016
First random number
Figure 653822DEST_PATH_IMAGE006
The sum of the random numbers of the remaining participants is
Figure 286929DEST_PATH_IMAGE001
The first operation module is used for cooperatively calculating a first operation part through multi-party security calculation with the rest participants
Figure 528554DEST_PATH_IMAGE011
To obtain
Figure 538098DEST_PATH_IMAGE011
First segment of<
Figure 384832DEST_PATH_IMAGE011
>1;
The second operation module is used for cooperatively calculating a second operation part through multi-party security calculation with the rest participants
Figure 985577DEST_PATH_IMAGE012
To obtain
Figure 665564DEST_PATH_IMAGE012
First segment of<
Figure 9958DEST_PATH_IMAGE017
>1;
The result slicing calculation module calculates
Figure 711197DEST_PATH_IMAGE013
Obtained by
Figure DEST_PATH_IMAGE033
A first result slice of the operation result.
18. The apparatus of claim 17, the first operations module to compute the first operation in cooperation with a multi-party secure computation of the remaining participants
Figure 951686DEST_PATH_IMAGE011
To obtain
Figure 371166DEST_PATH_IMAGE011
First segment of<
Figure 519250DEST_PATH_IMAGE011
>1, comprising:
based on local computing
Figure 324264DEST_PATH_IMAGE018
Multi-party security computation with remaining participantsCollaborative computing
Figure 532392DEST_PATH_IMAGE019
To obtain
Figure 173589DEST_PATH_IMAGE019
One piece of the calculation result<
Figure 859785DEST_PATH_IMAGE019
>1;
Figure 801196DEST_PATH_IMAGE020
Is shown as
Figure 852329DEST_PATH_IMAGE020
The number of the participating parties is increased,
Figure 43139DEST_PATH_IMAGE021
is shown as
Figure 221441DEST_PATH_IMAGE020
The shards that are owned by an individual participant,
Figure 814097DEST_PATH_IMAGE020
has a value of [1,2 …
Figure 301710DEST_PATH_IMAGE022
],
Figure 979816DEST_PATH_IMAGE022
As to the number of the participating parties,
Figure 945498DEST_PATH_IMAGE023
obtaining collaborative computation through multi-party security computation with remaining participants
Figure 392660DEST_PATH_IMAGE024
Obtained
Figure 316753DEST_PATH_IMAGE024
Remaining fragmentation of computed results<
Figure 669106DEST_PATH_IMAGE024
>1,
Figure 500796DEST_PATH_IMAGE025
Is shown as
Figure 740147DEST_PATH_IMAGE020
The random number of the individual participating parties,
Figure 631880DEST_PATH_IMAGE026
will be provided with<
Figure 222261DEST_PATH_IMAGE019
>1、<
Figure 592063DEST_PATH_IMAGE027
>1、…、<
Figure 951500DEST_PATH_IMAGE024
>1…、<
Figure 14134DEST_PATH_IMAGE028
>1 are added and summed to obtain
Figure 845473DEST_PATH_IMAGE011
First segment of<
Figure 222228DEST_PATH_IMAGE011
>1。
19. The apparatus of claim 18, wherein the second computing module is to compute the second computing portion in cooperation with a multi-party secure computation of the remaining participants
Figure 498489DEST_PATH_IMAGE012
The method comprises the following steps:
the first party being to compute locally<
Figure 669707DEST_PATH_IMAGE011
>1+
Figure 31418DEST_PATH_IMAGE001
1 as
Figure 680705DEST_PATH_IMAGE012
One piece of the calculation result<
Figure 77052DEST_PATH_IMAGE017
>1;
The first party obtaining local computations of the remaining parties by means of a multiparty security computation
Figure 668439DEST_PATH_IMAGE012
Is divided into remaining slices<
Figure 517446DEST_PATH_IMAGE017
>
Figure 970424DEST_PATH_IMAGE029
、<
Figure 424539DEST_PATH_IMAGE017
>
Figure 999877DEST_PATH_IMAGE030
、…、<
Figure 273864DEST_PATH_IMAGE017
>
Figure 592849DEST_PATH_IMAGE020
、…、<
Figure 386624DEST_PATH_IMAGE017
>
Figure 132863DEST_PATH_IMAGE022
The first party will<
Figure 628567DEST_PATH_IMAGE017
>1、<
Figure 751244DEST_PATH_IMAGE017
>2、<
Figure 648792DEST_PATH_IMAGE017
>
Figure 769195DEST_PATH_IMAGE030
、…、
Figure 80091DEST_PATH_IMAGE031
、…、
Figure 927830DEST_PATH_IMAGE032
Add and sum to obtain
Figure 742202DEST_PATH_IMAGE012
The operation result of (1).
20. A privacy preserving device comprising: at least one processor and a memory for storing processor-executable instructions, the processor implementing the steps of the method of any one of claims 6-12 when executing the instructions.
21. A privacy preserving machine learning system whose machine learning algorithm includes a non-linear activation function that results from multi-party secure computations by at least two parties, the processor of any one of the at least two parties implementing the steps of the method of any one of claims 6-12 when executing the executable instructions stored in the memory.
CN202011164969.4A 2020-10-27 2020-10-27 Data processing method, device and equipment for privacy protection and machine learning system Active CN112000990B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011164969.4A CN112000990B (en) 2020-10-27 2020-10-27 Data processing method, device and equipment for privacy protection and machine learning system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011164969.4A CN112000990B (en) 2020-10-27 2020-10-27 Data processing method, device and equipment for privacy protection and machine learning system

Publications (2)

Publication Number Publication Date
CN112000990A CN112000990A (en) 2020-11-27
CN112000990B true CN112000990B (en) 2021-02-05

Family

ID=73474432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011164969.4A Active CN112000990B (en) 2020-10-27 2020-10-27 Data processing method, device and equipment for privacy protection and machine learning system

Country Status (1)

Country Link
CN (1) CN112000990B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112765616B (en) * 2020-12-18 2024-02-02 百度在线网络技术(北京)有限公司 Multiparty secure computing method, multiparty secure computing device, electronic equipment and storage medium
CN112686392A (en) * 2020-12-30 2021-04-20 深圳大普微电子科技有限公司 Integrated circuit-based activation function processing method, device, equipment and medium
CN112818337A (en) * 2021-01-22 2021-05-18 支付宝(杭州)信息技术有限公司 Program running method and system
CN112818338B (en) * 2021-01-22 2022-03-11 支付宝(杭州)信息技术有限公司 Program running method and system
CN112966809B (en) * 2021-02-02 2022-05-17 支付宝(杭州)信息技术有限公司 Privacy protection-based two-party model prediction method, device and system
CN112926051B (en) * 2021-03-25 2022-05-06 支付宝(杭州)信息技术有限公司 Multi-party security computing method and device
CN114022093B (en) * 2021-09-22 2023-03-24 医渡云(北京)技术有限公司 Data collaborative computing method, device and equipment based on multi-party security
CN116070282B (en) * 2023-04-04 2023-06-16 华控清交信息科技(北京)有限公司 Data processing method and device in privacy calculation and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110537191A (en) * 2017-03-22 2019-12-03 维萨国际服务协会 Secret protection machine learning
CN109919318B (en) * 2018-12-14 2023-08-08 创新先进技术有限公司 Data processing method, device and equipment
CN111143894B (en) * 2019-12-24 2022-01-28 支付宝(杭州)信息技术有限公司 Method and system for improving safe multi-party computing efficiency
CN111539026B (en) * 2020-06-19 2020-09-29 支付宝(杭州)信息技术有限公司 Method and device for performing secure operation on private data

Also Published As

Publication number Publication date
CN112000990A (en) 2020-11-27

Similar Documents

Publication Publication Date Title
CN112000990B (en) Data processing method, device and equipment for privacy protection and machine learning system
CN111783130B (en) Data processing method and device for privacy protection and server
Cheon et al. Ensemble method for privacy-preserving logistic regression based on homomorphic encryption
Pulido-Gaytan et al. Privacy-preserving neural networks with homomorphic encryption: C hallenges and opportunities
Sathya et al. A review of homomorphic encryption libraries for secure computation
Meftah et al. Doren: toward efficient deep convolutional neural networks with fully homomorphic encryption
CN110543901A (en) image recognition method, device and equipment
CN109919318B (en) Data processing method, device and equipment
Feng et al. Zen: An optimizing compiler for verifiable, zero-knowledge neural network inferences
CN111931241B (en) Linear regression feature significance testing method and device based on privacy protection
US11164484B2 (en) Secure computation system, secure computation device, secure computation method, and program
US11294633B2 (en) Secure computation system, secure computation device, secure computation method, and program
Krips et al. Hybrid model of fixed and floating point numbers in secure multiparty computations
WO2020071187A1 (en) Hidden sigmoid function calculation system, hidden logistic regression calculation system, hidden sigmoid function calculation device, hidden logistic regression calculation device, hidden sigmoid function calculation method, hidden logistic regression calculation method, and program
CN113711247A (en) Data processing method, device and system of machine learning model
EP4016506B1 (en) Softmax function secret calculation system, softmax function secret calculation device, softmax function secret calculation method, neural network secret calculation system, neural network secret learning system, and program
CN116561787A (en) Training method and device for visual image classification model and electronic equipment
Buscemi et al. Observational entropy, coarse-grained states, and the Petz recovery map: information-theoretic properties and bounds
Moon et al. An efficient encrypted floating-point representation using HEAAN and TFHE
CN113780552B (en) Safe multiparty computing method for bidirectional privacy protection
CN116094686B (en) Homomorphic encryption method, homomorphic encryption system, homomorphic encryption equipment and homomorphic encryption terminal for quantum convolution calculation
CN115134078B (en) Secret sharing-based statistical method, device and storage medium
CN115276952A (en) Private data processing method and device
Ameur et al. Application of homomorphic encryption in machine learning
JPWO2019111319A1 (en) Secret equal sign judgment system, secret equal sign judgment method and secret equal sign judgment program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant