Data analysis method based on privacy calculation

By adopting a multi-end collaboration method of homomorphic encryption technology and a federated learning framework in data analysis, the problems of low efficiency and low accuracy of data analysis caused by privacy protection in the existing technology are solved, and efficient and accurate data analysis and secure data processing are achieved.

CN119808164APending Publication Date: 2025-04-11STATE GRID ZHEJIANG ELECTRIC POWER CO LTD JINHUA POWER SUPPLY CO

Patent Information

Application Number
CN202510296640.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When the prior art introduces privacy protection in the data analysis process, it leads to reduced data analysis efficiency, poor training effect of analysis model and low accuracy of data analysis results.

Method used

Using a data analysis method based on privacy computing, a multi-terminal collaborative data analysis is realized through homomorphic encryption technology and a federated learning framework to ensure that the data is calculated in an encrypted state, and the correctness of the encrypted data is judged through model training.

Benefits of technology

It improves the computing efficiency of encrypted data, ensures the training effect of the analysis model, improves the accuracy of data analysis results, and enhances the security of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808164A_ABST
    Figure CN119808164A_ABST
Patent Text Reader

Abstract

The invention discloses a data analysis method based on privacy calculation, which relates to the technical field of data analysis, and comprises the following steps: step 1, collecting multivariate heterogeneous data needing to be analyzed; 2, encrypting the preprocessed multivariate heterogeneous data, and distributing the encrypted data to a plurality of data owners; 3, the data holder performs model training under the federated learning framework, and judges whether the encrypted data of the data holder is correct or not according to a model training result; step 4, fusing the models trained by all the data owners into a global model, step 5, acquiring a data analysis task, using the global model to cooperatively complete the data analysis task by the data owners based on a secure multi-party computing protocol, and outputting an analysis result; and step 6, encrypting the analysis result by using a public key, and decrypting the analysis result by using a private key by the authorization party to obtain the analysis result. According to the invention, the data analysis efficiency is improved, the risk in the data transmission process is avoided, and the data security is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data analysis technology, and in particular to a data analysis method based on privacy computing. Background Art

[0002] Data analysis technology is a method of obtaining useful information by collecting, processing, analyzing and interpreting data. It is widely used in marketing, financial analysis, medical diagnosis, social science research and other fields. However, with the increase in data volume and the diversification of data sources, data privacy protection has become an important issue. Privacy protection technology is a technology that protects personal privacy and data security. It prevents data from being leaked or abused during transmission, storage and use through encryption, anonymization, data desensitization and other technical means.

[0003] Although existing privacy protection technologies have solved the problem of data privacy protection to a certain extent, there are still some problems and limitations. Encryption technology encrypts data so that only authorized users can access and decrypt the data. However, existing encryption technologies have bottlenecks in computing efficiency, which affects data analysis and computing speed. In order to improve the computing efficiency of encrypted data, multi-terminal collaboration can be used to participate in the training of analysis models and data analysis. However, the multi-terminal collaborative participation method cannot know the accuracy of its own encrypted data, which will affect the training effect of the analysis model and cause the data analysis results to deviate from the actual results. Summary of the invention

[0004] The purpose of the present invention is to overcome the shortcomings of the prior art that introducing privacy protection in the data analysis process will result in reduced data analysis efficiency, poor analysis model training effect and low accuracy of data analysis results, and to provide a data analysis method based on privacy computing, which improves the computing efficiency of encrypted data through multi-terminal collaboration, and at the same time judges the correctness of the encrypted data, thereby ensuring the training effect of the analysis model and improving the accuracy of the data analysis results.

[0005] The purpose of the present invention is achieved through the following technical solutions: A data analysis method based on privacy computing includes a model building step and a data analysis step, wherein the model building step includes: Step 1: Collect the multivariate heterogeneous data to be analyzed and preprocess the multivariate heterogeneous data; Step 2: Use a homomorphic encryption algorithm to encrypt the preprocessed multivariate heterogeneous data, and distribute the encrypted data to several data holders; Step 3: The data holder conducts model training under the federated learning framework, and determines whether the encrypted data of the data holder is correct based on the results of the model training. If correct, jump to step 4. If incorrect, readjust the parameters of the homomorphic encryption algorithm to ensure that the encrypted data of the data holder is correct. Step 4: Integrate the models trained by all data holders into the global model; The data analysis steps include: Step 5: Obtain data analysis tasks. Several data holders participating in data analysis use a global model to collaboratively complete data analysis tasks based on a secure multi-party computing protocol and output analysis results. Step 6: Encrypt the analysis result using the public key, and the authorized party decrypts it using the private key to obtain the analysis result.

