Electrocardiosignal atrial fibrillation detection method based on one-dimensional dense connection convolution network

文档序号:1619930 发布日期:2020-01-14 浏览:11次 中文

阅读说明:本技术 基于一维密集连接卷积网络的心电信号房颤检测方法 (Electrocardiosignal atrial fibrillation detection method based on one-dimensional dense connection convolution network ) 是由 张光磊 武新宇 于 2019-10-21 设计创作,主要内容包括:一种基于一维密集连接卷积网络的心电信号房颤检测方法,包括如下步骤:步骤一、获取若干含房颤标注的心电信号片段;步骤二、对步骤一中的心电信号片段进行预处理并作为训练一维密集连接卷积网络模型的训练数据;步骤三、利用深度学习框架搭建一维密集连接卷积网络模型;步骤四、随机选取初始参数大小,通过不断向模型批量送入训练数据并且反向传播来更新网络参数,得到最优参数;步骤五、对训练好的网络进行轻量化处理,包括参数量化和网络剪枝;步骤六、采集患者心电信号,将信号波形作为输入送入一维密集连接卷积网络模型中,输出结果,对患者是否有房颤进行预判断。(An electrocardiosignal atrial fibrillation detection method based on a one-dimensional dense connection convolution network comprises the following steps: step one, acquiring a plurality of electrocardiosignal segments containing atrial fibrillation labels; secondly, preprocessing the electrocardiosignal segments in the first step and using the preprocessed electrocardiosignal segments as training data for training a one-dimensional densely-connected convolution network model; thirdly, building a one-dimensional dense connection convolution network model by using a deep learning framework; randomly selecting the initial parameter size, and updating the network parameters by continuously sending training data to the model in batches and performing back propagation to obtain the optimal parameters; fifthly, carrying out lightweight processing on the trained network, wherein the lightweight processing comprises parameter quantization and network pruning; and step six, acquiring electrocardiosignals of the patient, sending the signal waveforms as input into a one-dimensional dense connection convolution network model, outputting results, and pre-judging whether the patient has atrial fibrillation.)

1. An electrocardiosignal atrial fibrillation detection method based on a one-dimensional dense connection convolution network is characterized by comprising the following steps:

step one, acquiring a plurality of electrocardiosignal segments containing atrial fibrillation labels;

secondly, preprocessing the electrocardiosignal segments in the first step and using the preprocessed electrocardiosignal segments as training data for training a one-dimensional densely-connected convolution network model;

thirdly, building a one-dimensional dense connection convolution network model by using a deep learning framework;

step four, randomly selecting initial parameters for the built one-dimensional dense connection convolution network model, continuously sending training data to the model in batches and reversely propagating to update network parameters, and after repeating the operation for P times, taking the obtained parameters as optimal parameters; p is a positive integer;

fifthly, carrying out lightweight processing on the trained network, wherein the lightweight processing comprises parameter quantization and network pruning;

and step six, acquiring electrocardiosignals of the patient, sending the signal waveforms as input into a one-dimensional dense connection convolution network model, outputting results, and pre-judging whether the patient has atrial fibrillation.

2. The method for detecting atrial fibrillation of cardiac signals based on the one-dimensional densely-connected convolutional network as claimed in claim 1, wherein in the first step, the length of the cardiac signal segment is greater than 5 seconds.

3. The method for detecting atrial fibrillation of the electrocardiosignals based on the one-dimensional densely-connected convolutional network as claimed in claim 1 or 2, wherein in the second step, the preprocessing comprises baseline drift removal and smooth noise reduction.

4. The method for detecting atrial fibrillation of the electrocardiosignals based on the one-dimensional densely-connected convolutional network as claimed in claim 3, wherein the one-dimensional densely-connected convolutional network model comprises an input layer, N densely-connected modules and an output layer; the input layer inputs data to the first dense connection module, and the output layer outputs data results after the data sequentially passes through the N dense connection modules;

the dense connection module comprises M dense connection layers, and the input of each dense connection layer is the output of all dense connection layers before the dense connection module in which the dense connection module is arranged; m, N is a positive integer.

5. The method for detecting atrial fibrillation of the electrocardiosignals based on the one-dimensional densely-connected convolutional network as claimed in claim 4, wherein a transition layer exists between every two adjacent densely-connected modules, and the output of each densely-connected module is used as the input of the next densely-connected module after passing through the transition layer;

the transition layer comprises a standardization layer, a linear rectification function layer, a convolution layer and a pooling layer, and data sequentially passes through the standardization layer, the linear rectification function layer, the convolution layer and the pooling layer.

