Atrial fibrillation event detection method based on deep learning

文档序号:992841 发布日期:2020-10-23 浏览:5次 中文

阅读说明:本技术 一种基于深度学习的房颤事件检测方法 (Atrial fibrillation event detection method based on deep learning ) 是由 赵卫 周成龙 于 2020-07-22 设计创作,主要内容包括:本发明提供了一种基于深度学习的房颤事件检测方法,其可以突破传统房颤检测算法特征不足的约束,进而提高准确率;其包括以下步骤:S1、获取用于训练房颤事件检测深度学习模型的心电信号,随后对心电信号进行预处理操作以去除干扰和无效数据;S2、对预处理后的心电信号进行QRS检波处理,以提取心电信号中的心搏信息;S3、根据QRS检波处理结果进行心电增维变换处理;S4、根据增维变换处理后的数据搭建深度学习模型;S5、通过5折交叉验证法对增维变换处理后的数据集进行训练集、测试集数据划分,随后通过所述训练集数据进行所述深度学习模型的训练,最终获得房颤检测模型。(The invention provides an atrial fibrillation event detection method based on deep learning, which can break through the constraint of insufficient characteristics of the traditional atrial fibrillation detection algorithm and further improve the accuracy; which comprises the following steps: s1, acquiring electrocardiosignals for training an atrial fibrillation event detection deep learning model, and then preprocessing the electrocardiosignals to remove interference and invalid data; s2, carrying out QRS detection processing on the preprocessed electrocardiosignals to extract heart beat information in the electrocardiosignals; s3, carrying out electrocardio dimension-increasing transformation processing according to the QRS detection processing result; s4, building a deep learning model according to the data after the dimension increasing transformation processing; and S5, carrying out training set and test set data division on the data set subjected to the dimensionality-increased transformation processing by a 5-fold cross validation method, and then carrying out training on the deep learning model through the training set data to finally obtain the atrial fibrillation detection model.)

1. An atrial fibrillation event detection method based on deep learning is characterized by comprising the following steps of:

s1, acquiring electrocardiosignals for training an atrial fibrillation event detection deep learning model, and then preprocessing the electrocardiosignals to remove interference and invalid data;

s2, carrying out QRS detection processing on the preprocessed electrocardiosignals to extract heart beat information in the electrocardiosignals;

s3, carrying out electrocardio dimension-increasing transformation processing according to the QRS detection processing result;

s4, building a deep learning model according to the data after the dimension increasing transformation processing;

and S5, carrying out training set and test set data division on the data set subjected to the dimensionality-increased transformation processing by a 5-fold cross validation method, and then carrying out training on the deep learning model through the training set data to finally obtain the atrial fibrillation detection model.

2. The method for detecting atrial fibrillation events based on deep learning of claim 1, wherein in step S1, the preprocessing operation includes: and removing the high-frequency burr noise signal through a low-pass filter, removing the baseline drift interference signal through a high-pass filter, and removing the 50Hz power frequency interference signal through a wave trap.

3. The method for detecting atrial fibrillation events according to claim 1, wherein in step S2, the QRS detection process comprises the following steps:

s2.1, positioning QRS heart beat: acquiring QRS position information of heart beats, wherein if a standard database is adopted, the R wave position number on an electrocardiogram is directly acquired from a standard marking file given by the standard database, and if the standard database is adopted, the Hamilton-Tompkins heart beat positioning algorithm is adopted to acquire the R wave position information of the heart beats in the electrocardio recording data so as to acquire heart beat QRS heart beat positioning;

s2.2, RR interval calculation: after the positioning of the QRS heart beat is obtained, the distance between the R points of adjacent QRS waves is the interval of adjacent heart beats, so that QRS detection processing is realized, and RR interval data of electrocardiosignals are obtained.

4. The method for detecting atrial fibrillation events according to claim 3, wherein in step S3, the ECG multidimensional transformation process includes the following steps:

