ECG Signal Processing Method, Device, Equipment and Storage Medium

By using the data generation model in the electrocardiogram signal processing to generate new electrocardiogram abnormal data, combining the original training set to form a new training set, and using a bandpass filter for feature extraction, the problems of insufficient feature extraction capabilities and insufficient data expression in the existing technology central electrical signal processing are solved, and more efficient and accurate electrocardiogram classification model training is achieved.

CN115067963BActive Publication Date: 2025-06-24TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210468734.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-06-24
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

The prior art central central electrical signal processing has problems such as insufficient feature extraction capability and insufficient data expressivity, especially when processing unbalanced data sets, the model produces a biased fit to the data distribution.

Method used

By obtaining the original ECG data from the open database, selecting the ECG data for training the data generation model, generating new ECG data, and combining it with the original training set to form a new training set. Feature extraction and data generation are used to enhance data expressiveness and feature extraction capabilities using a convolutional neural model based on bandpass filters.

Benefits of technology

It solves the problem of data imbalance, enhances data expressivity, improves the training effect and accuracy of the electrocardiogram classification model, improves feature extraction capabilities, and promotes better training effects of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115067963B_ABST
    Figure CN115067963B_ABST
Patent Text Reader

Abstract

The present application provides a method, apparatus, device and storage medium for electrocardiogram signal processing. The method includes: obtaining an original training set from an open database, where the original training set includes a plurality of electrocardiogram data; obtaining at least two electrocardiogram abnormal data from the plurality of electrocardiogram data, and inputting the electrocardiogram abnormal data into a data generation model to obtain new electrocardiogram abnormal data, where the data generation model is a convolutional neural model based on a band-pass filter as an encoder; obtaining a new training set according to the new electrocardiogram abnormal data and the original training set; and performing classification training on an electrocardiogram classification model according to the new training set to obtain a trained electrocardiogram classification model. The method of the present application improves the feature extraction ability, data representation ability and classification accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electrocardiology technology, and in particular, to an electrocardiogram signal processing method, device, equipment and storage medium. Background Art

[0002] Cardiovascular diseases have always been the primary diseases seriously endangering people's physical health and one of the important inducements leading to the death of residents. Therefore, the importance of timely diagnosis and treatment of cardiovascular diseases is self-evident. When diagnosing cardiovascular-related diseases, electrocardiogram (ECG) has always been one of the quickest and most commonly used indicators for detecting heart diseases. Patients with various cardiovascular diseases often experience arrhythmia before the onset of the disease. Therefore, using electrocardiogram signals as the diagnostic basis can directly obtain the heart rate of patients, which is conducive to the early diagnosis and treatment of various cardiovascular diseases.

[0003] With the continuous development of deep learning, models for using electrocardiogram signals to complete arrhythmia detection and classification emerge in an endless stream. Utilizing the powerful feature extraction ability of neural networks, deep learning models can relatively accurately classify the types of arrhythmia in electrocardiogram signals. However, the "depth" of deep learning models results in their often large model sizes, and such a large number of parameters require more data for training to achieve ideal results. Although there are many open-source datasets in the academic community, sharing a large number of electrocardiogram signals measured from real patients, the characteristics of electrocardiogram signals determine that even for patients with corresponding diseases, the majority of heartbeats in their electrocardiogram signals are normal heartbeats, and abnormal heartbeats are always sporadic. Therefore, from a macroscopic perspective, electrocardiogram signal datasets often have a serious imbalance problem, that is, the amount of data under normal classification is very high, but the amount of data under relative abnormal classification is small. This causes the model to have a biased fit to the data distribution during learning. Therefore, the existing technology has problems of insufficient feature extraction ability and insufficient data representation ability. Summary of the Invention

[0004] This application provides an electrocardiogram signal processing method, device, equipment and storage medium to solve the problems of insufficient feature extraction ability and insufficient data representation ability in the existing technology.

[0005] In a first aspect, this application provides an electrocardiogram data processing method, including:

[0006] Obtaining an original training set from an open database, where the original training set includes multiple electrocardiogram data;

[0007] Obtaining at least two electrocardiogram abnormal data from the multiple electrocardiogram data, and inputting the electrocardiogram abnormal data into a data generation model to obtain new electrocardiogram abnormal data, where the data generation model is a convolutional neural model based on a band-pass filter as an encoder;

[0008] Obtain a new training set based on the new electrocardiogram (ECG) abnormal data and the original training set;

[0009] Perform classification training on the ECG classification model according to the new training set to obtain a trained ECG classification model.

[0010] In a possible implementation, the data generation model includes:

[0011] A band-pass filter for extracting feature data from the ECG abnormal data by band-pass filtering;

[0012] A processing module for obtaining the mean and variance of the feature data and obtaining the normal distribution data of the feature data according to the mean and variance;

[0013] A decoder for sampling the normal distribution data and decoding the sampled data to obtain decoded ECG abnormal data.

[0014] In a possible implementation, the data generation model further includes: a first time-frequency transformation module and a second time-frequency transformation module; where

[0015] The first time-frequency transformation module is used for performing time-frequency transformation on the ECG abnormal data and inputting the time-frequency transformed data into the band-pass filter;

[0016] The second time-frequency transformation module is used for performing inverse time-frequency transformation on the decoded ECG abnormal data to obtain the new ECG abnormal data.

[0017] In a possible implementation, the band-pass filter extracts feature data by the method shown in the following formula;

[0018]

[0019] Where y[n] is the feature data output by the band-pass filter, x[n] is the frequency-domain signal of the ECG abnormal data input to the band-pass filter, * is the convolution operation, n is the frequency-domain interval, f1 is the upper cut-off frequency, f2 is the lower cut-off frequency, sinc is the sinc function, and π is 180 degrees.

[0020] In a possible implementation, before obtaining the new training set according to the new ECG abnormal data and the original training set, the method further includes:

[0021] Obtain a sample training set and a test set according to the original training set;

[0022] The obtaining of the new training set according to the new ECG abnormal data and the original training set includes:

[0023] Obtain the new training set according to the new electrocardiogram (ECG) anomaly data and the sample training set.

[0024] In a possible implementation manner, obtaining at least two ECG anomaly data from the multiple ECG data includes:

[0025] Obtain at least two ECG anomaly data from the sample training set.

[0026] In a possible implementation manner, the data generation model is a generative model in an autoencoder model or a generative adversarial network model.

[0027] In a second aspect, the present application provides an ECG signal processing device, including:

[0028] A first acquisition module, configured to obtain an original training set from an open database, where the original training set includes multiple ECG data;

[0029] A processing module, configured to obtain at least two ECG anomaly data from the multiple ECG data, and input the ECG anomaly data into a data generation model to obtain new ECG anomaly data, where the data generation model is a convolutional neural model with a band-pass filter as an encoder;

[0030] A second acquisition module, configured to obtain a new training set according to the new ECG anomaly data and the original training set;

[0031] A training module, configured to perform classification training on an ECG classification model according to the new training set to obtain a trained ECG classification model.

[0032] In a possible implementation manner, the data generation model in the processing module includes:

[0033] A band-pass filter, configured to extract feature data from the ECG anomaly data by means of band-pass filtering;

[0034] A processing module, configured to obtain the mean and variance of the feature data, and obtain the normal distribution data of the feature data according to the mean and variance;

[0035] A decoder, configured to sample the normal distribution data and decode the sampled data to obtain decoded ECG anomaly data.

[0036] In a possible implementation manner, the data generation model in the processing module further includes: a first time-frequency transformation module and a second time-frequency transformation module; where

[0037] The first time-frequency transformation module is configured to perform time-frequency transformation on the ECG anomaly data and input the time-frequency transformed data into the band-pass filter;

[0038] The second time-frequency transformation module is configured to perform an inverse time-frequency transformation on the decoded electrocardiogram abnormal data to obtain the new electrocardiogram abnormal data.

[0039] In a possible implementation manner, the band-pass filter in the processing module is specifically configured to extract feature data by the method shown in the following formula;

[0040]

[0041] Where y[n] is the feature data output by the band-pass filter, x[n] is the frequency-domain signal of the electrocardiogram abnormal data input to the band-pass filter, * is the convolution operation, n is the frequency-domain interval, f1 is the upper cut-off frequency, f2 is the lower cut-off frequency, sinc is the sinc function, and π is 180 degrees.

[0042] In a possible implementation manner, the second acquisition module is specifically configured to: obtain a sample training set and a test set according to the original training set;

[0043] Obtaining the new training set according to the new electrocardiogram abnormal data and the original training set includes:

[0044] Obtaining the new training set according to the new electrocardiogram abnormal data and the sample training set.

[0045] In a possible implementation manner, the first acquisition module is specifically configured to:

[0046] Obtain at least two electrocardiogram abnormal data from the sample training set.

[0047] In a possible implementation manner, the data generation model in the processing module is specifically: an autoencoder model or a generation model in a generative adversarial network model.

[0048] In a third aspect, the present application provides an electrocardiogram signal processing device, including: at least one processor and a memory;

[0049] The memory stores computer execution instructions;

[0050] The at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the electrocardiogram signal processing method as described above.

[0051] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the electrocardiogram signal processing method as described in any one of the above are implemented.

[0052] The electrocardiogram signal processing method, device, equipment and storage medium provided by the present application. The method includes that there are multiple electrocardiogram data in an open database, at least two electrocardiogram data signals are obtained therefrom and input into a data generation model to obtain new electrocardiogram abnormal data; a new training set is obtained according to the new electrocardiogram abnormal data and the original training set; the electrocardiogram classification model is classified and trained according to the new training set to obtain a trained electrocardiogram classification model; the new training set is used as the input feature of the electrocardiogram classification model, making full use of the electrocardiogram abnormal data and enhancing the data expressiveness; the data generation model is a convolutional neural model based on a band-pass filter as an encoder. The band-pass filter is added to the convolutional neural model for feature extraction, enhancing the feature extraction ability, which can improve the training speed of the model and also enable the model to achieve a better training effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application and, together with the specification, are used to explain the principles of the present application.

[0054] Figure 1 It is a framework schematic diagram of an electrocardiogram data processing method provided by an embodiment of the present invention;

[0055] Figure 2 It is a flowchart of an electrocardiogram data processing method provided by an embodiment of the present invention Figure 1 ;

[0056] Figure 3 It is a flowchart of an electrocardiogram data processing method provided by an embodiment of the present invention Figure 2 ;

[0057] Figure 4 It is a structural schematic diagram of a data generation model provided by an embodiment of the present invention Figure 1 ;

[0058] Figure 5 It is a structural schematic diagram of a data generation model provided by an embodiment of the present invention Figure 2 ;

[0059] Figure 6a It is a first feature extraction time domain diagram of the prior art provided by an embodiment of the present invention;

[0060] Figure 6b It is a second feature extraction time domain diagram of the prior art provided by an embodiment of the present invention;

[0061] Figure 6c It is a third feature extraction time domain diagram of the prior art provided by an embodiment of the present invention;

[0062] Figure 7aThe first feature extraction time domain diagram of the method of the present invention provided by the embodiments of the present invention;

[0063] Figure 7b The second feature extraction time domain diagram of the method of the present invention provided by the embodiments of the present invention;

[0064] Figure 7c The third feature extraction time domain diagram of the method of the present invention provided by the embodiments of the present invention;

[0065] Figure 8a The feature superposition diagram of the prior art provided by the embodiments of the present invention;

[0066] Figure 8b The feature superposition diagram of the method of the present invention provided by the embodiments of the present invention;

[0067] Figure 9 The data generation result diagram of different data generation models provided by the embodiments of the present invention;

[0068] Figure 10 A diagram of an electrocardiogram signal processing device provided by the embodiments of the present invention;

[0069] Figure 11 The hardware schematic diagram of electrocardiogram signal processing provided by the embodiments of the present invention.

[0070] Through the above-mentioned drawings, the specific embodiments of the present application have been shown, and more detailed descriptions will be given later. These drawings and text descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Specific Embodiments

[0071] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0072] In the existing technical solutions, generally, a model is established for electrocardiogram data in an open database by using deep learning. From a macroscopic perspective, only using the electrocardiogram data in the open database to establish a training set with a huge amount of data has the problem of data imbalance. Eventually, in the actual application test of the model, if the electrocardiogram data without electrocardiogram abnormality data is tested, then the judgment is basically no problem. However, if the electrocardiogram data with electrocardiogram abnormality data is tested, the test result may still be normal, resulting in inaccurate test results; collecting a large amount of data for learning and training adds a great burden to the neural network model. And when using the existing convolutional neural network for data learning, the collected data signals are often very rough, containing a lot of noise and frequency band information, resulting in insufficient feature extraction performance, and it is difficult to directly see the physical meaning conveyed by the frequency band information from the final test results.

[0073] Therefore, the present invention proposes a new electrocardiogram data processing method. Figure 1 It is a framework schematic diagram of an electrocardiogram data processing method provided by an embodiment of the present invention. As Figure 1 shown, after selecting the original training set from the open database, electrocardiogram abnormality data is also selected from the original training set and sent to the data generation model for data learning and generation to obtain new electrocardiogram abnormality data. The new electrocardiogram abnormality data is added to the original training set to form a new training set. Such a training set processing method solves the problem of data imbalance, can enhance data expressiveness, and can have better training effects and accuracy when performing classification training on the electrocardiogram classification model later; when performing data generation, a new convolutional neural model designed by the method of the present invention is adopted. The convolutional neural model uses a band-pass filter as the encoder of the neural network to perform band-pass filtering on the frequency domain signal of the input electrocardiogram abnormality data, bringing better feature extraction effects. The extracted signal is more regular than the existing neural network, that is, the data generation model of the method of the present invention shows excellent feature extraction ability. The following combines Figure 2 to illustrate the electrocardiogram data processing method.

[0074] Figure 2 It is a flowchart of an electrocardiogram data processing method provided by an embodiment of the present invention. Figure 1 As Figure 2 shown, the method includes:

[0075] S201. Obtain an original training set from an open database, where the original training set includes a plurality of electrocardiogram data.

[0076] An open database can be any open-to-use database including historical electrocardiogram data. For example, the open database can be the MIT-BIH Arrhythmia Database, the AHA Database, and the ST-T Electrocardiogram Database. An original training set is obtained from the open database. The original training set includes normal electrocardiogram data and abnormal electrocardiogram data, that is, the original training set is a training set that has not been balanced in the prior art. If the original training set is directly used for training, there will be a situation of training deviation. Therefore, the original training set needs to be further processed subsequently.

[0077] S202. Obtain at least two abnormal electrocardiogram data from the multiple electrocardiogram data, and input the abnormal electrocardiogram data into a data generation model to obtain new abnormal electrocardiogram data. The data generation model is a convolutional neural model based on a band-pass filter as an encoder.

[0078] The original training set obtained from the open database includes abnormal electrocardiogram data and normal electrocardiogram data, and the original training set includes multiple training samples. In an embodiment of the present invention, at least two abnormal electrocardiogram data can be selected from all the abnormal electrocardiogram data in the original training set.

[0079] In actual experiments, the number of selected abnormal electrocardiogram data can be adjusted according to experimental requirements. For example, the ratio of abnormal electrocardiogram data to normal electrocardiogram data in the original training set selected from the MIT-BIH electrocardiogram signal dataset can be 1:5. In order to increase the ratio between abnormal electrocardiogram data and normal electrocardiogram data in the original training set, new abnormal electrocardiogram data can be generated based on the abnormal electrocardiogram data through a data generation model. For the specific number of selected abnormal electrocardiogram data, it can be determined based on the ratio of abnormal electrocardiogram data to normal electrocardiogram data. For example, the ratio is increased to 1:4 to determine the number of selected abnormal electrocardiogram data. This embodiment does not make special restrictions on the value.

[0080] Optionally, the selected abnormal electrocardiogram data is input into the data generation model for data learning and generation, so that the input abnormal electrocardiogram data becomes new data that has a mathematical correlation with the input abnormal electrocardiogram data before input, retaining the original data characteristics of the abnormal electrocardiogram data. At the same time, the input abnormal electrocardiogram data also becomes new abnormal electrocardiogram data that can be directly input into the training model for training, which is convenient for classification training as the input of the electrocardiogram classification model.

[0081] Optionally, the data generation model into which the abnormal electrocardiogram data is input is a convolutional neural model based on a band-pass filter as an encoder. The data generation model uses the band-pass filter as an encoder for feature extraction. Further, data generation is performed in the data generation model. Due to the use of the band-pass filter for feature extraction, subsequent data generation is more regular.

[0082] S203. Obtain a new training set based on the new electrocardiogram (ECG) abnormal data and the original training set.

[0083] Merge the new ECG abnormal data and the original training set as the new training set. That is, compared with the original training set, the new training set has an increased amount of abnormal ECG data.

[0084] S204. Perform classification training on the ECG classification model according to the new training set to obtain a trained ECG classification model.

