Data encryption method and data encryption apparatus

By using a combination of linear and nonlinear element-wise computation layers in vertical federated learning to encrypt the initial intermediate results, the problem of data privacy leakage is solved, achieving efficient data security and privacy protection.

CN115795515BActive Publication Date: 2026-04-14MIDEA GROUP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-22
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies for vertical federated learning suffer from data privacy breaches, impacting data security.

Method used

A linear computation layer is used for addition, subtraction, and multiplication calculations, combined with a nonlinear element-by-element computation layer for nonlinear element-by-element function operations. Initial intermediate results are encrypted, and data security and privacy are improved through secret sharing and random permutation.

Benefits of technology

The initial intermediate results can be encrypted from multiple dimensions without multiple encryption and decryption steps, significantly improving the data security and privacy of feature providers in the vertical federated learning process and reducing the risk of data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115795515B_ABST
    Figure CN115795515B_ABST
Patent Text Reader

Abstract

The application discloses a data encryption method and a data encryption device, and belongs to the field of vertical federated learning. The data encryption method comprises the following steps: performing encryption processing on target industrial feature data to obtain an initial intermediate result; and inputting the initial intermediate result into a basic operator layer to obtain target encryption data output by the basic operator layer; wherein the basic operator layer comprises a linear calculation layer, a data type conversion layer and a nonlinear element-by-element calculation layer. According to the data encryption method, the linear calculation layer is arranged to perform addition, subtraction and multiplication calculation, and the nonlinear element-by-element calculation layer is arranged to perform nonlinear element-by-element function operation, so that the initial intermediate result is encrypted. The initial intermediate result can be encrypted from multiple dimensions without multiple encryption and decryption, the encryption effect is good, the operation is simple and convenient, the method is easy to implement, and the data security and privacy of a feature provider in a vertical federated learning process can be significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of vertical federated learning, and in particular relates to a data encryption method and a data encryption device. Background Technology

[0002] With the advent of the big data era, the Industrial Internet involves an increasing amount of data, making effective privacy protection a pressing issue. One relevant technology employs a split-learning approach for federated learning, using industrial feature data to obtain corresponding labels, thereby protecting the privacy of local industrial feature data. However, this split-learning method still suffers from data privacy leakage, impacting data security. Summary of the Invention

[0003] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a data encryption method and a data encryption device, which can significantly improve the data security and privacy of feature providers in the longitudinal federated learning process.

[0004] Firstly, this application provides a data encryption method, which includes:

[0005] Encrypt the target industrial characteristic data to obtain initial intermediate results;

[0006] The initial intermediate result is input into the basic operator layer to obtain the target encrypted data output by the basic operator layer;

[0007] The basic operator layer includes a linear computation layer, a data type conversion layer, and a nonlinear element-by-element computation layer.

[0008] According to the data encryption method of this application, a linear computation layer is set up to perform addition, subtraction and multiplication calculations, and a nonlinear element-wise computation layer is set up to perform nonlinear element-wise function operations to encrypt the initial intermediate results. The initial intermediate results can be encrypted from multiple dimensions without multiple encryption and decryption operations. The encryption effect is good and the operation is simple and convenient. It is easy to implement and can significantly improve the data security and privacy of the feature provider in the longitudinal federated learning process.

[0009] According to one embodiment of this application, the step of inputting the initial intermediate result into the basic operator layer and obtaining the target encrypted data output by the basic operator layer includes:

[0010] If the data type of the initial intermediate result is inconsistent with the target data type, the initial intermediate result is input to the data type conversion layer to obtain the first data of the target data type output by the data type conversion layer;

[0011] The first data is input into the linear computing layer to obtain the first encrypted data output by the linear computing layer.

[0012] The first encrypted data is input into the nonlinear element-by-element computation layer to obtain the target encrypted data output by the nonlinear element-by-element computation layer.

[0013] According to one embodiment of this application, the step of inputting the first data into the linear computing layer and obtaining the first encrypted data output by the linear computing layer includes:

[0014] The first data is split to obtain at least two sub-sequences;