[0006] This solution uses homomorphic encryption technology and a federated learning framework to ensure that data can still be calculated in an encrypted state, and that model training and data analysis are completed locally on the data holder's side, with only model parameters or updates shared without transmitting the original data. This design not only improves the efficiency of data analysis, but also avoids risks during data transmission and enhances data security. At the same time, this solution determines whether the encrypted data obtained by the data holder is correct, that is, whether the data encryption process is correct, ensuring the training effect of the analysis model and improving the accuracy of the data analysis results.

[0007] Preferably, in the step 1, preprocessing of multivariate heterogeneous data includes data cleaning, data format conversion, data standardization and feature extraction, the data cleaning includes removing duplicate data, repairing missing values ​​and processing outliers, the data format conversion is to unify data of different formats into a standard format, the data standardization is to normalize the data, and the feature extraction is to extract features useful for data analysis tasks from the original data.

[0008] Preferably, after preprocessing the multivariate heterogeneous data, data enhancement and dimensionality reduction are performed on the multivariate heterogeneous data. The data enhancement is to expand the data set by random sampling, translation, rotation and / or scaling to improve the generalization ability of the model. The dimensionality reduction is to reduce the data dimension by principal component analysis or linear discriminant analysis, which further reduces the computational complexity and improves the computational efficiency.

[0009] Preferably, in step 2, the homomorphic encryption algorithm used is the Paillier encryption algorithm or the ElGamal encryption algorithm. The Paillier encryption algorithm is suitable for additive homomorphic computing, and the ElGamal encryption algorithm is suitable for multiplicative homomorphic computing.

[0010] Preferably, in step 3, whether the encrypted data of the data holder is correct is determined by the result of model training, specifically: After training the model once, for a single data holder, obtain the calculation results of other data holders after model training on encrypted data, and compare them with its own calculation results. If the difference between its own calculation results and those of other data holders is within the set range, no operation will be performed; if the difference between its own calculation results and those of other data holders is not within the set range, mark itself; The model is trained again until the number of model training times reaches the set number. If the number of marks made by the data holder itself exceeds the set threshold, the encrypted data of the data holder is judged to be wrong; if the number of marks made by the data holder itself does not exceed the set threshold, the encrypted data of the data holder is judged to be correct.

[0011] The design idea of ​​this scheme is that after the model is trained with encrypted data, the update values ​​of different data holders for their own models or the output results of the models should be the same or similar. If the difference between the calculation results of the data holders and those of other data holders is not within the set range, there may be two situations: one is that there is a problem with the encrypted data itself, and the other is that there is a problem with the encrypted data of the other party. Therefore, the data holders are marked to indicate that there may be problems with their own encrypted data. When the model is trained multiple times, the calculation results are compared with different data holders each time. If there is no problem with the encrypted data itself, the number of marks will not exceed the set threshold, and the encrypted data itself is judged to be correct. If there is a problem with the encrypted data itself, the encrypted data itself is judged to be wrong.

[0012] In addition, when training the model multiple times, the data holder can also input part of the data into the model for training instead of training all the data. This can further improve the generalization ability of the model. However, this may cause the eigenvalues ​​of some of the selected data to be significantly different from the overall data, resulting in significant differences in the calculation results when the encrypted data is used for model training. At this time, the traditional encryption method cannot know whether the problem with the encrypted data is a problem with the data itself or a problem with the encryption process. The method of this solution improves the tolerance for errors in the model training results. Only when the number of self-labeling exceeds the set threshold, it is judged that there is a problem with the encryption process of the encrypted data, eliminating the interference caused by the large difference in the eigenvalues ​​of the data itself.

[0013] The problem in the encryption process may be that the use of a random number generation method that does not meet the requirements leads to abnormal encryption results. Therefore, after determining that there is a problem in the encryption process, you only need to correct the encryption operation and re-use a random number generation method that meets the requirements, so that the encrypted data can participate in model training again.

