Privacy protection feature engineering method and system based on secret sharing

Through the privacy protection feature engineering method based on secret sharing, the problem of data privacy leakage and large amount of computing in feature engineering in distributed environments is solved, and the entire process privacy protection feature engineering and linear regression is realized, ensuring data security and computing efficiency .

CN119094128AActive Publication Date: 2024-12-06SHENZHEN HUAHUI DATA SERVICE CO LTD +2

Patent Information

Application Number
CN202411570482.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2024-12-06
Estimated Expiration
2044-11-06

AI Technical Summary

Technical Problem

The prior art can easily lead to data privacy leakage when performing feature engineering in a distributed environment, and the calculation amount of semi-homomorphic encryption methods is large, which cannot meet the calculation needs of privacy protection feature engineering algorithms.

Method used

Using a privacy protection feature engineering method based on secret sharing, data features and tags are distributed to multiple servers in the secret distribution stage of data sets through addition arithmetic secret sharing, and performs secure two-party distributed operations in a dense environment, including feature standardization , selection and linear regression, and finally restore the plaintext result in the recovery stage of the calculation result.

Benefits of technology

It realizes feature engineering and linear regression of the entire process in a distributed environment, ensuring data privacy and security, reducing computing volume, and improving the scalability and security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094128A_ABST
    Figure CN119094128A_ABST
Patent Text Reader

Abstract

The invention discloses a privacy protection feature engineering method and system based on secret sharing, and the method comprises the following steps: S100, in a data set secret distribution stage, n data providers # imgabs0 # separately distribute respective privacy data features and labels # imgabs1 # thereof to a first server S1 and a second server S2 through additive arithmetic secret sharing, obtaining a secret share of the data feature and a secret share of the data tag; and S200, in a two-party distributed operation stage, the first server S1 and the second server S2 respectively perform safe two-party distributed operation in a secret state environment based on the obtained secret share of the data feature and the secret share of the data tag, and the first server S1 and the second server S2 are not colluded. According to the technical scheme, the privacy security of the data can be ensured in any link, meanwhile, the calculation efficiency is considered, and higher expansibility and a complete system are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of feature engineering, and in particular to a privacy protection feature engineering method and system based on secret sharing. Background Art

[0002] Secret sharing is a basic technical module used in secure multi-party computing, which mainly includes two stages: secret distribution and secret reconstruction. There are secret managers responsible for secret distribution and reconstruction and secret participants who save secret shares.

[0003] Privacy-preserving feature engineering refers to feature extraction, selection, and transformation while ensuring data privacy. Feature engineering is a key step in machine learning, which aims to extract features from raw data that can improve model performance.

[0004] In the application scenario of feature engineering, the original data set needs to be processed into model training data, and the data set needs to be distributed in a ciphertext format on multiple computing servers for computation. At this time, distributed privacy-preserving feature engineering is required to ensure the privacy of the input data and output results of the participants. Currently, vertical federated learning and semi-homomorphic encryption are mainly used in privacy-preserving feature engineering to implement a certain link in feature engineering: (1) Vertical federated learning technology: Vertical federated learning is a specific type of federated learning that is suitable for scenarios where the participants have different characteristics but contain the same users. Vertical federated learning allows all parties to perform feature engineering and model training without directly sharing data, thereby protecting user privacy.

[0005] (2) Semi-homomorphic encryption technology: Semi-homomorphic encryption technology is an encryption method that allows a limited number of arithmetic operations to be performed on encrypted data, and can implement specific privacy-preserving feature engineering algorithms.

[0006] The above prior art has the following disadvantages: (1) Vertical federated learning technology: Vertical federated learning is mainly aimed at scenarios with data sets with the same users and different characteristics, and does not support privacy-preserving operations on data sets of any form.

[0007] (2) Semi-homomorphic encryption method: Semi-homomorphic encryption method has a large amount of computation, because when the data is represented in ciphertext, the amount of data is larger than that in plaintext. When the calculation is performed directly on the ciphertext data, the amount of computation is very large. At the same time, since semi-homomorphic encryption only supports a limited number of arithmetic operations, it cannot meet the computational requirements of privacy-preserving feature engineering algorithms. Summary of the invention

[0008] The main purpose of the present invention is to propose a privacy-preserving feature engineering method and system based on secret sharing, aiming to solve the existing security problems that feature engineering in a distributed environment is prone to data privacy leakage and the technical problems of a single algorithm.

