CN111768826B - Electronic health case generation method, device, terminal equipment and storage medium - Google Patents

Electronic health case generation method, device, terminal equipment and storage medium Download PDF

Info

Publication number
CN111768826B
CN111768826B CN202010617099.5A CN202010617099A CN111768826B CN 111768826 B CN111768826 B CN 111768826B CN 202010617099 A CN202010617099 A CN 202010617099A CN 111768826 B CN111768826 B CN 111768826B
Authority
CN
China
Prior art keywords
data
sample
encoder
decoding
self
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010617099.5A
Other languages
Chinese (zh)
Other versions
CN111768826A (en
Inventor
张国洲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ping An Smart Healthcare Technology Co ltd
Original Assignee
Shenzhen Ping An Smart Healthcare Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Ping An Smart Healthcare Technology Co ltd filed Critical Shenzhen Ping An Smart Healthcare Technology Co ltd
Priority to CN202010617099.5A priority Critical patent/CN111768826B/en
Publication of CN111768826A publication Critical patent/CN111768826A/en
Application granted granted Critical
Publication of CN111768826B publication Critical patent/CN111768826B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
    • 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/088Non-supervised learning, e.g. competitive learning
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Epidemiology (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The method, the device, the terminal equipment and the storage medium are suitable for the technical field of artificial intelligence, and the design of decoding the real sample data and the medical data to be converted is adopted in the method for generating the electronic health case, so that decoding is carried out after the real sample data and the medical data to be converted are not required to be converted into a picture format, further, structural distribution in the real sample data and the medical data to be converted is prevented from being changed, the generated electronic health case is identical to structural distribution of the medical data to be converted, and the accuracy of generating the electronic health case is improved. The electronic health case generation method is applied to the intelligent medical scene, so that the construction of a smart city is promoted.

Description

Electronic health case generation method, device, terminal equipment and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a method and apparatus for generating an electronic health case, a terminal device, and a storage medium.
Background
Electronic health cases (electronic health record, EHR) are patient-centric, electronically recorded information about personal health conditions, such as hospitalization records, disease information, allergy history, and the like. These records provide great assistance to doctors in understanding patient conditions, and today, where machine learning and artificial intelligence are rapidly evolving, the implementation of AI medical algorithms (disease prediction, intelligent diagnosis, etc.) is also greatly dependent on large amounts of electronic health medical data.
Because of the reasons that information among different medical institutions cannot be shared, medical data are kept secret, cases aiming at a certain disease are fewer, and the like, a large amount of effective data are difficult to obtain, and a large amount of electronic health case data cannot be directly used by researchers. Therefore, the method for generating EHR data has great application significance in the AI medical field.
In the existing electronic health case data generation process, original data are firstly converted into a picture format according to an ICD-9 disease coding list, then a generated countermeasure network (GAN) is used for generating pictures corresponding to data distribution, and finally the pictures are decoded into usable electronic health case data. However, the original discrete data is required to be converted into a picture format, so that the structural distribution of the original data is changed, the generated electronic health case data is inconsistent with the original data, and the accuracy of the electronic health case data generation is reduced.
Disclosure of Invention
In view of this, the embodiments of the present application provide a method, an apparatus, a terminal device, and a storage medium for generating electronic health cases, so as to solve the problem in the prior art that the electronic health case data generation accuracy is poor because the original discrete data needs to be converted into the picture format first to change the structural distribution of the original data.
A first aspect of an embodiment of the present application provides a method for generating an electronic health case, including:
acquiring real sample data, and training a self-encoder according to the real sample data;
acquiring preset noise data, inputting the preset noise data into a generating type countermeasure network to generate data, and obtaining false data;
the trained self-encoder is controlled to decode the real sample data and the false data to obtain sample decoded data and false decoded data;
performing weight parameter optimization on the generated countermeasure network according to the sample decoding data and the false decoding data until the generated countermeasure network meets a preset ending condition, and merging the trained self-encoder into the generated countermeasure network with optimized parameters;
and inputting the medical data to be converted into the combined generation type countermeasure network, and indicating the generation type countermeasure network to generate data according to the medical data to be converted, so as to obtain the electronic health case.
Further, the training the self-encoder according to the real sample data includes:
converting disease information in the real sample data into sample code data according to a disease code list, and performing vector conversion on the sample code data to obtain sample vector data;
sampling the sample vector data to obtain a sampling vector, and controlling an encoder in the self-encoder to encode the sampling vector to obtain an encoding result;
controlling a decoder in the self-encoder to decode the encoding result to obtain a decoding result, and performing loss calculation according to the decoding result to obtain a loss value;
and respectively updating parameters of the encoder and the decoder according to the loss value.
Further, after the parameter updating is performed on the encoder and the decoder according to the loss value, the method further includes:
if the self-encoder meets the preset optimization condition, stopping training of the self-encoder;
and if the self-encoder does not meet the preset optimization condition, re-sampling the sample vector data until the self-encoder meets the preset optimization condition.
Further, the control trained self-encoder decodes the real sample data and the dummy data to obtain sample decoded data and dummy decoded data, including:
respectively sampling real sample data and false data according to a preset sampling value to obtain real sampling data and false sampling data;
the decoder is controlled to decode the real sampling data and the false sampling data respectively to obtain a sample decoding result and a false decoding result;
specifically, the optimizing the weight parameter of the generated countermeasure network according to the sample decoding data and the false decoding data includes:
performing weight parameter optimization on the discriminator in the generated countermeasure network according to the sample decoding data and the false decoding data;
and optimizing weight parameters of generators in the generating type countermeasure network according to the sample decoding data and the false decoding data.
Further, a first optimization formula adopted for optimizing weight parameters of the discriminators in the generated countermeasure network according to the sample decoding data and the false decoding data is as follows:
Figure BDA0002564158830000031
Figure BDA0002564158830000032
θ d =clip(θ d ,-c,c);
wherein alpha is the learning rate, RMSProp is the optimization algorithm, clip is the intercept function, c is the intercept fixed value in the intercept function, z i For the dummy decoded data, x i Decoding data for the samples, m being the preset sample value, D (x i ) Decoding the probability of the data being the true sample data for the sample, G (z i ) The first optimization formula is used for calculating a loss function value in the discriminator for the data generated after inputting the dummy decoded data into the generator
Figure BDA0002564158830000033
The loss function value
Figure BDA0002564158830000034
Weight θ for the discriminator d And updating the numerical value.
Further, a second optimization formula adopted for optimizing weight parameters of the generators in the generated countermeasure network according to the sample decoding data and the false decoding data is as follows:
Figure BDA0002564158830000035
Figure BDA0002564158830000041
wherein alpha is learning rate, RMSProp is optimization algorithm, z i For the dummy decoded data, x i Decoding the data for the samples, m being the preset sample value, the second optimization formula being used to calculate a loss function value in the generator
Figure BDA0002564158830000042
The loss function value->
Figure BDA0002564158830000043
For weights theta for the generator g And updating the numerical value.
Further, the method further comprises:
uploading the electronic health case into a blockchain.
A second aspect of the embodiments of the present application provides an electronic health case generation device, including:
the self-encoder training unit is used for acquiring real sample data and training the self-encoder according to the real sample data;
the data generation unit is used for acquiring preset noise data, inputting the preset noise data into the generation type countermeasure network for data generation, and obtaining false data;
the data decoding unit is used for controlling the trained self-encoder to decode the real sample data and the false data to obtain sample decoded data and false decoded data;
the parameter optimization unit is used for optimizing weight parameters of the generated countermeasure network according to the sample decoding data and the false decoding data until the generated countermeasure network meets a preset ending condition, and merging the trained self-encoder into the generated countermeasure network with optimized parameters;
and the medical record generation unit is used for inputting the medical data to be converted into the combined generation type countermeasure network and indicating the generation type countermeasure network to generate data according to the medical data to be converted so as to obtain the electronic health case.
A fourth aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the terminal device, where the processor implements the steps of the electronic health case generation method provided in the first aspect when the computer program is executed.
A fifth aspect of the embodiments of the present application provides a storage medium storing a computer program which, when executed by a processor, implements the steps of the electronic health case generation method provided by the first aspect.
The method, the device, the terminal equipment and the storage medium for generating the electronic health case have the following beneficial effects:
according to the electronic health case generation method, the design of decoding the real sample data and the medical data to be converted is adopted in the self-encoder mode, so that decoding is carried out after the real sample data and the medical data to be converted are not required to be converted into the picture format, further, structural distribution changes in the real sample data and the medical data to be converted are prevented, the generated electronic health case is identical to structural distribution of the medical data to be converted, and accuracy of electronic health case generation is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required for the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of an implementation of a method for generating an electronic health case according to an embodiment of the present application;
fig. 2 is a flowchart of an implementation of a method for generating electronic health cases according to another embodiment of the present application;
FIG. 3 is a flowchart of an implementation of a method for generating electronic health cases according to a further embodiment of the present application;
FIG. 4 is a schematic diagram of the network architecture of the generator provided by the embodiment of FIG. 3;
fig. 5 is a block diagram of an electronic health case generating device according to an embodiment of the present application;
fig. 6 is a block diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The electronic health case generation method according to the embodiment of the present application may be executed by a control device or a terminal (hereinafter referred to as a "mobile terminal").
The electronic health case generation method is applied to a smart medical scene, and the design of decoding the medical data to be converted is adopted in a self-encoder mode, so that decoding is carried out after the medical data to be converted is not required to be converted into a picture format, further, the change of structural distribution in the medical data to be converted is prevented, the generated electronic health case is identical to the structural distribution of the medical data to be converted, the accuracy of the generation of the electronic health case is improved, and the construction of a smart city is promoted.
Referring to fig. 1, fig. 1 shows a flowchart of implementation of a method for generating an electronic health case according to an embodiment of the present application, including:
step S10, obtaining real sample data, and training a self-encoder according to the real sample data;
the self-encoder is an artificial neural network capable of learning to efficiently represent input data through unsupervised learning, and the self-encoder trained according to the real sample data is used for performing dimension reduction (dimensionality reduction) on the input data to obtain low-dimension discrete data.
Specifically, the self-encoder includes an encoder (encoder) for compressing the features of the input data into a hidden layer representation, which may be represented by an encoding function h=f (x), h being the hidden layer, and a decoder (decoder) for reconstructing the input features represented by the hidden layer, which may be represented by a decoding function r=g (h), so that the self-encoder as a whole may be described by a function g (f (x))=r, where r is the output data and x is the input data, and the self-encoder is trained from the real sample data, such that the hidden layer h carries the useful features in the real sample data.
Step S20, acquiring preset noise data, and inputting the preset noise data into a generating type countermeasure network to generate data so as to obtain false data;
wherein the generation type countermeasure network includes a generator for performing data generation based on data input to the generation type countermeasure network to generate dummy data G (z), and a discriminator for judging whether the dummy data generated by the generator is real data, the output of the discriminator being D (x), D (x) representing a probability that x is real data, if 1, representing 100% of real data, and if 0, representing that x is not real data.
Specifically, in this step, the dummy data is generated by inputting the preset noise data into a generator in the generated countermeasure network, the dummy data being used for network training of the generated countermeasure network.
Step S30, the trained self-encoder is controlled to decode the real sample data and the false data, and sample decoded data and false decoded data are obtained;
the design of decoding the real sample data and the false data by controlling the trained self-encoder is adopted, so that the characteristics of the real sample data and the false data are extracted, and the extracted characteristics are subjected to dimension reduction, so that the sample decoded data and the false decoded data with low dimension are obtained, and further the subsequent network training of the generated type countermeasure network is effectively facilitated.
Step S40, optimizing weight parameters of the generated countermeasure network according to the sample decoding data and the false decoding data until the generated countermeasure network meets a preset ending condition, and merging the trained self-encoder into the generated countermeasure network with optimized parameters;
the method comprises the steps of performing weight parameter optimization design on a generated countermeasure network according to sample decoding data and false decoding data to achieve the effect of network training on the generated countermeasure network, stopping training on the generated countermeasure network when judging that the generated countermeasure network meets a preset ending condition, wherein the preset ending condition can be set according to requirements, for example, the preset ending condition can be used for judging whether the generated countermeasure network reaches preset iteration times or judging whether the generated countermeasure network converges or not so as to judge whether to stop network training of the generated countermeasure network.
Specifically, in this step, during the network training process of the generated countermeasure network, the purpose of the generator is to generate real data as much as possible to deception the discriminator, and the purpose of the discriminator is to distinguish the data generated by the generator from the real data as much as possible, so that a dynamic "game process" is formed between the generator and the discriminator, so that the final game result is that the generator generates a picture G (z) sufficient for "spurious true", and it is difficult for the discriminator to determine whether the data generated by the generator is real, so D (G (z))=0.5, and when D (G (z))=0.5, it is determined that the generated countermeasure network converges.
Step S50, inputting the medical data to be converted into the combined generation type countermeasure network, and indicating the generation type countermeasure network to generate data according to the medical data to be converted so as to obtain an electronic health case;
when the generated type countermeasure network converges, the authenticity of the electronic health case generated based on the medical data to be converted is higher, and the accuracy of the electronic health case generation is improved.
According to the method, the design of decoding the real sample data and the medical data to be converted by adopting the self-encoder is adopted, so that decoding is carried out after the real sample data and the medical data to be converted are not required to be converted into the picture format, further, the change of structural distribution in the real sample data and the medical data to be converted is prevented, the generated electronic health case is identical to the structural distribution of the medical data to be converted, and the accuracy of generating the electronic health case is improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating an implementation of a method for generating an electronic health case according to another embodiment of the present application. Compared to the embodiment corresponding to fig. 1, the electronic health case generation method provided in this embodiment is further refinement of step S10 in the embodiment corresponding to fig. 1, where step S10 includes:
s11, acquiring real sample data, converting disease information in the real sample data into sample code data according to a disease code list, and performing vector conversion on the sample code data to obtain sample vector data;
the disease coding list is an ICD-9 table, and the corresponding relation between different ICD9 codes and corresponding disease names is stored in the disease coding list, for example, 0703 (ICD 9 code) -acute icteric type viral hepatitis e (disease name), 0091 (ICD 9 code) -acute bacterial enteritis (disease name).
Specifically, in this step, the disease information in the real sample data is converted into sample encoded data according to the disease encoding list, and the sample encoded data is converted into a vector X e V of fixed |c|dimension c The V is c Is sample vector data.
S12, sampling the sample vector data to obtain a sampling vector, and controlling an encoder in the self-encoder to encode the sampling vector to obtain an encoding result;
wherein from V c The sample vector data is randomly sampled with s pieces of data x, and the s pieces of data x are input into an encoder for encoding to obtain an encoding result Enc (x), wherein the value of s can be set according to requirements, for example, the s can be set to 1000, 2000 or 3000.
S13, controlling a decoder in the self-encoder to decode the encoding result to obtain a decoding result, and carrying out loss calculation according to the decoding result to obtain a loss value;
wherein, the decoder is controlled to decode the encoding result Enc (x) to obtain a decoding result Dec (Enc (x)), and the decoding result Dec (Enc (x)) is subjected to loss function calculation to obtain a loss value
Figure BDA0002564158830000091
Alternatively, in this step, the loss function used may be:
Figure BDA0002564158830000092
wherein s is V in the above formula c The value of the sample in the sample vector data,
Figure BDA0002564158830000093
loss value for calculation ∈>
Figure BDA0002564158830000094
x i The decoding result Dec (Enc (x)).
S14, respectively updating parameters of the encoder and the decoder according to the loss value;
wherein, the parameters of the encoder and the decoder can be updated by adopting a gradient descent method (BGD) or a random gradient descent method (SGD) based on the loss value so as to achieve the effect of optimizing the parameters of the encoder and the decoder.
S15, if the self-encoder meets a preset optimization condition, stopping training of the self-encoder;
when the self-encoder is judged to meet the preset optimizing condition, parameter optimization of the self-encoder is stopped, the preset optimizing condition can be set according to requirements, for example, the preset optimizing condition can be that whether the self-encoder reaches the preset iteration times or whether the self-encoder converges or not is judged, so that whether training of the self-encoder is stopped or not is judged.
Specifically, in this step, when it is determined that the loss value is
Figure BDA0002564158830000095
If the self-encoder is less than the loss threshold, the self-encoder is judged to be converged to stop the optimized training of the self-encoder.
S16, if the self-encoder does not meet the preset optimization condition, the sampling of the sample vector data is carried out again until the self-encoder meets the preset optimization condition;
in this embodiment, the self-encoder is designed to perform training according to the real sample data, so that the trained self-encoder can perform dimension reduction (dimensionality reduction) on input data to obtain low-dimension discrete data, and the hidden layer of the self-encoder carries useful features in the real sample data.
Referring to fig. 3, fig. 3 is a flowchart illustrating an implementation of a method for generating an electronic health case according to another embodiment of the present application. Compared to the embodiment corresponding to fig. 1, the electronic health case generation method provided in this embodiment is further refinement of step S30 in the embodiment corresponding to fig. 1, where step S30 includes:
s31, sampling real sample data and false data according to a preset sampling value to obtain real sampling data and false sampling data;
wherein, according to the preset sampling value m, respectively trueV corresponding to real sample data c Sample vector data and dummy data p z Sampling is carried out to correspondingly obtain real sampling data x and false sampling data z.
S32, controlling the decoder to decode the real sampling data and the false sampling data respectively to obtain a sample decoding result and a false decoding result;
wherein the control decoder decodes the true sample data x and the false sample data z to obtain D (x) i ) Sample decoding results;
specifically, in this step, the dummy sample data z is input to a generator to obtain the generated data G (z), and the generated data G (z) is input to a decoder to be decoded to obtain a dummy decoding result Dec (G (z)).
Specifically, the optimizing the weight parameter of the generated countermeasure network according to the sample decoding data and the false decoding data includes:
performing weight parameter optimization on the discriminator in the generated countermeasure network according to the sample decoding data and the false decoding data;
optimizing weight parameters of generators in the generated countermeasure network according to the sample decoding data and the false decoding data;
in this embodiment, a first optimization formula adopted for performing weight parameter optimization on the discriminator in the generated countermeasure network according to the sample decoding data and the dummy decoding data is:
Figure BDA0002564158830000101
Figure BDA0002564158830000102
θ d =clip(θ d ,-c,c);
wherein, in the formula, alpha is learning rate and RMSProp is optimizationAlgorithm, clip is intercept function, c is intercept fixed value in intercept function, z i For the dummy decoded data, x i Decoding data for the samples, m being the preset sample value, D (x i ) Decoding the probability of the data being the true sample data for the sample, G (z i ) The first optimization formula is used for calculating a loss function value in the discriminator for the data generated after inputting the dummy decoded data into the generator
Figure BDA0002564158830000111
The loss function value->
Figure BDA0002564158830000112
Weight θ for the discriminator d And updating the numerical value.
In addition, a second optimization formula adopted for optimizing weight parameters of the generators in the generated countermeasure network according to the sample decoding data and the false decoding data is as follows:
Figure BDA0002564158830000113
Figure BDA0002564158830000114
wherein alpha is learning rate, RMSProp is optimization algorithm, z i For the dummy decoded data, x i Decoding the data for the samples, m being the preset sample value, the second optimization formula being used to calculate a loss function value in the generator
Figure BDA0002564158830000115
The loss function value->
Figure BDA0002564158830000116
For weights theta for the generator g And updating the numerical value.
Referring to fig. 4, in an alternative embodiment, the generator may be built by using a compression and Excitation network (SENET) -residual network (Residual Networks, resNets) module, where the modules include a residual network, a compression layer (squeez), a weight Excitation layer (specification), and a weight weighting layer in sequence.
Specifically, in this embodiment, global Average Pooling (GAP for short, global pooling layer) is adopted by the compression layer, the generator performs feature compression on the input noise data through the compression layer, each two-dimensional feature channel is changed into a real number, the real number has a global receptive field, the output dimension is matched with the number of the input feature channels, so as to represent the global distribution of the response on the feature channels, and the layer close to the input layer can obtain the global receptive field.
The weight excitation layer comprises two full-Connected layers (full Connected layers) to form a Bottleneck layer (Bottleneck) structure to model the correlation among channels, and outputs the same number of weights as the input features, firstly, the feature dimension is reduced to 1/16 of the input, and then the feature dimension is activated by a ReLu activation function and then is raised back to the original dimension by the full-Connected layers. The method has the advantages compared with the method directly using a full connection layer: 1) The method has more nonlinearity, and can better fit complex correlation among channels; 2) The number of parameters and the calculation amount are greatly reduced.
In this embodiment, the weighting layer uses a Sigmoid function, obtains normalized weights between 0 and 1 through one Sigmoid function, and finally weights the normalized weights to the features of each channel through scaling operation (Scale operation).
In the embodiment, the identifier and the generator are subjected to parameter optimization by adopting the Wasserstein GAN algorithm, so that the stability of the generated type countermeasure network training is effectively improved, the singleness of generated data of the generator is reduced, the diversity of virtual samples is improved, the construction is performed by adopting a mode of compressing and exciting a network-residual network module, the calculation accuracy of the generated type countermeasure network is effectively improved, the SENET design is introduced into the generator, and the data generation effect of the generated type countermeasure network is improved.
In all embodiments of the present application, the corresponding electronic health case is generated based on the medical data to be converted, in particular, the electronic health case is obtained by data generation of the medical data to be converted, such as the generation type countermeasure network. Uploading electronic health cases to the blockchain can ensure their security and fair transparency to the user. The user device may download the electronic health case from the blockchain to verify if the electronic health case has been tampered with. The blockchain referred to in this example is a novel mode of application for computer technology such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Referring to fig. 5, fig. 5 is a block diagram of an electronic health case generating device 100 according to an embodiment of the present application. The electronic health case generation device 100 in this embodiment includes units for performing the steps in the embodiments corresponding to fig. 1 to 3. Please refer to fig. 1 to 3 and the related descriptions in the embodiments corresponding to fig. 1 to 3. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 5, the electronic health case generation apparatus 100 includes: a self-encoder training unit 10, a data generating unit 11, a data decoding unit 12, a parameter optimizing unit 13 and a medical record generating unit 14, wherein:
the self-encoder training unit 10 is used for acquiring real sample data and training the self-encoder according to the real sample data;
a data generating unit 11, configured to obtain preset noise data, and input the preset noise data into a generating type countermeasure network to generate data, so as to obtain false data;
a data decoding unit 12, configured to control the trained self-encoder to decode the real sample data and the dummy data, so as to obtain sample decoded data and dummy decoded data;
a parameter optimization unit 13, configured to perform weight parameter optimization on the generated type countermeasure network according to the sample decoding data and the dummy decoding data until the generated type countermeasure network meets a preset end condition, and combine the trained self-encoder into the generated type countermeasure network after parameter optimization;
the medical record generating unit 14 is configured to input the medical data to be converted into the combined generated countermeasure network, and instruct the generated countermeasure network to perform data generation according to the medical data to be converted, so as to obtain an electronic health case.
As an embodiment of the present application, the self-encoder training unit 10 is further configured to: converting disease information in the real sample data into sample code data according to a disease code list, and performing vector conversion on the sample code data to obtain sample vector data;
sampling the sample vector data to obtain a sampling vector, and controlling an encoder in the self-encoder to encode the sampling vector to obtain an encoding result;
controlling a decoder in the self-encoder to decode the encoding result to obtain a decoding result, and performing loss calculation according to the decoding result to obtain a loss value;
and respectively updating parameters of the encoder and the decoder according to the loss value.
If the self-encoder meets the preset optimization condition, stopping training of the self-encoder;
as an embodiment of the present application, the self-encoder training unit 10 is further configured to: and if the self-encoder does not meet the preset optimization condition, re-sampling the sample vector data until the self-encoder meets the preset optimization condition.
As an embodiment of the present application, the data decoding unit 12 is further configured to: respectively sampling real sample data and false data according to a preset sampling value to obtain real sampling data and false sampling data;
and controlling the decoder to decode the real sampling data and the false sampling data respectively to obtain a sample decoding result and a false decoding result.
As an embodiment of the present application, the parameter optimization unit 13 is further configured to:
performing weight parameter optimization on the discriminator in the generated countermeasure network according to the sample decoding data and the false decoding data;
and optimizing weight parameters of generators in the generating type countermeasure network according to the sample decoding data and the false decoding data.
As an embodiment of the present application, the first optimization formula adopted in the parameter optimization unit 13 for performing weight parameter optimization on the discriminator in the generated countermeasure network according to the sample decoding data and the dummy decoding data is:
Figure BDA0002564158830000141
Figure BDA0002564158830000142
θ d =clip(θ d ,-c,c);
wherein alpha is the learning rate, RMSProp is the optimization algorithm, clip is the intercept function, c is the intercept fixed value in the intercept function, z i For the dummy decoded data, x i Decoding data for the samples, m being the preset sample value, D (x i ) Decoding the probability of the data being the true sample data for the sample, G (z i ) The first optimization formula is used for calculating a loss function value in the discriminator for the data generated after inputting the dummy decoded data into the generator
Figure BDA0002564158830000143
The loss function value
Figure BDA0002564158830000144
Weight θ for the discriminator d And updating the numerical value.
As an embodiment of the present application, in the parameter optimization unit 13, a second optimization formula adopted for performing weight parameter optimization on the generator in the generated countermeasure network according to the sample decoding data and the dummy decoding data is:
Figure BDA0002564158830000145
Figure BDA0002564158830000146
wherein alpha is learning rate, RMSProp is optimization algorithm, z i For the dummy decoded data, x i Decoding the data for the samples, m being the preset sample value, the second optimization formula being used to calculate a loss function value in the generator
Figure BDA0002564158830000147
The loss function value->
Figure BDA0002564158830000148
For weights theta for the generator g And updating the numerical value.
As can be seen from the above, in the electronic health case generating device 100 provided in this embodiment, by adopting the design of decoding the real sample data and the medical data to be converted in the self-encoder manner, decoding is not required after the real sample data and the medical data to be converted are converted into the picture format, so that the change of the structural distribution in the real sample data and the medical data to be converted is prevented, the generated electronic health case is identical to the structural distribution of the medical data to be converted, and the accuracy of generating the electronic health case is improved.
Fig. 6 is a block diagram of a terminal device 2 according to another embodiment of the present application. As shown in fig. 6, the terminal device 2 of this embodiment includes: a processor 20, a memory 21 and a computer program 22 stored in said memory 21 and executable on said processor 20, for example a program of an electronic health case generating method. The steps in the embodiments of the above-described respective electronic health case generation method are implemented by the processor 20 when executing the computer program 22, for example, S10 to S50 shown in fig. 1, or S11 to S16 and S31 to S32 shown in fig. 2 and 3. Alternatively, the processor 20 may implement the functions of each unit in the embodiment corresponding to fig. 5, for example, the functions of the units 10 to 14 shown in fig. 5, when executing the computer program 22, and the detailed description of the embodiment corresponding to fig. 6 will be referred to herein, which is omitted.
Illustratively, the computer program 22 may be partitioned into one or more units that are stored in the memory 21 and executed by the processor 20 to complete the present application. The one or more units may be a series of computer program instruction segments capable of performing a specific function for describing the execution of the computer program 22 in the terminal device 2. For example, the computer program 22 may be divided into a structured analysis unit 10, a program adding unit 11 and a data merging unit 12, and a synchronous display unit 13, each unit functioning specifically as described above.
The terminal device may include, but is not limited to, a processor 20, a memory 21. It will be appreciated by those skilled in the art that fig. 6 is merely an example of the terminal device 2 and does not constitute a limitation of the terminal device 2, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the terminal device may further include an input-output device, a network access device, a bus, etc.
The processor 20 may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 21 may be an internal storage unit of the terminal device 2, such as a hard disk or a memory of the terminal device 2. The memory 21 may be an external storage device of the terminal device 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device 2. Further, the memory 21 may also include both an internal storage unit and an external storage device of the terminal device 2. The memory 21 is used for storing the computer program as well as other programs and data required by the terminal device. The memory 21 may also be used for temporarily storing data that has been output or is to be output.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (9)