[0015] The first encrypted data is determined based on the at least two sub-sequences.

[0016] According to one embodiment of this application, determining the first encrypted data based on the at least two sub-sequences includes:

[0017] Obtain the target multiplication triple;

[0018] The first encrypted data is determined based on the target multiplication triple and the at least two subsequences.

[0019] According to one embodiment of this application, the step of inputting the first encrypted data to the nonlinear element-by-element computation layer and obtaining the target encrypted data output by the nonlinear element-by-element computation layer includes:

[0020] Obtain the first sharing value and the second sharing value corresponding to the first encrypted data;

[0021] The first shared value and the second shared value are processed by random permutation of the target values ​​to obtain the third shared value and the fourth shared value.

[0022] Based on the third and fourth sharing values, determine the element-wise function result;

[0023] Split the element-wise function result to obtain the fifth and sixth shared values;

[0024] The target encrypted data is determined by reversing the fifth and sixth sharing values ​​respectively.

[0025] According to one embodiment of this application, the step of processing the first shared value and the second shared value respectively using a target random permutation to obtain the third shared value and the fourth shared value includes:

[0026] Obtain the target randomly flipped vector;

[0027] Based on the target random arrangement and the target random flip vector, the first shared value and the second shared value are processed respectively to obtain the third shared value and the fourth shared value.

[0028] According to one embodiment of this application, the basic operator layer includes at least one basic operator selected from addition, subtraction, multiplication, shape transformation, and broadcast shape.

[0029] Secondly, this application provides a data encryption device, which includes:

[0030] The first processing module is used to encrypt the target industrial feature data to obtain initial intermediate results;

[0031] The second processing module is used to input the initial intermediate result into the basic operator layer and obtain the target encrypted data output by the basic operator layer;

[0032] The basic operator layer includes a linear computation layer, a data type conversion layer, and a nonlinear element-by-element computation layer.

[0033] According to the data encryption device of this application, a linear computation layer is set up to perform addition, subtraction and multiplication calculations, and a nonlinear element-wise computation layer is set up to perform nonlinear element-wise function operations to encrypt the initial intermediate results. The initial intermediate results can be encrypted from multiple dimensions without multiple encryption and decryption operations. The encryption effect is good and the operation is simple and convenient. It is easy to implement and can significantly improve the data security and privacy of the feature provider in the longitudinal federated learning process.

[0034] Thirdly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the data encryption method as described in the first aspect above.

[0035] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data encryption method as described in the first aspect above.

[0036] Fifthly, this application provides a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the data encryption method as described in the first aspect.

[0037] In a sixth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the data encryption method as described in the first aspect above.

[0038] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects:

[0039] By setting up a linear computation layer to perform addition, subtraction, and multiplication, and setting up a nonlinear element-wise computation layer to perform nonlinear element-wise function operations, the initial intermediate results are encrypted. This eliminates the need for multiple encryption and decryption steps, enabling encryption of the initial intermediate results from multiple dimensions. The encryption effect is good, and the operation is simple, convenient, and easy to implement, which can significantly improve the data security and privacy of feature providers in the longitudinal federated learning process.

[0040] Furthermore, by generating first encrypted data through secret sharing based on addition, subtraction, and multiplication of the first data, leakage of the first data can be avoided, and the probability of retrieving the first data from the first encrypted data can be significantly reduced, thereby improving the security and privacy of the intermediate results.

[0041] Furthermore, by processing the first and second shared values ​​separately through random permutation, an efficient privacy computation method combining random permutation and secret sharing is provided. This method can improve the randomness of the generated shared values, thereby further reducing the possibility of inferring the original valid information from the generated target encrypted data, significantly improving the privacy and security of intermediate results, and thus enhancing the data privacy of split learning.

[0042] Furthermore, by using a random flipping method to process the first and second shared values ​​based on the random permutation, it is possible to improve randomness while avoiding the exposure of the distribution of each element in the random permutation, thereby further protecting data privacy, preventing the leakage of intermediate results, and significantly improving the data security and privacy of the feature provider in the longitudinal federated learning process.

