Big data logistic regression privacy protection method, system, equipment and medium
By using confidential smart contracts and fully homomorphic encryption technology, the privacy leakage problem of logistic regression algorithms in cloud computing environments is solved, and secure computation and efficient processing of data in an encrypted state are achieved.
Patent Information
- Application Number
- CN202411011623.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-11-15
AI Technical Summary
In cloud computing environments, the privacy breach issue of logistic regression algorithms cannot be effectively addressed, threatening data security.
A confidential smart contract-driven approach is adopted, which combines fully homomorphic encryption technology to encrypt the data and performs homomorphic computation on a cloud computing platform. The Taylor theorem approximate logistic regression algorithm is used to ensure the security and computability of the data in the encrypted state.
It enables logistic regression calculations without decryption, ensuring data privacy and security, and improving the transparency and efficiency of data processing.
Smart Images

Figure CN118965431A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer science and information security, and specifically relates to a big data logistic regression privacy protection method, system, device and medium driven by a confidential smart contract. Background Art
[0002] With the continuous advancement of technology, cloud computing platforms have provided strong support for processing large-scale data with their powerful computing power and huge storage space. As the basic environment for data processing and storage, cloud computing provides the necessary hardware and software resources for the implementation of machine learning algorithms, thereby promoting the widespread application and development of machine learning technology.
[0003] As a popular machine learning classification method, the application of logistic regression algorithm in cloud environment shows great potential for data processing. However, due to the possibility of privacy leakage in training data processing, data privacy cannot be guaranteed. As the data processing process deepens, it poses a serious threat to data security. Therefore, more effective privacy protection measures need to be taken to ensure data security and compliance. Summary of the invention
[0004] In response to the privacy leakage problem of the logistic regression algorithm in the cloud computing environment, the purpose of the present invention is to provide a big data logistic regression privacy protection method, system, device and medium driven by a confidential intelligent contract, which comprehensively applies fully homomorphic encryption and intelligent contracts to the logistic regression algorithm in the cloud computing environment to protect the privacy security of big data processing.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] In a first aspect, the present invention provides a privacy protection method for big data logistic regression driven by a confidential smart contract, comprising the following steps:
[0007] The client uses fully homomorphic encryption technology to encrypt data locally and generate ciphertext;
[0008] Deploy confidential smart contracts on the cloud computing platform and perform fully homomorphic computation on the uploaded ciphertext data;
[0009] The client downloads the calculation results of the cloud computing platform to the local side and decrypts them to obtain the data processing results.
[0010] Furthermore, the client uses fully homomorphic encryption technology to encrypt data locally to generate ciphertext, including:
[0011] Perform data preparation and scaling processing on the local side to obtain training sample data in integer form;
[0012] Based on the preset fully homomorphic encryption technology, a public key, a private key, and an evaluation key are generated, and the scaled training sample data is encrypted using the public key to generate ciphertext data.
[0013] Furthermore, the data preparation and scaling processing is performed on the local side to obtain training sample data in integer form as plain text, including:
[0014] Determine floating point accuracy requirements based on actual needs;
[0015] Select a scaling factor based on the determined floating point precision requirements;
[0016] Verify the suitability of the scaling factor based on the preset integer range of the confidential smart contract;
[0017] Apply the scaling factor to all floating-point input parameters and coefficients in the training sample data to obtain scaled integer data;
[0018] The scaled integer data is reversely converted to check whether the converted data meets the original data precision. If so, the scaled data is output; otherwise, the scaling factor is returned to be reselected.
[0019] Furthermore, when the scaled training sample data is encrypted using the fully homomorphic encryption technology, the fhEVM fully homomorphic encryption algorithm is adopted.
[0020] Furthermore, when deploying the confidential smart contract on the cloud computing platform and performing fully homomorphic calculations on the uploaded ciphertext data, a logistic regression algorithm including Taylor's theorem approximation is adopted.
[0021] Furthermore, when the confidential smart contract is deployed on the cloud computing platform, the development environment is Remix IDE and Visual Studio Code.
[0022] Furthermore, the client downloads the calculation results of the cloud computing platform to the local side and decrypts them to obtain the data processing results, including:
[0023] After receiving the encrypted result, the client uses the pre-generated private key to perform decryption and obtain the plain text form of the calculation result;
[0024] The calculation result is divided according to the selected scaling factor to restore and obtain the final processing result.
[0025] In a second aspect, the present invention provides a big data logistic regression privacy protection system, comprising:
[0026] The client is used to encrypt data using fully homomorphic encryption technology on the local side to generate ciphertext, and after the cloud computing platform completes the processing of the ciphertext data, it downloads the processing results to the local side and uses the private key to decrypt the data to obtain the data processing results;
[0027] A cloud computing platform used to deploy confidential smart contracts and perform homomorphic computations on ciphertext data uploaded by the client.
[0028] In a third aspect, the present invention provides a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any method.
[0029] In a fourth aspect, the present invention provides a computing device, comprising: one or more processors and a memory, wherein the memory stores one or more programs and is configured to be executed by the one or more processors, and the one or more programs include instructions for executing any method.
[0030] The present invention adopts the above technical solution, which has the following advantages:
[0031] 1. The present invention allows direct execution of logistic regression calculations while keeping data completely encrypted through fully homomorphic encryption, thereby eliminating the need for decryption during the entire data processing process, thereby ensuring privacy security;
[0032] 2. The present invention enhances the security and transparency of data processing by deploying confidential smart contracts, and automatically executes business logic to improve efficiency;
[0033] Therefore, the present invention can be widely applied in the fields of computer science and information security. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Throughout the accompanying drawings, the same reference numerals are used to represent the same components. In the accompanying drawings:
[0035] Figure 1 It is the Sigmoid function curve graph;
[0036] Figure 2 This is an overview diagram of the homomorphic encryption algorithm;
[0037] Figure 3 A framework diagram of a privacy protection method for big data logistic regression driven by a confidential smart contract provided in an embodiment of the present invention;
[0038] Figure 4Flowchart of the privacy protection method for big data logistic regression driven by a confidential smart contract provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0040] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0041] Blockchain technology, with its decentralized, secure and tamper-proof data management framework, can effectively support the implementation of confidential smart contracts and significantly improve the security and trust of data processing.
[0042] As an innovative application combined with blockchain technology, smart contracts can automatically execute preset business logic without the intervention of a third party, thus greatly improving the efficiency and security of transactions. In this method, confidential smart contracts play a vital role. They are specifically used to manage and execute security protocols and privacy protection measures for data processing, ensuring that the entire data processing process is both secure and transparent, and providing strong technical support for the reliable circulation of data and privacy protection.
[0043] As a cutting-edge encryption technology, fully homomorphic encryption (FHE) is unique in that it allows calculations to be performed directly on encrypted data without decryption, thereby ensuring the privacy of data during processing.
[0044] Based on the above analysis, in some embodiments of the present invention, a privacy protection method for big data logistic regression driven by a confidential smart contract is provided, which comprehensively applies fully homomorphic encryption and smart contracts to the logistic regression algorithm in a cloud computing environment. The method includes: first, encrypting the training samples locally to generate ciphertext; second, deploying an encrypted smart contract in the cloud to execute the logistic regression algorithm approximated by Taylor's theorem to achieve data calculation in an encrypted state; finally, the smart contract encrypts the processing result and returns it to the local, and decrypts it with a private key to obtain the final processing result. The present invention is applicable to the fields of finance, healthcare, network security, etc., and provides a safe and effective privacy protection solution for big data processing in cloud computing.
[0045] Correspondingly, in some other embodiments of the present invention, a confidential smart contract-driven big data logistic regression privacy protection system, device and medium are provided.
[0046] In order to better understand the present invention, the preliminary knowledge involved in the present invention is first introduced, which mainly includes:
[0047] (1) Logistic regression
[0048] Logistic regression is a machine learning and statistical algorithm for classification. It predicts the probability of an event by building a logistic function model. Unlike linear regression, logistic regression outputs probability values rather than continuous values. The output is converted into a probability between 0 and 1 through the Sigmoid function, making it suitable for binary classification problems. Logistic regression is easy to implement, efficient, and highly interpretable. It is widely used in areas such as advertising click prediction, disease diagnosis, and financial risk assessment.
[0049] Among them, the mathematical expression of the Sigmoid function is:
[0050]
[0051] In the formula, x is a variable. Figure 1 The Sigmoid function curve is shown. It can be seen that the output value of this function is strictly between (0, 1), which makes it an ideal choice for describing probability.
[0052] (2) Fully Homomorphic Encryption
[0053] Fully homomorphic encryption (FHE) is an encryption method that allows arithmetic operations (such as addition and multiplication) to be performed directly on encrypted data, while the results remain encrypted. When these results are decrypted, the results are the same as if the same operations were performed directly on the original data. This feature allows fully homomorphic encryption to protect data privacy while also enabling complex data processing and analysis, making it very suitable for cloud computing and big data processing scenarios, where data security and privacy protection are critical.
[0054] like Figure 2 As shown in the figure, it is a fully homomorphic encryption process. In this process, the data sender encrypts the plaintext data with the public key to obtain the ciphertext. After the data processing is completed, the ciphertext is decrypted with the private key and the decrypted plaintext is sent to the data receiver.
[0055] Example 1
[0056] like Figure 3 and Figure 4 As shown, this embodiment provides a confidential smart contract driven big data logistic regression privacy protection method, which includes the following steps:
[0057] S1. The client uses fully homomorphic encryption technology to encrypt data locally and generate ciphertext.
[0058] S2. Deploy a confidential smart contract on the cloud computing platform and perform fully homomorphic computation on the uploaded ciphertext data. The confidential smart contract contains a logistic regression algorithm approximated by Taylor’s theorem.
[0059] S3. The client downloads the calculation results of the cloud computing platform to the local side and decrypts them to obtain the data processing results.
[0060] Furthermore, the above step S1 includes the following steps:
[0061] S11, performing data preparation and scaling processing on the local side to obtain training sample data in integer form, that is, plaintext data;
[0062] S12. Use fully homomorphic encryption technology to encrypt the scaled training sample data to generate ciphertext data.
[0063] Furthermore, in the above step S11, on the blockchain, especially on a platform such as Ethereum, smart contracts do not support floating point numbers, and the training sample data usually needs to be converted into integer data. In this embodiment, by selecting a suitable scaling factor, all floating point input parameters and coefficients in the training sample data are multiplied by the scaling factor and converted into integer form.
[0064] Specifically, the steps include:
[0065] S111. Determine floating point number precision requirements based on actual needs.
[0066] First, it is necessary to clarify the precision requirements of floating-point data, that is, how many digits need to be retained after the decimal point. This can be determined based on the actual application scenario.
[0067] S112. Select a scaling factor according to the determined floating point number precision requirement.
[0068] Assuming that the scaling involves only coefficients represented by floating point numbers, choose a scaling factor based on the precision of the smallest coefficient. If we choose 10 4 As a scaling factor, this means we need to multiply all coefficients by 10 4 to convert them to integers, ensuring that no additional errors are introduced during the conversion process.
[0069] S113. Verify the applicability of the scaling factor based on a preset integer range of the confidential smart contract.
[0070] Convert floating point numbers to integers after multiplying them by the chosen scaling factor, ensuring that these integers are within the integer range of the confidential smart contract.
[0071] S114. Apply a scaling factor to all floating-point input parameters and coefficients in the training sample data to obtain scaled integer data.
[0072] Multiply each floating point coefficient by the scaling factor. For example: 0.25 becomes 2500 after scaling, -0.021 becomes -210 after scaling, and 0.002 becomes 20 after scaling.
[0073] S115, reversely convert the scaled integer data to check whether the converted data meets the original data precision. If so, output the scaled data; otherwise, return to step S112 to reselect the scaling factor.
[0074] The converted integer data is reversed, that is, divided by the scaling factor, and the resulting floating-point number is checked to see if it retains the original precision.
[0075] Further, in the above step S12, using fully homomorphic encryption technology to encrypt the scaled training sample data refers to using the encryption function in the fully homomorphic encryption scheme to convert the plaintext data into ciphertext data using a public key. Before using the fully homomorphic encryption technology to encrypt the scaled integer data, it is first necessary to select a suitable fully homomorphic encryption algorithm.
[0076] In this embodiment, several fully homomorphic encryption algorithms are compared, and the comparison results are shown in Table 1 below.
[0077] Table 1 Comparison of different fully homomorphic encryption algorithms
[0078]
[0079] From Table 1, we can see that compared with the classic fully homomorphic encryption algorithms BGV, BFV and CKKS, fhEVM can provide faster computing speed and more efficient performance. In terms of developer experience, using fhEVM to build and maintain applications is simpler and more intuitive than other solutions. More importantly, fhEVM can easily adapt to algorithm updates or optimizations by leveraging the flexibility and updatability of smart contracts, providing better scalability and future compatibility. With the help of the characteristics of blockchain technology, cross-organizational data sharing and collaborative computing can be achieved while ensuring data privacy, thereby improving cooperation efficiency.
[0080] Therefore, this embodiment selects the fhEVM algorithm to handle the nonlinear function problem encountered in the encryption calculation process.
[0081] Furthermore, in the above step S2, in the logistic regression model, the key Sigmoid function has nonlinear characteristics, which is mainly manifested in its inclusion of division and exponential operations. This is in contrast to the main features of the fully homomorphic encryption scheme, because fully homomorphic encryption mainly supports linear operations such as addition, subtraction, and multiplication, but does not directly support division and exponential operations. Considering the limitations of homomorphic encryption, the Sigmoid function must be approximated by supporting operations.
[0082] To this end, the present invention proposes to use Taylor's theorem to approximate the Sigmoid function with a polynomial to eliminate division and exponential operations, so that the ciphertext can be directly calculated using fully homomorphic encryption technology. The Sigmoid function is approximated by Taylor's theorem as follows:
[0083]
[0084] Formula (2) represents an approximate polynomial of the Sigmoid function, where the coefficient of each term is a function of the derivative value of each order of the function at x = 0. In fully homomorphic encryption, the most computationally complex is x 5 The calculation of , requires five consecutive multiplications of a single variable x. In practical applications, usually only the first few terms of this series are taken to approximate the Sigmoid function to reduce computational complexity.
[0085] The present invention adopts Zama's fully homomorphic Ethereum virtual machine (fhEVM) technology to build a confidential smart contract and deploy it to the cloud to achieve the aforementioned computational approximation through Taylor's theorem.
[0086] Furthermore, in this embodiment, when building a confidential smart contract, the development environment is Remix IDE (Zama version) and Visual Studio Code (1.81.1).
[0087] Furthermore, the above step S3 includes the following steps:
[0088] S31. After receiving the encryption processing result, the client uses the pre-generated private key to perform a decryption operation to obtain the plain text form of the calculation result;
[0089] S32. Perform a division operation on the calculation result according to the selected scaling factor, and restore and obtain the final processing result.
[0090] Specifically, in this embodiment, the data processing process can be divided into different tasks on the client and the cloud. The method for constructing a confidential smart contract includes the following steps:
[0091] Client tasks:
[0092] KeyGen(sec,m)→(pk,evk,sk): Given the security parameter sec and the training sample plaintext m, generate the public encryption key (i.e., public key) pk, the evaluation key evk, and the private decryption key (i.e., private key) sk; among them, the public key is used to encrypt the plaintext data, the evaluation key is used to perform homomorphic evaluation on the encrypted data, and the private key is used to decrypt the result.
[0093] Data scaling: The client may need to scale the data before encryption to meet the requirements of homomorphic encryption. This step can be performed before encryption depending on the specific situation.
[0094] Enc pk(m) →c: Use the public key pk to encrypt the plaintext m to obtain the ciphertext c. It ensures the confidentiality of the data during transmission or storage.
[0095] Cloud tasks:
[0096] Eval evk (f,c1,c2)→c , :Using fhEVM confidential smart contracts, function f is executed on the ciphertext without decryption, which enables complex encrypted data calculations to be performed while maintaining encryption, which is crucial to protecting data privacy.
[0097] Client tasks:
[0098] Dec sk (Eval evk (f,c1,c2,...))=f(m1,m2,...): Use the private key sk to decrypt the ciphertext c1,c2,.. to obtain the plaintext for accessing the calculated result.
[0099] When performing operations in smart contracts, since the contract only supports integer operations, all input parameters and coefficients need to be scaled first to ensure the consistency and accuracy of the calculation. In order to more intuitively describe the safe calculation process of the Sigmoid function, it is assumed here that the input variables have been scaled, and the calculation results will be descaled to restore the original calculation results.
[0100] Input: Enc(x),Enc(0.5),Enc(0.25),Enc(-0.021),Enc(0.002)
[0101] Output: Enc(y)
[0102] Calculate Enc1 = Enc(0.25) × Enc(x) by homomorphic multiplication;
[0103] Calculate Enc2 = Enc(-0.021) × Enc(x) × Enc(x) × Enc(x), which is implemented by homomorphic multiplication;
[0104] Calculate Enc3 = Enc(0.002) × Enc(x) × Enc(x) × Enc(x) × Enc(x) × Enc(x) × Enc(x), which is implemented by homomorphic multiplication;
[0105] Calculate Enc(y) = Enc(0.5) + Enc1 + Enc2 + Enc3, which is implemented by homomorphic addition;
[0106] The smart contract will return the encrypted result Enc(y).
[0107] Among them, Enc(x) represents the input variable obtained after scaling and encryption by the smart contract variable encryption method TFHE.asEuint, Enc(y) represents the encrypted output result, and the intermediate variables Enc1, Enc2, and Enc3 are obtained through homomorphic operations and finally combined into the ciphertext form of the calculation result.
[0108] The above describes in detail how to use fully homomorphic encryption technology to perform logistic regression calculations with the support of confidential smart contracts, including data encryption, homomorphic operations in the encrypted state, and the final decryption steps. In addition, it also describes the specific operations in local and cloud environments, which ensures data privacy while enabling cross-organizational data sharing and collaborative computing, thereby significantly improving cooperation efficiency.
[0109] The present invention uses Taylor's theorem to approximate the Sigmoid function of logistic regression, and uses a confidential smart contract that supports fully homomorphic encryption to encrypt the uploaded private data, thereby ensuring the security of data privacy during data training and calculation in the cloud. The advantage of this method is that it not only effectively prevents the privacy leakage that may occur in the logistic regression algorithm in the cloud environment, but also ensures that the encrypted data can be accurately calculated and processed without decryption, thereby improving the efficiency and security of data processing while protecting data privacy. In addition, the automated execution of confidential smart contracts further enhances the transparency and trust of operations, providing a safe and efficient solution for cloud processing of sensitive data.
[0110] Example 2
[0111] The above-mentioned embodiment 1 provides a privacy protection method for big data logic regression driven by a confidential smart contract. Correspondingly, this embodiment provides a privacy protection system for big data logic regression driven by a confidential smart contract. The system provided in this embodiment can implement the privacy protection method for big data logic regression driven by a confidential smart contract in embodiment 1, and the system can be implemented by software, hardware, or a combination of software and hardware. For example, the system may include integrated or separate functional modules or functional units to execute the corresponding steps in each method of embodiment 1. Since the system of this embodiment is basically similar to the method embodiment, the process described in this embodiment is relatively simple, and the relevant parts can refer to the partial description of embodiment 1. The embodiment of the system provided in this embodiment is only schematic.
[0112] This embodiment provides a confidential smart contract driven big data logistic regression privacy protection system, including:
[0113] The client is used to encrypt data using fully homomorphic encryption technology on the local side to generate ciphertext, and after the cloud computing platform completes the processing of the ciphertext data, it downloads the processing results to the local side and uses the private key to decrypt the data to obtain the data processing results;
[0114] A cloud computing platform is used to deploy confidential smart contracts and perform homomorphic computation on ciphertext data uploaded by the client. The confidential smart contract contains a logistic regression algorithm approximated by Taylor’s theorem.
[0115] Example 3
[0116] This embodiment provides a processing device corresponding to the confidential smart contract driven big data logistic regression privacy protection method provided in this embodiment 1. The processing device can be a processing device for a client, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the method of embodiment 1.
[0117] The processing device includes a processor, a memory, a communication interface and a bus, and the processor, the memory and the communication interface are connected through the bus to complete mutual communication. The memory stores a computer program that can be run on the processor, and the processor executes the confidential smart contract driven big data logistic regression privacy protection method provided in this embodiment 1 when running the computer program.
[0118] Preferably, the memory may be a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.
[0119] Preferably, the processor may be a central processing unit (CPU), a digital signal processor (DSP) or other general-purpose processors of various types, which are not limited here.
[0120] Example 4
[0121] The confidential smart contract-driven big data logistic regression privacy protection method of this embodiment 1 can be specifically implemented as a computer program product, which may include a computer-readable storage medium carrying computer-readable program instructions for executing the confidential smart contract-driven big data logistic regression privacy protection method described in this embodiment 1.
[0122] Computer readable storage media can be tangible devices that hold and store instructions used by instruction execution devices. Computer readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any combination thereof.
[0123] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0124] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0125] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A privacy protection method for big data logistic regression, characterized in that: The following steps are involved: The client uses fully homomorphic encryption technology to encrypt data locally and generate ciphertext; Deploy confidential smart contracts on the cloud computing platform and perform fully homomorphic computation on the uploaded ciphertext data; The client downloads the calculation results of the cloud computing platform to the local side and decrypts them to obtain the data processing results.
2. A privacy protection method for big data logistic regression as claimed in claim 1, characterized in that: The client uses fully homomorphic encryption technology on the local side to encrypt data and generate ciphertext, including: Perform data preparation and scaling processing on the local side to obtain training sample data in integer form; Based on the preset fully homomorphic encryption technology, a public key, a private key, and an evaluation key are generated, and the scaled training sample data is encrypted using the public key to generate ciphertext data.
3. A privacy protection method for big data logistic regression as claimed in claim 2, characterized in that: The data preparation and scaling process is performed on the local side to obtain training sample data in integer form as plain text, including: Determine floating point accuracy requirements based on actual needs; Select a scaling factor based on the determined floating point precision requirements; Verify the suitability of the scaling factor based on the preset integer range of the confidential smart contract; Apply the scaling factor to all floating-point input parameters and coefficients in the training sample data to obtain scaled integer data; The scaled integer data is reversely converted to check whether the converted data meets the original data precision. If so, the scaled data is output; otherwise, the scaling factor is returned to be reselected.
4. A privacy protection method for big data logistic regression as claimed in claim 2, characterized in that: When the scaled training sample data is encrypted using the fully homomorphic encryption technology, the fhEVM fully homomorphic encryption algorithm is adopted.
5. A privacy protection method for big data logistic regression as claimed in claim 1, characterized in that: The method deploys a confidential smart contract on a cloud computing platform and uses a logistic regression algorithm including Taylor's theorem approximation to perform fully homomorphic calculations on uploaded ciphertext data.
6. A privacy protection method for big data logistic regression as claimed in claim 5, characterized in that: When deploying confidential smart contracts on the cloud computing platform, the development environment is Remix IDE and Visual Studio Code.
7. A privacy protection method for big data logistic regression as claimed in claim 3, characterized in that: The client downloads the calculation results of the cloud computing platform to the local side and decrypts it to obtain the data processing results, including: After receiving the encrypted result, the client uses the pre-generated private key to perform decryption and obtain the plain text form of the calculation result; The calculation result is divided according to the selected scaling factor to restore and obtain the final processing result.
8. A big data logistic regression privacy protection system, characterized in that: include: The client is used to encrypt data using fully homomorphic encryption technology on the local side to generate ciphertext, and after the cloud computing platform completes the processing of the ciphertext data, it downloads the processing results to the local side and uses the private key to decrypt the data to obtain the data processing results; A cloud computing platform used to deploy confidential smart contracts and perform homomorphic computations on ciphertext data uploaded by the client.
9. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any one of the methods of claims 1 to 7.
10. A computing device, characterized in that include: One or more processors and a memory, wherein the memory stores one or more programs and is configured to be executed by the one or more processors, wherein the one or more programs include instructions for executing any one of the methods described in claims 1 to 7.