1. A method for generating an electronic health case, comprising:
acquiring real sample data, and training a self-encoder according to the real sample data; the training of the self-encoder according to the real sample data comprises the following steps: converting disease information in the real sample data into sample code data according to a disease code list, and performing vector conversion on the sample code data to obtain sample vector data; sampling the sample vector data to obtain a sampling vector, and controlling an encoder in the self-encoder to encode the sampling vector to obtain an encoding result; controlling a decoder in the self-encoder to decode the encoding result to obtain a decoding result, and performing loss calculation according to the decoding result to obtain a loss value; respectively updating parameters of the encoder and the decoder according to the loss value;
acquiring preset noise data, inputting the preset noise data into a generating type countermeasure network to generate data, and obtaining false data;
the trained self-encoder is controlled to decode the real sample data and the false data to obtain sample decoded data and false decoded data;
performing weight parameter optimization on the generated countermeasure network according to the sample decoding data and the false decoding data until the generated countermeasure network meets a preset ending condition, and merging the trained self-encoder into the generated countermeasure network with optimized parameters;
and inputting the medical data to be converted into the combined generation type countermeasure network, and indicating the generation type countermeasure network to generate data according to the medical data to be converted, so as to obtain the electronic health case.
2. The electronic health case generation method of claim 1, wherein after the parameter updating of the encoder and the decoder according to the loss value, respectively, further comprises:
if the self-encoder meets the preset optimization condition, stopping training of the self-encoder;
and if the self-encoder does not meet the preset optimization condition, re-sampling the sample vector data until the self-encoder meets the preset optimization condition.
3. The electronic health case generation method of claim 1 wherein the control trained self-encoder decodes the real sample data and the dummy data to obtain sample decoded data and dummy decoded data, comprising:
respectively sampling real sample data and false data according to a preset sampling value to obtain real sampling data and false sampling data;
the decoder is controlled to decode the real sampling data and the false sampling data respectively to obtain a sample decoding result and a false decoding result;
specifically, the optimizing the weight parameter of the generated countermeasure network according to the sample decoding data and the false decoding data includes:
performing weight parameter optimization on the discriminator in the generated countermeasure network according to the sample decoding data and the false decoding data;
and optimizing weight parameters of generators in the generating type countermeasure network according to the sample decoding data and the false decoding data.
4. The electronic health case generation method of claim 3 wherein a first optimization formula employed for weight parameter optimization of discriminators in the generated countermeasure network from the sample decoded data and the spurious decoded data is:
Figure FDA0004206358390000031
Figure FDA0004206358390000032
θ d =clip(θ d ,-c,c);
wherein alpha is the learning rate, RMSProp is the optimization algorithm, clip is the intercept function, c is the intercept fixed value in the intercept function, z i For the dummy decoded data, x i Decoding data for the samples, m being the preset sample value, D (x i ) Decoding the samplesProbability of data being the real sample data, G (z i ) The first optimization formula is used for calculating a loss function value in the discriminator for the data generated after inputting the dummy decoded data into the generator
Figure FDA0004206358390000033
The loss function value->
Figure FDA0004206358390000034
Weight θ for the discriminator d And updating the numerical value.
5. The electronic health case generation method of claim 3 wherein a second optimization formula employed for weight parameter optimization of a generator in the generated countermeasure network from the sample decoded data and the spurious decoded data is:
Figure FDA0004206358390000035
Figure FDA0004206358390000036
wherein alpha is learning rate, RMSProp is optimization algorithm, z i For the dummy decoded data, m is the preset sample value, G (z i ) To input the dummy decoded data into the data generated after the generator, D (G (Z) i ) G (z) i ) For the probability of the real sample data, the second optimization formula is used to calculate a loss function value in the generator
Figure FDA0004206358390000037
The loss function value->
Figure FDA0004206358390000038
For the purpose of the raw materialsWeight value theta of former g And updating the numerical value.
6. The electronic health case generation method of claim 1, further comprising:
uploading the electronic health case into a blockchain.
7. An electronic health case generation device, comprising:
the self-encoder training unit is used for acquiring real sample data and training the self-encoder according to the real sample data; the training of the self-encoder according to the real sample data comprises the following steps: converting disease information in the real sample data into sample code data according to a disease code list, and performing vector conversion on the sample code data to obtain sample vector data; sampling the sample vector data to obtain a sampling vector, and controlling an encoder in the self-encoder to encode the sampling vector to obtain an encoding result; controlling a decoder in the self-encoder to decode the encoding result to obtain a decoding result, and performing loss calculation according to the decoding result to obtain a loss value; respectively updating parameters of the encoder and the decoder according to the loss value;
the data generation unit is used for acquiring preset noise data, inputting the preset noise data into the generation type countermeasure network for data generation, and obtaining false data;
the data decoding unit is used for controlling the trained self-encoder to decode the real sample data and the false data to obtain sample decoded data and false decoded data;
the parameter optimization unit is used for optimizing weight parameters of the generated countermeasure network according to the sample decoding data and the false decoding data until the generated countermeasure network meets a preset ending condition, and merging the trained self-encoder into the generated countermeasure network with optimized parameters;
and the medical record generation unit is used for inputting the medical data to be converted into the combined generation type countermeasure network and indicating the generation type countermeasure network to generate data according to the medical data to be converted so as to obtain the electronic health case.
8. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 6 when the computer program is executed.
9. A storage medium storing a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.
CN202010617099.5A 2020-06-30 2020-06-30 Electronic health case generation method, device, terminal equipment and storage medium Active CN111768826B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010617099.5A CN111768826B (en) 2020-06-30 2020-06-30 Electronic health case generation method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010617099.5A CN111768826B (en) 2020-06-30 2020-06-30 Electronic health case generation method, device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111768826A CN111768826A (en) 2020-10-13
CN111768826B true CN111768826B (en) 2023-06-27