6. The method for detecting atrial fibrillation of electrocardiosignals based on the one-dimensional densely-connected convolutional network as claimed in claim 5, wherein the densely-connected layers comprise a normalization layer 1, a linear rectification function layer 1, a convolutional layer 1, a normalization layer 2, a linear rectification function layer 2 and a convolutional layer 2, and data are sequentially transmitted in the normalization layer 1, the linear rectification function layer 1, the convolutional layer 1, the normalization layer 2, the linear rectification function layer 2 and the convolutional layer 2.

7. The utility model provides an electrocardiosignal atrial fibrillation detecting system based on one-dimensional intensive connection convolution network which characterized in that includes:

the first module is used for acquiring a plurality of electrocardiosignal segments containing atrial fibrillation labels; preprocessing the electrocardiosignal segments and using the preprocessed electrocardiosignal segments as training data for training a one-dimensional dense connection convolution network model; preprocessing includes removing baseline drift and smoothing noise reduction;

the second module is used for building a one-dimensional dense connection convolution network model by utilizing a deep learning framework; randomly selecting initial parameters for the built one-dimensional dense connection convolution network model, and updating network parameters by continuously sending training data to the model in batches and reversely propagating to obtain optimal network parameters; carrying out lightweight processing on the trained network;

and the third module is used for collecting electrocardiosignals of the patient, sending the signal waveforms as input into the one-dimensional dense connection convolution network model, outputting results and judging whether the patient has atrial fibrillation.

8. The system for detecting atrial fibrillation of cardiac signals based on the one-dimensional densely-connected convolutional network of claim 7, wherein the one-dimensional densely-connected convolutional network model comprises an input layer, N densely-connected modules and an output layer; the input layer inputs data to the first dense connection module, and the output layer outputs data results after the data sequentially passes through the N dense connection modules;

the densely-connected module comprises M densely-connected layers, and the input of each densely-connected layer is the output of all densely-connected layers preceding the layer in the densely-connected module in which it is located.

9. The system for detecting atrial fibrillation of electrocardiosignals based on the one-dimensional densely-connected convolutional network according to claim 7 or 8, wherein a transition layer is arranged between every two adjacent densely-connected modules, and the output of each densely-connected module is used as the input of the next densely-connected module after passing through the transition layer;

the transition layer comprises a standardization layer, a linear rectification function layer, a convolution layer and a pooling layer, and data sequentially passes through the standardization layer, the linear rectification function layer, the convolution layer and the pooling layer.

10. The system for detecting atrial fibrillation of electrocardiosignals based on the one-dimensional densely-connected convolutional network as claimed in claim 9, wherein the densely-connected layers comprise a normalization layer 1, a linear rectification function layer 1, a convolutional layer 1, a normalization layer 2, a linear rectification function layer 2 and a convolutional layer 2, and data are sequentially transmitted in the normalization layer 1, the linear rectification function layer 1, the convolutional layer 1, the normalization layer 2, the linear rectification function layer 2 and the convolutional layer 2.

Technical Field

The invention relates to an atrial fibrillation detection method for electrocardiosignals.

Background

Atrial fibrillation is a clinically very common symptom of arrhythmia, often manifested by rapid and irregular atrial activation, resulting in a loss of effective atrial contractile function. Atrial fibrillation has a high incidence rate in people, is often accompanied by heart failure, senile dementia, stroke and other diseases, and seriously threatens the life safety of people. Therefore, early detection of atrial fibrillation is of great significance to the targeted treatment of patients. The electrocardiosignal in a normal cardiac cycle consists of a P wave, a QRS wave group and a T wave, which respectively represent depolarization and excitation of corresponding parts. Atrial fibrillation is the disappearance of P-waves due to irregular activation of the atria, and is replaced by some irregular F-waves, and the R-R interval also appears irregular.

The traditional method is mainly based on detecting the disappearance of P waves, the generation of F waves and irregular R-R intervals and is divided into two steps of feature extraction and classification. In the feature extraction process, it is common to extract P-waves and R-R intervals. However, P-waves are easily polluted by artifacts and noise, and the method based on the R-R interval requires complicated feature extraction steps, which bring certain troubles to the improvement of the accuracy and effectiveness of the conventional method. In the classification process, common algorithms include traditional machine learning algorithms such as random forests, SVMs, KNNs and the like. The deep learning method is an end-to-end method, features do not need to be extracted and noise does not need to be processed, and operations needed in preprocessing and preprocessing stages are simplified. The traditional neural network is difficult to realize the deep layer of the network due to the problem of gradient disappearance, so the fitting capability is not strong enough, and the dense connection convolution network is invented for solving the problem, so the invention adopts the one-dimensional dense connection convolution network to detect the atrial fibrillation signals.

Disclosure of Invention

The technical problem to be solved by the invention is as follows: the invention provides an electrocardiosignal atrial fibrillation detection method based on a one-dimensional densely-connected convolution network, which utilizes the characteristics that the densely-connected convolution network can prevent gradient explosion, is easy to increase the number of network layers, has strong fitting capability and strong feature extraction capability, and can accurately predict whether a patient has atrial fibrillation diseases or not through short-time electrocardiosignals. The invention also has the characteristic of end-to-end, can directly input the electrocardiosignals to obtain the classification result, and solves the problem that the traditional method divides the detection process into a plurality of steps.

The technical scheme adopted by the invention is as follows: an electrocardiosignal atrial fibrillation detection method based on a one-dimensional dense connection convolution network comprises the following steps:

step one, acquiring a plurality of electrocardiosignal segments containing atrial fibrillation labels;

secondly, preprocessing the electrocardiosignal segments in the first step and using the preprocessed electrocardiosignal segments as training data for training a one-dimensional densely-connected convolution network model;

thirdly, building a one-dimensional dense connection convolution network model by using a deep learning framework;

step four, randomly selecting initial parameters for the built one-dimensional dense connection convolution network model, continuously sending training data to the model in batches and reversely propagating to update network parameters, and after repeating the operation for K times, taking the obtained parameters as optimal parameters; k is a positive integer;

fifthly, carrying out lightweight processing on the trained network, wherein the lightweight processing comprises parameter quantization and network pruning;

and step six, acquiring electrocardiosignals of the patient, sending the signal waveforms as input into a one-dimensional dense connection convolution network model, outputting results, and pre-judging whether the patient has atrial fibrillation.

In the first step, the length of the electrocardiosignal segment is more than 5 seconds.

In step two, the preprocessing comprises the removal of baseline drift and the smooth noise reduction.

The one-dimensional dense connection convolution network model comprises an input layer, N dense connection modules and an output layer; the input layer inputs data to the first dense connection module, and the output layer outputs data results after the data sequentially passes through the N dense connection modules;

the dense connection module comprises M dense connection layers, and the input of each dense connection layer is the output of all dense connection layers before the dense connection module in which the dense connection module is arranged; m, N is a positive integer.

A transition layer is arranged between two adjacent dense connection modules, and the output of each dense connection module is used as the input of the next dense connection module after passing through the transition layer;

the transition layer comprises a standardization layer, a linear rectification function layer, a convolution layer and a pooling layer, and data sequentially passes through the standardization layer, the linear rectification function layer, the convolution layer and the pooling layer.

The dense connection layer comprises a standardization layer 1, a linear rectification function layer 1, a convolution layer 1, a standardization layer 2, a linear rectification function layer 2 and a convolution layer 2, and data are sequentially transmitted in the standardization layer 1, the linear rectification function layer 1, the convolution layer 1, the standardization layer 2, the linear rectification function layer 2 and the convolution layer 2.

An electrocardiosignal atrial fibrillation detection system based on a one-dimensional dense connection convolution network comprises:

the first module is used for acquiring a plurality of electrocardiosignal segments containing atrial fibrillation labels; preprocessing the electrocardiosignal segments and using the preprocessed electrocardiosignal segments as training data for training a one-dimensional dense connection convolution network model; preprocessing includes removing baseline drift and smoothing noise reduction;

the second module is used for building a one-dimensional dense connection convolution network model by utilizing a deep learning framework; randomly selecting initial parameters for the built one-dimensional dense connection convolution network model, and updating network parameters by continuously sending training data to the model in batches and reversely propagating to obtain optimal network parameters; carrying out lightweight processing on the trained network;

and the third module is used for collecting electrocardiosignals of the patient, sending the signal waveforms as input into the one-dimensional dense connection convolution network model, outputting results and judging whether the patient has atrial fibrillation.

The one-dimensional dense connection convolution network model comprises an input layer, N dense connection modules and an output layer; the input layer inputs data to the first dense connection module, and the output layer outputs data results after the data sequentially passes through the N dense connection modules;

the densely-connected module comprises M densely-connected layers, and the input of each densely-connected layer is the output of all densely-connected layers preceding the layer in the densely-connected module in which it is located.

