An electrocardiogram atrial fibrillation detection method and system based on time sequence and waterfall chart fusion

CN122229464APending Publication Date: 2026-06-19ETCOMM BEIJING0 SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ETCOMM BEIJING0 SCI & TECH CO LTD
Filing Date
2026-03-23
Publication Date
2026-06-19

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses a method and system for detecting atrial fibrillation (AF) on electrocardiograms based on the fusion of time-series and waterfall plot models, belonging to the fields of biomedical signal processing and deep learning technology. This method simultaneously constructs two complementary data representations of the same electrocardiogram signal: a fixed-duration one-dimensional time-series segment and a two-dimensional heartbeat stacked grayscale waterfall plot aligned with the R-wave. These are respectively input into independently trained one-dimensional and two-dimensional convolutional residual networks for classification. Finally, the outputs of the two models are aligned at the heartbeat time granularity, and the final AF detection result is obtained through a configurable fusion strategy (intersection, union, or weighted voting). The time-series model excels at capturing abnormal heart rate rhythms, while the waterfall plot model excels at identifying abnormal waveform morphology; the two are significantly complementary in boundary cases. In 2,433,594 heartbeat tests with balanced distribution of AF and NAF samples (AF accounting for 43.7%), the false alarm rate decreased from 4.30% to 1.30% and the missed alarm rate decreased from 1.07% to 0.59% after adopting the intersection fusion strategy. The prediction conflict rate between the two models was only 2.43%, which proves that the two-dimensional fusion has a significant complementary gain effect under neutral distribution conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of biomedical signal processing and deep learning technology, and in particular to an automatic detection method and system for atrial fibrillation on electrocardiogram based on the fusion of one-dimensional time-series signal analysis and two-dimensional cardiac rhythm stacked waterfall plot image analysis. Background Technology

[0002] Atrial fibrillation (AF) is one of the most common sustained arrhythmias, characterized by disordered atrial activity (disappearance of P waves replaced by irregular f waves) and absolute irregularity of ventricular rate (unequal RR intervals). Paroxysmal AF, in particular, is difficult to detect automatically due to its intermittent nature. Currently, deep learning-based automated ECG analysis methods have made significant progress in AF detection, but existing methods still have the following shortcomings: (1) Limitations of simple time series models. Existing one-dimensional time series classification models (such as methods based on 1D-CNN and LSTM) analyze ECG signals as one-dimensional sequences, which are good at capturing the irregularity of heart rate rhythm (RR interval variation), but are not sensitive enough to subtle changes in waveform morphology (such as f wave replacing P wave). Reference [1] (CN110840402B) discloses a machine learning-based atrial fibrillation signal identification method and system, which converts ECG signals into two-dimensional time-frequency images by improving frequency slice wavelet transform, classifies them with CNN, and then fuses them with RR interval features through SVM, but its essence is still the fusion of intermediate layer features within a single model framework, and the two analysis dimensions cannot be optimized independently.

[0003] (2) Limitations of simple image models. Converting ECG signals into two-dimensional images (such as spectrograms, cyclic graphs, Gramian angular field maps, etc.) and then classifying them using 2D-CNN methods is good at identifying waveform morphological abnormalities, but it is not good at grasping the rhythmic patterns of heart rate in the time dimension. Recent research (Diagnostics, 2025, 15(7), 865; DOI:10.3390 / diagnostics15070865) stacked consecutive heartbeats according to the QRS position into two-dimensional grayscale stacked images (ECHOView), and used ImageNet pre-trained networks for transfer learning for atrial fibrillation classification. Although it verified the feasibility of using heartbeat stacked images as input for deep learning, it only used a single image classification model and did not integrate it with the time series analysis model, so it could not simultaneously take into account the detection capabilities of both rhythm and morphology.

[0004] (3) Limitations of existing fusion schemes. Reference [2] (CN117281528A) discloses a deep learning-based intelligent recognition method for multi-lead signals, which uses a dual-branch architecture to process the original signal and wavelet time-frequency representation respectively. However, the two branches are fused by feature splicing within the same network, which is not a truly independent model. Reference [3] (Ashhad M et al., published at the 2024 IEEE International Joint Conference on Neural Networks (IJCNN)) proposes an uncertainty-aware multi-view arrhythmia classification method, which learns both the one-dimensional time-series view and the two-dimensional image view of ECG. However, the two views share the training process, and the fusion occurs at the feature level rather than the decision level. All of the above schemes are feature-level fusions within a single network, which are inflexible and difficult to optimize their respective model parameters independently for different dimensions of data characteristics.