Family

ID=72724367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010617099.5A Active CN111768826B (en) 2020-06-30 2020-06-30 Electronic health case generation method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111768826B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756894B (en) * 2022-06-15 2022-08-23 北京中科开迪软件有限公司 Electronic image archive protection method and system based on optical disk library

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108550118A (en) * 2018-03-22 2018-09-18 深圳大学 Fuzzy processing method, device, equipment and the storage medium of motion blur image
CN110032931A (en) * 2019-03-01 2019-07-19 阿里巴巴集团控股有限公司 Generate confrontation network training, reticulate pattern minimizing technology, device and electronic equipment
WO2019157435A1 (en) * 2018-02-12 2019-08-15 Rensselaer Polytechnic Institute Ct big data from simulation, emulation and transfer learning

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10624558B2 (en) * 2017-08-10 2020-04-21 Siemens Healthcare Gmbh Protocol independent image processing with adversarial networks
US11557390B2 (en) * 2018-04-30 2023-01-17 Elekta, Inc. Radiotherapy treatment plan modeling using generative adversarial networks
US11423282B2 (en) * 2018-10-30 2022-08-23 Huawei Technologies Co., Ltd. Autoencoder-based generative adversarial networks for text generation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019157435A1 (en) * 2018-02-12 2019-08-15 Rensselaer Polytechnic Institute Ct big data from simulation, emulation and transfer learning
CN108550118A (en) * 2018-03-22 2018-09-18 深圳大学 Fuzzy processing method, device, equipment and the storage medium of motion blur image
CN110032931A (en) * 2019-03-01 2019-07-19 阿里巴巴集团控股有限公司 Generate confrontation network training, reticulate pattern minimizing technology, device and electronic equipment