A transition layer is arranged between two adjacent dense connection modules, and the output of each dense connection module is used as the input of the next dense connection module after passing through the transition layer;

the transition layer comprises a standardization layer, a linear rectification function layer, a convolution layer and a pooling layer, and data sequentially passes through the standardization layer, the linear rectification function layer, the convolution layer and the pooling layer.

The dense connection layer comprises a standardization layer 1, a linear rectification function layer 1, a convolution layer 1, a standardization layer 2, a linear rectification function layer 2 and a convolution layer 2, and data are sequentially transmitted in the standardization layer 1, the linear rectification function layer 1, the convolution layer 1, the standardization layer 2, the linear rectification function layer 2 and the convolution layer 2.

Compared with the prior art, the invention has the advantages that:

(1) the method of the invention is based on the dense connection network, solves the problems of gradient disappearance and gradient explosion, and therefore, compared with the common convolutional neural network, the network has more layers.

(2) The direct connection shortcut exists between different layers in the dense connection module, and the problem that a neural network with a large number of layers is poor in effect compared with a neural network with a small number of layers is solved, so that the method has higher fitting capability compared with a common convolutional neural network, and the prediction accuracy of the model is higher than that of a traditional machine learning method and the common convolutional neural network.

(3) The one-dimensional dense connection convolution network adopted by the invention is an end-to-end neural network, and when the detection method is used, only one section of electrocardiosignal fragment needs to be input to obtain the result of atrial fibrillation detection, so that the operation flow is simplified compared with the traditional step-by-step detection method.

Drawings

FIG. 1 is a flow chart of the method for detecting atrial fibrillation of electrocardiosignals based on a one-dimensional densely-connected convolutional network;

FIG. 2 is a general structure diagram of a one-dimensional densely-connected convolutional network model provided in an embodiment of the present invention;

fig. 3 is a block diagram of a dense convolution module according to an embodiment of the present invention.

Detailed Description

The invention is further illustrated with reference to the following figures and examples.

As shown in fig. 1, a method for detecting atrial fibrillation of an electrocardiographic signal based on a one-dimensional densely-connected convolutional network includes the following steps:

(1) acquiring an electrocardiosignal segment containing an atrial fibrillation mark, wherein the length of the electrocardiosignal segment is more than 5 seconds;

(2) preprocessing the electrocardiosignal segments in the step (1) and using the preprocessed electrocardiosignal segments as training data for training a one-dimensional densely-connected convolutional network model, wherein the preprocessing comprises baseline drift removal and smooth noise reduction;

(3) and (3) building a one-dimensional dense connection convolution network model by utilizing a deep learning framework, such as tensorflow, pyrrch and the like. The model is specifically constructed into an input layer, N dense connection modules and an output layer; the input layer inputs data to the first dense connection module, and the output layer outputs an analysis result after the data sequentially passes through the N dense connection modules.

The densely-connected module is composed of M densely-connected layers, and the input of each densely-connected layer is the output of all densely-connected layers preceding the layer of the densely-connected module in which it is located. M, N is a positive integer.

A transition layer exists between two adjacent dense connection modules, the transition layer is composed of a standardization layer, a linear rectification function layer, a convolution layer and a pooling layer, and data sequentially pass through the standardization layer, the linear rectification function layer, the convolution layer and the pooling layer.

The dense connection layer is composed of a standardization layer 1, a linear rectification function layer 1, a convolution layer 1, a standardization layer 2, a linear rectification function layer 2 and a convolution layer 2, and data are sequentially transmitted in the standardization layer 1, the linear rectification function layer 1, the convolution layer 1, the standardization layer 2, the linear rectification function layer 2 and the convolution layer 2.

(4) Randomly selecting initial parameters for the built one-dimensional dense connection convolution network model, continuously sending training data to the model in batches and reversely propagating to update network parameters, and repeating the operation for K times to obtain the parameters which are regarded as optimal parameters; k is a positive integer;

(5) carrying out lightweight processing such as parameter quantification, network pruning and the like on the trained network;

(6) the electrocardiosignal of the patient is collected, the signal waveform is used as input and sent into the model, and the model can automatically output whether the patient has atrial fibrillation.

And for the collected electrocardiosignal segments, filtering each segment by using a Butterworth band-pass filter with the cut-off frequency of 0.1Hz and 35Hz to remove the baseline, the power frequency noise and the high-frequency noise. If one electrocardiosignal segment is marked as atrial fibrillation, the segment is marked as 1, otherwise, the segment is marked as 0, and the marks are recorded in a csv file to be used as labels for training a neural network.

Referring to fig. 2 and 3, in this embodiment, the one-dimensional dense connection convolutional network model in step (3) is composed of an input layer, 6 dense connection modules, and an output layer, which are sequentially an input layer, a dense connection module 1, a transition layer 1, a dense connection module 2, a transition layer 2, a dense connection module 3, a transition layer 3, a dense connection module 4, a transition layer 4, a dense connection module 5, a transition layer 5, a dense connection module 6, and a full connection layer. The dense connection module is composed of 8 dense connection layers which are continuously identical. The dense connection layer is composed of 6 layers of networks, namely a batch normalization layer 1, a linear rectification function layer 1, a convolution layer 1, a batch normalization layer 2, a linear rectification function layer 2 and a convolution layer 2, wherein the window sizes of the convolution layers 1 and 2 in the dense connection layer are N, the step length is S, and the boundary is filled with zero.

And (3) after the model is built, training the model by using the preprocessed data in the step (2), and updating parameters by using a random gradient descent algorithm in the network training process, wherein the learning rate is 0.001, the weight attenuation is 0.999, and the momentum is 0.8. In the embodiment, a section of electrocardiosignal is input into a feedforward neural network to obtain a prediction result, and in order to calculate the error between the electrocardiosignal and a label, a cross entropy function is used as a loss function for calculating the deviation between the result predicted by the model and a true result. And when the loss is less than 10 < -5 >, the neural network parameters at the moment are considered to be optimal, and the parameters at the moment are considered as optimal parameters.

Through the training steps, an optimal parameter model is obtained. In order to improve the working efficiency of the model, the trained model can be further pruned and quantized, the size of the model is reduced, and the operation speed of the model is improved.

And (3) intercepting the length in the step (1) of the electrocardiosignal of the user to be detected, and sending the electrocardiosignal into the model, wherein if the model outputs 1, the model represents that atrial fibrillation exists, and if the model outputs 0, the model represents that atrial fibrillation does not exist.

An electrocardiosignal atrial fibrillation detection system based on a one-dimensional dense connection convolution network comprises:

the first module is used for acquiring a plurality of electrocardiosignal segments containing atrial fibrillation labels; preprocessing the electrocardiosignal segments and using the preprocessed electrocardiosignal segments as training data for training a one-dimensional dense connection convolution network model; preprocessing includes removing baseline drift and smoothing noise reduction;

the second module is used for building a one-dimensional dense connection convolution network model by utilizing a deep learning framework; randomly selecting initial parameters for the built one-dimensional dense connection convolution network model, and updating network parameters by continuously sending training data to the model in batches and reversely propagating to obtain optimal network parameters; carrying out lightweight processing on the trained network;

the one-dimensional dense connection convolution network model comprises an input layer, N dense connection modules and an output layer; the input layer inputs data to the first dense connection module, and the output layer outputs data results after the data sequentially passes through the N dense connection modules;

the densely-connected module comprises M densely-connected layers, and the input of each densely-connected layer is the output of all densely-connected layers preceding the layer in the densely-connected module in which it is located.

A transition layer is arranged between two adjacent dense connection modules, and the output of each dense connection module is used as the input of the next dense connection module after passing through the transition layer;

the transition layer comprises a standardization layer, a linear rectification function layer, a convolution layer and a pooling layer, and data sequentially passes through the standardization layer, the linear rectification function layer, the convolution layer and the pooling layer.

The dense connection layer comprises a standardization layer 1, a linear rectification function layer 1, a convolution layer 1, a standardization layer 2, a linear rectification function layer 2 and a convolution layer 2, and data are sequentially transmitted in the standardization layer 1, the linear rectification function layer 1, the convolution layer 1, the standardization layer 2, the linear rectification function layer 2 and the convolution layer 2.

And the third module is used for acquiring electrocardiosignals of the patient, sending the waveforms of the electrocardiosignals into the one-dimensional dense connection convolution network model as input, outputting a result and pre-judging whether the patient has atrial fibrillation.

Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention and not to limit it; although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art will understand that: modifications to the specific embodiments of the invention or equivalent substitutions for parts of the technical features may be made; without departing from the spirit of the present invention, it is intended to cover all aspects of the invention as defined by the appended claims.

The present invention has not been described in detail, partly as is known to the person skilled in the art.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种干电极脑电采集装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!