WO2021174723A1 - Training sample expansion method and apparatus, electronic device, and storage medium - Google Patents

Training sample expansion method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2021174723A1
WO2021174723A1 PCT/CN2020/098246 CN2020098246W WO2021174723A1 WO 2021174723 A1 WO2021174723 A1 WO 2021174723A1 CN 2020098246 W CN2020098246 W CN 2020098246W WO 2021174723 A1 WO2021174723 A1 WO 2021174723A1
Authority
WO
WIPO (PCT)
Prior art keywords
disease
data set
model
accuracy
network
Prior art date
Application number
PCT/CN2020/098246
Other languages
French (fr)
Chinese (zh)
Inventor
朱昭苇
孙行智
胡岗
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021174723A1 publication Critical patent/WO2021174723A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Definitions

  • This application relates to the field of artificial intelligence technology, and in particular to a training sample expansion method, device, electronic equipment, and storage medium.
  • auxiliary diagnosis models can provide great convenience for medical work.
  • the inventor realizes that in the sample data set used to train the auxiliary diagnosis model, because some types of diseases are relatively rare, there may be cases where a certain type of disease symptom samples are less in number, and a smaller number of disease symptoms are used. Using samples to train the auxiliary diagnosis model will cause the accuracy of the trained auxiliary diagnosis model to be low.
  • the first aspect of the present application provides a training sample expansion method, the method includes:
  • a real sample data set is obtained, where the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom;
  • vector conversion is performed on the disease name corresponding to the target sample to obtain a name vector
  • the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type
  • the real sample data set and the generated sample data set are determined as the first training sample data set of the auxiliary diagnosis model.
  • a second aspect of the present application provides an electronic device including a processor and a memory, and the processor is configured to execute computer-readable instructions stored in the memory to implement the following steps:
  • a real sample data set is obtained, where the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom;
  • vector conversion is performed on the disease name corresponding to the target sample to obtain a name vector
  • the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type
  • the real sample data set and the generated sample data set are determined as the first training sample data set of the auxiliary diagnosis model.
  • a third aspect of the present application provides a computer-readable storage medium having at least one computer-readable instruction stored thereon, and the at least one computer-readable instruction is executed by a processor to implement the following steps:
  • a real sample data set is obtained, where the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom;
  • vector conversion is performed on the disease name corresponding to the target sample to obtain a name vector
  • the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type
  • the real sample data set and the generated sample data set are determined as the first training sample data set of the auxiliary diagnosis model.
  • a fourth aspect of the present application provides a training sample expansion device, the device includes:
  • the obtaining module is used to obtain a real sample data set when it is necessary to train an auxiliary diagnosis model, wherein the real sample data set is composed of samples of multiple disease types, and each of the samples of the disease type includes at least one disease symptom;
  • the determining module is configured to determine the sample of the target disease type as the target sample when the number of samples of the target disease type in the samples of the multiple disease types is less than a preset number threshold;
  • the conversion module is used to perform vector conversion of the disease name corresponding to the target sample through a pre-trained conversion network to obtain a name vector;
  • the training module is used to train the generation network based on the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain a trained generation model;
  • the input module is configured to input the name vector into the trained generation model to obtain a generated sample data set, the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type;
  • a judging module configured to use the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model
  • the determining module is further configured to, if multiple generated samples in the generated sample data set are available for model training, determine the real sample data set and the generated sample data set as the first training of the auxiliary diagnosis model Sample data set.
  • a small number of target samples can be determined, and then according to the first disease classification model, the generation network can be trained based on the accuracy of the first disease classification model and the gradient change of the discrimination network.
  • Obtain a trained generative model use the generative model to generate multiple generated samples consistent with the target disease type, thereby increasing the number of samples of the target disease type, and determine whether the multiple generated samples are generated by the first disease classification model It can be used for model training. If multiple generated samples can be used for model training, multiple generated samples can be added to the training sample data set, which expands the number of samples used to train the auxiliary diagnosis model and improves the accuracy of the auxiliary diagnosis model.
  • This application can be applied to the technical fields of digital medical care such as smart medical care, precision medical care, and AI+ medical care, and can promote the development of digital medical care.
  • Fig. 1 is a flowchart of a preferred embodiment of a training sample expansion method disclosed in the present application.
  • Fig. 2 is a functional block diagram of a preferred embodiment of a training sample expansion device disclosed in the present application.
  • FIG. 3 is a schematic structural diagram of an electronic device implementing a preferred embodiment of the training sample expansion method according to the present application.
  • the training sample expansion method of the embodiment of the present application is applied to an electronic device, and can also be applied to a hardware environment composed of an electronic device and a server connected to the electronic device through a network, and is executed by the server and the electronic device.
  • Networks include, but are not limited to: wide area networks, metropolitan area networks, or local area networks.
  • FIG. 1 is a flowchart of a preferred embodiment of a training sample expansion method disclosed in the present application. Among them, according to different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted.
  • the electronic device obtains a real sample data set, where the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom.
  • the auxiliary diagnosis model may be a model for auxiliary disease diagnosis (for example, a disease classification model, etc.).
  • the real sample data set may be real case data, and the samples of each disease type may be composed of disease names and corresponding symptom combinations.
  • the electronic device determines the samples of the target disease type as the target sample.
  • a quantity threshold can be set in advance.
  • the auxiliary diagnosis model obtained by training with samples of the disease type is used.
  • the accuracy of may not be high. Therefore, it is necessary to expand the samples of the disease type to increase the number of samples of the disease type, which can improve the accuracy of the trained auxiliary diagnosis model.
  • the electronic device performs vector conversion on the disease name corresponding to the target sample through a pre-trained conversion network to obtain a name vector.
  • the conversion network can convert words into a set of vector representations, and the conversion network can be obtained by CBOW (continuous-bag-of-words) training.
  • a pre-trained conversion network can be used to perform vector conversion of the disease name corresponding to the target sample to obtain a vector (name vector) of the disease name, for example, "gout” is represented by vector conversion It is [-0.124,-0.871,0.812,-1.290,...].
  • the electronic device trains the generation network based on the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain a trained generation model.
  • the first disease classification model can output the disease type to which the disease symptoms belong according to the input disease symptoms.
  • the generative network and the discriminant network jointly form a generative adversarial network (Generative Adversarial Net, GAN), wherein the generative adversarial network is a Generative Model based on an adversarial training process.
  • GAN generative Adversarial Net
  • the purpose of the training of the generative adversarial network is to make the distribution of the generated generated samples and the real samples as close as possible, so as to be able to interpret the real data.
  • a generative model G is trained to generate realistic generated samples from random noise or latent variables (Latent Variable)
  • a discriminant model D is trained to identify real samples (ie input samples) and generated samples at the same time.
  • the generative model G and the discriminant model D are trained at the same time. After multiple trainings, until a Nash equilibrium is reached, the generated samples generated by the generative model G are indistinguishable from the real samples. The discriminant model D cannot correctly distinguish the generated samples from the real samples.
  • step S13 the method further includes:
  • the number of all symptoms in the disease symptom relation database corresponding to the name vector is determined as the dimensional size of the output array of the generating network, and the preset value is determined as the value of the element of the output array of the generating network.
  • training the generation network based on the accuracy of the first disease classification model and the gradient change of the discrimination network, and obtaining the trained generation model includes:
  • the pre-trained first disease classification model based on the accuracy of the first disease classification model and the gradient change of the discrimination network, according to the dimension of the input array of the generation network, the dimension of the output array, and the output
  • the values of the elements of the array are trained on the generative network to obtain a trained generative model.
  • the generation network of the generation confrontation network and the discrimination network can be preprocessed, and the input array of the generation network can be specified first
  • the dimension of the name vector is the same as the dimension of the name vector transformed by the transformation network.
  • the dimension of the output array of the generation network is the number of all symptoms in the disease symptom relation database, that is, the number of elements in the output array of the generation network Is the number of all symptoms in the disease symptom relation database, and the preset value is determined as the value of the element of the output array of the generating network, for example, the specified value can only be 0 or 1. Then the parameters of the generated network can be randomly initialized.
  • the training process of the confrontation generation network may be to first use the generation network to generate a batch of fake data with a label of 0.
  • the fake data and the real data (labeled 1) are mixed into the discriminant network, and the parameters of the discriminant network are updated according to the results.
  • Fix the discriminant network use the generative network again to generate fake data, with a label of 1, enter the discriminant network together with the real data, and update the generated network parameters according to the discriminant network output results. This is repeated iteratively until the generation network and the discriminant network reach the Nash equilibrium.
  • the input of the discriminant network is the sequence string of the combination of symptoms and diseases and the label of the sequence combination (the labels are 0 and 1, indicating that they are derived from the generated network and the real data, respectively).
  • a real data symptom combination includes three symptoms and they are located at positions 1, 3, and 5.
  • the disease corresponding to the symptom combination is located at position 1.
  • the sequence string is represented as [1,0,1,0,1,0,0,0 ,0 ,0,0,0,1,0].
  • the input of the discriminant network is expressed as ⁇ [1,0,1,0,1,0,0,0,0,0,1,0],1 ⁇ .
  • the conversion network is trained using complete entity nouns as input, the output value of the discrimination network is a floating point number within a preset numerical range, and the output value is used to measure that the input of the discrimination network is false data The probability.
  • the complete entity noun retains the complete meaning of the disease entity, which can prevent the entity from being split and destroy the meaning of the word itself; the output of the discrimination network can be a floating point number between 0-1, and the smaller the value, the more the input is considered by the discrimination network. It may be fake data.
  • training the generation network based on the accuracy of the first disease classification model and the gradient change of the discrimination network, and obtaining the trained generation model includes:
  • the parameters of the generation network are updated to obtain a trained generation model.
  • the output of the generating network is a sequence string (array), which is false disease symptom relationship data, that is, a false sample.
  • the false sample and the second training sample data set can be determined as the fourth training
  • the sample data set is used to train the fourth training sample data set to obtain a third disease classification model; the same test data set can be used to determine the accuracy (third accuracy) of the third disease classification model, according to the
  • the third precision and the gradient change of the discrimination network are updated, and the parameters of the generation network are updated to obtain a trained generation model.
  • the updating the parameters of the generation network according to the third accuracy and the gradient change of the discrimination network to obtain a trained generation model includes:
  • the parameters of the generation network are updated to obtain a trained generation model.
  • the difference between the third accuracy and the first accuracy may be divided by the third accuracy to obtain the accuracy change rate.
  • the accuracy change rate can be combined with the first gradient change of the discriminant network to obtain a second gradient change, wherein the accuracy change rate is recorded as PR, and the first gradient change of the discriminant network is recorded as D, G ,
  • the second gradient change is denoted as D new , G, arg min means looking for a parameter to minimize the value, ⁇ is the expectation, z is the constant controlling the parameter distribution, q(z) means the parameter distribution, D(G(z)) Represents the output of the judgment network when generating good data generated by the network, D(G ng (z)) represents the output of the judgment network when the generation network generates bad data, according to the accuracy change rate and the first gradient of the discrimination network Change, the formula for obtaining the second gradient change is:
  • the loss function of the discrimination network is a cross-entropy loss function.
  • the discriminant network is a supervised discriminant network.
  • the loss function of the discriminant network is cross-entropy loss.
  • the back propagation method is used according to the result of the current classification, and the discriminant network parameters are updated according to the gradient descent direction.
  • the task of generating the network is to find the optimal parameters that can describe the true distribution.
  • the update of the parameters also uses the back propagation method, and the direction of the gradient change comes from the gradient passed by the discriminating network.
  • Nash equilibrium is V(D,G)
  • p data (x) is the distribution of real sample data input to the discriminant network
  • p z (z) is the distribution of fake sample data input to the discriminant network, generating the network and discriminant network population
  • the optimization formula is:
  • the electronic device inputs the name vector to the trained generation model to obtain a generated sample data set.
  • the disease types of the multiple generated samples included in the generated sample data set are consistent with the target disease types.
  • the trained generation model may be used to generate multiple generated samples consistent with the target disease type.
  • the electronic device uses the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model; if so, perform step S17, if not , End this process.
  • the first disease classification model needs to be used to judge the multiple generated samples to ensure the validity of the generated sample data set.
  • the first disease classification model is trained using a second training sample data set, and the first disease classification model is used to determine the generated sample data set according to the accuracy of the first disease classification model Whether the multiple generated samples can be used for model training include:
  • the second accuracy is less than or equal to the first accuracy, it is determined that the multiple generated samples cannot be used for model training.
  • the first disease classification model can be used to judge the symptoms in the test data set, obtain disease classification results, and count the correct disease classification results and incorrect disease classifications of the first disease classification model. As a result, according to the statistical results, the correct rate (ie, the first accuracy) of the disease classification of the first disease classification model is determined.
  • the plurality of generated samples and the second training sample data set may be determined as a third training sample data set, the third training sample data set is used to train a second disease classification model, and the second disease classification model may be used
  • the classification model judges the symptoms in the test data set, obtains disease classification results, counts the correct disease classification results and incorrect disease classification results of the second disease classification model, and then determines the second disease classification model based on the statistical results
  • the correct rate ie, the second accuracy
  • determine whether the second accuracy is greater than the first accuracy if the second accuracy is greater than the first accuracy, it means that after the training of the multiple generated samples is added, it is obtained
  • the second disease classification model has higher accuracy than the first disease classification model for training without increasing the multiple generated samples, that is, the multiple generated samples can be used for model training, if the second accuracy is less than Or equal to the first accuracy, indicating that the second disease classification model obtained after training with the multiple generated samples is no more accurate than the first disease classification model trained with the multiple generated samples Even if the accuracy of the second disease classification
  • the electronic device determines the real sample data set and the generated sample data set as the first training sample data set of the auxiliary diagnosis model.
  • the generated sample data set and the formal sample data set can be used for model training together to ensure a sufficient number of samples , Improve the accuracy of the trained model.
  • a small number of target samples can be determined, and then according to the first disease classification model, the generation network is trained based on the accuracy of the first disease classification model and the gradient change of the discriminant network.
  • a trained generative model can be obtained, and the generative model can be used to generate multiple generated samples consistent with the target disease type, thereby increasing the number of samples of the target disease type, and the multiple generated samples can be judged by the first disease classification model Whether it can be used for model training, if multiple generated samples can be used for model training, multiple generated samples can be added to the training sample data set, which expands the number of samples used to train the auxiliary diagnosis model and improves the accuracy of the auxiliary diagnosis model.
  • This application can be applied to the technical fields of digital medical care such as smart medical care, precision medical care, and AI+ medical care, and can promote the development of digital medical care.
  • FIG. 2 is a functional module diagram of a preferred embodiment of a training sample expansion device disclosed in the present application.
  • the training sample expansion device runs in an electronic device.
  • the training sample expansion device may include multiple functional modules composed of program code segments, and the program is a series of computer-readable instruction codes.
  • the program code of each program segment in the training sample expansion device can be stored in a memory and executed by at least one processor to execute part or all of the steps in the training sample expansion method described in FIG. 1. For details, please refer to The related description in the method shown in FIG. 1 will not be repeated here.
  • the training sample expansion device can be divided into multiple functional modules according to the functions it performs.
  • the functional modules may include: an acquisition module 201, a determination module 202, a conversion module 203, a training module 204, an input module 205, and a judgment module 206.
  • the module referred to in this application refers to a series of computer-readable instruction segments that can be executed by at least one processor and can complete fixed functions, and are stored in a memory.
  • the obtaining module 201 is configured to obtain a real sample data set when the auxiliary diagnosis model needs to be trained, wherein the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom .
  • the auxiliary diagnosis model may be a model for auxiliary disease diagnosis (for example, a disease classification model, etc.).
  • the real sample data set may be real case data, and the samples of each disease type may be composed of disease names and corresponding symptom combinations.
  • the determining module 202 is configured to determine the sample of the target disease type as the target sample when the number of samples of the target disease type in the samples of the multiple disease types is less than a preset number threshold.
  • a quantity threshold can be set in advance.
  • this number threshold because there are not enough samples, the auxiliary diagnosis obtained by training with samples of the disease type The accuracy of the model may not be high. Therefore, it is necessary to expand the samples of the disease type to increase the number of samples of the disease type, which can improve the accuracy of the trained auxiliary diagnosis model.
  • the conversion module 203 is configured to perform vector conversion of the disease name corresponding to the target sample through a pre-trained conversion network to obtain a name vector.
  • the conversion network can convert words into a set of vector representations, and the conversion network can be obtained by CBOW (continuous-bag-of-words) training.
  • a pre-trained conversion network can be used to perform vector conversion of the disease name corresponding to the target sample to obtain a vector (name vector) of the disease name, for example, "gout” is represented by vector conversion It is [-0.124,-0.871,0.812,-1.290,...].
  • the training module 204 is configured to train the generation network based on the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain a trained generation model.
  • the first disease classification model can output the disease type to which the disease symptoms belong according to the input disease symptoms.
  • the generative network and the discriminant network jointly form a generative adversarial network (Generative Adversarial Net, GAN), where the generative adversarial network is a Generative Model based on an adversarial training process.
  • GAN generative Adversarial Net
  • the purpose of the training of the generative adversarial network is to make the distribution of the generated generated samples and the real samples as close as possible, so as to be able to interpret the real data.
  • a generative model G is trained to generate realistic generated samples from random noise or latent variables (Latent Variable)
  • a discriminant model D is trained to identify real samples (ie input samples) and generated samples at the same time.
  • the generative model G and the discriminant model D are trained at the same time. After multiple trainings, until a Nash equilibrium is reached, the generated samples generated by the generative model G are indistinguishable from the real samples. The discriminant model D cannot correctly distinguish the generated samples from the real samples.
  • the input module 205 is configured to input the name vector into the trained generation model to obtain a generated sample data set, and the generated sample data set includes the multiple generated samples whose disease types are consistent with the target disease types.
  • the trained generation model may be used to generate multiple generated samples consistent with the target disease type.
  • the judging module 206 is configured to use the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model.
  • the first disease classification model needs to be used to judge the multiple generated samples to ensure the validity of the generated sample data set.
  • the determining module 202 is further configured to, if multiple generated samples in the generated sample data set can be used for model training, determine the real sample data set and the generated sample data set as the first of the auxiliary diagnosis model Training sample data set.
  • the generated sample data set and the formal sample data set can be used for model training together to ensure a sufficient number of samples , Improve the accuracy of the trained model.
  • the first disease classification model is trained using a second training sample data set, and the judgment module 206 uses the first disease classification model according to the data set of the first disease classification model.
  • the method for judging whether multiple generated samples in the generated sample data set can be used for model training is specifically:
  • the second accuracy is less than or equal to the first accuracy, it is determined that the multiple generated samples cannot be used for model training.
  • the first disease classification model can be used to judge the symptoms in the test data set, obtain disease classification results, and count the correct disease classification results and incorrect disease classifications of the first disease classification model. As a result, according to the statistical results, the correct rate (ie, the first accuracy) of the disease classification of the first disease classification model is determined.
  • the plurality of generated samples and the second training sample data set may be determined as a third training sample data set, the third training sample data set is used to train a second disease classification model, and the second disease classification model may be used
  • the classification model judges the symptoms in the test data set, obtains disease classification results, counts the correct disease classification results and incorrect disease classification results of the second disease classification model, and then determines the second disease classification model based on the statistical results
  • the correct rate ie, the second accuracy
  • determine whether the second accuracy is greater than the first accuracy if the second accuracy is greater than the first accuracy, it means that after the training of the multiple generated samples is added, it is obtained
  • the second disease classification model has higher accuracy than the first disease classification model for training without increasing the multiple generated samples, that is, the multiple generated samples can be used for model training, if the second accuracy is less than Or equal to the first accuracy, indicating that the second disease classification model obtained after training with the multiple generated samples is no more accurate than the first disease classification model trained with the multiple generated samples Even if the accuracy of the second disease classification
  • the determining module 202 is also used for the conversion module 203 to perform vector conversion of the disease name corresponding to the target sample through a pre-trained conversion network, and after obtaining the name vector, The dimension of the name vector is determined to be the dimension of the input array of the generating network;
  • the determining module 202 is further configured to determine the number of all symptoms in the disease symptom relation database corresponding to the name vector as the dimension of the output array of the generating network, and determining the preset value as the size of the generating network The value of the elements of the output array;
  • the training module 204 trains the generation network based on the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, and the specific method for obtaining the trained generation model is as follows:
  • the pre-trained first disease classification model based on the accuracy of the first disease classification model and the gradient change of the discrimination network, according to the dimension of the input array of the generation network, the dimension of the output array, and the output
  • the values of the elements of the array are trained on the generative network to obtain a trained generative model.
  • the generation network of the generation confrontation network and the discrimination network can be preprocessed, and the input array of the generation network can be specified first
  • the dimension of the name vector is the same as the dimension of the name vector transformed by the transformation network.
  • the dimension of the output array of the generation network is the number of all symptoms in the disease symptom relation database, that is, the number of elements in the output array of the generation network Is the number of all symptoms in the disease symptom relation database, and the preset value is determined as the value of the element of the output array of the generating network, for example, the specified value can only be 0 or 1. Then the parameters of the generated network can be randomly initialized.
  • the training process of the confrontation generation network may be to first use the generation network to generate a batch of fake data with a label of 0.
  • the fake data and the real data (labeled 1) are mixed into the discriminant network, and the parameters of the discriminant network are updated according to the results.
  • Fix the discriminant network use the generative network again to generate fake data, with a label of 1, enter the discriminant network together with the real data, and update the generated network parameters according to the discriminant network output results. This is repeated iteratively until the generation network and the discriminant network reach the Nash equilibrium.
  • the input of the discriminant network is the sequence string of the combination of symptoms and diseases and the label of the sequence combination (the labels are 0 and 1, indicating that they are derived from the generated network and the real data, respectively).
  • a real data symptom combination includes three symptoms and they are located at positions 1, 3, and 5.
  • the disease corresponding to the symptom combination is located at position 1.
  • the sequence string is represented as [1,0,1,0,1,0,0,0 ,0 ,0,0,0,1,0].
  • the input of the discriminant network is expressed as ⁇ [1,0,1,0,1,0,0,0,0,0,1,0],1 ⁇ .
  • the conversion network is trained using complete entity nouns as input, the output value of the discrimination network is a floating point number within a preset numerical range, and the output value is used to measure that the input of the discrimination network is false data The probability.
  • the complete entity noun retains the complete meaning of the disease entity, which can prevent the entity from being split and destroy the meaning of the word itself; the output of the discrimination network can be a floating point number between 0-1, and the smaller the value, the more the input is considered by the discrimination network. It may be fake data.
  • the training module 204 includes:
  • a generating sub-module is used to generate a plurality of fake samples whose disease type is consistent with the target disease type using the generating network;
  • a determining sub-module configured to determine the plurality of fake samples and the second training sample data set as a fourth training sample data set
  • the training sub-module is used to train the fourth training sample data set to obtain a third disease classification model
  • the determining sub-module is also used to determine the third accuracy of the third disease classification model
  • the update sub-module is used to update the parameters of the generation network according to the third accuracy and the gradient change of the discrimination network to obtain a trained generation model.
  • the output of the generating network is a sequence string (array), which is false disease symptom relationship data, that is, a false sample.
  • the false sample and the second training sample data set can be determined as the fourth training
  • the sample data set is used to train the fourth training sample data set to obtain a third disease classification model; the same test data set can be used to determine the accuracy (third accuracy) of the third disease classification model, according to the
  • the third precision and the gradient change of the discrimination network are updated, and the parameters of the generation network are updated to obtain a trained generation model.
  • the update submodule updates the parameters of the generation network according to the third accuracy and the gradient change of the discrimination network, and the specific method for obtaining the trained generation model is as follows:
  • the parameters of the generation network are updated to obtain a trained generation model.
  • the difference between the third accuracy and the first accuracy may be divided by the third accuracy to obtain the accuracy change rate.
  • the accuracy change rate can be combined with the first gradient change of the discriminant network to obtain a second gradient change, wherein the accuracy change rate is recorded as PR, and the first gradient change of the discriminant network is recorded as D, G ,
  • the second gradient change is denoted as D new , G, arg min means looking for a parameter to minimize the value, ⁇ is the expectation, z is the constant controlling the parameter distribution, q(z) means the parameter distribution, D(G(z)) Represents the output of the judgment network when generating good data generated by the network, D(G ng (z)) represents the output of the judgment network when the generation network generates bad data, according to the accuracy change rate and the first gradient of the discrimination network Change, the formula for obtaining the second gradient change is:
  • the loss function of the discrimination network is a cross-entropy loss function.
  • the discriminant network is a supervised discriminant network.
  • the loss function of the discriminant network is cross-entropy loss.
  • the back propagation method is used according to the result of the current classification, and the discriminant network parameters are updated according to the gradient descent direction.
  • the task of generating the network is to find the optimal parameters that can describe the true distribution.
  • the update of the parameters also uses the back propagation method, and the direction of the gradient change comes from the gradient passed by the discriminating network.
  • Nash equilibrium is V(D,G)
  • p data (x) is the distribution of real sample data input to the discriminant network
  • p z (z) is the distribution of fake sample data input to the discriminant network, generating the network and discriminant network population
  • the optimization formula is:
  • a small number of target samples can be determined, and then according to the first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discriminating network, the generation network is performed.
  • Training can obtain a well-trained generative model, use the generative model to generate multiple generated samples consistent with the target disease type, thereby increasing the number of samples of the target disease type, and judge multiple samples by the first disease classification model Whether the generated samples can be used for model training, if multiple generated samples can be used for model training, multiple generated samples can be added to the training sample data set, which expands the number of samples used to train the auxiliary diagnosis model and improves the accuracy of the auxiliary diagnosis model Spend.
  • This application can be applied to the technical fields of digital medical care such as smart medical care, precision medical care, and AI+ medical care, and can promote the development of digital medical care.
  • FIG. 3 is a schematic structural diagram of an electronic device implementing a preferred embodiment of the training sample expansion method of the present application.
  • the electronic device 3 includes a memory 31, at least one processor 32, computer readable instructions 33 stored in the memory 31 and executable on the at least one processor 32, and at least one communication bus 34.
  • FIG. 3 is only an example of the electronic device 3, and does not constitute a limitation on the electronic device 3. It may include more or less components than those shown in the figure, or a combination. Certain components, or different components, for example, the electronic device 3 may also include input and output devices, network access devices, and so on.
  • the electronic device 3 also includes, but is not limited to, any electronic product that can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device, for example, a personal computer, a tablet computer, a smart phone, etc.
  • Personal digital assistants Personal Digital Assistant, PDA
  • game consoles interactive network television (Internet Protocol Television, IPTV), smart wearable devices, etc.
  • the at least one processor 32 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (ASICs). ), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the processor 32 can be a microprocessor, or the processor 32 can also be any conventional processor, etc.
  • the processor 32 is the control center of the electronic device 3, and connects the entire electronic device 3 through various interfaces and lines. Parts.
  • the memory 31 may be used to store the computer-readable instructions 33 and/or modules/units, and the processor 32 runs or executes the computer-readable instructions and/or modules/units stored in the memory 31, and
  • the data stored in the memory 31 is called to realize various functions of the electronic device 3.
  • the memory 31 may mainly include a storage program area and a storage data area.
  • the storage program area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may Data and the like created in accordance with the use of the electronic device 3 are stored.
  • the memory 31 may include volatile memory such as high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), and a secure digital ( Secure Digital, SD card, Flash Card, at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • volatile memory such as high-speed random access memory
  • non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), and a secure digital ( Secure Digital, SD card, Flash Card, at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), and a secure digital ( Secure Digital, SD card, Flash Card, at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage
  • the memory 31 in the electronic device 3 stores multiple instructions to implement a training sample expansion method, and the processor 32 can execute the multiple instructions to achieve:
  • a real sample data set is obtained, where the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom;
  • vector conversion is performed on the disease name corresponding to the target sample to obtain a name vector
  • the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type
  • the real sample data set and the generated sample data set are determined as the first training sample data set of the auxiliary diagnosis model.
  • a small number of target samples can be determined, and then the generation network can be trained based on the accuracy of the first disease classification model and the gradient change of the discrimination network according to the first disease classification model.
  • a well-trained generative model can be obtained, and the generative model can be used to generate a plurality of samples consistent with the target disease type, thereby increasing the number of samples of the target disease type, and the first disease classification model is used to determine the number of generated samples.
  • the sample can be used for model training if multiple generated samples can be used for model training, multiple generated samples can be added to the training sample data set, which expands the number of samples used to train the auxiliary diagnosis model and improves the accuracy of the auxiliary diagnosis model .
  • This application can be applied to the technical fields of digital medical care such as smart medical care, precision medical care, and AI+ medical care, and can promote the development of digital medical care.
  • the integrated module/unit of the electronic device 3 may be stored in a computer-readable storage medium, which may be non-easy.
  • a volatile storage medium can also be a volatile storage medium.
  • the computer-readable instruction includes computer-readable instruction code
  • the computer-readable instruction code may be in the form of source code, object code, executable file, or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory).
  • modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional modules.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computational Linguistics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Medical Treatment And Welfare Office Work (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)