[0009] To achieve the above purpose, the privacy protection feature engineering method based on secret sharing proposed in the present invention comprises the following steps: S100: In the secret distribution phase of the data set, n data providers The privacy data features and labels of each The secret shares of the data features and the data labels are obtained by distributing the secret shares to the first server S1 and the second server S2 through addition arithmetic secret sharing; S200, in the two-party distributed computing stage, the first server S1 and the second server S2 respectively perform secure two-party distributed computing in a secret environment based on the obtained secret shares of the data features and the secret shares of the data tags, and the first server S1 and the second server S2 do not collude; in the two-party distributed computing process, the specific process is as follows: S201. The server determines whether to perform data feature standardization according to the instruction. If feature standardization is performed, the server obtains the secret share of the standardized data feature by using the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm, and then executes the next step. Otherwise, the server directly executes the next step. S202, the server performs feature selection according to the instruction, obtains the score of each feature by using the privacy-preserving feature selection algorithm, compares the scores from large to small, selects the data features, and then executes the next step; S203, taking the secret share as input to perform privacy-preserving linear regression; S204, obtaining the secret share of the model parameters; S300, calculation result recovery phase, i.e., recovery of secrets. The first server S1 and the second server S2 send their respective model parameter secret shares R1 and R2 to the data user, and then the data user recovers the secret locally to obtain the plaintext result R=R 1+ R2.

[0010] Optionally, in S100, for the data provider C i For (i∈n), C i Select a random number rx, ry, and then -ry) is sent to S1, and (rx, ry) is sent to S2, where and rx becomes data x i The secret share, y i -ry and ry are called y iThe secret share is S in (i∈ ) to represent the secret shares in the hands of S1 and S2 respectively, so there is S 1i = , -ry), S 2i = (rx, ry).

[0011] Optionally, in step S201, feature standardization is performed, and the secret share of the standardized feature is obtained by using the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm for calculation, specifically: the server Each holds private data The secret share First, the server uses the privacy-preserving mean algorithm and the privacy-preserving standard deviation algorithm to calculate the mean and standard deviation of the data set based on their respective secret shares, and then calculates , you can get the secret share of the standardized features.

[0012] Optionally, secret addition for secret data can realize secure joint average calculation, support more than two parties, and can be calculated locally without multi-party interaction and communication, while secret addition and secret multiplication for secret data can realize secure joint variance calculation of two parties. The privacy-preserving standard deviation algorithm can be implemented on the basis of the privacy-preserving variance algorithm by secretly reconstructing the result obtained by the privacy-preserving variance algorithm and performing a secret square root operation on the reconstructed result.

[0013] Optionally, in step S202, feature selection is performed, and the score of each feature is obtained by using a privacy-preserving feature selection algorithm, and the features are compared and selected according to the scores from large to small, specifically: the server Each holds private data The secret share , first use the secret share to calculate the secret share of each feature average , and then use the secure comparison protocol based on function secret sharing to calculate the features in the dataset Greater than Number of and less than or equal to Number of , then calculate the label In Features Greater than and Features Less than or equal to The proportion , using the formula Get the score of each feature, compare and select the features according to the score from large to small.

[0014] Optionally, in step S203, the specific process of privacy-preserving linear regression based on feature engineering is as follows: the server Each holds private data The secret share , and the initial parameters Shared as a secret to the server , then The process of linear regression is used to calculate the Gradient and And update the parameters. In this process, the input of linear regression is the confidential result obtained by privacy protection feature engineering. , that is, the calculation is performed in the form of secret shares.

[0015] Optionally, the The size of is adjusted according to the training situation.

[0016] The privacy protection feature engineering system based on secret sharing includes a secret distribution module, a two-party distributed computing module and a result recovery module; the secret distribution module is used for the data provider to The privacy data features and labels of each The secret is shared and distributed to the first server S1 and the second server S2 through statistical operation, so as to obtain the secret share of the data feature and the secret share of the data label; the two-party distributed operation module is used for the first server S1 and the second server S2 to perform a secure two-party distributed operation in a secret environment based on the obtained secret share of the data feature and the secret share of the data label during the two-party distributed operation stage, and there is no collusion between the first server S1 and the second server S2; the result recovery module is used for the operation result recovery stage, i.e., recovering the secret, the first server S1 and the second server S2 respectively send the secret shares R1 and R2 of the model parameters obtained by calculating their respective secret shares to the data user, and then the data user recovers the secret locally to obtain the plaintext results of the model parameters.

[0017] An electronic device comprises: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can perform the privacy-preserving feature engineering method based on secret sharing.

[0018] A computer-readable storage medium storing a program, wherein when the program is executed by a processor, the privacy protection feature engineering method based on secret sharing is implemented. The technical scheme of the present invention has the following beneficial effects: the technical scheme of the present invention is mainly based on arithmetic secret sharing and function secret sharing, and realizes different feature engineering algorithms and linear regression operations by designing multiple basic operators of secure two-party calculations. It has higher scalability than traditional schemes, and can realize feature engineering and linear regression of the whole process of data sets in a fully confidential environment, and can ensure the privacy security of data at any link; it takes into account both security and computational efficiency, and has stronger scalability and a complete system; based on the basic operators of secure two-party calculations, the security proof of the basic operators is used as a guarantee of system security; it does not involve complex key encryption and decryption operations, and uses a smaller secret share for calculations than traditional encryption operations, and can outsource the calculation amount to a semi-honest two-party server while ensuring the privacy security of data on the server; the implemented privacy protection feature engineering system has a simple and easy-to-use framework structure, and can more flexibly implement more privacy protection algorithms based on the basic security operators, and has good scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.

[0020] Figure 1 A system framework diagram of a privacy protection feature engineering method based on secret sharing according to an embodiment of the present invention; Figure 2 A phase flow chart of a privacy protection feature engineering method based on secret sharing according to an embodiment of the present invention; Figure 3 A flowchart of a two-party distributed computing phase of a privacy protection feature engineering method based on secret sharing according to an embodiment of the present invention; Figure 4 A privacy protection feature engineering flow chart of a privacy protection feature engineering method based on secret sharing according to an embodiment of the present invention; Figure 5 A schematic diagram of the structure of a privacy protection feature engineering system based on secret sharing according to an embodiment of the present invention; Figure 6 FIG. 4 is a structural diagram of an electronic device according to an embodiment of the present invention.

[0021] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0024] In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0025] The present invention proposes a privacy protection feature engineering method and system based on secret sharing.

[0026] Arithmetic Secret Sharing: Secret sharing is a basic technical module used in secure multi-party computing, which mainly includes two stages: secret distribution and secret reconstruction. There are secret managers responsible for secret distribution and reconstruction and secret participants who save secret shares. The present invention considers a secret manager and secret parties (set as ). In the secret sharing scheme, it is defined on a ring, that is, the secret value is an element on the ring, and modular arithmetic addition and modular arithmetic multiplication operations are performed on the ring. Suppose the ring , secret value , whose length is bits. The secret distribution and reconstruction operations of the secret sharing scheme are: (1) Secret distribution: Secret administrators are randomly selected , then Send to , Send to , , Send to , and Send to ,in called The secret share of satisfaction ; (2) Secret reconstruction: , Share the secret Sent to the secret keeper, who calculates , reconstruct the secret .

[0027] In particular, the present invention requires arithmetic operations, such as addition and multiplication, to be performed on the secret shares. Assuming there is a secret value and The secret has been distributed to ,at this time have For addition, Need to calculate The secret share ; For multiplication, and Need to calculate The secret share .

[0028] (1) For addition operation, Compute locally , which can be verified .

[0029] (2) For multiplication operations, the commonly used method is to use multiplication triples for calculation. Suppose have The secret value has been obtained The secret share ,in is A random value uniformly distributed on .Then calculate , and broadcast it to other participants, who then secretly reconstruct Finally, have calculate . It can be verified .

[0030] Privacy-preserving average algorithm: (1) Privacy-preserving multi-party joint average algorithm: Input: Party Secret share held , Participants Secret share held , , Participants Secret share held satisfy .

[0031] Output: Get the secret share of the secret state average result , Get the secret share of the secret state average result , , Get the secret share of the secret state average result ,satisfy .

[0032] Online stage: dense average operation: Compute locally , Compute locally , Compute locally .

[0033] Privacy Preserving Standard Deviation Algorithm: The privacy-preserving standard deviation algorithm can be implemented on the basis of the privacy-preserving variance algorithm by secretly reconstructing the result obtained by the privacy-preserving variance algorithm and performing a secret square root operation on the reconstructed result.

[0034] (1) Privacy-preserving variance algorithm: Input: Party Secret share held , Participants Secret share held ,satisfy .

[0035] Output: Get the secret share of the secret variance result , Get the secret share of the secret variance result ,satisfy .

[0036] Offline stage: Multiplication triplet generation: In the offline phase, and Call the function to generate multiplication triples based on oblivious transfer or homomorphic encryption , generating multiplication triplets ,in .

[0037] get , get .

[0038] Online stage: dense variance operation: First, the participants Call the secure two-party joint average algorithm to calculate the average , Participants Call the secure two-party joint average algorithm to calculate the average .

[0039] Then, Compute locally , Compute locally .

[0040] Secondly, Use dense multiplication to calculate , Use dense multiplication to calculate .

[0041] at last, Compute locally , Compute locally .

[0042] In the process of secret square root operation, the idea of ​​Newton iteration method is used to realize the secret , after 6 iterations, we can calculate , and then use the dense state multiplication to calculate The secret addition and secret multiplication for secret data can realize the joint variance calculation of the two security parties.

[0043] Privacy-preserving feature selection algorithm: Two-way joint feature selection algorithm : Input a vector of all sample values ​​of a feature , the classification type matrix of the sample ; Output the GINI coefficient of this feature ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; . The algorithm uses the average value of each feature as the classification standard and divides the data set into two categories: one category is that the value of the feature is greater than the average value, and the other category is the opposite. The number of these two categories is Then calculate each category The proportion of samples in the two categories , and finally calculate the feature GINI coefficient: Thus, the GINI coefficient of each feature is calculated , select features according to the size of the coefficient.

[0044] Privacy Preserving Linear Regression: In terms of machine learning, this paper uses the security basic operator to implement single variable linear regression and multivariate linear regression. For single variable linear regression, assuming that the input sample is , a linear function needs to be fitted , define the loss function: The iterative formula is obtained using the gradient descent method: in Based on the above formula, the simple linear regression algorithm in a secret sharing environment is implemented as follows: Privacy-preserving linear regression algorithm in secret sharing environment: Input sample characteristics , the true value , Participants , output parameter share ; ; ; ; : ; ; ; ; ; . Based on the secret sharing method, the present invention realizes privacy protection feature engineering by designing an outsourced computing framework from multiple users to two servers. The system architecture of the present invention is as follows: Figure 1 As shown, n data providers Hold private data separately ,in Indicates the data provider Data features, usually vectors, Represents a data label, usually a scalar. S1 The privacy-preserving feature engineering method based on secret sharing includes the following steps: S100: In the secret distribution phase of the data set, n data providers The privacy data features and labels of each The secret shares of the data features and the data labels are obtained by distributing the secret shares to the first server S1 and the second server S2 through addition arithmetic secret sharing; S200, in the two-party distributed computing stage, the first server S1 and the second server S2 respectively perform secure two-party distributed computing in a secret environment based on the obtained secret shares of the data features and the secret shares of the data tags, and the first server S1 and the second server S2 do not collude; in the two-party distributed computing process, the specific process is as follows: S201. The server determines whether to perform data feature standardization according to the instruction. If feature standardization is performed, the server obtains the secret share of the standardized data feature by using the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm, and then executes the next step. Otherwise, the server directly executes the next step. S202, the server performs feature selection according to the instruction, obtains the score of each feature by using the privacy-preserving feature selection algorithm, compares the scores from large to small, selects the data features, and then executes the next step; S203, taking the secret share as input to perform privacy-preserving linear regression; S204, obtaining the secret share of the model parameters; S300, calculation result recovery phase, i.e., recovery of secrets. The first server S1 and the second server S2 send their respective model parameter secret shares R1 and R2 to the data user, and then the data user recovers the secret locally to obtain the plaintext result R=R 1+ R2.

[0045] Specifically, in step S100, for the data provider C i For (i∈n), C i Select a random number rx, ry, and then -ry) is sent to S1, and (rx, ry) is sent to S2, where and rx becomes data x i The secret share, y i -ry and ry are called y i The secret share is S in (i∈ ) to represent the secret shares in the hands of S1 and S2 respectively, so there is S 1i = , -ry), S 2i = (rx, ry).

[0046] Specifically, in step S201, feature standardization is performed, and the secret share of the standardized feature is obtained by using the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm for calculation, specifically: the server Each holds private data The secret share First, the server uses the privacy-preserving mean algorithm and the privacy-preserving standard deviation algorithm to calculate the mean and standard deviation of the data set based on their respective secret shares, and then calculates , you can get the secret share of the standardized features.