s3.1, heart beat section: according to the QRS detection processing result, dividing RR interval data between R points of adjacent QRS waves into sub-segments;

s3.2, dimension increasing transformation: taking W continuous RR interval data as a heart beat window, forming an input matrix of the deep learning model by the RR interval data in the heart beat window, wherein the input matrix comprises W rows of n x fs columns, each row comprises the electrocardio data of one sub-segment, each row of data is aligned to the left, the length of the data is supplemented with 0 when the data is less than the n x fs length, the last element of each row fills the length of the sub-segment data corresponding to the heart beat, and then, sliding window processing is carried out according to a set window sliding step length to generate required dimension increasing data; wherein, W is 1, 2, 3,. . . . . n, fs are sampling frequencies, n is the number of RR intervals within the current heart beat window.

5. The method for detecting atrial fibrillation events based on deep learning of claim 1, wherein the deep learning model comprises an input layer, a convolutional layer, a pooling layer, a fully-connected layer and an output layer which are connected in sequence.

6. The method for detecting atrial fibrillation events according to claim 4, wherein in step S5, the data set after the dimension-increasing transformation is divided by a 5-fold cross-validation method, wherein the data set 1/5 is used as a test set, and the data set 4/5 is used as a training set.

7. The method according to claim 5, wherein in the step S5, for the training of the deep learning model through the training set data, firstly, the training set is divided into a plurality of batch data, one batch data in the training set is input into an input layer of the deep learning model each time for training, all batch data in the training set complete the training process and is recorded as an epoch, and after M epoch iterations, the training process is ended, so as to obtain the atrial fibrillation detection model.

8. The method for detecting atrial fibrillation events based on deep learning of claim 5, wherein in step S5, after the training process is completed, all data in the test set are input into the input layer of the deep learning model after the training is completed, and the accuracy of the prediction result obtained by the output layer of the deep learning model is verified by 5-fold cross-validation.

Technical Field

The invention relates to the technical field of atrial fibrillation detection, in particular to an atrial fibrillation event detection method based on deep learning.

Background

Atrial fibrillation is a common arrhythmia problem, is serious atrial electrical activity disorder, and along with the increase of age, the incidence of atrial fibrillation also continuously increases, and atrial fibrillation not only influences the quality of life of a patient, but also can cause thromboembolism, heart failure and cerebral apoplexy for serious people, and along with the development of long-time electrocardio monitoring, the data volume of the obtained electrocardiosignals is larger and larger, and the automatic atrial fibrillation detection algorithm is also developed along with the increase, but the traditional automatic atrial fibrillation detection algorithm is often limited in the characteristic acquisition process, so that the detection accuracy rate is difficult to break through.

Disclosure of Invention

Aiming at the problems, the invention provides an atrial fibrillation event detection method based on deep learning, which can break through the constraint of insufficient characteristics of the traditional atrial fibrillation detection algorithm and further remarkably improve the detection accuracy.

The technical scheme is as follows: an atrial fibrillation event detection method based on deep learning is characterized by comprising the following steps of:

s1, acquiring electrocardiosignals for training an atrial fibrillation event detection deep learning model, and then preprocessing the electrocardiosignals to remove interference and invalid data;

s2, carrying out QRS detection processing on the preprocessed electrocardiosignals to extract heart beat information in the electrocardiosignals;

s3, carrying out electrocardio dimension-increasing transformation processing according to the QRS detection processing result;

s4, building a deep learning model according to the data after the dimension increasing transformation processing;

and S5, carrying out training set and test set data division on the data set subjected to the dimensionality-increased transformation processing by a 5-fold cross validation method, and then carrying out training on the deep learning model through the training set data to finally obtain the atrial fibrillation detection model.

Further, in the step S1, the preprocessing operation includes: removing high-frequency burr noise signals through a low-pass filter, removing baseline drift interference signals through a high-pass filter, and removing 50Hz power frequency interference signals through a wave trap;