Abstract

A training sample expansion method and apparatus, an electronic device, and a storage medium. The method comprises: determining, when the number of the samples of target disease types is less than a preset quantity threshold value, the samples as target samples; performing vector conversion on a disease name corresponding to each target sample so as to obtain a name vector; according to a pre-trained first disease classification model, based on the precision of the first disease classification model and the gradient change of a discrimination network, training a generation network to obtain a trained generation model; inputting the name vector into the trained generation model so as to obtain a generation sample data set; and if a plurality of generation samples in the generation sample data set may be used for model training, determining a real sample data set and the generation sample data set as a first training sample data set of an auxiliary diagnosis model. The method can expand the number of training samples, and improve the accuracy of the auxiliary diagnosis model.

Description

训练样本扩充方法、装置、电子设备及存储介质Training sample expansion method, device, electronic equipment and storage medium
本申请要求于2020年03月02日提交中国专利局,申请号为202010136917.X发明名称为“训练样本扩充方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on March 2, 2020. The application number is 202010136917.X. The invention title is "Training Sample Expansion Method, Device, Electronic Equipment, and Storage Medium". The entire content is approved. The reference is incorporated in this application.
技术领域Technical field
本申请涉及人工智能技术领域,尤其涉及一种训练样本扩充方法、装置、电子设备及存储介质。This application relates to the field of artificial intelligence technology, and in particular to a training sample expansion method, device, electronic equipment, and storage medium.
背景技术Background technique
目前,随着人工智能技术的发展,出现了越来越多的用于辅助诊断的辅助诊断模型,这些辅助诊断模型可以为医疗工作提供极大的便利性。但发明人意识到,用于训练辅助诊断模型的样本数据集中,因为有些类型的疾病比较罕见,所以可能存在某种类型的疾病症状样本的数量较少的情况,而使用较少数量的疾病症状样本来训练辅助诊断模型,会导致训练出来的辅助诊断模型的准确度不高。At present, with the development of artificial intelligence technology, more and more auxiliary diagnosis models for auxiliary diagnosis have emerged. These auxiliary diagnosis models can provide great convenience for medical work. However, the inventor realizes that in the sample data set used to train the auxiliary diagnosis model, because some types of diseases are relatively rare, there may be cases where a certain type of disease symptom samples are less in number, and a smaller number of disease symptoms are used. Using samples to train the auxiliary diagnosis model will cause the accuracy of the trained auxiliary diagnosis model to be low.
因此,如何扩充训练样本的数量,以提高辅助诊断模型的准确度是一个亟需解决的技术问题。Therefore, how to expand the number of training samples to improve the accuracy of the auxiliary diagnosis model is a technical problem that needs to be solved urgently.
发明内容Summary of the invention
鉴于以上内容,有必要提供一种训练样本扩充方法、装置、电子设备及存储介质,能够扩充训练样本的数量,以提高辅助诊断模型的准确度。In view of the above, it is necessary to provide a training sample expansion method, device, electronic equipment, and storage medium, which can expand the number of training samples to improve the accuracy of the auxiliary diagnosis model.
本申请的第一方面提供一种训练样本扩充方法,所述方法包括:The first aspect of the present application provides a training sample expansion method, the method includes:
当需要训练辅助诊断模型时,获取真实样本数据集,其中,所述真实样本数据集由多种疾病类型的样本组成,每种所述疾病类型的样本包括至少一个疾病症状;When the auxiliary diagnosis model needs to be trained, a real sample data set is obtained, where the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom;
当所述多种疾病类型的样本中存在目标疾病类型的样本的数量小于预设数量阈值时,将所述目标疾病类型的样本确定为目标样本;When the number of samples of the target disease type in the samples of the multiple disease types is less than the preset number threshold, determining the sample of the target disease type as the target sample;
通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量;Using a pre-trained conversion network, vector conversion is performed on the disease name corresponding to the target sample to obtain a name vector;
根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型;Training the generation network according to the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain the trained generation model;
将所述名称向量输入至所述训练好的生成模型,获得生成样本数据集,所述生成样本数据集包括的多个生成样本的疾病类型与所述目标疾病类型一致;Inputting the name vector into the trained generation model to obtain a generated sample data set, the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type;
使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练;Using the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model;
若所述生成样本数据集中的多个生成样本可用于模型训练,将所述真实样本数据集和所述生成样本数据集确定为所述辅助诊断模型的第一训练样本数据集。If multiple generated samples in the generated sample data set can be used for model training, the real sample data set and the generated sample data set are determined as the first training sample data set of the auxiliary diagnosis model.
本申请的第二方面提供一种电子设备,所述电子设备包括处理器和存储器,所述处理器用于执行所述存储器中存储的计算机可读指令以实现以下步骤:A second aspect of the present application provides an electronic device including a processor and a memory, and the processor is configured to execute computer-readable instructions stored in the memory to implement the following steps:
当需要训练辅助诊断模型时,获取真实样本数据集,其中,所述真实样本数据集由多种疾病类型的样本组成,每种所述疾病类型的样本包括至少一个疾病症状;When the auxiliary diagnosis model needs to be trained, a real sample data set is obtained, where the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom;
当所述多种疾病类型的样本中存在目标疾病类型的样本的数量小于预设数量阈值时,将所述目标疾病类型的样本确定为目标样本;When the number of samples of the target disease type in the samples of the multiple disease types is less than the preset number threshold, determining the sample of the target disease type as the target sample;
通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量;Using a pre-trained conversion network, vector conversion is performed on the disease name corresponding to the target sample to obtain a name vector;
根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型;Training the generation network according to the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain the trained generation model;
将所述名称向量输入至所述训练好的生成模型,获得生成样本数据集,所述生成样本数据集包括的多个生成样本的疾病类型与所述目标疾病类型一致;Inputting the name vector into the trained generation model to obtain a generated sample data set, the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type;
使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练;Using the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model;
若所述生成样本数据集中的多个生成样本可用于模型训练,将所述真实样本数据集和所述生成样本数据集确定为所述辅助诊断模型的第一训练样本数据集。If multiple generated samples in the generated sample data set can be used for model training, the real sample data set and the generated sample data set are determined as the first training sample data set of the auxiliary diagnosis model.
本申请的第三方面提供一种计算机可读存储介质,所述计算机可读存储介质上存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行以实现以下步骤:A third aspect of the present application provides a computer-readable storage medium having at least one computer-readable instruction stored thereon, and the at least one computer-readable instruction is executed by a processor to implement the following steps:
当需要训练辅助诊断模型时,获取真实样本数据集,其中,所述真实样本数据集由多种疾病类型的样本组成,每种所述疾病类型的样本包括至少一个疾病症状;When the auxiliary diagnosis model needs to be trained, a real sample data set is obtained, where the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom;
当所述多种疾病类型的样本中存在目标疾病类型的样本的数量小于预设数量阈值时,将所述目标疾病类型的样本确定为目标样本;When the number of samples of the target disease type in the samples of the multiple disease types is less than the preset number threshold, determining the sample of the target disease type as the target sample;
通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量;Using a pre-trained conversion network, vector conversion is performed on the disease name corresponding to the target sample to obtain a name vector;
根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型;Training the generation network according to the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain the trained generation model;
将所述名称向量输入至所述训练好的生成模型,获得生成样本数据集,所述生成样本数据集包括的多个生成样本的疾病类型与所述目标疾病类型一致;Inputting the name vector into the trained generation model to obtain a generated sample data set, the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type;
使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练;Using the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model;
若所述生成样本数据集中的多个生成样本可用于模型训练,将所述真实样本数据集和所述生成样本数据集确定为所述辅助诊断模型的第一训练样本数据集。If multiple generated samples in the generated sample data set can be used for model training, the real sample data set and the generated sample data set are determined as the first training sample data set of the auxiliary diagnosis model.
本申请的第四方面提供一种训练样本扩充装置,所述装置包括:A fourth aspect of the present application provides a training sample expansion device, the device includes:
获取模块,用于当需要训练辅助诊断模型时,获取真实样本数据集,其中,所述真实样本数据集由多种疾病类型的样本组成,每种所述疾病类型的样本包括至少一个疾病症状;The obtaining module is used to obtain a real sample data set when it is necessary to train an auxiliary diagnosis model, wherein the real sample data set is composed of samples of multiple disease types, and each of the samples of the disease type includes at least one disease symptom;
确定模块,用于当所述多种疾病类型的样本中存在目标疾病类型的样本的数量小于预设数量阈值时,将所述目标疾病类型的样本确定为目标样本;The determining module is configured to determine the sample of the target disease type as the target sample when the number of samples of the target disease type in the samples of the multiple disease types is less than a preset number threshold;
转换模块,用于通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量;The conversion module is used to perform vector conversion of the disease name corresponding to the target sample through a pre-trained conversion network to obtain a name vector;
训练模块,用于根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型;The training module is used to train the generation network based on the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain a trained generation model;
输入模块,用于将所述名称向量输入至所述训练好的生成模型,获得生成样本数据集,所述生成样本数据集包括的多个生成样本的疾病类型与所述目标疾病类型一致;The input module is configured to input the name vector into the trained generation model to obtain a generated sample data set, the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type;
判断模块,用于使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练;A judging module, configured to use the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model;
所述确定模块,还用于若所述生成样本数据集中的多个生成样本可用于模型训练, 将所述真实样本数据集和所述生成样本数据集确定为所述辅助诊断模型的第一训练样本数据集。The determining module is further configured to, if multiple generated samples in the generated sample data set are available for model training, determine the real sample data set and the generated sample data set as the first training of the auxiliary diagnosis model Sample data set.
由以上技术方案,本申请中,可以确定数量较少的目标样本,然后根据第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,可以获得训练好的生成模型,使用生成模型生成多个与目标疾病类型一致的多个生成样本,从而增加了目标疾病类型的样本的数量,并通过所述第一疾病分类模型判断多个生成样本是否可用于模型训练,若多个生成样本可用于模型训练,可以将多个生成样本添加至训练样本数据集中,扩充了用于训练辅助诊断模型的样本数量,提高了辅助诊断模型的准确度。本申请可应用于智慧医疗、精准医疗及AI+医疗等数字医疗的技术领域,可推动数字医疗的发展。From the above technical solutions, in this application, a small number of target samples can be determined, and then according to the first disease classification model, the generation network can be trained based on the accuracy of the first disease classification model and the gradient change of the discrimination network. Obtain a trained generative model, use the generative model to generate multiple generated samples consistent with the target disease type, thereby increasing the number of samples of the target disease type, and determine whether the multiple generated samples are generated by the first disease classification model It can be used for model training. If multiple generated samples can be used for model training, multiple generated samples can be added to the training sample data set, which expands the number of samples used to train the auxiliary diagnosis model and improves the accuracy of the auxiliary diagnosis model. This application can be applied to the technical fields of digital medical care such as smart medical care, precision medical care, and AI+ medical care, and can promote the development of digital medical care.
附图说明Description of the drawings
图1是本申请公开的一种训练样本扩充方法的较佳实施例的流程图。Fig. 1 is a flowchart of a preferred embodiment of a training sample expansion method disclosed in the present application.
图2是本申请公开的一种训练样本扩充装置的较佳实施例的功能模块图。Fig. 2 is a functional block diagram of a preferred embodiment of a training sample expansion device disclosed in the present application.
图3是本申请实现训练样本扩充方法的较佳实施例的电子设备的结构示意图。FIG. 3 is a schematic structural diagram of an electronic device implementing a preferred embodiment of the training sample expansion method according to the present application.
具体实施方式Detailed ways
本申请实施例的训练样本扩充方法应用在电子设备中,也可以应用在电子设备和通过网络与所述电子设备进行连接的服务器所构成的硬件环境中,由服务器和电子设备共同执行。网络包括但不限于:广域网、城域网或局域网。The training sample expansion method of the embodiment of the present application is applied to an electronic device, and can also be applied to a hardware environment composed of an electronic device and a server connected to the electronic device through a network, and is executed by the server and the electronic device. Networks include, but are not limited to: wide area networks, metropolitan area networks, or local area networks.
请参见图1,图1是本申请公开的一种训练样本扩充方法的较佳实施例的流程图。其中,根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。Please refer to FIG. 1. FIG. 1 is a flowchart of a preferred embodiment of a training sample expansion method disclosed in the present application. Among them, according to different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted.
S11、当需要训练辅助诊断模型时,电子设备获取真实样本数据集,其中,所述真实样本数据集由多种疾病类型的样本组成,每种所述疾病类型的样本包括至少一个疾病症状。S11. When the auxiliary diagnosis model needs to be trained, the electronic device obtains a real sample data set, where the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom.
其中,所述辅助诊断模型可以为用于辅助疾病诊断的模型(比如:疾病分类模型等)。Wherein, the auxiliary diagnosis model may be a model for auxiliary disease diagnosis (for example, a disease classification model, etc.).
其中,所述真实样本数据集可以为真实病例数据,每种疾病类型的样本可以由疾病名称以及其对应的症状组合构成。Wherein, the real sample data set may be real case data, and the samples of each disease type may be composed of disease names and corresponding symptom combinations.
S12、当所述多种疾病类型的样本中存在目标疾病类型的样本的数量小于预设数量阈值时,电子设备将所述目标疾病类型的样本确定为目标样本。S12. When the number of samples of the target disease type in the samples of the multiple disease types is less than a preset number threshold, the electronic device determines the samples of the target disease type as the target sample.
本申请实施例中,可以预先设置一个数量阈值,当某种疾病类型的样本的数量比这个数量阈值小的时候,因为没有足够多的样本,使用该疾病类型的样本进行训练得到的辅助诊断模型的准确度可能不高,因此,需要对该疾病类型的样本进行样本扩充,以增加该疾病类型的样本的数量,可以提高训练出来的辅助诊断模型的准确度。In the embodiment of this application, a quantity threshold can be set in advance. When the number of samples of a certain disease type is smaller than this quantity threshold, because there are not enough samples, the auxiliary diagnosis model obtained by training with samples of the disease type is used. The accuracy of may not be high. Therefore, it is necessary to expand the samples of the disease type to increase the number of samples of the disease type, which can improve the accuracy of the trained auxiliary diagnosis model.
S13、电子设备通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量。S13. The electronic device performs vector conversion on the disease name corresponding to the target sample through a pre-trained conversion network to obtain a name vector.
其中,所述转换网络可以将词转换为一组向量表示,所述转换网络可以使用CBOW(continuous-bag-of-words,连续词袋)训练获得。Wherein, the conversion network can convert words into a set of vector representations, and the conversion network can be obtained by CBOW (continuous-bag-of-words) training.
本申请实施例中,可以使用预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得所述疾病名称的向量(名称向量),例如:“痛风”经过向量转换后表示为[-0.124,-0.871,0.812,-1.290,…]。In the embodiment of this application, a pre-trained conversion network can be used to perform vector conversion of the disease name corresponding to the target sample to obtain a vector (name vector) of the disease name, for example, "gout" is represented by vector conversion It is [-0.124,-0.871,0.812,-1.290,...].
S14、电子设备根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型。S14. The electronic device trains the generation network based on the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain a trained generation model.
其中,所述第一疾病分类模型可以根据输入的疾病症状,输出所述疾病症状所属的疾病类型。Wherein, the first disease classification model can output the disease type to which the disease symptoms belong according to the input disease symptoms.
其中,所述生成网络以及所述判别网络共同组成生成对抗网络(Generative  Adversarial Net,GAN),其中,所述生成对抗网络是一种基于对抗训练(Adversarial training)过程来训练生成模型(Generative Model)的一种新的深度学习框架。生成对抗网络的训练的目的就是要使得生成的生成样本和真实样本的分布尽量接近,从而能够解释真实的数据。在训练过程中,训练一个生成模型G,从随机噪声或者潜在变量(Latent Variable)中生成逼真的生成样本,同时训练一个判别模型D来鉴别真实样本(即输入样本)和生成样本。在GAN的训练中,生成模型G和判别模型D同时训练,多次训练后,直到达到一个纳什均衡,生成模型G生成的生成样本与真实样本无差别。判别模型D也无法正确的区分生成样本和真实样本。Wherein, the generative network and the discriminant network jointly form a generative adversarial network (Generative Adversarial Net, GAN), wherein the generative adversarial network is a Generative Model based on an adversarial training process. A new deep learning framework. The purpose of the training of the generative adversarial network is to make the distribution of the generated generated samples and the real samples as close as possible, so as to be able to interpret the real data. In the training process, a generative model G is trained to generate realistic generated samples from random noise or latent variables (Latent Variable), and a discriminant model D is trained to identify real samples (ie input samples) and generated samples at the same time. In GAN training, the generative model G and the discriminant model D are trained at the same time. After multiple trainings, until a Nash equilibrium is reached, the generated samples generated by the generative model G are indistinguishable from the real samples. The discriminant model D cannot correctly distinguish the generated samples from the real samples.
作为一种可选的实施方式,步骤S13之后,所述方法还包括:As an optional implementation manner, after step S13, the method further includes:
将所述名称向量的维度确定为所述生成网络的输入数组的维度;Determining the dimension of the name vector as the dimension of the input array of the generating network;
将所述名称向量对应的疾病症状关系库中所有症状的数量确定为所述生成网络的输出数组的维度大小,并将预设值确定为所述生成网络的输出数组的元素的取值。The number of all symptoms in the disease symptom relation database corresponding to the name vector is determined as the dimensional size of the output array of the generating network, and the preset value is determined as the value of the element of the output array of the generating network.
所述根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型包括:According to the pre-trained first disease classification model, training the generation network based on the accuracy of the first disease classification model and the gradient change of the discrimination network, and obtaining the trained generation model includes:
根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,按照所述生成网络的输入数组的维度、所述输出数组的维度大小以及所述输出数组的元素的取值,对生成网络进行训练,获得训练好的生成模型。According to the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, according to the dimension of the input array of the generation network, the dimension of the output array, and the output The values of the elements of the array are trained on the generative network to obtain a trained generative model.
在该可选的实施方式中,在对所述目标样本对应的疾病名称进行向量转换,获得名称向量之后,可以对生成对抗网络的生成网络以及判别网络进行预处理,首先指定生成网络的输入数组的维度,该维度和经过转换网络转换后的名称向量的维度一致,生成网络的输出数组的维度大小为疾病症状关系库中所有症状的数量大小,即所述生成网络的输出数组的元素的数量为疾病症状关系库中所有症状的数量,并将预设值确定为所述生成网络的输出数组的元素的取值,比如指定取值只能为0或1。然后可以随机初始化生成网络的参数。In this alternative embodiment, after vector conversion is performed on the disease name corresponding to the target sample to obtain the name vector, the generation network of the generation confrontation network and the discrimination network can be preprocessed, and the input array of the generation network can be specified first The dimension of the name vector is the same as the dimension of the name vector transformed by the transformation network. The dimension of the output array of the generation network is the number of all symptoms in the disease symptom relation database, that is, the number of elements in the output array of the generation network Is the number of all symptoms in the disease symptom relation database, and the preset value is determined as the value of the element of the output array of the generating network, for example, the specified value can only be 0 or 1. Then the parameters of the generated network can be randomly initialized.
可选的,对抗生成网络的训练过程可以为首先利用生成网络生成一批假数据,标签为0。将假数据与真实数据(标签为1)混在一起输入判别网络,根据结果更新判别网络的参数。固定判别网络,再次使用生成网络生成假数据,标签为1,与真实数据一起输入判别网络,根据判别网络输出结果更新生成网络参数。如此反复迭代,直至生成网络和判别网络达到纳什均衡。Optionally, the training process of the confrontation generation network may be to first use the generation network to generate a batch of fake data with a label of 0. The fake data and the real data (labeled 1) are mixed into the discriminant network, and the parameters of the discriminant network are updated according to the results. Fix the discriminant network, use the generative network again to generate fake data, with a label of 1, enter the discriminant network together with the real data, and update the generated network parameters according to the discriminant network output results. This is repeated iteratively until the generation network and the discriminant network reach the Nash equilibrium.
其中,判别网络的输入是症状和疾病组合的序列串及该序列组合的标签(标签为0和1,分别表示来源于生成网络和真实数据)。例如当前系统中共有10种症状和2种疾病,则序列串长度为10+2=12。某真实数据症状组合包括三个症状且分别位于位置1,3,5,该症状组合对应的疾病位于位置1,则序列串表示为[1,0,1,0,1,0,0,0,0,0,1,0]。判别网络的输入表示为{[1,0,1,0,1,0,0,0,0,0,1,0],1}。Among them, the input of the discriminant network is the sequence string of the combination of symptoms and diseases and the label of the sequence combination (the labels are 0 and 1, indicating that they are derived from the generated network and the real data, respectively). For example, there are 10 symptoms and 2 diseases in the current system, and the sequence string length is 10+2=12. A real data symptom combination includes three symptoms and they are located at positions 1, 3, and 5. The disease corresponding to the symptom combination is located at position 1. The sequence string is represented as [1,0,1,0,1,0,0,0 ,0,0,1,0]. The input of the discriminant network is expressed as {[1,0,1,0,1,0,0,0,0,0,1,0],1}.
其中,所述转换网络是将完整的实体名词作为输入去训练的,所述判别网络的输出值为预设数值范围的浮点数,所述输出值用于衡量所述判别网络的输入为假数据的概率。完整的实体名词保留了完整的疾病实体含义,可以避免实体被拆分,破坏词语本身含义;判别网络的输出可以是0-1之间的浮点数,值越小表示判别网络认为该条输入越有可能是假数据。Wherein, the conversion network is trained using complete entity nouns as input, the output value of the discrimination network is a floating point number within a preset numerical range, and the output value is used to measure that the input of the discrimination network is false data The probability. The complete entity noun retains the complete meaning of the disease entity, which can prevent the entity from being split and destroy the meaning of the word itself; the output of the discrimination network can be a floating point number between 0-1, and the smaller the value, the more the input is considered by the discrimination network. It may be fake data.
具体的,所述根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型包括:Specifically, according to the pre-trained first disease classification model, training the generation network based on the accuracy of the first disease classification model and the gradient change of the discrimination network, and obtaining the trained generation model includes:
使用生成网络生成疾病类型与所述目标疾病类型一致的多个假样本;Using a generation network to generate multiple fake samples with disease types consistent with the target disease types;
将所述多个假样本与所述第二训练样本数据集确定为第四训练样本数据集;Determining the plurality of fake samples and the second training sample data set as a fourth training sample data set;
对所述第四训练样本数据集进行训练,获得第三疾病分类模型;Training the fourth training sample data set to obtain a third disease classification model;
确定所述第三疾病分类模型的第三精度;Determining the third precision of the third disease classification model;
根据所述第三精度以及判别网络的梯度变化,对所述生成网络的参数进行更新,获得训练好的生成模型。According to the third accuracy and the gradient change of the discrimination network, the parameters of the generation network are updated to obtain a trained generation model.
在该可选的实施方式中,生成网络的输出是序列串(数组),是假的疾病症状关系数据,即假样本,可以将假样本与所述第二训练样本数据集确定为第四训练样本数据集,对所述第四训练样本数据集进行训练,获得第三疾病分类模型;可以使用相同的测试数据集,确定所述第三疾病分类模型的精度(第三精度),根据所述第三精度以及判别网络的梯度变化,对所述生成网络的参数进行更新,获得训练好的生成模型。In this alternative embodiment, the output of the generating network is a sequence string (array), which is false disease symptom relationship data, that is, a false sample. The false sample and the second training sample data set can be determined as the fourth training The sample data set is used to train the fourth training sample data set to obtain a third disease classification model; the same test data set can be used to determine the accuracy (third accuracy) of the third disease classification model, according to the The third precision and the gradient change of the discrimination network are updated, and the parameters of the generation network are updated to obtain a trained generation model.
具体的,所述根据所述第三精度以及判别网络的梯度变化,对所述生成网络的参数进行更新,获得训练好的生成模型包括:Specifically, the updating the parameters of the generation network according to the third accuracy and the gradient change of the discrimination network to obtain a trained generation model includes:
根据所述第三精度以及所述第一精度,确定精度变化率;Determine the accuracy change rate according to the third accuracy and the first accuracy;
根据所述精度变化率以及所述判别网络的第一梯度变化,获得第二梯度变化;Obtaining a second gradient change according to the accuracy change rate and the first gradient change of the discrimination network;
通过反向传播算法,根据所述第二梯度变化,更新所述生成网络的参数,获得训练好的生成模型。Through the back propagation algorithm, according to the second gradient change, the parameters of the generation network are updated to obtain a trained generation model.
在该可选的实施方式中,可以将所述第三精度与所述第一精度的差值除以所述第三精度,获得精度变化率。可以结合所述精度变化率与所述判别网络的第一梯度变化,获得第二梯度变化,其中,将所述精度变化率记为PR、所述判别网络的第一梯度变化记为D,G,第二梯度变化记为D new,G,arg min表示寻找一个参数使得值最小,ε为期望,z为控制参数分布的常量,q(z)表示参数的分布,D(G(z))表示生成网络生成好的数据时判别网络的输出,D(G ng(z))表示生成网络生成不好的数据时判别网络的输出,根据所述精度变化率以及所述判别网络的第一梯度变化,获得第二梯度变化的公式为: In this optional implementation, the difference between the third accuracy and the first accuracy may be divided by the third accuracy to obtain the accuracy change rate. The accuracy change rate can be combined with the first gradient change of the discriminant network to obtain a second gradient change, wherein the accuracy change rate is recorded as PR, and the first gradient change of the discriminant network is recorded as D, G , The second gradient change is denoted as D new , G, arg min means looking for a parameter to minimize the value, ε is the expectation, z is the constant controlling the parameter distribution, q(z) means the parameter distribution, D(G(z)) Represents the output of the judgment network when generating good data generated by the network, D(G ng (z)) represents the output of the judgment network when the generation network generates bad data, according to the accuracy change rate and the first gradient of the discrimination network Change, the formula for obtaining the second gradient change is:
D new,G=PR*log((D,G))+(1-PR)*log(1-(D,G)); D new ,G=PR*log((D,G))+(1-PR)*log(1-(D,G));
Figure PCTCN2020098246-appb-000001
Figure PCTCN2020098246-appb-000001
通过结合精度变化率,可以确定网络的参数的修改的方向是否正确,提高了生成对抗网络的训练速度。By combining the accuracy change rate, it can be determined whether the modification direction of the network parameters is correct, and the training speed of the generated confrontation network is improved.
其中,所述判别网络的损失函数为交叉熵损失函数。Wherein, the loss function of the discrimination network is a cross-entropy loss function.
判别网络是一个有监督的判别网络。判别网络的损失函数为交叉熵损失,训练过程中依据当前分类的结果使用反向传播的方法,按照梯度下降方向更新判别网络参数。而生成网络的任务是寻找能描述真实分布的最优参数,参数的更新同样采用反向传播方法,而且梯度变化的方向来自于判别网络传过来的梯度。其中,纳什均衡为V(D,G),p data(x)为输入判别网络的真实样本数据的分布,p z(z)为输入判别网络的假样本数据的分布,生成网络和判别网络总体优化公式为: The discriminant network is a supervised discriminant network. The loss function of the discriminant network is cross-entropy loss. During the training process, the back propagation method is used according to the result of the current classification, and the discriminant network parameters are updated according to the gradient descent direction. The task of generating the network is to find the optimal parameters that can describe the true distribution. The update of the parameters also uses the back propagation method, and the direction of the gradient change comes from the gradient passed by the discriminating network. Among them, Nash equilibrium is V(D,G), p data (x) is the distribution of real sample data input to the discriminant network, and p z (z) is the distribution of fake sample data input to the discriminant network, generating the network and discriminant network population The optimization formula is:
Figure PCTCN2020098246-appb-000002
Figure PCTCN2020098246-appb-000002
S15、电子设备将所述名称向量输入至所述训练好的生成模型,获得生成样本数据集,所述生成样本数据集包括的多个生成样本的疾病类型与所述目标疾病类型一致。S15. The electronic device inputs the name vector to the trained generation model to obtain a generated sample data set. The disease types of the multiple generated samples included in the generated sample data set are consistent with the target disease types.
本申请实施例中,可以使用所述训练好的生成模型生成与所述目标疾病类型一致的多个生成样本。In the embodiment of the present application, the trained generation model may be used to generate multiple generated samples consistent with the target disease type.
S16、电子设备使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练,若是,执行步骤S17,若否,结束本流程。S16. The electronic device uses the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model; if so, perform step S17, if not , End this process.
本申请实施例中,为了确保所述生成样本数据集中的多个生成样本可用于模型训练,需要使用第一疾病分类模型对所述多个生成样本进行判断,确保生成样本数据集的有效性。In the embodiment of the present application, in order to ensure that the multiple generated samples in the generated sample data set can be used for model training, the first disease classification model needs to be used to judge the multiple generated samples to ensure the validity of the generated sample data set.
具体的,所述第一疾病分类模型是使用第二训练样本数据集训练的,所述使用所述第一 疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练包括:Specifically, the first disease classification model is trained using a second training sample data set, and the first disease classification model is used to determine the generated sample data set according to the accuracy of the first disease classification model Whether the multiple generated samples can be used for model training include:
根据测试数据集,确定所述第一疾病分类模型的第一精度;Determining the first accuracy of the first disease classification model according to the test data set;
将所述多个生成样本以及所述第二训练样本数据集确定为第三训练样本数据集;Determining the plurality of generated samples and the second training sample data set as a third training sample data set;
对所述第三训练样本数据集进行训练,获得第二疾病分类模型;Training the third training sample data set to obtain a second disease classification model;
根据所述测试数据集,确定所述第二疾病分类模型的第二精度;Determine the second accuracy of the second disease classification model according to the test data set;
判断所述第二精度是否大于所述第一精度;Determine whether the second accuracy is greater than the first accuracy;
若所述第二精度大于所述第一精度,确定所述多个生成样本可用于模型训练;或If the second accuracy is greater than the first accuracy, determining that the multiple generated samples can be used for model training; or
若所述第二精度小于或等于所述第一精度,确定所述多个生成样本不可用于模型训练。If the second accuracy is less than or equal to the first accuracy, it is determined that the multiple generated samples cannot be used for model training.
在该可选的实施方式中,可以使用所述第一疾病分类模型对测试数据集中的症状进行判断,获得疾病分类结果,统计所述第一疾病分类模型正确的疾病分类结果以及错误的疾病分类结果,然后根据统计结果,确定所述第一疾病分类模型的疾病分类的正确率(即第一精度)。可以将所述多个生成样本以及所述第二训练样本数据集确定为第三训练样本数据集,使用所述第三训练样本数据集训练出第二疾病分类模型,可以使用所述第二疾病分类模型对测试数据集中的症状进行判断,获得疾病分类结果,统计所述第二疾病分类模型正确的疾病分类结果以及错误的疾病分类结果,然后根据统计结果,确定所述第二疾病分类模型的正确率(即第二精度),然后判断所述第二精度是否大于所述第一精度,若所述第二精度大于所述第一精度,说明增加了所述多个生成样本训练后,获得的所述第二疾病分类模型比没有增加所述多个生成样本训练的所述第一疾病分类模型的准确度高,即所述多个生成样本可用于模型训练,若所述第二精度小于或等于所述第一精度,说明增加了所述多个生成样本训练后,获得的所述第二疾病分类模型不比没有增加所述多个生成样本训练的所述第一疾病分类模型的准确度高,甚至所述第二疾病分类模型的准确度比所述第一疾病分类模型的准确度更低,即所述多个生成样本不可用于模型训练。In this alternative embodiment, the first disease classification model can be used to judge the symptoms in the test data set, obtain disease classification results, and count the correct disease classification results and incorrect disease classifications of the first disease classification model. As a result, according to the statistical results, the correct rate (ie, the first accuracy) of the disease classification of the first disease classification model is determined. The plurality of generated samples and the second training sample data set may be determined as a third training sample data set, the third training sample data set is used to train a second disease classification model, and the second disease classification model may be used The classification model judges the symptoms in the test data set, obtains disease classification results, counts the correct disease classification results and incorrect disease classification results of the second disease classification model, and then determines the second disease classification model based on the statistical results The correct rate (ie, the second accuracy), and then determine whether the second accuracy is greater than the first accuracy, if the second accuracy is greater than the first accuracy, it means that after the training of the multiple generated samples is added, it is obtained The second disease classification model has higher accuracy than the first disease classification model for training without increasing the multiple generated samples, that is, the multiple generated samples can be used for model training, if the second accuracy is less than Or equal to the first accuracy, indicating that the second disease classification model obtained after training with the multiple generated samples is no more accurate than the first disease classification model trained with the multiple generated samples Even if the accuracy of the second disease classification model is lower than that of the first disease classification model, that is, the multiple generated samples cannot be used for model training.
S17、电子设备将所述真实样本数据集和所述生成样本数据集确定为所述辅助诊断模型的第一训练样本数据集。S17. The electronic device determines the real sample data set and the generated sample data set as the first training sample data set of the auxiliary diagnosis model.
本申请实施例中,若所述生成样本数据集中的多个生成样本可用于模型训练,可以将所述生成样本数据集以及所述正式样本数据集一起用于模型训练,保证了样本数量的充足,提高了训练出来的模型的准确度。In the embodiment of the present application, if multiple generated samples in the generated sample data set can be used for model training, the generated sample data set and the formal sample data set can be used for model training together to ensure a sufficient number of samples , Improve the accuracy of the trained model.
在图1所描述的方法流程中,可以确定数量较少的目标样本,然后根据第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,可以获得训练好的生成模型,使用生成模型生成多个与目标疾病类型一致的多个生成样本,从而增加了目标疾病类型的样本的数量,并通过所述第一疾病分类模型判断多个生成样本是否可用于模型训练,若多个生成样本可用于模型训练,可以将多个生成样本添加至训练样本数据集中,扩充了用于训练辅助诊断模型的样本数量,提高了辅助诊断模型的准确度。In the method flow described in Figure 1, a small number of target samples can be determined, and then according to the first disease classification model, the generation network is trained based on the accuracy of the first disease classification model and the gradient change of the discriminant network. A trained generative model can be obtained, and the generative model can be used to generate multiple generated samples consistent with the target disease type, thereby increasing the number of samples of the target disease type, and the multiple generated samples can be judged by the first disease classification model Whether it can be used for model training, if multiple generated samples can be used for model training, multiple generated samples can be added to the training sample data set, which expands the number of samples used to train the auxiliary diagnosis model and improves the accuracy of the auxiliary diagnosis model.
本申请可应用于智慧医疗、精准医疗及AI+医疗等数字医疗的技术领域,可推动数字医疗的发展。This application can be applied to the technical fields of digital medical care such as smart medical care, precision medical care, and AI+ medical care, and can promote the development of digital medical care.
以上所述,仅是本申请的具体实施方式,但本申请的保护范围并不局限于此,对于本领域的普通技术人员来说,在不脱离本申请创造构思的前提下,还可以做出改进,但这些均属于本申请的保护范围。The above are only specific implementations of this application, but the scope of protection of this application is not limited to this. For those of ordinary skill in the art, without departing from the creative concept of this application, they can also make Improvements, but these all belong to the scope of protection of this application.
请参见图2,图2是本申请公开的一种训练样本扩充装置的较佳实施例的功能模块图。Please refer to FIG. 2. FIG. 2 is a functional module diagram of a preferred embodiment of a training sample expansion device disclosed in the present application.
在一些实施例中,所述训练样本扩充装置运行于电子设备中。所述训练样本扩充装置可以包括多个由程序代码段所组成的功能模块,所述程序是一系列的计算机可读指令代码。所述训练样本扩充装置中的各个程序段的程序代码可以存储于存储器中,并由至少一个处理器所执行,以执行图1所描述的训练样本扩充方法中的部分或全部步骤,具体可以参照图1所 述方法中的相关描述,在此不再赘述。In some embodiments, the training sample expansion device runs in an electronic device. The training sample expansion device may include multiple functional modules composed of program code segments, and the program is a series of computer-readable instruction codes. The program code of each program segment in the training sample expansion device can be stored in a memory and executed by at least one processor to execute part or all of the steps in the training sample expansion method described in FIG. 1. For details, please refer to The related description in the method shown in FIG. 1 will not be repeated here.
本实施例中,所述训练样本扩充装置根据其所执行的功能,可以被划分为多个功能模块。所述功能模块可以包括:获取模块201、确定模块202、转换模块203、训练模块204、输入模块205及判断模块206。本申请所称的模块是指一种能够被至少一个处理器所执行并且能够完成固定功能的一系列计算机可读指令段,其存储在存储器中。In this embodiment, the training sample expansion device can be divided into multiple functional modules according to the functions it performs. The functional modules may include: an acquisition module 201, a determination module 202, a conversion module 203, a training module 204, an input module 205, and a judgment module 206. The module referred to in this application refers to a series of computer-readable instruction segments that can be executed by at least one processor and can complete fixed functions, and are stored in a memory.
获取模块201,用于当需要训练辅助诊断模型时,获取真实样本数据集,其中,所述真实样本数据集由多种疾病类型的样本组成,每种所述疾病类型的样本包括至少一个疾病症状。The obtaining module 201 is configured to obtain a real sample data set when the auxiliary diagnosis model needs to be trained, wherein the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom .
其中,所述辅助诊断模型可以为用于辅助疾病诊断的模型(比如:疾病分类模型等)。Wherein, the auxiliary diagnosis model may be a model for auxiliary disease diagnosis (for example, a disease classification model, etc.).
其中,所述真实样本数据集可以为真实病例数据,每种疾病类型的样本可以由疾病名称以及其对应的症状组合构成。Wherein, the real sample data set may be real case data, and the samples of each disease type may be composed of disease names and corresponding symptom combinations.
确定模块202,用于当所述多种疾病类型的样本中存在目标疾病类型的样本的数量小于预设数量阈值时,将所述目标疾病类型的样本确定为目标样本。The determining module 202 is configured to determine the sample of the target disease type as the target sample when the number of samples of the target disease type in the samples of the multiple disease types is less than a preset number threshold.
本申请实施例中,可以预先设置一个数量阈值,当某种疾病类型的样本的数量比这个数量阈值小的时候,因为没有足够多的样本,用到该疾病类型的样本进行训练得到的辅助诊断模型的准确度可能不高,因此,需要对该疾病类型的样本进行样本扩充,以增加该疾病类型的样本的数量,可以提高训练出来的辅助诊断模型的准确度。In the embodiment of this application, a quantity threshold can be set in advance. When the number of samples of a certain disease type is smaller than this number threshold, because there are not enough samples, the auxiliary diagnosis obtained by training with samples of the disease type The accuracy of the model may not be high. Therefore, it is necessary to expand the samples of the disease type to increase the number of samples of the disease type, which can improve the accuracy of the trained auxiliary diagnosis model.
转换模块203,用于通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量。The conversion module 203 is configured to perform vector conversion of the disease name corresponding to the target sample through a pre-trained conversion network to obtain a name vector.
其中,所述转换网络可以将词转换为一组向量表示,所述转换网络可以使用CBOW(continuous-bag-of-words,连续词袋)训练获得。Wherein, the conversion network can convert words into a set of vector representations, and the conversion network can be obtained by CBOW (continuous-bag-of-words) training.
本申请实施例中,可以使用预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得所述疾病名称的向量(名称向量),例如:“痛风”经过向量转换后表示为[-0.124,-0.871,0.812,-1.290,…]。In the embodiment of this application, a pre-trained conversion network can be used to perform vector conversion of the disease name corresponding to the target sample to obtain a vector (name vector) of the disease name, for example, "gout" is represented by vector conversion It is [-0.124,-0.871,0.812,-1.290,...].
训练模块204,用于根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型。The training module 204 is configured to train the generation network based on the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain a trained generation model.
其中,所述第一疾病分类模型可以根据输入的疾病症状,输出所述疾病症状所属的疾病类型。Wherein, the first disease classification model can output the disease type to which the disease symptoms belong according to the input disease symptoms.
其中,所述生成网络以及所述判别网络共同组成生成对抗网络(Generative Adversarial Net,GAN),其中,所述生成对抗网络是一种基于对抗训练(Adversarial training)过程来训练生成模型(Generative Model)的一种新的深度学习框架。生成对抗网络的训练的目的就是要使得生成的生成样本和真实样本的分布尽量接近,从而能够解释真实的数据。在训练过程中,训练一个生成模型G,从随机噪声或者潜在变量(Latent Variable)中生成逼真的生成样本,同时训练一个判别模型D来鉴别真实样本(即输入样本)和生成样本。在GAN的训练中,生成模型G和判别模型D同时训练,多次训练后,直到达到一个纳什均衡,生成模型G生成的生成样本与真实样本无差别。判别模型D也无法正确的区分生成样本和真实样本。Wherein, the generative network and the discriminant network jointly form a generative adversarial network (Generative Adversarial Net, GAN), where the generative adversarial network is a Generative Model based on an adversarial training process. A new deep learning framework. The purpose of the training of the generative adversarial network is to make the distribution of the generated generated samples and the real samples as close as possible, so as to be able to interpret the real data. In the training process, a generative model G is trained to generate realistic generated samples from random noise or latent variables (Latent Variable), and a discriminant model D is trained to identify real samples (ie input samples) and generated samples at the same time. In GAN training, the generative model G and the discriminant model D are trained at the same time. After multiple trainings, until a Nash equilibrium is reached, the generated samples generated by the generative model G are indistinguishable from the real samples. The discriminant model D cannot correctly distinguish the generated samples from the real samples.
输入模块205,用于将所述名称向量输入至所述训练好的生成模型,获得生成样本数据集,所述生成样本数据集包括的多个生成样本的疾病类型与所述目标疾病类型一致。The input module 205 is configured to input the name vector into the trained generation model to obtain a generated sample data set, and the generated sample data set includes the multiple generated samples whose disease types are consistent with the target disease types.
本申请实施例中,可以使用所述训练好的生成模型生成与所述目标疾病类型一致的多个生成样本。In the embodiment of the present application, the trained generation model may be used to generate multiple generated samples consistent with the target disease type.
判断模块206,用于使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练。The judging module 206 is configured to use the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model.
本申请实施例中,为了确保所述生成样本数据集中的多个生成样本可用于模型训练,需要使用第一疾病分类模型对所述多个生成样本进行判断,确保生成样本数据集的有效性。In the embodiment of the present application, in order to ensure that the multiple generated samples in the generated sample data set can be used for model training, the first disease classification model needs to be used to judge the multiple generated samples to ensure the validity of the generated sample data set.
所述确定模块202,还用于若所述生成样本数据集中的多个生成样本可用于模型训练, 将所述真实样本数据集和所述生成样本数据集确定为所述辅助诊断模型的第一训练样本数据集。The determining module 202 is further configured to, if multiple generated samples in the generated sample data set can be used for model training, determine the real sample data set and the generated sample data set as the first of the auxiliary diagnosis model Training sample data set.
本申请实施例中,若所述生成样本数据集中的多个生成样本可用于模型训练,可以将所述生成样本数据集以及所述正式样本数据集一起用于模型训练,保证了样本数量的充足,提高了训练出来的模型的准确度。In the embodiment of the present application, if multiple generated samples in the generated sample data set can be used for model training, the generated sample data set and the formal sample data set can be used for model training together to ensure a sufficient number of samples , Improve the accuracy of the trained model.
作为一种可选的实施方式,所述第一疾病分类模型是使用第二训练样本数据集训练的,所述判断模块206使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练的方式具体为:As an optional implementation manner, the first disease classification model is trained using a second training sample data set, and the judgment module 206 uses the first disease classification model according to the data set of the first disease classification model. Accuracy, the method for judging whether multiple generated samples in the generated sample data set can be used for model training is specifically:
根据测试数据集,确定所述第一疾病分类模型的第一精度;Determining the first accuracy of the first disease classification model according to the test data set;
将所述多个生成样本以及所述第二训练样本数据集确定为第三训练样本数据集;Determining the plurality of generated samples and the second training sample data set as a third training sample data set;
对所述第三训练样本数据集进行训练,获得第二疾病分类模型;Training the third training sample data set to obtain a second disease classification model;
根据所述测试数据集,确定所述第二疾病分类模型的第二精度;Determine the second accuracy of the second disease classification model according to the test data set;
判断所述第二精度是否大于所述第一精度;Determine whether the second accuracy is greater than the first accuracy;
若所述第二精度大于所述第一精度,确定所述多个生成样本可用于模型训练;或If the second accuracy is greater than the first accuracy, determining that the multiple generated samples can be used for model training; or
若所述第二精度小于或等于所述第一精度,确定所述多个生成样本不可用于模型训练。If the second accuracy is less than or equal to the first accuracy, it is determined that the multiple generated samples cannot be used for model training.
在该可选的实施方式中,可以使用所述第一疾病分类模型对测试数据集中的症状进行判断,获得疾病分类结果,统计所述第一疾病分类模型正确的疾病分类结果以及错误的疾病分类结果,然后根据统计结果,确定所述第一疾病分类模型的疾病分类的正确率(即第一精度)。可以将所述多个生成样本以及所述第二训练样本数据集确定为第三训练样本数据集,使用所述第三训练样本数据集训练出第二疾病分类模型,可以使用所述第二疾病分类模型对测试数据集中的症状进行判断,获得疾病分类结果,统计所述第二疾病分类模型正确的疾病分类结果以及错误的疾病分类结果,然后根据统计结果,确定所述第二疾病分类模型的正确率(即第二精度),然后判断所述第二精度是否大于所述第一精度,若所述第二精度大于所述第一精度,说明增加了所述多个生成样本训练后,获得的所述第二疾病分类模型比没有增加所述多个生成样本训练的所述第一疾病分类模型的准确度高,即所述多个生成样本可用于模型训练,若所述第二精度小于或等于所述第一精度,说明增加了所述多个生成样本训练后,获得的所述第二疾病分类模型不比没有增加所述多个生成样本训练的所述第一疾病分类模型的准确度高,甚至所述第二疾病分类模型的准确度比所述第一疾病分类模型的准确度更低,即所述多个生成样本不可用于模型训练。In this alternative embodiment, the first disease classification model can be used to judge the symptoms in the test data set, obtain disease classification results, and count the correct disease classification results and incorrect disease classifications of the first disease classification model. As a result, according to the statistical results, the correct rate (ie, the first accuracy) of the disease classification of the first disease classification model is determined. The plurality of generated samples and the second training sample data set may be determined as a third training sample data set, the third training sample data set is used to train a second disease classification model, and the second disease classification model may be used The classification model judges the symptoms in the test data set, obtains disease classification results, counts the correct disease classification results and incorrect disease classification results of the second disease classification model, and then determines the second disease classification model based on the statistical results The correct rate (ie, the second accuracy), and then determine whether the second accuracy is greater than the first accuracy, if the second accuracy is greater than the first accuracy, it means that after the training of the multiple generated samples is added, it is obtained The second disease classification model has higher accuracy than the first disease classification model for training without increasing the multiple generated samples, that is, the multiple generated samples can be used for model training, if the second accuracy is less than Or equal to the first accuracy, indicating that the second disease classification model obtained after training with the multiple generated samples is no more accurate than the first disease classification model trained with the multiple generated samples Even if the accuracy of the second disease classification model is lower than that of the first disease classification model, that is, the multiple generated samples cannot be used for model training.
作为一种可选的实施方式,所述确定模块202,还用于所述转换模块203通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量之后,将所述名称向量的维度确定为所述生成网络的输入数组的维度;As an optional implementation manner, the determining module 202 is also used for the conversion module 203 to perform vector conversion of the disease name corresponding to the target sample through a pre-trained conversion network, and after obtaining the name vector, The dimension of the name vector is determined to be the dimension of the input array of the generating network;
所述确定模块202,还用于将所述名称向量对应的疾病症状关系库中所有症状的数量确定为所述生成网络的输出数组的维度大小,并将预设值确定为所述生成网络的输出数组的元素的取值;The determining module 202 is further configured to determine the number of all symptoms in the disease symptom relation database corresponding to the name vector as the dimension of the output array of the generating network, and determining the preset value as the size of the generating network The value of the elements of the output array;
所述训练模块204根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型的方式具体为:The training module 204 trains the generation network based on the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, and the specific method for obtaining the trained generation model is as follows:
根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,按照所述生成网络的输入数组的维度、所述输出数组的维度大小以及所述输出数组的元素的取值,对生成网络进行训练,获得训练好的生成模型。According to the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, according to the dimension of the input array of the generation network, the dimension of the output array, and the output The values of the elements of the array are trained on the generative network to obtain a trained generative model.
在该可选的实施方式中,在对所述目标样本对应的疾病名称进行向量转换,获得名称向量之后,可以对生成对抗网络的生成网络以及判别网络进行预处理,首先指定生成网络的输入数组的维度,该维度和经过转换网络转换后的名称向量的维度一致,生成网 络的输出数组的维度大小为疾病症状关系库中所有症状的数量大小,即所述生成网络的输出数组的元素的数量为疾病症状关系库中所有症状的数量,并将预设值确定为所述生成网络的输出数组的元素的取值,比如指定取值只能为0或1。然后可以随机初始化生成网络的参数。In this alternative embodiment, after vector conversion is performed on the disease name corresponding to the target sample to obtain the name vector, the generation network of the generation confrontation network and the discrimination network can be preprocessed, and the input array of the generation network can be specified first The dimension of the name vector is the same as the dimension of the name vector transformed by the transformation network. The dimension of the output array of the generation network is the number of all symptoms in the disease symptom relation database, that is, the number of elements in the output array of the generation network Is the number of all symptoms in the disease symptom relation database, and the preset value is determined as the value of the element of the output array of the generating network, for example, the specified value can only be 0 or 1. Then the parameters of the generated network can be randomly initialized.
可选的,对抗生成网络的训练过程可以为首先利用生成网络生成一批假数据,标签为0。将假数据与真实数据(标签为1)混在一起输入判别网络,根据结果更新判别网络的参数。固定判别网络,再次使用生成网络生成假数据,标签为1,与真实数据一起输入判别网络,根据判别网络输出结果更新生成网络参数。如此反复迭代,直至生成网络和判别网络达到纳什均衡。Optionally, the training process of the confrontation generation network may be to first use the generation network to generate a batch of fake data with a label of 0. The fake data and the real data (labeled 1) are mixed into the discriminant network, and the parameters of the discriminant network are updated according to the results. Fix the discriminant network, use the generative network again to generate fake data, with a label of 1, enter the discriminant network together with the real data, and update the generated network parameters according to the discriminant network output results. This is repeated iteratively until the generation network and the discriminant network reach the Nash equilibrium.
其中,判别网络的输入是症状和疾病组合的序列串及该序列组合的标签(标签为0和1,分别表示来源于生成网络和真实数据)。例如当前系统中共有10种症状和2种疾病,则序列串长度为10+2=12。某真实数据症状组合包括三个症状且分别位于位置1,3,5,该症状组合对应的疾病位于位置1,则序列串表示为[1,0,1,0,1,0,0,0,0,0,1,0]。判别网络的输入表示为{[1,0,1,0,1,0,0,0,0,0,1,0],1}。Among them, the input of the discriminant network is the sequence string of the combination of symptoms and diseases and the label of the sequence combination (the labels are 0 and 1, indicating that they are derived from the generated network and the real data, respectively). For example, there are 10 symptoms and 2 diseases in the current system, and the sequence string length is 10+2=12. A real data symptom combination includes three symptoms and they are located at positions 1, 3, and 5. The disease corresponding to the symptom combination is located at position 1. The sequence string is represented as [1,0,1,0,1,0,0,0 ,0,0,1,0]. The input of the discriminant network is expressed as {[1,0,1,0,1,0,0,0,0,0,1,0],1}.
其中,所述转换网络是将完整的实体名词作为输入去训练的,所述判别网络的输出值为预设数值范围的浮点数,所述输出值用于衡量所述判别网络的输入为假数据的概率。完整的实体名词保留了完整的疾病实体含义,可以避免实体被拆分,破坏词语本身含义;判别网络的输出可以是0-1之间的浮点数,值越小表示判别网络认为该条输入越有可能是假数据。Wherein, the conversion network is trained using complete entity nouns as input, the output value of the discrimination network is a floating point number within a preset numerical range, and the output value is used to measure that the input of the discrimination network is false data The probability. The complete entity noun retains the complete meaning of the disease entity, which can prevent the entity from being split and destroy the meaning of the word itself; the output of the discrimination network can be a floating point number between 0-1, and the smaller the value, the more the input is considered by the discrimination network. It may be fake data.
作为一种可选的实施方式,所述训练模块204包括:As an optional implementation manner, the training module 204 includes:
生成子模块,用于使用生成网络生成疾病类型与所述目标疾病类型一致的多个假样本;A generating sub-module is used to generate a plurality of fake samples whose disease type is consistent with the target disease type using the generating network;
确定子模块,用于将所述多个假样本与所述第二训练样本数据集确定为第四训练样本数据集;A determining sub-module, configured to determine the plurality of fake samples and the second training sample data set as a fourth training sample data set;
训练子模块,用于对所述第四训练样本数据集进行训练,获得第三疾病分类模型;The training sub-module is used to train the fourth training sample data set to obtain a third disease classification model;
所述确定子模块,还用于确定所述第三疾病分类模型的第三精度;The determining sub-module is also used to determine the third accuracy of the third disease classification model;
更新子模块,用于根据所述第三精度以及判别网络的梯度变化,对所述生成网络的参数进行更新,获得训练好的生成模型。The update sub-module is used to update the parameters of the generation network according to the third accuracy and the gradient change of the discrimination network to obtain a trained generation model.
在该可选的实施方式中,生成网络的输出是序列串(数组),是假的疾病症状关系数据,即假样本,可以将假样本与所述第二训练样本数据集确定为第四训练样本数据集,对所述第四训练样本数据集进行训练,获得第三疾病分类模型;可以使用相同的测试数据集,确定所述第三疾病分类模型的精度(第三精度),根据所述第三精度以及判别网络的梯度变化,对所述生成网络的参数进行更新,获得训练好的生成模型。In this alternative embodiment, the output of the generating network is a sequence string (array), which is false disease symptom relationship data, that is, a false sample. The false sample and the second training sample data set can be determined as the fourth training The sample data set is used to train the fourth training sample data set to obtain a third disease classification model; the same test data set can be used to determine the accuracy (third accuracy) of the third disease classification model, according to the The third precision and the gradient change of the discrimination network are updated, and the parameters of the generation network are updated to obtain a trained generation model.
作为一种可选的实施方式,所述更新子模块根据所述第三精度以及判别网络的梯度变化,对所述生成网络的参数进行更新,获得训练好的生成模型的方式具体为:As an optional implementation manner, the update submodule updates the parameters of the generation network according to the third accuracy and the gradient change of the discrimination network, and the specific method for obtaining the trained generation model is as follows:
根据所述第三精度以及所述第一精度,确定精度变化率;Determine the accuracy change rate according to the third accuracy and the first accuracy;
根据所述精度变化率以及所述判别网络的第一梯度变化,获得第二梯度变化;Obtaining a second gradient change according to the accuracy change rate and the first gradient change of the discrimination network;
通过反向传播算法,根据所述第二梯度变化,更新所述生成网络的参数,获得训练好的生成模型。Through the back propagation algorithm, according to the second gradient change, the parameters of the generation network are updated to obtain a trained generation model.
在该可选的实施方式中,可以将所述第三精度与所述第一精度的差值除以所述第三精度,获得精度变化率。可以结合所述精度变化率与所述判别网络的第一梯度变化,获得第二梯度变化,其中,将所述精度变化率记为PR、所述判别网络的第一梯度变化记为D,G,第二梯度变化记为D new,G,arg min表示寻找一个参数使得值最小,ε为期望,z为控制参数分布的常量,q(z)表示参数的分布,D(G(z))表示生成网络生成好的数据时判别 网络的输出,D(G ng(z))表示生成网络生成不好的数据时判别网络的输出,根据所述精度变化率以及所述判别网络的第一梯度变化,获得第二梯度变化的公式为: In this optional implementation, the difference between the third accuracy and the first accuracy may be divided by the third accuracy to obtain the accuracy change rate. The accuracy change rate can be combined with the first gradient change of the discriminant network to obtain a second gradient change, wherein the accuracy change rate is recorded as PR, and the first gradient change of the discriminant network is recorded as D, G , The second gradient change is denoted as D new , G, arg min means looking for a parameter to minimize the value, ε is the expectation, z is the constant controlling the parameter distribution, q(z) means the parameter distribution, D(G(z)) Represents the output of the judgment network when generating good data generated by the network, D(G ng (z)) represents the output of the judgment network when the generation network generates bad data, according to the accuracy change rate and the first gradient of the discrimination network Change, the formula for obtaining the second gradient change is:
D new,G=PR*log((D,G))+(1-PR)*log(1-(D,G)); D new ,G=PR*log((D,G))+(1-PR)*log(1-(D,G));
Figure PCTCN2020098246-appb-000003
Figure PCTCN2020098246-appb-000003
通过结合精度变化率,可以确定网络的参数的修改的方向是否正确,提高了生成对抗网络的训练速度。By combining the accuracy change rate, it can be determined whether the modification direction of the network parameters is correct, and the training speed of the generated confrontation network is improved.
其中,所述判别网络的损失函数为交叉熵损失函数。Wherein, the loss function of the discrimination network is a cross-entropy loss function.
判别网络是一个有监督的判别网络。判别网络的损失函数为交叉熵损失,训练过程中依据当前分类的结果使用反向传播的方法,按照梯度下降方向更新判别网络参数。而生成网络的任务是寻找能描述真实分布的最优参数,参数的更新同样采用反向传播方法,而且梯度变化的方向来自于判别网络传过来的梯度。其中,纳什均衡为V(D,G),p data(x)为输入判别网络的真实样本数据的分布,p z(z)为输入判别网络的假样本数据的分布,生成网络和判别网络总体优化公式为: The discriminant network is a supervised discriminant network. The loss function of the discriminant network is cross-entropy loss. During the training process, the back propagation method is used according to the result of the current classification, and the discriminant network parameters are updated according to the gradient descent direction. The task of generating the network is to find the optimal parameters that can describe the true distribution. The update of the parameters also uses the back propagation method, and the direction of the gradient change comes from the gradient passed by the discriminating network. Among them, Nash equilibrium is V(D,G), p data (x) is the distribution of real sample data input to the discriminant network, and p z (z) is the distribution of fake sample data input to the discriminant network, generating the network and discriminant network population The optimization formula is:
Figure PCTCN2020098246-appb-000004
Figure PCTCN2020098246-appb-000004
在图2所描述的训练样本扩充装置中,可以确定数量较少的目标样本,然后根据第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,可以获得训练好的生成模型,使用生成模型生成多个与目标疾病类型一致的多个生成样本,从而增加了目标疾病类型的样本的数量,并通过所述第一疾病分类模型判断多个生成样本是否可用于模型训练,若多个生成样本可用于模型训练,可以将多个生成样本添加至训练样本数据集中,扩充了用于训练辅助诊断模型的样本数量,提高了辅助诊断模型的准确度。In the training sample expansion device described in FIG. 2, a small number of target samples can be determined, and then according to the first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discriminating network, the generation network is performed Training can obtain a well-trained generative model, use the generative model to generate multiple generated samples consistent with the target disease type, thereby increasing the number of samples of the target disease type, and judge multiple samples by the first disease classification model Whether the generated samples can be used for model training, if multiple generated samples can be used for model training, multiple generated samples can be added to the training sample data set, which expands the number of samples used to train the auxiliary diagnosis model and improves the accuracy of the auxiliary diagnosis model Spend.
本申请可应用于智慧医疗、精准医疗及AI+医疗等数字医疗的技术领域,可推动数字医疗的发展。This application can be applied to the technical fields of digital medical care such as smart medical care, precision medical care, and AI+ medical care, and can promote the development of digital medical care.
如图3所示,图3是本申请实现训练样本扩充方法的较佳实施例的电子设备的结构示意图。所述电子设备3包括存储器31、至少一个处理器32、存储在所述存储器31中并可在所述至少一个处理器32上运行的计算机可读指令33及至少一条通讯总线34。As shown in FIG. 3, FIG. 3 is a schematic structural diagram of an electronic device implementing a preferred embodiment of the training sample expansion method of the present application. The electronic device 3 includes a memory 31, at least one processor 32, computer readable instructions 33 stored in the memory 31 and executable on the at least one processor 32, and at least one communication bus 34.
本领域技术人员可以理解,图3所示的示意图仅仅是所述电子设备3的示例,并不构成对所述电子设备3的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备3还可以包括输入输出设备、网络接入设备等。Those skilled in the art can understand that the schematic diagram shown in FIG. 3 is only an example of the electronic device 3, and does not constitute a limitation on the electronic device 3. It may include more or less components than those shown in the figure, or a combination. Certain components, or different components, for example, the electronic device 3 may also include input and output devices, network access devices, and so on.
所述电子设备3还包括但不限于任何一种可与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备等。The electronic device 3 also includes, but is not limited to, any electronic product that can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device, for example, a personal computer, a tablet computer, a smart phone, etc. Personal digital assistants (Personal Digital Assistant, PDA), game consoles, interactive network television (Internet Protocol Television, IPTV), smart wearable devices, etc.
所述至少一个处理器32可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。该处理器32可以是微处理器或者该处理器32也可以是任何常规的处理器等,所述处理器32是所述电子设备3的控制中心,利用各种接口和线路连接整个电子设备3的各个部分。The at least one processor 32 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (ASICs). ), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 32 can be a microprocessor, or the processor 32 can also be any conventional processor, etc. The processor 32 is the control center of the electronic device 3, and connects the entire electronic device 3 through various interfaces and lines. Parts.
所述存储器31可用于存储所述计算机可读指令33和/或模块/单元,所述处理器32通过运行或执行存储在所述存储器31内的计算机可读指令和/或模块/单元,以及调用存储在存储器31内的数据,实现所述电子设备3的各种功能。所述存储器31可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备3的使用所创建的数据等。 此外,存储器31可以包括高速随机存取存储器等易失性存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。The memory 31 may be used to store the computer-readable instructions 33 and/or modules/units, and the processor 32 runs or executes the computer-readable instructions and/or modules/units stored in the memory 31, and The data stored in the memory 31 is called to realize various functions of the electronic device 3. The memory 31 may mainly include a storage program area and a storage data area. The storage program area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may Data and the like created in accordance with the use of the electronic device 3 are stored. In addition, the memory 31 may include volatile memory such as high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), and a secure digital ( Secure Digital, SD card, Flash Card, at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
结合图1,所述电子设备3中的所述存储器31存储多个指令以实现一种训练样本扩充方法,所述处理器32可执行所述多个指令从而实现:With reference to FIG. 1, the memory 31 in the electronic device 3 stores multiple instructions to implement a training sample expansion method, and the processor 32 can execute the multiple instructions to achieve:
当需要训练辅助诊断模型时,获取真实样本数据集,其中,所述真实样本数据集由多种疾病类型的样本组成,每种所述疾病类型的样本包括至少一个疾病症状;When the auxiliary diagnosis model needs to be trained, a real sample data set is obtained, where the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom;
当所述多种疾病类型的样本中存在目标疾病类型的样本的数量小于预设数量阈值时,将所述目标疾病类型的样本确定为目标样本;When the number of samples of the target disease type in the samples of the multiple disease types is less than the preset number threshold, determining the sample of the target disease type as the target sample;
通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量;Using a pre-trained conversion network, vector conversion is performed on the disease name corresponding to the target sample to obtain a name vector;
根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型;Training the generation network according to the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain the trained generation model;
将所述名称向量输入至所述训练好的生成模型,获得生成样本数据集,所述生成样本数据集包括的多个生成样本的疾病类型与所述目标疾病类型一致;Inputting the name vector into the trained generation model to obtain a generated sample data set, the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type;
使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练;Using the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model;
若所述生成样本数据集中的多个生成样本可用于模型训练,将所述真实样本数据集和所述生成样本数据集确定为所述辅助诊断模型的第一训练样本数据集。If multiple generated samples in the generated sample data set can be used for model training, the real sample data set and the generated sample data set are determined as the first training sample data set of the auxiliary diagnosis model.
具体地,所述处理器32对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。Specifically, for the specific implementation method of the above-mentioned instructions by the processor 32, reference may be made to the description of the relevant steps in the embodiment corresponding to FIG. 1, which will not be repeated here.
在图3所描述的电子设备3中,可以确定数量较少的目标样本,然后根据第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,可以获得训练好的生成模型,使用生成模型生成多个与目标疾病类型一致的多个生成样本,从而增加了目标疾病类型的样本的数量,并通过所述第一疾病分类模型判断多个生成样本是否可用于模型训练,若多个生成样本可用于模型训练,可以将多个生成样本添加至训练样本数据集中,扩充了用于训练辅助诊断模型的样本数量,提高了辅助诊断模型的准确度。In the electronic device 3 described in FIG. 3, a small number of target samples can be determined, and then the generation network can be trained based on the accuracy of the first disease classification model and the gradient change of the discrimination network according to the first disease classification model. , A well-trained generative model can be obtained, and the generative model can be used to generate a plurality of samples consistent with the target disease type, thereby increasing the number of samples of the target disease type, and the first disease classification model is used to determine the number of generated samples. Whether the sample can be used for model training, if multiple generated samples can be used for model training, multiple generated samples can be added to the training sample data set, which expands the number of samples used to train the auxiliary diagnosis model and improves the accuracy of the auxiliary diagnosis model .
本申请可应用于智慧医疗、精准医疗及AI+医疗等数字医疗的技术领域,可推动数字医疗的发展。This application can be applied to the technical fields of digital medical care such as smart medical care, precision medical care, and AI+ medical care, and can promote the development of digital medical care.
所述电子设备3集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中,所述计算机可读存储介质可以是非易失性的存储介质,也可以是易失性的存储介质。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于计算机可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存储器(RAM,Random Access Memory)。If the integrated module/unit of the electronic device 3 is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium, which may be non-easy. A volatile storage medium can also be a volatile storage medium. Based on this understanding, this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the computer-readable instructions are executed by the processor, they can implement the steps of the foregoing method embodiments. Wherein, the computer-readable instruction includes computer-readable instruction code, and the computer-readable instruction code may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory).
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部 件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional modules.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。For those skilled in the art, it is obvious that the present application is not limited to the details of the foregoing exemplary embodiments, and the present application can be implemented in other specific forms without departing from the spirit or basic characteristics of the application. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of this application is defined by the appended claims rather than the above description, and therefore it is intended to fall into the claims. All changes in the meaning and scope of the equivalent elements of are included in this application. Any associated diagram marks in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "including" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claims can also be implemented by one unit or device through software or hardware. The second class words are used to indicate names, and do not indicate any specific order.
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application and not to limit them. Although the application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the application can be Make modifications or equivalent replacements without departing from the spirit and scope of the technical solution of the present application.

Claims (20)

  1. 一种训练样本扩充方法,其中,所述训练样本扩充方法包括:A training sample expansion method, wherein the training sample expansion method includes:
    当需要训练辅助诊断模型时,获取真实样本数据集,其中,所述真实样本数据集由多种疾病类型的样本组成,每种所述疾病类型的样本包括至少一个疾病症状;When the auxiliary diagnosis model needs to be trained, a real sample data set is obtained, where the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom;
    当所述多种疾病类型的样本中存在目标疾病类型的样本的数量小于预设数量阈值时,将所述目标疾病类型的样本确定为目标样本;When the number of samples of the target disease type in the samples of the multiple disease types is less than the preset number threshold, determining the sample of the target disease type as the target sample;
    通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量;Using a pre-trained conversion network, vector conversion is performed on the disease name corresponding to the target sample to obtain a name vector;
    根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型;Training the generation network according to the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain the trained generation model;
    将所述名称向量输入至所述训练好的生成模型,获得生成样本数据集,所述生成样本数据集包括的多个生成样本的疾病类型与所述目标疾病类型一致;Inputting the name vector into the trained generation model to obtain a generated sample data set, the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type;
    使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练;Using the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model;
    若所述生成样本数据集中的多个生成样本可用于模型训练,将所述真实样本数据集和所述生成样本数据集确定为所述辅助诊断模型的第一训练样本数据集。If multiple generated samples in the generated sample data set can be used for model training, the real sample data set and the generated sample data set are determined as the first training sample data set of the auxiliary diagnosis model.
  2. 根据权利要求1所述的训练样本扩充方法,其中,所述第一疾病分类模型是使用第二训练样本数据集训练的,所述使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练包括:The training sample expansion method according to claim 1, wherein the first disease classification model is trained using a second training sample data set, and the first disease classification model is used according to the first disease classification The accuracy of the model, judging whether multiple generated samples in the generated sample data set can be used for model training includes:
    根据测试数据集,确定所述第一疾病分类模型的第一精度;Determining the first accuracy of the first disease classification model according to the test data set;
    将所述多个生成样本以及所述第二训练样本数据集确定为第三训练样本数据集;Determining the plurality of generated samples and the second training sample data set as a third training sample data set;
    对所述第三训练样本数据集进行训练,获得第二疾病分类模型;Training the third training sample data set to obtain a second disease classification model;
    根据所述测试数据集,确定所述第二疾病分类模型的第二精度;Determine the second accuracy of the second disease classification model according to the test data set;
    判断所述第二精度是否大于所述第一精度;Determine whether the second accuracy is greater than the first accuracy;
    若所述第二精度大于所述第一精度,确定所述多个生成样本可用于模型训练;或If the second accuracy is greater than the first accuracy, determining that the multiple generated samples can be used for model training; or
    若所述第二精度小于或等于所述第一精度,确定所述多个生成样本不可用于模型训练。If the second accuracy is less than or equal to the first accuracy, it is determined that the multiple generated samples cannot be used for model training.
  3. 根据权利要求1所述的训练样本扩充方法,其中,所述通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量之后,所述训练样本扩充方法还包括:The training sample expansion method according to claim 1, wherein the disease name corresponding to the target sample is vector-converted through a pre-trained conversion network, and after the name vector is obtained, the training sample expansion method further comprises :
    将所述名称向量的维度确定为所述生成网络的输入数组的维度;Determining the dimension of the name vector as the dimension of the input array of the generating network;
    将所述名称向量对应的疾病症状关系库中所有症状的数量确定为所述生成网络的输出数组的维度大小,并将预设值确定为所述生成网络的输出数组的元素的取值;Determining the number of all symptoms in the disease symptom relation database corresponding to the name vector as the dimensional size of the output array of the generating network, and determining the preset value as the value of the element of the output array of the generating network;
    所述根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型包括:According to the pre-trained first disease classification model, training the generation network based on the accuracy of the first disease classification model and the gradient change of the discrimination network, and obtaining the trained generation model includes:
    根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,按照所述生成网络的输入数组的维度、所述输出数组的维度大小以及所述输出数组的元素的取值,对生成网络进行训练,获得训练好的生成模型。According to the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, according to the dimension of the input array of the generation network, the dimension of the output array, and the output The values of the elements of the array are trained on the generative network to obtain a trained generative model.
  4. 根据权利要求2所述的训练样本扩充方法,其中,所述根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型包括:The training sample expansion method according to claim 2, wherein the generating network is trained based on the accuracy of the first disease classification model and the gradient change of the discriminant network according to the pre-trained first disease classification model, Obtaining a trained generative model includes:
    使用生成网络生成疾病类型与所述目标疾病类型一致的多个假样本;Using a generation network to generate multiple fake samples with disease types consistent with the target disease types;
    将所述多个假样本与所述第二训练样本数据集确定为第四训练样本数据集;Determining the plurality of fake samples and the second training sample data set as a fourth training sample data set;
    对所述第四训练样本数据集进行训练,获得第三疾病分类模型;Training the fourth training sample data set to obtain a third disease classification model;
    确定所述第三疾病分类模型的第三精度;Determining the third precision of the third disease classification model;
    根据所述第三精度以及判别网络的梯度变化,对所述生成网络的参数进行更新,获得训练好的生成模型。According to the third accuracy and the gradient change of the discrimination network, the parameters of the generation network are updated to obtain a trained generation model.
  5. 根据权利要求4所述的训练样本扩充方法,其中,所述根据所述第三精度以及判别网络的梯度变化,对所述生成网络的参数进行更新,获得训练好的生成模型包括:The training sample expansion method according to claim 4, wherein the updating the parameters of the generation network according to the third accuracy and the gradient change of the discrimination network to obtain a trained generation model comprises:
    根据所述第三精度以及所述第一精度,确定精度变化率;Determine the accuracy change rate according to the third accuracy and the first accuracy;
    根据所述精度变化率以及所述判别网络的第一梯度变化,获得第二梯度变化;Obtaining a second gradient change according to the accuracy change rate and the first gradient change of the discrimination network;
    通过反向传播算法,根据所述第二梯度变化,更新所述生成网络的参数,获得训练好的生成模型。Through the back propagation algorithm, according to the second gradient change, the parameters of the generation network are updated to obtain a trained generation model.
  6. 根据权利要求1至5中任一项所述的训练样本扩充方法,其特征在于,所述判别网络的损失函数为交叉熵损失函数。The training sample expansion method according to any one of claims 1 to 5, wherein the loss function of the discriminant network is a cross-entropy loss function.
  7. 根据权利要求1至5中任一项所述的训练样本扩充方法,其特征在于,所述转换网络是将完整的实体名词作为输入去训练的,所述判别网络的输出值为预设数值范围的浮点数,所述输出值用于衡量所述判别网络的输入为假数据的概率。The training sample expansion method according to any one of claims 1 to 5, wherein the conversion network is trained using complete physical nouns as input, and the output value of the discrimination network is a preset numerical range The output value is used to measure the probability that the input of the discrimination network is false data.
  8. 一种电子设备,其中,所述电子设备包括处理器和存储器,所述处理器用于执行存储器中存储的至少一个计算机可读指令以实现以下步骤:An electronic device, wherein the electronic device includes a processor and a memory, and the processor is configured to execute at least one computer-readable instruction stored in the memory to implement the following steps:
    当需要训练辅助诊断模型时,获取真实样本数据集,其中,所述真实样本数据集由多种疾病类型的样本组成,每种所述疾病类型的样本包括至少一个疾病症状;When the auxiliary diagnosis model needs to be trained, a real sample data set is obtained, where the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom;
    当所述多种疾病类型的样本中存在目标疾病类型的样本的数量小于预设数量阈值时,将所述目标疾病类型的样本确定为目标样本;When the number of samples of the target disease type in the samples of the multiple disease types is less than the preset number threshold, determining the sample of the target disease type as the target sample;
    通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量;Using a pre-trained conversion network, vector conversion is performed on the disease name corresponding to the target sample to obtain a name vector;
    根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型;Training the generation network according to the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain the trained generation model;
    将所述名称向量输入至所述训练好的生成模型,获得生成样本数据集,所述生成样本数据集包括的多个生成样本的疾病类型与所述目标疾病类型一致;Inputting the name vector into the trained generation model to obtain a generated sample data set, the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type;
    使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练;Using the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model;
    若所述生成样本数据集中的多个生成样本可用于模型训练,将所述真实样本数据集和所述生成样本数据集确定为所述辅助诊断模型的第一训练样本数据集。If multiple generated samples in the generated sample data set can be used for model training, the real sample data set and the generated sample data set are determined as the first training sample data set of the auxiliary diagnosis model.
  9. 根据权利要求8所述的电子设备,其中,所述第一疾病分类模型是使用第二训练样本数据集训练的,在所述使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:The electronic device according to claim 8, wherein the first disease classification model is trained using a second training sample data set, and the first disease classification model is used according to the first disease classification model. When determining whether multiple generated samples in the generated sample data set can be used for model training, the processor executes the at least one computer-readable instruction to implement the following steps:
    根据测试数据集,确定所述第一疾病分类模型的第一精度;Determining the first accuracy of the first disease classification model according to the test data set;
    将所述多个生成样本以及所述第二训练样本数据集确定为第三训练样本数据集;Determining the plurality of generated samples and the second training sample data set as a third training sample data set;
    对所述第三训练样本数据集进行训练,获得第二疾病分类模型;Training the third training sample data set to obtain a second disease classification model;
    根据所述测试数据集,确定所述第二疾病分类模型的第二精度;Determine the second accuracy of the second disease classification model according to the test data set;
    判断所述第二精度是否大于所述第一精度;Determine whether the second accuracy is greater than the first accuracy;
    若所述第二精度大于所述第一精度,确定所述多个生成样本可用于模型训练;或If the second accuracy is greater than the first accuracy, determining that the multiple generated samples can be used for model training; or
    若所述第二精度小于或等于所述第一精度,确定所述多个生成样本不可用于模型训练。If the second accuracy is less than or equal to the first accuracy, it is determined that the multiple generated samples cannot be used for model training.
  10. 根据权利要求8所述的电子设备,其中,在所述通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量之后,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:The electronic device according to claim 8, wherein, after the disease name corresponding to the target sample is vector-transformed through a pre-trained conversion network to obtain a name vector, the processor executes the at least one Computer readable instructions to achieve the following steps:
    将所述名称向量的维度确定为所述生成网络的输入数组的维度;Determining the dimension of the name vector as the dimension of the input array of the generating network;
    将所述名称向量对应的疾病症状关系库中所有症状的数量确定为所述生成网络的输出数组的维度大小,并将预设值确定为所述生成网络的输出数组的元素的取值;Determining the number of all symptoms in the disease symptom relation database corresponding to the name vector as the dimension size of the output array of the generating network, and determining the preset value as the value of the element of the output array of the generating network;
    所述根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型包括:According to the pre-trained first disease classification model, training the generation network based on the accuracy of the first disease classification model and the gradient change of the discrimination network, and obtaining the trained generation model includes:
    根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,按照所述生成网络的输入数组的维度、所述输出数组的维度大小以及所述输出数组的元素的取值,对生成网络进行训练,获得训练好的生成模型。According to the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, according to the dimension of the input array of the generation network, the dimension of the output array, and the output The values of the elements of the array are trained on the generative network to obtain a trained generative model.
  11. 根据权利要求9所述的电子设备,其中,在所述根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:The electronic device according to claim 9, wherein, in the first disease classification model trained in advance, the generation network is trained based on the accuracy of the first disease classification model and the gradient change of the discriminant network to obtain When the generated model is trained, the processor executes the at least one computer-readable instruction to implement the following steps:
    使用生成网络生成疾病类型与所述目标疾病类型一致的多个假样本;Using a generation network to generate multiple fake samples with disease types consistent with the target disease types;
    将所述多个假样本与所述第二训练样本数据集确定为第四训练样本数据集;Determining the plurality of fake samples and the second training sample data set as a fourth training sample data set;
    对所述第四训练样本数据集进行训练,获得第三疾病分类模型;Training the fourth training sample data set to obtain a third disease classification model;
    确定所述第三疾病分类模型的第三精度;Determining the third precision of the third disease classification model;
    根据所述第三精度以及判别网络的梯度变化,对所述生成网络的参数进行更新,获得训练好的生成模型。According to the third accuracy and the gradient change of the discrimination network, the parameters of the generation network are updated to obtain a trained generation model.
  12. 根据权利要求11所述的电子设备,其中,在所述根据所述第三精度以及判别网络的梯度变化,对所述生成网络的参数进行更新,获得训练好的生成模型时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:The electronic device according to claim 11, wherein, when the parameters of the generation network are updated according to the third accuracy and the gradient change of the discrimination network to obtain a trained generation model, the processor The at least one computer readable instruction is executed to implement the following steps:
    根据所述第三精度以及所述第一精度,确定精度变化率;Determine the accuracy change rate according to the third accuracy and the first accuracy;
    根据所述精度变化率以及所述判别网络的第一梯度变化,获得第二梯度变化;Obtaining a second gradient change according to the accuracy change rate and the first gradient change of the discrimination network;
    通过反向传播算法,根据所述第二梯度变化,更新所述生成网络的参数,获得训练好的生成模型。Through the back propagation algorithm, according to the second gradient change, the parameters of the generation network are updated to obtain a trained generation model.
  13. 根据权利要求8至12中任一项所述的电子设备,其中,所述判别网络的损失函数为交叉熵损失函数。The electronic device according to any one of claims 8 to 12, wherein the loss function of the discrimination network is a cross-entropy loss function.
  14. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行时实现以下步骤:A computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer-readable instruction, and when the at least one computer-readable instruction is executed by a processor, the following steps are implemented:
    当需要训练辅助诊断模型时,获取真实样本数据集,其中,所述真实样本数据集由多种疾病类型的样本组成,每种所述疾病类型的样本包括至少一个疾病症状;When the auxiliary diagnosis model needs to be trained, a real sample data set is obtained, where the real sample data set is composed of samples of multiple disease types, and each of the disease types includes at least one disease symptom;
    当所述多种疾病类型的样本中存在目标疾病类型的样本的数量小于预设数量阈值时,将所述目标疾病类型的样本确定为目标样本;When the number of samples of the target disease type in the samples of the multiple disease types is less than the preset number threshold, determining the sample of the target disease type as the target sample;
    通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量;Using a pre-trained conversion network, vector conversion is performed on the disease name corresponding to the target sample to obtain a name vector;
    根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型;Training the generation network according to the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain the trained generation model;
    将所述名称向量输入至所述训练好的生成模型,获得生成样本数据集,所述生成样本数据集包括的多个生成样本的疾病类型与所述目标疾病类型一致;Inputting the name vector into the trained generation model to obtain a generated sample data set, the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type;
    使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练;Using the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model;
    若所述生成样本数据集中的多个生成样本可用于模型训练,将所述真实样本数据集和所述生成样本数据集确定为所述辅助诊断模型的第一训练样本数据集。If multiple generated samples in the generated sample data set can be used for model training, the real sample data set and the generated sample data set are determined as the first training sample data set of the auxiliary diagnosis model.
  15. 根据权利要求14所述的存储介质,其中,所述第一疾病分类模型是使用第二训练样本数据集训练的,在所述使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度, 判断所述生成样本数据集中的多个生成样本是否可用于模型训练时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:The storage medium according to claim 14, wherein the first disease classification model is trained using a second training sample data set, and the first disease classification model is used according to the first disease classification model. When judging whether multiple generated samples in the generated sample data set can be used for model training, the at least one computer-readable instruction is executed by the processor to implement the following steps:
    根据测试数据集,确定所述第一疾病分类模型的第一精度;Determining the first accuracy of the first disease classification model according to the test data set;
    将所述多个生成样本以及所述第二训练样本数据集确定为第三训练样本数据集;Determining the plurality of generated samples and the second training sample data set as a third training sample data set;
    对所述第三训练样本数据集进行训练,获得第二疾病分类模型;Training the third training sample data set to obtain a second disease classification model;
    根据所述测试数据集,确定所述第二疾病分类模型的第二精度;Determine the second accuracy of the second disease classification model according to the test data set;
    判断所述第二精度是否大于所述第一精度;Determine whether the second accuracy is greater than the first accuracy;
    若所述第二精度大于所述第一精度,确定所述多个生成样本可用于模型训练;或If the second accuracy is greater than the first accuracy, determining that the multiple generated samples can be used for model training; or
    若所述第二精度小于或等于所述第一精度,确定所述多个生成样本不可用于模型训练。If the second accuracy is less than or equal to the first accuracy, it is determined that the multiple generated samples cannot be used for model training.
  16. 根据权利要求14所述的存储介质,其中,在所述通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量转换,获得名称向量之后,所述至少一个计算机可读指令被处理器执行以实现以下步骤:The storage medium according to claim 14, wherein, after the disease name corresponding to the target sample is vector-transformed through a pre-trained conversion network to obtain a name vector, the at least one computer-readable instruction is The processor executes to achieve the following steps:
    将所述名称向量的维度确定为所述生成网络的输入数组的维度;Determining the dimension of the name vector as the dimension of the input array of the generating network;
    将所述名称向量对应的疾病症状关系库中所有症状的数量确定为所述生成网络的输出数组的维度大小,并将预设值确定为所述生成网络的输出数组的元素的取值;Determining the number of all symptoms in the disease symptom relation database corresponding to the name vector as the dimensional size of the output array of the generating network, and determining the preset value as the value of the element of the output array of the generating network;
    所述根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型包括:According to the pre-trained first disease classification model, training the generation network based on the accuracy of the first disease classification model and the gradient change of the discrimination network, and obtaining the trained generation model includes:
    根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,按照所述生成网络的输入数组的维度、所述输出数组的维度大小以及所述输出数组的元素的取值,对生成网络进行训练,获得训练好的生成模型。According to the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, according to the dimension of the input array of the generation network, the dimension of the output array, and the output The values of the elements of the array are trained on the generative network to obtain a trained generative model.
  17. 根据权利要求15所述的存储介质,其中,在所述根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:The storage medium according to claim 15, wherein in the first disease classification model trained in advance, the generation network is trained based on the accuracy of the first disease classification model and the gradient change of the discriminant network to obtain When the generated model is trained, the at least one computer-readable instruction is executed by the processor to implement the following steps:
    使用生成网络生成疾病类型与所述目标疾病类型一致的多个假样本;Using a generation network to generate multiple fake samples with disease types consistent with the target disease types;
    将所述多个假样本与所述第二训练样本数据集确定为第四训练样本数据集;Determining the plurality of fake samples and the second training sample data set as a fourth training sample data set;
    对所述第四训练样本数据集进行训练,获得第三疾病分类模型;Training the fourth training sample data set to obtain a third disease classification model;
    确定所述第三疾病分类模型的第三精度;Determining the third precision of the third disease classification model;
    根据所述第三精度以及判别网络的梯度变化,对所述生成网络的参数进行更新,获得训练好的生成模型。According to the third accuracy and the gradient change of the discrimination network, the parameters of the generation network are updated to obtain a trained generation model.
  18. 根据权利要求17所述的存储介质,其中,在所述根据所述第三精度以及判别网络的梯度变化,对所述生成网络的参数进行更新,获得训练好的生成模型时,所述至少一个计算机可读指令被处理器执行时还用以实现以下步骤:The storage medium according to claim 17, wherein, when the parameters of the generation network are updated according to the third accuracy and the gradient change of the discrimination network to obtain a trained generation model, the at least one The computer-readable instructions are also used to implement the following steps when executed by the processor:
    根据所述第三精度以及所述第一精度,确定精度变化率;Determine the accuracy change rate according to the third accuracy and the first accuracy;
    根据所述精度变化率以及所述判别网络的第一梯度变化,获得第二梯度变化;Obtaining a second gradient change according to the accuracy change rate and the first gradient change of the discrimination network;
    通过反向传播算法,根据所述第二梯度变化,更新所述生成网络的参数,获得训练好的生成模型。Through the back propagation algorithm, according to the second gradient change, the parameters of the generation network are updated to obtain a trained generation model.
  19. 根据权利要求14至18中任一项所述的存储介质,其中,所述判别网络的损失函数为交叉熵损失函数。The storage medium according to any one of claims 14 to 18, wherein the loss function of the discriminant network is a cross-entropy loss function.
  20. 一种训练样本扩充装置,其中,所述训练样本扩充装置包括:A training sample expansion device, wherein the training sample expansion device includes:
    获取模块,用于当需要训练辅助诊断模型时,获取真实样本数据集,其中,所述真实样本数据集由多种疾病类型的样本组成,每种所述疾病类型的样本包括至少一个疾病症状;The obtaining module is used to obtain a real sample data set when it is necessary to train an auxiliary diagnosis model, wherein the real sample data set is composed of samples of multiple disease types, and each of the samples of the disease type includes at least one disease symptom;
    确定模块,用于当所述多种疾病类型的样本中存在目标疾病类型的样本的数量小于预设数量阈值时,将所述目标疾病类型的样本确定为目标样本;The determining module is configured to determine the sample of the target disease type as the target sample when the number of samples of the target disease type in the samples of the multiple disease types is less than a preset number threshold;
    转换模块,用于通过预先训练好的转换网络,将所述目标样本对应的疾病名称进行向量 转换,获得名称向量;The conversion module is used to perform vector conversion of the disease name corresponding to the target sample through a pre-trained conversion network to obtain a name vector;
    训练模块,用于根据预先训练好的第一疾病分类模型,基于所述第一疾病分类模型的精度以及判别网络的梯度变化,对生成网络进行训练,获得训练好的生成模型;The training module is used to train the generation network based on the pre-trained first disease classification model, based on the accuracy of the first disease classification model and the gradient change of the discrimination network, to obtain a trained generation model;
    输入模块,用于将所述名称向量输入至所述训练好的生成模型,获得生成样本数据集,所述生成样本数据集包括的多个生成样本的疾病类型与所述目标疾病类型一致;The input module is configured to input the name vector into the trained generation model to obtain a generated sample data set, the disease type of the multiple generated samples included in the generated sample data set is consistent with the target disease type;
    判断模块,用于使用所述第一疾病分类模型,根据所述第一疾病分类模型的精度,判断所述生成样本数据集中的多个生成样本是否可用于模型训练;A judging module, configured to use the first disease classification model to determine whether multiple generated samples in the generated sample data set can be used for model training according to the accuracy of the first disease classification model;
    所述确定模块,还用于若所述生成样本数据集中的多个生成样本可用于模型训练,将所述真实样本数据集和所述生成样本数据集确定为所述辅助诊断模型的第一训练样本数据集。The determining module is further configured to determine the real sample data set and the generated sample data set as the first training of the auxiliary diagnosis model if multiple generated samples in the generated sample data set can be used for model training Sample data set.
