CN116975914A - Medical data detection model training method and device and computer equipment - Google Patents

Medical data detection model training method and device and computer equipment Download PDF

Info

Publication number
CN116975914A
CN116975914A CN202310929155.2A CN202310929155A CN116975914A CN 116975914 A CN116975914 A CN 116975914A CN 202310929155 A CN202310929155 A CN 202310929155A CN 116975914 A CN116975914 A CN 116975914A
Authority
CN
China
Prior art keywords
sharing
current
target
model parameters
medical data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310929155.2A
Other languages
Chinese (zh)
Inventor
陈彬
杨秋勇
赵少东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Power Supply Bureau Co Ltd
Original Assignee
Shenzhen Power Supply Bureau Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Power Supply Bureau Co Ltd filed Critical Shenzhen Power Supply Bureau Co Ltd
Priority to CN202310929155.2A priority Critical patent/CN116975914A/en
Publication of CN116975914A publication Critical patent/CN116975914A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting

Abstract

The application relates to a medical data detection model training method, a device and computer equipment. The method comprises the following steps: training the initial model parameters by using training medical data to obtain current model parameters; data conversion is carried out based on the current model parameters to obtain a current sharing parameter set, and each current sharing parameter is respectively sent to sharing parties respectively corresponding to each sharing party identifier; acquiring target sharing parameter sets corresponding to the identifiers of all sharing parties respectively, wherein different target sharing parameters in the target sharing parameter sets are acquired from different sharing parties; restoring each target sharing parameter set to obtain sharing model parameters respectively corresponding to each sharing party identifier, and fusing the current model parameters and each sharing model parameter to obtain current target model parameters; and updating the current model parameters based on the current target model parameters to obtain a target medical data detection model. By adopting the method, the safety of medical data can be improved.

Description