[0014] Preferably, if after a round of model training, there are data holders who were marked in this round, then in the next round of model training, other data holders will perform model training on the encrypted data of the marked data holders, and compare the calculation results with the previous calculation results. If the difference in the calculation results is within the set range, no operation will be performed; if the difference in the calculation results is not within the set range, the encrypted data of the marked data holder will be marked again.

[0015] The design of this solution conducts a longitudinal comparison of different rounds of model training. By training the model on different encrypted data by the same data holder, it can assist in determining whether there is a problem with the encrypted data of the previously marked data holder, further improving the accuracy of determining whether the encrypted data is correct.

[0016] Preferably, if after a round of model training, there are data holders who were marked in this round, then in the next round of model training, other data holders will perform model training on the encrypted data of the marked data holder, and then perform model training on the encrypted data of another random data holder, and compare the calculation results of the two. If the difference in the calculation results is within the set range, no operation will be performed. If the difference in the calculation results is not within the set range, the encrypted data of the marked data holder will be marked again.

[0017] The design of this solution makes a horizontal comparison of the same model training rounds. By comparing whether the difference between the two sets of encrypted data is within the set range, it can assist in judging whether there is a problem with the encrypted data of the previously marked data holder, further improving the accuracy of judging whether the encrypted data is correct. The design of this solution can also arrange more than two sets of encrypted data to judge the difference. This improves the accuracy of the judgment, but increases the complexity of the calculation and reduces the efficiency.

[0018] Preferably, when training the model, the encrypted data is integrated with other encrypted data before model training. The design of this solution can effectively reduce the situation where the encrypted data feature values ​​are greatly different, and reduce the interference caused by this situation on whether there is a problem in the encryption process.

[0019] Preferably, differential privacy is introduced in model training and output analysis results, and noise is added to protect individual data and ensure the accuracy of overall data analysis; specifically, Laplace noise or Gaussian noise is used, and the noise intensity is dynamically adjusted according to the privacy budget to strike a balance between privacy protection and model performance, so as to balance data privacy protection and analysis accuracy.

[0020] Preferably, in step 5, a zero-knowledge proof protocol is introduced into the secure multi-party computing protocol to verify the accuracy of the calculation results.

[0021] The beneficial effects of the present invention are as follows: the present invention adopts homomorphic encryption technology and a federated learning framework to ensure that data can still be calculated in an encrypted state, and model training and data analysis are completed locally on the data holder, only sharing model parameters or updates without transmitting original data. Such a design not only improves the efficiency of data analysis, but also avoids risks in the data transmission process and enhances data security. At the same time, the present invention judges whether the encrypted data obtained by the data holder is correct, that is, whether the process of encrypting the data is correct, thereby ensuring the training effect of the analysis model and improving the accuracy of the data analysis results.

[0022] This invention introduces differential privacy mechanism and blockchain technology to add noise to the data analysis results to protect individual data, while ensuring the traceability and non-tamperability of data exchange and operation. These technical means further enhance the ability of data privacy protection, so that personal privacy is more fully protected.

[0023] The present invention realizes effective data analysis and utilization and releases data value by protecting data privacy. It not only solves the bottleneck of data value conversion in the prior art, but also provides more data value realization channels for data holders and promotes the sharing and utilization of data resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0025] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0026] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0027] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0028] Embodiment 1: A data analysis method based on privacy computing, such as Figure 1 As shown, it includes a model building step and a data analysis step, and the model building step includes: Step 1: Collect the multivariate heterogeneous data to be analyzed and preprocess the multivariate heterogeneous data; Step 2: Use a homomorphic encryption algorithm to encrypt the preprocessed multivariate heterogeneous data, and distribute the encrypted data to several data holders; Step 3: The data holder conducts model training under the federated learning framework, and determines whether the encrypted data of the data holder is correct based on the results of the model training. If correct, jump to step 4. If incorrect, readjust the parameters of the homomorphic encryption algorithm to ensure that the encrypted data of the data holder is correct. Step 4: Integrate the models trained by all data holders into the global model; The data analysis step includes: Step 5: Obtain data analysis tasks. Several data holders participating in data analysis use a global model to collaboratively complete data analysis tasks based on a secure multi-party computing protocol and output analysis results. Step 6: Encrypt the analysis result using the public key, and the authorized party decrypts it using the private key to obtain the analysis result.