[0047] Specifically, secret addition for secret data can realize secure joint average calculation, support more than two participants, and can be calculated locally without the need for multi-party interaction and communication. Secret addition and secret multiplication for secret data can realize secure joint variance calculation of two parties. The privacy-preserving standard deviation algorithm can be implemented on the basis of the privacy-preserving variance algorithm by secretly reconstructing the result obtained by the privacy-preserving variance algorithm and performing a secret square root operation on the reconstructed result.

[0048] Specifically, in step S202, feature selection is performed. The score of each feature is obtained by using a privacy-preserving feature selection algorithm. The features are compared from large to small according to the scores and selected. Specifically, the server Each holds private data The secret share , first use the secret share to calculate the secret share of each feature average , and then use the secure comparison protocol based on function secret sharing to calculate the features in the dataset Greater than Number of and less than or equal to Number of , then calculate the label In Features Greater than and Features Less than or equal to The proportion , using the formula Get the score of each feature, compare and select the features according to the score from large to small.

[0049] Specifically, in step S203, the specific process of privacy-preserving linear regression based on feature engineering is as follows: Each holds private data The secret share , and the initial parameters Shared as a secret to the server , then The process of linear regression is used to calculate the Gradient and And update the parameters. In this process, the input of linear regression is the confidential result obtained by privacy protection feature engineering. , that is, the calculation is performed in the form of secret shares.

[0050] Specifically, the The size of is adjusted according to the training situation.

[0051] like Figure 5 As shown, in another embodiment of the present invention, a privacy protection feature engineering system 600 based on secret sharing is provided, including a secret distribution module 610, a two-party distributed computing module 620 and a result recovery module 630. The secret distribution module 610 is used for the data provider to The privacy data features and labels of each The secret is shared and distributed to the first server S1 and the second server S2 through statistical operation, so as to obtain the secret share of the data feature and the secret share of the data label; the two-party distributed operation module 620 is used for the first server S1 and the second server S2 to perform a secure two-party distributed operation in a secret environment based on the obtained secret share of the data feature and the secret share of the data label during the two-party distributed operation stage, and there is no collusion between the first server S1 and the second server S2; the result recovery module 630 is used for the operation result recovery stage, i.e., recovering the secret, the first server S1 and the second server S2 respectively send the secret shares R1 and R2 of the model parameters obtained by calculating their respective secret shares to the data user, and then the data user recovers the secret locally to obtain the plaintext results of the model parameters.

[0052] like Figure 6 As shown, in another embodiment of the present invention, an electronic device for implementing a privacy protection feature engineering method based on secret sharing is provided, wherein the electronic device 700 includes a first processor 710, a first memory 720, and a computer program stored in the first memory 720 and executable on the first processor 710, wherein the first memory 720 includes at least one type of readable storage medium, including a mobile hard disk, an optical disk, etc. In some embodiments, the first memory 720 can be used as both an internal storage unit of the electronic device 700 and an external storage device of the electronic device 700, and can be used not only to store application software and various types of data installed in the electronic device 700, but also to temporarily store output or to-be-output data. In some embodiments, the first processor 710 can be composed of an integrated circuit, including a single packaged integrated circuit or multiple packaged integrated circuits with the same or different functions, including a combination of one or more central processing units CPU, microprocessors, digital processing chips, graphics processors, and various control chips. The first processor 710 is the control core of the electronic device 700. It connects the various components of the electronic device using various lines and interfaces, and executes various functions of the electronic device 700 and processes data by running or executing computer programs or modules stored in the first memory 720, such as the privacy protection feature engineering program 730 based on secret sharing, and calling the data stored in the first memory 720.

[0053] Specifically, Figure 6 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 6 The structure shown does not constitute a limitation on the electronic device 700 , and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0054] Specifically, the privacy protection feature engineering program 730 based on secret sharing stored in the first memory 720 of the electronic device 700 is a combination of multiple instructions. When running in the first processor 710, it can achieve: in the stage of secret distribution of data sets, the data provider The privacy data features and labels of each The secret shares of the data features and the data labels are distributed to the first server S1 and the second server S2 through additive arithmetic secret sharing to obtain the secret shares of the data features and the secret shares of the data labels; in the two-party distributed operation stage, the first server S1 and the second server S2 respectively perform secure two-party distributed operations in a secret environment based on the obtained secret shares of the data features and the secret shares of the data labels, and there is no collusion between the first server S1 and the second server S2. The secure two-party distributed operation includes: the server determines whether to perform data feature standardization according to the instruction, and if feature standardization is performed, it is calculated by using the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm to obtain After the secret share of the standardized data feature is obtained, the next step is executed, otherwise the next step is executed directly; the server performs feature selection according to the instruction, obtains the score of each feature by using the privacy-preserving feature selection algorithm, compares the scores from large to small and selects the data features, and then executes the next step; the secret share is used as input for privacy-preserving linear regression; the secret share of the model parameters is obtained; in the calculation result recovery stage, that is, the recovery of the secret, the first server S1 and the second server S2 send their respective model parameter secret shares R1 and R2 to the data user, and then the data user recovers the secret locally to obtain the plaintext result R=R of the model parameter 1+ R2.

[0055] Specific inventive principles in the embodiments of the present invention: (1) Feature Engineering: Feature engineering refers to processing raw data to extract features that are useful for the problem in order to facilitate the training of machine learning algorithms. In the field of machine learning, feature engineering is one of the key factors in model performance. Good feature engineering can improve the accuracy and robustness of the model.

[0056] (2) Feature engineering methods include: 1) Feature selection: select features that are useful to the model, remove useless features, and avoid the curse of dimensionality.

[0057] 2) Feature extraction: Extract useful features from raw data, such as extracting words, word frequency and other features in text classification tasks.

[0058] 3) Feature construction: New features are constructed by calculating, combining, converting, and other operations on the original data to improve model performance. For example, in time series prediction tasks, features such as lag and moving average can be constructed.

[0059] (3) Feature engineering needs to be designed according to specific problems and requires in-depth understanding and analysis of data. Good feature engineering can improve the accuracy and robustness of the model, thereby increasing business value. At the same time, feature engineering is closely related to the model and is a very important part of machine learning. The purpose of feature engineering is to extract useful features from raw data to facilitate model learning and prediction. Good feature engineering can improve the accuracy and robustness of the model, thereby increasing business value.

[0060] (4) Feature engineering has the following impacts on the model: 1) Model input features: Feature engineering determines the input features of the model and directly affects the performance of the model. Feature engineering can improve the distinguishability of features, reduce noise and redundancy, and thus improve the accuracy and robustness of the model.

[0061] 2) Model complexity: Feature engineering can reduce the complexity of the model and avoid overfitting. By selecting features that are useful to the model, removing useless features, and reducing dimensionality, the number of model parameters can be reduced and the generalization ability of the model can be improved.

[0062] 3) Model training speed: Feature engineering can reduce the model training time. The model training process can be accelerated by selecting low-dimensional features, scaling features, etc.

[0063] (5) Feature engineering is inseparable from models. Good feature engineering can optimize the input features of the model, reduce the complexity of the model, and accelerate the model training process, thereby improving the performance and efficiency of the model.

[0064] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.

Claims

1. A privacy-preserving feature engineering method based on secret sharing, characterized in that: The following steps are involved: S100: In the secret distribution phase of the data set, n data providers The privacy data features and labels of each The secret shares of the data features and the data labels are obtained by distributing the secret shares to the first server S1 and the second server S2 through addition arithmetic secret sharing; S200, in the two-party distributed computing stage, the first server S1 and the second server S2 respectively perform secure two-party distributed computing in a secret environment based on the obtained secret shares of the data features and the secret shares of the data tags, and the first server S1 and the second server S2 do not collude; in the two-party distributed computing process, the specific process is as follows: S201. The server determines whether to perform data feature standardization according to the instruction. If feature standardization is performed, the server obtains the secret share of the standardized data feature by using the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm, and then executes the next step. Otherwise, the server directly executes the next step. S202, the server performs feature selection according to the instruction, obtains the score of each feature by using the privacy-preserving feature selection algorithm, compares the scores from large to small, selects the data features, and then executes the next step; S203, taking the secret share as input to perform privacy-preserving linear regression; S204, obtaining the secret share of the model parameters; S300, calculation result recovery phase, i.e., recovery of secrets. The first server S1 and the second server S2 send their respective model parameter secret shares R1 and R2 to the data user, and then the data user recovers the secret locally to obtain the plaintext result R=R 1+ R2.

