A pulse diagnosis method, device, computer equipment, storage medium and system
By training a pulse diagnosis model using a conditional generative adversarial network algorithm, the problems of training difficulties and inaccurate diagnosis caused by insufficient sample data are solved, and efficient pulse diagnosis results are achieved.
Patent Information
- Application Number
- CN202010976753.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-17
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2040-09-17
AI Technical Summary
Existing pulse diagnosis models trained using neural network algorithms suffer from training difficulties and inaccurate diagnostic results due to insufficient sample data.
A pulse diagnosis model is trained using a conditional generative adversarial network algorithm. Through game optimization between the generator network model and the discriminator network model, samples that closely approximate the real data distribution are generated. The loss function is used to minimize the probability of sample misclassification, thereby improving the model training process.
It improves the diagnostic accuracy of the pulse diagnosis model, reduces the dependence on sample data, avoids the gradient vanishing problem during training, and enhances the model's classification ability.
Smart Images

Figure CN114283933B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of computers, and particularly relates to a pulse diagnosis method, device, computer equipment, storage medium and system. BACKGROUND
[0002] With the improvement of the quality of life and the development of medical technology, people's demand for health services is also getting higher and higher. Traditional Chinese medicine diagnosis is a unique cultural treasure in China, which not only accurately diagnoses and treats diseases, but also has significant contributions to the prevention of diseases. In the history of traditional Chinese medicine diagnosis, pulse wave has always been an important reference index. Using pulse wave to diagnose diseases has the characteristics of non-invasiveness, low risk and low cost, and monitoring the measurable pulse of the human body and determining whether the pulse changes can early detect cardiovascular diseases.
[0003] In the prior art, the model for diagnosing pulse is mostly based on neural network algorithm training, however, the model based on neural network algorithm training often needs a large amount of sample data, and in the field of pulse diagnosis, the process of training the model based on neural network algorithm is very difficult due to the lack of sufficient sample data, and the diagnosis structure is not accurate enough.
[0004] It can be seen that the existing pulse diagnosis model trained by using neural network algorithm still has the technical problems of difficult model training and inaccurate diagnosis results caused by insufficient sample data. SUMMARY
[0005] The purpose of the embodiment of the present application is to provide a pulse diagnosis method, which aims to solve the technical problems of difficult model training and inaccurate diagnosis results caused by insufficient sample data in the existing pulse diagnosis model trained by using neural network algorithm.
[0006] The embodiment of the present application is implemented as follows: a pulse diagnosis method, comprising:
[0007] acquiring a pulse signal;
[0008] determining a pulse diagnosis result according to the pulse signal and a pulse diagnosis model; the pulse diagnosis model is generated by pre-training based on a conditional generative adversarial network algorithm; and the pulse diagnosis model takes minimizing the probability of misclassifying samples as a loss function.
[0009] Another purpose of the embodiment of the present application is to provide a pulse diagnosis device, comprising:
[0010] a pulse information acquisition unit configured to acquire a pulse signal;
[0011] The pulse information diagnosis unit is configured to determine a pulse diagnosis result according to the pulse signal and a pulse diagnosis model, the pulse diagnosis model is generated by a conditional generative adversarial network algorithm, and the pulse diagnosis model is generated by minimizing the probability of misclassification of samples as a loss function.
[0012] Another object of the embodiments of the present application is to provide a computer device comprising a memory and a processor, the memory storing a computer program, and the computer program being executed by the processor to cause the processor to perform the steps of the pulse diagnosis method.
[0013] Another object of the embodiments of the present application is to provide a computer readable storage medium storing a computer program, and the computer program being executed by a processor to cause the processor to perform the steps of the pulse diagnosis method.
[0014] Another object of the embodiments of the present application is to provide a pulse diagnosis system comprising a pulse signal acquisition device, a pulse signal diagnosis device, and a diagnosis result output device, the pulse signal acquisition device is configured to acquire pulse information and send the pulse information to the pulse signal diagnosis device, the pulse signal diagnosis device is configured to diagnose the pulse information according to the pulse diagnosis method, and the pulse diagnosis result is output by the diagnosis result output device.
[0015] The pulse diagnosis method provided by the embodiments of the present application trains a diagnosis model by using a conditional generative adversarial network algorithm, the conditional generative adversarial network algorithm comprises a generator network model and a discriminator network model, in the training process, the generator network model can generate sample data without a large amount of sample data, and the generator network model and the discriminator network model are continuously optimized by game playing, the sample generated by the generator network model is close to the real data distribution, and the classification ability of the discriminator network model for the input sample is continuously improved, thereby effectively improving the accuracy of the pulse diagnosis result of the trained model. In addition, the pulse diagnosis model trained based on the conditional generative adversarial network algorithm minimizes the probability of misclassification of samples as a loss function, which is different from the prior art in which the probability of correct classification of samples is maximized as a loss function, and can effectively solve the technical problem that when the discriminator network model has a high probability distribution for the real sample distribution in the training process, the discriminator network model can easily distinguish the authenticity of the sample, resulting in the disappearance of the gradient received by the generator network model from the discriminator network model and the stop of the entire training process. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 FIG. 1 is a diagram of an application environment of a pulse diagnosis method provided by the embodiments of the present application;
[0017] Figure 2 A step flow chart of a pulse diagnosis method provided for an embodiment of the present application is shown in FIG. 1.
[0018] Figure 3 A step flow chart of another pulse diagnosis method provided for an embodiment of the present application is shown in FIG. 2.
[0019] Figure 4 A step flow chart of training a pulse diagnosis model based on a conditional generative adversarial network algorithm provided for an embodiment of the present application is shown in FIG. 3.
[0020] Figure 5 A step flow chart of training a pulse diagnosis model based on another conditional generative adversarial network algorithm provided for an embodiment of the present application is shown in FIG. 4.
[0021] Figure 6 A step flow chart of optimizing a discriminator network model provided for an embodiment of the present application is shown in FIG. 5.
[0022] Figure 7 A structural schematic diagram of a pulse diagnosis device provided for an embodiment of the present application is shown in FIG. 6.
[0023] Figure 8 A structural schematic diagram of a computer device capable of executing a pulse diagnosis method provided for an embodiment of the present application is shown in FIG. 7. DETAILED DESCRIPTION
[0024] In order to make the objectives, technical solutions and advantages of the present application clearer, further detailed descriptions will be given below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0025] It can be understood that the terms "first", "second", etc. used in the present application can be used herein to describe various elements, but unless specifically stated, these elements are not limited by these terms. These terms are only used to distinguish the first element from another element. For example, without departing from the scope of the present application, the first xx script can be referred to as the second xx script, and similarly, the second xx script can be referred to as the first xx script.
[0026] Figure 1 An application environment diagram of a pulse diagnosis method provided for an embodiment of the present application, which can also be equivalently understood as a structural schematic diagram of a pulse diagnosis system, is shown in FIG. 8. Figure 1 As shown in the application environment diagram, it includes a pulse signal acquisition device 110, a pulse signal diagnosis device 120 and a diagnosis result output device 130.
[0027] In the embodiment of the present application, the pulse signal acquisition device 110 is used to acquire pulse information and send it to the pulse signal diagnosis device 120; the pulse signal acquisition device 120 is used to diagnose the pulse information according to a preset pulse diagnosis method, and output the pulse diagnosis result through the diagnosis result output device 130.
[0028] In the embodiment of the present application, the pulse signal acquisition device 110 usually selects a sensor to realize the acquisition of the pulse signal, specifically including a pressure pulse sensor, pressure pulse wave signal voltage amplification, signal voltage noise filtering, digital-to-analog conversion and signal transmission. The pressure pulse sensor can acquire the pulse wave and output an analog signal; the signal voltage noise filtering can filter out higher frequency interference such as interference and power frequency interference in voltage change; the digital-to-analog conversion can convert the acquired analog signal into a digital signal and send it to the pulse signal diagnosis device to realize the processing of the pulse signal.
[0029] In the embodiment of the present application, the pulse signal diagnosis device 120 can be understood as a hardware setting or a software program with certain data storage capacity and processing capacity, which can be understood as a server program deployed on a server or a client program deployed on a mobile device, wherein the pulse diagnosis model trained based on the conditional generative adversarial network algorithm is pre-installed, and when the pulse signal is input into the pulse diagnosis model, the diagnosis result can be quickly calculated, and the specific implementation process can be referred to the related content of the subsequent Figures 2-6 .
[0030] In the embodiment of the present application, the diagnosis result output device 130 is mainly used to output the diagnosis result to inform the user, which can be understood as a client program deployed on the user's mobile phone, and of course can be notified to the user in other forms, which will not be described here in the present application.
[0031] As shown in Figure 2 , a step flowchart of a pulse diagnosis method provided by the embodiment of the present application, the method is mainly applied to the above-mentioned pulse diagnosis device 120, and specifically includes the following steps:
[0032] Step S202, acquiring a pulse signal.
[0033] In the embodiment of the present application, since the actual pulse signal of the human body is essentially a weak bioelectric signal, it is difficult to collect, and usually a pressure pulse sensor is used to collect the pulse signal, and then a series of amplification, noise filtering, digital-to-analog conversion operations are performed to convert it into a pulse signal that can be recognized and processed by a computer.
[0034] Step S204, determining a pulse diagnosis result according to the pulse signal and the pulse diagnosis model.
[0035] In the embodiment of the present application, the pulse diagnosis model is generated by pre-training based on a conditional generative adversarial network algorithm, and the pulse diagnosis model takes the probability of minimizing the wrong classification of samples as a loss function.
[0036] In the embodiment of the present application, in order to facilitate understanding of the pulse diagnosis model generated by pre-training based on a conditional generative adversarial network algorithm, the algorithm idea of the conditional generative adversarial network algorithm is described in detail first. Since the conditional generative adversarial network algorithm is a conventional algorithm, it is not described in detail here. Those skilled in the art can clearly understand the specific implementation process of the conditional generative adversarial network algorithm by combining the above algorithm idea.
[0037] In the embodiment of the present application, the model trained based on the conditional generative adversarial network algorithm includes two, one is a generator network model, and the other is a discriminator network model. Random noise is input into the generator network model, which can generate generated samples close to real pulse signals. Then the generated samples and real samples (including real pulse signals and their label information) are input into the discriminator network model to judge the classification results (including whether it is a generated sample data and label information) that the model needs to output. The discriminator network model is trained by comparing the difference between the output classification results and the real results to improve the classification ability of the discriminator network model. After the classification ability of the discriminator network model reaches a certain degree (it can output label information and whether it is a generated sample data more accurately), the generation sample ability of the generator network model is trained again, so that the generator network model can reduce the gap between the generated sample and the real sample as much as possible. In this way, through repeated iteration training of the discriminator network model and the generator network model, the sample generated by the generator network model will approach the real data distribution, and the classification ability of the discriminator network model for the input sample will also be continuously improved, thereby ensuring the diagnosis accuracy of the final obtained pulse diagnosis model.
[0038] In the embodiment of the present application, in the training process, if the conventional loss function of the conditional generative adversarial network is used to maximize the probability of correctly classifying samples, at this time, the discriminator network model has a high probability distribution for the real sample distribution, that is, the discriminator network model can easily distinguish the authenticity of the sample, which leads to the disappearance of the gradient received by the generator network model from the discriminator network model, thereby stopping the entire training process. Therefore, in order to ensure that the gradient can be back-propagated to the generator network model when the discrimination accuracy of the discriminator network model is very high, prevent the iteration from being invalid due to the disappearance of the gradient in the training process, and rewrite the loss function of the conditional generative adversarial network as maximizing the probability of correctly classifying samples. The calculation formula of the original loss function is:
[0039]
[0040] The calculation formula of the modified loss function is optimized as follows:
[0041]
[0042]
[0043] In the embodiment of the present application, the specific step flow chart in which the conditional generative adversarial network algorithm is used to pre-train the pulse diagnosis model is shown in Figures 4-6 and the explanation thereof.
[0044] The pulse diagnosis method provided by the embodiment of the present application trains a diagnosis model by using the conditional generative adversarial network algorithm. The conditional generative adversarial network algorithm includes a generator network model and a discriminator network model. In the training process, the generator network model can generate sample data without a large amount of sample data. Meanwhile, the generator network model and the discriminator network model will be continuously optimized through game playing. The sample generated by the generator network model will be close to the real data distribution, and the classification ability of the discriminator network model on the input sample will also be continuously improved, thereby effectively improving the accuracy of the result of the pulse diagnosis of the trained model. In addition, the pulse diagnosis model trained based on the conditional generative adversarial network algorithm minimizes the probability of incorrect classification of the sample as the loss function, which is different from the prior art in which the probability of correct classification of the sample is maximized as the loss function. The conditional generative adversarial network algorithm can effectively solve the technical problem that, in the training process, when the discriminator network model has a high probability distribution on the real sample distribution, the discriminator network model can easily distinguish the authenticity of the sample, resulting in the disappearance of the gradient received by the generator network model from the discriminator network model and thus causing the stop of the entire training process.
[0045] As shown in Figure 3 , the step flow chart of another pulse diagnosis method provided by the embodiment of the present application is shown, and the details are as follows.
[0046] In the embodiment of the present application, the difference between the step flow chart of the pulse diagnosis method shown in Figure 2 and the pulse diagnosis method provided by the embodiment of the present application is that, after the step S202, the method further includes:
[0047] In step S302, the pulse signal is denoised by wavelet transform to generate a denoised pulse signal.
[0048] In the embodiment of the present application, considering that although part of the noise in the pulse signal has been filtered out at the time of acquisition, there are still many random noises mixed in, it is necessary to further denoise the data to enhance the reliability of the signal data and improve the accuracy and precision of the analysis. The wavelet transform has the characteristics of high time-frequency resolution, can analyze in the time-frequency domain while extracting the local signal singularity characteristics. By using the integration of wavelet transform feature extraction and low-pass filter, the time domain signal noise can be effectively filtered out, while the high frequency information can be well preserved, and the time domain signal with better quality can be obtained from the time domain signal containing noise and recovered.
[0049] The step S204 is specifically:
[0050] Step S304, determining a pulse diagnosis result according to the pulse signal after the noise reduction processing and the pulse diagnosis model.
[0051] As Figure 4 shown, a step flow chart for training a pulse diagnosis model based on a conditional generative adversarial network algorithm provided by the embodiment of the present application, specifically comprising the following steps:
[0052] Step S402, constructing an initialized generator network model and a discriminator network model.
[0053] In the embodiment of the present application, the key to training the pulse diagnosis model based on the conditional generative adversarial network algorithm is to construct the generator network model and the discriminator network model, to optimize the sample data generation ability of the generator network model and the classification ability of the discriminator network model on the input data through cyclic alternating training, to ensure the classification ability of the final discriminator network model, so as to accurately classify the input data.
[0054] In the embodiment of the present application, the generator network model and the discriminator network model are both improved on the basis of the existing neural network model. Specifically, the generator network model includes 2 fully connected layers and 4 convolutional layers, batch normalization and activation function are performed after each convolutional layer, and the activation function is LeakeLU function. The batch normalization method can effectively improve the training speed and accelerate the convergence process. The discriminator network model includes 1 convolutional layer, 4 dense blocks (Dense Block), 3 translation layers (Translation layer) and a softmax output function.
[0055] In the embodiment of the present application, the generator network model and the discriminator network model contain a large number of variable parameters, and the training process is a process of continuously optimizing and adjusting the variable parameters, which will not be repeated here.
[0056] Step S404: processing the acquired random noise according to the generator network model to obtain generated sample data.
[0057] In the embodiment of the present application, the random noise is a random noise signal conforming to Gaussian distribution.
[0058] In the embodiment of the present application, the random noise is input into the generator network model, and the generated sample data close to the real pulse signal data distribution is obtained. Obviously, the better the effect of the generator network model is, the closer the generated sample data is to the real pulse signal data distribution.
[0059] Step S406: optimizing the discriminator network model according to the generated sample data and the real sample data with known label information.
[0060] In the embodiment of the present application, the known label information usually includes normal people, mild arteriosclerosis, moderate arteriosclerosis, severe arteriosclerosis, and the like, and can further include other label information.
[0061] In the embodiment of the present application, the optimization process of the generator network model and the optimization process of the discriminator network model are performed in cycles, that is, it can be understood that the classification ability of the discriminator network model is first optimized and improved, and then the sample data generation ability of the generator network model is optimized and improved. When the sample data generation ability of the generator network model is improved, a discriminator network model with stronger classification ability is needed to realize the classification of the generated sample data and the real sample data. The optimization process of the discriminator network model is described in detail in the following Figure 6 , and the optimization process of the generator network model is described in detail in the following step S410 and Figure 5 .
[0062] Step S408: judging whether the discriminator network model meets the preset optimization completion condition. When it is judged that the discriminator network model does not meet the preset optimization completion condition, returning to the step S406; when it is judged that the discriminator network model meets the preset optimization completion condition, executing the step S410.
[0063] In the embodiment of the present application, in combination with the foregoing, it can be known that after the training and optimization of the discriminator network model reach a certain degree, the generator network model needs to be optimized, wherein the preset optimization completion condition can be that the number of training and optimization of the discriminator network model is taken as the condition, for example, after the number of training and optimization of the discriminator network model reaches a certain threshold, it is considered that the optimization completion condition is met, or the classification effect of the discriminator network model is taken as the condition, when the classification effect of the discriminator network model meets a certain condition, it is considered that the optimization completion condition is met, when it is determined that the optimization completion condition is not met, the discriminator network model needs to be further trained, and if the optimization completion condition is met, the conditional generative adversarial network algorithm needs to further train the generator network model, that is, step S410 is executed.
[0064] Step S410, optimizing the generator network model according to the random noise and the real sample data.
[0065] In the embodiment of the present application, the step of optimizing the generator network model can be specifically referred to the subsequent Figure 5 description.
[0066] As Figure 5 shown, another step flow chart of training a pulse diagnosis model based on a conditional generative adversarial network algorithm provided in the embodiment of the present application is provided, and the details are as follows.
[0067] In the embodiment of the present application, the step S410 specifically includes:
[0068] Step S502, processing the random noise to obtain generated sample data according to the generator network model.
[0069] In the embodiment of the present application, the optimization of the generator network model needs to adjust the parameters of the generator network model, so after each optimization, the random noise needs to be processed again to generate sample data under the new generator network model.
[0070] Step S504, determining the feature matching difference between the generated sample data and the real sample data.
[0071] In the embodiment of the present application, the calculation formula of the feature matching difference between the generated sample data and the real sample data is specifically:
[0072]
[0073] Wherein, f represents the feature value of the discriminator intermediate layer, and z represents the input noise. In the training process, the feature matching result is taken as the loss function of the generator network model G, and the loss function is minimized to match the generated sample and the real sample, so that the generator network model G maximizes the fitting of the distribution of the real data.
[0074] In step S506, the generator network model is optimized according to the adaptive moment estimation optimization algorithm of gradient centralization and the feature matching difference.
[0075] In the embodiment of the present application, the adaptive moment estimation optimization algorithm of gradient centralization can not only smooth and accelerate the training process of the model, but also constrain the loss function by introducing a new constraint to the weight vector, which regularizes the weight space and output feature space, thereby improving the generalization performance of the model. In addition, the constrained loss function has better Lipschitz property than the original loss function, making the training process more stable and efficient. The specific formula is:
[0076]
[0077] Wherein w i is the weight vector of the gradient.
[0078] In step S508, it is judged whether the generator network model meets the preset training completion condition. When it is judged that the generator network model meets the preset training completion condition, step S510 is executed; when it is judged that the generator network model does not meet the preset training completion condition, step S512 is executed.
[0079] In the embodiment of the present application, by setting the training completion condition, when the generator network model meets the preset training completion condition, it is considered that the generator network model and the discriminator network model have been trained and the training process is ended.
[0080] In step S510, the discriminator network model is determined as the pulse diagnosis model.
[0081] In the embodiment of the present application, the discriminator network model has the classification ability for the input data, so the discriminator network model is the pulse diagnosis model we need.
[0082] In step S512, it is judged whether the generator network model meets the preset optimization completion condition. When it is judged that the generator network model meets the preset optimization completion condition, the step S306 is returned to; when it is judged that the generator network model does not meet the preset optimization completion condition, the step S502 is returned to.
[0083] In the embodiment of the present application, the adaptive moment estimation optimization algorithm of gradient centralization is combined with Figure 5It can be seen that the optimization of the generator network model and the discriminator network model is a cyclic iteration optimization. When the generator network model does not meet the preset optimization completion condition, the optimization of the generator network model is continued. When the generator network model meets the preset optimization completion condition, the optimization of the discriminator network model is continued, and the cycle is continued until the generator network model meets the preset training completion condition.
[0084] As shown in FIG. 6, a step flow chart for optimizing a discriminator network model is provided in an embodiment of the present application, and specifically includes the following steps: Figure 6
[0085] In step S602, the generator sample data and the real sample data are processed according to the discriminator network model to generate a response classification result.
[0086] In an embodiment of the present application, the response classification result includes whether the sample data is generated in addition to the label information.
[0087] In step S604, a cross-entropy loss value of the response classification result and the label information is determined.
[0088] In an embodiment of the present application, the loss function of the discriminator network is a cross-entropy loss function of a real class label distribution and a predicted class label, and the expression is as follows:
[0089]
[0090] Wherein, x is a real sample, y is a category corresponding to the sample data, x, y ~ P data x ~ G represents that x is taken from the generated sample.
[0091] In step S606, the parameter optimization of the discriminator network model is performed according to a gradient descent optimization algorithm and the cross-entropy loss value.
[0092] In an embodiment of the present application, the stochastic gradient descent optimization algorithm can quickly update the weight in iteration, requires less memory, and can solve the problems of large memory required for model calculation, noisy data, etc.
[0093] As shown in FIG. 7, a structure diagram of a pulse diagnosis device is provided in an embodiment of the present application, and details are as follows. Figure 7
[0094] In an embodiment of the present application, the pulse diagnosis device includes:
[0095] The pulse information acquisition unit 710 is configured to acquire a pulse signal.
[0096] In the embodiment of the present application, since the actual pulse signal of the human body is essentially a weak bioelectric signal, it is difficult to collect, and in general, a pressure pulse sensor is used to collect the pulse signal, which is then converted into a pulse signal recognizable by a computer through a series of amplification, noise filtering and digital-to-analog conversion operations.
[0097] The pulse information diagnosis unit 720 is configured to determine a pulse diagnosis result according to the pulse signal and a pulse diagnosis model.
[0098] In the embodiment of the present application, the pulse diagnosis model is generated by pre-training based on a conditional generative adversarial network algorithm, and the pulse diagnosis model takes the probability of misclassifying a sample as a loss function.
[0099] In the embodiment of the present application, in order to facilitate understanding of the pulse diagnosis model generated by pre-training based on the conditional generative adversarial network algorithm provided by the present application, the algorithm idea of the conditional generative adversarial network algorithm is first specifically and simply described. Since the conditional generative adversarial network algorithm is a conventional algorithm, it is not described in detail here, and those skilled in the art can clearly understand the specific implementation process of the conditional generative adversarial network algorithm in combination with the above algorithm idea.
[0100] In the embodiment of the present application, the model trained based on the conditional generative adversarial network algorithm includes two, one is a generator network model, and the other is a discriminator network model. Random noise is input into the generator network model, which can generate generated samples close to the real pulse signal. Then the generated samples and the real samples (including the real pulse signal and the label information thereof) are input into the discriminator network model, which judges the model to output a classification result (including whether it is a generated sample data and label information). The discriminator network model is trained by comparing the difference between the output classification result and the real result to improve the classification ability of the discriminator network model. After the classification ability of the discriminator network model reaches a certain degree (it can output the label information and whether it is a generated sample data more accurately), the generation sample ability of the generator network model is trained again, so that the generator network model can reduce the gap between the generated sample and the real sample as much as possible. In this way, by repeatedly training the discriminator network model and the generator network model, the sample generated by the generator network model will approach the real data distribution, and the classification ability of the discriminator network model for the input sample will also be continuously improved, thereby ensuring the diagnosis accuracy of the finally obtained pulse diagnosis model.
[0101] In the embodiment of the present application, if a conventional loss function of the conditional generative adversarial network that maximizes the probability of correctly classifying samples is used in the training process, when the discriminator network model has a high probability distribution for the real sample distribution, that is, the discriminator network model can easily distinguish the authenticity of the sample, resulting in the disappearance of the gradient received by the generator network model from the discriminator network model, thereby causing the entire training process to stop. Therefore, in order to ensure that the gradient can be back-propagated to the generator network model when the discrimination accuracy of the discriminator network model is high, prevent the iteration from being invalid due to the disappearance of the gradient during the training process, and maximize the probability of correctly classifying samples, the loss function of the conditional generative adversarial network is rewritten.
[0102] The pulse diagnosis device provided by the embodiment of the present application is trained by using the conditional generative adversarial network algorithm to generate a diagnosis model. The conditional generative adversarial network algorithm includes a generator network model and a discriminator network model. In the training process, the generator network model can generate sample data without a large amount of sample data. Meanwhile, the generator network model and the discriminator network model will continuously optimize through game playing. The sample generated by the generator network model will be close to the real data distribution, and the classification ability of the discriminator network model for the input sample will also be continuously improved, thereby effectively improving the accuracy of the result of the pulse diagnosis of the trained model. In addition, the pulse diagnosis model trained based on the conditional generative adversarial network algorithm provided by the present application uses the probability of incorrectly classifying samples as a loss function, which is different from the loss function of the prior art that maximizes the probability of correctly classifying samples. The technical problem that the training process stops when the discriminator network model has a high probability distribution for the real sample distribution, that is, the discriminator network model can easily distinguish the authenticity of the sample, resulting in the disappearance of the gradient received by the generator network model from the discriminator network model, thereby causing the entire training process to stop, can be effectively solved.
[0103] Figure 8 The internal structure diagram of the computer device in an embodiment is shown. The computer device can be specifically a Figure 1 The middle pulse signal acquisition device 120. As shown in Figure 8As shown in the figure, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system, and can also store a computer program, which, when executed by the processor, can enable the processor to implement the pulse diagnosis method. The computer program can also be stored in the internal memory, and the computer program, when executed by the processor, can enable the processor to execute the pulse diagnosis method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0104] Those skilled in the art can understand that, Figure 8 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0105] In one embodiment, the pulse diagnosis apparatus provided by the present application can be implemented in the form of a computer program, which can run on a computer device as shown in the figure. The memory of the computer device can store various program modules constituting the pulse diagnosis apparatus, such as the pulse information acquisition unit 710 and the pulse information diagnosis unit 720 shown in the figure. The computer program constituted by the various program modules enables the processor to execute the steps in the pulse diagnosis method of each embodiment of the present application described in the specification. Figure 8 Figure 7 The computer device as shown in the figure can execute step S202 through the pulse information acquisition unit 710 in the pulse diagnosis apparatus as shown in the figure; and the computer device can execute step S204 through the pulse information diagnosis unit 720.
[0106] For example, Figure 8 The computer device as shown in the figure can execute step S202 through the pulse information acquisition unit 710 in the pulse diagnosis apparatus as shown in the figure; and the computer device can execute step S204 through the pulse information diagnosis unit 720. Figure 7
[0107] In one embodiment, a computer device is provided, which includes a memory, a processor and a computer program stored on the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
[0108] acquiring a pulse signal;
[0109] determining a pulse diagnosis result according to the pulse signal and a pulse diagnosis model; the pulse diagnosis model is generated in advance based on a conditional generative adversarial network algorithm; and the pulse diagnosis model takes minimizing a probability of misclassifying a sample as a loss function.
[0110] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium has stored thereon a computer program. The computer program, when executed by a processor, causes the processor to perform the following steps:
[0111] obtaining a pulse signal;
[0112] determining a pulse diagnosis result according to the pulse signal and a pulse diagnosis model; the pulse diagnosis model is generated in advance based on a conditional generative adversarial network algorithm; and the pulse diagnosis model takes minimizing a probability of misclassifying a sample as a loss function.
[0113] It should be understood that, although each step in the flowchart of each embodiment of the present application is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least a part of the steps in each embodiment can include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. Moreover, the execution sequence of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least a part of other steps or sub-steps or stages of other steps.
[0114] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer readable storage medium, and when the program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, storage, database or other medium used in each embodiment provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0115] Any combination of the technical features of the above-mentioned embodiments can be combined. In order to make the description simple, all possible combinations of the technical features in the above-mentioned embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0116] The above-mentioned embodiments only express several embodiments of the present application, and the description is more specific and detailed, but it should not be understood as limiting the scope of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
[0117] The above-mentioned is only the preferred embodiment of the present application, and does not limit the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A pulse diagnosis device, characterized in that, include: The pulse information acquisition unit is used to acquire pulse signals; A pulse information diagnosis unit is used to determine the pulse diagnosis result based on the pulse signal and the pulse diagnosis model; the pulse diagnosis model is pre-trained based on a conditional generative adversarial network algorithm; the pulse diagnosis model uses minimizing the probability of misclassifying a sample as the loss function. The pulse signal is denoised by wavelet transform to generate a denoised pulse signal. The model trained based on the conditional generative adversarial network algorithm includes a generator network model and a discriminator network model; The generator network model is used to process random noise to generate sample data. The discriminator network model is used to classify the input generated samples against the real samples; The step of pre-training the pulse diagnosis model based on a conditional generative adversarial network algorithm specifically includes: Construct an initial generator network model and a discriminator network model; The acquired random noise is processed according to the generator network model to obtain generated sample data; Optimizing the discriminator network model based on the generator sample data and real sample data with known label information includes: processing the generator sample data and the real sample data according to the discriminator network model to generate a response classification result; determining the cross-entropy loss value between the response classification result and the label information; and optimizing the parameters of the discriminator network model according to the gradient descent optimization algorithm and the cross-entropy loss value. Determine whether the discriminator network model meets the preset optimization completion conditions; When it is determined that the discriminator network model does not meet the preset optimization completion conditions, the process returns to the step of optimizing the discriminator network model based on the real sample data of the generator sample data and the known label information; When the discriminator network model is determined to meet the preset optimization completion conditions, the generator network model is optimized based on the random noise and real sample data, including: processing the random noise using the generator network model to obtain generated sample data; determining the feature matching differences between the generated sample data and the real sample data; optimizing the generator network model based on the gradient-centered adaptive moment estimation optimization algorithm and the feature matching differences; determining whether the generator network model meets the preset training completion conditions; when the generator network model meets the preset training completion conditions, the discriminator network model is identified as a pulse diagnosis model; when the generator network model does not meet the preset training completion conditions, whether the generator network model meets the preset optimization completion conditions; when the generator network model meets the preset optimization completion conditions, returning to the step of optimizing the discriminator network model based on the generator sample data and real sample data with known label information; when the generator network model does not meet the preset optimization completion conditions, returning to the step of processing the random noise using the generator network model to obtain generated sample data.
2. The pulse diagnosis device according to claim 1, characterized in that, The discriminator network model incorporates a dense block structure.
3. A computer device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the step of generating the pulse diagnostic model as described in any one of claims 1 to 2.
4. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the step of generating the pulse diagnostic model as described in any one of claims 1 to 2.
5. A pulse diagnosis system, characterized in that, The device includes a pulse signal acquisition device, a pulse signal diagnosis device, and a diagnosis result output device. The pulse signal acquisition device is used to acquire pulse information and send it to the pulse signal diagnosis device. The pulse diagnosis device diagnoses the pulse information according to any one of claims 1-2 and outputs the pulse diagnosis result through the diagnosis result output device.
Citation Information
Patent Citations
Modeling strategy searching learning method based on condition generation confrontation network
CN107909153A
Conditional generative adversarial network-based monocular image depth estimation method
CN108564611A
Pulse signal generating method and system based on generative adversarial network
CN109998500A