[0029] This solution uses homomorphic encryption technology and a federated learning framework to ensure that data can still be calculated in an encrypted state, and that model training and data analysis are completed locally on the data holder's side, with only model parameters or updates shared without transmitting the original data. This design not only improves the efficiency of data analysis, but also avoids risks during data transmission and enhances data security. At the same time, this solution determines whether the encrypted data obtained by the data holder is correct, that is, whether the data encryption process is correct, ensuring the training effect of the analysis model and improving the accuracy of the data analysis results.

[0030] In the step 1, the preprocessing of multivariate heterogeneous data includes data cleaning, data format conversion, data standardization and feature extraction. The data cleaning includes removing duplicate data, repairing missing values ​​and outlier processing. The data format conversion is to unify data in different formats into a standard format, for example, converting CSV files, Excel tables, etc. into a unified database format. The data standardization is to normalize the data, for example, using the minimum-maximum normalization or Z-score normalization method. The feature extraction is to extract features useful for data analysis tasks from the original data, reduce data dimensions, and improve analysis efficiency.

[0031] After preprocessing the multivariate heterogeneous data, data enhancement and dimensionality reduction are also performed on the multivariate heterogeneous data. The data enhancement is to expand the data set by random sampling, translation, rotation and / or scaling to improve the generalization ability of the model. The dimensionality reduction is to reduce the data dimension by using principal component analysis or linear discriminant analysis, which further reduces the computational complexity and improves the computational efficiency.

[0032] In the step 2, the homomorphic encryption algorithm used is the Paillier encryption algorithm or the ElGamal encryption algorithm. The Paillier encryption algorithm is applicable to additive homomorphic computing, and the ElGamal encryption algorithm is applicable to multiplicative homomorphic computing.

[0033] In step 3, the results of model training are used to determine whether the encrypted data of the data holder is correct, specifically: After training the model once, for a single data holder, obtain the calculation results of other data holders after model training on encrypted data, and compare them with its own calculation results. If the difference between its own calculation results and those of other data holders is within the set range, no operation will be performed; if the difference between its own calculation results and those of other data holders is not within the set range, mark itself; The model is trained again until the number of model training times reaches the set number. If the number of marks made by the data holder itself exceeds the set threshold, the encrypted data of the data holder is judged to be wrong; if the number of marks made by the data holder itself does not exceed the set threshold, the encrypted data of the data holder is judged to be correct.

[0034] The design idea of ​​this scheme is that after the model is trained with encrypted data, the update values ​​of different data holders for their own models or the output results of the models should be the same or similar. If the difference between the calculation results of the data holders and those of other data holders is not within the set range, there may be two situations: one is that there is a problem with the encrypted data itself, and the other is that there is a problem with the encrypted data of the other party. Therefore, the data holders are marked to indicate that there may be problems with their own encrypted data. When the model is trained multiple times, the calculation results are compared with different data holders each time. If there is no problem with the encrypted data itself, the number of marks will not exceed the set threshold, and the encrypted data itself is judged to be correct. If there is a problem with the encrypted data itself, the encrypted data itself is judged to be wrong.

[0035] In addition, when training the model multiple times, the data holder can also input part of the data into the model for training instead of training all the data. This can further improve the generalization ability of the model. However, this may cause the eigenvalues ​​of some of the selected data to be significantly different from the overall data, resulting in significant differences in the calculation results when the encrypted data is used for model training. At this time, the traditional encryption method cannot know whether the problem with the encrypted data is a problem with the data itself or a problem with the encryption process. The method of this solution improves the tolerance for errors in the model training results. Only when the number of self-labeling exceeds the set threshold, it is judged that there is a problem with the encryption process of the encrypted data, eliminating the interference caused by the large difference in the eigenvalues ​​of the data itself.

[0036] The problem in the encryption process may be that the use of a random number generation method that does not meet the requirements leads to abnormal encryption results. Therefore, after determining that there is a problem in the encryption process, you only need to correct the encryption operation and re-use a random number generation method that meets the requirements, so that the encrypted data can participate in model training again.

[0037] Differential privacy is introduced in model training and output analysis results, and noise is added to protect individual data and ensure the accuracy of overall data analysis. Specifically, Laplace noise or Gaussian noise is used, and the noise intensity is dynamically adjusted according to the privacy budget to strike a balance between privacy protection and model performance, so as to balance data privacy protection and analysis accuracy.

[0038] During the model training phase, Laplace noise is added when each data holder (such as data holder A) performs model training and calculates the gradient. The probability density function of Laplace noise is ,in (mean is 0), is the scale parameter, , In this embodiment, the sensitivity is set to the maximum change in the model gradient calculation. is the privacy budget allocated to the model training phase. After each gradient calculation, the generated Laplace noise is added to the gradient value before the model parameters are updated to protect the privacy of local data.

[0039] In the result output stage, before the data holder sends the prediction result to the power dispatching center, Laplace noise is added to the prediction result. , The sensitivity of the output (e.g. the maximum possible range of variation of the predicted results), is the privacy budget allocated to the result output stage. After receiving the prediction results with added noise, the power dispatch center performs decryption and subsequent analysis. Since the noise is dynamically adjusted based on the privacy budget, it protects the privacy of power data in various regions to a certain extent, while ensuring that the power load forecast results are available for power dispatch and power generation planning.

[0040] In step 5, a zero-knowledge proof protocol is introduced into the secure multi-party computing protocol to verify the accuracy of the calculation results.

[0041] The following is a specific example of the application of this solution in power system when performing power load forecasting.

[0042] It is assumed that power companies in multiple regions participate, and each collects multivariate heterogeneous power data in its region. The power data includes historical power load data, meteorological data, and date and time information. The historical power load data includes power consumption in different time periods, the meteorological data includes temperature, humidity, wind speed, etc., and the date and time information includes weekdays, weekends, holidays, etc.

[0043] The process of data preprocessing includes the following aspects: Data cleaning: remove duplicate records, such as load data at repeated time points caused by failures in data acquisition equipment; repair missing values, and use time series prediction algorithms to fill in missing load data; handle outliers, and use the interquartile range (IQR) method to identify and correct abnormal load data based on historical data distribution.

[0044] Data format conversion: Unify the meteorological data formats recorded by different power companies, such as temperature in degrees Celsius and humidity in percentage format.

[0045] Data standardization: Normalize power load data, meteorological data, etc., and map the data to the [0,1] interval to facilitate subsequent model training.

[0046] Feature extraction: Extract features that are useful for power load forecasting, such as converting date and time information into categorical features such as whether it is a weekday or a holiday, and using temperature, humidity, etc. in meteorological data as numerical features to form a feature set together with power load data.

[0047] After preprocessing, data enhancement and dimensionality reduction are performed: Data enhancement: We expand the data set by randomly sampling electricity data from similar dates in the past, performing small shifts on the load data (to simulate small changes in electricity usage habits), and reasonably scaling the meteorological data (to take into account the uncertainty of meteorological forecasts) to improve the generalization ability of the model.

[0048] Dimensionality reduction: The principal component analysis (PCA) method is used to reduce the dimension of the feature set, remove redundant information, reduce data dimensions, and improve computational efficiency.

[0049] The Paillier encryption algorithm is selected to encrypt the preprocessed multivariate heterogeneous data. After encryption, the data is distributed to various power companies, which are the data holders.

[0050] Under the federated learning framework, each power company uses a neural network model to train the power load forecasting model.

[0051] After a model training: Taking data holder A as an example, obtain the calculation results of data holders B, C, etc. after model training on encrypted data, such as the model's intermediate layer output, gradient, etc., and compare them with their own calculation results. Set the difference range to the mean square error (MSE) of the calculation result not exceeding a certain threshold. If it is within the range, no operation will be performed; if not, mark itself.

[0052] Other data holders do the same.

[0053] The model is trained again, and the number of training times is set to 20. When the number of training times reaches 20, if the number of times that data holder A marks itself exceeds the set threshold of 5 times, it is judged that its encrypted data is wrong; if it does not exceed, it is correct.

[0054] In the data analysis step, the power load forecast task for the next week is obtained. Based on the secure multi-party computing protocol, each power company uses the global model to collaboratively complete the forecast task. The zero-knowledge proof protocol is introduced into the secure multi-party computing protocol to verify the accuracy of the calculation results and ensure data privacy and calculation correctness.

[0055] Specifically: Power companies (data holders) A, B, C, the power dispatching center acts as the verifier V, and each data holder is the prover P.

[0056] Preparation phase: The prover P (such as data holder A) uses the global model to calculate the local encrypted data to obtain the prediction results and related evidence for zero-knowledge proof, such as intermediate values ​​and hash values ​​in the calculation process. These evidences do not disclose the original data and model parameters.

[0057] Commitment phase: The prover P sends the calculation results and encrypted evidence to the verifier V. For example, the data holder A sends the power load forecast results of the local area for the next week and the encrypted evidence to the power dispatching center through a secure channel.

[0058] Challenge phase: Verifier V generates a random challenge value and sends it to prover P. The power dispatching center generates a random number r and sends it to data holder A.

[0059] Response phase: The prover P calculates based on the received challenge value and the previously prepared evidence to generate a response value. The data holder A uses the random number r and the encrypted evidence to perform a specific calculation and obtain the response value s.

[0060] Verification phase: Verifier V verifies the correctness of the calculation result based on the response value returned by prover P. The power dispatching center uses the received response value s and the commitment information received previously to determine whether the calculation result of data holder A is correct through a specific verification algorithm. If all provers (data holders A, B, C, etc.) pass the verification, the entire calculation result is considered accurate; if any party fails the verification, it is required to recheck the calculation process and prove it again. In this way, the accuracy of the calculation result is verified while ensuring data privacy.

[0061] The forecast results are encrypted using a public key, and the power dispatching center, as the authorized party, uses a private key to decrypt them to obtain the power load forecast values ​​for each region in the next week, which are used for power dispatching and power generation planning.

[0062] Example 2: A data analysis method based on privacy computing, whose principle and implementation method are basically the same as Example 1, except that if after a round of model training, there are data holders who are marked in this round, then in the next round of model training, other data holders will perform model training on the encrypted data of the marked data holders, and compare the calculation results with the previous calculation results. If the difference in the calculation results is within a set range, no operation will be performed; if the difference in the calculation results is not within the set range, the encrypted data of the marked data holder will be marked again.

[0063] The design of this solution conducts a longitudinal comparison of different rounds of model training. By training the model on different encrypted data by the same data holder, it can assist in determining whether there is a problem with the encrypted data of the previously marked data holder, further improving the accuracy of determining whether the encrypted data is correct.

[0064] Example 3: A data analysis method based on privacy computing, whose principle and implementation method are basically the same as Example 1, except that if after a round of model training, there are data holders who are marked in this round, then in the next round of model training, other data holders will perform model training on the encrypted data of the marked data holder, and then perform model training on the encrypted data of another random data holder, and compare the calculation results of the two. If the difference in the calculation results is within the set range, no operation is performed. If the difference in the calculation results is not within the set range, the encrypted data of the marked data holder will be marked again.

[0065] The design of this solution makes a horizontal comparison of the same model training rounds. By comparing whether the difference between the two sets of encrypted data is within the set range, it can assist in judging whether there is a problem with the encrypted data of the previously marked data holder, further improving the accuracy of judging whether the encrypted data is correct. The design of this solution can also arrange more than two sets of encrypted data to judge the difference. This improves the accuracy of the judgment, but increases the complexity of the calculation and reduces the efficiency.

[0066] Embodiment 4: A data analysis method based on privacy computing, the principle and implementation method of which are basically the same as those of Embodiment 1, except that when training the model, the encrypted data is integrated with other encrypted data before model training. The design of this solution can effectively reduce the situation where the encrypted data feature values ​​are greatly different, and reduce the interference caused by this situation on whether there is a problem in the encryption process.

[0067] The solutions of Examples 2 to 4 may be implemented separately or integrated with the solution in Example 1. The solutions of Examples 2 to 4 may also be combined and flexibly adjusted according to actual needs and computing resources.

[0068] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation method of the present application.

[0069] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0070] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A data analysis method based on privacy computing, characterized in that: The method comprises a model building step and a data analysis step, wherein the model building step comprises: Step 1: Collect the multivariate heterogeneous data to be analyzed and preprocess the multivariate heterogeneous data; Step 2: Use a homomorphic encryption algorithm to encrypt the preprocessed multivariate heterogeneous data, and distribute the encrypted data to several data holders; Step 3: The data holder conducts model training under the federated learning framework, and determines whether the encrypted data of the data holder is correct based on the results of the model training. If correct, jump to step 4. If incorrect, readjust the parameters of the homomorphic encryption algorithm to ensure that the encrypted data of the data holder is correct. Step 4: Integrate the models trained by all data holders into the global model; The data analysis steps include: Step 5: Obtain data analysis tasks. Several data holders participating in data analysis use a global model to collaboratively complete data analysis tasks based on a secure multi-party computing protocol and output analysis results. Step 6: Encrypt the analysis result using the public key, and the authorized party decrypts it using the private key to obtain the analysis result.