2. The privacy protection feature engineering method based on secret sharing according to claim 1 is characterized in that: In S100, for data provider C i For (i∈n), C i Select a random number rx, ry, and then -ry) is sent to S1, and (rx, ry) is sent to S2, where and rx becomes data x i The secret share, y i -ry and ry are called y i The secret share is S in (i∈ ) to represent the secret shares in the hands of S1 and S2 respectively, so there is S 1i = , -ry), S 2i = (rx, ry).

3. The privacy protection feature engineering method based on secret sharing according to claim 1 is characterized in that: In step S201, feature standardization is performed by using the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm to calculate and obtain the secret share of the standardized feature. Specifically, the server Each holds private data The secret share First, the server uses the privacy-preserving mean algorithm and the privacy-preserving standard deviation algorithm to calculate the mean and standard deviation of the data set based on their respective secret shares, and then calculates , you can get the secret share of the standardized features.

4. The privacy protection feature engineering method based on secret sharing according to claim 3 is characterized in that: Secret addition for secret data can realize secure joint average calculation, support more than two participants, and can be calculated locally without the need for multi-party interaction and communication. Secret addition and secret multiplication for secret data can realize secure joint variance calculation of two parties. The privacy-preserving standard deviation algorithm can be implemented on the basis of the privacy-preserving variance algorithm by secretly reconstructing the result obtained by the privacy-preserving variance algorithm and performing a secret square root operation on the reconstructed result.

5. The privacy protection feature engineering method based on secret sharing according to claim 1 is characterized in that: In step S202, feature selection is performed. The score of each feature is obtained by using a privacy-preserving feature selection algorithm. The features are compared from large to small according to the scores and selected. Specifically, the server Each holds private data The secret share , first use the secret share to calculate the secret share of each feature average , and then use the secure comparison protocol based on function secret sharing to calculate the features in the dataset Greater than Number of and less than or equal to Number of , then calculate the label In Features Greater than and Features Less than or equal to The proportion , using the formula Get the score of each feature, compare and select the features according to the score from large to small.

6. The privacy protection feature engineering method based on secret sharing according to claim 1 is characterized in that: In step S203, the specific process of privacy-preserving linear regression based on feature engineering is as follows: Each holds private data The secret share , and the initial parameters Shared as a secret to the server , then The process of linear regression is used to calculate the Gradient and And update the parameters. In this process, the input of linear regression is the confidential result obtained by privacy protection feature engineering. , that is, the calculation is performed in the form of secret shares.

7. The privacy protection feature engineering method based on secret sharing according to claim 6 is characterized in that: Said The size of is adjusted according to the training situation.

8. The system for the privacy protection feature engineering method based on secret sharing according to any one of claims 1 to 7, characterized in that: It includes a secret distribution module, a two-party distributed computing module and a result recovery module; the secret distribution module is used for the data provider to The privacy data features and labels of each The secret is shared and distributed to the first server S1 and the second server S2 through statistical operation, so as to obtain the secret share of the data feature and the secret share of the data label; the two-party distributed operation module is used for the first server S1 and the second server S2 to perform a secure two-party distributed operation in a secret environment based on the obtained secret share of the data feature and the secret share of the data label during the two-party distributed operation stage, and there is no collusion between the first server S1 and the second server S2; the result recovery module is used for the operation result recovery stage, i.e., recovering the secret, the first server S1 and the second server S2 respectively send the secret shares R1 and R2 of the model parameters obtained by calculating their respective secret shares to the data user, and then the data user recovers the secret locally to obtain the plaintext results of the model parameters.

9. An electronic device, characterized in that: The electronic device includes: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the privacy-preserving feature engineering method based on secret sharing as described in any one of claims 1-7.

10. A computer-readable storage medium storing a program, characterized in that: When the program is executed by a processor, the privacy protection feature engineering method based on secret sharing described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Federal learning privacy protection method based on homomorphic encryption and secret sharing

    CN113037460A

  • Multi-user distributed privacy protection regression method and device based on secret sharing

    CN115632761A

  • Energy storage data sharing method supporting secure multi-party computing privacy protection

    CN115766073A

  • Longitudinal privacy protection logistic regression method and apparatus based on secret sharing

    WO2023184847A1

Cited By

  • Privacy protection Skyline query method based on mixed secret sharing under cloud computing

    CN119848929A

  • A Privacy-Preserving Skyline Query Method Based on Hybrid Secret Sharing under Cloud Computing

    CN119848929B