Also Published As

Publication number Publication date
CN111768826A (en) 2020-10-13

Similar Documents

Publication Publication Date Title
CN111695674B (en) Federal learning method, federal learning device, federal learning computer device, and federal learning computer readable storage medium
Zheng et al. Gan-based key secret-sharing scheme in blockchain
CN112259246B (en) Disease prediction method integrating medical concept hierarchy structure and related equipment
CN109698017B (en) Medical record data generation method and device
CN112529767B (en) Image data processing method, device, computer equipment and storage medium
CN112435755A (en) Disease analysis method, disease analysis device, electronic device, and storage medium
CN111768826B (en) Electronic health case generation method, device, terminal equipment and storage medium
CN113223502B (en) Speech recognition system optimization method, device, equipment and readable storage medium
CN111967581B (en) Method, device, computer equipment and storage medium for interpreting grouping model
CN113470672A (en) Voice enhancement method, device, equipment and storage medium
EP3893159A1 (en) Training a convolutional neural network
CN116821113A (en) Time sequence data missing value processing method and device, computer equipment and storage medium
CN117058088A (en) Intelligent contract and self-attention-based COVID-19 focus prediction system
CN116313148A (en) Drug sensitivity prediction method, device, terminal equipment and medium
CN116777646A (en) Artificial intelligence-based risk identification method, apparatus, device and storage medium
CN115914488A (en) Medical image identity confusion sharing method and system, terminal equipment and storage medium
Arora et al. Cryptography and Tay-Grey wolf optimization based multimodal biometrics for effective security
Gunasekar et al. Authentic cloud-biometric signature verification system for healthcare data management
CN113436682B (en) Risk group prediction method and device, terminal equipment and storage medium
JP7434291B2 (en) System and method for performing identity authentication based on de-identified data
Wang et al. VAE-Driven Multimodal Fusion for Early Cardiac Disease Detection
CN116821341A (en) Text classification method and device, medium and electronic device
CN116168043A (en) Image segmentation method, device, equipment and storage medium
CN114372889A (en) Method and device for monitoring underwriting, computer equipment and storage medium
CN116629901A (en) Request processing method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220921

Address after: Room 2601 (Unit 07), Qianhai Free Trade Building, No. 3048, Xinghai Avenue, Nanshan Street, Qianhai Shenzhen-Hong Kong Cooperation Zone, Shenzhen, Guangdong 518000

Applicant after: Shenzhen Ping An Smart Healthcare Technology Co.,Ltd.

Address before: 1-34 / F, Qianhai free trade building, 3048 Xinghai Avenue, Mawan, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong 518000

Applicant before: Ping An International Smart City Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant