CN114224351A - Atrial fibrillation identification method based on fusion of multiple deep learning models - Google Patents

Atrial fibrillation identification method based on fusion of multiple deep learning models Download PDF

Info

Publication number
CN114224351A
CN114224351A CN202210036801.8A CN202210036801A CN114224351A CN 114224351 A CN114224351 A CN 114224351A CN 202210036801 A CN202210036801 A CN 202210036801A CN 114224351 A CN114224351 A CN 114224351A
Authority
CN
China
Prior art keywords
convolution
layer
model
atrial fibrillation
data
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.)
Granted
Application number
CN202210036801.8A
Other languages
Chinese (zh)
Other versions
CN114224351B (en
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.)
Zhejiang Helowin Medical Technology Co ltd
Original Assignee
Zhejiang Helowin Medical Technology Co ltd
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 Zhejiang Helowin Medical Technology Co ltd filed Critical Zhejiang Helowin Medical Technology Co ltd
Priority to CN202210036801.8A priority Critical patent/CN114224351B/en
Publication of CN114224351A publication Critical patent/CN114224351A/en
Application granted granted Critical
Publication of CN114224351B publication Critical patent/CN114224351B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • A61B5/352Detecting R peaks, e.g. for synchronising diagnostic apparatus; Estimating R-R interval
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • A61B5/361Detecting fibrillation
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • A61B5/363Detecting tachycardia or bradycardia
    • 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/725Details of waveform analysis using specific filters therefor, e.g. Kalman or adaptive filters
    • 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

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Cardiology (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Animal Behavior & Ethology (AREA)
  • Public Health (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • Pathology (AREA)
  • Veterinary Medicine (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physiology (AREA)
  • Psychiatry (AREA)
  • Signal Processing (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

An atrial fibrillation recognition method based on fusion of a plurality of deep learning models can accurately and quickly analyze whether atrial fibrillation symptoms appear in electrocardiosignals, and the method comprises the steps of 1) data acquisition and preprocessing; 2) building a neural network model; 3) training a neural network model; 4) automatically identifying the test set sample; 5) the method can accurately and quickly analyze whether the electrocardiosignal has atrial fibrillation symptoms or not, then carries out result fusion according to the output confidence coefficient of each model, and finally provides a diagnosis result of the atrial fibrillation.

Description