[0043] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0044] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0045] Figure 1 This is one of the flowcharts illustrating the data encryption method provided in the embodiments of this application;

[0046] Figure 2 This is a second schematic flowchart of the data encryption method provided in the embodiments of this application;

[0047] Figure 3 This is the third flowchart illustrating the data encryption method provided in the embodiments of this application;

[0048] Figure 4 This is the fourth flowchart illustrating the data encryption method provided in the embodiments of this application;

[0049] Figure 5 This is a schematic diagram of the data encryption device provided in the embodiments of this application;

[0050] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0051] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0052] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0053] The data encryption method, data encryption device, electronic device, and readable storage medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.

[0054] The data encryption method can be applied to the terminal, and can be executed by the hardware or software in the terminal.

[0055] The data encryption method provided in this application embodiment can be executed by an electronic device or a functional module or entity in an electronic device that can implement the data encryption method. The electronic devices mentioned in this application embodiment include, but are not limited to, mobile phones, tablets, computers, cameras, and wearable devices. The data encryption method provided in this application embodiment is described below using an electronic device as the execution subject as an example.

[0056] It should be noted that this data encryption method can be applied to the field of industrial big data processing.

[0057] like Figure 1As shown, the data encryption method includes steps 110 and 120.

[0058] Step 110: Encrypt the target industrial feature data to obtain initial intermediate results;

[0059] In this step, the target industrial characteristic data can be user characteristic data, product characteristic data, production characteristic data, or other arbitrary characteristic data, such as the construction year of the user's residential community and the average house price in the community. This application does not limit this.

[0060] Taking target industrial characteristic data such as the construction year of the user's residential community and the average house price in the community as an example, this characteristic data can be used to improve the probability of predicting whether the user will purchase a certain type of product in the next month.

[0061] Understandably, in the process of vertical federated learning, multiple feature providers are involved, each of which has corresponding industrial feature data. The industrial feature data provided by each feature provider is not completely the same and varies greatly.

[0062] It should be noted that the feature providers do not share information with each other.

[0063] Continuing with the example of target industrial characteristic data such as the construction year of the user's residential community and the average house price in the community, the relevant characteristic data such as the construction year of the user's residential community may be provided by company A, and the characteristic data such as the average house price in the community may be provided by company B, and there is no information sharing between company A and company B.

[0064] In this step, the target feature provider can be any one of multiple feature providers, and the target industrial feature data is the industrial feature data provided by the target feature provider.

[0065] The initial intermediate result is the data obtained by the feature provider after encrypting and aligning its corresponding industrial feature data. This initial intermediate result can maintain data alignment with the initial intermediate results provided by other feature providers, thereby facilitating the label provider to perform federated training based on the initial intermediate results provided by multiple feature providers to generate labels corresponding to each industrial feature data.

[0066] Step 120: Input the initial intermediate results into the basic operator layer and obtain the target encrypted data output by the basic operator layer.

[0067] In this step, the target encrypted data is sent to the label predictor in the longitudinal federated learning process so that the label predictor can perform label prediction based on the target encrypted data and obtain the corresponding target label data.

[0068] It is understandable that each feature provider has its own target encrypted data, and the target encrypted data is obtained by the feature provider itself by processing its own target industrial feature data.

[0069] The basic operator layer includes a linear computation layer, a data type conversion layer, and a non-linear element-by-element computation layer.

[0070] The basic operator layer includes the fundamental operators required for machine learning.

[0071] In some embodiments, the basic operator layer may include at least one basic operator selected from addition, subtraction, multiplication, shape transformation, and broadcast shape.

[0072] The linear computation layer includes operators for basic operations such as addition, subtraction, and multiplication.

[0073] Understandably, in machine learning, besides addition, subtraction, multiplication, and other operations, there are many other operations, such as tensor shape transformation, summation, and averaging. These can all be performed locally through the basic operator layer without additional communication overhead.

[0074] For example, to transform a 10×100 tensor X into a 20×50 shape, it is only necessary to transform [X]0 into a 20×50 shape by P0 and transform [X]1 into a 20×50 shape by P1.