[0085] Specifically, use the new training set to perform classification training on the ECG classification model. For example, label the normal ECG data and abnormal ECG data in the training set, and then train the ECG classification model based on the abnormal ECG data and the corresponding label values (such as 1) and the abnormal ECG data and the corresponding label values (such as 0) to obtain a trained ECG classification model.

[0086] The ECG data processing method provided in this embodiment includes obtaining an original training set from an open database, where the original training set includes multiple ECG data; obtaining at least two abnormal ECG data from the multiple ECG data, and inputting the abnormal ECG data into a data generation model to obtain new abnormal ECG data, where the data generation model is a convolutional neural model based on a band-pass filter as an encoder; obtaining a new training set according to the new abnormal ECG data and the original training set; performing classification training on the ECG classification model according to the new training set to obtain a trained ECG classification model; selecting the original training set on the basis of the existing open database and adding the newly generated abnormal ECG data, which enhances the expressiveness of the data and makes the data more balanced and reliable; using a band-pass filter for feature extraction, which enhances the feature extraction ability of the data generation model and generates data that is more conducive to identification.

[0087] Figure 3 It is a flowchart illustration of an ECG data processing method provided by an embodiment of the present invention. Figure 2 As Figure 3 shown, the method includes:

[0088] S301. Obtain an original training set from an open database, where the original training set includes multiple ECG data.

[0089] S302. Obtain a sample training set and a test set according to the original training set;

[0090] S303. Obtain at least two abnormal ECG data from the sample training set, and input the abnormal ECG data into a data generation model to obtain new abnormal ECG data;

[0091] S304. Obtain the new training set according to the new electrocardiogram abnormal data and the sample training set.

[0092] S305. Perform classification training on the electrocardiogram classification model according to the new training set to obtain a trained electrocardiogram classification model.

[0093] In this embodiment, the original training set can be divided into a sample training set and a test set. Select electrocardiogram abnormal data from the original training set. Further, electrocardiogram abnormal data can be selected from the sample training set of the original training set, and then the electrocardiogram abnormal data is input into the data generation model to obtain new electrocardiogram abnormal data. Combine the new electrocardiogram abnormal data with the sample training set in the original training set to obtain a new training set. Adding new electrocardiogram abnormal data on the original basis can make the originally unbalanced data set more balanced, providing data support for training a good model for the subsequent electrocardiogram classification model.

[0094] The following Figure 4 and Figure 5 are used to illustrate the above data generation model.

[0095] Figure 4 is a schematic diagram of the structure of the data generation model provided by the embodiment of the present invention Figure 1 . As Figure 4 shown, the data generation model includes a band-pass filter 401, a processing module 402, and a decoder 403: Among them,

[0096] The band-pass filter 401 is used to extract feature data from the electrocardiogram abnormal data by means of band-pass filtering.

[0097] Optionally, the input of the band-pass filter is the frequency-domain signal of the electrocardiogram abnormal data, and the output of the band-pass filter is the extracted feature data;

[0098] Optionally, the band-pass filter extracts feature data by the method shown in the following formula;

[0099]

[0100] Among them, y[n] is the feature data output by the band-pass filter, x[n] is the frequency-domain signal of the electrocardiogram abnormal data input into the band-pass filter, * is the convolution operation, n is the frequency-domain interval, f1 is the upper cut-off frequency, f2 is the lower cut-off frequency, sinc is the sinc function, and π is 180 degrees.

[0101] The processing module 402 is used to obtain the mean and variance of the feature data, and obtain the normal distribution data of the feature data according to the mean and variance.

[0102] Optionally, the composition of the normal distribution data includes the mean and variance. The processing module 402 can calculate the mean and variance of each feature data based on the output of the band-pass filter, and establish the normal distribution data of the feature data based on the mean and variance.

[0103] A decoder 403, configured to sample the normal distribution data and decode the sampled data to obtain the decoded electrocardiogram abnormal data.

[0104] Optionally, the number of features included in the normal distribution data processed by the processing module 402 is large. Therefore, further, it is necessary to sample the normal distribution data to reduce the calculation burden of the model, and at the same time, it can also well generate new electrocardiogram abnormal data with a high similarity to the electrocardiogram abnormal data input to the data generation model.

[0105] In this embodiment, it is described that part of the structure of the data generation model includes a band-pass filter, a processing module, and a decoder, and it is described that feature data can be extracted from the electrocardiogram abnormal data by means of band-pass filtering, the mean and variance of the feature data can be obtained through the processing module, and the normal distribution data of the feature data can be obtained according to the mean and variance, and the normal distribution data can be sampled through the decoder, and the sampled data can be decoded to obtain the decoded electrocardiogram abnormal data; these structures can ensure the feature extraction ability and also ensure the data recovery ability.

[0106] Figure 5 Schematic diagram of the structure of the data generation model provided by the embodiment of the present invention Figure 2 As Figure 5 shown, the data generation model further includes:

[0107] A first time-frequency transformation module 501 and a second time-frequency transformation module 502; where

[0108] The first time-frequency transformation module 501 is configured to perform time-frequency transformation on the electrocardiogram abnormal data and input the data after time-frequency transformation into the band-pass filter.

[0109] Optionally, the electrocardiogram abnormal data is a time-domain signal, which is not conducive to the model for data processing. Therefore, time-frequency transformation can be performed before data processing. The method of time-frequency transformation includes performing discrete Fourier transform, and band-pass filtering processing can be performed after transformation.

[0110] The second time-frequency transformation module 502 is configured to perform inverse time-frequency transformation on the decoded electrocardiogram abnormal data to obtain the new electrocardiogram abnormal data.

[0111] Optionally, time-frequency transformation is performed when inputting electrocardiogram abnormal data into the data generation model, and processing is carried out in the frequency domain. For the convenience of observing the data generation effect, the frequency domain signal can be output, or the time domain signal can be output. The method for outputting the time domain signal is to perform inverse time-frequency transformation, and the inverse time-frequency transformation includes inverse discrete Fourier transformation.

[0112] In this embodiment, the electrocardiogram data is processed by performing time-frequency transformation before band-pass filtering and inverse time-frequency transformation after decoding, making full use of its time domain and frequency domain characteristics, which is convenient for the data generation model to process data.

[0113] Next, in combination with the prior art, through Figures 6a to 9 the implementation effect of the above-mentioned inventive method is analyzed.

[0114] Figure 6a This is the first feature extraction time domain diagram of the prior art provided by the embodiment of the present invention; Figure 6b This is the second feature extraction time domain diagram of the prior art provided by the embodiment of the present invention; Figure 6c This is the third feature extraction time domain diagram of the prior art provided by the embodiment of the present invention; Figure 7a This is the first feature extraction time domain diagram of the method of the present invention provided by the embodiment of the present invention; Figure 7b This is the second feature extraction time domain diagram of the method of the present invention provided by the embodiment of the present invention; Figure 7c This is the third feature extraction time domain diagram of the method of the present invention provided by the embodiment of the present invention. As Figures 6a to 7c shown, in the embodiment of the present invention, the differences between the prior art and the method of the present invention are reflected from two aspects of time domain and frequency domain of feature extraction. It can be seen that the features extracted in the prior art are rough, including multiple noises and multiple frequency band patterns, appearing very messy, while the features extracted by the method of the present invention are more regular.

[0115] Figure 8a This is the feature superposition diagram of the prior art provided by the embodiment of the present invention; Figure 8b This is the feature superposition diagram of the method of the present invention provided by the embodiment of the present invention.

[0116] As Figures 8a to 8b shown, by respectively superimposing the frequency domain feature information in Figures 6a to 7c , it can be seen that the features of the prior art are still messy, while there is an obvious peak in the image of the method of the present invention, and this frequency band exactly corresponds to the frequency band of the QRS complex. The time length corresponding to the frequency band of the QRS complex can be used to characterize whether the electrocardiogram signal data is abnormal.

[0117] Figure 9 This is the data generation result diagram of different data generation models provided by the embodiment of the present invention. As Figure 9As shown in the figure, the method of the present invention includes that the data generation model is a generative model in an autoencoder model or a generative adversarial network model.

[0118] Figure 9 Among them, the real data is the object generated by the data generation model for learning with the input data; VAE (Variational Autoencoder) is an autoencoder model; GAN (Generative Adversarial Nets) is a generative adversarial network model; DCT-VAE is a model that replaces the generative model with the data generation model in the present invention method according to the VAE model; DCT-GAN is a model that replaces the generative model with the data generation model in the present invention method according to the GAN model; the S category represents supraventricular ectopic beats, and the F category represents fusion beats; the area circled by the dashed box is the feature representation area;

[0119] by Figure 9 It can be seen that in the prior art, including the VAE model and the GAN model, there are obvious differences between the data they generate and the real data; the data generated by the method of the present invention has smaller differences, stronger data expressiveness, and higher accuracy in subsequent training of the input classification model; compared with the prior art, the classification accuracy of the method of the present invention can be increased by 3% - 4%.

[0120] In summary, through the way of image analysis, this embodiment intuitively shows the progress of the method of the present invention in terms of feature extraction ability, data expressiveness, and training accuracy.

[0121] The embodiment of the present invention also provides a method for processing electrocardiogram signals, including: obtaining electrocardiogram data sent by a terminal; inputting the electrocardiogram data into an electrocardiogram classification model to obtain a classification result output by the electrocardiogram classification model.

[0122] Specifically, inputting the electrocardiogram data into the electrocardiogram classification model, and the electrocardiogram classification model gives the result of normal electrocardiogram data or abnormal electrocardiogram data.

[0123] Since the training data of the electrocardiogram classification model in this embodiment is more balanced, the result output by the electrocardiogram classification model is more accurate.

[0124] Figure 10 This is a diagram of an electrocardiogram signal processing device provided by an embodiment of the present invention, as Figure 10 shown, the device includes: a first acquisition module 1001, a processing module 1002, a second acquisition module 1003, and a training module 1004.

[0125] The first acquisition module 1001 is configured to acquire an original training set from an open database, where the original training set includes a plurality of electrocardiogram (ECG) data.

[0126] The processing module 1002 is configured to acquire at least two ECG abnormal data from the plurality of ECG data, and input the ECG abnormal data into a data generation model to obtain new ECG abnormal data. The data generation model is a convolutional neural model based on a band-pass filter as an encoder.

[0127] The second acquisition module 1003 is configured to obtain a new training set according to the new ECG abnormal data and the original training set.

[0128] The training module 1004 is configured to perform classification training on an ECG classification model according to the new training set to obtain a trained ECG classification model.

[0129] Specifically, the data generation model in the processing module 1002 includes:

[0130] A band-pass filter for extracting feature data from the ECG abnormal data by means of band-pass filtering;

[0131] A processing module for obtaining the mean and variance of the feature data, and obtaining normal distribution data of the feature data according to the mean and variance;

[0132] A decoder for sampling the normal distribution data and decoding the sampled data to obtain decoded ECG abnormal data.

[0133] The data generation model in the processing module 1002 further includes: a first time-frequency transformation module and a second time-frequency transformation module; where

[0134] The first time-frequency transformation module is configured to perform time-frequency transformation on the ECG abnormal data and input the time-frequency transformed data into the band-pass filter;

[0135] The second time-frequency transformation module is configured to perform inverse time-frequency transformation on the decoded ECG abnormal data to obtain the new ECG abnormal data.

[0136] The band-pass filter in the processing module 1002 is specifically configured to extract feature data by the method shown in the following formula;

[0137]

[0138] Among them, y[n] is the characteristic data output by the band-pass filter, x[n] is the frequency-domain signal of the electrocardiogram abnormal data input to the band-pass filter, * is the convolution operation, n is the frequency-domain interval, f1 is the upper cut-off frequency, f2 is the lower cut-off frequency, sinc is the sinc function, and π is 180 degrees.

[0139] The data generation model in the processing module 1002 is specifically: an autoencoder model or a generation model in a generative adversarial network model.

[0140] Specifically, the second acquisition module 1003 is specifically used for: obtaining a sample training set and a test set according to the original training set;

[0141] The obtaining of the new training set according to the new electrocardiogram abnormal data and the original training set includes:

[0142] Obtaining the new training set according to the new electrocardiogram abnormal data and the sample training set.

[0143] Specifically, the first acquisition module 1001 is specifically used for:

[0144] Obtaining at least two electrocardiogram abnormal data from the sample training set.

[0145] This application also provides an electrocardiogram signal processing device, including: at least one processor and a memory;

[0146] The memory stores computer execution instructions;

[0147] The at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the electrocardiogram signal processing method.

[0148] Figure 11 It is a hardware schematic diagram of electrocardiogram signal processing provided by an embodiment of the present invention. As Figure 11 shown, the electrocardiogram signal processing device 11 provided in this embodiment includes: at least one processor 1101 and a memory 1102. The device 11 also includes a communication component 1103. Among them, the processor 1101, the memory 1102, and the communication component 1103 are connected through a bus 1104.