Atrial fibrillation identification method based on fusion of multiple deep learning models
Technical Field
The invention relates to an atrial fibrillation identification method based on fusion of a plurality of deep learning models, and belongs to the technical field of medical signal processing.
Background
From a medical point of view, the judgment of atrial fibrillation mainly depends on two major criteria: disappearance of P-waves and unequal RR intervals. Wherein the disappearance of the P wave means that the P wave in the electrocardiogram of the patient disappears, and meanwhile, a high frequency f wave is observed at the place of the P wave, and the frequency is about 350-. The RR interphase unevenness refers to the difference in the interval between QRS wave crests between adjacent heartbeats of patients with atrial fibrillation.
Based on the two atrial fibrillation detection standards, a series of traditional atrial fibrillation detection algorithms based on arrhythmia interval sequences and an atrial fibrillation detection algorithm for detecting whether P waves disappear or not in a single heart beat by using a machine learning or deep learning technology are derived. However, the algorithms only study the difference between atrial fibrillation and normal sinus heartbeat, and can not accurately distinguish abnormal heartbeats such as frequent premature beats, atrial tachycardia, atrial premature beat bigeminy and the like, and the algorithms cannot consider two atrial fibrillation detection standards of P-wave disappearance and RR interval inequality at the same time. This patent is to two standards of P wave disappearance and RR interphase inequality, trains out a degree of deep learning model respectively, then according to the output confidence of every model, carries out the result and fuses to finally give the diagnostic result of atrial fibrillation.
Disclosure of Invention
The invention aims to provide a method for identifying atrial fibrillation and other abnormal electrocardios and normal electrocardios, which can accurately and quickly analyze whether the atrial fibrillation symptom appears in electrocardiosignals. The specific method comprises the following steps:
1) data acquisition and preprocessing:
(1) inputting electrocardiogram data, carrying out filtering processing on the electrocardiogram data, then carrying out R-wave positioning detection on the filtered electrocardiogram data, identifying the R-wave position in the electrocardiogram data, calculating all RR intervals, and simultaneously limiting the absolute value of the voltage value of the electrocardiogram signal within a certain range, thereby preventing bad influence caused by individual large numerical value;
(2) slicing the electrocardio data according to the length of 30 seconds, wherein each piece of data is a one-dimensional vector with the length of L and is marked as Xori(ii) a And simultaneously recording the RR interval array corresponding to the data in 30 seconds as xRRWherein X isRRThe length of (1) is 100, if the number of RR intervals corresponding to the data in 30 seconds is less than 100, zero padding is carried out, and if the number of RR intervals corresponding to the data in 30 seconds exceeds 100, only the first 100 RR intervals are taken.
2) Building a neural network model:
the patent comprises two neural network models, wherein the models1Comprises two ofThe input channel comprises a first input channel, a second input channel and a third input channel, wherein the first input channel consists of four convolutional layer units which are connected in series and a self-attention layer unit, the second input channel consists of four convolutional layer units which are connected in series, an Averagepool layer is arranged at the output end of each input channel, characteristic graphs of the Averagepool layers of each input channel are combined in the depth direction and are recorded as a combined layer, a full-connection layer is connected in series after the combined layer, and finally a Model is obtained through a softmax layer1And outputting the result. Wherein the Model is2Only one input channel is connected with three residual convolution layer units and one Averagepool layer in series, then connected with a full connection layer in series, and finally a Model is obtained through the softmax layer2The convolution layer unit uses one-dimensional convolution.
3) Training a neural network model:
after the two neural network model parameters are initialized, dividing all 30-second electrocardiosignal data sets U into data sets U1 and U2, taking samples of the data sets U1 as training sets, and taking samples of the data sets U2 as test sets; x of the training setoriAnd XRRInput to the initialized Model1In (1), mixing XRRInput to the initialized Model2In the method, an Adam optimizer is used for training by taking a minimum cost function as a target until a model converges, parameters of the two neural networks are generated, and the model is stored as a PB file.
4) Automatically identifying the test set samples:
test set X to be dividedoriAnd XRRInputting to the saved neural network Model1In the method, the 2-dimensional predicted value vector output y corresponding to the test set sample can be obtained by operating the deep neural network1Wherein y is1The first dimension represents the probability value of predicting atrial fibrillation and the second dimension represents the probability value of predicting non-atrial fibrillation. Test set X to be dividedRRInputting to the saved neural network Model2In the method, the 2-dimensional predicted value vector output y corresponding to the test set sample can be obtained by operating the deep neural network2Wherein y is2Represents the probability of predicting atrial fibrillationValue, the second dimension represents the probability value for predicting non-atrial fibrillation.
5) Model fusion and evaluation:
will y1Plus y2The result of (A) is denoted as ytIf y istIf the value of the first dimension is larger than that of the second dimension, the final fusion result is atrial fibrillation, otherwise, the final fusion result is non-atrial fibrillation. And comparing the final fusion result with the label of the test set sample to evaluate the precision and the recall rate of the model.
Preferably, the method comprises the following steps: the number of convolution kernels of a first convolution layer unit in the four convolution layer units connected in series is 16, the size of the convolution kernels is 16, and the convolution step length is 2; the number of convolution kernels of the second convolution layer unit is 32, the size of the convolution kernels is 8, and the convolution step length is 1; the number of convolution kernels of the third convolution layer unit is 64, the size of the convolution kernels is 4, and the convolution step size is 1; the number of convolution kernels of the fourth convolution layer unit is 128, the convolution kernel size is 2, and the convolution step size is 1. The excitation unit behind each convolution layer unit is a relu function, the size of the pooling kernel of the pooling layer unit is 2, and the pooling step length is 1.
Preferably, the method comprises the following steps: the self-attention layer unit is internally provided with 3 conversion matrixes Wq、WkAnd WvThey all have dimensions 456 x 456. The second input channel consists of four convolutional layer units connected in series, the number of convolution kernels of the first two convolutional layer units is 64, the size of the convolution kernels is 5, and the convolution step size is 1. The number of convolution kernels of the last two convolution layer units is 128, the convolution kernel size is 5, and the convolution step size is 1. An Averagepool layer is arranged at the output end of each input channel, the characteristic graphs of the Averagepool layers of each input channel are combined in the depth direction and recorded as a combined layer, a full-connection layer is connected in series after the combined layer, the number of neurons of the full-connection layer is 64, and finally a Model is obtained through a softmax layer1And outputting the result.
Preferably, the method comprises the following steps: the Model2Only one input channel is connected with three residual convolutional layer units in series, each residual convolutional layer unit has 2 convolutional layers in total, and an excitation unit of each convolutional layer is a relu function. The number of convolution kernels of the first residual convolution layer unit is 32The convolution kernel size is 3, the number of convolution kernels of the second residual convolution layer unit is 64, the convolution kernel size is 3, the number of convolution kernels of the third residual convolution layer unit is 128, and the convolution kernel size is 3. Then serially connecting an Averagepool layer, then serially connecting a full connection layer, wherein the number of neurons of the full connection layer is 64, and finally obtaining a Model through a softmax layer2And outputting the result.
The method can accurately and quickly analyze whether the electrocardiosignal has atrial fibrillation symptoms or not, then carries out result fusion according to the output confidence coefficient of each model, and finally gives the diagnosis result of the atrial fibrillation.
Drawings
FIG. 1 is a flow chart of the algorithm of the present invention.
Detailed Description
The invention will be described in detail below with reference to the following figures: as shown in fig. 1, the atrial fibrillation recognition method based on fusion of multiple deep learning models can accurately and quickly analyze whether atrial fibrillation symptoms occur in electrocardiosignals, and the method includes:
1) data acquisition and preprocessing:
(1) inputting electrocardiogram data, carrying out filtering processing on the electrocardiogram data, then carrying out R-wave positioning detection on the filtered electrocardiogram data, identifying the R-wave position in the electrocardiogram data, calculating all RR intervals, and simultaneously limiting the absolute value of the voltage value of the electrocardiogram signal within a certain range, thereby preventing bad influence caused by individual large numerical value;
(2) slicing the electrocardio data according to the length of 30 seconds, wherein each piece of data is a one-dimensional vector with the length of L and is marked as Xori(ii) a And simultaneously recording the RR interval array corresponding to the data in 30 seconds as XRRWherein X isRRThe length of the interval is 100, if the number of the RR intervals corresponding to the data in the 30 seconds is less than 100, zero padding is carried out, and if the number of the RR intervals corresponding to the data in the 30 seconds exceeds 100, only the first 100 RR intervals are taken;
2) building a neural network model:
the patent comprises two neural network models, wherein the models1Comprising two input channels connected in parallel in sequence, the firstEach input channel consists of four convolutional layer units connected in series and a self-attention layer unit, the second input channel consists of four convolutional layer units connected in series, an Averagepool layer is arranged at the output end of each input channel, the characteristic diagrams of the Averagepool layers of each input channel are combined in the depth direction and are recorded as a combined layer, a full-connection layer is connected in series after the combined layer, and finally, a Model is obtained through a softmax layer1Output the result of (1), wherein the Model2Only one input channel is connected with three residual convolution layer units and one Averagepool layer in series, then connected with a full connection layer in series, and finally a Model is obtained through the softmax layer2The convolution layer unit uses one-dimensional convolution;
3) training a neural network model:
after the two neural network model parameters are initialized, dividing all 30-second electrocardiosignal data sets U into data sets U1 and U2, taking samples of the data sets U1 as training sets, and taking samples of the data sets U2 as test sets; x of the training setoriAnd XRRInput to the initialized Model1In (1), mixing XRRInput to the initialized Model2In the method, an Adam optimizer is used for training by taking a minimum cost function as a target until a model converges, parameters of the two neural networks are generated, and the model is saved as a PB file;
4) automatically identifying the test set samples:
test set X to be dividedoriAnd XRRInputting to the saved neural network Model1In the method, the 2-dimensional predicted value vector output y corresponding to the test set sample can be obtained by operating the deep neural network1Wherein y is1The first dimension represents the probability value of predicting atrial fibrillation, the second dimension represents the probability value of predicting non-atrial fibrillation, and the divided test set XRRInputting to the saved neural network Model2In the method, the 2-dimensional predicted value vector output y corresponding to the test set sample can be obtained by operating the deep neural network2Wherein y is2The first dimension represents the probability value of predicting atrial fibrillation, and the second dimension representsPredicting the probability value of the non-atrial fibrillation;
5) model fusion and evaluation:
will y1Plus y2The result of (A) is denoted as ytIf y istIf the value of the first dimension is larger than that of the second dimension, the final fusion result is atrial fibrillation, otherwise, the final fusion result is non-atrial fibrillation, and the final fusion result is compared with the label of the test set sample to evaluate the accuracy and the recall rate of the model.
The number of convolution kernels of a first convolution layer unit in the four convolution layer units connected in series is 16, the size of the convolution kernels is 16, and the convolution step length is 2; the number of convolution kernels of the second convolution layer unit is 32, the size of the convolution kernels is 8, and the convolution step length is 1; the number of convolution kernels of the third convolution layer unit is 64, the size of the convolution kernels is 4, and the convolution step size is 1; the number of convolution kernels of the fourth convolutional layer unit is 128, the size of the convolution kernels is 2, and the convolution step is 1, wherein the excitation unit behind each convolutional layer unit is a relu function, the size of the pooling kernel of the pooling layer unit is 2, and the pooling step is 1.
The self-attention layer unit is internally provided with 3 conversion matrixes Wq、WkAnd WvThe dimensions of the two input channels are 456 x 456, the second input channel is composed of four convolutional layer units which are connected in series, the number of convolution kernels of the first two convolutional layer units is 64, the size of the convolution kernels is 5, the convolution step is 1, the number of convolution kernels of the last two convolutional layer units is 128, the size of the convolution kernels is 5, the convolution step is 1, an Averagepool layer is arranged at the output end of each input channel, feature graphs of the Averagepool layers of each input channel are combined in the depth direction and are recorded as a combined layer, a full connection layer is connected in series after the combined layer, the number of neurons of the full connection layer is 64, and finally, a Model is obtained through a softmax layer1And outputting the result.
The Model2Only one input channel is connected with three residual convolutional layer units in series, each residual convolutional layer unit has 2 convolutional layers, the excitation unit of the convolutional layer is a relu function, the number of convolutional kernels of the first residual convolutional layer unit is 32, the size of the convolutional kernels is 3, and the number of convolutional kernels of the second residual convolutional layer unit is64 convolution kernels with the size of 3, the number of the convolution kernels of the third residual convolution layer unit being 128, the size of the convolution kernels being 3, then serially connecting an Averagepool layer, then serially connecting a full connection layer with the number of the neurons being 64, and finally obtaining a Model through a softmax layer2And outputting the result.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
1) Data extraction:
by data acquisition, 43780 parts of electrocardio data, 21890 parts of atrial fibrillation samples and 21890 parts of non-atrial fibrillation samples are acquired, wherein the non-atrial fibrillation samples comprise 5000 parts of sinus heartbeat, 5000 parts of frequent atrial premature beat, 2500 parts of sporadic atrial premature beat, 2500 parts of frequent ventricular premature beat, 1000 parts of sporadic ventricular premature beat, 1000 parts of sinus tachycardia, 1500 parts of atrial tachycardia, 2500 parts of sinus bradycardia and 890 parts of other types of abnormal electrocardio.
2) Data preprocessing:
(1) and filtering the electrocardio data, performing R-wave positioning detection on the filtered electrocardio data, and calculating a corresponding RR interval after determining the position of the R wave. Meanwhile, the voltage value of the electrocardiosignal with the absolute value larger than 1000 is limited to 1000, so that the bad influence caused by individual large numerical value is prevented;
(2) the electrocardio data are sliced according to the length of 30 seconds, the sampling rate is 250, so each piece of data is a one-dimensional vector with the length of 7500 and is marked as Xori(ii) a And simultaneously recording the RR interval array corresponding to the data in 30 seconds as XRRWherein X isRRThe length of (1) is 100, if the number of RR intervals corresponding to the data in 30 seconds is less than 100, zero padding is carried out, and if the number of RR intervals corresponding to the data in 30 seconds exceeds 100, only the first 100 RR intervals are taken.
3) Data set partitioning:
(1) labeling the data, labeling atrial fibrillation data as atrial fibrillation, and labeling other data as non-atrial fibrillation data;
(2) dividing a data set into a training set and a test set sample, wherein the proportion is set to be 7: 3;
4) building a neural network model:
this patent includes two neural network models, where Model1The device comprises two input channels which are sequentially connected in parallel, wherein the first input channel consists of four convolutional layer units which are connected in series and a self-attention layer unit, and the output end of each convolutional layer unit is sequentially connected with an excitation unit operation and a pooling unit operation in series; the number of convolution kernels of the first convolution layer unit is 16, the size of the convolution kernels is 16, and the convolution step size is 2; the number of convolution kernels of the second convolution layer unit is 32, the size of the convolution kernels is 8, and the convolution step length is 1; the number of convolution kernels of the third convolution layer unit is 64, the size of the convolution kernels is 4, and the convolution step size is 1; the number of convolution kernels of the fourth convolution layer unit is 128, the convolution kernel size is 2, and the convolution step size is 1. The excitation unit behind each convolution layer unit is a relu function, the size of the pooling kernel of the pooling layer unit is 2, and the pooling step length is 1. The self-attention layer unit is internally provided with 3 conversion matrixes Wq、WkAnd WvThey all have dimensions 456 x 456. The second input channel consists of four convolutional layer units connected in series, the number of convolution kernels of the first two convolutional layer units is 64, the size of the convolution kernels is 5, and the convolution step size is 1. The number of convolution kernels of the last two convolution layer units is 128, the convolution kernel size is 5, and the convolution step size is 1. An Averagepool layer is arranged at the output end of each input channel, the characteristic graphs of the Averagepool layers of each input channel are combined in the depth direction and recorded as a combined layer, a full-connection layer is connected in series after the combined layer, the number of neurons of the full-connection layer is 64, and finally a Model is obtained through a softmax layer1And outputting the result.
Wherein the Model is2Only one input channel is connected with three residual convolutional layer units in series, each residual convolutional layer unit has 2 convolutional layers in total, and an excitation unit of each convolutional layer is a relu function. The number of convolution kernels of the first residual convolution layer unit is 32, the size of the convolution kernels is 3, the number of convolution kernels of the second residual convolution layer unit is 64, the size of the convolution kernels is 3, the number of convolution kernels of the third residual convolution layer unit is 128, and the size of the convolution kernels is 3. Then serially connecting an Averagepool layer, then serially connecting a full connection layer, wherein the number of neurons of the full connection layer is 64, and finally obtaining a Model through a softmax layer2And outputting the result.
5) Training a neural network model:
firstly, after training parameters of the two deep neural network models are initialized, all 30-second electrocardiosignal data sets U are divided into data sets U1 and U2, and the proportion of the data sets U is set to be 7: 3. Taking the samples of the data set U1 as a training set and taking the samples of the data set U2 as a testing set; x of the training setoriAnd XRRInput to the initialized Model1In (1), mixing XRRInput to the initialized Model2In the method, the cost function in the deep neural network is cross entropy, iterative training is carried out by using an Adam optimizer and taking the minimized cost function as a target until the model converges, parameters of the two deep neural networks are generated, and the model is stored as a PB file. Wherein the training parameters are updated once per iteration; stopping training until the loss value and the accuracy of the deep neural network are stabilized near a certain value, and storing the training parameters and the model structure information of the current network; the deep neural network was trained for 4000 batches of 200 samples each.
6) Automatically identifying the test set samples:
test set X to be dividedoriAnd XRRInputting to the saved neural network Model1In the method, the 2-dimensional predicted value vector output y corresponding to the test set sample can be obtained by operating the deep neural network1Wherein y is1The first dimension represents the probability value of predicting atrial fibrillation and the second dimension represents the probability value of predicting non-atrial fibrillation. Test set X to be dividedRRInputting to the saved neural network Model2In the method, the 2-dimensional predicted value vector output y corresponding to the test set sample can be obtained by operating the deep neural network2Wherein y is2The first dimension represents the probability value of predicting atrial fibrillation and the second dimension represents the probability value of predicting non-atrial fibrillation.
7) Model fusion and evaluation:
will y1Plus y2The result of (A) is denoted as ytIf y istHas a value greater than a second dimensionAnd if the degree is the value, the final fusion result is atrial fibrillation, otherwise, the final fusion result is non-atrial fibrillation. And comparing the final fusion result with the label of the test set sample to evaluate the precision and the recall rate of the model. The calculation formula of the precision and the recall rate is as follows:
Figure BDA0003468772380000071
Figure BDA0003468772380000072
TP (true Positive): the prediction is positive and the actual value is also positive; FP (false Positive): predicted positive, but actual negative; tn (true negative): the prediction is negative and the actual value is also negative; fn (false negative): the prediction is negative, but the actual value is positive.
8) And (3) testing results of the model:
according to the scheme of dividing the data set, 13134 parts of data are tested in the test set, wherein 6567 parts of atrial fibrillation data are tested, and the test results are shown in table 1 and can be obtained according to calculation formulas of precision and recall rate: the accuracy of the model was 0.9944, and the model recall was 0.96.
TABLE 1 test results
Figure BDA0003468772380000081

Claims (4)

1. The utility model provides an atrial fibrillation recognition method based on fuse a plurality of degree of deep learning models, whether accurate quick analysis electrocardiosignal appears the atrial fibrillation symptom, its characterized in that: the method comprises the following steps:
1) data acquisition and preprocessing:
(1) inputting electrocardiogram data, carrying out filtering processing on the electrocardiogram data, then carrying out R-wave positioning detection on the filtered electrocardiogram data, identifying the R-wave position in the electrocardiogram data, calculating all RR intervals, and simultaneously limiting the absolute value of the voltage value of the electrocardiogram signal within a certain range, thereby preventing bad influence caused by individual large numerical value;
(2) slicing the electrocardio data according to the length of 30 seconds, wherein each piece of data is a one-dimensional vector with the length of L and is marked as Xori(ii) a And simultaneously recording the RR interval array corresponding to the data in 30 seconds as XRRWherein X isRRThe length of the interval is 100, if the number of the RR intervals corresponding to the data in the 30 seconds is less than 100, zero padding is carried out, and if the number of the RR intervals corresponding to the data in the 30 seconds exceeds 100, only the first 100 RR intervals are taken;
2) building a neural network model:
the patent comprises two neural network models, wherein the models1The method comprises the steps that two input channels are sequentially connected in parallel, the first input channel is composed of four convolutional layer units connected in series and a self-attention layer unit, the second input channel is composed of four convolutional layer units connected in series, an Averagepool layer is arranged at the output end of each input channel, feature graphs of the Averagepool layers of each input channel are combined in the depth direction and are recorded as a combined layer, a full-connection layer is connected in series after the combined layer, and finally a Model is obtained through a softmax layer1Output the result of (1), wherein the Model2Only one input channel is connected with three residual convolution layer units and one Averagepool layer in series, then connected with a full connection layer in series, and finally a Model is obtained through the softmax layer2The convolution layer unit uses one-dimensional convolution;
3) training a neural network model:
after the two neural network model parameters are initialized, dividing all 30-second electrocardiosignal data sets U into data sets U1 and U2, taking samples of the data sets U1 as training sets, and taking samples of the data sets U2 as test sets; x of training setoriAnd XRRInput to the initialized Model1In (1), mixing XRRInput to the initialized Model2In the method, an Adam optimizer is used for training by taking a minimum cost function as a target until a model converges, parameters of the two neural networks are generated, and the model is saved as a PB file;
4) automatically identifying the test set samples:
test set X to be dividedoriAnd XRRInputting to the saved neural network Model1In the method, the 2-dimensional predicted value vector output y corresponding to the test set sample can be obtained by operating the deep neural network1Wherein y is1The first dimension represents the probability value of predicting atrial fibrillation, the second dimension represents the probability value of predicting non-atrial fibrillation, and the divided test set XRRInputting to the saved neural network Model2In the method, the 2-dimensional predicted value vector output y corresponding to the test set sample can be obtained by operating the deep neural network2Wherein y is2The first dimension represents the probability value of predicting atrial fibrillation, and the second dimension represents the probability value of predicting non-atrial fibrillation;
5) model fusion and evaluation:
will y1Plus y2The result of (A) is denoted as ytIf y istIf the value of the first dimension is larger than that of the second dimension, the final fusion result is atrial fibrillation, otherwise, the final fusion result is non-atrial fibrillation, and the final fusion result is compared with the label of the test set sample to evaluate the accuracy and the recall rate of the model.
2. The atrial fibrillation recognition method based on fusion of multiple deep learning models according to claim 1, wherein: the number of convolution kernels of a first convolution layer unit in the four convolution layer units connected in series is 16, the size of the convolution kernels is 16, and the convolution step length is 2; the number of convolution kernels of the second convolution layer unit is 32, the size of the convolution kernels is 8, and the convolution step length is 1; the number of convolution kernels of the third convolution layer unit is 64, the size of the convolution kernels is 4, and the convolution step size is 1; the number of convolution kernels of the fourth convolutional layer unit is 128, the size of the convolution kernels is 2, and the convolution step is 1, wherein the excitation unit behind each convolutional layer unit is a relu function, the size of the pooling kernel of the pooling layer unit is 2, and the pooling step is 1.
3. The atrial fibrillation recognition method based on fusion of multiple deep learning models according to claim 1, wherein: the self-attention layer unit is internally provided with3 transformation matrices Wq、WkAnd WvThe dimensions of the two input channels are 456 x 456, the second input channel is composed of four convolutional layer units which are connected in series, the number of convolution kernels of the first two convolutional layer units is 64, the size of the convolution kernels is 5, the convolution step is 1, the number of convolution kernels of the last two convolutional layer units is 128, the size of the convolution kernels is 5, the convolution step is 1, an Averagepool layer is arranged at the output end of each input channel, feature graphs of the Averagepool layers of each input channel are combined in the depth direction and are recorded as a combined layer, a full connection layer is connected in series after the combined layer, the number of neurons of the full connection layer is 64, and finally, a Model is obtained through a softmax layer1And outputting the result.
4. The atrial fibrillation recognition method based on fusion of multiple deep learning models according to claim 1, wherein: the Model2Only one input channel is connected with three residual convolutional layer units in series, each residual convolutional layer unit has 2 convolutional layers in total, an excitation unit of each convolutional layer is a relu function, the number of convolution kernels of the first residual convolutional layer unit is 32, the size of each convolution kernel is 3, the number of convolution kernels of the second residual convolutional layer unit is 64, the size of each convolution kernel is 3, the number of convolution kernels of the third residual convolutional layer unit is 128, the size of each convolution kernel is 3, then an Averagepool layer is connected in series, then a full connection layer is connected in series, the number of neurons of the full connection layer is 64, and finally a Model is obtained through a softmax layer2And outputting the result.
CN202210036801.8A 2022-01-13 2022-01-13 Atrial fibrillation recognition method based on fusion of multiple deep learning models Active CN114224351B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210036801.8A CN114224351B (en) 2022-01-13 2022-01-13 Atrial fibrillation recognition method based on fusion of multiple deep learning models

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210036801.8A CN114224351B (en) 2022-01-13 2022-01-13 Atrial fibrillation recognition method based on fusion of multiple deep learning models

Publications (2)

Publication Number Publication Date
CN114224351A true CN114224351A (en) 2022-03-25
CN114224351B CN114224351B (en) 2024-06-14

Family

ID=80746517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210036801.8A Active CN114224351B (en) 2022-01-13 2022-01-13 Atrial fibrillation recognition method based on fusion of multiple deep learning models

Country Status (1)

Country Link
CN (1) CN114224351B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117257324A (en) * 2023-11-22 2023-12-22 齐鲁工业大学(山东省科学院) Atrial fibrillation detection method based on convolutional neural network and ECG (electro-magnetic resonance) signals

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106264518A (en) * 2016-08-04 2017-01-04 东莞市第三人民医院 A kind of based on finger tip Electrocardiographic atrial fibrillation detection method and device
CN107391900A (en) * 2017-05-05 2017-11-24 陈昕 Atrial fibrillation detection method, disaggregated model training method and terminal device
US20190374166A1 (en) * 2018-06-08 2019-12-12 Cambridge Heartwear Limited Detecting abnormalities in ecg signals
CN111956212A (en) * 2020-07-29 2020-11-20 鲁东大学 Inter-group atrial fibrillation identification method based on frequency domain filtering-multi-mode deep neural network
CN113812962A (en) * 2021-08-13 2021-12-21 深圳市瑞康宏业科技开发有限公司 Method and system for constructing electrocardio-rhythm classification neural network and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106264518A (en) * 2016-08-04 2017-01-04 东莞市第三人民医院 A kind of based on finger tip Electrocardiographic atrial fibrillation detection method and device
CN107391900A (en) * 2017-05-05 2017-11-24 陈昕 Atrial fibrillation detection method, disaggregated model training method and terminal device
US20190374166A1 (en) * 2018-06-08 2019-12-12 Cambridge Heartwear Limited Detecting abnormalities in ecg signals
CN111956212A (en) * 2020-07-29 2020-11-20 鲁东大学 Inter-group atrial fibrillation identification method based on frequency domain filtering-multi-mode deep neural network
CN113812962A (en) * 2021-08-13 2021-12-21 深圳市瑞康宏业科技开发有限公司 Method and system for constructing electrocardio-rhythm classification neural network and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117257324A (en) * 2023-11-22 2023-12-22 齐鲁工业大学(山东省科学院) Atrial fibrillation detection method based on convolutional neural network and ECG (electro-magnetic resonance) signals
CN117257324B (en) * 2023-11-22 2024-01-30 齐鲁工业大学(山东省科学院) Atrial fibrillation detection method based on convolutional neural network and ECG (electro-magnetic resonance) signals

Also Published As

Publication number Publication date
CN114224351B (en) 2024-06-14

Similar Documents

Publication Publication Date Title
CN109171712B (en) Atrial fibrillation identification method, atrial fibrillation identification device, atrial fibrillation identification equipment and computer readable storage medium
EP3801238B1 (en) Detecting abnormalities in ecg signals
US7769434B2 (en) Method of physiological data analysis and measurement quality check using principal component analysis
CN107837082A (en) Electrocardiogram automatic analysis method and device based on artificial intelligence self study
CN113397555A (en) Arrhythmia classification algorithm of C-LSTM for physiological parameter monitoring
CN109394205B (en) Electrocardiosignal analysis method based on deep neural network
de Chazal et al. Automatic classification of ECG beats using waveform shape and heart beat interval features
Yao et al. Time-incremental convolutional neural network for arrhythmia detection in varied-length electrocardiogram
CN105726018A (en) Automatic atrial fibrillation detection method irrelevant to RR interphase
CN113440149B (en) ECG signal classification method based on twelve-lead electrocardiograph data two-dimensional multi-input residual neural network
Emanet ECG beat classification by using discrete wavelet transform and Random Forest algorithm
CN111626114A (en) Electrocardiosignal arrhythmia classification system based on convolutional neural network
CN110638430A (en) Multi-task cascade neural network ECG signal arrhythmia disease classification model and method
Rohmantri et al. Arrhythmia classification using 2D convolutional neural network
CN111528832B (en) Arrhythmia classification method and validity verification method thereof
CN112932498A (en) T wave morphology classification system with strong generalization capability based on deep learning
CN109887594A (en) A kind of multi-lead arrhythmia cordis intelligent diagnosing method based on MODWT and TDCNN
CN106063704B (en) A kind of QRS wave starting and terminal point localization method based on regularization least square recurrence learning
CN113901893A (en) Electrocardiosignal identification and classification method based on multiple cascade deep neural network
CN110236529A (en) A kind of multi-lead arrhythmia cordis intelligent diagnosing method based on MODWT and LSTM
CN114224351A (en) Atrial fibrillation identification method based on fusion of multiple deep learning models
Besrour et al. ECG beat classifier using support vector machine
CN110141245A (en) A kind of Characteristics of electrocardiogram vector extracting method
CN117582235A (en) Electrocardiosignal classification method based on CNN-LSTM model
CN112842355A (en) Electrocardiosignal heart beat detection and identification method based on deep learning target detection

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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Building D, 14th Floor, Block C, Tian Tang Software Park, No. 3 Xidoumen Road, Gudang Street, Xihu District, Hangzhou City, Zhejiang Province 310012

Patentee after: ZHEJIANG HELOWIN MEDICAL TECHNOLOGY CO.,LTD.

Country or region after: China

Address before: 310012 block B, 5 / F, building e, Paradise Software Park, No.3 xidoumen Road, Xihu District, Hangzhou City, Zhejiang Province

Patentee before: ZHEJIANG HELOWIN MEDICAL TECHNOLOGY CO.,LTD.

Country or region before: China

CP03 Change of name, title or address