further, in the step S2, the QRS detection processing includes the steps of:

s2.1, positioning QRS heart beat: acquiring QRS position information of heart beats, wherein if a standard database is adopted, the R wave position number on an electrocardiogram is directly acquired from a standard marking file given by the standard database, and if the standard database is adopted, the Hamilton-Tompkins heart beat positioning algorithm is adopted to acquire the R wave position information of the heart beats in the electrocardio recording data so as to acquire heart beat QRS heart beat positioning;

s2.2, RR interval calculation: after the positioning of the heart QRS heart beat is obtained, the distance between the R points of adjacent QRS waves is an adjacent heart beat interval, so that QRS detection processing is realized, and RR interval data of electrocardiosignals are obtained;

further, in step S3, the cardiac electrical dimension increasing transformation process includes the steps of:

s3.1, heart beat section: according to the QRS detection processing result, dividing RR interval data between R points of adjacent QRS waves into sub-segments;

s3.2, dimension increasing transformation: taking W continuous RR interval data as a heart beat window, forming an input matrix of the deep learning model by the RR interval data in the heart beat window, wherein the input matrix comprises W rows of n x fs columns, each row comprises the electrocardio data of one sub-segment, each row of data is aligned to the left, the length of the data is supplemented with 0 when the data is less than the n x fs length, the last element of each row fills the length of the sub-segment data corresponding to the heart beat, and then, sliding window processing is carried out according to a set window sliding step length to generate required dimension increasing data; wherein, W is 1, 2, 3,. . . . . n and fs are sampling frequencies, and n is the number of RR intervals in the current heart beat window;

further, the deep learning model comprises an input layer, a convolution layer, a pooling layer, a full-link layer and an output layer which are connected in sequence;

further, in the step S5, the data set after the dimension-increasing transformation processing is divided by a 5-fold cross-validation method, where the data set 1/5 is used as a test set, and the data set 4/5 is used as a training set;

further, in step S5, as for the training of the deep learning model by the training set data, firstly, the training set is divided into a plurality of batch data, one batch data in the training set is input into the input layer of the deep learning model for the training process each time, all batch data in the training set are trained and recorded as an epoch after completing the training process, and the training process is ended after M epoch iterations, so as to obtain an atrial fibrillation detection model;

further, in step S5, after the training process is finished, all the data in the test set are input into the input layer of the deep learning model after the training is finished, and the accuracy of the prediction result obtained by the output layer of the deep learning model is verified by a 5-fold cross-validation method.

The method has the advantages that firstly, the acquired electrocardiosignals are preprocessed to remove interference and invalid data, then the processed electrocardiosignals are subjected to QRS detection processing, the electrocardio dimension-increasing conversion processing is carried out according to the QRS detection processing result, so that the data reading speed of a training set and a testing set is improved, then, deep learning model training is carried out through the data of the training set, and finally, an atrial fibrillation detection model with high accuracy, namely intelligent atrial fibrillation detection, can be obtained, and the method has good use and popularization values.

Drawings

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

FIG. 2 is a schematic diagram of RR intervals within a sliding window;

FIG. 3 is a schematic diagram of the electrocardiograph dimension increasing of the present invention.

Detailed Description

As shown in fig. 1 to fig. 3, the method for detecting atrial fibrillation events based on deep learning according to the present invention includes the following steps:

s1, acquiring electrocardiosignals (namely ECG signals) for training an atrial fibrillation event detection deep learning model, and then carrying out preprocessing operation on the electrocardiosignals to remove interference and invalid data so as to prevent the interference signals from causing adverse effects in subsequent data processing;

the preprocessing operation comprises the following steps: removing high-frequency burr noise signals through a low-pass filter, removing baseline drift interference signals through a high-pass filter, and removing 50Hz power frequency interference signals through a wave trap;

