Electrocardiogram data classification method based on 12-lead and convolutional neural network

文档序号:1258190 发布日期:2020-08-25 浏览:9次 中文

阅读说明:本技术 一种基于12导联和卷积神经网络的心电数据分类方法 (Electrocardiogram data classification method based on 12-lead and convolutional neural network ) 是由 褚菲 李佳 魏宇伦 韦昊然 杨思怡 李明 于 2020-05-18 设计创作,主要内容包括:一种基于12导联和卷积神经网络的心电数据分类方法,从PTB诊断心电数据库中获取12导联心电数据信号;利用小波变换去噪算法对步骤一中获取到的信号进行降噪处理;采用小波模极大值结合可变阈值法对步骤二中降噪处理的信号进行处理;利用步骤三中获得的R波峰位置信息,分解12导联心电图的周期,然后再提取每个周期的P-QRS-T特征段;选取出合适的心电信号并根据设定采样点对心电信号进行数据采样;构造一维卷积神经网络,设定一维卷积神经网络输入层、隐含层和输出层的节点数,并对一维卷积神经网络进行训练,搭建12导联心电图分类模型。该方法可以快速地识别出患有心血管疾病的病人的心电信号。(An electrocardio data classification method based on 12 leads and a convolutional neural network is characterized in that 12 leads of electrocardio data signals are obtained from a PTB diagnosis electrocardio database; carrying out noise reduction processing on the signals acquired in the first step by using a wavelet transform denoising algorithm; processing the noise reduction processed signals in the second step by adopting a wavelet modulus maximum value and combining a variable threshold value method; decomposing the cycle of the 12-lead electrocardiogram by utilizing the R peak position information obtained in the third step, and then extracting the P-QRS-T characteristic section of each cycle; selecting a proper electrocardiosignal and carrying out data sampling on the electrocardiosignal according to a set sampling point; and constructing a one-dimensional convolutional neural network, setting the node number of an input layer, a hidden layer and an output layer of the one-dimensional convolutional neural network, training the one-dimensional convolutional neural network, and constructing a 12-lead electrocardiogram classification model. The method can quickly identify the electrocardiosignals of a patient suffering from cardiovascular diseases.)

1. A method for classifying electrocardiogram data based on 12 leads and a convolutional neural network is characterized by comprising the following steps:

the method comprises the following steps: acquiring 12-lead electrocardiogram data signals from a PTB diagnosis electrocardiogram database;

step two: carrying out noise reduction processing on the signals acquired in the first step by using a wavelet transform denoising algorithm;

step three: processing the noise reduction processed signals in the second step by adopting a wavelet modulus maximum value and combining a variable threshold value method; firstly, transforming 12-lead electrocardiosignals by using a Mallat algorithm, and positioning a zero crossing point so as to position an R wave peak value on a time domain space;

step four: decomposing the cycle of the 12-lead electrocardiogram by utilizing the R peak position information obtained in the third step, and then extracting the P-QRS-T characteristic section of each cycle;

step five: selecting a proper electrocardiosignal and carrying out data sampling on the electrocardiosignal according to a set sampling point;

step six: the method comprises the steps of constructing a one-dimensional convolutional neural network, setting the node numbers of an input layer, a hidden layer and an output layer of the one-dimensional convolutional neural network and the weights among nodes of adjacent layers, training the one-dimensional convolutional neural network, classifying 12-lead electrocardiogram data signals by adopting a one-dimensional convolutional neural network model, extracting characteristic information of the 12-lead electrocardiogram, and identifying electrocardiosignals of a patient suffering from cardiovascular diseases.

2. The method for classifying electrocardiographic data based on 12-lead and convolutional neural network as claimed in claim 1, wherein the wavelet transform denoising algorithm in step two specifically comprises the following steps:

s1: selecting coif4 in a coifield wavelet system as a wavelet basis function in wavelet denoising;

s2: determining the wavelet decomposition layer number j in the denoising process according to the sampling frequency and the noise frequency of the 12-lead electrocardiogram by adopting a formula (2);