PCT/CN2020/098246 2020-03-02 2020-06-24 Training sample expansion method and apparatus, electronic device, and storage medium WO2021174723A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010136917.X 2020-03-02
CN202010136917.XA CN111461168A (en) 2020-03-02 2020-03-02 Training sample expansion method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021174723A1 true WO2021174723A1 (en) 2021-09-10

Family

ID=71679950

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/098246 WO2021174723A1 (en) 2020-03-02 2020-06-24 Training sample expansion method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN111461168A (en)
WO (1) WO2021174723A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115277189A (en) * 2022-07-27 2022-11-01 中国人民解放军海军航空大学 Unsupervised intrusion flow detection and identification method based on generative countermeasure network
CN116229175A (en) * 2022-03-18 2023-06-06 北京百度网讯科技有限公司 Image processing method, device, equipment and storage medium
WO2023221739A1 (en) * 2022-05-20 2023-11-23 之江实验室 General multi-disease prediction system based on causal check data generation
CN118035730A (en) * 2024-04-10 2024-05-14 江苏中天互联科技有限公司 Equipment fault detection method, electronic equipment and storage medium
CN118211126A (en) * 2024-05-22 2024-06-18 国网山东省电力公司蒙阴县供电公司 Training method and device for photovoltaic power generation device fault prediction model

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111949886B (en) * 2020-08-28 2023-11-24 腾讯科技(深圳)有限公司 Sample data generation method and related device for information recommendation
CN112418305A (en) * 2020-11-19 2021-02-26 北京紫光展锐通信技术有限公司 Training sample generation method and device, computer equipment and storage medium
CN112767134A (en) * 2021-01-26 2021-05-07 维沃移动通信有限公司 Sample screening method and device and electronic equipment
CN113256434B (en) * 2021-06-08 2021-11-23 平安科技(深圳)有限公司 Method, device, equipment and storage medium for recognizing vehicle insurance claim settlement behaviors
CN115579128B (en) * 2022-10-19 2023-11-21 内蒙古卫数数据科技有限公司 Multi-model characteristic enhanced disease screening system
CN116451087B (en) * 2022-12-20 2023-12-26 石家庄七彩联创光电科技有限公司 Character matching method, device, terminal and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108470187A (en) * 2018-02-26 2018-08-31 华南理工大学 A kind of class imbalance question classification method based on expansion training dataset
CN109492764A (en) * 2018-10-24 2019-03-19 平安科技(深圳)有限公司 Training method, relevant device and the medium of production confrontation network
CN109919230A (en) * 2019-03-10 2019-06-21 西安电子科技大学 Based on the pyramidal medical image pulmonary nodule detection method of cycle specificity
CN110188824A (en) * 2019-05-31 2019-08-30 重庆大学 A kind of small sample plant disease recognition methods and system
CN110321945A (en) * 2019-06-21 2019-10-11 深圳前海微众银行股份有限公司 Exptended sample method, terminal, device and readable storage medium storing program for executing
US20200057966A1 (en) * 2018-08-20 2020-02-20 United Microelectronics Corp. Training apparatus and training method for providing sample size expanding model

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108764372B (en) * 2018-06-08 2019-07-16 Oppo广东移动通信有限公司 Construction method and device, mobile terminal, the readable storage medium storing program for executing of data set
CN109948693B (en) * 2019-03-18 2021-09-28 西安电子科技大学 Hyperspectral image classification method based on superpixel sample expansion and generation countermeasure network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108470187A (en) * 2018-02-26 2018-08-31 华南理工大学 A kind of class imbalance question classification method based on expansion training dataset
US20200057966A1 (en) * 2018-08-20 2020-02-20 United Microelectronics Corp. Training apparatus and training method for providing sample size expanding model
CN109492764A (en) * 2018-10-24 2019-03-19 平安科技(深圳)有限公司 Training method, relevant device and the medium of production confrontation network
CN109919230A (en) * 2019-03-10 2019-06-21 西安电子科技大学 Based on the pyramidal medical image pulmonary nodule detection method of cycle specificity
CN110188824A (en) * 2019-05-31 2019-08-30 重庆大学 A kind of small sample plant disease recognition methods and system
CN110321945A (en) * 2019-06-21 2019-10-11 深圳前海微众银行股份有限公司 Exptended sample method, terminal, device and readable storage medium storing program for executing

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116229175A (en) * 2022-03-18 2023-06-06 北京百度网讯科技有限公司 Image processing method, device, equipment and storage medium
CN116229175B (en) * 2022-03-18 2023-12-26 北京百度网讯科技有限公司 Image processing method, device, equipment and storage medium
WO2023221739A1 (en) * 2022-05-20 2023-11-23 之江实验室 General multi-disease prediction system based on causal check data generation
CN115277189A (en) * 2022-07-27 2022-11-01 中国人民解放军海军航空大学 Unsupervised intrusion flow detection and identification method based on generative countermeasure network
CN115277189B (en) * 2022-07-27 2023-08-15 中国人民解放军海军航空大学 Unsupervised intrusion flow detection and identification method based on generation type countermeasure network
CN118035730A (en) * 2024-04-10 2024-05-14 江苏中天互联科技有限公司 Equipment fault detection method, electronic equipment and storage medium
CN118035730B (en) * 2024-04-10 2024-06-28 江苏中天互联科技有限公司 Equipment fault detection method, electronic equipment and storage medium
CN118211126A (en) * 2024-05-22 2024-06-18 国网山东省电力公司蒙阴县供电公司 Training method and device for photovoltaic power generation device fault prediction model

