Medical diagnosis model training method and device based on transverse federated learning, equipment and medium
Through the horizontal federated learning method, local preprocessing and dual encryption technology are used to achieve collaborative training of medical diagnostic models across multiple hospitals, solving the problems of high privacy leakage and processing costs in traditional methods, and achieving safe and efficient data sharing.
Patent Information
- Application Number
- CN202510576808.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-15
AI Technical Summary
Traditional centralized training programs have high desensitization costs and privacy leakage risks. The existing federal learning methods do not consider the heterogeneity of multi-campus equipment, increasing processing costs.
The horizontal federated learning method is adopted to train the diagnostic model by locally preprocessing medical image data, filter the model gradient parameters, and upload it twice to avoid sharing the original image data, and use encrypted gradient parameter exchange to complete the model collaborative training.
It effectively avoids the risk of patient privacy leakage, reduces data processing costs, and distributes data processing pressure to each node through unified processing standards.
Smart Images

Figure CN120496802A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a medical diagnosis model training method, device, equipment and medium based on horizontal federated learning. Background Art
[0002] In today's era of rapidly advancing medical technology, medical image analysis has become an indispensable tool for disease diagnosis. Multi-campus medical institutions often use federated learning or centralized training to share medical data across campuses.
[0003] However, traditional centralized training solutions require campuses to desensitize their data before uploading it to the main hospital data center for centralized training. This desensitization process is costly and carries the risk of privacy breaches. Furthermore, existing federated learning methods generally fail to account for the heterogeneity of equipment across multiple campuses, requiring the deployment of additional equipment calibration modules, which increases processing costs. Summary of the Invention
[0004] In light of this, the present invention aims to provide a medical diagnostic model training method, apparatus, device, and medium based on horizontal federated learning. This method eliminates the need for nodes to share raw image data and instead enables collaborative model training through exchange of encrypted gradient parameters using secondary encryption, effectively avoiding the risk of patient privacy leaks. The specific implementation is as follows:
[0005] In the first aspect, the present application discloses a medical diagnosis model training method based on horizontal federated learning, which is applied to any node of a medical imaging federated learning system, comprising:
[0006] Training a local medical diagnostic model using local preprocessed medical image data to obtain a current medical diagnostic model, and screening model gradient parameters of the current medical diagnostic model based on preset parameter screening rules to obtain target model gradient parameters;
[0007] Encrypting the target model gradient parameters based on the key generated by this round of federated training to obtain first encrypted model gradient parameters, and re-encrypting the first encrypted model gradient parameters using a preset encryption algorithm to obtain second encrypted model gradient parameters;
[0008] Generate a to-be-uploaded model gradient parameter based on the target model gradient parameter and the second encrypted model gradient parameter, and upload the to-be-uploaded model gradient parameter to the aggregation server;
[0009] The target model parameters of this round of federated training are obtained from the aggregation server, and the current medical diagnosis model is trained using the target model parameters to obtain the target medical diagnosis model of this round of federated training; the target model parameters are parameters obtained by weighted averaging the model gradient parameters uploaded to the aggregation server by each node of the medical imaging federated learning system according to preset weights.
[0010] Optionally, the local medical diagnosis model is trained using the local pre-processed medical image data to obtain a current medical diagnosis model, and the model gradient parameters of the current medical diagnosis model are screened based on preset parameter screening rules to obtain target model gradient parameters, including:
[0011] Labeling local medical imaging data to obtain labeled medical imaging data;
[0012] Determining a corresponding image type in the annotated medical image data, and performing image correction on the annotated medical image data according to the image type to obtain preprocessed medical image data;
[0013] Training a local medical diagnosis model using the preprocessed medical image data to obtain a current medical diagnosis model;
[0014] The model gradient parameters corresponding to the current medical diagnosis model are determined, and target model gradient parameters having absolute values greater than a preset threshold are screened out from the model gradient parameters.
[0015] Optionally, encrypting the target model gradient parameters based on the key generated in this round of federated training to obtain first encrypted model gradient parameters, and re-encrypting the first encrypted model gradient parameters using a preset encryption algorithm to obtain second encrypted model gradient parameters, including:
[0016] Dividing the target model gradient parameters based on a preset parameter division standard to obtain a plurality of divided model gradient parameters;
[0017] Obtaining a key pair generated by this round of federated training, and encrypting the plurality of divided model gradient parameters using a private key in the key pair to obtain first encrypted model gradient parameters;
[0018] The first encrypted model gradient parameter is encrypted twice using the AES-GCM encryption algorithm to obtain the second encrypted model gradient parameter.
[0019] Optionally, generating the model gradient parameters to be uploaded based on the target model gradient parameters and the second encrypted model gradient parameters, and uploading the model gradient parameters to be uploaded to the aggregation server includes:
[0020] Determining a parameter to be eliminated in the target model gradient parameter corresponding to the second encrypted model gradient parameter, and eliminating the parameter to be eliminated from the target model gradient parameter to obtain a eliminated model gradient parameter;
[0021] The eliminated model gradient parameters and the second encrypted model gradient parameters are uploaded to the aggregation server as the model gradient parameters to be uploaded.
[0022] Optionally, obtaining target model parameters of this round of federated training from the aggregation server, and training the current medical diagnosis model using the target model parameters to obtain the target medical diagnosis model of this round of federated training, includes:
[0023] Obtaining the target model parameters to be decrypted for this round of federated training from the aggregation server, and decrypting the target model parameters to be decrypted using the public key in the key pair to obtain the target model parameters;
[0024] The weight and bias of the current medical diagnosis model during the model training process are adjusted through the target model parameters to obtain the target medical diagnosis model of this round of federated training.
[0025] Optionally, the preset weight is a weight obtained by the contribution of each node in the medical imaging federated learning system; the contribution is the contribution of each node in the medical imaging federated learning system obtained based on the Shapley value calculation formula.
[0026] Optionally, the medical diagnosis model training method based on horizontal federated learning further includes:
[0027] If this round of federated training is completed, the target hash value corresponding to the key pair is calculated, and the target hash value is uploaded to the preset blockchain, and then the key pair is deleted.
[0028] In a second aspect, the present application discloses a medical diagnosis model training device based on horizontal federated learning, which is applied to any node of a medical imaging federated learning system, comprising:
[0029] a parameter screening module, configured to train a local medical diagnostic model using local preprocessed medical image data to obtain a current medical diagnostic model, and to screen the model gradient parameters of the current medical diagnostic model based on preset parameter screening rules to obtain target model gradient parameters;
[0030] a parameter encryption module, configured to encrypt the target model gradient parameters based on the key generated by the current round of federated training to obtain first encrypted model gradient parameters, and to re-encrypt the first encrypted model gradient parameters using a preset encryption algorithm to obtain second encrypted model gradient parameters;
[0031] a parameter uploading module, configured to generate a model gradient parameter to be uploaded based on the target model gradient parameter and the second encrypted model gradient parameter, and upload the model gradient parameter to be uploaded to an aggregation server;
[0032] A model training module is used to obtain the target model parameters of this round of federated training from the aggregation server, and train the current medical diagnosis model using the target model parameters to obtain the target medical diagnosis model of this round of federated training; the target model parameters are parameters obtained by weighted averaging the model gradient parameters uploaded to the aggregation server by each node of the medical imaging federated learning system according to preset weights.
[0033] In a third aspect, the present application discloses an electronic device, comprising:
[0034] Memory, used to store computer programs;
[0035] A processor is used to execute the computer program to implement the medical diagnosis model training method based on horizontal federated learning as described above.
[0036] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein, when the computer program is executed by a processor, it implements the aforementioned medical diagnosis model training method based on horizontal federated learning.
[0037] In the present application, a local medical diagnosis model can be trained using local pre-processed medical imaging data to obtain a current medical diagnosis model, and the model gradient parameters of the current medical diagnosis model can be screened based on preset parameter screening rules to obtain target model gradient parameters; the target model gradient parameters are encrypted based on the key generated in this round of federated training to obtain first encrypted model gradient parameters, and the first encrypted model gradient parameters are encrypted again using a preset encryption algorithm to obtain second encrypted model gradient parameters; model gradient parameters to be uploaded are generated based on the target model gradient parameters and the second encrypted model gradient parameters, and the model gradient parameters to be uploaded are uploaded to an aggregation server; the target model parameters of this round of federated training are obtained from the aggregation server, and the current medical diagnosis model is trained using the target model parameters to obtain the target medical diagnosis model of this round of federated training.
[0038] It can be seen that the method of the present application can be used to train the medical diagnosis model through local pre-processed medical imaging data to obtain the current medical diagnosis model, and filter out the target model gradient parameters from the model gradient parameters; encrypt the target model gradient parameters twice; generate the model gradient parameters to be uploaded based on the target model gradient parameters and the encrypted model gradient parameters, and upload the model gradient parameters to be uploaded to the aggregation server; obtain the target model parameters of this round of federated training from the aggregation server, and train the current medical diagnosis model through the target model parameters. In this way, each hospital area does not need to share the original imaging data, and only completes the model collaborative training through the exchange of the encrypted gradient parameters with secondary encryption, effectively avoiding the risk of patient privacy leakage. In addition, the medical imaging data is pre-processed through a unified processing standard, and the data processing pressure is dispersed to each node, effectively reducing the processing cost of unified data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0040] Figure 1 This is a flowchart of a medical diagnosis model training method based on horizontal federated learning disclosed in this application;
[0041] Figure 2 This is a schematic diagram of the architecture of a medical diagnosis system based on horizontal federated learning disclosed in this application;
[0042] Figure 3 A schematic diagram of contribution quantification disclosed in this application;
[0043] Figure 4 This is a schematic diagram of the structure of a medical diagnosis model training device based on horizontal federated learning disclosed in this application;
[0044] Figure 5 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0046] Traditional centralized training solutions require campuses to desensitize their data and upload it to the main hospital data center for centralized training. This desensitization process is costly and poses the risk of privacy breaches. Furthermore, existing federated learning methods generally fail to account for the heterogeneity of equipment across multiple campuses, requiring the deployment of additional equipment calibration modules, which increases processing costs.
[0047] In order to overcome the above technical problems, the present application discloses a medical diagnosis model training method, device, equipment and medium based on horizontal federated learning. There is no need to share original image data between nodes. The model collaborative training is completed only through the exchange of encrypted gradient parameters with secondary encryption, effectively avoiding the risk of patient privacy leakage.
[0048] It should be noted that since the medical imaging federated learning system contains multiple nodes, each node corresponds to a branch of the hospital. In order to avoid the problem of patient privacy leakage caused by the mutual transmission of medical imaging data between branches, the medical imaging data between branches are not interoperable.
[0049] See also Figure 1 As shown, an embodiment of the present invention discloses a medical diagnosis model training method based on horizontal federated learning, which is applied to any node of a medical imaging federated learning system, including:
[0050] Step S11: training a local medical diagnosis model using local preprocessed medical image data to obtain a current medical diagnosis model, and screening the model gradient parameters of the current medical diagnosis model based on preset parameter screening rules to obtain target model gradient parameters.
[0051] In this embodiment, Figure 2 As shown, first, the local multimodal medical imaging data needs to be preprocessed. Specifically, the local medical imaging data needs to be annotated to obtain annotated medical imaging data. When annotating, the 3D annotation plug-in integrated in 3D Slicer can be used to annotate the data, so as to achieve the linkage annotation of the axial, coronal, and sagittal planes of the medical image. It should be noted that after the lesion outline is drawn in any view, the ROI (Region of Interest) of the other two views can be generated in real time through the voxel projection algorithm, and the time for manual correction can be shortened by pre-segmenting the image (such as automatic outlining of lung nodules).
[0052] Furthermore, to eliminate parameter differences between hospital campuses and achieve unified data standards, the corresponding image type in the annotated medical image data can be determined and image correction can be performed on the annotated medical image data based on the image type to obtain preprocessed medical image data. Specifically, the DFS-Algorithm dynamic feature selection algorithm can be used to eliminate inter-hospital differences in scanning parameters. Taking the inconsistency between slice thickness and resolution in CT (Computed Tomography) images as an example, a multi-scale feature pyramid is generated using anisotropic B-spline interpolation (order 3) to address CT slice thickness differences. Key slices are dynamically selected using a preset gradient direction histogram weight matrix. Furthermore, a table lookup method can be used to quickly match the optimal interpolation parameters using a preset scanning protocol feature library, which contains multiple key interpolation parameters. Furthermore, a cross-device attention module based on the Transformer architecture can be introduced to calculate feature correlation weights (e.g., reconstruction kernel functions) for device scanning parameters to reduce registration errors. Elastic deformation correction of the medical images using the SyN (Symmetric Normalization) algorithm is also required to obtain preprocessed medical image data.
[0053] After obtaining the pre-processed medical imaging data, the local medical diagnostic model can be trained using the pre-processed medical imaging data to obtain the current medical diagnostic model. Then, the model gradient parameters corresponding to the trained medical diagnostic model need to be determined. It should be noted that in order to ensure the security of the model gradient parameters during transmission, the model gradient parameters need to be encrypted. However, based on the sparsity characteristics of the medical imaging gradient matrix, the model gradient parameters need to be selectively encrypted. Specifically, the non-zero values in the model gradient parameters can be encrypted. Therefore, it is necessary to screen out parameters whose absolute values are greater than a preset threshold from the model gradient parameters, and use these screened parameters as the target model gradient parameters that need to be encrypted. It should be noted that the preset threshold can be set according to the needs of the user.
[0054] Step S12: Encrypt the target model gradient parameters based on the key generated by this round of federated training to obtain first encrypted model gradient parameters, and re-encrypt the first encrypted model gradient parameters using a preset encryption algorithm to obtain second encrypted model gradient parameters.
[0055] In this embodiment, the target model gradient parameters need to be encrypted based on the key generated in this round of federated training. It should be noted that to ensure the security of data encryption, a temporary Paillier key pair is generated in each round of federated training. The generated key pair is used to encrypt and decrypt the target model gradient parameters to be encrypted, and the key pair is automatically destroyed after the training is completed. Specifically, the target model gradient parameters need to be divided based on a preset parameter division standard to obtain a number of divided model gradient parameters, that is, the parameters are block-quantized and encoded, and the image gradient matrix corresponding to the target model gradient parameters is divided into 8×8 sub-blocks. Then, the key pair generated in this round of federated training is obtained, and the private key in the key pair is used to encrypt the several divided model gradient parameters to obtain the first encrypted model gradient parameters. The encryption algorithm used for the first encryption is the Paillier algorithm. After the first encryption is completed, the first encrypted model gradient parameter needs to be encrypted twice. In this application, the AES-GCM (Advanced Encryption Standard - Galois / Counter Mode) encryption algorithm is used to encrypt the first encrypted model gradient parameter twice to obtain the second encrypted model gradient parameter. After double encryption, the ability to resist quantum attacks is improved.
[0056] Step S13: Generate the model gradient parameters to be uploaded based on the target model gradient parameters and the second encrypted model gradient parameters, and upload the model gradient parameters to be uploaded to the aggregation server.
[0057] In this embodiment, the model gradient parameters to be uploaded are determined based on the target model gradient parameters and the second encrypted model gradient parameters. Specifically, it is necessary to determine the parameters to be eliminated in the target model gradient parameters that correspond to the second encrypted model gradient parameters, and then eliminate the parameters to be eliminated from the target model gradient parameters to obtain the eliminated model gradient parameters. Finally, the eliminated model gradient parameters and the second encrypted model gradient parameters are uploaded to the aggregation server as the model gradient parameters to be uploaded.
[0058] It should be noted that although the parameters to be eliminated include some encrypted parameters, quantum key distribution (QKD) is required to ensure their security during transmission. Specifically, QKD equipment is deployed at each campus, and after key negotiation, the key is retrieved and received using the QKD equipment. Key negotiation is performed using polarization-coded photons, and each negotiation takes less than 30 seconds. Furthermore, to improve transmission efficiency, multiplexing is implemented, with quantum channels sharing the same optical fiber with traditional channels. The protocol stack is optimized, replacing the TLS (Transport Layer Security) handshake with a quantum key pre-distribution scheme combined with one-time pad encryption. This means that quantum keys are pre-distributed and each transmission is encrypted. Furthermore, to enhance transmission security, decoy states are randomly inserted into the photon stream during transmission to monitor for eavesdropping in real time. The decoy state ratio is set at 15%, and the bit error rate threshold is set at 2.5%. In addition, Laplace noise needs to be injected before uploading the gradient parameters of the model to be uploaded, and its privacy budget is dynamically adjusted, for example, initially 2 and decaying by 0.1 each round.
[0059] Step S14: Obtain target model parameters for this round of federated training from the aggregation server, and train the current medical diagnosis model using the target model parameters to obtain the target medical diagnosis model for this round of federated training; the target model parameters are parameters obtained by weighted averaging the model gradient parameters uploaded to the aggregation server by each node of the medical imaging federated learning system according to preset weights.
[0060] In this embodiment, it is necessary to obtain the target model parameters of this round of federated training from the aggregation server, and train the current medical diagnosis model with the target model parameters. Specifically, it is necessary to obtain the target model parameters to be decrypted of this round of federated training from the aggregation server, and decrypt the target model parameters to be decrypted with the public key in the key pair to obtain the target model parameters. The weights and biases of the current medical diagnosis model in the model training process are adjusted with the target model parameters to obtain the target medical diagnosis model of this round of federated training. It should be noted that, if Figure 2 As shown in the figure, after each node uploads the model parameters to the aggregation server, the aggregation server can perform weighted averaging on the model gradient parameters uploaded by each node according to the preset weights to obtain the target model parameters of this round of federated training. The preset weights are the weights obtained by the contribution of each node in the medical imaging federated learning system, and the contribution is the contribution of each node in the medical imaging federated learning system obtained based on the Shapley value calculation formula. The Shapley formula is as follows:
[0061] ;
[0062] Among them, φ i represents the Shapley value, that is, the contribution corresponding to participant i, S is the subset corresponding to participant i, |S| is the size of subset S, N is the total number of participants, n is the total number of participants, and v(S) is the model performance indicator of subset S (such as AUC (Area Under the Curve) value).
[0063] After obtaining the contribution of each node, the contribution needs to be quantified, such as Figure 3 As shown, the contribution of each node in data quality, model performance and clinical value needs to be calculated based on the preset weights. It should be noted that after each round of federated training, the historical weights are updated by the contribution attenuation factor (set to λ=0.95 in this embodiment) to prevent old data from excessively affecting the current evaluation. Furthermore, if the current round of federated training is completed, the target hash value corresponding to the key pair is calculated, and the target hash value is uploaded to the preset blockchain, and then the key pair is deleted. In addition, the calculated contribution and the timestamp corresponding to the contribution can also be uploaded to the blockchain, and the gradient hash value and the physician's signature can also be stored. When the contribution fluctuation is >15%, multi-party consensus verification is automatically initiated, and confirmation by at least 3 nodes is required.
[0064] It should be noted that a lightweight inference engine supporting the generation of DICOM (Digital Imaging and Communications in Medicine) structured reports is deployed at each node. When this engine disagrees with the doctor's decision, it responds based on a disagreement threshold. When the disagreement is level one, meaning the difference is less than 10% from the doctor's diagnosis (e.g., a ±1mm error in the measurement of a lung nodule diameter), the system automatically marks the difference and generates a confidence comparison report for individual doctor review. When the disagreement is level two, meaning the difference is between 10% and 30% (e.g., determining the nature of a stroke lesion), the cross-hospital imaging consultation platform is triggered, generating a timely alert to facilitate online consultations between physicians from relevant departments. When the disagreement is level three, meaning the difference is greater than 30% (e.g., a dispute over the staging of a malignant tumor), a multimodal data review process is initiated: the patient's historical pathology and genetic testing data are retrieved (via blockchain-based evidence storage and traceability), and a multi-departmental physician consultation is conducted. In this way, by combining the reasoning engine with divergent responses, the efficiency and accuracy of clinical diagnosis are effectively improved, and the user experience is enhanced.
[0065] As can be seen, in this embodiment, a local medical diagnostic model can be trained using local pre-processed medical image data to obtain a current medical diagnostic model, and the model gradient parameters of the current medical diagnostic model are screened based on preset parameter screening rules to obtain target model gradient parameters; the target model gradient parameters are encrypted based on the key generated in this round of federated training to obtain first encrypted model gradient parameters, and the first encrypted model gradient parameters are re-encrypted using a preset encryption algorithm to obtain second encrypted model gradient parameters; the model gradient parameters to be uploaded are generated based on the target model gradient parameters and the second encrypted model gradient parameters, and the model gradient parameters to be uploaded are uploaded to the aggregation server; the target model parameters of this round of federated training are obtained from the aggregation server, and the current medical diagnostic model is trained using the target model parameters to obtain the target medical diagnostic model of this round of federated training. In this way, each hospital campus does not need to share original image data, and model collaborative training is completed only through the exchange of re-encrypted encrypted gradient parameters, effectively avoiding the risk of patient privacy leakage. In addition, medical image data is pre-processed using a unified processing standard, distributing the data processing pressure to each node, effectively reducing the processing cost of unified data processing.
[0066] See also Figure 4 As shown, an embodiment of the present invention discloses a medical diagnosis model training method based on horizontal federated learning, which is applied to any node of a medical imaging federated learning system, including:
[0067] a parameter screening module 11 for training a local medical diagnostic model using local pre-processed medical image data to obtain a current medical diagnostic model, and screening the model gradient parameters of the current medical diagnostic model based on preset parameter screening rules to obtain target model gradient parameters;
[0068] a parameter encryption module 12 configured to encrypt the target model gradient parameters based on the key generated by the current round of federated training to obtain first encrypted model gradient parameters, and to perform secondary encryption on the first encrypted model gradient parameters using a preset encryption algorithm to obtain second encrypted model gradient parameters;
[0069] A parameter uploading module 13 is configured to generate a model gradient parameter to be uploaded based on the target model gradient parameter and the second encrypted model gradient parameter, and upload the model gradient parameter to be uploaded to an aggregation server;
[0070] The model training module 14 is used to obtain the target model parameters of this round of federated training from the aggregation server, and train the current medical diagnosis model using the target model parameters to obtain the target medical diagnosis model of this round of federated training; the target model parameters are parameters obtained by weighted averaging the model gradient parameters uploaded to the aggregation server by each node of the medical imaging federated learning system according to preset weights.
[0071] As can be seen, in this embodiment, a local medical diagnostic model can be trained using local pre-processed medical image data to obtain a current medical diagnostic model, and the model gradient parameters of the current medical diagnostic model are screened based on preset parameter screening rules to obtain target model gradient parameters; the target model gradient parameters are encrypted based on the key generated in this round of federated training to obtain first encrypted model gradient parameters, and the first encrypted model gradient parameters are re-encrypted using a preset encryption algorithm to obtain second encrypted model gradient parameters; the model gradient parameters to be uploaded are generated based on the target model gradient parameters and the second encrypted model gradient parameters, and the model gradient parameters to be uploaded are uploaded to the aggregation server; the target model parameters of this round of federated training are obtained from the aggregation server, and the current medical diagnostic model is trained using the target model parameters to obtain the target medical diagnostic model of this round of federated training. In this way, each hospital campus does not need to share original image data, and model collaborative training is completed only through the exchange of re-encrypted encrypted gradient parameters, effectively avoiding the risk of patient privacy leakage. In addition, medical image data is pre-processed using a unified processing standard, distributing the data processing pressure to each node, effectively reducing the processing cost of unified data processing.
[0072] In some embodiments, the parameter screening module 11 may specifically include:
[0073] A data annotation unit, used to annotate local medical imaging data to obtain annotated medical imaging data;
[0074] a data preprocessing unit, configured to determine the image type corresponding to the annotated medical image data, and perform image correction on the annotated medical image data according to the image type to obtain preprocessed medical image data;
[0075] a first model training unit, configured to train a local medical diagnosis model using the preprocessed medical image data to obtain a current medical diagnosis model;
[0076] The gradient parameter determination unit is used to determine the model gradient parameters corresponding to the current medical diagnosis model, and to screen out target model gradient parameters whose absolute values are greater than a preset threshold from the model gradient parameters.
[0077] In some embodiments, the parameter encryption module 12 may specifically include:
[0078] A parameter division unit, configured to divide the target model gradient parameters based on a preset parameter division standard to obtain a plurality of divided model gradient parameters;
[0079] a first parameter encryption unit, configured to obtain a key pair generated in this round of federated training, and encrypt the plurality of divided model gradient parameters using a private key in the key pair to obtain first encrypted model gradient parameters;
[0080] The second parameter encryption unit is used to perform secondary encryption on the first encrypted model gradient parameter through the AES-GCM encryption algorithm to obtain the second encrypted model gradient parameter.
[0081] In some embodiments, the parameter uploading module 13 may specifically include:
[0082] a parameter elimination unit, configured to determine a parameter to be eliminated in the target model gradient parameter corresponding to the second encrypted model gradient parameter, and eliminate the parameter to be eliminated from the target model gradient parameter to obtain an eliminated model gradient parameter;
[0083] The parameter uploading unit is configured to upload the eliminated model gradient parameter and the second encrypted model gradient parameter as the model gradient parameter to be uploaded to the aggregation server.
[0084] In some embodiments, the model training module 14 may specifically include:
[0085] a parameter decryption unit, configured to obtain the target model parameters to be decrypted of this round of federated training from the aggregation server, and decrypt the target model parameters to be decrypted using the public key in the key pair to obtain the target model parameters;
[0086] The second model training unit is used to adjust the weight and bias of the current medical diagnosis model during the model training process through the target model parameters to obtain the target medical diagnosis model of this round of federated training.
[0087] Among them, the preset weight is the weight obtained by the contribution of each node in the medical imaging federated learning system; the contribution is the contribution of each node in the medical imaging federated learning system obtained based on the Shapley value calculation formula.
[0088] In some embodiments, the medical diagnosis model training device based on horizontal federated learning may further include:
[0089] The key pair processing unit is configured to calculate the target hash value corresponding to the key pair if the current round of federated training is completed, upload the target hash value to the preset blockchain, and then delete the key pair.
[0090] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram should not be considered as any limitation to the scope of application of the present application.
[0091] Figure 5 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the medical diagnostic model training method based on horizontal federated learning disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0092] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0093] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0094] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, and can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of implementing the medical diagnosis model training method based on horizontal federated learning performed by the electronic device 20 as disclosed in any of the aforementioned embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0095] Furthermore, this application discloses a computer-readable storage medium for storing a computer program; wherein, when executed by a processor, the computer program implements the aforementioned method for training a medical diagnostic model based on horizontal federated learning. The specific steps of this method can be found in the corresponding content disclosed in the aforementioned embodiments and will not be repeated here.
[0096] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0097] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0098] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0099] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0100] The above is a detailed introduction to the technical solution provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A medical diagnosis model training method based on horizontal federated learning, characterized in that: Applied to any node of the medical imaging federated learning system, including: Training a local medical diagnostic model using local preprocessed medical image data to obtain a current medical diagnostic model, and screening model gradient parameters of the current medical diagnostic model based on preset parameter screening rules to obtain target model gradient parameters; Encrypting the target model gradient parameters based on the key generated by this round of federated training to obtain first encrypted model gradient parameters, and re-encrypting the first encrypted model gradient parameters using a preset encryption algorithm to obtain second encrypted model gradient parameters; Generate a to-be-uploaded model gradient parameter based on the target model gradient parameter and the second encrypted model gradient parameter, and upload the to-be-uploaded model gradient parameter to the aggregation server; The target model parameters of this round of federated training are obtained from the aggregation server, and the current medical diagnosis model is trained using the target model parameters to obtain the target medical diagnosis model of this round of federated training; the target model parameters are parameters obtained by weighted averaging the model gradient parameters uploaded to the aggregation server by each node of the medical imaging federated learning system according to preset weights.
2. The medical diagnosis model training method based on horizontal federated learning according to claim 1 is characterized in that: The local medical diagnosis model is trained using the local pre-processed medical image data to obtain a current medical diagnosis model, and the model gradient parameters of the current medical diagnosis model are screened based on preset parameter screening rules to obtain target model gradient parameters, including: Labeling local medical imaging data to obtain labeled medical imaging data; Determining a corresponding image type in the annotated medical image data, and performing image correction on the annotated medical image data according to the image type to obtain preprocessed medical image data; Training a local medical diagnosis model using the preprocessed medical image data to obtain a current medical diagnosis model; The model gradient parameters corresponding to the current medical diagnosis model are determined, and target model gradient parameters having absolute values greater than a preset threshold are screened out from the model gradient parameters.
3. The medical diagnosis model training method based on horizontal federated learning according to claim 1 is characterized in that: The target model gradient parameter is encrypted based on the key generated by the current round of federated training to obtain a first encrypted model gradient parameter, and the first encrypted model gradient parameter is re-encrypted using a preset encryption algorithm to obtain a second encrypted model gradient parameter, including: Dividing the target model gradient parameters based on a preset parameter division standard to obtain a plurality of divided model gradient parameters; Obtaining a key pair generated by this round of federated training, and encrypting the plurality of divided model gradient parameters using a private key in the key pair to obtain first encrypted model gradient parameters; The first encrypted model gradient parameter is encrypted twice using the AES-GCM encryption algorithm to obtain the second encrypted model gradient parameter.
4. The medical diagnosis model training method based on horizontal federated learning according to claim 1 is characterized in that: The generating of the to-be-uploaded model gradient parameters based on the target model gradient parameters and the second encrypted model gradient parameters, and uploading the to-be-uploaded model gradient parameters to the aggregation server, includes: Determining a parameter to be eliminated in the target model gradient parameter corresponding to the second encrypted model gradient parameter, and eliminating the parameter to be eliminated from the target model gradient parameter to obtain a eliminated model gradient parameter; The eliminated model gradient parameters and the second encrypted model gradient parameters are uploaded to the aggregation server as the model gradient parameters to be uploaded.
5. The medical diagnosis model training method based on horizontal federated learning according to claim 1 is characterized in that: The step of obtaining target model parameters of the current round of federated training from the aggregation server and training the current medical diagnosis model using the target model parameters to obtain the target medical diagnosis model of the current round of federated training includes: Obtaining the target model parameters to be decrypted for this round of federated training from the aggregation server, and decrypting the target model parameters to be decrypted using the public key in the key pair to obtain the target model parameters; The weight and bias of the current medical diagnosis model during the model training process are adjusted through the target model parameters to obtain the target medical diagnosis model of this round of federated training.
6. The medical diagnosis model training method based on horizontal federated learning according to claim 1 is characterized in that: The preset weight is the weight obtained by the contribution of each node in the medical imaging federated learning system; the contribution is the contribution of each node in the medical imaging federated learning system obtained based on the Shapley value calculation formula.
7. The medical diagnosis model training method based on horizontal federated learning according to any one of claims 1 to 6, characterized in that: Also includes: If this round of federated training is completed, the target hash value corresponding to the key pair is calculated, and the target hash value is uploaded to the preset blockchain, and then the key pair is deleted.
8. A medical diagnosis model training device based on horizontal federated learning, characterized in that: Applied to any node of the medical imaging federated learning system, including: a parameter screening module, configured to train a local medical diagnostic model using local preprocessed medical image data to obtain a current medical diagnostic model, and to screen the model gradient parameters of the current medical diagnostic model based on preset parameter screening rules to obtain target model gradient parameters; a parameter encryption module, configured to encrypt the target model gradient parameters based on the key generated by the current round of federated training to obtain first encrypted model gradient parameters, and to re-encrypt the first encrypted model gradient parameters using a preset encryption algorithm to obtain second encrypted model gradient parameters; a parameter uploading module, configured to generate a model gradient parameter to be uploaded based on the target model gradient parameter and the second encrypted model gradient parameter, and upload the model gradient parameter to be uploaded to an aggregation server; A model training module is used to obtain the target model parameters of this round of federated training from the aggregation server, and train the current medical diagnosis model using the target model parameters to obtain the target medical diagnosis model of this round of federated training; the target model parameters are parameters obtained by weighted averaging the model gradient parameters uploaded to the aggregation server by each node of the medical imaging federated learning system according to preset weights.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor for executing the computer program to implement the medical diagnosis model training method based on horizontal federated learning as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that Used to store a computer program, wherein when the computer program is executed by a processor, it implements the medical diagnosis model training method based on horizontal federated learning as described in any one of claims 1 to 7.