[0075] The data type conversion layer is used to convert between floating-point numbers and integers.

[0076] It should be noted that when performing calculations at the basic operator level, integer data must be used to ensure safety (i.e., the elements shared in the addition must be integers over a finite field). The elements are of type 1; however, the data used in practical applications (such as machine learning) are of type 2; while the data used in practical applications (such as machine learning) are of type 3; floating-point data.

[0077] The following explains how to convert between floating-point numbers and integers.

[0078] For example, let p be the number of decimal places, then the floating-point number x float The corresponding fixed-point number can be:

[0079]

[0080] Where, x fixed For floating-point number x float The converted integer; p is a floating-point number x float The number of decimal places, where x is a floating-point number. float L is a fixed-point number x fixed The maximum number of bits.

[0081] In some embodiments, L can be set to 64 to conform to the property that most programs can support 64-bit integer operations.

[0082] The above conversion method can represent the range [-2]. L-1-p ,2 L-1-p Floating-point numbers between 0 and 1.

[0083] In some embodiments, the fixed-point number x can be expressed by the following formula. fixed Convert to floating-point number:

[0084]

[0085] Where, x float Let x be a fixed-point number fixed The resulting floating-point number; p is the floating-point number x float The number of decimal places; L is the fixed-point number x fixed The maximum number of digits, x is a fixed-point number. fixed .

[0086] Nonlinear element-wise computation is a key aspect of the numerous nonlinear computations in neural networks. Understandably, most nonlinear computations are element-wise, meaning each element in a tensor is computed individually, such as activation functions like ReLU, Sigmoid, and Tanh.

[0087] It should be noted that, in this application, the inputs to the functions that are input to the nonlinear element-wise computation layer are all values ​​that have already been shared by addition between P0 and P1.

[0088] In this step, a linear computation layer is set up to perform addition, subtraction, and multiplication calculations, while a nonlinear element-wise computation layer is set up to handle the operation of nonlinear element-wise functions. This allows for privacy encryption of the initial intermediate results from multiple dimensions, resulting in good encryption performance and significantly improving the privacy of the intermediate results. This enhances the data security and privacy of the feature provider during the vertical federated learning process, and eliminates the need for multiple encryption and decryption operations, making the process simple and convenient.

[0089] In addition, by setting up a data type conversion layer to convert data types to make them suitable for encryption operators, the stability of system operation can be effectively guaranteed, thereby ensuring computational efficiency.

[0090] The data encryption method provided in this application encrypts the initial intermediate results by setting a linear computation layer to perform addition, subtraction and multiplication calculations and setting a nonlinear element-wise computation layer to perform nonlinear element-wise function operations. It can encrypt the initial intermediate results from multiple dimensions without multiple encryption and decryption operations. The encryption effect is good and the operation is simple and convenient. It is easy to implement and can significantly improve the data security and privacy of the feature provider in the longitudinal federated learning process.

[0091] The specific implementation process of linear and nonlinear calculations is explained below.

[0092] In some embodiments, step 120 may include:

[0093] If the data type of the initial intermediate result is inconsistent with the target data type, the initial intermediate result is input to the data type conversion layer to obtain the first data of the target data type output by the data type conversion layer.

[0094] The first data is input into the linear computation layer, and the first encrypted data output by the linear computation layer is obtained.

[0095] The first encrypted data is input into the nonlinear element-by-element computation layer to obtain the target encrypted data output by the nonlinear element-by-element computation layer.

[0096] In this embodiment, the target data type is the data type required for addition sharing, that is, an integer type.

[0097] If the initial intermediate result is a floating-point number, it is input to the data type conversion layer, which converts it to an integer to obtain the first data. Then, the first data is input to the linear calculation layer, which performs addition to generate the first encrypted data. Finally, the first encrypted data is input to the nonlinear element-wise calculation layer for function calculation to generate the target first encrypted data.

[0098] If the initial intermediate result is an integer, the initial intermediate result can be directly determined as the first data and input into the linear computation layer. The linear computation layer will then perform addition and sharing to generate the first encrypted data. Finally, the first encrypted data will be input into the nonlinear element-wise computation layer to perform function calculation and generate the target first encrypted data.