Also Published As

Publication number Publication date
CN111461168A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
WO2021174723A1 (en) Training sample expansion method and apparatus, electronic device, and storage medium
US11727243B2 (en) Knowledge-graph-embedding-based question answering
US9928040B2 (en) Source code generation, completion, checking, correction
US10592607B2 (en) Iterative alternating neural attention for machine reading
WO2019084867A1 (en) Automatic answering method and apparatus, storage medium, and electronic device
US11232263B2 (en) Generating summary content using supervised sentential extractive summarization
CN109815459A (en) Generate the target summary for being adjusted to the content of text of target audience's vocabulary
JPWO2018051841A1 (en) Model learning apparatus, method thereof and program
WO2022006621A1 (en) Method and system for automated generation of text captions from medical images
WO2021208727A1 (en) Text error detection method and apparatus based on artificial intelligence, and computer device
US20200334326A1 (en) Architectures for modeling comment and edit relations
CN109817201A (en) Language learning method and device, electronic equipment and readable storage medium
WO2022042297A1 (en) Text clustering method, apparatus, electronic device, and storage medium
JP2023536103A (en) Systems and methods for controllable text summarization
KR20190137008A (en) A method for classifying documents with detailed description
CN105630763A (en) Method and system for making mention of disambiguation in detection
CN110598869A (en) Sequence model based classification method and device and electronic equipment
WO2021147405A1 (en) Customer-service statement quality detection method and related device
CN112668325B (en) Machine translation enhancement method, system, terminal and storage medium
TW201216083A (en) Information processing device, information processing method, and program
WO2021147404A1 (en) Dependency relationship classification method and related device
Schär et al. Gibbsian polar slice sampling
CN116386895B (en) Epidemic public opinion entity identification method and device based on heterogeneous graph neural network
CN112487813A (en) Named entity recognition method and system, electronic equipment and storage medium
CN113486680B (en) Text translation method, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20923041

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20923041

Country of ref document: EP

Kind code of ref document: A1