CN115392319A - Electrocardio abnormality classification method fusing heart dynamics model and antagonistic generation network - Google Patents

Electrocardio abnormality classification method fusing heart dynamics model and antagonistic generation network Download PDF

Info

Publication number
CN115392319A
CN115392319A CN202211079227.0A CN202211079227A CN115392319A CN 115392319 A CN115392319 A CN 115392319A CN 202211079227 A CN202211079227 A CN 202211079227A CN 115392319 A CN115392319 A CN 115392319A
Authority
CN
China
Prior art keywords
model
data
training
heart beat
heartbeat
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211079227.0A
Other languages
Chinese (zh)
Inventor
李亚
罗景皓
戴青云
王小梨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Polytechnic Normal University
Original Assignee
Guangdong Polytechnic Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Polytechnic Normal University filed Critical Guangdong Polytechnic Normal University
Priority to CN202211079227.0A priority Critical patent/CN115392319A/en
Publication of CN115392319A publication Critical patent/CN115392319A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • A61B5/352Detecting R peaks, e.g. for synchronising diagnostic apparatus; Estimating R-R interval
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • A61B5/353Detecting P-waves
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • A61B5/355Detecting T-waves
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • A61B5/358Detecting ST segments
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The invention relates to the technical field of electrocardio abnormity classification, in particular to an electrocardio abnormity classification method fusing a heart dynamics model and an antagonistic generation network. The method comprises the steps of intercepting heart beat data of an acquired electrocardiogram database, constructing a heart beat data set, and dividing a model training set; screening representative data in the heart beat data set, extracting morphological characteristics of the representative data, and determining physical parameters of a heart dynamics model; constructing heart beat data of a heart dynamics model as a training basis of the GAN model; training the constructed GAN model by using a GAN training set and heart beat data of cardiac dynamics; generating data of the unbalanced category by using the optimized GAN model, and merging the data into a training set of a classification model; and (3) training the constructed 1D-Resnet classification model by using a classification model training set, and then identifying and classifying the heartbeat data of unknown classes. The invention can avoid the influence of unbalanced samples on the classification result and can improve the training efficiency and stability of the GAN model.

Description