[0005] Therefore, how to fully utilize the complementary information of ECG signals in the temporal rhythm dimension and waveform morphology dimension, and perform post-processing decision fusion at the heartbeat granularity through independently optimized dual models, in order to simultaneously achieve low false alarm rate and low false alarm rate, is a technical problem that urgently needs to be solved in this field. Summary of the Invention I. Technical Problems to be Solved

[0006] The technical problem to be solved by this invention is to address the limitations of single-dimensional analysis in existing electrocardiogram atrial fibrillation detection schemes and the lack of flexibility in existing fusion schemes. This invention provides an electrocardiogram atrial fibrillation detection method and system based on dual-dimensional fusion of time-series analysis and waterfall plot image analysis. This allows time-series rhythm features and waveform morphology features to be extracted separately in independently optimized models and then fused at the heartbeat level for later decision-making, thereby significantly reducing the false alarm rate while effectively controlling the false alarm rate. II. Technical Solution

[0007] To address the aforementioned technical problems, this invention provides a method for detecting atrial fibrillation based on the fusion of time-series and waterfall plots on electrocardiograms, comprising the following steps: Step S1, Signal preprocessing: Acquire the electrocardiogram (ECG) signal, perform bandpass filtering and resampling on the ECG signal to obtain the preprocessed ECG signal; Step S2, R-wave identification: R-wave position detection is performed on the preprocessed electrocardiogram signal to obtain the heartbeat position sequence; Step S3, First dimension processing: The preprocessed electrocardiogram signal is divided into several time segments according to a fixed duration window. Each time segment is input into a pre-trained first deep learning model, which is a one-dimensional convolutional residual network, to obtain the atrial fibrillation probability value of each time segment. Step S4, Second Dimension Processing: Using the R wave positions obtained in Step S2 as anchor points, the waveform data of each heartbeat is extracted according to a preset time window. Gray-level normalization is performed using the PR segment voltage range of each heartbeat as a reference benchmark. The N consecutive normalized heartbeat waveforms are stacked in chronological order to form a two-dimensional gray-level waterfall image. The waterfall image is input into a pre-trained second deep learning model, which is a two-dimensional convolutional residual network, to obtain the atrial fibrillation probability value of each heartbeat. Step S5, cardiac-level fusion: Align the outputs of the first deep learning model and the second deep learning model in the cardiac time dimension, and fuse the two sets of probability values ​​after alignment using a preset fusion strategy to output the final atrial fibrillation detection result. III. Beneficial Effects

[0008] The present invention has the following advantages over the prior art: (1) Dual-dimensional complementarity: The time series model is good at capturing heart rate rhythm abnormalities such as irregular RR intervals, while the waterfall plot model is good at identifying waveform morphological abnormalities such as f wave substitution for P wave. The two models are significantly complementary in different types of boundary cases. In 2,433,594 heartbeat tests with balanced distribution of AF and NAF samples (AF accounted for 43.7%), the prediction conflict rate between the two models was only 2.43%, proving that the two models are highly consistent and form effective complementarity in boundary cases.

[0009] (2) Significantly reduced false alarm rate: On the above balanced test set, the false alarm rate of the time series single model was 1.07%, and the false alarm rate of the waterfall plot single model was 1.56%. After adopting the intersection fusion strategy, the false alarm rate dropped to 0.59%, which is about 45% lower than that of the time series single model. This effect was also verified on the single lead heartbeat balanced validation set (1,452,645 heartbeats, AF accounted for 41.7%), where the false alarm rate of the intersection strategy was only 0.72%.

[0010] (3) Effective control of false alarm rate: On the 12-lead balanced test set, the false alarm rate of the time series single model was 4.30%, and the false alarm rate of the waterfall plot single model was 1.80%. After adopting the intersection fusion strategy, the false alarm rate was reduced to 1.30%, which is about 70% lower than that of the time series single model. The effect was even more significant on the single-lead heart-pattern balanced validation set. The intersection strategy reduced the false alarm rate from 2.94% (time series) / 1.94% (waterfall plot) to 0.15%, which is about 1 / 20 of that of the time series single model.

[0011] (4) Independent model architecture: The two models are trained and inferred completely independently, and the parameters can be optimized according to the characteristics of their respective data dimensions, avoiding the optimization difficulties and limited flexibility caused by the fusion of multiple branches in a single network.

