[go: up one dir, main page]

CN111956215A - QRS point detection method of low-quality electrocardiogram - Google Patents

QRS point detection method of low-quality electrocardiogram Download PDF

Info

Publication number
CN111956215A
CN111956215A CN202010745385.XA CN202010745385A CN111956215A CN 111956215 A CN111956215 A CN 111956215A CN 202010745385 A CN202010745385 A CN 202010745385A CN 111956215 A CN111956215 A CN 111956215A
Authority
CN
China
Prior art keywords
matrix
qrs
layer
points
point
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.)
Withdrawn
Application number
CN202010745385.XA
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.)
Ludong University
Original Assignee
Ludong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ludong University filed Critical Ludong University
Priority to CN202010745385.XA priority Critical patent/CN111956215A/en
Publication of CN111956215A publication Critical patent/CN111956215A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/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/7225Details of analog processing, e.g. isolation amplifier, gain or sensitivity adjustment, filtering, baseline or drift compensation
    • 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

Landscapes

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

Abstract

The invention discloses a QRS point detection method of electrocardiosignals, which comprises the following steps: 1) denoising an original electrocardiosignal; 2) obtaining candidate QRS points; 3) removing non-QRS points in the candidate QRS points and generating a data set; 4) screening QRS point coordinates through a convolutional neural network; performing bottom convolution on the electrocardiosignal by using a modern convolutional neural network algorithm, and further extracting features from the features obtained by the bottom convolution of each lead through an LSTM layer and a Dense layer to obtain final features which are input into a classifier for classification to obtain a QRS point classification result; the method obtains higher accuracy rate for identifying the QRS point of the electrocardiosignal.

Description

一种低质量心电图的QRS点的检测方法A method for detecting QRS points of low-quality electrocardiogram

技术领域technical field

本发明涉及医学信号处理技术领域,更确切地说一种低质量心电图的QRS点检测方法。The invention relates to the technical field of medical signal processing, more specifically a QRS point detection method for low-quality electrocardiogram.

背景技术Background technique

随着我国生活质量的不断提高,人们对健康的重视也越来越高,尤其是对心血管方面的疾病的预防更加重视。而心电图则是一种检测心血管疾病的重要手段。在利用心电图对心血管疾病检测的过程中,医生会首先确定心电图中的各个波形,而QRS波群作为心电图中最明显的特征往往对心电图各个波形的确定起着至关重要的作用。但是随着人们追求更加便捷快速的心电图检测,可穿戴心电监测设备应运而生,虽然其让人们更加便捷的采集心电图,但由于被采集者运动以及其他环境因素等,造成采集到的心电图质量偏低,QRS波群检测难度大为增加。With the continuous improvement of the quality of life in my country, people pay more and more attention to health, especially the prevention of cardiovascular diseases. The electrocardiogram is an important means of detecting cardiovascular disease. In the process of using electrocardiogram to detect cardiovascular diseases, doctors will first determine each waveform in the electrocardiogram, and the QRS complex, as the most obvious feature of the electrocardiogram, often plays a crucial role in the determination of each waveform of the electrocardiogram. However, with the pursuit of more convenient and fast ECG detection, wearable ECG monitoring equipment has emerged. Although it allows people to collect ECG more conveniently, the quality of the ECG collected is caused by the movement of the person being collected and other environmental factors. On the low side, the difficulty of detecting the QRS complex is greatly increased.

发明内容SUMMARY OF THE INVENTION

本发明的目的是为解决由于环境以及采集设备本身问题造成的心电图质量低,从而造成的心电图的QRS点识别精度低的问题,而提供一种低质量心电图的QRS点检测方法。The purpose of the present invention is to solve the problem of low quality of electrocardiogram caused by problems of the environment and the acquisition equipment itself, and thus the problem of low recognition accuracy of QRS points of electrocardiogram, and to provide a method for detecting QRS points of low quality electrocardiogram.

心电信号QRS点检测方法,它包括:ECG signal QRS point detection method, which includes:

1)原始心电信号的去噪1) Denoising of the original ECG signal

读取原始心电信号e,对原始心电信号e进行切比雪夫

Figure DEST_PATH_IMAGE001
型带通滤波,得到去噪信号矩阵x;读取每一个原始心电信号的人工标记的QRS点矩阵ref,为下文制作标签做准备Read the original ECG signal e, and perform Chebyshev on the original ECG signal e
Figure DEST_PATH_IMAGE001
Type band-pass filtering to obtain the denoised signal matrix x; read the manually marked QRS point matrix ref of each original ECG signal to prepare for the labeling below

2)得到候选QRS点2) Get candidate QRS points

对去噪信号矩阵x进行希尔伯特变换,得到变换后信号矩阵x1,对变换后信号矩阵x1取绝对值,得到去噪信号的包络信号矩阵x2。识别包络信号矩阵x2波峰点和波谷点,并将包络信号矩阵x2的波峰点和波谷点集合作为该条心电信号的过检测类QRS点的包络幅度值存入矩阵H_place1,并将包络信号矩阵x2的波峰点和波谷点的下标集合作为该条心电信号的过检测类QRS点的坐标点,存入矩阵R_place1。其中矩阵R_place1和矩阵H_place1的元素是一一对应的。Hilbert transform is performed on the denoised signal matrix x to obtain the transformed signal matrix x1, and the absolute value of the transformed signal matrix x1 is obtained to obtain the envelope signal matrix x2 of the denoised signal. Identify the peak points and trough points of the envelope signal matrix x2, and store the set of peak points and trough points of the envelope signal matrix x2 into the matrix H_place1 as the envelope amplitude value of the over-detected QRS points of the ECG signal, and store the The subscript set of the peak points and trough points of the envelope signal matrix x2 is stored in the matrix R_place1 as the coordinate points of the over-detected QRS points of the ECG signal. The elements of matrix R_place1 and matrix H_place1 are in one-to-one correspondence.

3)去除候选QRS点中的非QRS点以及数据集生成3) Remove non-QRS points in candidate QRS points and generate datasets

a.去除矩阵R_place1和H_place1中利用不应期检测到的非QRS点,此处的利用不应期检测到的非QRS点是指矩阵R_place1两相邻元素R1,R2差值小于B,B为不应期取值范围为0至300之间的任意整数,且在矩阵H_place1里两个相邻元素H1,H2数值较小的元素,继而得到矩阵R_place3和H_place3。其中元素R1在矩阵R_place1的下标与元素H1在矩阵H_place1的下标相同,元素R2在矩阵R_place1的下标与元素H2在矩阵H_place1的下标相同。a. Remove the non-QRS points detected by the refractory period in the matrices R_place1 and H_place1. The non-QRS point detected by the refractory period here refers to the difference between the two adjacent elements R1 and R2 of the matrix R_place1. The value range of the period is any integer between 0 and 300, and the two adjacent elements H1 and H2 in the matrix H_place1 have smaller values, and then the matrices R_place3 and H_place3 are obtained. The subscript of the element R1 in the matrix R_place1 is the same as the subscript of the element H1 in the matrix H_place1, and the subscript of the element R2 in the matrix R_place1 is the same as the subscript of the element H2 in the matrix H_place1.

