Nothing Special   »   [go: up one dir, main page]

CN114692698A - One-dimensional electrocardiogram data classification method based on residual error network - Google Patents

One-dimensional electrocardiogram data classification method based on residual error network Download PDF

Info

Publication number
CN114692698A
CN114692698A CN202210429753.9A CN202210429753A CN114692698A CN 114692698 A CN114692698 A CN 114692698A CN 202210429753 A CN202210429753 A CN 202210429753A CN 114692698 A CN114692698 A CN 114692698A
Authority
CN
China
Prior art keywords
data
network
residual
network model
layer
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
CN202210429753.9A
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.)
North University of China
Original Assignee
North University of China
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 North University of China filed Critical North University of China
Priority to CN202210429753.9A priority Critical patent/CN114692698A/en
Publication of CN114692698A publication Critical patent/CN114692698A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching
    • 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]
    • 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/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7203Signal processing specially adapted for physiological signals or for diagnostic purposes for noise prevention, reduction or removal
    • 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
    • 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
    • A61B5/7267Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/08Feature extraction

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Public Health (AREA)
  • Animal Behavior & Ethology (AREA)
  • Surgery (AREA)
  • Veterinary Medicine (AREA)
  • Medical Informatics (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Pathology (AREA)
  • Signal Processing (AREA)
  • Psychiatry (AREA)
  • Physiology (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Mathematical Physics (AREA)
  • Cardiology (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Fuzzy Systems (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The application relates to the field of computers, and particularly provides a one-dimensional electrocardiogram data classification method based on a residual error network, which comprises the following steps: s1, acquiring the electrocardiogram data and preprocessing the electrocardiogram data; s2, constructing a network model; s3, training and testing the constructed network model; and S4, classifying the electrocardio data by using the tested network model. The network model constructed in the step S2 includes a convolutional layer + BN layer + ReLU activation function + global maximum pooling layer, an RE1.1 residual module, an RE2 residual module, a global average pooling layer + full connection layer, and specifically, the present invention improves the residual network, uses only RE1.1 in the use of the residual block, removes RE1.2 in the original network, and directly connects RE2 after RE1.1 for synchronous fusion of the feature number and the channel number, and finally performs feature flattening and SoftMax classification through the full connection layer. The method has high classification accuracy on multi-class electrocardiogram data, and short training and testing time.

Description

One-dimensional electrocardiogram data classification method based on residual error network
Technical Field
The application relates to the field of computers, in particular to a one-dimensional electrocardiogram data classification method based on a residual error network.
Background
Cardiovascular disease has been a major killer of human health. The cardiovascular disease patients are accompanied by corresponding arrhythmia phenomena before the onset, and the analysis of the electrocardiosignals can assist doctors to diagnose, improve the accuracy of cardiovascular disease identification and classification, and have great clinical significance. Electrocardiography is widely used by cardiologists as an important non-invasive testing tool. Usually, these electrocardiograms are only observed and given a judgment by a doctor. However, as the proportion of doctors and patients becomes more unbalanced, huge data caused by the wide use of portable electrocardio devices cannot be diagnosed manually only by doctors at the moment, and the pain point can be solved just by utilizing an intelligent electrocardio signal classification technology.
At the present stage, the exploration of an efficient, rapid and accurate electrocardiosignal identification algorithm is always the focus of attention of numerous scholars. Li et al propose pre-trained Generic Convolutional Neural Networks (GCNN) for individual classification of cardiac electrical signals by first using GCNN for mass beat training followed by tuning GCNN to TDCNN for identification of individual signals with an accuracy of 94.7% on the test set. The CNN provided by Sannio et al is used for multiple times of training, the number of neurons in a hidden layer is adjusted to improve the accuracy of the electrocardiogram recognition, and finally the accuracy on a test set reaches 99.09%. The multi-lead neural network structure based on three residual blocks proposed by Chuang et al performs recognition and classification on electrocardiosignals by training single-lead data and performing feature fusion on the training results of 12 leads, and the accuracy rate of the obtained test set is 95.49%. However, most of the electrocardiogram classification algorithms are only tested on one kind of data, the classification effect on other data sets of the same type is still unclear, and the problems of over-fitting or under-fitting exist; the sensitivity of partial algorithms to the identification of each category is too different, and the sensitivity has a great influence on the practical application of the algorithms. The problems that the classification accuracy of the electrocardiogram data is difficult to further improve, the training needs long time, the generalization performance is poor, overfitting or underfitting is performed, and the classification accuracy of different types of the same electrocardiogram data is greatly different exist in the prior art.
Disclosure of Invention
The invention aims to provide a one-dimensional electrocardiogram data classification method based on a residual error network aiming at the defects in the prior art, so as to solve the problems that the classification accuracy of the electrocardiogram data in the prior art is difficult to further improve, the training needs long time, the generalization performance is poor, the overfitting or the underfitting is caused, and the classification accuracy of different types of the electrocardiogram data is greatly different.
In order to achieve the purpose, the technical concept adopted by the invention is as follows: most of the electrocardio data classification methods in the prior art use one type of data for network training and testing, increase the characteristic number for multiple times of channel number on a network architecture, reduce the characteristic number for multiple times, and directly classify finally, so that the network is complicated, the time required by training and testing is long, only the single type of electrocardio data can be classified, and the classification accuracy is not high. The method adopts the data in four types of databases for training and testing, wherein the data also comprises single-lead data and double-lead data, the data types are respectively 3, 4 and 5, and the original data types in different databases have larger difference and are not beneficial to training, so the method is convenient to be used in the training process, namely the method can classify various types of electrocardiogram data, and has generalization. Based on the characteristics of electrocardiogram data, the ResNet-18 network is improved in the method, only RE1.1 is used in the use of a residual block, RE1.2 in the original network is removed, RE2 is directly connected behind RE1.1 for fusion and reduction of feature number and channel number, and finally classification is carried out through a full connection layer, because RE1.2 is removed, the training speed of a network model is improved, and features are further fused and extracted, so that the method has high classification accuracy and high training speed, and overfitting can be avoided.
The application provides a one-dimensional electrocardiogram data classification method based on a residual error network, which comprises the following steps:
s1, acquiring the electrocardiogram data and preprocessing the electrocardiogram data;
the electrocardiogram data acquired by the application is electrocardiogram data in the existing database, and particularly relates to four world main electrocardiogram databases, wherein the four world main electrocardiogram databases comprise an MIT-BIH electrocardiogram data-arrhythmia database, a sudden cardiac death dynamic electrocardiogram database, an EU ST-T electrocardiogram database and an MIT-BIH electrocardiogram data-ST segment database. The electrocardiographic data is divided into a training set and a testing set according to the ratio of 7: 3. The preprocessing comprises two stages of denoising processing and segmentation processing.
S2, constructing a network model;
the invention is obtained by improving the classical ResNet-18 network, specifically, removing RE1.2 therein, and connecting RE2 after RE 1.1. More specifically, the constructed network model sequentially comprises a convolutional layer + BN layer + ReLU activation function + global maximum pooling layer, a RE1.1 residual module, a RE2 residual module, a global average pooling layer + a full connection layer. The RE1.1 residual module is four residual units RE1.1 which are connected in sequence, the RE2 residual module is a residual unit RE2, the number of channels is reduced and increased through the characteristic number of the residual unit RE1.1, and the residual unit RE2 is connected behind the four residual units RE1.1, so that the number of channels and the characteristic number can be reduced, the characteristics are further fused and extracted, the characteristic concentration is improved, the characteristics are concentrated and fused, the calculation complexity can be reduced, the calculation speed is improved, the time is saved, the time cost is reduced, and the classification accuracy is improved; meanwhile, a DP layer is added to the residual error unit RE1.1 to avoid overfitting of the network model.
S3, training and testing the constructed network model;
the constructed network model was iteratively trained using the Adam optimization algorithm and the crosscontrol loss function. The training process adjusts the hyper-parameters according to the average error and the accuracy of the training set, and finally obtains the hyper-parameters respectively through a plurality of times of long-time experimental exploration: the epochs (number of data uses) is 10, bs (number of data used for optimization per gradient descent) is 256, lr (learning rate) is 0.003, betas (second-order momentum exponential decay coefficient) is (0.9,0.95), tol (minimum loss threshold) is 10 × 5, and wd (weight decay coefficient) is 0.00001. The loss value and the accuracy on the test set are taken as the good standard of the network model test, and the accuracy is over 99 percent. For comparison, the network models corresponding to the three methods which are disclosed are constructed together and trained, and specifically, the training times and parameters are all based on the characteristics of each network model, so that the optimal classification effect is achieved.
And S4, classifying the electrocardio data by using the tested network model.
Because the built network model is trained and tested by using the electrocardio data of different types, the generalization of the network model is strong, and therefore, the electrocardio data of different types can be classified. The existing method can only classify one type of electrocardiogram data and cannot meet the actual requirement.
Compared with the prior art, the invention has the beneficial effects that: the method has high accuracy in classifying the various types of electrocardiogram data, and the training time is short. Meanwhile, the method has good generalization, and can avoid the occurrence of overfitting and provide more channels for the application of the electrocardio classification technology.
Drawings
FIG. 1 is a schematic diagram of a one-dimensional classification method for electrocardiographic data based on a residual error network according to the present invention;
fig. 2 is a comparison diagram of the electrocardiographic signals before and after the denoising processing in step S1 in the one-dimensional electrocardiographic data classification method based on the residual error network according to the present invention;
fig. 3 is a schematic diagram of the network model constructed in step S2 in the one-dimensional electrocardiographic data classification method based on the residual error network according to embodiment 1 of the present invention;
fig. 4 is a schematic diagram of a network model classification process constructed in step S2 in the one-dimensional electrocardiographic data classification method based on the residual error network according to embodiment 1 of the present invention;
FIG. 5 is a schematic diagram of a residual block disclosed in the prior art;
fig. 6 is a schematic diagram of the network model constructed in step S2 in the one-dimensional electrocardiographic data classification method based on the residual error network according to embodiment 2 of the present invention;
fig. 7 is a schematic diagram of a network model classification process constructed in step S2 in the one-dimensional electrocardiographic data classification method based on the residual error network according to embodiment 2 of the present invention;
fig. 8 is a schematic diagram of the network model constructed in step S2 in the one-dimensional electrocardiographic data classification method based on the residual error network according to embodiment 3 of the present invention;
fig. 9 is a schematic diagram of a network model classification process constructed in step S2 in the one-dimensional electrocardiographic data classification method based on the residual error network according to embodiment 3 of the present invention;
fig. 10 is a schematic diagram of the network model constructed in step S2 in the one-dimensional electrocardiographic data classification method based on the residual error network according to embodiment 4 of the present invention;
fig. 11 is a schematic diagram of a network model classification process constructed in step S2 in the one-dimensional electrocardiographic data classification method based on the residual error network according to embodiment 4 of the present invention.
Detailed Description
In order to make the implementation of the present invention clearer, the following detailed description is made with reference to the accompanying drawings.
Example 1:
the invention provides a one-dimensional electrocardiogram data classification method based on a residual error network, as shown in figure 1, the method comprises the following steps:
s1, acquiring the electrocardiogram data and preprocessing the electrocardiogram data;
s11, acquiring electrocardiogram data;
the electrocardiogram data acquired by the method can be directly acquired from the testee or can be electrocardiogram data in the existing database, and specifically, the electrocardiogram data acquired by the embodiment of the invention is electrocardiogram data in the existing database. More specifically, the electrocardiogram data of the embodiment of the invention is derived from four main world electrocardiogram databases, including an MIT-BIH electrocardiogram data-arrhythmia database, a sudden cardiac death dynamic electrocardiogram database, an EU ST-T electrocardiogram database and an MIT-BIH electrocardiogram data-ST segment database. In order to use data of different leads for training and ensure the training effect, the data in the EU ST-T electrocardiogram data base are divided into an EU ST-T electrocardiogram data-MLII lead data set, an EU ST-T electrocardiogram data-V5 lead data set and an EU ST-T electrocardiogram data-double lead data set, wherein the EU ST-T electrocardiogram data-MLII lead data set and the EU ST-T electrocardiogram data-V5 lead data set are mixed for use, so that the data can be expanded. Simultaneously dividing six groups of databases or data sets into a training set and a test set according to the proportion of 7:3 respectively; the electrocardio data are randomly scrambled before division, and after the electrocardio data are divided according to the proportion of 7:3, the electrocardio data of the training set are randomly scrambled, so that the influence of a hidden rule on the numerical value of the electrocardio data on the training process can be prevented, namely, overfitting is prevented, and the hidden rule is prevented from influencing the classification result of the electrocardio data; because the electrocardio data of the test set does not participate in the training process, the electrocardio data of the test set does not need to be randomly disturbed.
S12, preprocessing the electrocardiogram data;
the preprocessing of the electrocardiographic data obtained in the step S11 includes two stages, namely, denoising processing and segmentation processing, and the preprocessing includes all electrocardiographic data of the training set and the test set obtained in the step S11. In the embodiment, the wavelet nine-scale threshold filtering algorithm is adopted to perform denoising processing on the electrocardio data, so that the baseline drift problem and the power frequency interference problem of the electrocardio signals can be avoided, and the accuracy of the classification result is reduced due to the baseline drift problem and the power frequency interference problem. For example, as shown in fig. 2, the left waveform of the electrocardiographic data pair before and after the denoising process is the electrocardiographic data without the denoising process, and the right waveform of the electrocardiographic data after the denoising process, it can be seen from fig. 2 that the electrocardiographic data number becomes smoother after the denoising process, and the characteristics of the electrocardiographic data can be more obviously displayed, so that the electrocardiographic data can be more easily classified, and the classification accuracy is improved.
Because the obtained electrocardiographic data is a continuous waveform for a long time and the electrocardiographic data carrying the electrocardiographic features is only a part of the continuous waveform, the electrocardiographic data carrying the electrocardiographic features needs to be separated, namely, the electrocardiographic data carrying the electrocardiographic features needs to be subjected to segmentation processing. Because the data characteristics in different databases are different, the specific segmentation modes are different, specifically, the highest point in the MIT-BIH electrocardiogram database is the point where the R wave appears, when the electrocardiogram is intercepted, the R wave point is taken as the intercept point, the first 99 sampling points of the R wave point and the last 200 sampling points of the R wave point are taken, the total 300 sampling points are taken as one sample, and each section of the electrocardiogram is intercepted according to the method; in the EU ST-T electrocardiogram database, because the sampling rate is low, the number of sampling points needs to be reduced, specifically, an R wave point is taken as an intercept point, 74 sampling points before the R wave point and 125 sampling points after the R wave point are taken, 200 sampling points are taken as a sample, and each section of ECG signal data is intercepted according to the method. Therefore, the characteristics of the electrocardiogram data can be retained to the greatest extent, and meanwhile, the calculated amount is reduced as much as possible, so that the classification accuracy and the training time of the electrocardiogram data are improved.
S2, constructing a network model;
the network model of this embodiment is obtained by modifying a classical ResNet-18 network, which is disclosed in the publication of "Deep reactive Learning for Image Recognition" in the journal IEEE. ResNet-18 is a network model for image recognition, and its core idea is: in the process of deepening the network layer number, if a certain convolution layer completely learns the data rule, the way of deepening the network can be still continued, so that the output of the network is kept unchanged, and the residual error unit in the ResNet-18 achieves the effect, so that the problem of network degradation can be avoided in the process of deepening the network. As shown in fig. 3, the network model constructed in this embodiment sequentially includes a convolutional layer 1+ BN layer + ReLU + global maximum pooling layer, a RE1.1 residual module, a RE2 residual module, and a global average pooling layer + full-connected layer, where the convolutional layer 1 is a 3 × 3 convolutional network and the step size is 1. The specific feature number, that is, the number of points of a segment of electrocardiographic data, needs to be dynamically adjusted according to the actual situation, and the feature number set in this embodiment is 300 to 250. As shown in fig. 4, after the electrocardiographic data input into the network model passes through the convolutional layer 1+ BN layer + ReLU + global maximum pooling layer, the number of channels increases and the number of features decreases, specifically, the number of channels changes from 1 to 64, the number of features becomes half, the number of channels increases to prepare for deeper feature extraction, and the decrease in the number of features can reduce the computational complexity, so that the electrocardiographic data classification accuracy is higher; the number of channels is further increased through an RE1.1 residual error module and an RE2 residual error module, the number of features is further reduced, the number of channels is increased to 128, and the number of features is reduced to 5, so that the network model can be well iterated without increasing the calculated amount, the problem of gradient disappearance or gradient explosion is avoided, and the number of features of the global average pooling layer is reduced to 1; and finally, classifying by using the full connection layer and outputting a classification result.
The structure diagram of the Residual block constructed according to the idea in the document named "Deep Residual Learning for Image Recognition" is shown in fig. 5, where m represents the feature number of the electrocardiographic data, specifically, the number of points of each electrocardiographic data, n is the number of channels, and the channels can be understood as the representation form of the electrocardiographic data. The residual error unit realizes functions through a plurality of convolutional layers, in the residual error unit RE1.1, the final channel number is twice of the input number, and the characteristic number is half of the input number; in a residual error unit RE1.2, the final channel number and the characteristic number are kept unchanged; in residual unit RE2, the final channel number becomes one-fourth of the input and the feature number becomes one-half of the input.
The RE1.1 residual module is composed of four residual units RE1.1 connected in sequence as shown in fig. 5, and a DP layer is added to each of the four residual units RE1.1, specifically, as shown in fig. 3, the DP layer is disposed after the convolutional layer 3 and before the BN layer, so that an over-fitting phenomenon can be avoided, specifically, since the electrocardiographic data is subjected to two feature extractions of the convolutional layer 2 and the convolutional layer 3, there is a problem of over-extracting features, which may cause over-fitting and be unfavorable for classification of the electrocardiographic data, it is necessary to add the DP layer after the convolutional layer 3 to inactivate a part of network neurons, and more specifically, to dispose the DP layer after the BN layer to prevent variance deviation, but in the network model constructed in the present application, the DP layer is disposed after the BN layer, which may cause over-fitting problem and aggravate over-fitting, so that the DP layer is disposed after the convolutional layer 3, BN layer in front, to avoid overfitting of the constructed network model. In fig. 3, four sequentially connected residual error units RE1.1 are arranged, and are related to the feature number of the electrocardiographic data, after the four residual error units RE1.1 are performed, the feature number can be reduced from 150 to 5 through the sequential residual error unit RE2, and if the number of times of performing the process is 4, the electrocardiographic data with the feature number of 5 cannot be obtained finally, so that the tasks of global average pooling and a full connection layer are influenced, and finally, the classification accuracy cannot be improved.
The RE2 residual block is a residual unit RE2 as shown in fig. 5, i.e. residual unit RE2 is concatenated after four residual units RE1.1 while residual unit RE1.2 in the existing residual block is deleted. Specifically, the original residual error unit RE1.2 is deleted, so that the number of network layers is reduced, the complexity of a network model is reduced, the running speed of the network model is increased, and the time of a training process and a classification process is saved; the channel number is increased by reducing the feature number of the residual error unit RE1.1, and the residual error unit RE2 is connected behind the four residual error units RE1.1, so that the channel number and the feature number can be reduced, the features are further fused and extracted, the feature concentration is improved, the features are concentrated and fused, the calculation complexity can be reduced, the calculation speed is improved, the time is saved, the time cost is reduced, and the classification accuracy is improved; in addition, the DP layer added in the residual error unit RE1.1 can avoid overfitting of the network model. More specifically, in the residual error unit RE1.1, the convolution kernel size of the convolutional layer 2 is 3, the step size is 2, the convolution kernel size of the convolutional layer 3 is 3, the step size is 1, the convolution kernel size of the convolutional layer 4 is 1, and the step size is 2, directly adding the results of the convolutional layer 2 and the convolutional layer 3 and the result of the convolutional layer 4 to obtain the result of the residual error unit RE1.1, wherein both the step sizes of the convolutional layer 2 and the convolutional layer 4 are 2, so that more features in the electrocardiographic data can be extracted, thus the fully-connected layers can be classified more easily, and the classification accuracy of the electrocardiographic data is further improved; meanwhile, 4 residual error units RE1.1 are provided, so that feature extraction and fusion can be further performed, and the classification accuracy is improved. The RE2 residual module is a residual unit RE2 as shown in fig. 5, specifically, in the residual unit RE2, the sizes of convolution kernels of the convolutional layers 5 and 6 are 3, the step sizes are both 2, the size of convolution kernel of the convolutional layer 7 is 1, and the step size is 4; specifically, although the number of channels of the electrocardiographic data is increased as a whole, the number of channels in the RE2 residual module is decreased, which is different from the design in the prior art, the number of channels in the prior art is generally unchanged or continuously increased, and the classification accuracy of the electrocardiographic signals is improved by the design of decreasing the number of channels in a local link in the present application, which is a new design concept.
The convolution kernel is an odd number of convolution kernels, so that null value filling and deletion are convenient to perform, more specifically, the size of the convolution kernel adopted in the method is 3, because the convolution kernel larger than 3 excessively extracts surface layer features and cannot learn deep layer features, the classification accuracy is low, the convolution kernel smaller than 3 extracts fewer features, and if the number of convolution layers is increased, the calculated amount of a network is increased to reduce the running speed, so that the convolution layer with the convolution kernel of 3 is selected by combining the depth and the running speed of feature extraction. The specific step length is set according to the electrocardio data, so that the surface features are excessively extracted and deep features cannot be learned too fast, and the electrocardio data classification accuracy is low.
Full connection layer: the full connectivity layer is used with Softmax for classification. The network model of the embodiment has high accuracy in classifying different types of electrocardiogram data, and the training and classifying time is short.
S3, training and testing the constructed network model;
the network model constructed in step S2 is trained and tested. The constructed network model is iteratively trained in the present embodiment using Adam optimization algorithm and crosscontrol loss function. The Adam algorithm is different from the traditional random gradient descent, the random gradient descent keeps a single learning rate (namely alpha) to update all weights, and the learning rate is not changed in the training process; adam algorithm is described as an advantage set of two random gradient descent expansion types, independent adaptive learning rates are designed for different parameters by Adam through calculating first moment estimation and second moment estimation of gradients, so that the learning rate in the training process can be automatically optimized, relevant setting is not needed for the learning rate during training, the learning rate can be dynamically adjusted according to loss of current training, and manual optimization cannot be achieved. The crossEncopy loss function is well applied to the classification task and is therefore used during the training process.
And training the network model by using the electrocardiogram data in the training set, wherein the electrocardiogram data in the training set is trained for a plurality of times in each training, and then the test set is input into the network model for testing to determine whether the standard is met. The training process adjusts the hyper-parameters according to the average error and the accuracy of the training set, and finally obtains the hyper-parameters respectively through a plurality of times of long-time experimental exploration: the epochs (number of data uses) is 10, bs (number of data used for optimization per gradient descent) is 256, lr (learning rate) is 0.003, betas (second-order momentum exponential decay coefficient) is (0.9,0.95), tol (minimum loss threshold) is 10 × 5, and wd (weight decay coefficient) is 0.00001. The loss value and the accuracy on the test set are taken as the good standard of the network model test, and the accuracy is over 99 percent.
The overall classification accuracy of the electrocardiographic data in the test set in the six types of electrocardiographic data MIT-BIH electrocardiographic data-arrhythmia database, the sudden cardiac death dynamic electrocardiographic database, the European Union ST-T electrocardiographic data-MLII lead data set, the European Union ST-T electrocardiographic data-V5 lead data set, the European Union ST-T electrocardiographic data-double lead data set and the MIT-BIH electrocardiographic data-ST segment database on the network model of the embodiment is respectively 99.60%, 99.32%, 99.57%, 99.76%, 99.52% and 99.60%, the accuracy of each classification category is also high, and the specific accuracy results are listed in tables 1-4. The accuracy rate of electrocardiosignal classification is higher. Compared with embodiment 2, the average training time length of the present embodiment is reduced by 41.73%, that is, the time cost of the method of the present embodiment is reduced.
And S4, classifying the electrocardio data by using the tested network model.
The tested network model has learned enough characteristics of the electrocardiogram data, and can then classify the six types of electrocardiogram data in the step S1, compared with the existing network model trained only for a certain type of electrocardiogram data, the network model obtained in the step S3 has stronger generalization and higher classification accuracy for various types of electrocardiogram data.
Example 2:
the difference between this example and example 1 is: the network model constructed in step S2 is a classical ResNet-18 network, specifically, the network model is constructed by the applicant according to the method disclosed in the document named "Deep Residual Learning for Image Recognition", i.e., the related parameters, and is optimized only with the goal of adjusting the hyper-parameters. More specifically, as shown in fig. 6, the convolutional layer 1+ BN layer + ReLU + global average pooling layer, residual module, global maximum pooling layer, and fully-connected layer are included in this order. More specifically, as shown in fig. 7, the electrocardiographic data input into the network model passes through the convolutional layer 1+ BN layer + ReLU + global average pooling layer, the number of channels increases and the number of features decreases, specifically, the number of channels changes from 1 to 64, and the number of features changes to half; then, the number of channels is further increased through a residual module, the number of features is further reduced, the number of channels is increased to 512, which is larger than 128 corresponding to the embodiment 1, and the number of features is reduced to 10, which is larger than 5 corresponding to the embodiment 1; then reducing the feature number of the global maximum pooling layer to 1; and finally, classifying by using the full connection layer and outputting a classification result.
A residual module: four residual units RE1.1 and RE1.2 as shown in fig. 5 are constructed in series, specifically, four "RE 1.1+ RE 1.2" are arranged to be connected in sequence. More specifically, the setting of the residual unit RE1.1 is different from that of embodiment 1 in that the DP layer is not provided in this embodiment. In residual unit RE1.2, the convolution kernel sizes of convolutional layers 8 and 9 are 3, the step lengths are both 1, the convolution kernel size of convolutional layer 10 is 1, and the step length is 1.
The classification result of the network model of this embodiment: the overall classification accuracy of the electrocardiographic data in the test set in the six types of electrocardiographic data MIT-BIH electrocardiographic data-arrhythmia database, the sudden cardiac death dynamic electrocardiographic database, the European Union ST-T electrocardiographic data-MLII lead data set, the European Union ST-T electrocardiographic data-V5 lead data set, the European Union ST-T electrocardiographic data-double lead data set and the MIT-BIH electrocardiographic data-ST segment database on the network model of the embodiment is respectively 99.42%, 99.17%, 99.27%, 99.72%, 99.30% and 99.50%, the accuracy of each classification category is also low, and the specific accuracy results are listed in tables 1-4. The accuracy of the classification of the electrocardiosignals in the embodiment is lower than that of the classification in the embodiment 1 on six types of electrocardio data, and meanwhile, the required training time and the classification time are longer due to the existence of the residual error unit RE 1.2; this shows that in the network model in step S2 in embodiment 1 of the present invention, the first residual module first passes through four residual units RE1.1 to increase the number of channels and reduce the number of features, and then passes through residual unit RE2 to reduce the number of channels and the number of features, so that the classification accuracy of the electrocardiographic data can be effectively increased, and the residual unit RE1.2 is removed to reduce the time required for training.
Example 3:
the difference between this example and example 1 is: the network model constructed in step S2 is constructed according to the network model and related parameters disclosed in the document with the document name "Deep Residual Learning for Image Recognition" and disclosed in the journal IEEE, so as to adjust the number of convolutional layers and the number of neurons in each hidden layer as an optimization target. As shown in fig. 8, the network model of the present embodiment includes three convolutional layers 11+ BN layer + ReLU + global maximum pooling layer ", convolutional layer 12, and fully-connected layers, which are connected in sequence. Specifically, as shown in fig. 9, the electrocardiographic data is input into the network model, and passes through three convolutional layers 11+ BN + ReLU + global maximum pooling layer "and 12, so that the number of channels with reduced feature number is increased, the configured convolutional layers 12 can continue to extract features, the classification accuracy is higher, the number of channels is further increased by using the fully-connected layers, the number of features is further reduced by half, finally, the fully-connected layers are used for classification, and the classification result is output to the network model.
The classification result of the network model of this embodiment: the overall classification accuracy of the electrocardiographic data in the test set in the six types of electrocardiographic data MIT-BIH electrocardiographic data-arrhythmia database, the sudden cardiac death dynamic electrocardiographic database, the European Union ST-T electrocardiographic data-MLII lead data set, the European Union ST-T electrocardiographic data-V5 lead data set, the European Union ST-T electrocardiographic data-double lead data set and the MIT-BIH electrocardiographic data-ST segment database on the network model of the embodiment is respectively 99.24%, 99.19%, 98.71%, 99.32%, 98.92% and 99.54%, the accuracy on each classification category is also low, and the specific accuracy results are listed in tables 1-4. The accuracy of classification of the electrocardiosignals in the embodiment is lower than that of the classification in the embodiment 1 in six types of electrocardio data, which shows that the classification accuracy of the embodiment 1 is higher.
Example 4:
the present embodiment differs from embodiment 1 in that: the network model constructed in step S2 is constructed according to the network model and related parameters disclosed in the document with the document name "Deep research Learning for Image Recognition" and disclosed in the journal IEEE by reference. As shown in fig. 10, the network model of the present embodiment is constructed by adding a residual error unit RE1.1 between the convolutional layer 12 and the fully-connected layer after the convolutional layer 12 is close to the fully-connected layer, based on the network model provided in embodiment 3. As shown in fig. 11, after the residual error unit RE1.1 is added, the network can be deepened, the capability of extracting features of the network model can be improved, that is, the performance of the residual error unit can be verified and the signal features can be extracted more deeply, and the burden of the network model is not additionally increased.
The classification result of the network model of this embodiment: the overall accuracy of classification of the electrocardiographic data in the test set in the six types of electrocardiographic data MIT-BIH electrocardiographic data-arrhythmia database, cardiogenic sudden death dynamic electrocardiographic database, European Union ST-T electrocardiographic data-MLII lead data set, European Union ST-T electrocardiographic data-V5 lead data set, European Union ST-T electrocardiographic data-double lead data set and MIT-BIH electrocardiographic data-ST segment database on the network model of the embodiment is 99.42%, 99.16%, 99.09%, 99.71%, 99.21% and 99.65%, except the accuracy on MIT-BIH electrocardiographic data-ST segment database, the classification accuracy on other five types of electrocardiographic data sets or MIT databases is lower than that in embodiment 1, but the classification accuracy on the single classification V in MIT-BIH electrocardiographic data-ST segment database of embodiment 1 reaches 100%, the method of embodiment 1 has high classification accuracy. Compared with the embodiment 3, except that the accuracy rate on the dynamic electrocardiographic database of sudden cardiac death is lower, the classification accuracy rates on other types of electrocardiographic data sets or databases are higher than the result of the embodiment 3, which shows that the increase of the residual error unit RE1.1 effectively improves the classification accuracy rate.
The results in tables 1-4 show that: the average accuracy of the scheme in example 1 on four data sets is 99.56%, compared with the other three examples, the overall classification accuracy is respectively improved by 0.64%, 1.20% and 0.60%, and compared with example 2, the average training duration in example 1 is reduced by 41.73%, which indicates that the method in example 1 of the present application has higher accuracy in classifying electrocardiographic data and requires less training time.
The results in tables 1-4 are all averaged over multiple runs, and therefore the reliable spectrum of results is higher, with parameters determined first at a large scale and then further at a small scale. The accuracy of classification through the network model is high, the accuracy of the existing classification is as high as more than 90%, the classification accuracy is required to be improved continuously at the moment, particularly, the accuracy of classification of different types of electrocardiogram data is difficult to improve, and the comprehensive effects of generalization, classification accuracy and training speed are required to be considered.
And (3) testing results:
table 1: example 1-test results of different network models constructed in step S2 in example 4 on the MIT-BIH electrocardiographic data-arrhythmia database;
Figure BDA0003609609250000141
table 2: example 1-test results of different network models constructed in step S2 in example 4 on the rdc database;
Figure BDA0003609609250000142
table 3: example 1-test results of different network models constructed in step S2 in example 4 on eu ST-T electrocardiographic database;
Figure BDA0003609609250000143
Figure BDA0003609609250000151
table 4: example 1-test results of different network models constructed in step S2 of example 4 on the MIT-BIH electrocardiographic data-ST segment database.
Figure BDA0003609609250000152
The BN layer, the ReLu, the global maximum pooling, the global average pooling and the full connection layer are all arranged the same.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A one-dimensional electrocardiogram data classification method based on a residual error network is characterized by comprising the following steps:
s1, acquiring the electrocardiogram data and preprocessing the electrocardiogram data;
s2, constructing a network model;
s3, training and testing the constructed network model;
and S4, classifying the electrocardio data by using the tested network model.
2. The residual network-based one-dimensional electrocardiographic data classification method according to claim 1, wherein the electrocardiographic data obtained in step S1 includes six different electrocardiographic data types, and the obtained electrocardiographic data is randomly scrambled and then divided into a training set and a test set.
3. The residual network-based one-dimensional electrocardiographic data classification method according to claim 2, wherein the ratio of the training set to the test set is 7: 3.
4. The residual network-based one-dimensional electrocardiographic data classification method according to claim 3, wherein the preprocessing in step S1 includes denoising and segmentation, and a wavelet nine-scale threshold filtering algorithm is used to denoise the electrocardiographic data.
5. The method for classifying one-dimensional electrocardiographic data based on the residual error network as claimed in claim 4, wherein in step S2, a convolutional layer + BN layer + ReLU + global maximum pooling layer, a RE1.1 residual module, a RE2 residual module, a global average pooling layer + full connection layer are sequentially constructed.
6. The method of claim 5, wherein the convolutional layer is a 3 x 3 convolutional network.
7. The method as claimed in claim 6, wherein the RE1.1 residual module comprises a DP layer.
8. The residual network-based one-dimensional electrocardiographic data classification method according to claim 7, wherein in step S3, the constructed network model is iteratively trained by using Adam optimization algorithm and cross control loss function.
9. The method for classifying one-dimensional electrocardiographic data based on residual error network of claim 8, wherein in step S3, the loss value and the accuracy on the test set are used as the standard for testing the network model.
10. The residual network-based one-dimensional electrocardiographic data classification method according to claim 1, wherein the activation function in the network model is a ReLU activation function.
CN202210429753.9A 2022-04-22 2022-04-22 One-dimensional electrocardiogram data classification method based on residual error network Pending CN114692698A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210429753.9A CN114692698A (en) 2022-04-22 2022-04-22 One-dimensional electrocardiogram data classification method based on residual error network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210429753.9A CN114692698A (en) 2022-04-22 2022-04-22 One-dimensional electrocardiogram data classification method based on residual error network

Publications (1)

Publication Number Publication Date
CN114692698A true CN114692698A (en) 2022-07-01

Family

ID=82145325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210429753.9A Pending CN114692698A (en) 2022-04-22 2022-04-22 One-dimensional electrocardiogram data classification method based on residual error network

Country Status (1)

Country Link
CN (1) CN114692698A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115169234A (en) * 2022-07-17 2022-10-11 无锡格策电气有限公司 Power network reliability assessment method based on big data analysis
CN117322888A (en) * 2023-11-01 2024-01-02 广州逆熵电子科技有限公司 Single-lead electrocardiograph data processing method and device based on time-frequency domain fusion

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110916647A (en) * 2019-12-11 2020-03-27 郑州轻工业大学 Wearable electrocardio monitoring and arrhythmia remote real-time diagnosis device facing multiple scenes
CN112906748A (en) * 2021-01-25 2021-06-04 浙江大学 12-lead ECG arrhythmia detection classification model construction method based on residual error network
CN113274031A (en) * 2021-04-30 2021-08-20 西安理工大学 Arrhythmia classification method based on deep convolution residual error network
CN113288161A (en) * 2021-06-02 2021-08-24 南京信息工程大学 Single-lead ECG signal classification method and system based on improved residual error network
CN113768514A (en) * 2021-08-09 2021-12-10 西安理工大学 Arrhythmia classification method based on convolutional neural network and gated cyclic unit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110916647A (en) * 2019-12-11 2020-03-27 郑州轻工业大学 Wearable electrocardio monitoring and arrhythmia remote real-time diagnosis device facing multiple scenes
CN112906748A (en) * 2021-01-25 2021-06-04 浙江大学 12-lead ECG arrhythmia detection classification model construction method based on residual error network
CN113274031A (en) * 2021-04-30 2021-08-20 西安理工大学 Arrhythmia classification method based on deep convolution residual error network
CN113288161A (en) * 2021-06-02 2021-08-24 南京信息工程大学 Single-lead ECG signal classification method and system based on improved residual error network
CN113768514A (en) * 2021-08-09 2021-12-10 西安理工大学 Arrhythmia classification method based on convolutional neural network and gated cyclic unit

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
赵小川: "深度学习经典案例解析:基于MATLAB", 31 July 2021, 机械工业出版社, pages: 46 - 48 *
齐继;张瑞卿;沈阳;常世杰;沙宪政;: "基于稀疏连接残差网络的心脏传导阻滞精确定位的自动识别", 中国医疗器械杂志, no. 02, 30 March 2019 (2019-03-30) *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115169234A (en) * 2022-07-17 2022-10-11 无锡格策电气有限公司 Power network reliability assessment method based on big data analysis
CN115169234B (en) * 2022-07-17 2023-09-15 无锡格策电气有限公司 Power network reliability assessment method based on big data analysis
CN117322888A (en) * 2023-11-01 2024-01-02 广州逆熵电子科技有限公司 Single-lead electrocardiograph data processing method and device based on time-frequency domain fusion
CN117322888B (en) * 2023-11-01 2024-04-19 广州逆熵电子科技有限公司 Single-lead electrocardiograph data processing method and device based on time-frequency domain fusion

Similar Documents

Publication Publication Date Title
CN107822622B (en) Electrocardiogram diagnosis method and system based on deep convolutional neural network
CN110840402B (en) Atrial fibrillation signal identification method and system based on machine learning
CN111990989A (en) Electrocardiosignal identification method based on generation countermeasure and convolution cyclic network
CN107811626A (en) A kind of arrhythmia classification method based on one-dimensional convolutional neural networks and S-transformation
CN114692698A (en) One-dimensional electrocardiogram data classification method based on residual error network
CN109036573A (en) Electrocardiogram based on production confrontation network technology generates and classification method
CN108647614A (en) The recognition methods of electrocardiogram beat classification and system
CN109480824B (en) Method and device for processing electrocardio waveform data and server
Cao et al. Atrial fibrillation detection using an improved multi-scale decomposition enhanced residual convolutional neural network
CN110638430B (en) Method for building cascade neural network ECG signal arrhythmia classification model
CN112508110A (en) Deep learning-based electrocardiosignal graph classification method
CN106815853A (en) To the dividing method and device of retinal vessel in eye fundus image
CN111329469A (en) Arrhythmia prediction method
CN111202512A (en) Electrocardiogram classification method and device based on wavelet transformation and DCNN
CN113180688B (en) Coronary heart disease electrocardiogram screening system and method based on residual error neural network
CN110477909B (en) Gender classification method based on resting electroencephalogram data
CN111956208B (en) ECG signal classification method based on ultra-lightweight convolutional neural network
CN112603330A (en) Electrocardiosignal identification and classification method
CN113509186B (en) ECG classification system and method based on deep convolutional neural network
CN114145745B (en) Graph-based multitasking self-supervision emotion recognition method
CN111557660A (en) Arrhythmia identification method under sub-population deep learning framework
CN110811591A (en) Heart failure grading method based on heart rate variability
CN116035593B (en) Electrocerebral noise reduction method based on generation countermeasure type parallel neural network
CN116211315A (en) Single-lead electrocardiosignal auxiliary diagnosis method and diagnosis terminal
CN115500807A (en) Arrhythmia classification detection method and system based on small convolutional neural network

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