Abnormal structural data cleaning method based on homomorphic encryption
By using homomorphic encryption technology and the SOCI toolkit, we can efficiently identify and repair errors in encrypted data, solving the problems of privacy leakage and operational costs in data cleaning for privacy-preserving machine learning. It is applicable to a variety of machine learning scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 王妍
- Filing Date
- 2026-01-29
- Publication Date
- 2026-05-05
AI Technical Summary
In existing privacy-preserving machine learning, data cleaning methods cannot efficiently identify and correct errors in encrypted data, leading to increased risks of privacy leaks and operational costs. Furthermore, traditional methods are difficult to adapt to the needs of complex real-world scenarios.
Homomorphic encryption technology is employed, and error detection and repair are performed on encrypted data through the SOCI toolkit and homomorphic comparison functions. Trust domains are defined so that a third party can perform the cleaning operation, thus avoiding privacy leaks during the decryption process.
It enables efficient identification and repair of errors in encrypted data, reduces operating costs, ensures data privacy and security, and is applicable to various machine learning scenarios.
Smart Images

Figure CN121980141A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of data cleaning, and in particular relates to a method for cleaning abnormal structured data based on homomorphic encryption. Background Technology
[0002] Big data and machine learning (ML) technologies have driven significant changes in multiple fields. Machine learning (ML), leveraging massive amounts of training data and high-performance computing resources, has achieved remarkable results in various areas. With the widespread adoption of machine learning applications, concerns about privacy and security, as well as outsourcing demands, have arisen. Simultaneously, cloud computing and outsourcing services have made building machine learning applications more convenient. Users can send data to cloud servers providing outsourcing services, enjoying the advantages of machine learning technology while ensuring data privacy. To address data privacy issues, researchers have proposed and applied Privacy-Preserving Machine Learning (PPML) technology, aiming to specifically address various pain points in the field of data privacy, and it has already received widespread attention in related fields. Privacy-Preserving Machine Learning can protect various types of privacy in machine learning applications, such as dataset privacy, training model privacy, and participant association privacy. In privacy-preserving machine learning research, data cleaning plays a crucial role. Numerous studies have improved the performance of machine learning models through data processing, while also using machine learning models to improve the data cleaning process. In conventional data cleaning in machine learning research, data engineers can complete the cleaning step using simple methods, but in practice, various complex situations arise. Furthermore, during the training and evaluation phases, it may be necessary to return to the data cleaning step for reprocessing. On the one hand, data owners may lack the ability to perform data cleaning; on the other hand, third parties may find it difficult to trust that the datasets provided by data owners are clean. Therefore, the privacy-preserving data cleaning process has become a new challenge for privacy-preserving machine learning.
[0003] Existing privacy-preserving machine learning (PPML) methods all default to using clean datasets, failing to account for potential errors in real-world datasets. However, in real-world scenarios, factors such as human error in data entry and sensor malfunctions often lead to biases in the collected data. In the database field, this type of inaccurate, incomplete, or inconsistent data is referred to as "dirty data," "abnormal data," or "rough data." Data cleaning, as a crucial preprocessing step, refers to the process of detecting and identifying damaged, erroneous, or irrelevant problematic data from recordsets, tables, or databases, thereby providing a reliable foundation for subsequent processing of dirty or rough data.
[0004] Current data cleaning processes face two core challenges: First, the diversity of error detection and reliance on collaboration. Error detection is the first step in data cleaning, and its core difficulty lies in the complexity of data error types. Errors in real-world datasets include missing values, outliers, duplicate values, incorrect labels, and multi-dimensional mismatches. Based on the differences in the objects being processed, error detection can be divided into two categories: partial cleaning (PC), which mainly targets the above-mentioned basic error types. These errors are prevalent in most datasets, and the data owners are clearly aware of their corresponding constraints (such as numerical ranges and format specifications), making detection relatively easy; and complete cleaning (CC), which focuses on special errors that directly limit model performance. These errors are hidden and unpredictable, and their constraints are usually only known to a third party, making detection significantly more difficult. In addition, the post-detection repair stage also involves collaboration costs. Some error repairs rely on background information or verification feedback provided by the data owner and cannot be completed independently by a third party, further increasing the complexity of the cleaning process. Second, the applicability of data cleaning methods does not match the needs of real-world scenarios. Existing data cleaning methods are mostly designed based on simple scenarios. In real-world scenarios, the diversity of error types and the heterogeneity of data distribution make it difficult for traditional, simple methods to comprehensively cover all problems, resulting in poor cleaning effects. More importantly, data cleaning is easy to perform on unencrypted data. After encryption, errors are hidden by the encryption mechanism and cannot be directly observed. Choosing to clean up dirty data after encryption not only significantly increases the user's operational costs but also violates the core design principles of cloud servers: "remote collaboration and lightweight processing." In the error repair stage, existing methods also have limitations. For example, most error repair methods such as deletion, statistical value filling, and data owner-assisted repair are designed for scenarios where the data owner cleans the data themselves. Although some methods (such as deletion) are relatively friendly to third parties, additional operational costs arise when data owner participation is required. Therefore, there is an urgent need to propose new error repair methods that, while ensuring data quality and privacy security, reduce the cost to data owners and improve the practicality and efficiency of the cleaning process.
[0005] In outsourced machine learning scenarios, Privacy-Preserving Machine Learning (PPML) achieves two-way privacy protection for users and cloud servers through cryptographic techniques such as differential privacy, secret sharing, obfuscated circuits, and homomorphic encryption. Among these core technologies, homomorphic encryption (HE) plays a crucial role in PPML. Its core advantage lies in encrypting the data first, then performing operations on the ciphertext, ultimately yielding a ciphertext output consistent with the plaintext operation result. This provides a high level of privacy protection while significantly reducing transmission overhead. Currently, various machine learning algorithms within cloud server frameworks are implemented based on homomorphic encryption, and the Secure Integer Outsourced Computation (SOCI) platform provides fundamental tools such as K-means clustering, support vector machine training, and neural network prediction, both continuing the core characteristics of homomorphic encryption and assisting researchers in quickly designing privacy-preserving machine learning algorithms.
[0006] Existing research proposes using machine learning pipelines to manage the machine learning lifecycle, typically including core stages such as data collection, cleaning, feature extraction, model training, evaluation, and inference. The training accuracy and performance of machine learning models always depend on data quality. Privacy-preserving data cleaning, as a crucial link between data collection and feature extraction, is a core foundation for ensuring the effectiveness of subsequent model training and inference. The Privacy-Preserving Machine Learning Process (PPML) proposed by Xu et al. covers three trust domains—data owner, third-party cloud platform, and computing service provider—and divides the process into four core stages, but it neglects the critical data cleaning step. In practical applications, data owners often lack professional data cleaning capabilities, and performing cleaning operations themselves significantly increases their operational burden. Therefore, having a third party perform privacy-preserving data cleaning functions is more in line with the application requirements of Privacy-Preserving Machine Learning (PPML). Homomorphic encryption technology provides key technical support for third parties to perform cleaning operations without compromising data privacy, ensuring privacy security and processing efficiency during the data cleaning process. How to efficiently execute privacy-preserving data cleaning functions based on this technology within the adjusted trust domain has become one of the core challenges of privacy-preserving data cleaning.
[0007] The ideal goal of privacy-preserving data cleaning is to build a toolkit that supports all the basic operations of data cleaning functions, enabling third parties to perform privacy-preserving data cleaning (PPDC) as easily as performing regular data cleaning (DC). Privacy-preserving operations validated during model training, such as comparison operations used in outlier detection and model training, can be migrated to data cleaning functions. However, this approach relies heavily on privacy-preserving operations, making it difficult to achieve optimal efficiency. Another effective approach is to select "privacy-friendly" data cleaning methods and implement them using existing privacy-preserving operations. For example, in the error correction phase, deletion can be used instead of data owner assistance to improve efficiency; however, such methods cannot cover all application scenarios.
[0008] Existing privacy-preserving data cleaning (PPDC) methods are mainly divided into three categories: data quality assessment, privacy-preserving record linking, and differential privacy data cleaning. Each method has its own characteristics and application limitations. Regarding data quality assessment, Freudig has focused on the problem of data quality assessment in privacy-preserving scenarios, proposing several security protocols that can achieve privacy-preserving assessments of data aggregation, integrity, validity, consistency, and uniqueness. This model involves two parties: the server holds a private dataset, and the client uses its own private constraint parameters to complete the dataset quality assessment, while simultaneously ensuring both data privacy and query privacy. However, such methods can only provide users with feedback on the overall data quality level and cannot accurately identify specific errors in the dataset. Privacy-preserving record linking technology can achieve matching and identification of the same entity records in multiple databases. Its core relies on cryptographic primitives such as homomorphic encryption, secure multi-party computation protocols, differential privacy, and hash functions, and it performs exceptionally well in the scenario of deduplication during privacy-preserving data cleaning. Regarding differential privacy data cleaning, Krishnan points out that most differential privacy mechanisms assume the underlying dataset is clean. Therefore, his team focuses on private data cleaning based on differential privacy, proposing the PrivateClean framework. This framework covers the construction techniques of private datasets with numerical and discrete attributes, formal methods for privacy-preserving data cleaning, and response techniques that support summation, counting, and average queries after cleaning. However, the security of differential privacy applications in privacy-preserving machine learning requires more thorough theoretical proof. The method proposed by Shockley and Shmatkov may leak private training data to "honest but curious" servers.
[0009] In machine learning, data cleaning is a crucial process that impacts model performance. Dirty data is easily detected in plaintext. However, in privacy-preserving machine learning, identifying errors in encrypted data becomes much more challenging. To date, this issue has not received sufficient attention. Summary of the Invention
[0010] Based on the shortcomings of the existing technology, the technical problem solved by the present invention is to provide an abnormal structure data cleaning method based on homomorphic encryption. It does not require decryption of the encrypted dataset and can directly perform data cleaning operations on the ciphertext. It can accurately identify and mark erroneous data elements, avoid the risk of data plaintext exposure from the root, and solve the core contradiction in traditional data detection between "privacy leakage caused by decrypting the original data" and "encrypted data cannot be detected". It can achieve a balance between privacy protection and data detection needs.
[0011] To solve the above-mentioned technical problems, the present invention provides a method for cleaning abnormal structured data based on homomorphic encryption, comprising the following steps:
[0012] S1. Cleaning of abnormal structured data based on homomorphic encryption;
[0013] S2, SOCI toolkit and extensions;
[0014] S3, Homomorphic Comparison Function Scheme Flow;
[0015] S4. Homomorphic data cleaning based on the SOCI toolkit.
[0016] Furthermore, in step S1, the data cleaning performed by the data owner is defined as C1, and the data cleaning performed by the third party is defined as C2. The data cleaning process converted into the trust domain is centrally displayed, including error detection and error repair. It involves the known constraints of the data owner, the known constraints of the third party, and the execution process of the third party. Error repair requires the assistance of the data owner.
[0017] Optionally, in step S2, the SOCI toolkit is built on the Paillier cryptosystem and supports homomorphic encryption operations. The SOCI toolkit is used to implement a privacy-preserving machine learning process.
[0018] Furthermore, in step S3, the privacy-preserving data cleaning defines the data cleaning problem to be performed within the transformed trust domain as a homomorphic comparison function. The input is the dataset and constraints, and the output is the dataset that satisfies the constraints. When this data cleaning function is executed within the trust domain, it is equivalent to the regular data cleaning process in the machine learning process. In this privacy-preserving data cleaning process, the data owner can execute the data cleaning function within the trust domain, while third parties need to use privacy-preserving machine learning methods to execute the privacy-preserving data cleaning function within the transformed trust domain.
[0019] Therefore, the abnormal structure data cleaning method based on homomorphic encryption of the present invention has the following beneficial effects:
[0020] 1. This invention studies the data cleaning problem in Privacy-Preserving Machine Learning (PPML) and proposes the term "homogeneous data cleaning," clarifying the definition of "data cleaning process performed on encrypted ciphertext," which is used to refer to the data cleaning process performed on encrypted ciphertext. This establishes a unified conceptual foundation for academic research, technological development, and industrial applications in the field of PPML data cleaning, and helps to promote the formation of a standardized technical system and research paradigm in this area.
[0021] 2. This invention designs a homomorphic data cleaning scheme that centrally detects errors in encrypted data. This avoids the privacy leakage risk caused by data decryption and achieves the same error identification effect as plaintext data cleaning, thus balancing data privacy and security with data quality control.
[0022] 3. The homomorphic comparison function (HCF) used in the homomorphic data cleaning (HDC) proposed in this invention can be implemented using any existing secure comparison protocol, significantly reducing the development, adaptation, and deployment costs of the solution. Theoretically, the HDC solution can be applied to all privacy-preserving machine learning solutions that support homomorphic comparison operations, without being limited to specific scenarios or model architectures, and has broad technical compatibility and scenario scalability. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of the privacy-preserving data cleaning process of the present invention;
[0025] Figure 2 This is a flowchart of the homomorphic comparison function scheme of the present invention;
[0026] Figure 3 This invention provides a homomorphic data cleaning scheme based on the SOCI toolkit. Detailed Implementation
[0027] The specific implementation of the abnormal structured data cleaning method based on homomorphic encryption of the present invention will be described in detail below with reference to the accompanying drawings.
[0028] like Figures 1 to 3As shown, this invention presents a method for cleaning anomalously structured data based on homomorphic encryption. It reviews the problems and challenges of privacy-preserving data cleaning and existing privacy-preserving data cleaning methods. The invention details a homomorphic data cleaning protocol based on the SOCI toolkit and explains its implementation within the SOCI toolkit. The protocol is applied to two real-world datasets, a cardiovascular disease dataset and a GeoLife GPS trajectory dataset, to evaluate its efficiency and security. Detailed experimental parameters and other information have been uploaded to the GitHub page, including the following steps:
[0029] I. Cleaning of Anomalous Structured Data Based on Homomorphic Encryption
[0030] This invention adds a data cleaning step to the privacy-preserving machine learning process and divides the trust domain into two categories, corresponding to the data owner and the third-party cloud server, respectively. Both can perform the data cleaning process. For ease of distinction, this invention defines the cleaning performed by the data owner as C1 and the cleaning performed by the third party as C2. After the data preparation stage, "partial cleaning (PC)" is required to remove basic errors in the dataset. Before the model training and evaluation stages, data analysis is usually needed to improve model performance, which means that third parties have data cleaning needs in order to train a better-performing model. This invention defines this cleaning process as "complete cleaning (CC)". Furthermore, this invention uses RC1 and RC2 to represent data cleaning requests initiated to the data owner and the third party, respectively.
[0031] As shown in Figure 1, the privacy-preserving data cleaning process (PPDC) described in this invention omits the model development and model inference stages and focuses on demonstrating the data cleaning process in the trust domain. It includes error detection and error repair, involving known constraints of the data owner, known constraints of third parties, and third-party execution processes. Error repair requires the assistance of the data owner.
[0032] II. SOCI Toolkit and Extended Protocols
[0033] The SOCI toolkit is built on the Paillier cryptosystem and supports homomorphic encryption operations. It can implement common operations in outsourced computation, such as multiplication, comparison, sign bit retrieval, and division. In a dual-non-collusion server architecture, the SOCI toolkit can be used to implement privacy-preserving machine learning workflows. Table 1 below describes the protocols in the SOCI toolkit, where E(a) and E(b) represent the encryption results of values a and b, respectively; the SMUL() protocol outputs the encryption result of the multiplication operation of a and b; the SCMP() protocol is jointly executed by the cloud platform (CP) and the computing service provider (CSP), taking two ciphertexts E(a) and E(b) as input and outputting the encryption result of the comparison operation of E(0) or E(1); the SDIV() protocol outputs the encryption result of the comparison operation of E(0) or E(1). The encrypted results of the quotient q and remainder e are E(q) and E(e).
[0034] Table 1 Security Protocols in the SOCI Toolkit
[0035]
[0036] 1. Safety Mean Protocol SMean() and Safety Standard Deviation Protocol SSD()
[0037] The SOCI toolkit can be extended to include various other computation protocols. This invention extends and implements the Secure Mean (SMean()) protocol and the Secure Standard Deviation (SSD()) protocol. The Secure Mean protocol takes an encrypted vector E(x) as input and outputs the encrypted mean of that ciphertext vector. The specific process is shown in Table 2.
[0038] Table 2. Security Meaning Protocol Based on SOCI Toolkit Extension
[0039]
[0040] 2. Security Standard Deviation Protocol SSD ()
[0041] The Secure Standard Deviation Protocol (SSD) is implemented based on an extension of the SOCI toolkit. It takes an input encryption vector E(x) and outputs the encryption result based on the standard deviation. The specific process is shown in Table 3:
[0042] Table 3. Security Standard Deviation Protocol Based on SOCI Toolkit Extension
[0043]
[0044] 3. Homomorphic comparison function protocol HCF()
[0045] The Homomorphic Comparison Function (HCF) is implemented based on the Secure Comparison Protocol (SCMP) in the SOCI toolkit. Its input includes the encryption result E(x) of each data element x, and the encryption results E(a) and E(b) of the range boundaries a and b that data element x must satisfy (i.e., x must satisfy...). Agreement 3 is shown in Table 4:
[0046] Table 4. Homomorphic comparison function protocol based on SOCI toolkit extension.
[0047]
[0048] The homomorphic comparison function is calculated as F(E(x), E(a), E(b)), where the result of y is either the encryption result of 0 or the encryption result of 1, as defined below:
[0049] \[y=\begin{cases}E(1)&\text{if} x <a \text{ 或} x>b \\E(0) & \text{if} x\geq a \text{ and} x\leq b \end{cases}\]
[0050] III. Homomorphic Comparison Function Scheme Flow
[0051] The Privacy-Preserving Data Cleaning (PPDC) proposed in this invention defines the data cleaning (DC) problem, performed within a transformed trust domain, as a homomorphic comparison function (HDF). The input is the dataset and constraints, and the output is a dataset that satisfies the constraints. When this data cleaning function is executed within the trust domain, it is equivalent to the conventional data cleaning process in machine learning. In this privacy-preserving data cleaning process, the data owner can execute the data cleaning function within the trust domain, while third parties need to use privacy-preserving machine learning methods to execute the privacy-preserving data cleaning function within the transformed trust domain.
[0052] This invention relates to three parties: a data owner (DO), a cloud server called a "cloud platform (CP)," and a cloud server called a "computing service provider (CSP)." The PaillierTD algorithm is a variant of the traditional Paillier cryptosystem. This algorithm splits the private key into two parts; only by using both parts simultaneously can the ciphertext be correctly decrypted; a single part cannot complete the decryption. Therefore, after generating a Paillier key pair, the data owner (DO) sends it to both the cloud platform (CP) and the computing service provider (CSP). The cloud platform (CP) holds one part of the key and receives the encrypted data from the data owner (DO); the computing service provider (CSP) holds the other part of the key and provides computational support to the cloud platform (CP). The user encrypts the dataset using a homomorphic encryption algorithm and sends the encrypted dataset to the cloud servers. After receiving the encrypted dataset, the two cloud servers process it using a specially designed "homomorphic comparison function," which outputs either 0 or 1 for encryption. The two cloud servers iterate through all encrypted data records, identifying errors within a predefined data range; if any encrypted data exceeds this range, it is determined that an error exists. The process flow is shown in Figure 2.
[0053] Figure 2 The process involves the interaction between the user and two cloud servers: the user sends encrypted range values E(a) and E(b) and encrypted data element E(x) to the cloud server, and the cloud server processes the data using a homomorphic comparison function, outputting either E(0) or E(1). Once the user has completed data encryption and upload, they can log off, and subsequent secure computation will be performed collaboratively by the cloud platform (CP) and the computing service provider (CSP).
[0054] IV. Homomorphic Data Cleaning (HDC) Based on SOCI Toolkit
[0055] Based on the SOCI toolkit, this invention implements homomorphic data cleaning for three basic error types: missing values, outliers, and duplicate values. The definitions, detection methods, and repair methods for each type of error are shown in Table 5.
[0056] Table 5 Data Cleaning Methods for Homomorphic Encryption
[0057]
[0058] In this invention, the numerical data record matrix is denoted as x, and the label vector is denoted as y, where i and j are the row index and column index, respectively; E(a) represents the encryption of the numerical value a, and E(X) represents the encryption of the data record; the subscript c represents the cleaned dataset. Standard deviation can be used for outlier detection. The specific steps are as follows: First, calculate the mean μ and standard deviation σ of a column of data; then determine the range for outlier detection. In this invention, n is 3.
[0059] The following describes homomorphic data cleaning protocols based on the SOCI protocol for three types of fundamental errors. Among them, the Homomorphic Missing Value Cleaning Protocol (HMVCP) takes an encrypted dataset E(X) as input and outputs the repaired data in ciphertext format. It is important to note that in this protocol, missing values are defined as empty cells in the dataset, stored in plaintext "NaN" format. These "NaN" empty records are filled with the mean of each column, as shown in Table 6.
[0060] Table 6 Homomorphic Missing Value Cleaning Protocol
[0061]
[0062] Homomorphic Data Cleaning (HDC) Solution Based on SOCI Toolkit
[0063] In the threat model definition, the data owner (DO), holding sensitive data, is considered an "honest" participant. The cloud platform (CP) and compute service provider (CSP), representing potential attackers, are defined as "honest but curious"—meaning potential attackers will correctly execute computational tasks according to the prescribed computing protocols but may attempt to obtain sensitive information by analyzing the data. In the security analysis of the data cleansing scheme proposed in this question, by default, all participants have access to the ciphertext and public key. The cloud platform (CP) privately holds a portion of the private key. The computing service provider (CSP) privately holds a portion of the private key. Use only a single private key. or Since the ciphertext cannot be decrypted, neither the cloud platform (CP) nor the compute service provider (CSP) can extract any information from it. Furthermore, the security of the Secure Comparison Protocol (SCMP) and the PaillierTD algorithm has been proven in the research of Xu et al. After the user encrypts the data, all data transmitted in this invention is ciphertext. This demonstrates that this invention has high security. This homomorphic data cleaning scheme comprises two main stages: an initialization stage and a cleaning stage. Specific processes and examples are as follows... Figure 3 As shown.
[0064] 1. The data owner (DO) generates a key pair pk, sk1, sk2, and encrypts the dataset to obtain... , , Encrypting the range values yields E(a) and E(b);
[0065] 2. The cloud platform (CP) receives and holds the key pair pk, sk1, and the encrypted dataset. , , With encryption range values E(a) and E(b); the computing service provider (CSP) holds the key pair pk and sk2;
[0066] 3. The cloud platform (CP) and the computing service provider (CSP) collaboratively execute the homomorphic comparison function (HCF): with E(x1), E(a), and E(b) as inputs, the output is E(μ1); with E(x2), E(a), and E(b) as inputs, the output is E(μ2); with E(x3), E(a), and E(b) as inputs, the output is E(μ3).
[0067] 4. The data owner (DO) receives ciphertext E(μ1), decrypts it to obtain result μ1; ciphertext E(μ2), decrypts it to obtain result μ2; ciphertext E(μ3), decrypts it to obtain result μ3. If μ1=1, it indicates that x1 is an erroneous data record.
[0068] During the initialization phase, the data owner (DO) generates a key pair and distributes it to the cloud platform (CP) and the compute service provider (CSP). Simultaneously, the data owner (DO) sets a range value to identify errors in the dataset. Subsequently, the dataset and the range value are encrypted, and the ciphertext is sent to the cloud platform (CP). In the cleansing phase, the data owner (DO) goes offline, and the cloud platform (CP) and compute service provider (CSP) interactively execute a homomorphic comparison function (HCF). After the function execution is complete, the cloud platform (CP) obtains the encrypted comparison result and sends it to the data owner (DO). The data owner (DO) decrypts the comparison result to locate the errors in the dataset.
[0069] Experiments and Evaluation
[0070] This experiment utilizes the GNU Multiprecision Arithmetic Library (GMP) and the Secure Outsourced Computation (SOCI) toolkit. The SOCI toolkit, built upon the Paillier homomorphic algorithm and a dual-server architecture, includes four protocols: secure multiplication, secure comparison, secure sign bit retrieval, and secure division. This experiment employs the secure comparison protocol to implement a homomorphic data cleaning method and conducts related experiments.
[0071] The experiment used two real-world datasets: a cardiovascular disease dataset and a GeoLife GPS trajectory dataset. The cardiovascular disease dataset contains 12 features and 70,000 records. Blood pressure values in this dataset may contain errors, such as systolic pressure of -150 and diastolic pressure of 1100, which typically occur during manual data entry. The experiment selected four features from this dataset (height, weight, systolic blood pressure, and diastolic blood pressure) for study. The original dataset was in plaintext format; the experiment used the Paillier algorithm to encrypt it, with the encryption parameters set as follows: Bit, Bit, Bit, Bit, Bit, Bits. Public key is (n, g), private key is The specific parameter values have been uploaded to the GitHub page.
[0072] The experiment performed a homomorphic data cleaning algorithm on a Paillier-encrypted cardiovascular disease dataset, and the encrypted results were saved to a GitHub page. Reasonable ranges were set for each feature: height [0, 213], weight [0, 400], systolic blood pressure [0, 300], and diastolic blood pressure [0, 200]. After running the algorithm, 47 potential errors were found in the systolic blood pressure data and 957 potential errors in the diastolic blood pressure data, accounting for 0.067% and 1.36% of the total data for their respective features. Similarly, the GeoLife GPS trajectory dataset contains 17,621 data points, each ranging from hundreds to thousands in length, including longitude, latitude, altitude, and time information. Errors in this dataset manifest as sudden changes in position within the trajectory. The experiment selected longitude and latitude features and chose a relatively long single trajectory for study. Since the longitude and latitude information are fixed-precision floating-point numbers, they need to be converted to integers before encryption. In this dataset, the longitude and latitude variations during sampling time should be within the range specified by professionals. The experiment identified nine suspected erroneous longitude and latitude variation data points greater than 0.01, accounting for 0.052% of one trajectory.
[0073] Table 7 Computation and Communication Costs
[0074]
[0075] The experimental results are summarized in Table 7. Where m is the number of data records. It is the dimension of the dataset. This is a safety parameter for the Paillier algorithm. When... At that time, the security level is 128. The size of a ciphertext is [size missing]. The communication cost is measured by the amount of data sent and received. Therefore, the server's communication cost is 14 mln bits, and the data owner's (DO) communication cost is... Our experimental results on two existing datasets demonstrate that homomorphic data cleaning can be completed within seconds. Homomorphic Data Cleaning (HDC) as a service can be provided by servers as an add-on service for privacy-preserving machine learning (PPML) clients.
[0076] This invention proposes a homomorphic data cleaning (HDC) scheme based on a homomorphic comparison function (HCF). The HCF can be implemented based on any existing secure comparison protocol without reconstructing the underlying cryptographic primitives and can be embedded into various privacy-preserving machine learning schemes that support homomorphic comparison operations. This invention applies the SOCI toolkit to this homomorphic data cleaning scheme, extending and implementing the secure mean protocol SMean() and the secure standard deviation protocol SSD(). These two protocols provide crucial support for data cleaning in ciphertext scenarios. To verify the effectiveness and practicality of the scheme, systematic experiments were conducted on two real-world datasets.
[0077] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and should not be construed as limiting the scope of the invention. It should be pointed out that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for cleaning abnormally structured data based on homomorphic encryption, characterized in that, Includes the following steps: S1. Cleaning of abnormal structured data based on homomorphic encryption; S2, SOCI toolkit and extensions; S3, Homomorphic Comparison Function Scheme Flow; S4. Homomorphic data cleaning based on the SOCI toolkit.
2. The method for cleaning abnormal structured data based on homomorphic encryption according to claim 1, characterized in that, In step S1, the data cleaning performed by the data owner is defined as C1, and the data cleaning performed by the third party is defined as C2. The data cleaning process converted into a trust domain is centrally displayed, including error detection and error repair. It involves known constraints of the data owner, known constraints of the third party, and the third party's execution process. Error repair requires the assistance of the data owner.
3. The method for cleaning abnormal structured data based on homomorphic encryption according to claim 1, characterized in that, In step S2, the SOCI toolkit is built on the Paillier cryptosystem and supports homomorphic encryption operations. The SOCI toolkit is used to implement a privacy-preserving machine learning process.
4. The method for cleaning abnormal structured data based on homomorphic encryption according to claim 1, characterized in that, In step S3, the privacy-preserving data cleaning process defines the data cleaning problem to be performed within the transformed trust domain as a homomorphic comparison function. The input is the dataset and constraints, and the output is the dataset that satisfies the constraints. When this data cleaning function is executed within the trust domain, it is equivalent to the regular data cleaning process in the machine learning process. In this privacy-preserving data cleaning process, the data owner can execute the data cleaning function within the trust domain, while third parties need to use privacy-preserving machine learning methods to execute the privacy-preserving data cleaning function within the transformed trust domain.