b. 在原始心电信号e中,以R_place3中的元素为下标, 向前截取P个点,其中向前截取的时候需要将下标的元素包含在内,向后截取Q个点,每个心拍截取W=P+Q个点的候选QRS点原始数据样本T1,b. In the original ECG signal e, take the elements in R_place3 as the subscript, and intercept P points forward. When intercepting forward, the elements of the subscript need to be included, and Q points are intercepted backward. The heart beat intercepts the candidate QRS point raw data sample T1 of W=P+Q points,

c. 在包络信号矩阵x2中,以R_place3中的元素为下标,向前截取P个点,其中向前截取的时候需要将下标的元素包含在内,向后截取Q个点,每个心拍截取W=P+Q个点的候选QRS点包络数据样本T2,c. In the envelope signal matrix x2, take the elements in R_place3 as the subscript, and intercept P points forward. When intercepting forward, the elements of the subscript need to be included, and Q points are intercepted backward. The heart beat intercepts the candidate QRS point envelope data samples T2 of W=P+Q points,

d.对取到的候选QRS点原始数据样本T1进行一维中值滤波,得到候选QRS点滤波后信号T3,d. Perform one-dimensional median filtering on the obtained candidate QRS point raw data sample T1 to obtain the candidate QRS point filtered signal T3,

e.对T1,T2,T3进行横向拼接得到(1*C)维候选QRS点数据样本T,其中C等于3*W,而后T作为卷积神经网络模型的输入X。将所有心电信号以上述截取方法对R_place3中的所有元素进行截取,形成数据集U, 其中数据集U中的每个样本都是上述1*(C)维的初步筛选后的候选QRS点数据样本。e. Perform horizontal splicing of T1, T2, and T3 to obtain a (1*C)-dimensional candidate QRS point data sample T, where C is equal to 3*W, and then T is used as the input X of the convolutional neural network model. All ECG signals are intercepted by the above interception method to all elements in R_place3 to form a data set U, wherein each sample in the data set U is the candidate QRS point data after preliminary screening of the above 1*(C) dimension sample.

f. 每一个截取的到的候选QRS点数据样本的标签的确定方法是将R_place3中的与候选QRS点数据样本相对应的元素依次与读取到的原始心电信号的QRS点矩阵ref做对比,如果R_place3中的元素与矩阵ref中的每一个元素的差都小于37,则判断该截取的到的过检测类QRS点数据样本的标签数据标签为1,反之为0。f. The method for determining the label of each intercepted candidate QRS point data sample is to compare the elements in R_place3 corresponding to the candidate QRS point data sample with the read QRS point matrix ref of the original ECG signal in turn , if the difference between the elements in R_place3 and each element in the matrix ref is less than 37, the label data label of the intercepted over-detection class QRS point data sample is judged to be 1, otherwise it is 0.

4)通过卷积神经网络筛选QRS点坐标4) Screening QRS point coordinates through convolutional neural network

a.搭建卷积神经网络模型a. Build a convolutional neural network model

卷积神经网络的核心主要由三个依次串联的底层卷积层,一个LSTM层,一个Attention层,四个Dense层组成。The core of the convolutional neural network is mainly composed of three bottom convolutional layers in series, one LSTM layer, one Attention layer, and four Dense layers.

b.训练卷积神经网络参数b. Training convolutional neural network parameters

初始化所述卷积神经网络的参数,将采样好的数据集U随机抽取80%数目的样本当作训练集,数据集U的20%视为测试集;将训练集中的心电信号样本输入到初始化后的神经网络中,以最小化代价函数为目标进行迭代,生成所述卷积神经网络的参数并保存;在抽取训练集与测试集时,标签的元素也分别分配到相应的矩阵中,其中测试集的标签放入矩阵y_label中。Initialize the parameters of the convolutional neural network, randomly select 80% of the samples from the sampled data set U as the training set, and 20% of the data set U as the test set; input the ECG signal samples in the training set into the In the initialized neural network, iterates with the goal of minimizing the cost function to generate and save the parameters of the convolutional neural network; when extracting the training set and the test set, the elements of the label are also allocated to the corresponding matrix respectively, where the labels of the test set are put into the matrix y_label.

c.对测试集样本的自动识别c. Automatic identification of test set samples

将划分测试集样本输入到卷积神经网络中并运行,获得测试集样本对应的2维预测值向量输出y_pred,然后选取2维预测向量输出的最大值的索引值作为该点是否是QRS点的预测类别,如果索引为1则所对应的过检测类QRS点数据样本即为检测到的QRS点数据样本,其所对应的R_place3中的元素即为所检测到的QRS点。Input the divided test set samples into the convolutional neural network and run it to obtain the 2-dimensional prediction value vector output y_pred corresponding to the test set samples, and then select the index value of the maximum value of the 2-dimensional prediction vector output as whether the point is a QRS point. Prediction category, if the index is 1, the corresponding over-detection class QRS point data sample is the detected QRS point data sample, and the corresponding element in R_place3 is the detected QRS point.

所述卷积神经网络参数为:输入X为心电信号样本,每个候选QRS点数据样本都是1*W维,W为以每个候选QRS点数据样本的点数;将候选QRS点数据样本输入到底层卷积层中,其中每个底层卷积层包含一个卷积层,每个卷积层单元的输出端依次串联的一BN层,一激励单元操作和一池化层操作;第一个卷积层单元的卷积核数为64个,卷积核大小为3,卷积方式为same,BN层单元后的激励单元为elu函数,池化层单元的池化核大小为2,池化步长为2;经过第一层池化单元后的特征图维度为(C/2)*64;第二个卷积层单元的卷积核数为256个,卷积核大小为3,卷积方式为same,BN层单元后的激励单元为elu函数,池化层单元的池化核大小为2,池化步长为2;经过第二层池化单元后的特征图维度为(C4)*256,第三个卷积层单元的卷积核数为32个,卷积核大小为3,卷积方式为same,BN层单元后的激励单元为elu函数,池化层单元的池化核大小为2,池化步长为2;经过第三层池化单元后的特征图维度为(C/8)*256,然后通过一个LSTM层,LSTM层的输出定义为32,经过LSTM层后的特征图维度为(C/8)*32, 然后通过一个Attention层,所得到的特征图维度为1*32,经过两个Dense层,依次得到的特征维度为1*16,1*4,最终经过一个Dense层得到的输出y_pred,通过对y_pred的处理得到最终的分类结果存入矩阵RE中;The parameters of the convolutional neural network are: input X is the ECG signal sample, each candidate QRS point data sample is 1*W dimension, W is the number of points based on each candidate QRS point data sample; Input to the bottom convolutional layer, where each bottom convolutional layer contains a convolutional layer, the output of each convolutional layer unit is connected in series with a BN layer, an excitation unit operation and a pooling layer operation; the first The number of convolution kernels of each convolutional layer unit is 64, the size of the convolution kernel is 3, the convolution method is the same, the excitation unit after the BN layer unit is the elu function, and the pooling kernel size of the pooling layer unit is 2. The pooling step size is 2; the dimension of the feature map after the first layer of pooling units is (C/2)*64; the number of convolution kernels of the second convolutional layer unit is 256, and the size of the convolution kernel is 3 , the convolution method is the same, the excitation unit after the BN layer unit is the elu function, the pooling kernel size of the pooling layer unit is 2, and the pooling step size is 2; the dimension of the feature map after the second layer pooling unit is (C4)*256, the number of convolution kernels of the third convolution layer unit is 32, the size of the convolution kernel is 3, the convolution method is the same, the excitation unit after the BN layer unit is the elu function, and the pooling layer unit The size of the pooling kernel is 2, and the pooling step size is 2; the dimension of the feature map after the third layer of pooling units is (C/8)*256, and then through an LSTM layer, the output of the LSTM layer is defined as 32, The dimension of the feature map after passing through the LSTM layer is (C/8)*32, and then through an Attention layer, the dimension of the feature map obtained is 1*32, and after two Dense layers, the dimension of the feature obtained in turn is 1*16, 1*4, the output y_pred is finally obtained through a Dense layer, and the final classification result is obtained by processing y_pred and is stored in the matrix RE;

所述的迭代为:迭代一次更新一次训练参数,直至最后卷积神经网络的损失值和准确率稳定在某一数值附近,停止训练并保存当前网络的训练参数和模型结构信息。The iterations are: iteratively update the training parameters once, until the loss value and the accuracy rate of the convolutional neural network are stabilized around a certain value, stop training and save the training parameters and model structure information of the current network.

本发明提供了心电信号QRS点检测方法,它包括:1)原始心电信号的去噪;2)得到候选QRS点;3)去除候选QRS点中的非QRS点以及数据集生成;4)通过卷积神经网络筛选QRS点坐标;运用现代的卷积神经网络算法对心电信号进行底层卷积,随后对每个导联底层卷积所得到的特征通过LSTM层和Dense层进一步提取特征,得到最终特征进而输入到分类器进行分类得到QRS点分类结果。此方法对心电信号QRS点的识别得到了较高的准确率。其混淆矩阵如下:The present invention provides a method for detecting QRS points of an ECG signal, which includes: 1) denoising the original ECG signal; 2) obtaining candidate QRS points; 3) removing non-QRS points in the candidate QRS points and generating a data set; 4) The QRS point coordinates are screened through the convolutional neural network; the underlying convolution of the ECG signal is performed using the modern convolutional neural network algorithm, and then the features obtained by the underlying convolution of each lead are further extracted through the LSTM layer and the Dense layer. The final feature is obtained and then input to the classifier for classification to obtain the QRS point classification result. The recognition of QRS points of ECG signal obtained by this method has a high accuracy. Its confusion matrix is as follows:

Figure 632931DEST_PATH_IMAGE002
Figure 632931DEST_PATH_IMAGE002

附图说明Description of drawings

图1 底层卷积层示意图;其中X为输入,c为卷积层,b为BN层,p为maxpling层,l为lstm层,a是激励单元,d为dence层,Attention为Attention层,y_pred为输出。Figure 1 Schematic diagram of the bottom convolutional layer; where X is the input, c is the convolutional layer, b is the BN layer, p is the maxpling layer, l is the lstm layer, a is the excitation unit, d is the dence layer, Attention is the Attention layer, y_pred for output.

具体实施方式Detailed ways

实施例1 心电信号的QRS点检测方法Embodiment 1 QRS point detection method of ECG signal

下面结合具体的实施方式对本发明作进一步说明。The present invention will be further described below in conjunction with specific embodiments.

具体实例为2019年第二届中国生理信号挑战赛发布的训练数据集,该数据集收集了从心血管疾病(CVD)患者收集的2,000条单导联心电图记录,每条记录持续10 s。测试仪包含相同长度的相似ECG记录,这些记录不公开,并且将在挑战期间和之后的一段时间内为评分而保持私有。心电图记录是使用多种仪器从多个来源获得的,尽管在所有情况下,它们在此处均以500 Hz采样率表示。所有记录均以MATLAB格式提供(每个记录包括两个.mat文件:一个是ECG数据,另一个是相应的QRS注释文件)。本实例通过工作在计算机上的软件系统(windows linux)和行业内所周知的Matlab仿真环境与python仿真环境进行实现。A specific example is the training dataset released at the 2nd China Physiological Signal Challenge in 2019, which collected 2,000 single-lead ECG recordings from cardiovascular disease (CVD) patients, each lasting 10 s. The tester contains similar ECG recordings of the same length, which are not public and will remain private for scoring during the challenge and for a period of time thereafter. ECG recordings were obtained from multiple sources using a variety of instruments, although in all cases they are represented here at a 500 Hz sampling rate. All records are provided in MATLAB format (each record includes two .mat files: one with ECG data and the other with the corresponding QRS annotation file). This example is implemented through the software system (windows linux) working on the computer and the well-known Matlab simulation environment and python simulation environment in the industry.

本实施例的详细步骤如下:The detailed steps of this embodiment are as follows:

一、原始心电信号的去噪1. Denoising of the original ECG signal

(1)变量设置及数据准备(1) Variable setting and data preparation

新建大小为1*2000的元组ref,将2019年第二届中国生理信号挑战赛发布的训练数据集的2000条心电数据分别用load函数加载到环境变量中,每个人的心电信号加载后的变量为大小为 1*5000的矩阵e,依次读取每一条原始心电信号矩阵e横向拼接组成2000*5000的变量ecg,其中每一行即为数据库的每一个人心电数据的第一通道心电信号。同时使用load()函数读取每一条原始心电信号的人工标记的QRS点,存入元组ref{ii}中,其中ii为1到2000,分别对应2000条原始心电信号的人工标记的QRS点。Create a new tuple ref with a size of 1*2000, and use the load function to load the 2000 pieces of ECG data from the training data set released in the 2nd China Physiological Signal Challenge in 2019 into the environment variables, and load the ECG signals of each person. The latter variable is a matrix e with a size of 1*5000, and each original ECG signal matrix e is read in turn to form a variable ecg of 2000*5000, where each row is the first channel of each ECG data in the database. ECG signal. At the same time, use the load() function to read the manually marked QRS points of each original ECG signal and store them in the tuple ref{ii}, where ii is 1 to 2000, corresponding to the manually marked QRS points of 2000 original ECG signals respectively. QRS points.

(2)切比雪夫

Figure 18913DEST_PATH_IMAGE001
型滤波器参数准备(2) Chebyshev
Figure 18913DEST_PATH_IMAGE001
Type filter parameter preparation

新建2000*5000的变量y,用于储存用切比雪夫

Figure 923284DEST_PATH_IMAGE001
型带通滤波器滤波后的信号。设滤波器阶数n为2,阻带衰减Rs为30Hz,分辨率fs为500Hz。通带频率为5Hz到50Hz。则通带频率矩阵W为由数字5和数字50组成的1*2的矩阵。将参数n,Rs,W输入到MATLAB内置函数cheby2()中,得到切比雪夫二型滤波器参数a,b。然后将参数a,b和待滤波信号ecg(i,:)一起输入到MATLAB内置函数flitflit()中,输出为与输入的一维信号相同的矩阵。最后将数据库的每一个心电数据的第一通道心电信号进行滤波后的信号依次存放到变量y中。Create a new 2000*5000 variable y for storing Chebyshev
Figure 923284DEST_PATH_IMAGE001
The signal after filtering by the type band-pass filter. The filter order n is set to 2, the stopband attenuation Rs is 30Hz, and the resolution fs is 500Hz. The passband frequency is 5Hz to 50Hz. Then the passband frequency matrix W is a 1*2 matrix composed of numbers 5 and 50. Input the parameters n, Rs, W into the MATLAB built-in function cheby2() to get the Chebyshev type 2 filter parameters a, b. Then the parameters a, b and the signal to be filtered ecg(i,:) are input into the MATLAB built-in function flitflit(), and the output is the same matrix as the input one-dimensional signal. Finally, the filtered signal of the first channel ECG signal of each ECG data in the database is sequentially stored in the variable y.

具体操作如下:The specific operations are as follows:

当i取1到44时when i takes 1 to 44

[b,a] = cheby2(N,Rs,W *2/fs);[b,a] = cheby2(N,Rs,W*2/fs);

y(i,:)= filtfilt(b,a,ecg(i,:)); y(i,:)= filtfilt(b,a,ecg(i,:));

二、生成QRS点数据样本2. Generate QRS point data samples

(1)变量设置及数据准备(1) Variable setting and data preparation

新建大小为1*5000的暂存去噪信号矩阵b,用于暂时存放步骤(2)遍历矩阵y时截取的滤波后的信号。新建大小为1*2000大小的元组R_place1用于存放检出的过检测类QRS点坐标点。其中元组R_place1的每一个元素均为从数据库的一个心电数据的第一通道心电信号检测出的过检测类QRS点坐标点矩阵。新建大小为1*2000大小的元组H_place1用于存放检出的过检测类QRS点幅度值,其中元组H_place1的每一个元素均为从数据库的一个心电数据的第一通道心电信号检测出的过检测类QRS点幅度值矩阵。Create a new temporary storage denoising signal matrix b with a size of 1*5000, which is used to temporarily store the filtered signal intercepted when traversing the matrix y in step (2). A newly created tuple R_place1 with a size of 1*2000 is used to store the detected over-detection class QRS point coordinates. Each element of the tuple R_place1 is an over-detected QRS point coordinate point matrix detected from the ECG signal of the first channel of an ECG data in the database. A new tuple H_place1 with a size of 1*2000 is used to store the detected over-detection class QRS point amplitude values, where each element of the tuple H_place1 is the first channel ECG signal detection of an ECG data from the database The resulting over-detection class QRS point amplitude value matrix.

当i=1,2,3…44时执行步骤(2):Step (2) is performed when i=1, 2, 3...44:

(2)暂存去噪信号矩阵令b=y(i,:),利用MATLAB内置函数hilbert()对暂存去噪信号矩阵b求希尔伯特变换,得到变换后信号x1,对变换后信号x1取绝对值,得到去噪信号的包络信号x2。并将包络信号存入矩阵y_ah(i,:)中。利用MATLAB内置函数fingpeaks()对包络信号x2识别波峰点坐标作为该条心电信号的过检测类QRS点坐标点集合以及幅度值集合,前者存入R_place1{i}中,后者存入H_place1{i}中。(2) Temporarily store the denoising signal matrix, let b=y(i,:), use the built-in function hilbert() of MATLAB to calculate the Hilbert transform of the temporarily stored denoising signal matrix b, and obtain the transformed signal x1. The absolute value of the signal x1 is taken to obtain the envelope signal x2 of the denoised signal. And store the envelope signal in the matrix y_ah(i,:). Use the MATLAB built-in function fingpeaks() to identify the peak point coordinates of the envelope signal x2 as the over-detection QRS point coordinate point set and the amplitude value set of the ECG signal. The former is stored in R_place1{i}, and the latter is stored in H_place1 in {i}.

具体操作如下:The specific operations are as follows:

b = y(i,:);b = y(i,:);

x1= hilbert(b);x1= hilbert(b);

x2 = abs(x1);x2 = abs(x1);

[H_place1{i},R_place1{i}]= fingpraks(x2);[H_place1{i},R_place1{i}]= fingpraks(x2);

y_ah(i,:) = x2;y_ah(i,:) = x2;

三、去除候选QRS点中的非QRS点以及数据集生成3. Remove non-QRS points in candidate QRS points and generate datasets

当i=1,2,3…2000时执行步骤(1)(2)(3)(4):Steps (1) (2) (3) (4) are executed when i=1, 2, 3...2000:

(1)数据准备(1) Data preparation

新建矩阵R_place等于R_place1{i},新建矩阵R_place2等于R_place1{i}新建矩阵e等于y_ah(i,:),人为设定的不应期X设为40,新建矩阵H_place等于H_place1{i}。新建空矩阵pr用于存放非QRS点。The new matrix R_place is equal to R_place1{i}, the new matrix R_place2 is equal to R_place1{i}, the new matrix e is equal to y_ah(i,:), the artificially set refractory period X is set to 40, and the new matrix H_place is equal to H_place1{i}. A new empty matrix pr is used to store non-QRS points.

(2)不应期去除非QRS点(2) Refractory period to remove non-QRS points

利用MATLAB内置函数min()寻找H_place的最小值p,并返回最小值p的在矩阵H_place1的下标pm,遍历数组R_place2,寻找到与R_place(pm)相同的元素并返回元素下标pm1,利用MATLAB内置函数diff()计算元素R_place2(pm1)与其相邻元素的差值,返回矩阵dif。如果矩阵dif的所有元素中有小于人为设定的不应期X的,则元素R_place2 (pm1)为非R点元素,删除。然后删除矩阵R_place1和 H_place1中下标为pm的元素,以保证在矩阵H_place1寻找最小值时能顺利更新最小值以及矩阵R_place1和 H_place1元素保持一致。顺序循环以上步骤直到R_place1{i}的每相邻两个元素的差值都小于B。Use the MATLAB built-in function min() to find the minimum value p of H_place, and return the subscript pm of the minimum value p in the matrix H_place1, traverse the array R_place2, find the same element as R_place (pm) and return the element subscript pm1, using The MATLAB built-in function diff() calculates the difference between the element R_place2(pm1) and its adjacent elements, and returns the matrix dif. If all elements of the matrix dif are smaller than the artificially set refractory period X, the element R_place2 (pm1) is a non-R point element and is deleted. Then delete the elements with the subscript pm in the matrices R_place1 and H_place1 to ensure that the minimum value can be smoothly updated when the matrix H_place1 is looking for the minimum value and the elements of the matrices R_place1 and H_place1 are consistent. Repeat the above steps in sequence until the difference between every two adjacent elements of R_place1{i} is less than B.

(3)数据集生成(3) Data set generation

a.在原始心电信号ecg(i,:)中,以R_place1{i}中的元素为下标, 向前截取149个点,其中向前截取的时候需要将下标的元素包含在内,向后截取150个点,每个R_place1{i}中的元素截取300个点的候选QRS点原始数据样本T1。a. In the original ECG signal ecg(i,:), the elements in R_place1{i} are used as subscripts, and 149 points are intercepted forward. After 150 points are intercepted, each element in R_place1{i} intercepts 300 points of candidate QRS point raw data samples T1.