2. According to the data analysis method based on privacy computing according to claim 1, it is characterized in that: In the step 1, the preprocessing of multivariate heterogeneous data includes data cleaning, data format conversion, data standardization and feature extraction. The data cleaning includes removing duplicate data, repairing missing values ​​and outlier processing. The data format conversion is to unify data of different formats into a standard format. The data standardization is to normalize the data. The feature extraction is to extract features useful for data analysis tasks from the original data.

3. A data analysis method based on privacy computing according to claim 1 or 2, characterized in that: After preprocessing the multivariate heterogeneous data, data enhancement and dimensionality reduction are also performed on the multivariate heterogeneous data. The data enhancement is to expand the data set by random sampling, translation, rotation and / or scaling to improve the generalization ability of the model. The dimensionality reduction is to reduce the data dimension by using principal component analysis or linear discriminant analysis.

4. According to the data analysis method based on privacy computing according to claim 1, it is characterized in that: In the step 2, the homomorphic encryption algorithm used is the Paillier encryption algorithm or the ElGamal encryption algorithm. The Paillier encryption algorithm is applicable to additive homomorphic computing, and the ElGamal encryption algorithm is applicable to multiplicative homomorphic computing.

5. The data analysis method based on privacy computing according to claim 1 is characterized in that: In step 3, the results of model training are used to determine whether the encrypted data of the data holder is correct, specifically: After training the model once, for a single data holder, obtain the calculation results of other data holders after model training on encrypted data, and compare them with its own calculation results. If the difference between its own calculation results and those of other data holders is within the set range, no operation will be performed; if the difference between its own calculation results and those of other data holders is not within the set range, mark itself; The model is trained again until the number of model training times reaches the set number. If the number of marks made by the data holder itself exceeds the set threshold, the encrypted data of the data holder is judged to be wrong; if the number of marks made by the data holder itself does not exceed the set threshold, the encrypted data of the data holder is judged to be correct.

6. The data analysis method based on privacy computing according to claim 5 is characterized in that: If after a round of model training, there are data holders who were marked in this round, then other data holders will perform model training on the encrypted data of the marked data holders in the next round of model training, and compare the calculation results with the previous calculation results. If the difference in the calculation results is within the set range, no operation will be performed. If the difference in the calculation results is not within the set range, the encrypted data of the marked data holder will be marked again.

7. The data analysis method based on privacy computing according to claim 5 is characterized in that: If after a round of model training, there are data holders who were marked in this round, then in the next round of model training, other data holders will use the encrypted data of the marked data holder for model training, and then use the encrypted data of another random data holder for model training, and compare the calculation results of the two. If the difference in the calculation results is within the set range, no operation will be performed. If the difference in the calculation results is not within the set range, the encrypted data of the marked data holder will be marked again.

8. A data analysis method based on privacy computing according to claim 6 or 7, characterized in that: When training a model, its own encrypted data is fused with other encrypted data for model training.

9. The data analysis method based on privacy computing according to claim 1 is characterized in that Differential privacy is introduced in model training and output analysis results, adding noise to protect individual data and ensure the accuracy of overall data analysis; Specifically, Laplace noise or Gaussian noise is used, and the noise intensity is dynamically adjusted according to the privacy budget to strike a balance between privacy protection and model performance, so as to balance data privacy protection and analysis accuracy.

10. The data analysis method based on privacy computing according to claim 1 is characterized in that: In step 5, a zero-knowledge proof protocol is introduced into the secure multi-party computing protocol to verify the accuracy of the calculation results.

Citation Information

Patent Citations

  • Model parameter verification method and device and readable storage medium

    CN111967609A

  • Federated learning defense method based on block chain

    CN112434280A

  • Data analysis method and device based on multi-party security computing

    CN119094101A

  • Private data protection method and system based on homomorphic encryption and federated learning

    CN119513919A

  • Mechanism for detecting data and model poisoning attack in federated learning

    WO2025003839A1

Cited By

  • Multi-source heterogeneous power data processing method and system

    CN120012142A