s2, carrying out QRS detection processing on the preprocessed electrocardiosignals to extract heart beat information in the electrocardiosignals;

the QRS detection processing specifically comprises the following steps:

s2.1, QRS heart beat positioning, wherein the QRS wave complex is a significant characteristic wave complex of a heart beat, QRS wave complex detection is the basis of subsequent high-order statistical data, heart beat information in an electrocardiosignal is extracted through QRS heart beat positioning, and then an RR interval of the heart beat is obtained, specifically, QRS position information of the heart beat is obtained firstly, if a standard database is adopted, the R wave position number on an electrocardiogram is directly obtained from a standard marking file given by the standard database, and if the heart beat is recorded by an electrocardiosignal which is not marked in a standard way, a Hamilton-Tompkins heart beat positioning algorithm is adopted to obtain heart beat R wave position information in the electrocardiorecord data, so that heart beat QRS heart beat positioning is obtained;

s2.2, RR interval calculation: after the positioning of the heart QRS heart beat is obtained, the distance between the R points of adjacent QRS waves is an adjacent heart beat interval, so that QRS detection processing is realized, and RR interval data of electrocardiosignals are obtained; wherein, RR interval is important information reflecting heart rhythm, and RR interval refers to the time limit between two R waves on the electrocardiogram; in fig. 2, QRS(i-1)、QRS(i)、QRS(i+1)Adjacent QRS waves; RR(i)RR interval data for heartbeats within the current sliding window, RR(i+1)Is equal to RR(i)Adjacent RR interval data, i 1, 2, 3,. . . . . . N;

s3, the distribution of the RR interval data of heart beat generated by normal heart is centralized and regular, the RR interval data of heart beat generated by heart in atrial fibrillation state is obviously different from the normal state, and the ECG dimension increasing conversion processing is carried out according to the QRS detection processing result;

the electrocardio dimension-increasing transformation processing specifically comprises the following steps:

s3.1, heart beat section: according to the QRS detection processing result, dividing RR interval data between R points of adjacent QRS waves into sub-segments;

s3.2, dimension increasing transformation: taking W continuous RR interval data as a heart beat window, forming an input matrix of a deep learning model by the RR interval data in the heart beat window, wherein the input matrix comprises W rows of n & ltfs & gt columns, each row of data comprises the electrocardio data of a sub-segment, each row of data is aligned to the left, the length of the data is supplemented with 0 when the data is less than the n & ltfs & gt length, the last element of each row is filled in the length of the sub-segment data corresponding to the heart beat, and then, sliding window processing is carried out according to a set window sliding step length to generate needed dimension increasing data; wherein, W is 1, 2, 3,. . . . . n and fs are sampling frequencies, and n is the number of RR intervals in the current heart beat window;

through the dimension increasing transformation, the data in each heart beat window is converted into a two-dimensional matrix of W rows and n fs columns from the original one-dimensional vector of 1 row (W x n fs);

s4, building a deep learning model according to the data after the dimension increasing transformation processing; the deep learning model comprises an input layer, a convolution layer, a pooling layer, a full-link layer and an output layer which are connected in sequence;

s5, carrying out data division on the data set subjected to the dimension increasing transformation processing through a 5-fold cross validation method, wherein the data set of 1/5 is used as a test set, and the data set of 4/5 is used as a training set; secondly, training a deep learning model through training set data, namely firstly dividing the training set into a plurality of batch data, inputting one batch data in the training set into an input layer of the deep learning model for a training process each time, recording the training process of all batch data in the training set as an epoch after completing the training process, and finishing the training process after M epoch iterations to obtain an atrial fibrillation detection model;

after the training process is finished, the data in the test set are input into the input layer of the deep learning model after the training is finished, the accuracy of the prediction result obtained by the output layer of the deep learning model is verified through a 5-fold cross verification method, and the atrial fibrillation detection accuracy achieved through the method is 99.40%.

It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种房颤事件检测方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!