b.在包络信号x2(i,:)中,以R_place1{i}中的元素为下标, 向前截取149个点,其中向前截取的时候需要将下标的元素包含在内,向后截取150个点,每个R_place1{i}中的元素截取300个点的候选QRS点包络数据样本T2。b. In the envelope signal x2(i,:), the elements in R_place1{i} are used as subscripts, and 149 points are intercepted forward. 150 points are intercepted, and each element in R_place1{i} intercepts 300 points of candidate QRS point envelope data samples T2.

c.将QRS点数据样本T1通过matlab的一维中值滤波函数medfilt1()进行30阶中值滤波得到候选QRS点滤波后数据样本T3.c. The QRS point data sample T1 is subjected to 30-order median filtering through the one-dimensional median filter function medfilt1() of matlab to obtain the candidate QRS point filtered data sample T3.

d.将候选QRS点原始数据样本T1,候选QRS点包络数据样本T2,候选QRS点滤波后数据样本T3进行横向拼接,得到维度为1*900的QRS混合数据样本d. Perform horizontal splicing of the original data sample T1 of the candidate QRS point, the envelope data sample T2 of the candidate QRS point, and the filtered data sample T3 of the candidate QRS point to obtain a QRS mixed data sample with a dimension of 1*900

则每一个R_place1{i}中的元素均得到1*900个点,作为每一个候选QRS点数据样本T的一个样本。然后对所有的R_place1{i}中的元素进行同样的操作。得到包含(1*900)*114926维数据的数据集,因为每个样本都是(1*900)维,由于每个样本都是根据R_place1中的元素位置截取的,所以114926为截取所使用的R_place1{i}中的元素的个数,也就是样本的个数。每个样本都是1*900的候选QRS点数据样本T,作为卷积神经网络的输入。Then each element in R_place1{i} gets 1*900 points as a sample of each candidate QRS point data sample T. Then do the same for all the elements in R_place1{i}. Get a dataset containing (1*900)*114926-dimensional data, because each sample is (1*900)-dimensional, and since each sample is intercepted according to the element position in R_place1, 114926 is used for interception The number of elements in R_place1{i}, that is, the number of samples. Each sample is a 1*900 candidate QRS point data sample T, which is used as the input of the convolutional neural network.

e.每一个QRS点数据样本T的标签则是通过依次读取R_place1{i}中的元素与ref{i}中的所有元素相减得到矩阵l_dif,然后再去矩阵l_dif的绝对值得到矩阵l_ad,如果矩阵l_ad中有小于37的元素则判断R_place1{i}中的元素相对应的QRS点数据矩阵的标签为1,反之为0,e. The label of each QRS point data sample T is obtained by sequentially reading the elements in R_place1{i} and subtracting all elements in ref{i} to obtain matrix l_dif, and then go to the absolute value of matrix l_dif to obtain matrix l_ad , If there are elements less than 37 in the matrix l_ad, judge that the label of the QRS point data matrix corresponding to the elements in R_place1{i} is 1, otherwise it is 0,

四、通过卷积神经网络筛选QRS点坐标4. Screening QRS point coordinates through convolutional neural network

(1)搭建卷积神经网络模型(1) Build a convolutional neural network model

所述卷积神经网络模型输入为QRS点混合数据样本T,T是预处理部分输出的一个(1*900)维的心候选QRS点数据的样本,其中900为截取的候选QRS点数据样本点数。将输入心电信号样本一个1*900维即候选QRS点数据样本输入到底层卷积层中,即候选QRS点数据样本进入底层卷积层进行处理, 其中每个底层卷积层包含一个卷积层,每个卷积层单元的输出端依次串联的一BN层,一激励单元操作和一池化层操作;第一个卷积层单元的卷积核数为64个,卷积核大小为3,卷积方式为same,BN层单元后的激励单元为elu函数,池化层单元的池化核大小为2,池化步长为2;经过第一层池化单元后的特征图维度为(900/2)*64;第二个卷积层单元的卷积核数为256个,卷积核大小为3,卷积方式为same,BN层单元后的激励单元为elu函数,池化层单元的池化核大小为2,池化步长为2;经过第二层池化单元后的特征图维度为(900/4)*256,第三个卷积层单元的卷积核数为32个,卷积核大小为3,卷积方式为same,BN层单元后的激励单元为elu函数,池化层单元的池化核大小为2,池化步长为2;经过第三层池化单元后的特征图维度为(900/8)*256,然后通过一个LSTM层,LSTM层的输出定义为32,经过LSTM层后的特征图维度为(900/8)*32,然后经过一个attention层,得到特征图维度为1*32,最后经过四个Dense层,得到的输出y_perd;所述模型使用tensorflow开源框架和python语言搭建。The input of the convolutional neural network model is a QRS point mixed data sample T, where T is a (1*900) dimensional heart candidate QRS point data sample output by the preprocessing part, and 900 is the intercepted candidate QRS point data sample number of points. . Input a 1*900 dimension of the input ECG signal sample, that is, the candidate QRS point data sample into the bottom convolution layer, that is, the candidate QRS point data sample enters the bottom convolution layer for processing, wherein each bottom convolution layer contains a convolution layer. layer, the output of each convolution layer unit is connected in series with a BN layer, an excitation unit operation and a pooling layer operation; the number of convolution kernels of the first convolution layer unit is 64, and the size of the convolution kernel is 3. The convolution method is the same, the excitation unit after the BN layer unit is the elu function, the pooling kernel size of the pooling layer unit is 2, and the pooling step size is 2; the dimension of the feature map after the first layer of pooling unit is (900/2)*64; the number of convolution kernels of the second convolution layer unit is 256, the size of the convolution kernel is 3, the convolution method is the same, the excitation unit after the BN layer unit is the elu function, the pool The pooling kernel size of the layer unit is 2, and the pooling step size is 2; the dimension of the feature map after the second layer pooling unit is (900/4)*256, and the convolution kernel of the third convolution layer unit The number is 32, the size of the convolution kernel is 3, the convolution method is the same, the excitation unit after the BN layer unit is the elu function, the size of the pooling kernel of the pooling layer unit is 2, and the pooling step size is 2; The dimension of the feature map after the three-layer pooling unit is (900/8)*256, and then through an LSTM layer, the output of the LSTM layer is defined as 32, and the dimension of the feature map after the LSTM layer is (900/8)*32, Then through an attention layer, the dimension of the feature map is 1*32, and finally through four Dense layers, the output y_perd is obtained; the model is built using the tensorflow open source framework and python language.

底层卷积层的网络参数可以查看表2。The network parameters of the bottom convolutional layer can be viewed in Table 2.

Figure DEST_PATH_IMAGE003
Figure DEST_PATH_IMAGE003

所述神经网络使用keras框架中的函数式模型搭建,即从 keras.models模块中导入Model函数,设置Model的输入为上述单导联的心电信号样本X,输出为维度为2的预测向量y_pred。通过导入tensorflow.keras.layers. Conv1D函数构造一维卷积层,通过导入tensorflow.keras.layers.MaxPool1D函数构造一维池化层,BatchNormalization层为tensorflow.keras.layers. BatchNormalization,全连接层为BatchNormalization.Dense。The neural network is built using the functional model in the keras framework, that is, the Model function is imported from the keras.models module, the input of the Model is set to the above-mentioned single-lead ECG signal sample X, and the output is a prediction vector y_pred with dimension 2 . The one-dimensional convolution layer is constructed by importing the tensorflow.keras.layers.Conv1D function, and the one-dimensional pooling layer is constructed by importing the tensorflow.keras.layers.MaxPool1D function. The BatchNormalization layer is tensorflow.keras.layers.BatchNormalization, and the fully connected layer is BatchNormalization .Dense.

(2)训练卷积神经网络模型的参数(2) Parameters for training the convolutional neural network model

首先初始化所述神经网络模型的训练参数,将采样好的信号划分为训练集样本和测试集样本,划分后的数据集U如表3所示。将训练集中采样后的单导联的心电信号输入到初始化后的卷积神经网络模型中,所述卷积神经网络中使用均方根对数误差作为代价函数。Tensorflow.Keras中使用mean_squared_logarithmic_error函数,所述神经网络中通过构建的函数式模型Model实例化一个对象model,在model.compile函数中设置参数loss为'mean_squared_logarithmic_error'。 并使用Adam优化器以最小化代价函数为目标进行迭代,通过在model.compile函数中设置参数optimizer为‘Adam’进行优化, 以生成所述深度神经网络并保存为hd5后缀的文件my_model.hd5;其中,每迭代一次则更新一次所述训练参数。直至最后所述的深度神经网络的损失值和准确率稳定在某一数值附近,即可停止训练并保存当前网络的训练参数和模型结构信息。所述神经网络共训练了1000个批次,每个批次为64个样本。First, the training parameters of the neural network model are initialized, and the sampled signal is divided into training set samples and test set samples, and the divided data set U is shown in Table 3. The single-lead ECG signal sampled in the training set is input into the initialized convolutional neural network model, and the root-mean-square logarithmic error is used as the cost function in the convolutional neural network. The mean_squared_logarithmic_error function is used in Tensorflow.Keras, an object model is instantiated through the constructed functional model Model in the neural network, and the parameter loss is set as 'mean_squared_logarithmic_error' in the model.compile function. And use the Adam optimizer to iterate with the goal of minimizing the cost function, and optimize by setting the parameter optimizer to 'Adam' in the model.compile function to generate the deep neural network and save it as a file my_model.hd5 with a hd5 suffix; Wherein, the training parameters are updated once every iteration. Until the loss value and the accuracy rate of the deep neural network described at the end are stabilized around a certain value, the training can be stopped and the training parameters and model structure information of the current network can be saved. The neural network was trained for a total of 1000 batches of 64 samples each.

Figure 302181DEST_PATH_IMAGE004
Figure 302181DEST_PATH_IMAGE004

(3)对测试集样本进行自动识别(3) Automatic identification of test set samples

将划分好的测试集样本全部输入到已保存的所述卷积神经网路model1.hd5中,运行所述卷积神经网络即可获得测试集样本对应的4维预测值向量输出y_pred,通过python 内置包numpy中的argmax函数将y_pred矩阵输入到函数中去,最终得到每一个四维预测值向量最大值的下标,该下标作为每一个心拍心电数据的预测分类,作为分类的结果存入矩阵RE中。再统计分类结果RE与y_label相同的样本个数n,用n除以测试集样本总数即为卷积神经网络的最终的准确率。而以RE中标签为1的类别所对应的过检测类QRS点数据样本即为检测到的QRS点数据样本,其所对应的R_place1中的元素即为所检测到的QRS点。Input all the divided test set samples into the saved convolutional neural network model1.hd5, and run the convolutional neural network to obtain the 4-dimensional predicted value vector output y_pred corresponding to the test set samples, through python The argmax function in the built-in package numpy inputs the y_pred matrix into the function, and finally obtains the subscript of the maximum value of each four-dimensional predicted value vector. matrix RE. Then count the same number of samples n of the classification result RE as y_label, and divide n by the total number of samples in the test set to obtain the final accuracy of the convolutional neural network. The over-detection class QRS point data sample corresponding to the category with the label of 1 in RE is the detected QRS point data sample, and the corresponding element in R_place1 is the detected QRS point.

Claims (3)

1. 心电信号QRS点检测方法,它包括:1. ECG signal QRS point detection method, which includes: 1)原始心电信号的去噪1) Denoising of the original ECG signal 读取原始心电信号e,对原始心电信号e进行切比雪夫
Figure DEST_PATH_IMAGE002
型带通滤波,得到去噪信号矩阵x;读取每一个原始心电信号的人工标记的QRS点矩阵ref,为下文制作标签做准备
Read the original ECG signal e, and perform Chebyshev on the original ECG signal e
Figure DEST_PATH_IMAGE002
Type band-pass filtering to obtain the denoised signal matrix x; read the manually marked QRS point matrix ref of each original ECG signal to prepare for the labeling below
2)得到候选QRS点2) Get candidate QRS points 对去噪信号矩阵x进行希尔伯特变换,得到变换后信号矩阵x1,对变换后信号矩阵x1取绝对值,得到去噪信号的包络信号矩阵x2;识别包络信号矩阵x2波峰点和波谷点,并将包络信号矩阵x2的波峰点和波谷点集合作为该条心电信号的过检测类QRS点的包络幅度值存入矩阵H_place1,并将包络信号矩阵x2的波峰点和波谷点的下标集合作为该条心电信号的过检测类QRS点的坐标点,存入矩阵R_place1;其中矩阵R_place1和矩阵H_place1的元素是一一对应的;Perform Hilbert transform on the denoised signal matrix x to obtain the transformed signal matrix x1, take the absolute value of the transformed signal matrix x1 to obtain the envelope signal matrix x2 of the denoised signal; identify the peak points of the envelope signal matrix x2 and the The trough point, and the set of peak points and trough points of the envelope signal matrix x2 are stored in the matrix H_place1 as the envelope amplitude value of the over-detected QRS point of the ECG signal, and the peak points and the peak points of the envelope signal matrix x2 and The subscript set of the trough point is used as the coordinate point of the over-detection QRS point of the ECG signal, and is stored in the matrix R_place1; the elements of the matrix R_place1 and the matrix H_place1 are in one-to-one correspondence; 3)去除候选QRS点中的非QRS点以及数据集生成3) Remove non-QRS points in candidate QRS points and generate datasets a.去除矩阵R_place1和H_place1中利用不应期检测到的非QRS点,此处的利用不应期检测到的非QRS点是指矩阵R_place1两相邻元素R1,R2差值小于B,B为不应期取值范围为0至300之间的任意整数,且在矩阵H_place1里两个相邻元素H1,H2数值较小的元素,继而得到矩阵R_place3和H_place3;其中元素R1在矩阵R_place1的下标与元素H1在矩阵H_place1的下标相同,元素R2在矩阵R_place1的下标与元素H2在矩阵H_place1的下标相同;a. Remove the non-QRS points detected by the refractory period in the matrices R_place1 and H_place1. The non-QRS point detected by the refractory period here refers to the difference between the two adjacent elements R1 and R2 of the matrix R_place1. The value range is any integer between 0 and 300, and the two adjacent elements H1 and H2 in the matrix H_place1 have smaller values, and then the matrices R_place3 and H_place3 are obtained; where the element R1 is in the subscript of the matrix R_place1 and The subscript of element H1 in matrix H_place1 is the same, and the subscript of element R2 in matrix R_place1 is the same as that of element H2 in matrix H_place1; b.在原始心电信号e中,以R_place3中的元素为下标, 向前截取P个点,其中向前截取的时候需要将下标的元素包含在内,向后截取Q个点,每个心拍截取W=P+Q个点的候选QRS点原始数据样本T1,b. In the original ECG signal e, take the element in R_place3 as the subscript, and intercept P points forward. When intercepting forward, the elements of the subscript need to be included, and Q points are intercepted backward. The heart beat intercepts the candidate QRS point raw data sample T1 of W=P+Q points, c. 在包络信号矩阵x2中,以R_place3中的元素为下标,向前截取P个点,其中向前截取的时候需要将下标的元素包含在内,向后截取Q个点,每个心拍截取W=P+Q个点的候选QRS点包络数据样本T2,c. In the envelope signal matrix x2, take the elements in R_place3 as the subscript, and intercept P points forward. When intercepting forward, the elements of the subscript need to be included, and Q points are intercepted backward. The heart beat intercepts the candidate QRS point envelope data samples T2 of W=P+Q points, d.对取到的候选QRS点原始数据样本T1进行一维中值滤波,得到候选QRS点滤波后信号T3,d. Perform one-dimensional median filtering on the obtained candidate QRS point raw data sample T1 to obtain the candidate QRS point filtered signal T3, e.对T1,T2,T3进行横向拼接得到(1*C)维候选QRS点数据样本T,其中C等于3*W,而后T作为卷积神经网络模型的输入X;将所有心电信号以上述截取方法对R_place3中的所有元素进行截取,形成数据集U, 其中数据集U中的每个样本都是上述1*(C)维的初步筛选后的候选QRS点数据样本;e. Horizontally splicing T1, T2, and T3 to obtain a (1*C)-dimensional candidate QRS point data sample T, where C is equal to 3*W, and then T is used as the input X of the convolutional neural network model; The above-mentioned interception method intercepts all elements in R_place3 to form a data set U, wherein each sample in the data set U is a candidate QRS point data sample after the preliminary screening of the above-mentioned 1*(C) dimension; f. 每一个截取的到的候选QRS点数据样本的标签的确定方法是将R_place3中的与候选QRS点数据样本相对应的元素依次与读取到的原始心电信号的QRS点矩阵ref做对比,如果R_place3中的元素与矩阵ref中的每一个元素的差都小于37,则判断该截取的到的过检测类QRS点数据样本的标签数据标签为1,反之为0;f. The method for determining the label of each intercepted candidate QRS point data sample is to compare the elements in R_place3 corresponding to the candidate QRS point data sample with the read QRS point matrix ref of the original ECG signal in turn , if the difference between the elements in R_place3 and each element in the matrix ref is less than 37, it is judged that the label data label of the intercepted over-detection class QRS point data sample is 1, otherwise it is 0; 4)通过卷积神经网络筛选QRS点坐标4) Screening QRS point coordinates through convolutional neural network a.搭建卷积神经网络模型a. Build a convolutional neural network model 卷积神经网络的核心主要由三个依次串联的底层卷积层,一个LSTM层,一个Attention层,四个Dense层组成;The core of the convolutional neural network is mainly composed of three bottom convolutional layers in series, one LSTM layer, one Attention layer, and four Dense layers; b.训练卷积神经网络参数b. Training convolutional neural network parameters 初始化所述卷积神经网络的参数,将采样好的数据集U随机抽取80%数目的样本当作训练集,数据集U的20%视为测试集;将训练集中的心电信号样本输入到初始化后的神经网络中,以最小化代价函数为目标进行迭代,生成所述卷积神经网络的参数并保存;在抽取训练集与测试集时,标签的元素也分别分配到相应的矩阵中,其中测试集的标签放入矩阵y_label中;Initialize the parameters of the convolutional neural network, randomly select 80% of the samples from the sampled data set U as the training set, and 20% of the data set U as the test set; input the ECG signal samples in the training set into the In the initialized neural network, iterates with the goal of minimizing the cost function to generate and save the parameters of the convolutional neural network; when extracting the training set and the test set, the elements of the label are also allocated to the corresponding matrix respectively, The label of the test set is put into the matrix y_label; c.对测试集样本的自动识别c. Automatic identification of test set samples 将划分测试集样本输入到卷积神经网络中并运行,获得测试集样本对应的2维预测值向量输出y_pred,然后选取2维预测向量输出的最大值的索引值作为该点是否是QRS点的预测类别,如果索引为1则所对应的过检测类QRS点数据样本即为检测到的QRS点数据样本,其所对应的R_place3中的元素即为所检测到的QRS点。Input the divided test set samples into the convolutional neural network and run it to obtain the 2-dimensional prediction value vector output y_pred corresponding to the test set samples, and then select the index value of the maximum value of the 2-dimensional prediction vector output as whether the point is a QRS point. Prediction category, if the index is 1, the corresponding over-detection class QRS point data sample is the detected QRS point data sample, and the corresponding element in R_place3 is the detected QRS point.
2.根据权利要求1所述的心电信号QRS点检测方法,其特征在于:所述卷积神经网络参数为:输入X为心电信号样本,每个候选QRS点数据样本都是1*W维,W为以每个候选QRS点数据样本的点数;将候选QRS点数据样本输入到底层卷积层中,其中每个底层卷积层包含一个卷积层,每个卷积层单元的输出端依次串联的一BN层,一激励单元操作和一池化层操作;第一个卷积层单元的卷积核数为64个,卷积核大小为3,卷积方式为same,BN层单元后的激励单元为elu函数,池化层单元的池化核大小为2,池化步长为2;经过第一层池化单元后的特征图维度为(C/2)*64;第二个卷积层单元的卷积核数为256个,卷积核大小为3,卷积方式为same,BN层单元后的激励单元为elu函数,池化层单元的池化核大小为2,池化步长为2;经过第二层池化单元后的特征图维度为(C4)*256,第三个卷积层单元的卷积核数为32个,卷积核大小为3,卷积方式为same,BN层单元后的激励单元为elu函数,池化层单元的池化核大小为2,池化步长为2;经过第三层池化单元后的特征图维度为(C/8)*256,然后通过一个LSTM层,LSTM层的输出定义为32,经过LSTM层后的特征图维度为(C/8)*32, 然后通过一个Attention层,所得到的特征图维度为1*32,经过两个Dense层,依次得到的特征维度为1*16,1*4,最终经过一个Dense层得到的输出y_pred,通过对y_pred的处理得到最终的分类结果存入矩阵RE中。2. ECG signal QRS point detection method according to claim 1, is characterized in that: described convolutional neural network parameter is: input X is ECG signal sample, and each candidate QRS point data sample is 1*W dimension, W is the number of points in each candidate QRS point data sample; the candidate QRS point data samples are input into the underlying convolutional layer, where each underlying convolutional layer contains a convolutional layer, and the output of each convolutional layer unit A BN layer, an excitation unit operation and a pooling layer operation are connected in series at the ends; the number of convolution kernels of the first convolution layer unit is 64, the size of the convolution kernel is 3, and the convolution method is the same, BN layer The excitation unit after the unit is the elu function, the pooling kernel size of the pooling layer unit is 2, and the pooling step size is 2; the dimension of the feature map after the first layer of pooling units is (C/2)*64; The number of convolution kernels of the two convolutional layer units is 256, the size of the convolution kernel is 3, the convolution method is the same, the excitation unit after the BN layer unit is the elu function, and the pooling kernel size of the pooling layer unit is 2 , the pooling step size is 2; the dimension of the feature map after the second layer pooling unit is (C4)*256, the number of convolution kernels of the third convolution layer unit is 32, and the size of the convolution kernel is 3, The convolution method is the same, the excitation unit after the BN layer unit is the elu function, the pooling kernel size of the pooling layer unit is 2, and the pooling step size is 2; the dimension of the feature map after the third layer pooling unit is ( C/8)*256, and then pass through an LSTM layer, the output of the LSTM layer is defined as 32, the dimension of the feature map after passing through the LSTM layer is (C/8)*32, and then through an Attention layer, the resulting feature map dimension It is 1*32, after two Dense layers, the feature dimensions obtained in turn are 1*16, 1*4, and finally the output y_pred obtained through a Dense layer, the final classification result obtained by processing y_pred is stored in the matrix RE . 3.根据权利要求2所述的心电信号QRS点检测方法,其特征在于:所述的迭代为:迭代一次更新一次训练参数,直至最后卷积神经网络的损失值和准确率稳定在某一数值附近,停止训练并保存当前网络的训练参数和模型结构信息。3. The electrocardiographic signal QRS point detection method according to claim 2, wherein the iteration is: iteratively update a training parameter once, until the loss value and the accuracy rate of the final convolutional neural network are stable at a certain Near the value, stop training and save the training parameters and model structure information of the current network.
CN202010745385.XA 2020-07-29 2020-07-29 QRS point detection method of low-quality electrocardiogram Withdrawn CN111956215A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010745385.XA CN111956215A (en) 2020-07-29 2020-07-29 QRS point detection method of low-quality electrocardiogram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010745385.XA CN111956215A (en) 2020-07-29 2020-07-29 QRS point detection method of low-quality electrocardiogram

Publications (1)

Publication Number Publication Date
CN111956215A true CN111956215A (en) 2020-11-20

Family

ID=73363477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010745385.XA Withdrawn CN111956215A (en) 2020-07-29 2020-07-29 QRS point detection method of low-quality electrocardiogram

Country Status (1)

Country Link
CN (1) CN111956215A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102038497A (en) * 2010-12-02 2011-05-04 广东宝莱特医用科技股份有限公司 Electrocardiosignal noise analysis method
CN103501694A (en) * 2011-03-24 2014-01-08 德尔格医疗系统有限公司 Apparatus and method for measuring physiological signal quality
US20170325701A1 (en) * 2016-05-12 2017-11-16 Imec Vzw Device and Method for Controlling Acquisition of a Signal and a System for Acquisition of a Signal
CN107837082A (en) * 2017-11-27 2018-03-27 乐普(北京)医疗器械股份有限公司 Electrocardiogram automatic analysis method and device based on artificial intelligence self study
CN109157202A (en) * 2018-09-18 2019-01-08 东北大学 A kind of cardiovascular disease early warning system based on more physiological signal depth integrations
CN110650671A (en) * 2015-11-23 2020-01-03 梅奥医学教育和研究基金会 Processing physiological electrical data for analyte evaluation
CN110897635A (en) * 2019-12-31 2020-03-24 中国海洋大学 Method for ECG Signal Extraction and Recognition in Real Scenarios

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102038497A (en) * 2010-12-02 2011-05-04 广东宝莱特医用科技股份有限公司 Electrocardiosignal noise analysis method
CN103501694A (en) * 2011-03-24 2014-01-08 德尔格医疗系统有限公司 Apparatus and method for measuring physiological signal quality
CN110650671A (en) * 2015-11-23 2020-01-03 梅奥医学教育和研究基金会 Processing physiological electrical data for analyte evaluation
US20170325701A1 (en) * 2016-05-12 2017-11-16 Imec Vzw Device and Method for Controlling Acquisition of a Signal and a System for Acquisition of a Signal
CN107837082A (en) * 2017-11-27 2018-03-27 乐普(北京)医疗器械股份有限公司 Electrocardiogram automatic analysis method and device based on artificial intelligence self study
CN109157202A (en) * 2018-09-18 2019-01-08 东北大学 A kind of cardiovascular disease early warning system based on more physiological signal depth integrations
CN110897635A (en) * 2019-12-31 2020-03-24 中国海洋大学 Method for ECG Signal Extraction and Recognition in Real Scenarios

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张海斌等: "基于卷积神经网络的心电信号质量分析", 《 计算机工程与应用》 *

Similar Documents

Publication Publication Date Title
CN107981858B (en) Automatic recognition and classification method of electrocardiogram and heartbeat based on artificial intelligence
CN104970789B (en) Electrocardiogram sorting technique and system
CN110495872B (en) Electrocardiogram analysis method, device, equipment and medium based on picture and heartbeat information
CN111956212B (en) Inter-group atrial fibrillation recognition method based on frequency domain filtering-multi-mode deep neural network
CN113066502B (en) A segmentation and localization method of heart sounds based on VMD and multiwavelets
CN111956211A (en) Automatic detection method for atrial fibrillation of single lead electrocardiosignal
EP3698708A1 (en) Ecg information processing method and ecg workstation
Ahmed et al. An investigative study on motifs extracted features on real time big-data signals
CN107095684B (en) A kind of autism of children risk evaluating system based on brain electricity
CN112036467A (en) Abnormal heart sound identification method and device based on multi-scale attention neural network
CN111481192A (en) Electrocardiosignal R wave detection method based on improved U-Net
CN113436726B (en) An automatic analysis method of lung pathological sounds based on multi-task classification
CN110718301B (en) Alzheimer's disease auxiliary diagnosis device and method based on dynamic brain function network
WO2021152089A1 (en) Systematic characterization of objects in a biological sample
CN112336369B (en) Coronary heart disease risk index evaluation system of multichannel heart sound signals
CN112365976A (en) Compound disease clinical path construction method and system based on transfer learning
CN116172573A (en) Arrhythmia image classification method based on improved acceptance-ResNet-v 2
CN111554319B (en) Multichannel heart-lung sound abnormality recognition system and device based on low-rank tensor learning
CN117409016B (en) Automatic segmentation method for magnetic resonance image
CN111956215A (en) QRS point detection method of low-quality electrocardiogram
CN117770818A (en) Emotion recognition method and system
CN114652324B (en) Single-heart beat classification method, device, equipment and computer readable storage medium
CN111956216A (en) QRS point identification in low-quality electrocardiosignal based on filtering and convolution neural network
CN106618552B (en) A detection model acquisition method and device
KR20240044290A (en) Arrhythmia detection device and method based on parallel cross convolutional recurrent 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
WW01 Invention patent application withdrawn after publication

Application publication date: 20201120

WW01 Invention patent application withdrawn after publication