in the formula (f)sTo sample frequency, fnoise=infmin{fnoise1,fnoise2......fnoisenThe lowest frequency of all noises in 12-lead electrocardiosignals is taken as a lower limit frequency, wherein fnoise1,fnoise2......fnoisenFor the frequency bands of N different noise types contained in the 12-lead cardiac signal,represents rounding down;

s3: denoising the 12-lead electrocardiosignals by adopting discrete wavelet transform according to a formula (3);

in the formula, Ψjk(t) is a discrete wavelet basis;is Ψjk(t) complex conjugation; WT (WT)fAnd (j, k) are discrete wavelet transform coefficients.

3. The method for classifying electrocardiographic data based on 12-lead and convolutional neural networks as claimed in claim 2, wherein in step six, dropout technique is adopted, that is, part of neurons in one-dimensional convolutional neural network are discarded randomly according to a certain proportion, and Batch Normalization layer is added to intermediate feature layer for Batch Normalization.

Technical Field

The invention provides an electrocardiogram data classification method based on 12-lead and convolutional neural networks.

Background

The 12-lead electrocardiogram is a typical diagnostic tool for reflecting physiological states of various parts of the heart, and comprises 12 leads (I, II, III, aVR, aVL, aVF, V1-V6) which are used for detecting different parts of the heart respectively. Since the detection of different types of cardiovascular diseases requires the evaluation of complex changes of different leads, it is time-consuming and labor-consuming to manually analyze the electrocardiogram to assist the diagnosis of cardiovascular diseases, and the diagnosis result is not ideal enough. Therefore, in order to effectively and reliably analyze 12-lead electrocardiograms, existing researchers have proposed various automatic cardiovascular disease detection algorithms to address the limitations of manual analysis of 12-lead electrocardiograms.

However, most of the existing research works are based on 12-lead electrocardiogram to detect certain cardiovascular diseases. These studies have achieved a certain amount of results for a cardiovascular disease, but they are very limited, and few work is done to examine how to detect various cardiovascular diseases, which makes it difficult to effectively assist clinical diagnosis of cardiovascular diseases. Therefore, the rapid and efficient automatic cardiovascular disease detection method has great significance for clinical auxiliary artificial electrocardiogram analysis.

Disclosure of Invention

Aiming at the problems in the prior art, the invention provides the electrocardio-data classification method based on the 12-lead and convolutional neural networks, which is time-saving and labor-saving, can quickly and effectively analyze 12-lead electrocardiogram data and can quickly identify the electrocardio-signals of patients suffering from cardiovascular diseases.

The invention provides an electrocardiogram data classification method based on 12-lead and convolutional neural networks, which comprises the following steps:

the method comprises the following steps: acquiring 12-lead electrocardiogram data signals from a PTB diagnosis electrocardiogram database;

step two: carrying out noise reduction processing on the signals acquired in the first step by using a wavelet transform denoising algorithm;

step three: processing the noise reduction processed signals in the second step by adopting a wavelet modulus maximum value and combining a variable threshold value method; firstly, transforming 12-lead electrocardiosignals by using a Mallat algorithm, and positioning a zero crossing point so as to position an R wave peak value on a time domain space;

step four: decomposing the cycle of the 12-lead electrocardiogram by utilizing the R peak position information obtained in the third step, and then extracting the P-QRS-T characteristic section of each cycle;

step five: selecting a proper electrocardiosignal and carrying out data sampling on the electrocardiosignal according to a set sampling point;

step six: the method comprises the steps of constructing a one-dimensional convolutional neural network, setting the node numbers of an input layer, a hidden layer and an output layer of the one-dimensional convolutional neural network and the weights among nodes of adjacent layers, training the one-dimensional convolutional neural network, classifying 12-lead electrocardiogram data signals by adopting a one-dimensional convolutional neural network model, extracting characteristic information of the 12-lead electrocardiogram, and identifying electrocardiosignals of a patient suffering from cardiovascular diseases.

Further, in order to identify the required electrical signals more effectively, the wavelet transform denoising algorithm in the step two specifically comprises the following steps:

s1: selecting coif4 in a coifield wavelet system as a wavelet basis function in wavelet denoising;

s2: determining the wavelet decomposition layer number j in the denoising process according to the sampling frequency and the noise frequency of the 12-lead electrocardiogram by adopting a formula (2);

in the formula (f)sTo sample frequency, fnoise=infmin{fnoise1,fnoise2......fnoisenThe lowest frequency of all noises in 12-lead electrocardiosignals is taken as a lower limit frequency, wherein fnoise1,fnoise2......fnoisenFor the frequency bands of N different noise types contained in the 12-lead cardiac signal,represents rounding down;

s3: denoising the 12-lead electrocardiosignals by adopting discrete wavelet transform according to a formula (3);

in the formula, Ψjk(t) is a discrete wavelet basis;is Ψjk(t) complex conjugation; WT (WT)fAnd (j, k) are discrete wavelet transform coefficients.

Further, in order to improve the stability and the running speed of the one-dimensional convolutional neural network model, in the sixth step, a dropout technology is adopted, namely, part of neurons in the one-dimensional convolutional neural network are discarded randomly according to a certain proportion, and a Batch Normalization layer is added to carry out Batch standardization on the intermediate characteristic layer.

In the method, the electrocardiosignal is denoised by adopting discrete wavelet transform, so that the noise can be effectively removed; and a one-dimensional convolution neural network model is adopted, so that a more accurate detection result can be obtained more quickly when 12-lead electrocardiosignals are identified after training. The method is time-saving and labor-saving, can quickly and effectively analyze 12-lead electrocardiogram data, and can quickly identify the electrocardiosignals of patients suffering from cardiovascular diseases.

Drawings

FIG. 1 is a flow chart of the present invention;

FIG. 2 is a diagram of a convolutional neural network model architecture in accordance with the present invention;

FIG. 3 is a graph of the performance characteristics of subjects of the present invention.

Detailed Description

The invention will be further explained with reference to the drawings.

As shown in FIG. 1, the invention provides an electrocardiographic data classification method based on 12-lead and convolutional neural networks, which comprises the following steps:

the method comprises the following steps: acquiring 12-lead electrocardiogram data signals from a PTB Diagnostic ECG Database (PTB Diagnostic ECG Database), wherein the data signals comprise five subjects including myocardial infarction, heart failure, arrhythmia, bundle branch block and healthy control group, and the myocardial infarction, the heart failure, the arrhythmia and the bundle branch block are classified into cardiovascular diseases;

step two: because the wavelet transform time-frequency localization characteristic can be used for effectively filtering noise overlapped with the electrocardiosignals, the wavelet transform denoising algorithm is used for denoising the signals obtained in the first step; x [ n ] ═ f (n) + w (n) (1);

wherein n is time, x [ n ] is a signal containing noise, f (n) is a useful signal, w (n) is a white Gaussian noise signal; after wavelet transform is carried out on the useful signals f (n), the energy of the mutation points is concentrated on wavelet coefficients with larger scales, the wavelet coefficients of the noise signals have no correlation after the wavelet transform, and the wavelet on the scales on which the noise signals are concentrated is reconstructed after the wavelet is subjected to concentrated processing, so that the wavelet transform process is completed. For example, after wavelet transformation, gaussian white noise is still gaussian white noise, wavelet coefficients of which have no correlation, and wavelet coefficients obtained after wavelet transformation of gaussian white noise are distributed on various scales, and the amplitude of each part is not large, so that the wavelet coefficients can be separated in a way of processing and reconstructing the wavelet coefficients after wavelet transformation, and other noises are similar.

Step three: processing the noise reduction processed signals in the second step by adopting a wavelet modulus maximum value and combining a variable threshold value method; firstly, transforming 12-lead electrocardiosignals by using a Mallat algorithm, and positioning a zero crossing point so as to position an R wave peak value on a time domain space;

step four: decomposing the cycle of the 12-lead electrocardiogram by utilizing the R peak position information obtained in the third step, and then extracting the P-QRS-T characteristic section of each cycle;

step five: selecting a proper electrocardiosignal and carrying out data sampling on the electrocardiosignal according to a set sampling point;

step six: the method comprises the steps of constructing a one-dimensional convolutional neural network, setting the node numbers of an input layer, a hidden layer and an output layer of the one-dimensional convolutional neural network and the weights among nodes of adjacent layers, training the one-dimensional convolutional neural network, classifying 12-lead electrocardiogram data signals by adopting a one-dimensional convolutional neural network model, extracting characteristic information of the 12-lead electrocardiogram, and identifying electrocardiosignals of a patient suffering from cardiovascular diseases.

The wavelet transformation denoising algorithm in the step two specifically comprises the following steps:

s1: because the Coiflet wavelet system (coif N, wherein N is 1,2,3,4,5) has good symmetry and the wavelet basis function is similar to the waveform of an electrocardiosignal, the coif4 in the Coiflet wavelet system is selected as the wavelet basis function in the wavelet denoising;

s2: when the wavelet is denoised, the selection of the wavelet decomposition layer number j is very important, and is determined by the sampling frequency and the frequency range of the noise, the decomposition layer number is different, and the denoising effect is also different. Determining the wavelet decomposition layer number j in the denoising process according to the sampling frequency and the noise frequency of the 12-lead electrocardiogram by adopting a formula (2);

in the formula (f)sTo sample frequency, fnoise=infmin{fnoise1,fnoise2......fnoisenThe lowest frequency of all noises in 12-lead electrocardiosignals is taken as a lower limit frequency, wherein fnoise1,fnoise2......fnoisenFor the frequency bands of N different noise types contained in the 12-lead cardiac signal,represents rounding down;

as can be seen from equation (2), the sampling frequency, the noise frequency, and the signal length together determine the number of decomposition layers.

In the noise of 12-lead electrocardiosignals, the frequency of baseline drift is the lowest and is lower than 0.5Hz, the sampling frequency of a PTB Diagnostic ECG Database (PTB Diagnostic ECG Database) is 1000Hz, and the sampling point of each group of signals is 10000. The baseline drift frequency is substituted into the formula (2), so that j is 10, and denoising is realized by performing 10-layer wavelet decomposition on the electrocardiosignal by adopting a coif4 wavelet basis function.

S3: selecting coif4 in a coifet wavelet system (coif N, wherein N is 1,2,3,4,5) as a wavelet basis function for the aspects of wavelet support length, regularity, symmetry, wavelet vanishing moment order and the like, denoising the 12-lead electrocardiosignals by adopting discrete wavelet transform, and denoising the 12-lead electrocardiosignals by adopting discrete wavelet transform according to a formula (3);

in the formula, Ψjk(t) is a discrete wavelet basis;is Ψjk(t) complex conjugation; WT (WT)fAnd (j, k) are discrete wavelet transform coefficients.

In the sixth step, a dropout technology is adopted, namely, part of neurons in the one-dimensional convolutional neural network are discarded randomly according to a certain proportion, and a Batch Normalization layer is added to carry out Batch standardization on the intermediate characteristic layer, so that the stability and the running speed of the one-dimensional convolutional neural network model are improved.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于连续心搏活动序列特征-SVM模型的心搏分类方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!