Diagnosis-related classification model training method, device, equipment, medium and program
By using federated learning to train diagnostic classification models in parallel across multiple medical institutions, the problems of limited medical data and data privacy and security are solved, enabling efficient and universal model training and application.
Patent Information
- Application Number
- CN202110146084.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-02
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2041-02-02
AI Technical Summary
Because medical institutions have limited and unevenly distributed medical data, neural network models trained on their own data often perform poorly and are difficult to generalize. Furthermore, data privacy and security issues arise when sharing data between different institutions.
The federated learning approach is adopted, in which the initial parameters are sent to multiple training devices through the control device. The training devices train the model locally based on local training samples and return the training results to the control device for merging. Finally, the model parameters are updated, ensuring that the data is not transmitted outside the local area.
We have developed a diagnostic-related classification model that performs well and is universal across multiple medical institutions, reducing training time costs and protecting data security.
Smart Images

Figure CN114927210B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to a diagnosis-related classification model training method and device, equipment, medium and program. BACKGROUND
[0002] In many application scenarios, classification tasks are encountered. For example, images are classified according to whether they contain a specific object, and articles are classified according to the corresponding field. For example, diagnosis-related classification (DRGs). DRGs refers to the classification of patients into 500-2000 diagnosis-related groups according to factors such as hospitalization days, clinical diagnosis, surgery, illness, severity of illness, comorbidities and complications, and then determining how much compensation should be given to the hospital.
[0003] With the continuous development of machine learning, neural networks and other technologies, currently, using a neural network model to complete a classification and recognition task has become a mainstream trend.
[0004] Taking DRGs prediction as an example, because the medical data of each medical institution is limited and the data distribution is uneven, the medical data has privacy and is not suitable for sharing between medical institutions. Each medical institution trains a model based on its own medical data, which makes the trained model may not perform well and is difficult to generalize. SUMMARY
[0005] The embodiments of the present application provide a diagnosis-related classification model training method, device, equipment, medium and program, which can obtain a model with good performance and universality.
[0006] In a first aspect, the embodiments of the present application provide a model training method applied to a control device, and the method comprises:
[0007] sending a first parameter of a classification model to a plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameter and local training samples to obtain respective second parameters of the plurality of training devices, wherein the plurality of training devices are each provided with the classification model;
[0008] receiving the respective second parameters of the plurality of training devices;
[0009] merging the respective second parameters of the plurality of training devices to obtain a third parameter;
[0010] notifying the plurality of training devices to update the parameter of the classification model to the third parameter.
[0011] In a second aspect, an embodiment of the present application provides a model training device applied to a control device, the device comprising:
[0012] a sending module configured to send a first parameter of a classification model to a plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameter and local training samples to obtain respective second parameters of the plurality of training devices, the plurality of training devices correspond to a plurality of training sample providers, and the classification model is arranged in the plurality of training devices;
[0013] a receiving module configured to receive the respective second parameters of the plurality of training devices;
[0014] a processing module configured to combine the respective second parameters of the plurality of training devices to obtain a third parameter;
[0015] The sending module is further configured to notify the plurality of training devices to update the parameter of the classification model to the third parameter.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores executable code, and when the executable code is executed by the processor, the processor can at least implement the model training method according to the first aspect.
[0017] In a fourth aspect, an embodiment of the present application provides a non-transitory machine readable storage medium, which stores executable code, and when the executable code is executed by a processor of an electronic device, the processor can at least implement the model training method according to the first aspect.
[0018] In a fifth aspect, an embodiment of the present application provides an application program, and when the application program is executed by a processor of an electronic device, the processor executes the model training method according to the first aspect.
[0019] In a sixth aspect, an embodiment of the present application provides a model training method applied to a target training device, the method comprising:
[0020] receiving a first parameter of a classification model sent by a control device, the control device being connected with a plurality of training devices, and the target training device being any one of the plurality of training devices;
[0021] training the classification model based on the first parameter and a local training sample to obtain a second parameter corresponding to the target training device;
[0022] send the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the plurality of training devices respectively to obtain a third parameter, wherein the plurality of training devices respectively train the classification model based on the first parameter and local training samples to obtain the second parameters corresponding to the plurality of training devices respectively;
[0023] update the parameter of the classification model to the third parameter in response to the notification of the control device.
[0024] In a seventh aspect, an embodiment of the present application provides a model training apparatus applied to a target training device, the apparatus comprising:
[0025] a receiving module configured to receive a first parameter of a classification model sent by a control device, the control device being connected with a plurality of training devices, and the target training device being any one of the plurality of training devices;
[0026] a training module configured to train the classification model based on the first parameter and local training samples to obtain a second parameter corresponding to the target training device;
[0027] a sending module configured to send the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the plurality of training devices respectively to obtain a third parameter, wherein the plurality of training devices respectively train the classification model based on the first parameter and local training samples to obtain the second parameters corresponding to the plurality of training devices respectively;
[0028] an updating module configured to update the parameter of the classification model to the third parameter in response to the notification of the control device.
[0029] In an eighth aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores executable code, and when the executable code is executed by the processor, the processor can at least implement the model training method in the sixth aspect.
[0030] In a ninth aspect, an embodiment of the present application provides a non-transitory machine readable storage medium, the non-transitory machine readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor can at least implement the model training method in the sixth aspect.
[0031] In a tenth aspect, an embodiment of the present application provides an application program, and when the application program is executed by a processor of an electronic device, the processor executes the model training method in the sixth aspect.
[0032] In a first aspect, an embodiment of the present application provides a diagnostic related classification model training method, applied to a control device, the method comprising:
[0033] sending a first parameter of a classification model to a plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameter and local training samples to obtain respective second parameters of the plurality of training devices, wherein the classification model is arranged in the plurality of training devices, and the plurality of training devices correspond to a plurality of medical institutions;
[0034] receiving the respective second parameters of the plurality of training devices;
[0035] merging the respective second parameters of the plurality of training devices to obtain a third parameter;
[0036] notifying the plurality of training devices to update the parameter of the classification model to the third parameter.
[0037] In a twelfth aspect, an embodiment of the present application provides a diagnostic related classification model training device, applied to a control device, the device comprising:
[0038] a sending module configured to send a first parameter of a classification model to a plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameter and local training samples to obtain respective second parameters of the plurality of training devices, wherein the classification model is arranged in the plurality of training devices, and the plurality of training devices correspond to a plurality of medical institutions;
[0039] a receiving module configured to receive the respective second parameters of the plurality of training devices;
[0040] a merging module configured to merge the respective second parameters of the plurality of training devices to obtain a third parameter;
[0041] The sending module is further configured to notify the plurality of training devices to update the parameter of the classification model to the third parameter.
[0042] In a thirteenth aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores executable code, and when the executable code is executed by the processor, the processor can at least implement the diagnostic related classification model training method of the eleventh aspect.
[0043] In a fourteenth aspect, an embodiment of the present application provides a non-transitory machine readable storage medium having stored thereon executable code that, when executed by a processor of an electronic device, causes the processor to at least implement the diagnostic related classification model training method according to the eleventh aspect.
[0044] In a fifteenth aspect, an embodiment of the present application provides an application program, which, when executed by a processor of an electronic device, causes the processor to implement the diagnostic related classification model training method according to the eleventh aspect.
[0045] In a sixteenth aspect, an embodiment of the present application provides a diagnostic related classification model training method, applied to a target training device, and the method comprises:
[0046] receiving a first parameter of a classification model sent by a control device, the control device being connected with a plurality of training devices, the target training device being any one of the plurality of training devices, and the plurality of training devices corresponding to a plurality of medical institutions;
[0047] training the classification model based on the first parameter and local training samples to obtain a second parameter corresponding to the target training device;
[0048] sending the second parameter corresponding to the target training device to the control device, so that the control device combines second parameters corresponding to the plurality of training devices respectively to obtain a third parameter, wherein the plurality of training devices respectively train the classification model based on the first parameter and local training samples to obtain the second parameters corresponding to the plurality of training devices respectively;
[0049] updating the parameter of the classification model to the third parameter in response to a notification of the control device.
[0050] In a seventeenth aspect, an embodiment of the present application provides a diagnostic related classification model training apparatus, applied to a target training device, and the apparatus comprises:
[0051] a receiving module, configured to receive a first parameter of a classification model sent by a control device, the control device being connected with a plurality of training devices, the target training device being any one of the plurality of training devices, and the plurality of training devices corresponding to a plurality of medical institutions;
[0052] a training module, configured to train the classification model based on the first parameter and local training samples to obtain a second parameter corresponding to the target training device;
[0053] The sending module is configured to send the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the plurality of training devices respectively to obtain a third parameter, wherein the plurality of training devices train the classification model based on the first parameter and local training samples to obtain the second parameters corresponding to the plurality of training devices respectively.
[0054] The updating module is configured to update the parameter of the classification model to the third parameter in response to the notification of the control device.
[0055] In an eighteenth aspect, an electronic device is provided, including a memory and a processor, wherein the memory stores executable code, and when the executable code is executed by the processor, the processor can at least implement the diagnosis-related classification model training method in the sixteenth aspect.
[0056] In a nineteenth aspect, a non-transitory machine-readable storage medium is provided, and the non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor can at least implement the diagnosis-related classification model training method in the sixteenth aspect.
[0057] In a twentieth aspect, an application program is provided, and when the application program is executed by a processor of an electronic device, the processor can execute the diagnosis-related classification model training method in the sixteenth aspect.
[0058] In the model training scheme provided in the above embodiments of the present application, the training of the classification model is completed by using the training samples of a plurality of training sample providers, so that the finally trained classification model can be applicable to the classification task requirements of the plurality of training sample providers, i.e., has universality. In order to ensure the information security of each training sample provider, each training sample provider locally trains the classification model based on the training device corresponding thereto.
[0059] Specifically, the training process is as follows: first, the control device for managing multiple training devices sets the first parameters of the classification model, and then the first parameters are distributed to each training device, so that each training device trains the locally stored classification model based on the first parameters and the local training samples, that is, multiple training devices perform training of the classification model based on the first parameters and the local training samples in parallel, and after a period of training, multiple second parameters corresponding to the classification model are obtained, one second parameter corresponding to one training device. Each training device uploads the second parameter obtained by itself to the control device, and the control device combines the second parameters corresponding to each of the multiple training devices to obtain third parameters, and the control device informs the multiple training devices to update the parameters of the local classification model to the third parameters. If it is finally determined that the classification model with the third parameters converges, the training of the classification model is ended, and the classification model with the third parameters is used to perform the classification task of each of the multiple training sample providers.
[0060] Since the third parameters integrate the feature information learned by each training device based on its own training samples, the classification model with the third parameters can be universally applicable to the classification tasks of the multiple training sample providers, and a relatively accurate classification result can be obtained. BRIEF DESCRIPTION OF DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0062] Figure 1 A composition schematic diagram of a model training system provided by an embodiment of the present application;
[0063] Figure 2 A flowchart of a model training method provided by an embodiment of the present application;
[0064] Figure 3 A flowchart of a model testing method provided by an embodiment of the present application;
[0065] Figure 4 A flowchart of a model training method provided by an embodiment of the present application;
[0066] Figure 5 A flowchart of a model training method provided by an embodiment of the present application;
[0067] Figure 6 A flowchart of a diagnosis-related classification model training method provided by an embodiment of the present application;
[0068] Figure 7 A flowchart illustrating a diagnostic-related classification model training method provided in an embodiment of the present invention;
[0069] Figure 8 A schematic diagram of a model training scenario provided in an embodiment of the present invention;
[0070] Figure 9 This is a schematic diagram of the structure of a model training device provided in an embodiment of the present invention;
[0071] Figure 10 To and Figure 9 A schematic diagram of the electronic device corresponding to the model training device provided in the embodiment shown;
[0072] Figure 11 This is a schematic diagram of the structure of a model training device provided in an embodiment of the present invention;
[0073] Figure 12 To and Figure 11 A schematic diagram of the electronic device corresponding to the model training device provided in the embodiment shown;
[0074] Figure 13 This is a schematic diagram of the structure of a diagnostic-related classification model training device provided in an embodiment of the present invention;
[0075] Figure 14 To and Figure 13 A schematic diagram of the electronic device corresponding to the device provided in the illustrated embodiment;
[0076] Figure 15 This is a schematic diagram of the structure of a diagnostic-related classification model training device provided in an embodiment of the present invention;
[0077] Figure 16 To and Figure 15 The illustrated embodiment provides a schematic diagram of the electronic device corresponding to the device. Detailed Implementation
[0078] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0079] The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the description of the application and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be understood that "comprising" is generally used when the properties of the composition or method are not limited to the specified properties, and "consisting of" is generally used when the properties of the composition or method are limited to the specified properties.
[0080] Depending on the context, the word "if" as used herein can be interpreted to mean "when" or "while" or "in response to determining" or "in response to detecting." Similarly, the phrase "if it is determined" or "if a detected (statement of a condition or event)" can be interpreted to mean "when it is determined" or "in response to determining" or "when a detected (statement of a condition or event)" or "in response to detecting (statement of a condition or event)".
[0081] In addition, the sequence of steps in the following method embodiments is only an example, not a strict limitation.
[0082] In practical applications, there is a situation that a classification model needs to be trained to complete a multi-classification task. However, due to the limited training samples provided by a single training sample provider and the uneven data distribution (for example, the training samples of some categories are not complete or the number of training samples of some categories is small), if only the training samples provided by a single training sample provider are used to complete the training of the classification model, the performance of the trained classification model can be poor and not universal.
[0083] A manner of jointly providing training samples provided by multiple training sample providers for classification model training can be a transfer learning manner. Since in some application scenarios, the training samples provided by the training sample providers have privacy and cannot be directly provided to others, based on this, in the transfer learning manner, the training process of the classification model is simply as follows: first, each training sample provider labels the supervision information of its own training samples, for example, training sample provider 1 marks its first type of training samples as 01 and its second type of training samples as 02. And training sample provider B marks its third type of training samples as 01 and its fourth type of training samples as 02. Wherein, 01 and 02 represent class labels. Then, training sample provider 1 trains a classification model 1 based on its own training samples, and then training sample provider 1 tests the classification model 1 based on its own test samples. Assuming that the test result meets the requirements, the classification model 1 is provided to training sample provider 2. Training sample provider 2 trains a classification model 2 based on the classification model 1 using its own training samples, and tests the classification model 2 using its own test samples. Assuming that the test result meets the requirements (note that the classification model 2 does not necessarily perform well in the test of training sample provider 1), the classification model 3 is then provided to the next training sample provider 3, which continues to train based on the classification model 2 using its own training samples. This is repeated until the classification model n is finally trained by training sample provider N. Finally, the classification model n is provided to the above n training sample providers, and each training sample provider will subsequently use the classification model n to complete its own classification task. For example, any training sample provider i, upon receiving a user-triggered classification task, uses the classification model n to complete the classification task to output a classification prediction result for the input data.
[0084] In the above transfer learning manner, each training sample provider trains the classification model in a serial manner. When there are many training sample providers, the time cost of training the classification model is relatively large.
[0085] In addition, in the above transfer learning manner, the local training samples are used to continue training the classification model based on the classification model trained by other training sample providers. At this time, the performance (or quality) of the obtained classification model depends on the number of local training samples and whether the data distribution of the training samples used by the previously trained classification model is similar to that of the local training samples. If not or the number of local training samples is small, it is likely that the locally trained classification model will not perform well for the local or other training sample providers. Thus, the classification model obtained in the transfer learning manner is not universal among multiple training sample providers and cannot obtain a globally optimal classification performance.
[0086] In addition, in the above migration learning manner, sharing the classification model between different training sample providers also causes data security problems. For example, after obtaining the classification model 1, the training sample provider 2 can infer the data distribution characteristics of the training sample provider 1 that trained the classification model 1 based on the parameters of the classification model 1, which brings data security risks to the training sample provider 1.
[0087] In order to avoid one or more problems existing in the above migration learning manner, the embodiments of the present application provide a new scheme for training a classification model. In other words, in the embodiments of the present application, the training of the classification model is completed in a federated learning manner. In simple terms, the federated learning manner is to jointly complete the training of the classification model in parallel with multiple training sample providers, so as to save the training time cost and make the finally trained classification model have good universality in multiple training sample providers, and achieve good global performance (i.e. the finally trained classification model obtains better accuracy on the classification tasks of multiple training sample providers).
[0088] The following describes the classification model training process in the above federated learning manner in combination with some embodiments.
[0089] Figure 1 A composition schematic diagram of a model training system provided by the embodiments of the present application is shown in FIG. 1, which includes a control device and multiple training devices (such as training device A and training device B shown in FIG. 1), and the multiple training devices are respectively in communication connection with the control device. Figure 1 Figure 1 The multiple training devices can correspond to multiple training sample providers. Specifically, one training sample provider corresponds to one training device.
[0090] It can be understood that the training sample provider can provide the training sample required for training the classification model, but after the training of the classification model is completed, the training sample provider can also be a user of the classification model to complete the local classification task by using the classification model.
[0091] It can be understood that the training sample provider can provide the training sample required for training the classification model, but after the training of the classification model is completed, the training sample provider can also be a user of the classification model to complete the local classification task by using the classification model.
[0092] Taking the classification model for implementing DRGs (i.e. the diagnosis-related classification model) as an example, the above multiple training sample providers can be multiple medical institutions. The multiple medical institutions can use the historical medical data already stored by themselves as training samples to complete the training of the classification model, and when the training of the classification model is completed, the medical institutions can use the trained classification model to complete the DRGs prediction classification task, i.e. inputting a medical data into the classification model to obtain the DRGs prediction result output by the classification model.
[0093] In this embodiment of the invention, the control device is used to control multiple training devices to perform model training. The control device can be a physical / virtual server or server cluster in the cloud, and the training devices can be terminal devices or servers located locally at the training sample provider. Each training device stores the corresponding training samples and test samples from the training sample provider, so that the training samples and test samples from the training sample provider do not need to leave the local machine of the training sample provider to ensure data security.
[0094] It is understandable that training samples are used to train the classification model, and test samples are used to verify the accuracy of the classification model.
[0095] In addition, in this embodiment of the invention, each of the multiple training devices is equipped with a classification model. That is to say, the training process of the classification model is executed locally on multiple training devices (each training device trains the classification model locally based on its own stored training samples), and the control device only performs relevant control on the training process.
[0096] The classification model in this embodiment of the invention can be any neural network model that can perform classification tasks, such as a recurrent neural network (RNN) model, a long short-term memory (LSTM) model, a bi-directional long short-term memory (Bi-LSTM) model, and so on.
[0097] based on Figure 1 The system architecture shown, from the perspective of the control device, allows the control device to perform actions such as... during the training of the classification model. Figure 2 The steps shown.
[0098] Figure 2 A flowchart of a model training method provided in an embodiment of the present invention is shown below. Figure 2 As shown, the method includes the following steps:
[0099] 201. The control device sends the first parameters of the classification model to multiple training devices, so that the multiple training devices train the classification model based on the first parameters and local training samples to obtain the second parameters corresponding to each of the multiple training devices.
[0100] 202. The control device receives the second parameters corresponding to each of the multiple training devices.
[0101] 203、the control device combines the second parameters corresponding to the plurality of training devices respectively to obtain a third parameter, and instructs the plurality of training devices to update the parameters of the classification model to the third parameter.
[0102] In this embodiment, since multiple training sample providers are to be combined to train the classification model, the training samples provided by the multiple training sample providers need to be labeled with unified supervision information, that is, the multiple training sample providers need to label the supervision information of the training samples based on the same labeling standard. In addition, in actual application, the habits of recording information of different training sample providers may be different, and there may be recording errors. In order to facilitate the training of the classification model, some preprocessing can be performed on the training samples provided by each training sample provider.
[0103] Therefore, the control device can send data processing information to the plurality of training devices in advance, so that the plurality of training devices perform data processing on the local training samples according to the data processing information.
[0104] The data processing information includes labeling information corresponding to the training samples. In simple terms, the labeling information describes what kind of training samples should be labeled with what kind of class label. For example, all medical institutions are informed to label a certain ophthalmic disease as 01, and a certain heart disease as 02, and so on.
[0105] Optionally, the data processing information further includes at least one of the following information:
[0106] Data structuring processing information, used for performing a set of structured processing on data contained in each training sample;
[0107] Data filtering rule information, used for filtering processing on training samples that do not meet the set requirements.
[0108] For any training sample, the data information contained in the training sample can be organized into a data structure in the form of key-value pair, denoted as key:value. Wherein, key represents a key, and value represents a value. For example, taking medical data as an example, the medical data can include age, various examination indexes, diseases, diagnosis results and other data contents, and each item of data content can be structured according to the set structure requirement. For example, a piece of medical data records: Zhang San, 25. Another piece of medical data records: name: Li Si, 30. According to the recording requirements of name and age specified in the data structuring processing information, it can be converted to: name: Zhang San; age: 25. And, name: Li Si; age: 30.
[0109] The data filtering rule information can describe filtering rules of various data contents contained in the training samples. For example, if the age of a patient recorded in a piece of medical data is 150, the medical data will be filtered out because the age is unreasonable.
[0110] For ease of understanding, the execution process of the above model training method is exemplarily described in conjunction with the system shown in Figure 1
[0111] In actual application, when the classification model needs to be trained, the control device can first initialize the parameters of the classification model, assuming that the initialization is the first parameter, denoted as W0. It can be understood that the process of training the classification model is a process of continuously iterating and updating the parameters of the classification model.
[0112] Then, the control device sends the first parameter W0 to a plurality of training devices, such as the training device A and the training device B shown in Figure 1 The plurality of training devices locally store the same classification model having the same structure, and after receiving the first parameter W0, the plurality of training devices set the parameters of the locally stored classification model to the first parameter W0.
[0113] Then, each training device trains the classification model with the parameters set to the first parameter W0 using the local training samples. After a period of training, each training device obtains a second parameter corresponding to the locally maintained classification model. For example, Figure 1 In the example shown in, the training device A obtains the second parameter WA after a period of training of the classification model with the first parameter W0 based on the local training samples, and the training device B obtains the second parameter WB after a period of training of the classification model with the first parameter W0 based on the local training samples. Then, the training device A sends the second parameter WA to the control device, and similarly, the training device B sends the second parameter WB to the control device.
[0114] Optionally, the "a period of time" can be a preset time length, and in this case, the preset time length is applicable to the plurality of training devices, for example, all the training devices train the classification model with the first parameter W0 for 30 minutes. Alternatively, the "a period of time" can also be determined according to the total number of training samples stored in each training device to determine the length of the "a period of time" corresponding to each training device, for example, the period of time for each training device to train the classification model with the first parameter W0 is set to 60% of the total number of training samples corresponding to each training device.
[0115] After the control device receives the second parameters corresponding to the plurality of training devices, the second parameters are combined to obtain a third parameter W1. In Figure 1In some embodiments, the control device combines the second parameters WA and WB to obtain a third parameter W1, and notifies the plurality of training devices to update the parameters of the local classification model to the third parameter W1.
[0116] Optionally, the control device can perform weighted average processing on the second parameters corresponding to the plurality of training devices to obtain the third parameter W1.
[0117] The weight of the second parameter corresponding to each training device can be determined according to the total number of training samples stored in the training device and / or the grade category of the training sample provider corresponding to the training device.
[0118] Taking a medical institution as an example of a training sample provider, the weight of the second parameter corresponding to each medical institution can be determined according to the preset grade category corresponding to the medical institution. For example, the weights corresponding to the same grade category are the same, and the weights corresponding to different grade categories are different.
[0119] When the weight of the second parameter corresponding to each training device is determined according to the total number of training samples, the weight values corresponding to the total number of training samples in different value intervals can be preset to determine the weight of the second parameter corresponding to each training device.
[0120] After obtaining the third parameter W1, the control device can also determine whether the classification model with the third parameter W1 meets a set condition, which can be a convergence condition. In short, it is determined whether the classification model with the third parameter W1 can generally meet the classification task requirements of the plurality of training sample providers and obtain good performance.
[0121] In summary, the control device can control the plurality of training devices to test the classification model with the third parameter W1 to determine whether the classification model with the third parameter W1 meets the set condition. The testing process can be performed according to the embodiment shown in Figure 3 .
[0122] Figure 3 A flowchart of a model testing method provided by an embodiment of the present application is shown in Figure 3 , the control device can determine whether the classification model with the third parameter W1 meets the set condition by the following steps:
[0123] 301. The control device sends the third parameter W1 to the plurality of training devices, so that the plurality of training devices respectively test the classification model with the third parameter W1 according to the local test samples to obtain a plurality of training devices respectively corresponding to the test indicators.
[0124] 302. The control device receives the test indicators corresponding to the plurality of training devices respectively.
[0125] 303. The control device determines whether the classification model with the third parameter W1 meets the set conditions based on the test indicators corresponding to each of the multiple training devices.
[0126] Specifically, the control device sends the third parameter W1 to multiple training devices. At this time, each training device (such as...) Figure 1 Training devices A and B set the parameters of various stored classification models to a third parameter W1. Then, each training device tests the classification model with its parameters set to the third parameter W1 using local test samples to obtain a test metric. The test metric may include classification accuracy.
[0127] Afterwards, each training device sends its own test indicators to the control device. The control device then determines whether the classification model with the third parameter W1 meets the set conditions based on the test indicators corresponding to each of the multiple training devices.
[0128] Optionally, the control device can perform weighted averaging on the test indicators corresponding to each of the multiple training devices. If the weighted averaging result is greater than or equal to a set threshold, then the classification model with the third parameter W1 is determined to have met the set conditions.
[0129] Optionally, the control device can determine the weights of the test metrics corresponding to each of the multiple training devices based on at least one of the following information:
[0130] The number of training samples from each of the multiple training sample providers, the corresponding grade categories for each of the multiple training sample providers, and the corresponding test metrics for each of the multiple training devices.
[0131] For example, regarding Figure 1 Taking training devices A and B as illustrated, assume that training device A achieves a classification accuracy of Pa when testing a classification model with a third parameter W1, and training device B achieves a classification accuracy of Pb when testing the same model, with Pa being greater than Pb. Assuming that the weights of the test metrics for each training device are determined solely based on their respective test metrics, then the weight corresponding to Pa can be e1, and the weight corresponding to Pb can be e2, where e1 is greater than e2. Multiple classification accuracy ranges and their corresponding weights can be pre-set, with higher accuracy ranges corresponding to higher weights.
[0132] Similarly, for the possible grade categories corresponding to the training sample providers, different weights corresponding to different grade categories can be pre-set, thereby determining the weights of the test metrics corresponding to each of the multiple training devices.
[0133] Similarly, a correspondence relationship between the number of training samples and the weight with different number intervals can be preset, according to which the weight of the test index corresponding to each of the plurality of training devices is determined.
[0134] After the control device determines the weight of the test index corresponding to each of the plurality of training devices, the control device performs a weighted average processing on the test index corresponding to each of the plurality of training devices (i.e., adding the weights and then dividing by the total number of training devices), and if the result of the weighted average processing is greater than or equal to a set threshold, it is determined that the classification model with the third parameter W1 meets the set condition, otherwise, if it is less than the set threshold, it is determined that the classification model with the third parameter W1 does not meet the set condition.
[0135] When the control device determines that the classification model with the third parameter W1 meets the set condition, it means that the classification model with the third parameter W1 performs better for the plurality of training sample providers, at this time, the control device can notify the plurality of training devices to stop model training, so that it uses the classification model with the third parameter W1 to perform subsequent classification task processing, that is, the classification model with the third parameter W1 is the final trained classification model.
[0136] When the control device determines that the classification model with the third parameter W1 does not meet the set condition, it means that the classification model with the third parameter W1 needs to be further trained to optimize the classification model. At this time, the control device sends a notification message to the plurality of training devices to make the plurality of training devices continue to train the classification model with the third parameter based on the local training samples. That is, each training device continues to train the classification model with the third parameter W1 using the local training samples based on the classification model with the third parameter W1.
[0137] After the plurality of training devices train the classification model with the third parameter W1 using the respective training samples for a period of time, the plurality of training devices will respectively obtain a fourth parameter corresponding to each of them, and then send the fourth parameter to the control device. The control device combines the fourth parameters corresponding to each of the plurality of training devices to obtain a fifth parameter. Then, the control device controls the plurality of training devices to test the classification model with the fifth parameter to determine whether the classification model with the fifth parameter meets the set condition. The above execution process can refer to the related description in the foregoing, which will not be repeated here. It can be understood that the above training and testing processes are iteratively executed until a classification model with a certain parameter that meets the set condition is trained.
[0138] In summary, in the federated learning manner, the plurality of training devices are controlled by the control device to train the classification model in a parallel manner, so that the training time cost is not restricted by the number of training sample providers. In addition, by scheduling a plurality of training devices to train the classification model locally at the same time, the classification model is not transmitted between different training devices, which helps to protect the data security of different training sample providers. In addition, since the data distribution characteristics of a plurality of training sample providers are fused to determine the parameters of the classification model during the training of the classification model, the classification model obtained finally has good universality among a plurality of training sample providers, and better performance can be obtained.
[0139] Figure 4 A flowchart of a model training method provided by an embodiment of the present application is provided. The method can be executed by a control device, as shown in Figure 4 The method can include the following steps:
[0140] 401. The control device sends the first parameters of the classification model to the plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameters and the local training samples to obtain the second parameters corresponding to the plurality of training devices respectively.
[0141] 402. The control device receives the encrypted second parameters corresponding to the plurality of training devices respectively.
[0142] 403. The control device sends the encrypted second parameters corresponding to the plurality of training devices respectively to the trusted execution space, so as to decrypt the second parameters corresponding to the plurality of training devices respectively in the trusted execution space and perform transformation processing on the second parameters corresponding to the plurality of training devices respectively.
[0143] 404. The control device combines the transformed second parameters corresponding to the plurality of training devices respectively to obtain the third parameters, and notifies the plurality of training devices to update the parameters of the classification model to the third parameters.
[0144] In order to further improve the data security of the plurality of training sample providers, the solution of the present embodiment is provided.
[0145] In the present embodiment, the core point of improving the data security of the plurality of training sample providers is that the training device corresponding to each training sample provider ensures the security of the parameter after training the classification model based on the local training sample to obtain the parameter of the classification model, so as to avoid the data distribution characteristics of the training sample provider from being deduced based on the parameter.
[0146] In the foregoing embodiments, specifically, when each training device receives the first parameter sent by the control device, the training device uses the local training sample to train the classification model with the first parameter for a period of time to obtain the corresponding second parameter, and then transmits the second parameter to the control device in an encrypted manner.
[0147] Still taking the foregoing embodiments as examples, the training device A encrypts the second parameter WA after obtaining the second parameter WA to obtain an encrypted second parameter WA', and transends the encrypted second parameter WA' to the control device. Similarly, the training device B encrypts the second parameter WB after obtaining the second parameter WB to obtain an encrypted second parameter WB', and transends the encrypted second parameter WB' to the control device. The encryption method can be any existing encryption method, such as asymmetric encryption.
[0148] The control device does not have the right to directly decrypt the encrypted second parameter WA' and the encrypted second parameter WB', because if the control device directly decrypts to obtain the plaintext second parameter WA and the plaintext second parameter WB, it will pose a data security threat to the training sample providers corresponding to the two training devices.
[0149] Specifically, the control device sends the encrypted second parameter WA' and the encrypted second parameter WB' to a trusted execution space, and decrypts the second parameter WA and the second parameter WB in the trusted execution space. Since the second parameter WA and the second parameter WB are located in the trusted execution space and cannot be accessed by the outside world, there is no risk of leaking the second parameter WA and the second parameter WB. In addition, the second parameter WA and the second parameter WB are further subjected to certain transformation processing in the trusted execution space, and the transformation processing results are fed back to the control device. Assuming that the second parameter WA is subjected to transformation processing to obtain a transformed second parameter WAA, and the second parameter WB is subjected to transformation processing to obtain a transformed second parameter WBB. In this way, the control device obtains the transformed second parameter WAA and the transformed second parameter WBB, but does not directly obtain the plaintext second parameter WA and the plaintext second parameter WB.
[0150] Subsequently, the control device combines the transformed second parameter WAA and the transformed second parameter WBB to obtain a third parameter, and transmits the third parameter to each training device.
[0151] Optionally, the above transformation process may include differential privacy processing. Of course, it is not limited to this; other transformation methods can also be used. However, it is worth noting that regardless of the transformation method used, the objectives are twofold: first, to avoid transmitting the plaintext second parameter; and second, to ensure that the data distribution characteristics of the training samples reflected by the transformed second parameter are the same as or similar to the data distribution characteristics of the training samples reflected by the untransformed second parameter. In other words, any transformation method that satisfies both of these conditions can be adopted.
[0152] In practical applications, the aforementioned trusted execution space can be implemented using any existing trusted computing technology, such as SGX (software guard extensions).
[0153] Figure 5 This is a flowchart illustrating a model training method provided in an embodiment of the present invention. This method can be executed by a target training device, such as... Figure 5 As shown, the method may include the following steps:
[0154] 501. The target training device receives the first parameters of the classification model sent by the control device. The control device is connected to multiple training devices, and the target training device is any one of the multiple training devices.
[0155] As mentioned above, optionally, the target training device can also receive data processing information sent by the control device and process the local training samples according to the received data processing information. This data processing information includes the annotation information corresponding to the training samples.
[0156] Optionally, the data processing information may also include at least one of the following:
[0157] Data structuring is used to perform structured processing on the data contained in each training sample.
[0158] Data filtering rules are used to filter training samples that do not meet the set requirements.
[0159] 502. The target training device trains the classification model based on the first parameter and local training samples to obtain the second parameter corresponding to the target training device.
[0160] 503. The target training device sends its corresponding second parameter to the control device, so that the control device merges the second parameters corresponding to multiple training devices to obtain the third parameter. Among them, multiple training devices train the classification model based on the first parameter and local training samples to obtain the second parameters corresponding to each of the multiple training devices.
[0161] As described above, the target training device can encrypt the second parameter corresponding to the target training device, and then send the encrypted second parameter corresponding to the target training device to the control device. The other training devices can also encrypt the second parameters corresponding to the other training devices, and then send the encrypted second parameters corresponding to the other training devices to the control device.
[0162] 504、The target training device updates the parameter of the classification model to the third parameter in response to the notification of the control device.
[0163] As described above, the control device also needs to determine whether the classification model with the third parameter meets the set condition, and the determination process is achieved by controlling the plurality of training devices to test the classification model with the third parameter. To complete the testing process, the target training device needs to perform the following steps:
[0164] testing the classification model with the third parameter according to the local test sample to obtain the test index corresponding to the target training device;
[0165] sending the test index corresponding to the target training device to the control device, so that the control device determines whether the classification model with the third parameter meets the set condition according to the test index corresponding to each of the plurality of training devices, wherein the plurality of training devices respectively test the classification model with the third parameter according to the local test sample to obtain the test index corresponding to each of the plurality of training devices.
[0166] As described above, if the control device determines that the classification model with the third parameter meets the set condition, the control device notifies each training device including the target training device to use the classification model with the third parameter to perform various classification tasks. Conversely, if the control device determines that the classification model with the third parameter does not meet the set condition, the control device sends the third parameter to each training device. At this time, the target training device receives the third parameter sent by the control device when the control device determines that the classification model with the third parameter does not meet the set condition, and then continues to train the classification model based on the third parameter and the local training sample.
[0167] In this embodiment, the detailed execution process of the target training device in the classification model training process can refer to the related description in the foregoing embodiments, which will not be described here.
[0168] The training scheme of the classification model provided by the embodiment of the application can be applied to any application scenario that needs to train a commonly used classification model by combining the training samples provided by a plurality of training sample providers. For example, the DGRs application scenario mentioned above.
[0169] In the DGRs application scenario, a diagnosis-related classification model needs to be trained, and to complete the training of the classification model, the control device needs to perform the following steps: Figure 6
[0170] 601、the control device sends the first parameters of the classification model to the plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the plurality of training devices respectively, the plurality of training devices are each provided with the classification model, and the plurality of training devices correspond to a plurality of medical institutions.
[0171] 602、the control device receives the second parameters corresponding to the plurality of training devices respectively.
[0172] 603、the control device merges the second parameters corresponding to the plurality of training devices respectively to obtain third parameters, and notifies the plurality of training devices to update the parameters of the classification model to the third parameters.
[0173] Correspondingly, to complete the training of the classification model, as shown in Figure 7 , a target training device in the plurality of training devices needs to perform the following steps:
[0174] 701、the target training device receives the first parameters of the classification model sent by the control device, the control device is connected with the plurality of training devices, the target training device is any one of the plurality of training devices, and the plurality of training devices correspond to a plurality of medical institutions.
[0175] 702、the target training device trains the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the target training device.
[0176] 703、the target training device sends the second parameters corresponding to the target training device to the control device, so that the control device merges the second parameters corresponding to the plurality of training devices respectively to obtain third parameters, wherein the plurality of training devices respectively train the classification model based on the first parameters and local training samples to obtain the second parameters corresponding to the plurality of training devices respectively.
[0177] 704、in response to the notification of the control device, the target training device updates the parameters of the classification model to the third parameters.
[0178] The following Figure 8 exemplarily illustrates the execution process of the model training method provided by the embodiments of the present application in the DGRs application scenario.
[0179] In Figure 8 , it is assumed that the classification model for realizing the DGRs prediction needs to be completed by jointly using the medical data of medical institution X and medical institution Y.
[0180] In the initial stage, it is assumed that a classification model has been created, and the control device initializes the parameters of the classification model as the first parameters C1, and the control device sends the first parameters C1 to the medical institutions X and Y, and the medical institutions X and Y set the parameters of the locally maintained classification model to the first parameters C1, and then the medical institutions X and Y train the classification model with the first parameters C1 using the respective local medical data (training samples). After a period of training, the medical institution X obtains the second parameters CA2, and the medical institution Y obtains the second parameters CB2, the medical institution X encrypts the second parameters CA2 and transmits them to the control device, and the medical institution Y encrypts the second parameters CB2 and transmits them to the control device.
[0181] The control device sends the obtained encrypted parameters to the trusted execution space, decrypts the second parameters CA2 and CB2 in the trusted execution space, and processes the two second parameters by privacy differential method respectively to obtain the second parameters CA2' and CB2'.
[0182] The control device obtains the second parameters CA2' and CB2' calculated in the trusted execution space, combines the two parameters to obtain the third parameters C2, and sends the third parameters C2 to the medical institutions X and Y, and instructs the medical institutions X and Y to test the classification model with the third parameters C2.
[0183] The medical institutions X and Y test the classification model with the third parameters C2 using the respective local test data, obtain the classification accuracies PA and PB, and send the classification accuracies to the control device.
[0184] The control device determines that the classification model with the third parameters C2 meets the conditions based on the classification accuracies PA and PB, and notifies the medical institutions X and Y to use the classification model with the third parameters C2 to complete the subsequent DGRs prediction tasks.
[0185] In this way, it is assumed that the medical institution X subsequently generates medical data, and when it is necessary to predict the DGRs of the medical data, the medical data is input into the classification model with the third parameters C2 to obtain the classification output result of the classification model.
[0186] The model training scheme provided by the embodiments of the present application can not only be applied to the application scenario of DRGs, but also can be applied to other application scenarios. For example, in a financial scenario, due to data security reasons, the data of different financial institutions is also independently stored in isolation. When it is necessary to jointly train a model that can be applied to data processing (such as data classification) of each financial institution by using data of multiple financial institutions, the scheme provided by the embodiments of the present application can be applied. For another example, in a government affair scenario, the data between different government affair systems is also independent of each other. For another example, in an e-commerce scenario, the data of different merchants is also independent. When it is necessary to train a certain model by using data of multiple government affair systems or multiple merchants, the scheme provided by the embodiments of the present application can be used.
[0187] The model training device of one or more embodiments of the present application will be described in detail below. Those skilled in the art can understand that these devices can be configured by using commercially available hardware components through the steps taught by the present scheme.
[0188] Figure 9 A structural schematic diagram of a model training device provided by the embodiments of the present application is shown in the figure. The device is applied to a control equipment. As shown in the figure, the device comprises a sending module 11, a receiving module 12 and a processing module 13. Figure 9
[0189] The sending module 11 is configured to send the first parameter of the classification model to multiple training devices, so that the multiple training devices train the classification model based on the first parameter and local training samples to obtain respective second parameters of the multiple training devices, and the multiple training devices are each provided with the classification model.
[0190] The receiving module 12 is configured to receive the respective second parameters of the multiple training devices.
[0191] The processing module 13 is configured to combine the respective second parameters of the multiple training devices to obtain a third parameter.
[0192] The sending module 11 is further configured to notify the multiple training devices to update the parameter of the classification model to the third parameter.
[0193] Optionally, the processing module 13 is specifically configured to perform weighted average processing on the respective second parameters of the multiple training devices to obtain the third parameter.
[0194] Optionally, the receiving module 12 is specifically configured to receive the encrypted second parameters corresponding to the plurality of training devices respectively. At this time, the processing module 13 is specifically configured to send the encrypted second parameters corresponding to the plurality of training devices respectively to the trusted execution space, to decrypt the second parameters corresponding to the plurality of training devices respectively in the trusted execution space and to perform transformation processing on the second parameters corresponding to the plurality of training devices respectively; and to combine the transformed second parameters corresponding to the plurality of training devices respectively to obtain the third parameter.
[0195] Optionally, the transformation processing includes differential privacy processing.
[0196] Optionally, the sending module 11 is further configured to, if it is determined that the classification model with the third parameter does not meet the set condition, notify the plurality of training devices to continue training the classification model based on local training samples.
[0197] Optionally, the sending module 11 is further configured to, if it is determined that the classification model with the third parameter meets the set condition, notify the plurality of training devices to stop training the classification model.
[0198] Optionally, the receiving module 12 is further configured to receive test indicators corresponding to the plurality of training devices respectively, wherein the plurality of training devices respectively test the classification model with the third parameter according to local test samples to obtain the test indicators corresponding to the plurality of training devices respectively. The processing module 13 is further configured to determine whether the classification model with the third parameter meets the set condition according to the test indicators corresponding to the plurality of training devices respectively.
[0199] Optionally, the processing module 13 is specifically configured to perform weighted average processing on the test indicators corresponding to the plurality of training devices respectively; and if the weighted average processing result is greater than or equal to a set threshold, it is determined that the classification model with the third parameter meets the set condition.
[0200] Optionally, the processing module 13 is specifically configured to determine the weights of the test indicators corresponding to the plurality of training devices respectively according to at least one of the following information:
[0201] the number of training samples corresponding to the plurality of training sample providers respectively, the set level categories corresponding to the plurality of training sample providers respectively, and the test indicators corresponding to the plurality of training devices respectively.
[0202] Optionally, the sending module 11 is further configured to send data processing information to the plurality of training devices, so that the plurality of training devices perform data processing on the local training samples according to the data processing information, wherein the data processing information comprises label information corresponding to the training samples.
[0203] Optionally, the data processing information further comprises at least one of the following information:
[0204] data structuring processing information, used for performing a set of structured processing on data contained in each training sample;
[0205] data filtering rule information, used for performing filtering processing on training samples that do not meet a set requirement.
[0206] Optionally, the plurality of training devices correspond to a plurality of training sample providers. Optionally, the plurality of training sample providers comprise a plurality of medical institutions, and the classification model is used to complete diagnosis-related classification.
[0207] Figure 9 The apparatus can perform the foregoing Figures 2 to 4 The model training method provided in the embodiments is described in detail above, and thus will not be described here.
[0208] In one possible design, the foregoing Figure 9 The structure of the model training apparatus can be implemented as an electronic device, such as a server. Figure 10 The electronic device can include a first processor 21 and a first memory 22. The first memory 22 stores executable code. When the executable code is executed by the first processor 21, the first processor 21 can implement at least the model training method provided in the foregoing Figures 2 to 4 embodiments.
[0209] Optionally, the electronic device can further include a first communication interface 23 configured to communicate with other devices.
[0210] In addition, an embodiment of the present application provides a non-transitory machine readable storage medium, which stores executable code. When the executable code is executed by a processor of an electronic device, the processor can implement at least the model training method provided in the foregoing Figures 2 to 4 embodiments.
[0211] In addition, an embodiment of the present application provides an application program. When the application program is executed by a processor of an electronic device, the processor performs the model training method provided in the foregoing Figures 2 to 4 embodiments.
[0212] Figure 11 A structural schematic diagram of a model training device is provided for an embodiment of the present application, which is applied to a target training device. As shown in the figure, the device comprises a receiving module 31, a training module 32, a sending module 33, and an updating module 34. Figure 11
[0213] The receiving module 31 is configured to receive a first parameter of a classification model sent by a control device, wherein the control device is connected with a plurality of training devices, and the target training device is any one of the plurality of training devices.
[0214] The training module 32 is configured to train the classification model based on the first parameter and a local training sample to obtain a second parameter corresponding to the target training device.
[0215] The sending module 33 is configured to send the second parameter corresponding to the target training device to the control device, so that the control device combines the second parameters corresponding to the plurality of training devices respectively to obtain a third parameter, wherein the plurality of training devices respectively train the classification model based on the first parameter and a local training sample to obtain the second parameters corresponding to the plurality of training devices respectively.
[0216] The updating module 34 is configured to update the parameter of the classification model to the third parameter in response to a notification of the control device.
[0217] Optionally, the device further comprises an encryption module configured to encrypt the second parameter corresponding to the target training device. At this time, the sending module 33 is specifically configured to send the encrypted second parameter corresponding to the target training device to the control device.
[0218] Optionally, the training module 32 is further configured to test the classification model with the third parameter according to a local test sample to obtain a test index corresponding to the target training device. The sending module 33 is further configured to send the test index corresponding to the target training device to the control device, so that the control device determines whether the classification model with the third parameter meets a set condition according to the test indexes corresponding to the plurality of training devices respectively, wherein the plurality of training devices respectively test the classification model with the third parameter according to local test samples to obtain the test indexes corresponding to the plurality of training devices respectively.
[0219] Optionally, the receiving module 31 is further configured to receive data processing information sent by the control device. The device further comprises a data processing module configured to perform data processing on the local training sample according to the data processing information, wherein the data processing information comprises label information corresponding to the training sample.
[0220] Optionally, the data processing information further comprises at least one of the following information:
[0221] data structuring processing information, used for performing a set of structured processing on the data contained in each training sample;
[0222] data filtering rule information, used for performing filtering processing on the training sample that does not meet the set requirement.
[0223] Figure 11 The device can perform the foregoing Figure 5 The model training method provided in the embodiments can refer to the description in the foregoing embodiments for the detailed execution process and technical effects, which will not be described herein.
[0224] In one possible design, the foregoing Figure 11 The structure of the model training device can be implemented as an electronic device, such as a server. Figure 12 The electronic device can include a second processor 41 and a second memory 42. The second memory 42 stores executable code. When the executable code is executed by the second processor 41, the second processor 41 can implement at least the model training method provided in the foregoing Figure 5 embodiments.
[0225] Optionally, the electronic device can further include a second communication interface 43 configured to communicate with other devices.
[0226] In addition, an embodiment of the present application provides a non-transitory machine readable storage medium, which stores executable code. When the executable code is executed by a processor of an electronic device, the processor can implement at least the model training method provided in the foregoing Figure 5 embodiments.
[0227] In addition, an embodiment of the present application provides an application program. When the application program is executed by a processor of an electronic device, the processor performs the model training method provided in the foregoing Figure 5 embodiments.
[0228] Figure 13 A structural diagram of a diagnostic related classification model training device provided by an embodiment of the present application is shown in the figure. The device is applied to a control device. As shown in the figure, the device includes a sending module 51, a receiving module 52, and a merging module 53. Figure 13
[0229] The sending module 51 is configured to send the first parameters of the classification model to a plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the plurality of training devices respectively, wherein the plurality of training devices are each provided with the classification model, and the plurality of training devices correspond to a plurality of medical institutions.
[0230] The receiving module 52 is configured to receive the second parameters corresponding to the plurality of training devices respectively.
[0231] The merging module 53 is configured to merge the second parameters corresponding to the plurality of training devices respectively to obtain third parameters.
[0232] The sending module 51 is further configured to notify the plurality of training devices to update the parameters of the classification model to the third parameters.
[0233] Figure 13 The apparatus can perform the foregoing Figure 6 The diagnostic related classification model training method provided in the embodiments is described in detail above, and the technical effects are not repeated here.
[0234] In one possible design, the foregoing Figure 13 The structure of the diagnostic related classification model training apparatus can be implemented as an electronic device, such as a server. Figure 14 The electronic device can include a third processor 61 and a third memory 62. The third memory 62 stores executable code. When the executable code is executed by the third processor 61, the third processor 61 can implement the diagnostic related classification model training method provided in the foregoing Figure 6 embodiments.
[0235] Optionally, the electronic device can further include a third communication interface 63 configured to communicate with other devices.
[0236] In addition, an embodiment of the present application provides a non-transitory machine readable storage medium, which stores executable code. When the executable code is executed by a processor of an electronic device, the processor can implement the diagnostic related classification model training method provided in the foregoing Figure 6 embodiments.
[0237] In addition, an embodiment of the present application provides an application program. When the application program is executed by a processor of an electronic device, the processor performs the diagnostic related classification model training method provided in the foregoing Figure 6 embodiments.
[0238] Figure 15A structural schematic diagram of a diagnosis related classification model training device is provided for an embodiment of the present application. The device is applied to a target training device. As shown in Figure 15 The device includes a receiving module 71, a training module 72, a sending module 73, and an updating module 74.
[0239] The receiving module 71 is configured to receive a first parameter of a classification model sent by a control device, wherein the control device is connected with a plurality of training devices, the target training device is any one of the plurality of training devices, and the plurality of training devices correspond to a plurality of medical institutions.
[0240] The training module 72 is configured to train the classification model based on the first parameter and a local training sample to obtain a second parameter corresponding to the target training device.
[0241] The sending module 73 is configured to send the second parameter corresponding to the target training device to the control device, so that the control device combines second parameters corresponding to the plurality of training devices respectively to obtain a third parameter, wherein the plurality of training devices respectively train the classification model based on the first parameter and a local training sample to obtain the second parameters corresponding to the plurality of training devices respectively.
[0242] The updating module 74 is configured to update the parameter of the classification model to the third parameter in response to a notification of the control device.
[0243] Figure 15 The device shown in the foregoing Figure 7 The diagnosis related classification model training method provided in the foregoing
[0244] In one possible design, the foregoing Figure 15 The structure of the diagnosis related classification model training device shown in the foregoing Figure 16 The electronic device can include a fourth processor 81 and a fourth memory 82. The fourth memory 82 stores executable code. When the executable code is executed by the fourth processor 81, the fourth processor 81 can implement the diagnosis related classification model training method provided in the foregoing Figure 7 embodiment.
[0245] Optionally, the electronic device can further include a fourth communication interface 83 configured to communicate with other devices.
[0246] In addition, an embodiment of the present application provides a non-transitory machine readable storage medium, which has stored executable codes, when the executable codes are executed by a processor of an electronic device, the processor can at least implement the method as described above. Figure 7 The method for training the diagnosis-related classification model provided in the embodiment.
[0247] In addition, an embodiment of the present application provides an application program, when the application program is executed by a processor of an electronic device, the processor executes the method as described above. Figure 7 The method for training the diagnosis-related classification model provided in the embodiment.
[0248] The device embodiments described above are merely illustrative, and the units described as separate components can or can not be physically separated. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment. Those skilled in the art can understand and implement without creative labor.
[0249] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of general hardware platforms as necessary, and of course, can also be implemented by means of combination of hardware and software. Based on such understanding, the above technical solutions can be embodied in the form of computer products, and the present application can be implemented in the form of computer program products on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.
[0250] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A model training method, characterized in that, The application is applied to a control device, comprising: sending a first parameter of a classification model to a plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameter and local training samples to obtain respective second parameters of the plurality of training devices, wherein the plurality of training devices are each provided with the classification model; receiving respective encrypted second parameters of the plurality of training devices; sending the respective encrypted second parameters of the plurality of training devices to a trusted execution space, so as to decrypt the respective second parameters of the plurality of training devices in the trusted execution space and perform differential privacy processing on the respective second parameters of the plurality of training devices in the trusted execution space; merging the respective second parameters of the plurality of training devices after differential privacy processing to obtain a third parameter; informing the plurality of training devices to update the parameter of the classification model to the third parameter; if it is determined that the classification model with the third parameter does not meet a set condition, informing the plurality of training devices to continue training the classification model with the third parameter based on local training samples.
2. The method of claim 1, wherein, The method further comprises: if it is determined that the classification model with the third parameter meets the set condition, informing the plurality of training devices to stop training the classification model.
3. The method of claim 1, wherein, The method further comprises: receiving respective test indicators of the plurality of training devices, wherein the plurality of training devices respectively test the classification model with the third parameter based on local test samples to obtain the respective test indicators of the plurality of training devices; 4. The method according to claim 1 or 3, characterized in that, determining whether the classification model with the third parameter meets the set condition according to the respective test indicators of the plurality of training devices. The method further comprises: performing weighted average processing on the respective test indicators of the plurality of training devices; 5. The method of claim 4, wherein, if the result of the weighted average processing is greater than or equal to a set threshold, it is determined that the classification model with the third parameter meets the set condition. The method further comprises: determining the weight of the respective test indicators of the plurality of training devices according to at least one of the following information:
6. The method of claim 5, wherein, the number of training samples corresponding to each of the plurality of training sample providers, the set level category corresponding to each of the plurality of training sample providers, and the test indicators corresponding to each of the plurality of training devices. The method further comprises: sending data processing information to the plurality of training devices, so that the plurality of training devices perform data processing on local training samples according to the data processing information, wherein the data processing information comprises annotation information corresponding to training samples.
7. The method of claim 1, wherein, The data processing information further comprises at least one of the following information: 8. The method of claim 7, wherein, Data structuring processing information, used for performing a set of structured processing on data contained in each training sample; Data filtering rule information, used for performing filtering processing on training samples that do not meet a set requirement.
9. The method of claim 1, wherein, The plurality of training devices correspond to a plurality of training sample providers.
10. The method of claim 9, wherein, The plurality of training sample providers include a plurality of medical institutions, and the classification model is used to complete diagnosis-related classification.
11. A model training method, comprising: The method is applied to a target training device, and the method comprises: receiving a first parameter of a classification model sent by a control device, the control device being connected with a plurality of training devices, and the target training device being any one of the plurality of training devices; training the classification model based on the first parameter and local training samples to obtain a second parameter corresponding to the target training device; encrypting the second parameter corresponding to the target training device, and sending the encrypted second parameter corresponding to the target training device to the control device, so that the control device sends encrypted second parameters corresponding to the plurality of training devices respectively to a trusted execution space, so as to decrypt the second parameters corresponding to the plurality of training devices respectively in the trusted execution space, and perform differential privacy processing on the second parameters corresponding to the plurality of training devices respectively in the trusted execution space, and combine the second parameters corresponding to the plurality of training devices respectively after differential privacy processing to obtain a third parameter, wherein the plurality of training devices respectively train the classification model based on the first parameter and local training samples to obtain the second parameters corresponding to the plurality of training devices respectively; updating a parameter of the classification model to the third parameter in response to a notification of the control device; continuing to train the classification model with the third parameter based on local training samples in response to a notification sent by the control device when it is determined that the classification model with the third parameter does not meet a set condition.
12. The method of claim 11, wherein, The method further comprises: testing the classification model with the third parameter based on local test samples to obtain a test index corresponding to the target training device; sending the test index corresponding to the target training device to the control device, so that the control device determines whether the classification model with the third parameter meets a set condition according to test indexes corresponding to the plurality of training devices respectively, wherein the plurality of training devices respectively test the classification model with the third parameter based on local test samples to obtain the test indexes corresponding to the plurality of training devices respectively.
13. The method of claim 11, wherein, The method further comprises: receiving data processing information sent by the control device; performing data processing on local training samples according to the data processing information, the data processing information including label information corresponding to training samples.
14. The method of claim 13, wherein, The data processing information further includes at least one of the following information: Data structuring processing information, used for performing a set of structured processing on data contained in each training sample; Data filtering rule information, used for performing filtering processing on training samples that do not meet a set requirement. 15.A method for training a diagnosis-related classification model, the method comprising: The method is applied to a control device, and the method comprises: sending a first parameter of a classification model to a plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameter and local training samples to obtain respective second parameters of the plurality of training devices, wherein the plurality of training devices are each provided with the classification model and correspond to a plurality of medical institutions; receiving encrypted second parameters of the plurality of training devices respectively; sending the encrypted second parameters of the plurality of training devices respectively to a trusted execution space, so as to decrypt the encrypted second parameters of the plurality of training devices respectively in the trusted execution space, and perform differential privacy processing on the encrypted second parameters of the plurality of training devices respectively in the trusted execution space; merging the second parameters of the plurality of training devices respectively after differential privacy processing to obtain a third parameter; informing the plurality of training devices to update the parameter of the classification model to the third parameter; if it is determined that the classification model with the third parameter does not meet a set condition, informing the plurality of training devices to continue training the classification model with the third parameter based on the local training samples. 16.A method for training a diagnosis-related classification model, the method comprising: The method applied to a target training device comprises: receiving a first parameter of a classification model sent by a control device, wherein the control device is connected with a plurality of training devices, the target training device is any one of the plurality of training devices, and the plurality of training devices correspond to a plurality of medical institutions; training the classification model based on the first parameter and local training samples to obtain a second parameter corresponding to the target training device; encrypting the second parameter corresponding to the target training device, and sending the encrypted second parameter corresponding to the target training device to the control device, so that the control device sends the encrypted second parameters of the plurality of training devices respectively to a trusted execution space, so as to decrypt the encrypted second parameters of the plurality of training devices respectively in the trusted execution space, and perform differential privacy processing on the encrypted second parameters of the plurality of training devices respectively in the trusted execution space, and merge the second parameters of the plurality of training devices respectively after differential privacy processing to obtain a third parameter, wherein the plurality of training devices respectively train the classification model based on the first parameter and local training samples to obtain the second parameters of the plurality of training devices respectively; updating the parameter of the classification model to the third parameter in response to the notification of the control device; continuing to train the classification model with the third parameter based on the local training samples in response to the notification sent by the control device when it is determined that the classification model with the third parameter does not meet a set condition.
17. A model training apparatus, comprising: The device applied to a control device comprises: a sending module configured to send a first parameter of a classification model to a plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameter and local training samples to obtain respective second parameters of the plurality of training devices, wherein the plurality of training devices are each provided with the classification model; receive the encrypted second parameters corresponding to the plurality of training devices respectively; the processing module is configured to send the encrypted second parameters corresponding to the plurality of training devices respectively to a trusted execution space, to decrypt the second parameters corresponding to the plurality of training devices respectively in the trusted execution space, and to perform differential privacy processing on the second parameters corresponding to the plurality of training devices respectively in the trusted execution space; and to combine the second parameters corresponding to the plurality of training devices respectively after differential privacy processing to obtain third parameters; the sending module is further configured to notify the plurality of training devices to update the parameters of the classification model to the third parameters; and to notify the plurality of training devices to continue training the classification model with the third parameters based on local training samples if it is determined that the classification model with the third parameters does not meet a set condition.
18. An electronic device, comprising: comprise: a memory and a processor; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to perform the model training method according to any one of claims 1 to 10.
19. A non-transitory machine-readable storage medium, comprising: The non-transitory machine-readable storage medium has stored thereon executable code which, when executed by a processor of an electronic device, causes the processor to perform the model training method according to any one of claims 1 to 10.
20. An application program, characterized by The application program, when executed by a processor of an electronic device, causes the processor to perform the model training method according to any one of claims 1 to 10.
21. A model training apparatus, comprising: The device is applied to a target training device and comprises: a receiving module configured to receive first parameters of a classification model sent by a control device, the control device being connected to a plurality of training devices, and the target training device being any one of the plurality of training devices; a training module configured to train the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the target training device; a sending module configured to encrypt the second parameters corresponding to the target training device, send the encrypted second parameters corresponding to the target training device to the control device, and cause the control device to send the encrypted second parameters corresponding to the plurality of training devices respectively to a trusted execution space, decrypt the second parameters corresponding to the plurality of training devices respectively in the trusted execution space, perform differential privacy processing on the second parameters corresponding to the plurality of training devices respectively in the trusted execution space, and combine the second parameters corresponding to the plurality of training devices respectively after differential privacy processing to obtain third parameters, wherein the plurality of training devices respectively train the classification model based on the first parameters and local training samples to obtain the second parameters corresponding to the plurality of training devices respectively; an updating module configured to update the parameters of the classification model to the third parameters in response to a notification of the control device; and The training module is further configured to continue training the classification model with the third parameters based on local training samples in response to a notification sent by the control device when it is determined that the classification model with the third parameters does not meet a set condition.
22. An electronic device, comprising: Comprise: A memory and a processor, wherein the memory stores executable code, and when the executable code is executed by the processor, the processor performs the model training method according to any one of claims 11 to 14.
23. A non-transitory machine-readable storage medium, comprising: The non-transitory machine readable storage medium stores executable code, and when the executable code is executed by the processor of the electronic device, the processor performs the model training method according to any one of claims 11 to 14.
24. An application program, characterized by When the application program is executed by the processor of the electronic device, the processor performs the model training method according to any one of claims 11 to 14. 25.A diagnosis-related classification model training apparatus, characterized by comprising: Applied to a control device, the device comprises: A sending module configured to send first parameters of a classification model to a plurality of training devices, so that the plurality of training devices respectively train the classification model based on the first parameters and local training samples to obtain second parameters corresponding to the plurality of training devices respectively, wherein the plurality of training devices are each provided with the classification model, and the plurality of training devices correspond to a plurality of medical institutions; A receiving module configured to receive encrypted second parameters corresponding to the plurality of training devices respectively; A merging module configured to send the encrypted second parameters corresponding to the plurality of training devices respectively to a trusted execution space, to decrypt the second parameters corresponding to the plurality of training devices respectively in the trusted execution space, and to perform differential privacy processing on the second parameters corresponding to the plurality of training devices respectively in the trusted execution space; and merge the second parameters corresponding to the plurality of training devices respectively after differential privacy processing to obtain third parameters. The sending module is further configured to notify the plurality of training devices to update the parameters of the classification model to the third parameters, and to notify the plurality of training devices to continue training the classification model with the third parameters based on local training samples if it is determined that the classification model with the third parameters does not meet a set condition.
26. An electronic device, comprising: Comprise: A memory and a processor, wherein the memory stores executable code, and when the executable code is executed by the processor, the processor performs the model training method according to any one of claims 11 to 14.
27. A non-transitory machine-readable storage medium, comprising: The non-transitory machine readable storage medium stores executable code, and when the executable code is executed by the processor of the electronic device, the processor performs the model training method according to any one of claims 11 to 14.
28. An application program, characterized by When the application program is executed by the processor of the electronic device, the processor performs the model training method according to any one of claims 11 to 14. 29.A diagnosis-related classification model training apparatus, characterized by comprising: Applied to a target training device, the device comprises: The receiving module is configured to receive a first parameter of a classification model sent by a control device, the control device being connected with a plurality of training devices, the target training device being any one of the plurality of training devices, and the plurality of training devices corresponding to a plurality of medical institutions; The training module is configured to train the classification model based on the first parameter and local training samples to obtain a second parameter corresponding to the target training device; The sending module is configured to encrypt the second parameter corresponding to the target training device, send the encrypted second parameter corresponding to the target training device to the control device, and enable the control device to send encrypted second parameters corresponding to the plurality of training devices respectively to a trusted execution space, to decrypt the second parameters corresponding to the plurality of training devices respectively in the trusted execution space, to perform differential privacy processing on the second parameters corresponding to the plurality of training devices respectively in the trusted execution space, and to combine the second parameters corresponding to the plurality of training devices respectively after the differential privacy processing to obtain a third parameter, wherein the plurality of training devices respectively train the classification model based on the first parameter and local training samples to obtain the second parameters corresponding to the plurality of training devices respectively; The updating module is configured to update the parameter of the classification model to the third parameter in response to a notification of the control device; The training module is further configured to continue training the classification model with the third parameter based on local training samples in response to a notification sent by the control device when it is determined that the classification model with the third parameter does not meet a set condition.
30. An electronic device, comprising: Comprise: A memory and a processor, wherein the memory has executable code stored thereon, and when the executable code is executed by the processor, the processor performs the diagnostic related classification model training method of claim 16.
31. A non-transitory machine-readable storage medium, comprising: The non-transitory machine readable storage medium has executable code stored thereon, and when the executable code is executed by the processor of the electronic device, the processor performs the diagnostic related classification model training method of claim 16.
32. An application program, characterized by When the application program is executed by the processor of the electronic device, the processor performs the diagnostic related classification model training method of claim 16.
Citation Information
Patent Citations
Machine learning model training method, device and system, equipment and storage medium
CN112257873A