[0099] In some embodiments, inputting first data into a linear computation layer and obtaining the first encrypted data output by the linear computation layer may include:

[0100] Split the first data to obtain at least two subsequences;

[0101] The first encrypted data is determined based on at least two subsequences.

[0102] In this embodiment, at least two subsequences are obtained by splitting the first data based on addition or subtraction.

[0103] The following is a detailed explanation of sharing based on addition and subtraction.

[0104] In actual implementation, such as Figure 2As shown, a first server P0, a second server P1, and an auxiliary computing server P2 can be configured to perform addition sharing. All variables in the privacy computation are added and shared between P0 and P1.

[0105] For example, for integer variables P0 holds [x]0, P1 holds [x]1, and [x]0 + [x]1 = x. Here, x is the first data, and [x]0 and [x]1 are two subsequences.

[0106] At the same time, for any x, [x]0 and [x]1 are uniformly distributed in On top.

[0107] When it is necessary to rebuild an addition-shared value, simply add the addition-shared values ​​of P0 and P1 together.

[0108] For example, continue to refer to Figure 2 Let x and y share the addition between P0 and P1. To calculate the addition share of z = x + y, we can calculate [z]0 = [x]0 + [y]0 through P0 and [z]1 = [x]1 + [y]1 through P1, thus obtaining the addition share of z.

[0109] Subtraction is calculated using a similar method, which will not be elaborated here.

[0110] After adding and sharing the first data to obtain at least two subsequences, the at least two subsequences can be further multiplied and shared to obtain the first encrypted data.

[0111] The following section provides a detailed explanation of sharing based on multiplication.

[0112] In some embodiments, determining the first encrypted data based on at least two sub-sequences may include:

[0113] Obtain the target multiplication triple;

[0114] The first encrypted data is determined based on the target multiplication triple and at least two subsequences.

[0115] In this embodiment, the target multiplication triple can be a user-defined multiplication triple. For example, the multiplication triple can be defined as u, v, w, representing three numbers that satisfy w = uv, and all three numbers are... Integers above.

[0116] In this embodiment, the triples u, v, w can be randomly generated by the auxiliary computing server P2, and then added and shared with P0 and P1.

[0117] Continue to refer toFigure 2 Suppose that P0 and P1 have already shared the three numbers in the triplet through addition, where P0 shares [x]0 - [u]0 and P1 shares [x]1 - [u]1, and [x]0 + [x]1 = x, [u]0 + [u]1 = u. Now, we need to multiply the x and y that they shared through addition. The process is as follows:

[0118] P0 and P1 send their respective shared [x]0-[u]0 and [x]1-[u]1 to each other, so that both of them have the value of xu.

[0119] Using a similar method, P1 and P2 can also obtain the value of yv.

[0120] P0 calculates (xu)(yv)+[u]0(yv)+(xu)[v]0+[w]0=[z]0;

[0121] P1 calculates [u]1(yv)+(xu)[v]1+[w]1=[z]1.

[0122] Therefore:

[0123] [z]0+[z]1=(xu)(yv)+([u]0+[u]1)(yv)+(xu)([v]0+[v]1)+[w]0+[w]1=x(yv)+(xu)v+uv=xy

[0124] That is, P0 and P1 have obtained the shared value of z = xy (i.e., the first encrypted data), and the calculation is complete.

[0125] In some embodiments, where P0 directly possesses x and P1 directly possesses y, it can be directly assumed that:

[0126] [x]0=x,[x] 1 =0, [y]0=0, [y]1=y,

[0127] Then, based on a similar method described above, it is converted into a secret-shared multiplication to obtain the first encrypted data.

[0128] Understandably, in a secret-shared multiplication, xu and yv are public, while u and v are unknown. Therefore, the public values ​​do not reveal information about x and y.

[0129] Meanwhile, since [w]0 and [w]1 are uniformly distributed, the final result (i.e., the first encrypted data) is also completely random for one party.

[0130] In some embodiments, the above-described multiplication-based sharing can also be applied to vector and matrix scenarios. To perform x and y multiplication, the triples u and v need to have the same shape as x and y, respectively. The specific multiplication sharing steps are similar to those described above and will not be repeated here.

[0131] In some embodiments, if one of the two numbers x and y being multiplied is public (e.g., y is public), then P0 only needs to calculate [z]0 = [x]0y and P1 needs to calculate [z]1 = [x]1y to obtain the final first encrypted data, without revealing information about x.

[0132] According to the data encryption method provided in the embodiments of this application, by generating first encrypted data through secret sharing of first data based on addition, subtraction and multiplication, the leakage of first data can be avoided and the probability of obtaining first data by reverse engineering based on first encrypted data can be significantly reduced, thereby improving the security and privacy of intermediate results.

[0133] like Figure 3 As shown, in some embodiments, inputting the first encrypted data into a nonlinear element-wise computation layer to obtain the target encrypted data output by the nonlinear element-wise computation layer may include:

[0134] Obtain the first shared value and the second shared value corresponding to the first encrypted data;

[0135] The first and second shared values ​​are processed separately using a target random permutation to obtain the third and fourth shared values;

[0136] The element-wise function result is determined based on the third and fourth sharing values;

[0137] Split the element-wise function result to obtain the fifth and sixth shared values;

[0138] The fifth and sixth sharing values ​​are reversed to determine the target encrypted data.

[0139] In this embodiment, the input to the function to be calculated is a value that has already been shared by addition between P0 and P1, which is the first encrypted data.

[0140] The first shared value and the second shared value are the values ​​shared by the first server P0 and the second server P1, which are participating in the addition sharing.

[0141] The target random permutation can be a permutation randomly generated by the system.

[0142] Understandably, the number of permutations grows exponentially. For example, for a permutation of 10 elements, more than 3 million possible permutations can be randomly generated, and the target random permutation can be any one of these permutations.

[0143] Nonlinear element-wise function calculation, such as Figure 4 As shown.

[0144] For example, such as Figure 3 As shown, in actual execution, for vectors If the first share value in P0 is [x]0 and the second share value in P1 is [x]1, then P0 and P1 can negotiate a target random permutation π of length n to obtain the third share value π([x]0) corresponding to P0 and the fourth share value π([x]1) corresponding to P1; then send π([x]0) and π([x]1) to P2 respectively.