Electrocardio abnormity classification method fusing cardiac dynamics model and antagonistic generation network
Technical Field
The invention relates to the technical field of electrocardio abnormality classification, in particular to an electrocardio abnormality classification method fusing a heart dynamics model and an antagonistic generation network.
Background
Electrocardiogram (ECG) is a non-invasive vital sign detection means that is widely used by cardiologists to monitor heart health. Cardiovascular disease is responsible for about one third of death worldwide, with abnormalities in heart rhythm being an important reference factor in determining disease. Therefore, the use of electrocardiographic measurements to detect these abnormal conditions is of great importance for the management of patients at risk of abnormalities.
However, the identification of daily central electrograms relies primarily on the judgment of a professional physician's experience. The work is time-consuming and labor-consuming, and careless leakage is easy to occur in long-time work. With the development of artificial intelligence technologies such as machine learning and deep learning, in order to improve the efficiency of classification and identification of electrocardiograms, the use of artificial intelligence technologies for automatic classification and diagnosis of electrocardiograms is one of the hot spots in the research field. At present, deep learning has outperformed the human level in most scenarios requiring data analysis and computation, and more mechanical tasks are beginning to be replaced by artificial intelligence techniques. Therefore, from the viewpoints of low cost, high performance and high cost performance, the deep learning model is utilized to perform feature learning on electrocardiogram data, so that accurate judgment and automatic classification of electrocardiogram abnormity are realized, and the problems of low efficiency, low accuracy, poor instantaneity and the like in the traditional electrocardiogram classification task are solved.
The deep learning model generally defaults that the type of the training data accords with relatively balanced distribution, so that the relatively balanced electrocardio type data is beneficial to obtaining better performance of the classification model. However, in an actual scene, due to the fact that collection of abnormal class electrocardiographic data is difficult, the abnormal class electrocardiographic data and the normal class electrocardiographic data are in unbalanced distribution, and the data distribution requirement of an ideal deep learning model is difficult to meet. On the other hand, to enable the deep learning model to successfully complete the training task, a large amount of data with labels is needed, the efficiency of manually labeling the electrocardiogram data is low, and the requirement on the professional quality of a labeling person is high, so that high cost is needed for acquiring a large amount of labeled data.
Generating a countermeasure network (GAN) is an unsupervised learning algorithm that can generate new data that conforms to the similar distribution of data by learning the underlying characterization of the data distribution. In the current field of artificial intelligence technology, generating countermeasure networks has been applied to tasks such as image generation. Therefore, by adding the electrocardiographic data for resisting the generation of network synthesis in the training set of the classification model, the problem of imbalance of data types is favorably relieved.
A cardiac dynamics model is a method that generates a true synthetic electrocardiogram signal. The model may consist of three dynamic models coupled with ordinary differential equations, capable of reproducing many important features of the ECG. Furthermore, many of the morphological changes observed in human ECG's are a result of the model geometry. Different morphologies of the PQRST complexes can be generated by selecting model parameters. The model thus created is able to generate an ECG signal with the morphology of the true PQRST complex and in compliance with heart rate dynamics regulations. The cardiac dynamics model is parameterized by specific heart rate statistics, such as the mean and standard deviation of the heart rate, and the frequency domain characteristics of the heart rate variability. Obtaining a true ECG provides a benchmark for testing a variety of biomedical signal processing techniques. Although the model is mainly derived from the stable theoretical basis of physical knowledge, the expression capability is limited.
Disclosure of Invention
In order to solve the defect problems of the prior art, the invention provides the electrocardio abnormality classification method fusing the cardiac dynamics model and the countermeasure generation network, and the method can fuse the generation countermeasure network in the cardiac dynamics and deep learning model, and is driven by using physical parameters and actual data to realize a dynamic system with higher expressive force.
In order to achieve the purpose, the technical scheme of the invention is as follows;
the invention provides an electrocardio abnormality classification method fusing a heart dynamics model and an antagonistic generation network, which comprises the following steps:
s1, constructing and dividing a heartbeat data set, intercepting heartbeat data of an acquired electrocardiogram database to construct a heartbeat data set, and dividing a training set of a GAN (neural network) model and a training set and a testing set of a classification model in the heartbeat data set;
s2, determining physical parameters of the heart dynamics model, screening out the most representative data in each heart beat type in the heart beat data set, extracting the morphological characteristics of the representative data, wherein the morphological characteristics are positions and amplitudes of P waves, Q waves, R waves, S waves and T waves in the heart beats in the heart beat data, and determining the physical parameters of the heart dynamics model of each heart beat type by counting the average value of the morphological characteristics of the representative data of each heart beat type;
s3, constructing heartbeat data of a heart dynamics model, constructing heartbeat data of each heartbeat category according to the physical parameters and the heart dynamics model, and using the heartbeat data as a data basis for training the GAN model;
s4, constructing and training a GAN model, constructing a generator model and a discriminator model in the GAN model, and training the GAN model by using the divided GAN training data set and data constructed by heart dynamics;
s5, supplementing a classification training set, generating unbalanced class data by using the optimized GAN model, and merging the unbalanced class data into a training data set of the classification model;
s6, constructing and training a classification model to realize the classification of the electrocardio abnormality, constructing a 1D-Resnet classification model, training the 1D-Resnet classification model by using a classification model training set, and identifying and classifying the heartbeat data of unknown classes by using the trained 1D-Resnet classification model.
Further, in the above method for classifying an electrocardiographic abnormality by fusing a cardiac dynamics model and an antagonistic generation network, the step S1 specifically comprises the steps of:
s11, constructing a heart beat data set, carrying out heart beat data interception processing on the electrocardio sequence data of the patient in the electrocardio database, and dividing the electrocardio sequence data X into k sections of heart beat data, namely X = { X = i I =1,2, 3.·, k }, wherein X is X j Representing the ith heartbeat data segment after the electrocardio sequence data X is intercepted, wherein the heartbeat data is a basic unit for forming the electrocardio sequence data X; positioning a QRS wave in the heartbeat data by using a Pan-Tompkins electrocardio QRS detection algorithm, and intercepting the heartbeat data through an R peak in the QRS wave to form a heartbeat data set, wherein the interception width of the heartbeat data can be set to m sampling points, m is set to a fixed value, and the value setting range can be [216,280 ]]In the interval, taking the R peak as a reference, intercepting 1/3m sampling points in front of the R peak and 2/3m sampling points behind the R peak as heartbeat data, wherein each heartbeat data can be expressed as X i ={x 1 ,x 2 ,x 3 ,...,x m In which x m The electrocardio amplitude of the mth sampling point is obtained;
s12, counting the heart beat number of each type in the heart beat data set, and screening out the heart beat types with unbalanced sample amount.
S13, dividing a training set of the GAN model and a training set and a testing set of a classification model on the basis of the heartbeat data set, wherein the heartbeat data set is divided by taking a patient as a unit, half of patient data is used as the training set of the GAN model and the training set of the classification model, and the other half of patient data is used as the testing set of the classification model;
further, in the above method for classifying an electrocardiographic abnormality by fusing a cardiac dynamics model and an antagonistic generation network, the step S2 specifically comprises the steps of:
s21, sending all heartbeat data in the heartbeat data set into a 1D-Resnet classification model for training;
S22.1D-Resnet classification model training is completed, all heart beat data in the heart beat data set are sent to the model for testing, 50 heart beat data with the highest model output probability are screened out in each heart beat category, morphological parameters of the 50 heart beat data are extracted, and the average value of the morphological parameters of the 50 heart beat data is calculated and used as the physical parameters of the heart dynamics model of the category.
Further, in the above method for classifying an electrocardiographic abnormality by fusing a cardiac dynamics model and an antagonistic generation network, the cardiac beat data for constructing the cardiac dynamics model in step S3 is:
inputting the physical parameters of the cardiac dynamics model of each heartbeat category into the cardiac dynamics model to generate basic heartbeat data of each heartbeat category, wherein the basic heartbeat data are used as a data basis for training the GAN model;
the cardiac dynamics model equation is shown in equation (1),
Figure BDA0003833054130000051
wherein
Figure BDA0003833054130000052
Δθ i =(θ-θ i ) Complementation of 2 π, θ = atan2 (y, x), ω is the angular velocity of the trajectory as it moves around the limit ring, z-z 0 Expressed is the baseline shift, z 0 The calculation of (c) is as shown in equation 2,
z 0 (t)=Asin(2πf 2 t) (2)
wherein a =0.15mV.
Further, in the above method for classifying an abnormal electrocardiogram by fusing a cardiac dynamics model and an antagonistic generation network, the step S4 specifically includes:
s41, extracting heartbeat data of a specific type from a training set of the GAN model to serve as the training set of the GAN model of the heartbeat type;
s42, extracting heartbeat data of the heart dynamics model of the specific category to serve as a training basis of the heartbeat category GAN model;
s43, constructing a generator model and a discriminator model in the GAN model;
and S44, training the GAN model, learning the deviation between the heartbeat data of the heart dynamics model of the heartbeat category and the training set of the GAN model of the heartbeat category through the training set of the GAN model of the specific category, constructing the GAN model of the specific category, and generating the heartbeat data which is in accordance with the distribution of the data of the heartbeat category.
Further, according to the method for classifying the electrocardio-abnormality by fusing the cardiac dynamics model and the antagonistic generation network, the generator model has the structure that:
inputting a group of noise signals which have a unit length of 100 and satisfy Gaussian distribution; after the noise signal passes through six convolution blocks and one convolution layer, the output of the convolution layer is flattened by using a Reshape function with the unit length of 216, and the output of the generator model can be obtained.
Further, in the above method for classifying an abnormal electrocardiographic current by fusing a cardiac dynamics model and an antagonistic generation network, the structure of the discriminator model in step S4 is:
inputting a group of heart beat data to be distinguished; after input data passes through a one-dimensional convolutional layer, a LeakyReLU function, four convolutional blocks and a one-dimensional convolutional layer, the output is activated by using a Sigmoid function, and whether the group of heartbeat data is training data or synthetic data is judged.
Further, in the above method for classifying an electrocardiographic abnormality by fusing a cardiac dynamics model and an antagonistic generation network, the step S5 specifically comprises:
s51, through constructing a specific type of GAN model, cardiac beat data generation is carried out on cardiac beat type data with unbalanced sample volume in the cardiac beat data set;
and S52, merging the generated unbalanced heartbeat data into a training set of a classification model to construct a classification data set.
Further, in the above method for classifying an electrocardiographic abnormality by fusing a cardiac dynamics model and an antagonistic generation network, the step S6 specifically comprises:
s61, constructing a 1D-Resnet classification model;
s62, training the 1D-Resnet classification model by using a training set of the classification model, and optimizing network parameters of the 1D-Resnet classification model;
s63, testing the trained 1D-Resnet classification model by using the test set of the classification model, and verifying the classification performance of the model;
and S64, recognizing and classifying the heart beat data of the unknown classes by using the trained and tested 1D-Resnet classification model.
Further, in the above method for classifying an abnormal electrocardiogram by fusing a cardiac dynamics model and an antagonistic generation network, the structure of the 1D-Resnet model is as follows:
inputting a group of heartbeat data to be distinguished; the input data is subjected to batch standardization after passing through a convolution layer, then passes through five residual blocks, a full connection layer, reLU activation and a full connection layer, finally the output is activated by using a Sigmoid function, and the classification result of the heartbeat data is output.
Compared with the prior art, the electrocardio abnormality classification method fusing the heart dynamics model and the antagonistic generation network has the following advantages and beneficial effects:
1. at present, training verification of the GAN model depends on training data, and the GAN model of the method provided by the invention can learn distribution of real data on the basis of a heart dynamics model, so that the dependence of the GAN model on the data is reduced, and the stability of the model is improved.
2. At present, the heart dynamics model needs to manually input physical parameters, depends on expert knowledge, and because the model inputs fixed physical parameters, the method provided by the invention performs data analysis through data and a classification model so as to determine the physical parameters of the heart dynamics model, thereby reducing the cost of hiring experts to a certain extent, and simultaneously, the result of analyzing the actual data is more authentic.
3. At present, the heart beat data generated by the heart dynamics model has the problem of lack of expressive force, but the expressive force of the heart beat data generated by the heart dynamics model is greatly improved by combining the heart dynamics with the GAN model, and meanwhile, the training time of the GAN model can be effectively shortened by training the GAN model on the basis of the heart dynamics, and the training efficiency of the GAN model is improved.
4. For the electrocardio category with less data volume, the GAN in the model can synthesize enough data to meet the requirement of a subsequent training deep learning classification model on data distribution, thereby improving the overall performance of the classification model. The method solves the problems of low efficiency and accuracy of classification caused by unbalanced data in the conventional electrocardiogram classification task.
Drawings
FIG. 1 is a flow chart of the method for classifying the electrocardio-anomalies by fusing a heart dynamics model and an antagonistic generation network.
Fig. 2 shows the structure of the generator model used by GAN according to the present invention.
FIG. 3 shows the structure of the discriminator model used by the GAN of the present invention.
Fig. 4 is a schematic diagram of the GAN training process according to the present invention.
FIG. 5 is a 1D-Resnet model structure used in the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
In this specification, some example embodiments may not necessarily refer to the same embodiment or example. Furthermore, the particular features, steps, methods, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The following is a further description of some specific names in the technical solution of the present invention.
ResNet: the Deep Residual Network (ResNet) introduces a Residual Network structure (Residual Network) on the basis of a Convolutional Neural Network (CNN), the structure is added with a branch on the basis of Network transmission, the branch can transmit the parameters of the previous layer of Network to the next layer of Network through identity mapping, and the method can prevent the increase of training errors after the depth of the Network is deepened.
1D-Resnet: the One-dimensional depth-Residual Network (1D-Network) classification model is the Resnet input as a One-dimensional signal.
PQRST complex: the PQRST complex is representative of information on cardiac activity, which in practical scenarios, includes four actions, atrial depolarization, atrial repolarization, ventricular depolarization, and ventricular repolarization, respectively; p-waves are manifestations of atrial depolarization with a small amount of electrical excursion; the PQ interval represents the activity between atrial and ventricular depolarizations; the QRS complex represents ventricular depolarization, and atrial repolarization is also in this interval but will be covered by ventricular depolarization; the QT interval represents activity between ventricular depolarization and ventricular repolarization, and if QT is too long, ventricular tachycardia can be caused, leading to sudden cardiac death; the ST interval represents the activity between the end of the S-wave and the beginning of the T-wave, and if there is a significant increase or decrease in this interval, it is often associated with heart disease; the T wave is a manifestation of ventricular repolarization and represents preparation for the next heartbeat cycle.
The ReLU activation function, also called as a Linear rectification function (ReLU), refers to a slope function in mathematics, is a commonly used activation function in a neural network, is beneficial to solving the problem of gradient disappearance in the neural network, but can cause the problem of neuron death, has a specific formula as follows,
Figure BDA0003833054130000091
similar to the ReLU function, the LeakyReLU function aims to solve the problem of neuron death, and the LeakyReLU activation function has the specific formula,
Figure BDA0003833054130000101
sigmoid function, a kind of Sigmoid function, is often used as an activation function in neural networks, and is specifically formulated as,
Figure BDA0003833054130000102
the technical solution of the present invention is further described below with reference to fig. 1 to 5 and the embodiment.
Example 1
As shown in fig. 1, the method for classifying an electrocardiographic abnormality by fusing a cardiac dynamics model and an antagonistic neural network in this embodiment specifically includes the following steps:
s1, constructing and dividing a heartbeat data set, intercepting heartbeat data of an acquired electrocardiogram database to construct a heartbeat data set, and dividing a training set of a GAN (neural network) model and a training set and a testing set of a classification model in the heartbeat data set;
s2, determining physical parameters of the heart dynamics model, screening out the most representative data in each heart beat type in the heart beat data set, extracting the morphological characteristics of the representative data, wherein the morphological characteristics are positions and amplitudes of P waves, Q waves, R waves, S waves and T waves in the heart beats in the heart beat data, and determining the physical parameters of the heart dynamics model of each heart beat type by counting the average value of the morphological characteristics of the representative data of each heart beat type;
s3, constructing heartbeat data of the heart dynamics model, constructing heartbeat data of each heartbeat category according to the physical parameters and the heart dynamics model, and using the heartbeat data as a data base for training the GAN model;
s4, constructing and training a GAN model, constructing a generator model and a discriminator model in the GAN model, and training the GAN model by using the divided GAN training data set and data constructed by heart dynamics;
s5, supplementing a classification training set, generating unbalanced class data by using the optimized GAN model, and merging the unbalanced class data into a training data set of the classification model;
s6, constructing and training a classification model to realize the classification of the electrocardio abnormality, constructing a 1D-Resnet classification model, training the 1D-Resnet classification model by using a classification model training set, and identifying and classifying the heartbeat data of unknown classes by using the trained 1D-Resnet classification model.
Example 2
With reference to fig. 2, fig. 3 and fig. 4, the method for classifying an electrocardiographic abnormality by fusing a cardiac dynamics model and an antagonistic generation network according to this embodiment provides step S4 based on embodiment 1 as follows:
s41, extracting heart beat data of a specific category from the training set of the GAN model to serve as the training set of the GAN model of the heart beat category;
s42, extracting heartbeat data of the heart dynamics model of the specific category to serve as a training basis of the heartbeat category GAN model;
s43, constructing a generator model and a discriminator model in the GAN model;
s431, with reference to the figure 2, constructing a generator model structure in the GAN model, and inputting a group of noise signals which have unit length of 100 and meet Gaussian distribution; after the noise signal passes through six convolutional blocks and one convolutional layer, the output of the convolutional layer is flattened by using a Reshape function with the unit length of 216, and the output of the generator model can be obtained.
The convolution block is composed of a one-dimensional convolution layer, batch standardization and a ReLU activation function. In the seven convolutional layers of the generator model, the shape parameters (in _ channels) of the input signal are: 100. 64 × 32, 64 × 16, 64 × 8, 64 × 4, 64 × 2, 64; the channel parameters (out _ channels) of the convolution output are respectively: 64 × 32, 64 × 16, 64 × 8, 64 × 4, 64 × 2, 64,1; the size parameters (kernel _ size) of the convolution kernel are: 4. 4, 3, 4; the step length parameters (stride) are respectively: 1. 1, 2; the filling parameters (padding) are respectively 00, 1. The six batch normalization layer parameters of the generator model are respectively: 64 × 32, 64 × 16, 64 × 8, 64 × 4, 64 × 2, 64.
S432, with reference to the figure 3, constructing a discriminator model structure and inputting a group of heart beat data to be discriminated; after input data passes through a one-dimensional convolutional layer, a LeakyReLU function, four convolutional blocks and a one-dimensional convolutional layer, the output is activated by using a Sigmoid function, and whether the group of heartbeat data is training data or synthetic data is judged.
The convolution block is composed of a one-dimensional convolution layer, batch standardization and a LeakyReLU activation function. In the six convolutional layers of the discriminator model, the channel parameters (in _ channels) of the input signal are: 1. 64, 64 × 2, 64 × 4, 64 × 8, 64 × 16; the channel parameters (out _ channels) of the convolution output are respectively: 64. 64 × 2, 64 × 4, 64 × 8, 64 × 16,1; the size parameters (kernel _ size) of the convolution kernel are: 4. 4, 5; step length parameters (stride) are all 2; the filling parameters (padding) are respectively 11, 0. The four batch normalization layer parameters of the discriminator model are respectively: 64 × 2, 64 × 4, 64 × 8, 64 × 16.
S433, referring to FIG. 4, the specific steps of the GAN training process are as follows:
s433-1, in the first step, training parameters are set, the number of times of traversing a data set is set to be 1000, an optimizer used for GAN model training is Adam, wherein a learning rate parameter is set to be 0.0002, and an exponential weighting coefficient is set to be (0.5, 0.999); the GAN model training uses a loss function as a binary cross entropy loss function (BCELoss);
s433-2, in the second step, the discriminant model inputs training set data, and a batch of training data is input into the discriminant model to obtain an identification result label of the batch of training data.
And S433-3, in the third step, calculating the loss value of the discriminant model to the training set data and the gradient of the part, and putting the identification result label of the training data and the correct label into a loss function to obtain the loss value related to the identification result of the training data. The discriminator model uses an optimizer to perform back propagation to compute the gradient of the portion.
S433-4, in the fourth step, the generator model generates synthetic data, a batch of noise signals with the unit length of 100 are input into the generator model, and synthetic data output and a label corresponding to the batch of noise signals are obtained.
S433-5, in the fifth step, the discriminator model inputs the synthetic data, and a batch of synthetic data is input into the discriminator model to obtain the identification result of the batch of synthetic data.
S433-6, in the sixth step, the loss value of the discriminator model to the synthetic data and the gradient of the part are calculated, the discrimination result label of the synthetic data and the correct label thereof are put into a loss function, and the loss value of the discrimination result of the synthetic data is obtained. The discriminator model uses an optimizer to perform back propagation to compute the gradient of the portion.
And S433-7, in the seventh step, optimizing the network parameters of the discriminator model, and performing parameter updating on the discriminator model once by using a step function of the optimizer according to the obtained gradient.
And S433-8, in the eighth step, repeating the fifth step, calculating the loss value of the generator model to the synthetic data and the gradient of the part, and putting the identification result label of the synthetic data and the correct label thereof into a loss function to obtain the loss value of the identification result of the synthetic data. The discriminator model uses an optimizer to perform back propagation to compute the gradient of the portion.
S433-9, in the ninth step, network parameters of the generator model are optimized, and parameter updating is performed on the generator model once by using a step function of the optimizer according to the obtained gradient.
And S433-10, a tenth step of repeating the steps 2 to 9, and updating the network parameters of the generator model and the discriminator model through cross iteration. In the GAN training, it is required that the performances of the generator model and the discriminator model should be equivalent, and the difference between the performances of the generator model and the discriminator model cannot be too great, which is contrary to the zero sum game core idea of GAN. The model can avoid the condition by respectively setting the updating times of the two model parameters, and the model sets that the generator model parameters need to be updated 5 times every time the discriminator model parameters are updated 1 time.
And S433-11, in the eleventh step, repeating the step 10, traversing the data set for preset times to obtain an optimized GAN model, and generating new data which accords with actual data distribution.
S44, training the GAN model, learning the deviation between the heartbeat data of the heartbeat dynamic model in the heartbeat category and the training set of the heartbeat category GAN model through the training set of the GAN model in the specific category, constructing the GAN model in the specific category, and generating heartbeat data which accords with the heartbeat category data distribution.
Example 3
Referring to fig. 5, the present embodiment provides the detailed steps of step 6 based on embodiment 1:
s61, with reference to the figure 4, a 1D-Resnet classification model structure is constructed, and a group of heartbeat data needing to be judged is input; the input data is subjected to batch standardization after passing through a convolution layer, then passes through five residual blocks, a full connection layer, reLU activation and a full connection layer, finally, the output is activated by using a Sigmoid function, and the classification result of the group of heartbeat data is output. The input data in the residual block is divided into two branches, one branch passes through a convolution layer, a ReLU activation function and a convolution layer, then is accumulated with the other branch, and finally passes through a ReLU activation function and a pooling layer and then is output.
Wherein, each convolution layer parameter of the classification model structure is consistent, and the specific parameter is set as: the input channel parameter is 32, the output channel parameter is 32, the convolution kernel size is 5, and the filling parameter is 2; the input size parameter of the first full-connection parameter of the classification model structure is set to be 32 multiplied by 3, and the output size parameter is set to be 32; the input size parameter of the second full-connection parameter is set to be 32, and the output size parameter is set to be the number of the electrocardio types to be identified.
S62, training the 1D-Resnet classification model by using a training set of the classification model, and optimizing network parameters of the 1D-Resnet classification model;
the number of times of traversing the data set is set to be 20, an optimizer used for training the classification model is Adam, and the learning rate parameter is set to be 0.0001; training a classification model by using a loss function as a cross entropy loss function (Cross EntropyLoss); inputting the processed training set data into the built 1D-Resnet classification model for training, and traversing the data set for preset times to obtain the optimal parameters of the model.
S63, testing the trained 1D-Resnet classification model by using a test set of the classification model, and verifying the classification performance of the model;
and (4) keeping the optimal parameters obtained in the step (S62), inputting a prepared test set for testing, automatically classifying the test set by the model, and obtaining the evaluation index of the classification model after traversing the test set.
And S64, recognizing and classifying the heart beat data of the unknown class by using the 1D-Resnet classification model which completes training and testing.
Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
It should be noted that the above-mentioned embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.

Claims (10)

1. An electrocardio abnormality classification method fusing a heart dynamics model and an antagonistic generation network is characterized by comprising the following steps:
s1, constructing and dividing a heart beat data set, intercepting heart beat data of an acquired electrocardio database, constructing a heart beat data set, and dividing a training set of a GAN model and a training set and a testing set of a classification model in the heart beat data set;
s2, determining physical parameters of the heart dynamics model, screening out the most representative data in each heart beat type in the heart beat data set, extracting the morphological characteristics of the representative data, wherein the morphological characteristics are positions and amplitudes of P waves, Q waves, R waves, S waves and T waves in the heart beats in the heart beat data, and determining the physical parameters of the heart dynamics model of each heart beat type by counting the average value of the morphological characteristics of the representative data of each heart beat type;
s3, constructing heartbeat data of a heart dynamics model, constructing heartbeat data of each heartbeat category according to the physical parameters and the heart dynamics model, and using the heartbeat data as a data basis for training the GAN model;
s4, constructing and training a GAN model, constructing a generator model and a discriminator model in the GAN model, and training the GAN model by using the divided GAN training data set and data constructed by heart dynamics;
s5, supplementing a classification training set, generating unbalanced class data by using the optimized GAN model, and merging the unbalanced class data into a training data set of the classification model;
s6, constructing and training a classification model to realize the classification of the electrocardio abnormality, constructing a 1D-Resnet classification model, training the 1D-Resnet classification model by using a classification model training set, and identifying and classifying the heartbeat data of unknown classes by using the trained 1D-Resnet classification model.
2. The method for classifying cardiac anomalies by fusing a cardiac dynamics model with an antagonistic generation network according to claim 1, characterized in that: the step S1 comprises the following specific steps:
s11, constructing a heart beat data set, carrying out heart beat data interception processing on the electrocardio sequence data of the patient in the electrocardio database, and dividing the electrocardio sequence data into k sections of heart beat data, namely X = { X = i I =1,2,3, \ 8230;, k }, where X i Representing the ith heart beat data segment after the electrocardio sequence data X is intercepted, wherein the heart beat data is a basic unit for forming the electrocardio sequence data X; positioning QRS in heart beat data by using Pan-Tompkins electrocardio QRS detection algorithmThe wave, and the heart beat data is intercepted through the R peak in the QRS wave, so as to form a heart beat data set, the interception width of the heart beat data can be set as m sampling points, m is set as a fixed value, and the value setting range can be [216,280 ]]Taking the R peak as a reference, intercepting 1/3m sampling points before the R peak and 2/3m sampling points after the R peak as heartbeat data, wherein each heartbeat data can be expressed as X i ={x 1 ,x 2 ,x 3 ,…,x m In which x is m The electrocardio amplitude of the mth sampling point is obtained;
and S12, counting the heart beat number of each type in the heart beat data set, and screening out the heart beat types with unbalanced sample amount.
And S13, dividing a training set of the GAN model and a training set and a testing set of the classification model on the basis of the heartbeat data set, wherein the heartbeat data set is divided by taking a patient as a unit, half of patient data is used as the training set of the GAN model and the training set of the classification model, and the other half of patient data is used as the testing set of the classification model.
3. The method for classifying cardiac anomalies by fusing a cardiac dynamics model with an antagonistic generation network according to claim 1, characterized in that: the step S2 specifically comprises the following steps:
s21, sending all heartbeat data in the heartbeat data set into a 1D-Resnet classification model for training;
S22.1D-Resnet classification model training is completed, all heart beat data in the heart beat data set are sent to the model for testing, 50 heart beat data with the highest model output probability are screened out in each heart beat category, morphological parameters of the 50 heart beat data are extracted, and the average value of the morphological parameters of the 50 heart beat data is calculated and used as the physical parameters of the heart dynamics model of the category.
4. The method for classifying cardiac anomalies by fusing a cardiac dynamics model with an antagonistic generation network according to claim 1, characterized in that: step S3, the heartbeat data for constructing the heart dynamics model is as follows:
inputting the physical parameters of the cardiac dynamics model of each heartbeat category into the cardiac dynamics model to generate basic heartbeat data of each heartbeat category as a data basis for training the GAN model;
the cardiac dynamics model equation is shown in equation (1),
Figure FDA0003833054120000031
wherein
Figure FDA0003833054120000032
Δθ i =(θ-θ i ) Complementation of 2 π, θ = atan2 (y, x), ω is the angular velocity of the trajectory as it moves around the limit ring, z-z 0 Expressed is the baseline shift, z 0 Is calculated in the manner shown in equation 2,
z 0 (t)=Asin(2πf 2 t) (2)
wherein a =0.15mV.
5. The method for classifying cardiac anomalies by fusing a cardiac dynamics model with an antagonistic generation network according to claim 1, characterized in that: the step S4 specifically comprises the following steps:
s41, extracting heart beat data of a specific category from the training set of the GAN model to serve as the training set of the GAN model of the heart beat category;
s42, extracting heartbeat data of the heart dynamics model of the specific category to serve as a training basis of the heartbeat category GAN model;
s43, constructing a generator model and a discriminator model in the GAN model;
and S44, training the GAN model, learning the deviation between the heartbeat data of the heart dynamics model of the heartbeat category and the training set of the GAN model of the heartbeat category through the training set of the GAN model of the specific category, constructing the GAN model of the specific category, and generating the heartbeat data which is in accordance with the distribution of the data of the heartbeat category.
6. The method of classifying cardiac anomalies with fusion of a cardiac dynamics model and an antagonistic generation network according to claim 5, characterized in that: the structure of the generator model is as follows:
inputting a group of noise signals with unit length of 100 and satisfying Gaussian distribution; after the noise signal passes through six convolutional blocks and one convolutional layer, the output of the convolutional layer is flattened by using a Reshape function with the unit length of 216, and the output of the generator model can be obtained.
7. The method for classifying cardiac anomalies by fusing a cardiac dynamics model with an antagonistic generation network according to claim 1, characterized in that: the structure of the discriminator model in the step S4 is:
inputting a group of heartbeat data to be judged; after input data passes through a one-dimensional convolutional layer, a LeakyReLU function, four convolutional blocks and a one-dimensional convolutional layer, the output is activated by using a Sigmoid function, and whether the group of heartbeat data is training data or synthetic data is judged.
8. The method for classifying cardiac anomalies by fusing a cardiac dynamics model with an antagonistic generation network according to claim 1, characterized in that: the step S5 specifically comprises the following steps:
s51, generating heartbeat data by constructing a specific type of GAN model and concentrating the heartbeat data into heartbeat type data with unbalanced sample volume;
and S52, merging the generated unbalanced heartbeat data into a training set of a classification model to construct a classification data set.
9. The method for classifying cardiac anomalies by fusing a cardiac dynamics model with an antagonistic generation network according to claim 1, characterized in that: the step S6 specifically comprises the following steps:
s61, constructing a 1D-Resnet classification model;
s62, training the 1D-Resnet classification model by using a training set of the classification model, and optimizing network parameters of the 1D-Resnet classification model;
s63, testing the trained 1D-Resnet classification model by using a test set of the classification model, and verifying the classification performance of the model;
and S64, recognizing and classifying the heart beat data of the unknown classes by using the trained and tested 1D-Resnet classification model.
10. The method for classifying cardiac anomalies by fusing a cardiac dynamics model with an antagonistic generation network according to claim 9, characterized in that: the structure of the 1D-Resnet model is as follows:
inputting a group of heartbeat data to be distinguished; the input data is subjected to batch standardization after passing through a convolution layer, then passes through five residual blocks, a full connection layer, reLU activation and a full connection layer, finally the output is activated by using a Sigmoid function, and the classification result of the heartbeat data is output.
CN202211079227.0A 2022-09-05 2022-09-05 Electrocardio abnormality classification method fusing heart dynamics model and antagonistic generation network Pending CN115392319A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211079227.0A CN115392319A (en) 2022-09-05 2022-09-05 Electrocardio abnormality classification method fusing heart dynamics model and antagonistic generation network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211079227.0A CN115392319A (en) 2022-09-05 2022-09-05 Electrocardio abnormality classification method fusing heart dynamics model and antagonistic generation network

Publications (1)

Publication Number Publication Date
CN115392319A true CN115392319A (en) 2022-11-25

Family

ID=84125413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211079227.0A Pending CN115392319A (en) 2022-09-05 2022-09-05 Electrocardio abnormality classification method fusing heart dynamics model and antagonistic generation network

Country Status (1)

Country Link
CN (1) CN115392319A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116458894A (en) * 2023-04-21 2023-07-21 山东省人工智能研究院 Electrocardiosignal enhancement and classification method based on composite generation countermeasure network
CN116548980A (en) * 2023-07-07 2023-08-08 广东技术师范大学 Long-time-interval electrocardiograph classification method and system based on pulse neural network

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116458894A (en) * 2023-04-21 2023-07-21 山东省人工智能研究院 Electrocardiosignal enhancement and classification method based on composite generation countermeasure network
CN116458894B (en) * 2023-04-21 2024-01-26 山东省人工智能研究院 Electrocardiosignal enhancement and classification method based on composite generation countermeasure network
CN116548980A (en) * 2023-07-07 2023-08-08 广东技术师范大学 Long-time-interval electrocardiograph classification method and system based on pulse neural network
CN116548980B (en) * 2023-07-07 2023-09-01 广东技术师范大学 Long-time-interval electrocardiograph classification method and system based on pulse neural network

Similar Documents

Publication Publication Date Title
CN107951485B (en) Ambulatory ECG analysis method and apparatus based on artificial intelligence self study
CN106108889B (en) Electrocardiogram classification method based on deep learning algorithm
US11529103B2 (en) Artificial intelligence self-learning-based automatic electrocardiography analysis method and apparatus
CN107714023B (en) Static electrocardiogram analysis method and device based on artificial intelligence self-learning
US20220233129A1 (en) Method for constructing intracardiac abnormal activation point location model based on cnn and lstm
US20080103403A1 (en) Method and System for Diagnosis of Cardiac Diseases Utilizing Neural Networks
CN115392319A (en) Electrocardio abnormality classification method fusing heart dynamics model and antagonistic generation network
US20100217144A1 (en) Diagnostic and predictive system and methodology using multiple parameter electrocardiography superscores
CN110974214A (en) Automatic electrocardiogram classification method, system and equipment based on deep learning
CN109276242A (en) The method and apparatus of electrocardiosignal type identification
CN110638430B (en) Method for building cascade neural network ECG signal arrhythmia classification model
CN111557659B (en) Arrhythmia classification method based on multi-feature fusion and Stacking-DWKNN algorithm
CN110236529A (en) A kind of multi-lead arrhythmia cordis intelligent diagnosing method based on MODWT and LSTM
CN116361688A (en) Multi-mode feature fusion model construction method for automatic classification of electrocardiographic rhythms
Wang et al. Multiscale residual network based on channel spatial attention mechanism for multilabel ECG classification
CN113080996B (en) Electrocardiogram analysis method and device based on target detection
CN113509186A (en) ECG classification system and method based on deep convolutional neural network
CN111839505A (en) Atrial fibrillation classification method based on cardiovascular system electrical-mechanical activity information
Jiang et al. Heartbeat classification system based on modified stacked denoising autoencoders and neural networks
Tung et al. Multi-lead ECG classification via an information-based attention convolutional neural network
Bortolan et al. Rule-based method and deep learning networks for automatic classification of ECG
CN113171102B (en) ECG data classification method based on continuous deep learning
Vimala et al. Classification of cardiac vascular disease from ECG signals for enhancing modern health care scenario
Roland et al. An Automated System for Arrhythmia Detection using ECG records from MITDB
CN116570295B (en) Electrocardiogram low-voltage T-wave end point positioning method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination