Compact state clustering federated learning method and system based on fully homomorphic encryption
By adopting the dense state clustering federated learning method with fully homomorphic encryption technology in public clouds, the dilemma of data privacy protection and computing efficiency is solved, and a secure and efficient distributed disease prediction is achieved.
Patent Information
- Application Number
- CN202411812386.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-28
AI Technical Summary
In public cloud environments, clustered federated learning faces the dilemma of data privacy protection and computing efficiency, and users' data privacy is difficult to ensure, and insufficient computing power restricts the speed and effect of model training.
The dense state clustered federated learning method based on full homomorphic encryption is adopted, and the clustered federated learning of dense state data is performed in the public cloud using full homomorphic encryption technology to ensure the security of the data during the calculation process.
It realizes that while ensuring data security, it improves the computing efficiency of clustered federated learning, can effectively process dense data, and improves the accuracy and efficiency of distributed disease prediction.
Smart Images

Figure CN119721295A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of cloud computing, information security and medical treatment, and in particular to a dense clustering federated learning method and system based on fully homomorphic encryption. Background Art
[0002] Cluster federated learning is a branch of federated learning, which aims to group users participating in federated learning through clustering algorithms in order to conduct model training and data clustering more effectively. In the cluster federated learning scenario, limited user resources will directly affect their computing power, which in turn restricts the speed and effect of model training. With its huge infrastructure and advanced virtualization technology, the public cloud can provide extremely powerful computing power, which can easily cope with users' large-scale, high-concurrency, complex and changeable computing tasks. To this end, the use of public clouds can effectively improve the efficiency of cluster federated learning. However, in a public cloud environment, if data protection measures are not strict, users' data privacy will face the potential risk of leakage, tampering or analysis. Cluster federated learning faces the dilemma of data privacy protection and data computing, which has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The purpose of the present invention is to provide a method and system for clustering federated learning based on fully homomorphic encryption to address the deficiencies in the prior art. It uses fully homomorphic encryption technology to implement clustering federated learning under confidential data in the public cloud, thereby achieving computing functions while ensuring data security.
[0004] An embodiment of the present application provides a dense clustering federated learning method based on fully homomorphic encryption, the method comprising:
[0005] Obtaining initial medical data;
[0006] Performing preprocessing on the initial medical data to determine target medical data;
[0007] According to the target medical data, and based on the fully homomorphic encrypted dense clustering federated learning algorithm and the initial input parameters, the target parameters of the encrypted disease prediction model are determined to achieve distributed disease prediction.
[0008] Optionally, obtaining initial medical data includes:
[0009] The client is used to collect the patient's medical health data from several medical institutions as initial medical data; wherein the initial medical data includes the patient's medical history information, examination information and medical diagnosis information.
[0010] Optionally, the performing preprocessing of the initial medical data includes:
[0011] Executing a data cleaning step, a data feature selection step and a data standardization step on the initial medical data;
[0012] The data cleaning step includes processing missing values and detecting data outliers of the initial medical data, so as to delete duplicate, erroneous or incomplete medical data records in the initial medical data;
[0013] The data feature selection step is used to process the initial medical data after the data cleaning step to achieve screening of feature data reflecting the patient's health status, disease risk and disease prediction;
[0014] The data standardization step is used to perform standardization processing on the feature data.
[0015] Optionally, the initial input parameters include:
[0016] Encrypted disease prediction model parameters Federated learning termination parameter ε1, disease clustering termination parameter ε2, disease clustering dissimilarity parameter γ max ∈[0,1) and the number of iterations n.
[0017] Optionally, before determining the target parameters of the encrypted disease prediction model according to the target medical data and based on the fully homomorphic encrypted dense clustering federated learning algorithm and the initial input parameters, the method further includes:
[0018] Executes the initialization operation on the parameters of the fully homomorphic encrypted secret clustering federated learning algorithm.
[0019] Optionally, the performing of the initialization operation on the parameters of the fully homomorphic encrypted dense clustering federated learning algorithm includes:
[0020] Set the initial disease category C = {1,...,M}, where M is the number of medical institutions;
[0021] Set the initial encrypted disease prediction model parameters Where, i=1,...,M;
[0022] Setting initial encrypted disease prediction update parameters The ciphertext where c∈C and C0 is 0.
[0023] Another embodiment of the present application provides a dense clustering federated learning system based on fully homomorphic encryption, the system comprising:
[0024] An acquisition module, used for acquiring initial medical data;
[0025] An execution module, used for performing preprocessing on the initial medical data to determine target medical data;
[0026] A determination module is used to determine the target parameters of the encrypted disease prediction model according to the target medical data, based on a fully homomorphic encrypted dense clustering federated learning algorithm and initial input parameters to achieve distributed disease prediction.
[0027] Optionally, the obtaining module includes:
[0028] The collection unit is used to collect the patient's medical health data from several medical institutions as initial medical data using the client; wherein the initial medical data includes the patient's medical history information, examination information and medical diagnosis information.
[0029] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to implement any of the above methods when executed.
[0030] Another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement any of the above methods.
[0031] Compared with the prior art, the present invention first obtains initial medical data; then performs preprocessing on the initial medical data to determine the target medical data; finally, according to the target medical data, based on the fully homomorphic encrypted secret clustering federated learning algorithm and the initial input parameters, the target parameters of the encrypted disease prediction model are determined to achieve distributed disease prediction. It uses fully homomorphic encryption technology to implement clustering federated learning under secret data in the public cloud, achieving computing functions while ensuring data security. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A hardware structure block diagram of a computer terminal for a dense clustering federated learning method based on fully homomorphic encryption provided in an embodiment of the present invention;
[0033] Figure 2 A flowchart of a dense clustering federated learning method based on fully homomorphic encryption provided in an embodiment of the present invention;
[0034] Figure 3 A schematic diagram of the structure of a dense clustering federated learning system based on fully homomorphic encryption provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.
[0036] The embodiment of the present invention first provides a dense clustering federated learning method based on fully homomorphic encryption, which can be applied to electronic devices such as computer terminals, specifically ordinary computers, tablets, etc.
[0037] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal for a fully homomorphic encryption based dense clustering federated learning method provided in an embodiment of the present invention. Figure 1 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0038] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any dense clustering federated learning method based on fully homomorphic encryption.
[0039] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0040] The internal memory provides an environment for the operation of a computer program in a non-volatile storage medium. When the computer program is executed by a processor, the processor can execute any dense clustering federated learning method based on fully homomorphic encryption.
[0041] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0042] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0043] In order to protect medical data and defend against model inversion attacks, based on Cheon's fully homomorphic encryption algorithm, this application proposes a dense clustering federated learning algorithm based on fully homomorphic encryption, and uses it for distributed disease prediction. The algorithm consists of a server and a client. The server is responsible for receiving model updates and model aggregation from the client. The client is composed of hospitals or medical institutions, and is responsible for preprocessing and model training of medical data such as patient medical records, test results, and diagnostic information collected locally.
[0044] See also Figure 2 , Figure 2 A flow chart of a method for dense clustering federated learning based on fully homomorphic encryption provided in an embodiment of the present invention may include the following steps:
[0045] S201: Obtain initial medical data.
[0046] Specifically, obtaining the initial medical data may include:
[0047] The client is used to collect the patient's medical health data from several medical institutions as initial medical data; wherein the initial medical data includes the patient's medical history information, examination information and medical diagnosis information.
[0048] S202: Perform preprocessing on the initial medical data to determine target medical data.
[0049] Specifically, the performing of preprocessing of the initial medical data may include:
[0050] Executing a data cleaning step, a data feature selection step and a data standardization step on the initial medical data;
[0051] The data cleaning step includes processing missing values and detecting data outliers of the initial medical data, so as to delete duplicate, erroneous or incomplete medical data records in the initial medical data;
[0052] The data feature selection step is used to process the initial medical data after the data cleaning step to achieve screening of feature data reflecting the patient's health status, disease risk and disease prediction;
[0053] The data standardization step is used to perform standardization processing on the feature data.
[0054] For example, there are often missing values in medical data, which may be caused by incomplete records, equipment failure, or human error. Methods for handling missing values may include deleting records containing missing values, filling with statistical values such as mean, median, or mode, or using more complex interpolation methods. Outliers are values that are significantly different from most data points, which may be caused by data entry errors or equipment failures. Methods for detecting outliers include using statistical methods (such as Z-score, IQR, etc.) or visualization methods (such as box plots, scatter plots, etc.). For detected outliers, you can choose to delete, replace, or retain them, depending on the source of the outliers and the impact on data analysis. During the data cleaning process, it is also necessary to check and delete duplicate records, as well as those that are obviously wrong or incomplete, to ensure the accuracy and consistency of the data.
[0055] The purpose of data feature selection is to select feature data that can reflect the patient's health status, disease risk, and disease prediction from the cleaned initial medical data. Feature selection is an important part of machine learning, which directly affects the performance and accuracy of the model. Common feature selection methods include filtering, wrapping, and embedded. The filtering method selects features based on statistical tests or correlation analysis; the wrapping method evaluates the performance of feature subsets by building multiple models; and the embedded method automatically selects features during model training.
[0056] Data standardization is the process of converting feature data of different dimensions or magnitudes to the same magnitude for subsequent data analysis and model training. Common standardization methods include Min-Max standardization and Z-score standardization. Min-Max standardization converts the original data to a value between 0 and 1, which is suitable for situations where the maximum and minimum values of the data are known. Z-score standardization converts the data into normally distributed data with a mean of 0 and a standard deviation of 1, which is suitable for situations where the data distribution is unknown or normally distributed.
[0057] In summary, the preprocessing of initial medical data includes three steps: data cleaning, data feature selection, and data standardization to obtain target medical data. These steps together constitute the cornerstone of data analysis and provide accurate and reliable data support for subsequent model training and prediction.
[0058] S203: According to the target medical data, based on the fully homomorphic encrypted dense clustering federated learning algorithm and the initial input parameters, determine the target parameters of the encrypted disease prediction model to achieve distributed disease prediction.
[0059] Specifically, before determining the target parameters of the encrypted disease prediction model based on the target medical data, the dense clustering federated learning algorithm of full homomorphic encryption and the initial input parameters, the method may further include:
[0060] Executes the initialization operation on the parameters of the fully homomorphic encrypted secret clustering federated learning algorithm.
[0061] The initialization operation of performing the fully homomorphic encrypted secret clustering federated learning algorithm parameters may include:
[0062] Set the initial disease category C = {1,...,M}, where M is the number of medical institutions;
[0063] Set the initial encrypted disease prediction model parameters Where, i = 1, ..., M;
[0064] Setting initial encrypted disease prediction update parameters The ciphertext where c∈C and C0 is 0.
[0065] In an optional implementation, before clustering federated learning of medical data, the five initial input parameters of the algorithm need to be determined, namely: encrypted disease prediction model parameters Federated learning termination parameter ε1, disease clustering termination parameter ε2, disease clustering dissimilarity parameter γ max ∈[0,1) and the number of iterations n, where, The ciphertext representing the initial disease prediction model parameters θ0.
[0066] Then, the algorithm parameters are initialized, and the initial disease category C is set to {1,...,M}, where M is the number of medical institutions; the initial encrypted disease prediction model parameters are set to Where i = 1, ..., M; set the initial encrypted disease prediction update parameters The ciphertext where c∈C and C0 is 0.
[0067] In order to obtain the target parameters of the encrypted disease prediction model When the algorithm does not converge, the following loop is executed:
[0068] On the client side, first use renew Right now:
[0069]
[0070] Then, update the Right now:
[0071]
[0072] Among them, SGD represents the stochastic gradient descent algorithm, D i Represents the data of medical institution i.
[0073] Use the updated To update Right now:
[0074]
[0075] It should be noted that the update and The operations can be performed in parallel.
[0076] On the server side, first set the temporary disease category variable C temp Initialized to C. Then, for any disease category c∈C, the encrypted disease prediction update parameter is calculated The average value of is:
[0077]
[0078] Next, we compare them using the homomorphic comparison algorithm. And the federated learning termination parameter ε1, that is:
[0079]
[0080] Calculated by the homomorphic maximum algorithm The maximum value of is:
[0081]
[0082] For disease category i∈c, we then compare c using the homomorphic comparison algorithm max and ε1. According to the homomorphic comparison results, if the condition Δθ is satisfied c <ε1 and max i∈c ‖Δθ i ‖>ε1, then perform the following steps:
[0083] Calculate Δθ by using the homomorphic inner product algorithm i and Δθ j The inner product between them, where j=1,...,m, i≠j.
[0084] Then Δθ is calculated by the homomorphic index algorithm i and Δθ j The norm of , and the ratio of the inner product to the norm product is calculated homomorphically, that is:
[0085]
[0086] To find the minimum When the subscript disease categories c1 and c2 are used, calculate:
[0087]
[0088] Then, the cosine similarity α of the disease categories is calculated by the homomorphic algorithm ij The maximum value of is:
[0089]
[0090] Comparison of disease cluster dissimilarity parameters γ max and If satisfied:
[0091]
[0092] Then let:
[0093] C temp =(C temp \c)∪c1∪c2
[0094] After the server-side loop is executed, set C = C temp When the algorithm converges, the target parameters of the encrypted disease prediction model can be output To achieve distributed disease prediction.
[0095] Compared with the prior art, the present invention first obtains initial medical data; then performs preprocessing on the initial medical data to determine the target medical data; finally, according to the target medical data, based on the fully homomorphic encrypted secret clustering federated learning algorithm and the initial input parameters, the target parameters of the encrypted disease prediction model are determined to achieve distributed disease prediction. It uses fully homomorphic encryption technology to implement clustering federated learning under secret data in the public cloud, achieving computing functions while ensuring data security.
[0096] Another embodiment of the present application provides a dense clustering federated learning system based on fully homomorphic encryption, such as Figure 3 A structural diagram of a dense clustering federated learning system based on fully homomorphic encryption is shown, and the system includes:
[0097] An acquisition module 301 is used to obtain initial medical data;
[0098] An execution module 302 is used to perform preprocessing on the initial medical data to determine target medical data;
[0099] The determination module 303 is used to determine the target parameters of the encrypted disease prediction model according to the target medical data, based on the fully homomorphic encrypted dense clustering federated learning algorithm and the initial input parameters, so as to realize distributed disease prediction.
[0100] Specifically, the acquisition module includes:
[0101] The collection unit is used to collect the patient's medical health data from several medical institutions as initial medical data using the client; wherein the initial medical data includes the patient's medical history information, examination information and medical diagnosis information.
[0102] Compared with the prior art, the present invention first obtains initial medical data; then performs preprocessing on the initial medical data to determine the target medical data; finally, according to the target medical data, based on the fully homomorphic encrypted secret clustering federated learning algorithm and the initial input parameters, the target parameters of the encrypted disease prediction model are determined to achieve distributed disease prediction. It uses fully homomorphic encryption technology to implement clustering federated learning under secret data in the public cloud, achieving computing functions while ensuring data security.
[0103] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to implement the steps in the above method embodiment when running.
[0104] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps:
[0105] S201: Obtaining initial medical data;
[0106] S202: performing preprocessing on the initial medical data to determine target medical data;
[0107] S203: According to the target medical data, based on the fully homomorphic encrypted dense clustering federated learning algorithm and the initial input parameters, determine the target parameters of the encrypted disease prediction model to achieve distributed disease prediction.
[0108] Specifically, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0109] Compared with the prior art, the present invention first obtains initial medical data; then performs preprocessing on the initial medical data to determine the target medical data; finally, according to the target medical data, based on the fully homomorphic encrypted secret clustering federated learning algorithm and the initial input parameters, the target parameters of the encrypted disease prediction model are determined to achieve distributed disease prediction. It uses fully homomorphic encryption technology to implement clustering federated learning under secret data in the public cloud, achieving computing functions while ensuring data security.
[0110] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in the above method embodiment.
[0111] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0112] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0113] S201: Obtaining initial medical data;
[0114] S202: performing preprocessing on the initial medical data to determine target medical data;
[0115] S203: According to the target medical data, based on the fully homomorphic encrypted dense clustering federated learning algorithm and the initial input parameters, determine the target parameters of the encrypted disease prediction model to achieve distributed disease prediction.
[0116] Compared with the prior art, the present invention first obtains initial medical data; then performs preprocessing on the initial medical data to determine the target medical data; finally, according to the target medical data, based on the fully homomorphic encrypted secret clustering federated learning algorithm and the initial input parameters, the target parameters of the encrypted disease prediction model are determined to achieve distributed disease prediction. It uses fully homomorphic encryption technology to implement clustering federated learning under secret data in the public cloud, achieving computing functions while ensuring data security.
[0117] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0118] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0119] In the several embodiments provided by the present invention, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0120] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0122] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present invention. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0123] The embodiments of the present invention are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A dense clustering federated learning method based on fully homomorphic encryption, applied to distributed disease prediction, characterized in that: The method comprises: Obtaining initial medical data; Performing preprocessing on the initial medical data to determine target medical data; According to the target medical data, and based on the fully homomorphic encrypted dense clustering federated learning algorithm and the initial input parameters, the target parameters of the encrypted disease prediction model are determined to achieve distributed disease prediction.
2. The method according to claim 1, characterized in that The obtaining of initial medical data includes: The client is used to collect the patient's medical health data from several medical institutions as initial medical data; wherein the initial medical data includes the patient's medical history information, examination information and medical diagnosis information.
3. The method according to claim 2, characterized in that The performing of preprocessing of the initial medical data comprises: Executing a data cleaning step, a data feature selection step and a data standardization step on the initial medical data; The data cleaning step includes processing missing values and detecting data outliers of the initial medical data, so as to delete duplicate, erroneous or incomplete medical data records in the initial medical data; The data feature selection step is used to process the initial medical data after the data cleaning step to achieve screening of feature data reflecting the patient's health status, disease risk and disease prediction; The data standardization step is used to perform standardization processing on the feature data.
4. The method according to claim 3, characterized in that The initial input parameters include: Encrypted disease prediction model parameters Federated learning termination parameter ε1, disease clustering termination parameter ε2, disease clustering dissimilarity parameter γ max ∈[0,1) and the number of iterations n.
5. The method according to claim 4, characterized in that Before determining the target parameters of the encrypted disease prediction model based on the target medical data and the fully homomorphic encrypted dense clustering federated learning algorithm and the initial input parameters, the method further includes: Executes the initialization operation on the parameters of the fully homomorphic encrypted secret clustering federated learning algorithm.
6. The method according to claim 5, characterized in that The execution of the initialization operation of the parameters of the fully homomorphic encrypted dense clustering federated learning algorithm includes: Set the initial disease category C = {1,...,M}, where M is the number of medical institutions; Set the initial encrypted disease prediction model parameters Where, i = 1, ..., M; Setting initial encrypted disease prediction update parameters The ciphertext where c∈C and C0 is 0.
7. A dense clustering federated learning system based on fully homomorphic encryption, applied to distributed disease prediction, characterized in that: The system comprises: An acquisition module, used for acquiring initial medical data; An execution module, used for performing preprocessing on the initial medical data to determine target medical data; A determination module is used to determine the target parameters of the encrypted disease prediction model according to the target medical data, based on a fully homomorphic encrypted dense clustering federated learning algorithm and initial input parameters to achieve distributed disease prediction.
8. The system according to claim 7, characterized in that The obtaining module comprises: The collection unit is used to collect the patient's medical health data from several medical institutions as initial medical data using the client; wherein the initial medical data includes the patient's medical history information, examination information and medical diagnosis information.
9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to implement the method according to any one of claims 1 to 6 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the computer program to implement the method according to any one of claims 1 to 6.