[0149] In a specific implementation process, the at least one processor 1101 executes the computer execution instructions stored in the memory 1102, so that the at least one processor 1101 executes the electrocardiogram signal processing method as above.

[0150] For the specific implementation process of the processor 1101, reference can be made to the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here in this embodiment.

[0151] In the aboveFigure 11 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly embodied as being executed and completed by a hardware processor, or by a combination of hardware and software modules in the processor.

[0152] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0153] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.

[0154] This application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the processor executes the computer-executable instructions, the electrocardiogram signal processing method described above is implemented.

[0155] For the above-mentioned computer-readable storage medium, the above-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk or an optical disc. The readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0156] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in a device.

[0157] The division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Additionally, the couplings or direct couplings or communication connections shown or discussed among each other can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0158] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0159] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.

[0160] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks or optical discs that can store program codes.

[0161] Those of ordinary skill in the art can understand that all or part of the steps to implement the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including those of the above method embodiments; and the foregoing storage medium includes: various media such as ROM, RAM, magnetic disk, or optical disc that can store program codes.

[0162] Finally, it should be noted that: After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily think of other embodiments of the present invention. The present invention is intended to cover any variations, uses, or adaptations of the present invention, which follow the general principles of the present invention and include common general knowledge or conventional technical means in the technical field not disclosed in the present invention. It is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.

Claims

1. A method for processing electrocardiogram data, characterized in that, Including: Obtain an original training set from an open database, where the original training set includes a plurality of electrocardiogram (ECG) data; Obtain at least two ECG abnormal data from the plurality of ECG data, and input the ECG abnormal data into a data generation model to obtain new ECG abnormal data. The data generation model is a convolutional neural model with a band-pass filter as the encoder; Obtain a new training set according to the new ECG abnormal data and the original training set; Perform classification training on an ECG classification model according to the new training set to obtain a trained ECG classification model; The data generation model includes: A band-pass filter for extracting feature data from ECG abnormal data by means of band-pass filtering; A processing module for obtaining the mean and variance of the feature data, and obtaining the normal distribution data of the feature data according to the mean and variance; A decoder for sampling the normal distribution data and decoding the sampled data to obtain decoded ECG abnormal data.

2. The method according to claim 1, characterized in that, The data generation model further includes: a first time-frequency transformation module and a second time-frequency transformation module; where The first time-frequency transformation module is used to perform time-frequency transformation on ECG abnormal data and input the data after time-frequency transformation into the band-pass filter; The second time-frequency transformation module is used to perform inverse time-frequency transformation on the decoded ECG abnormal data to obtain the new ECG abnormal data.

3. The method according to claim 2, wherein The band-pass filter extracts feature data by the method shown in the following formula; Among them, is the characteristic data output by the band-pass filter, is the frequency-domain signal of the electrocardiogram abnormal data input to the band-pass filter, is a convolution operation, n is the frequency-domain interval, is the upper cut-off frequency, is the lower cut-off frequency, sinc is the sinc function, and π is 180 degrees.

4. The method according to claim 1, wherein Before obtaining the new training set according to the new ECG abnormal data and the original training set, the method further includes: Obtain a sample training set and a test set according to the original training set; Obtaining the new training set according to the new ECG abnormal data and the original training set includes: Obtain the new training set according to the new ECG abnormal data and the sample training set.

5. The method according to claim 4, wherein Obtaining at least two ECG abnormal data from the plurality of ECG data includes: Obtain at least two ECG abnormal data from the sample training set.

6. The method according to any one of claims 1 to 5, characterized in that, The data generation model is an autoencoder model or a generative model in a generative adversarial network model.

7. A method for processing electrocardiogram data, characterized in that, Including: Obtain the ECG data sent by the terminal; Input the ECG data into an ECG classification model to obtain a classification result output by the ECG classification model; Wherein, the ECG classification model is a model obtained by the method according to any one of claims 1 to 6.

8. An electrocardiogram data processing device, characterized in that, Including: At least one processor and a memory; The memory stores computer execution instructions; The at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the ECG data processing method according to any one of claims 1-7.

9. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the ECG data processing method according to any one of claims 1-7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the ECG data processing method according to any one of claims 1-7 above.

Citation Information

Patent Citations

  • Epilepsy detection method based on generative adversarial network

    CN110575141A

  • Electrocardiosignal identification method based on generative adversarial networks and convolution recurrent neural networks

    CN111990989A