[0145] Continue to refer to Figure 3 P2 can determine π[x] based on the obtained third and fourth sharing values. float Then calculate the corresponding element-wise function result f(π[x]). float ])=π(f[x float Then convert it into a fixed-point number and send it to P0 and P1 in an additive manner.

[0146] After P0 receives the fifth shared value from P2, and P1 receives the sixth shared value from P2, P0 and P1 then obtain the desired result f(x) by reversing the order. float ) fixed That is, the target encrypted data.

[0147] According to the data encryption method provided in the embodiments of this application, the first shared value and the second shared value are processed by random permutation respectively, providing an efficient privacy computing method that combines random permutation and secret sharing. This method can improve the randomness of the generated shared value, thereby further reducing the possibility of inferring the original valid information from the generated target encrypted data, significantly improving the privacy and security of intermediate results, and thus improving the data privacy of split learning.

[0148] In some embodiments, processing the first and second shared values ​​using a target random permutation to obtain the third and fourth shared values ​​may include:

[0149] Obtain the target randomly flipped vector;

[0150] Based on the target random permutation and target random flip vector, the first and second shared values ​​are processed respectively to obtain the third and fourth shared values.

[0151] In this embodiment, the target random flip vector is used to calculate a specific nonlinear element-wise function to avoid exposing the distribution of elements in the data after random permutation (such as exposing the distribution of the last layer labels of the neural network), thereby further protecting privacy.

[0152] The target random flip vector is any random flip vector.

[0153] For example, continuing with the above embodiment, for vectors If the first share value in P0 is [x]0 and the second share value in P1 is [x]1, then P0 and P1 can negotiate a target random permutation π of length n and a target random flip vector σ of length n, thereby generating a third share value. and the fourth sharing value The elements in σ randomly take the value 1 or -1.

[0154] Then respectively Send to P2.

[0155] in,

[0156] P2 can be obtained based on the third and fourth sharing values. Then calculate The corresponding element-wise function result Then convert it to a fixed-point number and send it to P0 and P1 in an additive manner.

[0157] P0 and P1 are then reversed to obtain the desired result.

[0158] In some embodiments, for certain specific element-wise functions, f(-x) = g(f(x)), such as for the Sigmoid function, Sigmoid(-x) = 1 - Sigmoid(x); for Tanh, Tanh(-x) = -Tanh(x).

[0159] In this case, P0 and P1 can be obtained from The value of f(x) is then calculated.

[0160] The data encryption method provided in this application, by processing the first shared value and the second shared value using a random flipping method based on random permutation, can improve randomness while avoiding exposure of the distribution of each element in the random permutation, thereby further protecting data privacy, preventing leakage of intermediate results, and significantly improving the data security and privacy of the feature provider in the vertical federated learning process.

[0161] In some embodiments, a communication module may also be provided to perform asynchronous communication monitoring simultaneously when P0, P1, and P2 are running at the same time.

[0162] The communication protocol can be TCP.

[0163] The message sending format is: [message header, message body].

[0164] After receiving the message, the listening servers of each party categorize the message according to the sender and message header, and then store it in the message buffer in chronological order.

[0165] When any party needs to receive a message, it retrieves the message from the message cache of the listening server.

[0166] If the sender and message header queues corresponding to the current message buffer are empty, wait until there is a message in them.

[0167] The data encryption method provided in this application can be executed by a data encryption device. This application uses an example of a data encryption device executing the data encryption method to illustrate the data encryption device provided in this application.

[0168] This application also provides a data encryption device.

[0169] like Figure 5 As shown, the data encryption device includes: a first processing module 510 and a second processing module 520.

[0170] The first processing module 510 is used to encrypt the target industrial feature data to obtain initial intermediate results;

[0171] The second processing module 520 is used to input the initial intermediate results into the basic operator layer and obtain the target encrypted data output by the basic operator layer;

[0172] The basic operator layer includes a linear computation layer, a data type conversion layer, and a nonlinear element-wise computation layer.

[0173] The data encryption device provided in the embodiments of this application encrypts the initial intermediate results by setting a linear calculation layer to perform addition, subtraction and multiplication calculations and setting a nonlinear element-wise calculation layer to perform nonlinear element-wise function operations. It can encrypt the initial intermediate results from multiple dimensions without multiple encryption and decryption operations. The encryption effect is good and the operation is simple and convenient. It is easy to implement and can significantly improve the data security and privacy of the feature provider in the longitudinal federated learning process.

[0174] In some embodiments, the second processing module 520 may also be used for:

[0175] If the data type of the initial intermediate result is inconsistent with the target data type, the initial intermediate result is input to the data type conversion layer to obtain the first data of the target data type output by the data type conversion layer.

[0176] The first data is input into the linear computation layer, and the first encrypted data output by the linear computation layer is obtained.

[0177] The first encrypted data is input into the nonlinear element-by-element computation layer to obtain the target encrypted data output by the nonlinear element-by-element computation layer.

[0178] In some embodiments, the second processing module 520 may also be used for:

[0179] Split the first data to obtain at least two subsequences;

[0180] The first encrypted data is determined based on at least two subsequences.

[0181] In some embodiments, the second processing module 520 may also be used for:

[0182] Obtain the target multiplication triple;

[0183] The first encrypted data is determined based on the target multiplication triple and at least two subsequences.

[0184] In some embodiments, the second processing module 520 may also be used for:

[0185] Obtain the first shared value and the second shared value corresponding to the first encrypted data;

[0186] The first and second shared values ​​are processed separately using a target random permutation to obtain the third and fourth shared values;

[0187] The element-wise function result is determined based on the third and fourth sharing values;

[0188] Split the element-wise function result to obtain the fifth and sixth shared values;

[0189] The fifth and sixth sharing values ​​are reversed to determine the target encrypted data.

[0190] In some embodiments, the second processing module 520 may also be used for:

[0191] Obtain the target randomly flipped vector;

[0192] Based on the target random permutation and target random flip vector, the first and second shared values ​​are processed respectively to obtain the third and fourth shared values.

[0193] The data encryption device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific implementation.

[0194] The data encryption device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.

[0195] The data encryption device provided in this application embodiment can achieve... Figures 1 to 4 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0196] In some embodiments, such as Figure 6 As shown, this application embodiment also provides an electronic device 600, including a processor 601, a memory 602, and a computer program stored on the memory 602 and executable on the processor 601. When the program is executed by the processor 601, it implements the various processes of the above-mentioned data encryption method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0197] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0198] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described data encryption method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0199] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0200] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described data encryption methods.

[0201] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0202] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described data encryption method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0203] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0204] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0205] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0206] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

[0207] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0208] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

Claims

1. A data encryption method, characterized in that, include: Encrypt the target industrial characteristic data to obtain initial intermediate results; The initial intermediate result is input into the basic operator layer to obtain the target encrypted data output by the basic operator layer; wherein, the basic operator layer includes a linear calculation layer, a data type conversion layer, and a nonlinear element-by-element calculation layer; The initial intermediate result is input Entering the basic operator layer, obtaining the target encrypted data output by the basic operator layer, including: If the data type of the initial intermediate result is inconsistent with the target data type, the initial intermediate result is input to the data type conversion layer to obtain the first data of the target data type output by the data type conversion layer; The first data is input into the linear computing layer to obtain the first encrypted data output by the linear computing layer. The first encrypted data is input into the nonlinear element-by-element computation layer to obtain the target encrypted data output by the nonlinear element-by-element computation layer. The step of inputting the first encrypted data into the nonlinear element-wise computation layer and obtaining the target encrypted data output by the nonlinear element-wise computation layer includes: Obtain the first sharing value and the second sharing value corresponding to the first encrypted data; The first shared value and the second shared value are processed by random permutation of the target values ​​to obtain the third shared value and the fourth shared value. Based on the third and fourth sharing values, determine the element-wise function result; split the element-wise function result to obtain the fifth and sixth sharing values; The target encrypted data is determined by reversing the fifth and sixth sharing values ​​respectively.

2. The data encryption method according to claim 1, characterized in that, The step of inputting the first data into the linear computing layer and obtaining the first encrypted data output by the linear computing layer includes: The first data is split to obtain at least two sub-sequences; The first encrypted data is determined based on the at least two sub-sequences.

3. The data encryption method according to claim 2, characterized in that, The at least two sub-orders The column, determining the first encrypted data, includes: obtaining the target multiplication triple; The first encrypted data is determined based on the target multiplication triple and the at least two subsequences.

4. The data encryption method according to claim 1, characterized in that, The step of processing the first shared value and the second shared value respectively using a target random permutation to obtain the third shared value and the fourth shared value includes: Obtain the target randomly flipped vector; Based on the target random arrangement and the target random flip vector, the first shared value and the second shared value are processed respectively to obtain the third shared value and the fourth shared value.

5. The data encryption method according to any one of claims 1-4, characterized in that, The basic operator layer includes at least one of the following basic operators: addition, subtraction, multiplication, shape transformation, and broadcast shape.

6. A data encryption device, implementing the data encryption method as described in any one of claims 1-5, characterized in that, include: The first processing module is used to encrypt the target industrial feature data to obtain initial intermediate results; The second processing module is used to input the initial intermediate result into the basic operator layer and obtain the target encrypted data output by the basic operator layer; The basic operator layer includes a linear computation layer, a data type conversion layer, and a nonlinear element-by-element computation layer.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the data encryption method as described in any one of claims 1-5.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the data encryption method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Security calculation method and device, equipment and storage medium

    CN114418830A

  • Methods, systems, and devices for an encrypted and obfuscated algorithm in a computing environment

    US10289816B1