[0012] (5) Heartbeat-level dense prediction: The output layer of the second deep learning model contains N independent sigmoid nodes, which independently output the atrial fibrillation probability for each heartbeat in the waterfall plot, achieving dense prediction at heartbeat-level time resolution, and naturally supporting precise alignment with the first model in the heartbeat dimension. Attached Figure Description Figure 1 This is a diagram illustrating the overall architecture of the dual-dimensional fusion atrial fibrillation detection system according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating the overall process of electrocardiogram signal preprocessing and detection according to an embodiment of the present invention. Figure 3 This is a flowchart illustrating the generation process of the waterfall image in an embodiment of the present invention; Figure 4 This is a schematic diagram of the network structure of the first model (one-dimensional convolutional residual network) in an embodiment of the present invention; Figure 5 This is a schematic diagram of the network structure of the second model (two-dimensional convolutional residual network) in an embodiment of the present invention; Figure 6 This is a schematic diagram of the cardiac-level time alignment and fusion strategy in an embodiment of the present invention.

Claims

1. A method and system for detecting atrial fibrillation based on time-series and waterfall plot fusion of electrocardiograms, characterized in that, The method includes: Step S1, Signal preprocessing: Acquire the electrocardiogram (ECG) signal, perform bandpass filtering and resampling on the ECG signal to obtain the preprocessed ECG signal; Step S2, R-wave identification: R-wave position detection is performed on the preprocessed electrocardiogram signal to obtain the heartbeat position sequence; Step S3, First dimension processing: The preprocessed electrocardiogram signal is divided into several time segments according to a fixed duration window. Each time segment is input into a pre-trained first deep learning model, which is a one-dimensional convolutional residual network, to obtain the atrial fibrillation probability value of each time segment. Step S4, Second Dimension Processing: Using each R wave position as an anchor point, capture the waveform data of each heartbeat according to a preset time window, and perform grayscale normalization using the PR segment voltage range of each heartbeat as a reference benchmark. Stack N consecutive normalized heartbeat waveforms in chronological order to form a two-dimensional grayscale waterfall image. Input the waterfall image into a pre-trained second deep learning model, which is a two-dimensional convolutional residual network, to obtain the atrial fibrillation probability value of each heartbeat. Step S5, heartbeat-level fusion: Map the temporal segment-level probability values ​​of the first deep learning model to each heartbeat timestamp, align them with the heartbeat-level probability values ​​of the second deep learning model in the time dimension, so that each heartbeat has probability values ​​from both models simultaneously; perform fusion judgment on the two sets of aligned probability values ​​based on a preset threshold, and output the final heartbeat-by-heart atrial fibrillation detection result.

2. The method as described in claim 1, characterized in that, In step S4, the PR segment is defined as the signal segment between 250 ms and 125 ms before the R wave position; the formula for grayscale normalization is: normalized = ((segment - seg_min) / (seg_max - seg_min)) × 255, where seg_min and seg_max are the minimum and maximum values ​​of the PR segment voltage, respectively.

3. The method as described in claim 1, characterized in that, In step S3, the fixed duration window is 5 seconds, corresponding to 625 sampling points at a sampling rate of 125Hz; the input shape of the timing segment is (625, C), where C is the number of channels.

4. The method as described in claim 1, characterized in that, In step S4, the preset time window is 500 milliseconds before and after the R wave; N is 100 consecutive heartbeats; the waterfall image also includes P1 heartbeats in front as preceding context filling and P2 overlapping heartbeats from adjacent waterfall images behind, where P1 is 20 and P2 is 4, so that the actual number of input rows is P1+N+P2=124.

5. The method as described in claim 1, characterized in that, In step S5, the preset fusion strategy includes at least one of the following strategies: Intersection strategy: The heartbeat is determined to be atrial fibrillation if and only if the probability values ​​of both the first model and the second model exceed a preset threshold; Union strategy: When the probability value of either the first model or the second model exceeds a preset threshold, the heartbeat is determined to be atrial fibrillation; Weighted voting strategy: Calculate the weighted sum of the probability values ​​of the two models, w1×f1 + w2×f2. When the weighted sum exceeds a preset threshold θ, the heartbeat is determined to be atrial fibrillation.

6. The method as described in claim 1, characterized in that, When the electrocardiogram signal is a multi-lead signal, the method further includes a channel mapping step: expanding the multi-lead signal into a fixed number of channels according to a preset mapping relationship, and filling the remaining channels with zero values; the channel mapping is applicable to both the first dimension processing and the second dimension processing.

7. The method as described in claim 1, characterized in that, The first deep learning model contains four residual blocks with filters of 128, 196, 256, and 320 respectively, and a convolutional kernel size of 4. Each residual block employs a pre-activation mode, including a one-dimensional convolutional layer (Conv1D), a batch normalization layer, a rectified linear unit (ReLU), a dropout layer (Dropout with a dropout rate of 0.5), another one-dimensional convolutional layer (Conv1D), and skip connections implemented through a max pooling layer (MaxPool1D) and a 1×1 one-dimensional convolutional layer (Conv1D). The output layer is a fully connected layer (Dense) with two output nodes and a sigmoid activation function.

8. The method as described in claim 1, characterized in that, The second deep learning model contains four residual blocks with filter numbers of 128, 196, 256, and 320 respectively, and a convolutional kernel size of (3,3). The dropout rate of the random dropout layer within each residual block is 0.

2. The output layer is a fully connected (Dense) layer with N output nodes and a sigmoid activation function, where N is the number of heartbeats in the waterfall plot, enabling independent dense prediction of atrial fibrillation probability for each heartbeat.

9. The method as described in claim 1, characterized in that, In step S1, the bandpass filter is a bandpass filter from 0.3Hz to 40Hz with a filter order of 200; the resampling adopts an adaptive strategy: when the original sampling rate is greater than 133Hz, the polyphase filter interpolation method is used to resample to 125Hz; when the original sampling rate is not greater than 133Hz, the original sampling rate is kept unchanged.

10. An electrocardiogram atrial fibrillation detection system based on the fusion of time series and waterfall plots, characterized in that, The system includes: The signal preprocessing module is used to acquire electrocardiogram signals and perform bandpass filtering and resampling. The R-wave recognition module is used to detect the R-wave position of the preprocessed electrocardiogram signal and obtain the heartbeat position sequence. The first-dimensional processing module is used to divide the preprocessed electrocardiogram signal into time segments according to a fixed duration window, input them into a pre-trained one-dimensional convolutional residual network, and obtain the atrial fibrillation probability value of the time segment. The second dimension processing module is used to extract heartbeat waveform data with the R wave position as the anchor point, perform PR segment reference gray-level normalization, and stack it into a two-dimensional gray-level waterfall image. The image is then input into a pre-trained two-dimensional convolutional residual network to obtain the atrial fibrillation probability value for each heartbeat. The cardiac-level fusion module is used to align the outputs of the first-dimensional processing module and the second-dimensional processing module on the cardiac time dimension, and output the final atrial fibrillation detection result through a preset fusion strategy.

11. The system as claimed in claim 10, characterized in that, The output layer of the two-dimensional convolutional residual network in the second dimension processing module contains N independent sigmoid nodes, which correspond to the atrial fibrillation probability prediction of each of the N heartbeats in the waterfall plot.

12. The system as claimed in claim 10, characterized in that, In the first dimension processing module, the fixed duration window is 5 seconds, corresponding to 625 sampling points at a sampling rate of 125Hz; the input shape of the time segment is (625, C), where C is the number of channels.

13. The system as described in claim 10, characterized in that, In the second dimension processing module, the waterfall image is composed of 100 consecutive heartbeats stacked together, with 20 heartbeats added in front as preceding context fill, and 4 overlapping heartbeats from adjacent waterfall images retained behind, resulting in an actual input row count of 124; the grayscale normalization is based on the voltage range of the PR segment of each heartbeat.

14. The system as claimed in claim 10, characterized in that, The cardiac-level fusion module supports at least one of the following fusion strategies: Intersection strategy: The heartbeat is determined to be atrial fibrillation if and only if the probability values ​​of both the first dimension processing module and the second dimension processing module exceed the preset threshold; Union strategy: When the probability value of any module exceeds a preset threshold, the heartbeat is determined to be atrial fibrillation; Weighted voting strategy: Calculate the weighted sum of the probability values ​​of the two modules, and determine the heartbeat as atrial fibrillation when the weighted sum exceeds a threshold.

15. The system as described in claim 10, characterized in that, In the signal preprocessing module, the bandpass filter is a bandpass filter from 0.3Hz to 40Hz with a filter order of 200; the resampling adopts an adaptive strategy: when the original sampling rate is greater than 133Hz, the polyphase filter interpolation method is used to resample to 125Hz; when the original sampling rate is not greater than 133Hz, the original sampling rate is kept unchanged.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the electrocardiogram atrial fibrillation detection method based on the fusion of time series and waterfall plot as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • A Machine Learning-Based Method and System for Atrial Fibrillation Signal Identification

    CN110840402B

  • Multi-lead pulse signal intelligent identification method and system based on deep learning

    CN117281528A