Arrhythmia classification method based on fusion of multiple attention mechanisms and VGG network

By fusing Empirical Mode Decomposition (EMD) and a multi-attention mechanism with a VGG network, the problems of insufficient multi-scale time-frequency feature mining and single attention mechanism in ECG analysis are solved, enabling efficient identification and real-time processing of arrhythmia patterns.

CN121901848APending Publication Date: 2026-04-21GUANGDONG POLYTECHNIC NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610032563.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-12
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing ECG analysis methods are insufficient in mining multi-scale time-frequency features of signals during the preprocessing stage, failing to fully extract time-frequency and waveform phase information of ECG signals. In the feature modeling stage, it is difficult to capture long-term time dependencies. In the model design stage, they rely on a single attention mechanism, which cannot synergistically enhance multi-dimensional features such as time, space and frequency domains. Moreover, the computational complexity is high, making it difficult to meet the requirements of real-time processing.

Method used

Empirical Mode Decomposition (EMD) is used to extract multiple intrinsic mode components of electrocardiogram (ECG) signals, constructing a two-dimensional feature representation. Coordinate attention, convolutional block attention, and efficient multi-scale attention modules are then connected in parallel in the VGG16 network. The contribution of the three attention modules is dynamically allocated through learnable weights to achieve synergistic enhancement of multi-dimensional features.

Benefits of technology

It improves the ability to identify arrhythmia patterns, overcomes the limitations of the single attention mechanism in enhancing dimensions, enhances the model's generalization ability and training stability, and can better cope with clinical noise and individual differences, meeting the needs of real-time processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901848A_ABST
    Figure CN121901848A_ABST
Patent Text Reader

Abstract

The invention provides an arrhythmia classification method based on a multi-attention mechanism fusion VGG network, and the method comprises the following steps: S1, signal preprocessing: obtaining an electrocardiosignal to be classified, and carrying out the decomposition through employing an empirical mode decomposition technology, and obtaining at least two intrinsic mode components; constructing two-dimensional feature representation based on the at least two intrinsic mode components; s2, model classification: inputting the two-dimensional feature representation into a pre-trained arrhythmia classification model, wherein the arrhythmia classification model comprises a VGG feature extraction backbone network, an optimized parallel attention module arranged in at least one middle layer of the VGG feature extraction backbone network, and a fusion unit for fusing the output of the optimized parallel attention module; and S3, classification output: based on the output of the arrhythmia classification model, obtaining the classification result of the electrocardiosignals. According to the method, the technical problems that multiple intrinsic mode features of the electrocardiosignal are not fully mined, long-range dependence is difficult to capture, the attention mechanism dimension is single, and the calculation complexity is too high are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of cardiac arrhythmia classification, and more particularly to a cardiac arrhythmia classification method based on a multi-attention mechanism fusion VGG network. Background Technology

[0002] Cardiovascular disease (CVD) has become a major public health problem threatening human health. Cardiac arrhythmia, as a common subtype, is characterized by its insidious onset and complex diagnosis. Electrocardiography (ECG), with its non-invasiveness, ease of operation, and good reproducibility, has been established as the standard tool for the diagnosis of cardiac arrhythmia.

[0003] Currently, traditional ECG analysis relies heavily on the subjective experience and clinical accumulation of cardiovascular physicians, resulting in low diagnostic efficiency and high subjectivity. With the development of deep learning technology, neural network-based automatic ECG classification methods have become an important research direction. However, existing methods still have significant limitations: in the preprocessing stage, there is insufficient mining of multi-scale time-frequency features of the signal, failing to fully extract the time-frequency and waveform phase information of the ECG signal; in the feature modeling stage, they are mostly limited to single-heartbeat analysis, making it difficult to capture long-term time dependencies; in the model design stage, they mostly rely on a single attention mechanism, failing to collaboratively enhance multi-dimensional features such as time, space, and frequency domains. In addition, some complex models (such as the visual Transformer) suffer from high computational complexity, making it difficult to meet the needs of real-time processing of long-term ECG signals.

[0004] Therefore, there is an urgent need for a cardiac arrhythmia classification method based on multi-attention mechanism fusion VGG network that can solve the above-mentioned technical problems. Summary of the Invention

[0005] The purpose of this invention is to provide a cardiac arrhythmia classification method based on multi-attention mechanism fusion VGG network, which solves at least one of the above-mentioned technical problems.

[0006] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: This invention provides a cardiac arrhythmia classification method based on a multi-attention mechanism fusion VGG network, comprising the following steps: S1. Signal preprocessing: acquiring the electrocardiogram (ECG) signal to be classified, and using empirical mode decomposition (EMD) to decompose the ECG signal to obtain multiple intrinsic mode components (IMCs); selecting high-frequency oscillation components from the IMCs to construct a two-dimensional feature representation of the ECG signal; S2. Model classification: inputting the two-dimensional feature representation into a pre-trained cardiac arrhythmia classification model, wherein the cardiac arrhythmia classification model includes a VGG feature extraction backbone network, an optimized parallel attention module set in at least one intermediate layer of the VGG feature extraction backbone network, and a fusion unit for fusing the output of the optimized parallel attention module; S3. Classification output: obtaining the classification result of the ECG signal based on the output of the cardiac arrhythmia classification model.

[0007] Furthermore, the construction steps of the two-dimensional feature representation include: selecting the first two intrinsic mode components, namely the first intrinsic mode component and the second intrinsic mode component; based on the phase space reconstruction theory, mapping the sequence values ​​of the first intrinsic mode component and the second intrinsic mode component to a two-dimensional plane to form trajectory points; and constructing the trajectory points as the trajectory map of the two-dimensional feature representation.

[0008] Furthermore, the VGG feature extraction backbone network is a VGG16 network, which contains 13 convolutional layers and 5 feature extraction stages.

[0009] Furthermore, the optimized parallel attention module is set after the 2nd, 4th, 7th, 10th, and 13th convolutional layers of the VGG16 network.

[0010] Furthermore, the optimized parallel attention module includes a coordinate attention module, a convolutional block attention module, and an efficient multi-scale attention module, which are used to process the input feature maps in parallel.

[0011] Furthermore, the coordinate attention module decomposes channel attention into two 1D feature encoding processes along the horizontal and vertical directions to generate attention weights containing coordinate information; the convolutional block attention module sequentially processes the input feature map through the channel attention submodule and the spatial attention submodule; the efficient multi-scale attention module extracts and fuses multi-scale features by grouping the input feature map along the channel dimension and reshaping it to the batch dimension, and by using parallel multi-scale convolution and cross-space interaction.

[0012] Furthermore, the optimized parallel attention module uses learnable weight parameters to perform weighted fusion on the output feature maps of the coordinate attention module, the convolutional block attention module, and the efficient multi-scale attention module, respectively; the feature map obtained by weighted fusion is used as the output feature of the optimized parallel attention module.

[0013] Furthermore, the learnable weight parameters are weighted and fused, including: normalizing the learnable weight parameters using the Softmax function to obtain normalized weights; and multiplying the outputs of the coordinate attention module, the convolutional block attention module, and the efficient multi-scale attention module with the corresponding normalized weights.

[0014] Furthermore, the training steps of the arrhythmia classification model include: selecting a target dataset based on the MIT-BIH arrhythmia database; dividing the target dataset into a training set and a test set according to a certain ratio; performing signal preprocessing steps as described in step S1 on the electrocardiogram signals of the training set to construct a two-dimensional feature image set for training; inputting the two-dimensional feature image set for training into the initial arrhythmia classification model, iteratively optimizing the model parameters through the training set, and verifying the model performance using the test set to obtain the trained arrhythmia classification model.

[0015] Furthermore, the classification results of the electrocardiogram signals include normal heartbeats, left bundle branch block heartbeats, right bundle branch block heartbeats, and paced heartbeats.

[0016] Compared with the prior art, the present invention has at least the following beneficial effects: This invention extracts intrinsic mode components at different frequency scales of electrocardiogram (ECG) signals through empirical mode decomposition and constructs them into a two-dimensional image suitable for convolutional network processing. This preprocessing method can fully explore and retain the time-frequency characteristics and waveform phase and other multi-scale information in ECG signals, overcoming the shortcomings of traditional methods in making insufficient use of multiple intrinsic mode features.

[0017] This invention innovatively integrates coordinate attention (CA), convolutional block attention (CBAM), and efficient multi-scale attention (EMA) modules in parallel within the VGG backbone network. The CA module enhances the model's accurate perception of feature spatial locations by decomposing coordinate information; the CBAM module achieves refined selection of key features through sequential attention across channels and space; and the EMA module efficiently fuses multi-scale context through grouping and cross-spatial interaction. This multi-dimensional attention parallel and collaborative architecture enhances the representation ability of multi-dimensional features such as temporal variations, spatial shapes, and frequency domain rhythms, improves the recognition ability of complex arrhythmia patterns, and overcomes the limitation of single attention mechanisms in enhancing limited dimensions.

[0018] This invention solves the problem of fixed weights in existing fusion strategies by dynamically allocating the contribution of three attention modules through learnable weights and using a convolutional dimensionality reduction fusion strategy. This ensures the optimal feature combination and avoids information conflicts between enhanced features and original features, thereby improving the model's generalization ability and training stability. It can better cope with complex application scenarios such as clinical noise and individual differences. Attached Figure Description

[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is the overall flowchart for arrhythmia classification based on multi-attention mechanism fusion VGG network provided in this embodiment; Figure 2 This is a schematic diagram of the overall architecture of the cardiac arrhythmia classification model based on multi-attention mechanism fusion VGG network provided in this embodiment. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0023] This embodiment provides a cardiac arrhythmia classification method based on a multi-attention mechanism fusion of VGG networks. Figure 1The overall flowchart of arrhythmia classification is shown, including the following steps: S1. Signal preprocessing: Acquire the electrocardiogram (ECG) signal to be classified, and use Empirical Mode Decomposition (EMD) technology to decompose the ECG signal to obtain multiple intrinsic mode components; select high-frequency oscillation components from the intrinsic mode components to construct a two-dimensional feature representation of the ECG signal; S2. Model classification: Input the two-dimensional feature representation into a pre-trained arrhythmia classification model, which includes a VGG feature extraction backbone network, an optimized parallel attention module set in at least one intermediate layer of the VGG feature extraction backbone network, and a fusion unit for fusing the output of the optimized parallel attention module; S3. Classification output: Obtain the classification result of the ECG signal based on the output of the arrhythmia classification model.

[0024] Specifically, to extract deep time-frequency features from ECG signals and construct inputs suitable for convolutional network processing, Empirical Mode Decomposition (EMD) is used as the core preprocessing technique. EMD is a data-driven signal processing method applicable to non-stationary and nonlinear signals such as ECGs. It can decompose a signal into a set of Intrinsic Mode Functions (IMFs) and a residual component through an iterative selection process without pre-setting basis functions. The calculation formula for the ECG signal decomposition process is as follows: ,in, For the first One IMF component, For residual components. Each IMF component satisfies the following two conditions: (1) the number of extreme points is equal to or differs by at most one from the number of zero-crossing points; (2) the mean of the upper and lower envelopes defined by the local maxima and local minima at any time is zero.

[0025] This scheme constructs a core framework for arrhythmia classification, consisting of "preprocessing-model inference-classification output." It systematically integrates empirical mode decomposition technology with deep convolutional neural network models (Visual Geometry Group; VGG) and multi-attention parallel enhancement mechanisms. Through modular design, it provides a stable basic framework for subsequent refinement of technical features in each stage. At the same time, the combination design of two-dimensional feature representation and multi-attention fusion improves the adaptability of features and models, laying the foundation for improving subsequent classification accuracy. It solves the limitations of existing methods, such as "insufficient utilization of multiple intrinsic modal features" and "reliance on a single attention mechanism."

[0026] In this embodiment, the specific technical means for constructing two-dimensional feature representation is clarified: First, the first two (i.e., the first and second intrinsic mode components) are selected from the intrinsic mode components obtained by empirical mode decomposition. Based on the phase space reconstruction theory, the sequence value of one component is used as the abscissa and the other as the ordinate to draw discrete trajectory points on the two-dimensional plane. Finally, the trajectory points constitute the trajectory diagram as a two-dimensional feature representation.

[0027] Specifically, the first two IMF components (IMF1 and IMF2) are selected to construct a two-dimensional feature representation. IMF1, as the highest frequency component, mainly reflects the transient characteristics of the signal; IMF2, as the second highest frequency component, carries the core oscillation mode and rhythm information of the signal. Based on phase space reconstruction theory, a trajectory diagram is drawn in a two-dimensional plane, transforming the discrete trajectory point sequence into a continuous two-dimensional feature image, thereby effectively preserving the detailed features of the electrocardiogram signal and completing the construction of a two-dimensional feature image for classification.

[0028] This scheme provides a method to transform one-dimensional time-series ECG signals into a two-dimensional spatial structure suitable for VGG networks. IMF1 and IMF2 respectively carry the transient high-frequency information and core oscillation rhythm information of the signal. The two-dimensional trajectory map constructed in this way can effectively preserve and highlight the waveform and phase details of the ECG signal, solve the problems of fuzzy feature extraction and poor adaptability to subsequent networks in existing preprocessing methods, provide high-quality feature input for the model, and improve the basic accuracy of subsequent classification.

[0029] Figure 2 The diagram shows the overall architecture of the arrhythmia classification model. The architecture is based on the VGG16 network and integrates a multi-attention module and an attention fusion strategy to extract features and classify the electrocardiogram signals to be classified.

[0030] In this embodiment, the VGG feature extraction backbone network is specifically defined as the VGG16 network, which contains 13 convolutional layers and 5 feature extraction stages. Each stage gradually improves the feature expression capability according to a preset logic.

[0031] Specifically, a basic VGG16 neural network is used as the core feature extractor. First, a preprocessed ECG two-dimensional feature image is given as input tensor. The calculation formula is:

[0032] in, B 3 represents the batch size, and 3 represents the number of RGB channels. H and WThese represent the height and width of the image, respectively. The VGG16 network maps the image to a high-level feature representation z through a series of convolutional (Conv), batch normalization (BN), rectified linear unit (ReLU) activation functions, and max pooling (MaxPool) operations.

[0033] The VGG16 network consists of L=13 convolutional layers, organized as follows: s =5 feature extraction stages. The number of input channels is denoted as... In each stage ,Include A series of consecutive convolutional layers, whose number of output channels is denoted as . The specific configuration is as follows: , , , , ,and For the first s Phase 1 c Convolutional layers The calculation formula is as follows: ,in, It is the input of this layer (when) c When =1, (for output from the previous stage or network input). This indicates a convolution operation using a 3×3 convolution kernel. These are the convolution kernel weights. It is a bias term.

[0034] The convolutional output is then processed sequentially by batch normalization (BN) and ReLU activation function, calculated as follows: At the end of each stage (except the final stage), a 2×2 max-pooling layer is applied for spatial downsampling: This operation halves the feature map spatial size and uses it as input for the next stage. After five stages of feature extraction, the final high-level feature map is obtained: Through a global average pooling ( GAP Layer aggregation into global feature vectors The calculation formula is: Finally, the feature vector is mapped to the corresponding... K =Probability distribution of 4 types of cardiac arrhythmia The calculation formula is: ,in, and These are the weight matrix and bias vector of the fully connected layer, respectively. This process maps high-level semantic features to specific disease classifications, forming the core framework of the entire classification system.

[0035] In this embodiment, the specific insertion position of the optimized parallel attention module in the VGG16 network is specified, namely after the 2nd, 4th, 7th, 10th and 13th convolutional layers.

[0036] Specifically, shallow attention modules are primarily responsible for capturing basic spatial structure, while deep attention modules focus on high-level features. Each attention module receives feature maps from the previous convolutional layer as input and then performs feature enhancement through independent processing paths.

[0037] This approach overcomes the limitations of existing models where the attention module is embedded arbitrarily and has poor coordination with the backbone network. By specifying the precise insertion position of the attention module, it achieves hierarchical optimization. The parallel insertion strategy, which runs through multiple feature extraction stages, enables fine-grained adjustment of the entire feature learning process at multiple levels, thereby improving the model's feature representation capabilities.

[0038] In this embodiment, the optimized parallel attention module consists of three parallel sub-modules: a Coordinate Attention (CA) module, a Convolutional Block Attention (CBAM) module, and an Efficient Multi-Scale Attention (EMA) module. These three sub-modules operate in parallel, simultaneously receiving the feature maps output from the previous convolutional layer. Each sub-module performs targeted enhancements on features of different dimensions, ultimately outputting three enhanced feature maps for subsequent fusion.

[0039] Specifically, the core of the CA module lies in decomposing the traditional channel attention into two parallel 1D feature encodings to capture long-range dependencies and precise location information; the CBAM module comprehensively evaluates feature importance through dual channel and spatial attention; and the EMA module efficiently models multi-scale contextual relationships through innovative grouping structures and cross-spatial learning methods.

[0040] This scheme employs a parallel design of three specific attention modules to achieve multi-dimensional feature enhancement with complementary functions. It can refine the input features from three different but complementary perspectives: coordinate perception, channel-space interaction, and multi-scale fusion. This enhances the effect of multi-attention collaboration, making feature enhancement more targeted and effective. It overcomes the limitations of a single attention mechanism perspective, improves the model's ability to identify complex ECG features, and provides feature assurance for accurate classification.

[0041] In this embodiment, the internal working mechanism of the three parallel sub-modules is further described. The CA module decomposes channel attention into two 1D feature encoding processes along the horizontal and vertical directions to generate attention weights containing coordinate information; the CBAM module sequentially processes the input feature map through the channel attention sub-module and the spatial attention sub-module; the EMA module extracts and fuses multi-scale features by grouping the input feature map along the channel dimension and reshaping it to the batch dimension, and by using parallel multi-scale convolution and cross-spatial interaction.

[0042] Specifically, the working principle of the CA module is as follows: given an input feature map... The CA module first performs feature aggregation along the horizontal and vertical directions through a coordinate information embedding step: for the first... c Each channel is at a height The calculation formula for the output is: , forming feature vectors Similarly, in width The calculation formula for the output is: , forming feature vectors The feature maps perceived from both directions are then concatenated in the coordinate attention generation step and fed into a shared 1×1 convolutional transformation function. ,get: ,in, This indicates a splicing operation. It is a nonlinear activation function. This is an intermediate feature mapping. Next, f is split along the spatial dimension into... and And through two independent 1×1 convolution transformations respectively. and Generate attention weights: in This is the Sigmoid function. Finally, the output feature map is... The input feature map is obtained by element-wise multiplying it with these two attention weights: .

[0043] The CBAM module is a sequentially executed dual-attention mechanism. Its working principle is as follows: given an input feature map... Generate a one-dimensional channel attention map Its calculation utilizes both global average pooling and global max pooling to obtain two types of spatial context descriptors: and These two descriptors are then fed into a shared multilayer perceptron (MLP). MLP The channel weights are generated by fusion and nonlinear transformation.

[0044] in, It is the Sigmoid activation function. and for MLP The weight, This is the compression ratio. This weight is multiplied channel-by-channel by the input feature map to obtain the channel-enhanced features. Subsequently, the spatial attention submodule... The process begins by generating two channel pooling feature maps: and After concatenating them along the channel dimension, a 3×3 convolutional layer is used. Generate a 2D spatial attention map: Finally, the spatial weight map is multiplied point-by-point with the channel-enhanced feature map to output the refined features. This sequential processing strategy, prioritizing channels over spatial processing, enables the network to effectively emphasize information-rich features and suppress unnecessary responses, thereby significantly improving its ability to identify key patterns in ECG feature maps.

[0045] How the EMA module works: Given an input feature map The EMA module first divides it into G groups along the channel dimension: ,in, The grouped features are reshaped to the batch dimension to form a new tensor. This allows for parallel processing within the group. The EMA module employs two parallel sub-networks for multi-scale feature extraction: the 1×1 branch uses 1×1 convolutions to capture local details and channel interactions, and its output is denoted as... The 3×3 branch uses 3×3 convolutions to expand the receptive field and extract a wider range of contextual information; its output is denoted as... The outputs of the two branches are fused using a cross-space learning method: firstly, the outputs of the two branches are... and Two-dimensional global average pooling is performed separately to encode global spatial information. The calculation formula is as follows: The pooling result, after being normalized by Softmax, is compared with... Perform a matrix dot product operation to capture pixel-level pairwise relationships and emphasize global context. Similarly, for... Perform the same processing as before, and with The interaction process generates two sets of spatial attention weights. These weights, activated by the sigmoid function, are used to weighted aggregate the outputs of the two branches, forming an enhanced feature representation. This design enables the EMA module to capture both short-range and long-range dependencies simultaneously, significantly reducing computational complexity while preserving accurate spatial structure information. Compared to traditional attention mechanisms, the EMA module achieves superior parameter efficiency while maintaining high performance, making it particularly suitable for computationally limited ECG signal analysis tasks.

[0046] This scheme clarifies the working principles of each submodule. CA's coordinate decomposition strategy enhances its ability to locate key regions (such as anomalous heartbeats) while maintaining low computational complexity, making it suitable for processing image information with a clear spatial structure. CBAM's serial dual attention mechanism effectively emphasizes information-rich features and suppresses unnecessary responses. EMA's grouping and cross-spatial learning design achieves efficient multi-scale modeling of ECG features. By refining the internal mechanisms of the modules, the effect of multi-attention collaboration is strengthened, making feature enhancement more targeted and effective.

[0047] In this embodiment, the feature fusion strategy for optimizing the parallel attention module is defined as follows: First, the feature maps output by the three sub-modules CA, EMA, and CBAM are weighted using learnable weight parameters, and then the three weighted feature maps are fused. Subsequently, the fused feature map is added to the original input feature map of the optimized parallel attention module (i.e., the output of the previous convolutional layer) through residual connections, and finally, the enhanced feature map is output. The specific implementation of the weighted fusion is as follows: weighted fusion of the learnable weight parameters includes: normalizing the learnable weight parameters using the Softmax function to obtain normalized weights; and multiplying the output feature maps of the three sub-modules CA, EMA, and CBAM element-wise with their corresponding normalized weights to complete the weighting process.

[0048] Specifically, for the input feature map The three attention modules output the following respectively: , , Let the learnable parameters be... The normalization process is performed using the Softmax function, and the calculation formula is as follows: , Ensure the total weight The value is set to 1 to reflect relative importance and prevent any mechanism from becoming overly dominant. Subsequently, the three attention outputs are weighted and concatenated along the channel dimension, calculated using the following formula: To address the channel expansion problem, a 1×1 fusion convolutional layer is introduced, with the calculation formula as follows: ,in, The kernel is a 1×1 convolution, and the output is finally connected through residuals. The calculation formula is: Among them, the adjustable attention intensity coefficient The initial value is set to 0.1, and can be gradually increased according to the training progress to ensure that the network transitions from basic features to attention-enhanced features and achieves optimal classification performance.

[0049] This solution creatively designs a "learnable weighted fusion" feature integration method, solving the rigidity problem of existing fusion strategies with fixed weights that cannot adapt to the feature requirements of different types of arrhythmias. The learnable weights can dynamically adjust the contribution of the three sub-modules according to the characteristics of different arrhythmias, achieving the optimal feature combination. This fusion strategy improves the model's generalization ability and training stability, especially demonstrating stability when dealing with complex situations such as clinical noise and individual differences.

[0050] In this embodiment, a complete training process for the arrhythmia classification model is added, forming a complete methodological loop. Based on the MIT-BIH arrhythmia database as the data source, the target dataset is selected; it is divided into training and test sets according to a set ratio; the ECG signals of the training set undergo signal preprocessing steps as described in step S1 to construct a two-dimensional feature image set for training; the two-dimensional feature image set for training is input into the initial arrhythmia classification model, the model parameters are iteratively optimized using the training set, and the model performance is verified using the test set to obtain the trained arrhythmia classification model.

[0051] Specifically, the internationally recognized MIT-BIH arrhythmia database was used as the benchmark. This database contains 48 dual-channel long-term ECG recordings (30 minutes each, 360Hz sampling rate). All records have been accurately annotated by clinical experts, providing a reliable basis for model training and evaluation.

[0052] For example, 70% of the dataset is allocated to the training set, the main purpose of which is to learn model parameters, optimize network weight iterations, and build internal features; the remaining 30% of the dataset is used as the test set to objectively evaluate the model's performance on different data, so as to ensure the reliability of the evaluation results.

[0053] This approach clearly defines the training steps and dataset sources, ensuring the reproducibility of the training process and emphasizing that the effectiveness of the approach is based on validation with internationally recognized benchmark databases. The selection of the MIT-BIH dataset, a clinically recognized standard dataset, guarantees the reliability and representativeness of the training data. The correlation between the training process and preprocessing steps ensures the consistency between the training data and real-world application data. This training workflow makes the model's performance more reliable, avoiding the problem of poor model generalization ability caused by non-standard data sources, and providing a guarantee for the model's practical clinical application.

[0054] In this embodiment, the classification results of electrocardiogram signals are clearly defined, specifically including four types of clinical core arrhythmias: normal heartbeat, left bundle branch block heartbeat, right bundle branch block heartbeat, and pacing heartbeat.

[0055] Specifically, to address the prevalent class imbalance in the data and focus on the most clinically representative types, this invention selects a subset of data from the database that includes four categories: normal heartbeat (N), left bundle branch block heartbeat (LBBB), right bundle branch block heartbeat (RBBB), and paced heartbeat (P), based on the distribution ratio of heartbeat types. This ensures that the arrhythmia classification model can fully learn the key class features.

[0056] This technical solution focuses on the four core arrhythmia types that are most representative and in high demand in clinical practice, solving the problems of existing methods having an overly broad classification scope (including rare types, resulting in low practicality) or insufficient specificity (omitting core types). It accurately matches the actual needs of clinical diagnosis, and the classification results can directly provide doctors with crucial references, avoiding the interference of redundant classification results in diagnostic decisions. At the same time, focusing on core types allows the model to concentrate on learning the key features of the four arrhythmia types, improving classification accuracy and diagnostic efficiency.

[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for classifying cardiac arrhythmias based on a multi-attention mechanism fusion VGG network, characterized in that, Includes the following steps: S1. Signal preprocessing: Obtain the ECG signal to be classified, and use empirical mode decomposition technology to decompose the ECG signal to be classified to obtain at least two intrinsic mode components; Based on the at least two intrinsic mode components, a two-dimensional feature representation of the electrocardiogram signal is constructed; S2. Model Classification: The two-dimensional feature representation is input into a pre-trained arrhythmia classification model, which includes a VGG feature extraction backbone network, an optimized parallel attention module set in at least one intermediate layer of the VGG feature extraction backbone network, and a fusion unit for fusing the output of the optimized parallel attention module. S3. Classification Output: Based on the output of the arrhythmia classification model, obtain the classification result of the electrocardiogram signal.

2. The arrhythmia classification method based on multi-attention mechanism fusion VGG network according to claim 1, characterized in that, The steps for constructing the two-dimensional feature representation include: Select the first two intrinsic mode components, namely the first intrinsic mode component and the second intrinsic mode component; Based on phase space reconstruction theory, the sequence values ​​of the first and second eigenmode components are mapped to a two-dimensional plane to form trajectory points; The trajectory points are used to construct a trajectory graph that represents the two-dimensional features.

3. The arrhythmia classification method based on multi-attention mechanism fusion VGG network according to claim 1 or 2, characterized in that, The VGG feature extraction backbone network is a VGG16 network, which contains 13 convolutional layers. Five feature extraction stages.

4. The arrhythmia classification method based on multi-attention mechanism fusion VGG network according to claim 3, characterized in that, The optimized parallel attention module is set after the 2nd, 4th, 7th, 10th, and 13th convolutional layers of the VGG16 network.

5. The arrhythmia classification method based on multi-attention mechanism fusion VGG network according to claim 1, characterized in that, The optimized parallel attention module includes a coordinate attention module, a convolutional block attention module, and an efficient multi-scale attention module, which are used to process the input feature maps in parallel.

6. The arrhythmia classification method based on multi-attention mechanism fusion VGG network according to claim 5, characterized in that, The coordinate attention module decomposes channel attention into two 1D feature encoding processes along the horizontal and vertical directions, generating attention weights that contain coordinate information. The convolutional block attention module sequentially processes the input feature map through the channel attention submodule and the spatial attention submodule. The efficient multi-scale attention module extracts and fuses multi-scale features by grouping the input feature maps along the channel dimension and reshaping them to the batch dimension, and by utilizing parallel multi-scale convolution and cross-space interaction.

7. The arrhythmia classification method based on multi-attention mechanism fusion VGG network according to claim 5 or 6, characterized in that, The optimized parallel attention module uses learnable weight parameters to perform weighted fusion of the output feature maps of the coordinate attention module, the convolutional block attention module, and the efficient multi-scale attention module, respectively. The feature map obtained by the weighted fusion is added to the original input feature map of the optimized parallel attention module through residual connection and then output.

8. The arrhythmia classification method based on multi-attention mechanism fusion VGG network according to claim 7, characterized in that, The weighted fusion of the learnable weight parameters includes: normalizing the learnable weight parameters using the Softmax function to obtain normalized weights; and multiplying the outputs of the coordinate attention module, the convolutional block attention module, and the efficient multi-scale attention module with the corresponding normalized weights.

9. The arrhythmia classification method based on multi-attention mechanism fusion VGG network according to claim 1, characterized in that, The training steps for the arrhythmia classification model also include: Based on the MIT-BIH arrhythmia database, the target dataset was selected; The target dataset is divided into a training set and a test set according to a certain ratio; Perform the signal preprocessing steps as described in step S1 on the electrocardiogram signals of the training set to construct a two-dimensional feature image set for training. The training set of two-dimensional feature images is input into the initial arrhythmia classification model. The model parameters are iteratively optimized using the training set, and the model performance is verified using the test set to obtain the trained arrhythmia classification model.

10. The arrhythmia classification method based on multi-attention mechanism fusion VGG network according to claim 1, characterized in that, The classification results of the electrocardiogram signals include normal heartbeats, left bundle branch block heartbeats, right bundle branch block heartbeats, and paced heartbeats.