Medical data detection model training method and device and computer equipment
Technical Field
The present application relates to the field of artificial intelligence, and in particular, to a medical data detection model training method, apparatus, computer device, storage medium, and computer program product.
Background
Along with the development of artificial intelligence technology, the field of medical health can also apply the artificial intelligence technology to various aspects of diagnosis, treatment, health and the like, for example, medical image recognition can identify a lesion part in a medical image, a personalized diagnosis and treatment scheme can provide a personalized diagnosis and treatment scheme and the like according to personal information and medical record data of a patient.
The above identified or analyzed medical model needs to use a large amount of medical data as a training sample, however, data privacy is very important in the medical health field, and when medical data of a plurality of medical institutions is needed for model training, a data security problem of data loss easily occurs, thereby causing a problem of user privacy disclosure.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a medical data detection model training method, apparatus, computer device, computer readable storage medium, and computer program product that can improve data security.
In a first aspect, the present application provides a medical data detection model training method. The method comprises the following steps:
acquiring training medical data, and training initial model parameters corresponding to an initial medical data detection model by using the training medical data to obtain current model parameters corresponding to a current medical data detection model;
Performing data conversion based on the current model parameters to obtain a current sharing parameter set corresponding to the current model parameters, and respectively transmitting each current sharing parameter in the current sharing parameter set to a sharing party corresponding to each sharing party identifier;
acquiring target sharing parameter sets corresponding to the identifiers of all sharing parties respectively, wherein different target sharing parameters in the target sharing parameter sets are acquired from different sharing parties;
restoring target sharing parameter sets respectively corresponding to the sharing party identifiers to obtain sharing model parameters respectively corresponding to the sharing party identifiers, and fusing current model parameters with sharing model parameters respectively corresponding to the sharing party identifiers to obtain current target model parameters;
updating the current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain the target medical data detection model.
In a second aspect, the application further provides a medical data detection model training device. The device comprises:
the data acquisition module is used for acquiring training medical data, training initial model parameters corresponding to the initial medical data detection model by using the training medical data, and obtaining current model parameters corresponding to the current medical data detection model;
The data conversion module is used for carrying out data conversion based on the current model parameters to obtain a current sharing parameter set corresponding to the current model parameters, and respectively transmitting each current sharing parameter in the current sharing parameter set to a sharing party corresponding to each sharing party identifier;
the parameter acquisition module is used for acquiring target sharing parameter sets corresponding to the identifiers of all sharing parties respectively, wherein different target sharing parameters in the target sharing parameter sets are acquired from different sharing parties;
the parameter fusion module is used for restoring the target sharing parameter sets respectively corresponding to the sharing party identifiers to obtain sharing model parameters respectively corresponding to the sharing party identifiers, and fusing the current model parameters and the sharing model parameters respectively corresponding to the sharing party identifiers to obtain the current target model parameters;
and the updating module is used for updating the current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain the target medical data detection model.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
Acquiring training medical data, and training initial model parameters corresponding to an initial medical data detection model by using the training medical data to obtain current model parameters corresponding to a current medical data detection model;
performing data conversion based on the current model parameters to obtain a current sharing parameter set corresponding to the current model parameters, and respectively transmitting each current sharing parameter in the current sharing parameter set to a sharing party corresponding to each sharing party identifier;
acquiring target sharing parameter sets corresponding to the identifiers of all sharing parties respectively, wherein different target sharing parameters in the target sharing parameter sets are acquired from different sharing parties;
restoring target sharing parameter sets respectively corresponding to the sharing party identifiers to obtain sharing model parameters respectively corresponding to the sharing party identifiers, and fusing current model parameters with sharing model parameters respectively corresponding to the sharing party identifiers to obtain current target model parameters;
updating the current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain the target medical data detection model.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Acquiring training medical data, and training initial model parameters corresponding to an initial medical data detection model by using the training medical data to obtain current model parameters corresponding to a current medical data detection model;
performing data conversion based on the current model parameters to obtain a current sharing parameter set corresponding to the current model parameters, and respectively transmitting each current sharing parameter in the current sharing parameter set to a sharing party corresponding to each sharing party identifier;
acquiring target sharing parameter sets corresponding to the identifiers of all sharing parties respectively, wherein different target sharing parameters in the target sharing parameter sets are acquired from different sharing parties;
restoring target sharing parameter sets respectively corresponding to the sharing party identifiers to obtain sharing model parameters respectively corresponding to the sharing party identifiers, and fusing current model parameters with sharing model parameters respectively corresponding to the sharing party identifiers to obtain current target model parameters;
updating the current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain the target medical data detection model.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
Acquiring training medical data, and training initial model parameters corresponding to an initial medical data detection model by using the training medical data to obtain current model parameters corresponding to a current medical data detection model;
performing data conversion based on the current model parameters to obtain a current sharing parameter set corresponding to the current model parameters, and respectively transmitting each current sharing parameter in the current sharing parameter set to a sharing party corresponding to each sharing party identifier;
acquiring target sharing parameter sets corresponding to the identifiers of all sharing parties respectively, wherein different target sharing parameters in the target sharing parameter sets are acquired from different sharing parties;
restoring target sharing parameter sets respectively corresponding to the sharing party identifiers to obtain sharing model parameters respectively corresponding to the sharing party identifiers, and fusing current model parameters with sharing model parameters respectively corresponding to the sharing party identifiers to obtain current target model parameters;
updating the current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain the target medical data detection model.
The medical data detection model training method, the medical data detection model training device, the computer equipment, the storage medium and the computer program product are used for training an initial medical data detection model by using training medical data to obtain current model parameters. The current model parameter data is converted into a current sharing parameter set, and each current sharing parameter is sent to each sharing party. And then, acquiring target sharing parameters from different sharing parties to obtain target sharing parameter sets corresponding to the identifiers of the sharing parties, and sending the model parameters to a central node by the sharing parties to distribute the model parameters without the need of the sharing parties.
And then restoring the target sharing parameter sets respectively corresponding to the sharing party identifiers to obtain the sharing model parameters respectively corresponding to the sharing party identifiers. And then fusing the current model parameters and the sharing model parameters corresponding to the sharing party identifiers respectively to obtain current target model parameters, updating the current model parameters corresponding to the current medical data detection model by using the current target model parameters to obtain a target medical data detection model, and fusing the model parameters of the sharing parties to improve the detection accuracy of the target medical data detection model. Further, in this embodiment, each sharing party trains the initial medical data detection model locally by using the medical training data, and then shares the trained model parameters to other sharing parties after data conversion, without sharing the local training medical data, thereby ensuring the safety of the medical data.
Drawings
FIG. 1 is a diagram of an application environment for a medical data detection model training method in one embodiment;
FIG. 2 is a flow chart of a method of training a medical data detection model in one embodiment;
FIG. 3 is a flow chart of a medical data detection model training step in one embodiment;
FIG. 4 is a block diagram of a medical data detection model training apparatus in one embodiment;
FIG. 5 is an internal block diagram of a computer device in one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The medical data detection model training method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The server 104 acquires training medical data through the terminal 102, trains initial model parameters corresponding to the initial medical data detection model by using the training medical data, and obtains current model parameters corresponding to the current medical data detection model; the server 104 performs data conversion based on the current model parameters to obtain a current sharing parameter set corresponding to the current model parameters, and sends each current sharing parameter in the current sharing parameter set to each sharing party 106 corresponding to each sharing party identifier; the server 104 obtains target sharing parameter sets corresponding to the identifiers of the sharing parties respectively, and different target sharing parameters in the target sharing parameter sets are obtained from different sharing parties 106; the server 104 restores the target sharing parameter sets respectively corresponding to the sharing party identifiers to obtain sharing model parameters respectively corresponding to the sharing party identifiers, and fuses the current model parameters and the sharing model parameters respectively corresponding to the sharing party identifiers to obtain the current target model parameters; the server 104 updates the current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain a target medical data detection model. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The terminal 102 may also be a medical device for acquiring medical data. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers. The sharer 106 may be a sharing server that performs parameter sharing with the server 104, and the sharing server of the sharer 106 stores a local medical data detection model to be trained.
In one embodiment, as shown in fig. 2, a medical data detection model training method is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
step 202, acquiring training medical data, and training initial model parameters corresponding to an initial medical data detection model by using the training medical data to obtain current model parameters corresponding to a current medical data detection model.
Wherein the training medical data is data for model training stored locally by the server.
Specifically, the server communicates with each sharing party and each sharing party through network connection, and the server obtains the sharing party identification corresponding to each sharing party through network connection. And the sharing party identifiers corresponding to other sharing parties except the sharing party are acquired through communication connection among the sharing parties.
The method comprises the steps that medical data of medical equipment are collected by a terminal and sent to a server, the medical data sent by the terminal are used as training medical data by the server, initial model parameters in a preset initial medical data detection model are trained by the training medical data, and current model parameters corresponding to a current medical data detection model are obtained.
And similarly, each sharing party receives training medical data sent by a corresponding terminal, and trains initial model parameters corresponding to a locally preset initial medical data detection model by using the training medical data to obtain current model parameters corresponding to a current medical data detection model. The model types established by the server and each sharing party are the same.
Step 204, performing data conversion based on the current model parameters to obtain a current sharing parameter set corresponding to the current model parameters, and respectively transmitting each current sharing parameter in the current sharing parameter set to each sharing party corresponding to each sharing party identifier.
The sharing parameter set refers to a sharing parameter set after the current model parameters are subjected to data conversion, and is used for being sent to each sharing party for storage. Each sharing party restores the current model parameters by collecting the sharing parameter set.
Specifically, the server randomly generates the same number of random parameter sets according to the number of the sharing parties, and combines each random parameter in the random parameter sets with the current model parameters respectively to obtain each calculation parameter set, wherein one calculation parameter set comprises one random parameter and the current model parameter. And respectively calculating each calculation parameter set by using a preset algorithm to obtain calculation result parameters corresponding to each calculation parameter set. And the server takes the random parameters in the calculation parameter sets and the corresponding calculation result parameters as the sharing parameter sets to obtain each sharing parameter set. And then the server marks the local sharing identification of each sharing parameter group, takes each marked sharing parameter group as a sharing parameter set, and respectively sends each sharing parameter group to a corresponding sharing party, wherein the sharing parameter groups are in one-to-one correspondence with the sharing parties.
In one embodiment, when the number of sharing parameter sets is greater than the number of sharing parties, each sharing parameter set is cyclically sent to the corresponding number of sharing parties according to a preset sequence. When the number of the shared parameter sets is smaller than the number of the sharing parties, each shared parameter set is randomly sent to the sharing party.
Step 206, obtaining target sharing parameter sets corresponding to the identifiers of the sharing parties respectively, wherein different target sharing parameters in the target sharing parameter sets are obtained from different sharing parties.
And step 208, restoring the target sharing parameter sets respectively corresponding to the sharing party identifiers to obtain sharing model parameters respectively corresponding to the sharing party identifiers, and fusing the current model parameters and the sharing model parameters respectively corresponding to the sharing party identifiers to obtain the current target model parameters.
The target sharing parameter set refers to a parameter set shared by a sharing party.
Specifically, a sharing identifier list is stored in the server, a sharing parameter acquisition request is generated according to the sharing identifier list, and the sharing parameter acquisition request is respectively sent to each sharing party. And each sharing party stores target sharing parameters of different sharing party identification marks, and the server receives each target sharing parameter returned by each sharing party. And the server divides the target sharing parameters of the same sharing party identifier according to the sharing party identifiers of the target sharing parameter identifiers to obtain target sharing parameter sets corresponding to the sharing party identifiers.
And then the server respectively carries out reduction calculation on the target sharing parameter sets corresponding to the sharing party identifiers according to preset reduction information to obtain sharing model parameters corresponding to the sharing party identifiers. And the server performs fusion calculation on the current model parameters and the sharing model parameters corresponding to the identifiers of the sharing parties to obtain the current target model parameters.
And step 210, updating the current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain the target medical data detection model.
Specifically, the server uses the current target model parameters to update the current model parameters corresponding to the current medical data detection model, so as to obtain the target medical data detection model. And then the server informs the terminal of the completion of training the target medical data detection model, acquires the medical data to be detected, which is sent by the terminal, sends the medical data to be detected to the target medical data detection model for detection, and sends the detection result to the terminal.
In the medical data detection model training method, the training medical data is used for training the initial medical data detection model, so that current model parameters are obtained. And converting the current model parameters into current sharing parameter sets, and sending each current sharing parameter to each sharing party. And then, acquiring target sharing parameters from different sharing parties to obtain target sharing parameter sets corresponding to the identifiers of the sharing parties, and sending the model parameters to a central node by the sharing parties to distribute the model parameters without the need of the sharing parties.
And then restoring the target sharing parameter sets respectively corresponding to the sharing party identifiers to obtain the sharing model parameters respectively corresponding to the sharing party identifiers. And then fusing the current model parameters and the sharing model parameters corresponding to the sharing party identifiers respectively to obtain current target model parameters, updating the current model parameters corresponding to the current medical data detection model by using the current target model parameters to obtain a target medical data detection model, and fusing the model parameters of the sharing parties to improve the detection accuracy of the target medical data detection model. Further, in this embodiment, each sharing party trains the initial medical data detection model locally by using the medical training data, and then shares the trained model parameters to other sharing parties after data conversion, without sharing the local training medical data, thereby ensuring the safety of the medical data.
In one embodiment, as shown in fig. 3, step 204, performing data conversion based on the current model parameters to obtain a current shared parameter set corresponding to the current model parameters includes:
step 302, generating a first sharing parameter set corresponding to the target number based on the number of the identifiers of each sharing party identifier;
Step 304, calculating a second shared parameter set corresponding to the first shared parameter set by using the current model parameter and the first shared parameter;
step 306, determining a current shared parameter set corresponding to the current model parameter based on the first shared parameter set and the second shared parameter set.
Wherein the first shared parameter set is a calculation parameter for calculating the second shared parameter set. The second shared parameter set is a calculation result calculated by using the current model parameter and the first shared parameter set.
Specifically, the server determines the target number according to the number of identifiers corresponding to the identifiers of the sharing parties, where the target number may be the same as or greater than the number of identifiers of the sharing party identifiers. The server establishes a polynomial according to the number of the identifiers of the sharing party and by using the current model parameters, and then the server can randomly generate a first sharing parameter set corresponding to the target number. The server calculates each first sharing parameter in the first sharing parameter set by using a polynomial to obtain a second sharing parameter corresponding to the first sharing parameter, and obtains the second sharing parameter set based on the second sharing parameter corresponding to each first sharing parameter. The server takes the first sharing parameter and the corresponding second sharing parameter as sharing parameter sets, determines each sharing parameter set according to the first sharing parameter set and the second sharing parameter set, and takes each sharing parameter set as the sharing parameter set.
In a specific embodiment, a threshold n is preset, and the server constructs an n-1 order polynomial P (x) using the current model parameters and the calculation parameters, as shown in formula (1):
P(x)=a 0 +a 1 x+a 2 x 2 +...+a n-1 x n-1 formula (1)
Wherein n is the target number, which means that at least the sharing parameters corresponding to the target number are needed to restore the current model parameters, a 0 Is the current model parameter.
The server randomly calculates n-1 calculation parameters, namely a i I is greater than or equal to 1 and n-1 is less than or equal to 1 as a coefficient. The server randomly generates n nonzero numbers x i I.e. the first sharing parameter, i is more than or equal to 1 and less than or equal to n, the server uses the n-1 order polynomial (1) to calculate the first sharing parameter, and the value of P (x), i.e. the second sharing parameter is obtained. The server sends each sharing parameter pair to each sharing party with (x, P (x)) as the sharing parameter pair.
In a specific embodiment, a threshold n is preset, and the server constructs an n-1 order polynomial f (x) using the current model parameters and the calculation parameters, as shown in formula (2):
f(x)=t 0 +t 1 x+t 2 x 2 +...+t n-1 x n-1 formula (2)
Wherein n is the target number, which means that at least sharing corresponding to the target number is requiredThe parameters can be restored to the current model parameters. t is t 0 Is a non-zero random parameter.
The server splits the current model parameters into n-1 calculated parameters t i For example, n-1 calculated parameters t i And accumulating to obtain the current model parameters. The server then randomly generates n non-zero numbers x i I.e. the first shared parameter, the first shared parameter is calculated using the polynomial (2) of order n-1, resulting in a value of f (x), i.e. the second shared parameter. The server will (x, P (x)) and t 0 As a sharing parameter pair, each sharing parameter pair is transmitted to each sharing party.
In the embodiment, the encryption and segmentation are carried out on the model parameters, so that the complete model parameters can be recovered only after a sufficient number of shares are collected, and the safety of data transmission and storage is ensured.
In one embodiment, step 208, restoring the target sharing parameter sets corresponding to the respective sharing party identifiers to obtain the sharing model parameters corresponding to the respective sharing party identifiers includes:
obtaining each target sharing parameter in a target sharing parameter set corresponding to the sharing party identifier, and calculating according to preset restoration information by using each target sharing parameter to obtain a sharing model parameter corresponding to the sharing party identifier;
traversing the shared parameter key corresponding to each sharing party identifier to obtain the shared model parameter corresponding to each sharing party identifier.
Specifically, the server obtains target sharing parameters corresponding to the sharing party identifiers from each sharing party according to the sharing party identifiers respectively, and obtains target sharing parameter sets corresponding to the sharing party identifiers. And then the server uses preset restoration information to restore and calculate each target sharing parameter to obtain the sharing model parameter corresponding to the sharing party identifier. The server traverses the target sharing parameter set corresponding to each sharing party identifier, and the sharing model parameters corresponding to each sharing party identifier are obtained through calculation by using preset reduction information.
In a specific embodiment, the server obtains from the target sharing parameter set corresponding to the sharing party identifierFewer than n target sharing parameter sets (x i ,P(x i ) Constructing a system of n-order linear equations as shown in equation (3):
solving the formula (3) by using preset restoration information to obtain the current model parameter a 0
In this embodiment, the sharing model parameters are obtained by restoring the target sharing parameters, and the sharing party only needs to exchange the sharing parameters of the model parameters, instead of the whole model or a large amount of original data, thereby saving communication and calculation resources.
In one embodiment, step 208, fusing the current model parameter and the sharing model parameter corresponding to each sharing party identifier to obtain the current target model parameter includes:
Acquiring training data quantity corresponding to each sharing party identifier, generating sharing weight information corresponding to each sharing party identifier based on the training data quantity, and acquiring current weight information corresponding to current model parameters;
and carrying out weighted average calculation on the basis of the sharing weight information and the sharing model parameters corresponding to the sharing party identifiers and the current weight information and the current model parameters to obtain the current target model parameters.
Specifically, the server acquires the training data quantity corresponding to each sharing party identifier and the local training data quantity, and normalizes the training data quantity corresponding to each sharing party identifier and the local training data quantity to obtain sharing weight information corresponding to each sharing party identifier and current weight information corresponding to the local training data quantity. And the server carries out weighted average calculation on the sharing model parameters, the sharing weight information, the current model parameters and the current weight information corresponding to the sharing party identifiers to obtain the current target model parameters.
The server can also directly use the sharing model parameters corresponding to the identifiers of the sharing parties and the current model parameters to carry out average calculation so as to obtain the current target model parameters.
In the embodiment, the accuracy of the current target model parameters is improved by calculating the sharing weight information corresponding to each sharing party identifier and performing fusion calculation by using the sharing weight information and the sharing model parameters. And model parameters distributed among different sharing parties are cooperatively trained, so that federal learning can be fused with information of a plurality of data sources, and a more comprehensive and representative model is obtained. Meanwhile, more sufficient training samples and data characteristics can be provided for the model through joint modeling of more data, and the performance of the local model is improved.
In one embodiment, step 210, updating current model parameters corresponding to the current medical data detection model based on the current target model parameters, to obtain the target medical data detection model, includes:
counting the sharing training times corresponding to the current target model parameters;
the current target model parameters are used as initial model parameters, and the step of training the initial model parameters corresponding to the initial medical data detection model by using the training medical data is returned to be executed until the sharing training times reach a preset training times threshold value, so that the target model parameters are obtained;
Updating the current model parameters corresponding to the current medical data detection model based on the target model parameters to obtain the target medical data detection model.
Specifically, the number of sharing training times corresponding to the model parameters is preset in the server, and the number of times that the server uses the sharing model parameters of other sharing parties to perform fusion calculation is represented. And the server updates the current model parameters corresponding to the current medical data detection model with the current target model parameters, and counts the sharing training times corresponding to the current target model parameters after the target medical data detection model is obtained. And then the server takes the current target model parameters as initial model parameters, returns to the step of training the initial model parameters corresponding to the initial medical data detection model by using the training medical data, and represents that the server trains the current medical data detection model by using the local training medical data, acquires updated sharing model parameters sent by the sharing party after obtaining the trained updated model parameters, wherein the updated sharing model parameters are obtained by the sharing party by locally carrying out fusion calculation on the model parameters of other sharing parties to obtain fusion model parameters, and then trains the fusion model parameters by using the local training medical data. The server performs fusion calculation on the updated model parameters and the updated shared model parameters of each sharing party to obtain fused model parameters, and at the moment, the shared training times corresponding to the model parameters are updated. And taking the model parameters obtained by fusion calculation currently as target model parameters until the server detects that the sharing training times reach a preset training time threshold.
In this embodiment, there is no centralized node to collect and process data, each sharing party retains its local data, and uses the local data to perform model training, so that the risks of data leakage and single point failure are reduced by the decentralized and decentralised characteristics. And the fusion calculation is carried out by combining the model parameters of other sharing parties, so that the combined training of the model is realized, and the accuracy of the medical data detection model is improved.
In one embodiment, updating current model parameters corresponding to a current medical data detection model based on current target model parameters to obtain a target medical data detection model includes:
updating current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain the current target medical data detection model;
testing the current target medical data detection model by using preset test medical data to obtain loss parameters corresponding to the current target medical data detection model;
when the loss parameter does not reach the preset loss parameter threshold, taking the current target model parameter as an initial model parameter, and returning to the step of training the initial model parameter corresponding to the initial medical data detection model by using the training medical data until the loss parameter reaches the preset loss parameter threshold, so as to obtain the target model parameter;
Updating the current model parameters corresponding to the current medical data detection model based on the target model parameters to obtain the target medical data detection model.
The server updates current model parameters corresponding to the current medical data detection model by using the current target model parameters to obtain the current target medical data detection model, then obtains preset test medical data, and tests the current target medical data detection model by using the preset test medical data to obtain loss parameters corresponding to the current target medical data detection model. The server detects that the loss parameters reach a preset loss parameter threshold value, detects that the loss parameters of all sharing parties reach the preset loss parameter threshold value, and determines the current target medical data detection model as the target medical data detection model. Meanwhile, the current medical data detection model of each sharing party is used as a corresponding target medical data detection model.
When the server detects that the loss parameter does not reach the preset loss parameter threshold, the current target model parameter is used as an initial model parameter, and the step of training the initial model parameter corresponding to the initial medical data detection model by using the training medical data is returned to be executed until the loss parameter reaches the preset loss parameter threshold, so that the target model parameter is obtained. And the server updates the current model parameters corresponding to the current medical data detection model by the target model parameters to obtain the target medical data detection model.
In this embodiment, each sharing party retains its local data, and uses the local data to perform model training, so that the risks of data leakage and single-point failure are reduced by the characteristics of decentralization and decentralization. And the fusion calculation is carried out by combining the model parameters of other sharing parties, so that the combined training of the model is realized, and the accuracy of the medical data detection model is improved. By encrypting and dividing the model parameters, the complete model parameters can be restored only after a sufficient number of shares are collected, and the safety of data transmission and storage is improved.
In one particular embodiment, federally learned participants, i.e., sharers, are determined, each having stored a local data set and an initial model of the same type, e.g., each participant builds an initial model using random forests. Each participant agrees to a suitable secret sharing scheme, such as Shamir secret sharing, and specifies a required minimum share amount, such as any 2 of the 3 shares, representing the number of shares to the participant, and a minimum number of parameters that can restore the secret. The participants keep their data private locally, train the respective models using the local data, after the local training is finished, each participant divides the model parameters into a plurality of shares, and generates a tag for each share for identifying its uniqueness. The participants apply a Shamir secret sharing scheme to each model parameter share, generate a corresponding share key, i.e., a shared parameter set, and send the marked shared parameter set to other participants over a secure communication channel. The participants exchange and receive shared parameter sets therebetween. Each participant is marked and stored according to the received shared parameter set. The participants periodically exchange status information, check if there are missing shared parameters, and send requests to other participants over the secure communication channel, asking for retransmission of the missing shared parameters. After each participant collected a sufficient number of shared parameters, the parameters were combined using the Shamir secret sharing scheme and then restored to the full model parameters. After the participants merge the restored model parameters, the model may be aggregated and updated by a federal learning protocol, e.g., the participants may calculate an average value of the respective model parameters and take the average value as a new global model parameter. The participants use the recovered global model parameters for local training and updating until convergence conditions for federal learning are reached or the required number of exercises are completed.
In this embodiment, participants can securely exchange and merge model parameter shares while protecting the privacy of the model and data. Each participant maintains the privacy of its data locally and the model parameters are partitioned and encrypted by the Shamir secret sharing scheme. Through the marking and resending mechanism, the participants can check and correct the missing share key, ensure that each participant can receive a sufficient number of model parameter share keys, and only exchange the split shares of the model parameters instead of the original data, so that the privacy of sensitive data can be protected to the greatest extent, and the effectiveness and privacy protection of federal learning are ensured.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a medical data detection model training device for realizing the above related medical data detection model training method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the medical data detection model training device or devices provided below may be referred to the limitation of the medical data detection model training method hereinabove, and will not be repeated here.
In one embodiment, as shown in fig. 4, there is provided a medical data detection model training apparatus, comprising: a data acquisition module 402, a data conversion module 404, a parameter acquisition module 406, a parameter fusion module 408, and an update module 410, wherein:
the data acquisition module 402 is configured to acquire training medical data, train initial model parameters corresponding to an initial medical data detection model using the training medical data, and obtain current model parameters corresponding to a current medical data detection model;
the data conversion module 404 is configured to perform data conversion based on the current model parameters to obtain a current sharing parameter set corresponding to the current model parameters, and send each current sharing parameter in the current sharing parameter set to a sharing party corresponding to each sharing party identifier;
A parameter obtaining module 406, configured to obtain target sharing parameter sets corresponding to the identifiers of the sharing parties respectively, where different target sharing parameters in the target sharing parameter sets are obtained from different sharing parties;
the parameter fusion module 408 is configured to restore the target sharing parameter sets corresponding to the respective sharing party identifiers to obtain sharing model parameters corresponding to the respective sharing party identifiers, and fuse the current model parameters with the sharing model parameters corresponding to the respective sharing party identifiers to obtain current target model parameters;
the updating module 410 is configured to update current model parameters corresponding to the current medical data detection model based on the current target model parameters, so as to obtain a target medical data detection model.
In one embodiment, the data conversion module 404 includes:
the parameter calculation unit is used for generating a first sharing parameter set corresponding to the target number based on the identification number of each sharing party identification; calculating a second shared parameter set corresponding to the first shared parameter set by using the current model parameter and the first shared parameter; and determining a current sharing parameter set corresponding to the current model parameter based on the first sharing parameter set and the second sharing parameter set.
In one embodiment, the parameter fusion module 408 includes:
the parameter restoration unit is used for acquiring each target sharing parameter in the target sharing parameter set corresponding to the sharing party identifier, and calculating according to preset restoration information by using each target sharing parameter to obtain a sharing model parameter corresponding to the sharing party identifier; traversing the shared parameter key corresponding to each sharing party identifier to obtain the shared model parameter corresponding to each sharing party identifier.
In one embodiment, the parameter fusion module 408 includes:
the weight calculation unit is used for acquiring the training data quantity corresponding to each sharing party identifier, generating sharing weight information corresponding to each sharing party identifier based on the training data quantity, and acquiring current weight information corresponding to the current model parameter; and carrying out weighted average calculation on the basis of the sharing weight information and the sharing model parameters corresponding to the sharing party identifiers and the current weight information and the current model parameters to obtain the current target model parameters.
In one embodiment, the update module 410 includes:
the frequency counting unit is used for counting the sharing training frequency corresponding to the current target model parameters; the current target model parameters are used as initial model parameters, and the step of training the initial model parameters corresponding to the initial medical data detection model by using the training medical data is returned to be executed until the sharing training times reach a preset training times threshold value, so that the target model parameters are obtained; updating the current model parameters corresponding to the current medical data detection model based on the target model parameters to obtain the target medical data detection model.
In one embodiment, the update module 410 includes:
the loss calculation unit is used for updating the current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain the current target medical data detection model; testing the current target medical data detection model by using preset test medical data to obtain loss parameters corresponding to the current target medical data detection model; when the loss parameter does not reach the preset loss parameter threshold, taking the current target model parameter as an initial model parameter, and returning to the step of training the initial model parameter corresponding to the initial medical data detection model by using the training medical data until the loss parameter reaches the preset loss parameter threshold, so as to obtain the target model parameter; updating the current model parameters corresponding to the current medical data detection model based on the target model parameters to obtain the target medical data detection model.
The above-described respective modules in the medical data detection model training apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing training medical data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a medical data detection model training method.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a medical data detection model training method. The display unit of the computer equipment is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device, wherein the display screen can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on a shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by persons skilled in the art that the structures shown in FIGS. 5-6 are block diagrams of only portions of structures associated with aspects of the application and are not intended to limit the computer device to which aspects of the application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or may have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A medical data detection model training method, the method comprising:
acquiring training medical data, and training initial model parameters corresponding to an initial medical data detection model by using the training medical data to obtain current model parameters corresponding to a current medical data detection model;
performing data conversion based on the current model parameters to obtain a current sharing parameter set corresponding to the current model parameters, and respectively transmitting each current sharing parameter in the current sharing parameter set to a sharing party corresponding to each sharing party identifier;
Acquiring target sharing parameter sets respectively corresponding to the identifiers of the sharing parties, wherein different target sharing parameters in the target sharing parameter sets are acquired from different sharing parties;
restoring the target sharing parameter sets respectively corresponding to the sharing party identifiers to obtain sharing model parameters respectively corresponding to the sharing party identifiers, and fusing the current model parameters and the sharing model parameters respectively corresponding to the sharing party identifiers to obtain current target model parameters;
updating the current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain a target medical data detection model.
2. The method according to claim 1, wherein the performing data conversion based on the current model parameter to obtain a current shared parameter set corresponding to the current model parameter includes:
generating a first sharing parameter set corresponding to the target number based on the identification number of each sharing party identification;
calculating a second shared parameter set corresponding to the first shared parameter set by using the current model parameter and the first shared parameter;
And determining a current sharing parameter set corresponding to the current model parameter based on the first sharing parameter set and the second sharing parameter set.
3. The method of claim 1, wherein the restoring the target sharing parameter set corresponding to the each sharing party identifier to obtain the sharing model parameter corresponding to the each sharing party identifier includes:
obtaining each target sharing parameter in a target sharing parameter set corresponding to the sharing party identifier, and calculating according to the preset restoration information by using each target sharing parameter to obtain a sharing model parameter corresponding to the sharing party identifier;
traversing the sharing parameter key corresponding to each sharing party identifier to obtain the sharing model parameter corresponding to each sharing party identifier.
4. The method according to claim 1, wherein the fusing the current model parameters and the sharing model parameters corresponding to the respective sharing party identifiers to obtain current target model parameters includes:
acquiring training data quantity corresponding to each sharing party identifier, generating sharing weight information corresponding to each sharing party identifier based on the training data quantity, and acquiring current weight information corresponding to the current model parameter;
And carrying out weighted average calculation on the basis of the sharing weight information and the sharing model parameters corresponding to the sharing party identifiers and the current weight information and the current model parameters to obtain the current target model parameters.
5. The method according to claim 1, wherein updating the current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain a target medical data detection model comprises:
counting the sharing training times corresponding to the current target model parameters;
the current target model parameters are used as the initial model parameters, and the step of training the initial model parameters corresponding to the initial medical data detection model by using the training medical data is returned to be executed until the sharing training times reach a preset training times threshold value, so that the target model parameters are obtained;
and updating the current model parameters corresponding to the current medical data detection model based on the target model parameters to obtain a target medical data detection model.
6. The method according to claim 1, wherein updating the current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain a target medical data detection model comprises:
Updating current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain a current target medical data detection model;
testing the current target medical data detection model by using preset test medical data to obtain loss parameters corresponding to the current target medical data detection model;
when the loss parameter does not reach a preset loss parameter threshold, taking the current target model parameter as the initial model parameter, and returning to the step of training the initial model parameter corresponding to the initial medical data detection model by using the training medical data for execution until the loss parameter reaches the preset loss parameter threshold to obtain the target model parameter;
and updating the current model parameters corresponding to the current medical data detection model based on the target model parameters to obtain a target medical data detection model.
7. A medical data detection model training apparatus, the apparatus comprising:
the data acquisition module is used for acquiring training medical data, training initial model parameters corresponding to an initial medical data detection model by using the training medical data, and obtaining current model parameters corresponding to a current medical data detection model;
The data conversion module is used for carrying out data conversion based on the current model parameters to obtain a current sharing parameter set corresponding to the current model parameters, and respectively transmitting each current sharing parameter in the current sharing parameter set to a sharing party corresponding to each sharing party identifier;
the parameter acquisition module is used for acquiring target sharing parameter sets respectively corresponding to the sharing party identifiers, and different target sharing parameters in the target sharing parameter sets are acquired from different sharing parties;
the parameter fusion module is used for restoring the target sharing parameter sets respectively corresponding to the sharing party identifiers to obtain sharing model parameters respectively corresponding to the sharing party identifiers, and fusing the current model parameters and the sharing model parameters respectively corresponding to the sharing party identifiers to obtain current target model parameters;
and the updating module is used for updating the current model parameters corresponding to the current medical data detection model based on the current target model parameters to obtain a target medical data detection model.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310929155.2A 2023-07-26 2023-07-26 Medical data detection model training method and device and computer equipment Pending CN116975914A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310929155.2A CN116975914A (en) 2023-07-26 2023-07-26 Medical data detection model training method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310929155.2A CN116975914A (en) 2023-07-26 2023-07-26 Medical data detection model training method and device and computer equipment

Publications (1)

Publication Number Publication Date
CN116975914A true CN116975914A (en) 2023-10-31

Family

ID=88480878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310929155.2A Pending CN116975914A (en) 2023-07-26 2023-07-26 Medical data detection model training method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN116975914A (en)

Similar Documents

Publication Publication Date Title
CN113159327B (en) Model training method and device based on federal learning system and electronic equipment
JP6594329B2 (en) System and method for facial expression
CN111081337B (en) Collaborative task prediction method and computer readable storage medium
CN111340247A (en) Longitudinal federated learning system optimization method, device and readable storage medium
CN112202554B (en) Information processing method, device and equipment for generating key based on attribute of information
CN113362048B (en) Data label distribution determining method and device, computer equipment and storage medium
CN105592085A (en) Privacy protection method specific to location awareness recommendation system
WO2022001092A1 (en) Data processing method and apparatus, and device
CN112347500A (en) Machine learning method, device, system, equipment and storage medium of distributed system
CN113836556A (en) Federal learning-oriented decentralized function encryption privacy protection method and system
CN114691167A (en) Method and device for updating machine learning model
CN115496204B (en) Federal learning-oriented evaluation method and device under cross-domain heterogeneous scene
CN114491637A (en) Data query method and device, computer equipment and storage medium
CN114742703A (en) Method, device and equipment for generating binocular stereoscopic panoramic image and storage medium
Xia et al. Machine learning prediction of network dynamics with privacy protection
CN112949866A (en) Poisson regression model training method and device, electronic equipment and storage medium
WO2019022052A1 (en) Information processing device, system, and information processing method
CN116975914A (en) Medical data detection model training method and device and computer equipment
Yang et al. Cell based raft algorithm for optimized consensus process on blockchain in smart data market
CN115757933A (en) Recommendation information generation method, device, equipment, medium and program product
CN114547684A (en) Method and device for protecting multi-party joint training tree model of private data
CN117454185B (en) Federal model training method, federal model training device, federal model training computer device, and federal model training storage medium
CN112765898B (en) Multi-task joint training model method, system, electronic equipment and storage medium
CN117993515A (en) Federal learning method and apparatus
Wu et al. A lightweight, privacy-preserving tensor completion framework for Internet of Things

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination