Electrocardiosignal classification method, device and equipment based on multi-mode electrocardio characteristics and medium thereof
By combining wavelet energy, deep abstraction, and clinical concept features with an unsupervised domain adaptation strategy, the generalization ability of single-modality ECG signal classification methods is insufficient, achieving higher accuracy and robustness.
Patent Information
- Application Number
- CN202511720561.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-02-27
AI Technical Summary
Existing ECG signal classification methods rely on single-modal feature learning, which makes it difficult to capture multimodal information, and their generalization ability is insufficient when faced with distribution differences between different patients and devices.
A multimodal ECG feature classification method is adopted, which improves the generalization ability of the model by parallel extraction and fusion of wavelet energy features, deep abstract features and clinical concept features, and combined with unsupervised domain adaptation strategies, including adversarial domain alignment and class conditional alignment loss.
It effectively improves the accuracy and robustness of ECG signal classification, can adapt to differences between different patients and devices, and enhances the application effect of the model in actual clinical scenarios.
Smart Images

Figure CN121580109A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of electrocardiosignal processing, and particularly relates to an electrocardiosignal classification method and device based on multi-modal electrocardiosignal features, an electrocardiosignal classification equipment and a medium thereof. BACKGROUND
[0002] An electrocardiosignal is an important basis for clinical diagnosis of cardiovascular diseases, and its waveform characteristics are closely related to the electrical physiological activity of the heart. In recent years, automatic classification methods for arrhythmia based on deep learning have made significant progress. These methods usually learn feature representations from raw electrocardiosignals through convolutional neural networks or recurrent neural networks, achieving high classification accuracy. In particular, with the application of attention mechanisms such as Transformers in time series processing, the modeling capability of long-term dependencies in electrocardiosignals has been further improved.
[0003] However, most existing methods rely on single-modal feature learning, i.e., only extracting feature representations from raw electrocardiosignals. This single-modal processing approach has obvious limitations: on the one hand, it is difficult to capture complementary information in the time domain, frequency domain, and clinical feature space of electrocardiosignals simultaneously; on the other hand, due to significant physiological differences between different patients, inconsistent parameters of electrocardiosignal acquisition devices, and other factors, there are distribution differences between training data and test data, which seriously affect the generalization performance of the model.
[0004] Although existing research has attempted to alleviate the distribution difference problem through domain adaptation methods, these methods usually only focus on global feature alignment, ignoring the preservation of semantic structure in the feature space of different classes of samples. In particular, when dealing with electrocardiosignals, which are sensitive to fine-grained features in biomedical signals, existing methods are difficult to achieve effective inter-domain adaptation while maintaining class discriminability, which limits their application effect in actual clinical scenarios. SUMMARY
[0005] To solve the above technical problems, the present application provides an electrocardiosignal classification method and device based on multi-modal electrocardiosignal features, an electrocardiosignal classification equipment and a medium thereof, to solve the problem of insufficient generalization ability of electrocardiosignal classification models caused by single feature representation and domain distribution difference in the prior art.
[0006] The electrocardiosignal classification method based on multi-modal electrocardiosignal features comprises the following steps:
[0007] Step S1: Preprocessing the input raw electrocardiosignal, including denoising, resampling to a uniform frequency, and heartbeat segmentation based on R-peak detection;
[0008] Step S2: Extracting three types of features from the preprocessed electrocardiosignal in parallel:
[0009] Wavelet energy feature: multi-scale energy features are extracted through discrete wavelet transform;
[0010] Deep abstract feature: extracted by a neural network containing multi-scale residual blocks, a Transformer encoder, and a windowed global-local attention (WGLA) module;
[0011] Clinical concept feature: a knowledge graph is constructed based on clinical prior knowledge, and structural relationships between feature nodes are extracted through a graph convolution network (GCN);
[0012] Step S3: input the wavelet energy feature, deep abstract feature, and clinical concept feature into a multi-modal feature fusion module for fusion to obtain a fused feature;
[0013] Step S4: classify the electrocardiogram signal based on the fused feature, and use an unsupervised domain adaptation strategy in the model training process, which includes an adversarial domain alignment loss based on a gradient reversal layer (GRL) and a class-conditioned alignment loss based on high-confidence pseudo labels.
[0014] Preferably, the wavelet energy feature is extracted by:
[0015] Performing 9-layer discrete wavelet transform on the electrocardiogram signal using a Daubechies 5 wavelet basis;
[0016] Selecting the detail coefficients of the 4th to 8th layers, and calculating the energy of each layer;
[0017] The energies are spliced to form a wavelet energy feature vector.
[0018] Preferably, the deep abstract feature is extracted by:
[0019] Using multiple residual blocks with different convolution kernel sizes to extract multi-scale local features;
[0020] Inputting the multi-scale local features into a Transformer encoder to model global dependencies;
[0021] Inputting the output of the Transformer encoder into a WGLA module to enhance the representation of local and global features through window partitioning, logarithmic relative position encoding, and depth separable convolution.
[0022] Preferably, the clinical concept feature is extracted by:
[0023] Dividing the features of the electrocardiogram signal into five feature groups: time, amplitude, slope, geometry, and statistics;
[0024] Compressing each feature group into a graph node through linear projection to construct a fully connected graph;
[0025] Information propagation and aggregation of graph nodes are performed by at least one graph convolutional network (GCN);
[0026] Global average pooling is performed on node features output by the GCN to obtain clinical concept feature representation.
[0027] Preferably, the multi-modal feature fusion module performs fusion, including:
[0028] Linear transformation is performed on three types of input features respectively to align dimensions, and splicing is performed;
[0029] Summation is performed on the spliced tensor along the modal dimension, and a channel descriptor is obtained through global average pooling;
[0030] A multi-layer perceptron (MLP) including a convolutional layer is used to calculate attention weights of each modal;
[0031] Weighted summation is performed on each type of feature using the attention weights to obtain fused features.
[0032] The electrocardiogram signal classification device based on multi-modal electrocardiogram features comprises:
[0033] A preprocessing module is configured to perform denoising, resampling and heartbeat segmentation on the electrocardiogram signal;
[0034] A feature extraction module is configured to extract wavelet energy features, deep abstract features and clinical concept features of the electrocardiogram signal;
[0035] A feature fusion module is configured to fuse the three types of features;
[0036] A classification module is configured to perform arrhythmia classification based on the fused features;
[0037] A domain adaptation module is configured to align feature distributions between a source domain and a target domain during training;
[0038] The device is configured to perform the method described above.
[0039] An electronic device comprises:
[0040] A processor;
[0041] A memory configured to store a computer program;
[0042] The computer program is executed by the processor to implement the method described above.
[0043] A computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method described above.
[0044] Compared with the prior art, the present application has the following beneficial effects:
[0045] By fusing three types of complementary information of wavelet energy features, deep abstract features and clinical concept features, the accuracy and robustness of electrocardiosignal classification are effectively improved. The method first preprocesses the original electrocardiosignal, and then extracts three types of features in parallel: wavelet energy features capture the time-frequency characteristics of the signal through discrete wavelet transform; deep abstract features mine the deep spatiotemporal patterns of the signal by means of multi-scale residual blocks, Transformer encoder and windowed attention mechanism; clinical concept features construct a graph structure based on medical knowledge, and use a graph convolution network to extract feature relationships with clinical significance;
[0046] In the feature fusion stage, the multi-modal feature fusion module adaptively integrates the three types of features, so that the model can fully utilize the complementary advantages of different modal information. In addition, an unsupervised domain adaptation strategy is introduced in the model training process, combined with the mechanisms of adversarial domain alignment and class conditional alignment, which significantly improves the generalization ability of the model when facing different patients and different acquisition devices, effectively overcoming the difficulty of large individual differences and inconsistent distribution of electrocardiosignals. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 The electrocardiosignal classification method flowchart of the present application. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0049] As Figure 1 shown:
[0050] Embodiment one:
[0051] The present embodiment provides an electrocardiosignal classification method based on multi-modal electrocardio features, comprising the following steps:
[0052] Step S101: electrocardiosignal preprocessing:
[0053] Raw electrocardiogram signals from public databases such as MIT-BIH, INCART, SVDB or LTDB are acquired. First, a Butterworth band-pass filter is used to denoise the signals, retaining the 0.1-100 Hz diagnostic relevant frequency band. Then, the sampling rate of all signals is uniformly resampled to 360 Hz. Next, the R-peak detection algorithm is used to locate the R-peak position of each heartbeat. Taking the R-peak as the center, the signal segment from 0.14 seconds before the R-peak to 0.28 seconds after the R-peak is intercepted to form a complete heartbeat cycle. Finally, each signal segment is adjusted to a fixed length of 128 sampling points, and the timing features such as the ratio of the preceding and following RR intervals are calculated, and the signal segments are spliced to form the final input.
[0054] Step S102: Multimodal feature extraction:
[0055] Three types of complementary features are extracted from the preprocessed electrocardiogram signals in parallel:
[0056] Wavelet energy feature extraction:
[0057] Discrete wavelet transform is applied to the preprocessed electrocardiogram signals, and Daubechies 5 wavelet basis is used for 9-layer decomposition; the detail coefficients of the 4th to 8th layers are selected as the key feature carriers; the energy value of each layer of detail coefficients is calculated: , wherein ; five energy values are spliced into a 5-dimensional wavelet energy feature vector;
[0058] Deep abstract feature extraction:
[0059] The input signal first passes through the input convolution module composed of two convolution layers, each followed by batch normalization and ReLU activation; three parallel multi-scale residual blocks are used for deep feature extraction, with convolution kernel sizes of 3, 5 and 7 respectively; the multi-scale features are spliced and input into the Transformer encoder to model the global long-term dependency relationship through the multi-head self-attention mechanism;
[0060] The Transformer output is sent to the windowed global-local attention module, which:
[0061] normalizes the input sequence and partitions it by a fixed window length; calculates the self-attention with logarithmic relative position encoding introduced within each window; uses deep separable convolution in parallel to enhance local representation; fuses the attention output and convolution output through residual connection; finally outputs the deep abstract feature representation;
[0062] Clinical concept feature extraction:
[0063] Based on clinical prior knowledge, a 14-dimensional clinical feature vector is constructed from five angles:
[0064] Temporal features: QRS width, Q width, ST segment shift, RR interval;
[0065] Amplitude features: R wave amplitude, Q wave depth, R peak prominence;
[0066] Slope features: QRS up-slope, QRS down-slope;
[0067] Geometric features: QRS area, QRS asymmetry;
[0068] Statistical features: QRS kurtosis, QRS skewness, baseline variability;
[0069] Divide the 14-dimensional features into five feature groups, each compressed into a scalar node feature through linear projection;
[0070] Construct a fully connected graph structure, each node representing a feature group;
[0071] Use a two-layer graph convolution network for information propagation and aggregation between nodes;
[0072] Perform global average pooling on the output node features to obtain the clinical concept feature representation.
[0073] Step S103: Multimodal feature fusion:
[0074] Input the wavelet energy features, deep abstract features, and clinical concept features into the multimodal feature fusion module:
[0075] Perform linear transformation on each type of feature to achieve dimension alignment;
[0076] Concatenate the transformed features along the feature dimension;
[0077] Sum the concatenated tensors along the view dimension, and obtain the channel-level descriptor through global average pooling;
[0078] Use a multi-layer perceptron containing two 1D convolution layers to calculate the attention weights of each modality;
[0079] Apply the Softmax function along the view dimension to normalize the weights;
[0080] Weighted sum the three types of features according to the weights to obtain the final fusion features;
[0081] Step S104: Classification and domain adaptation training:
[0082] Input the fusion features into the classifier to obtain the type prediction result of the electrocardiogram signal. The classifier consists of a fully connected layer and a Softmax function, outputting the probability of belonging to each arrhythmia category.
[0083] In the model training process, an unsupervised domain adaptation strategy is used to improve the generalization ability of the model:
[0084] Classification loss: cross-entropy loss is used to ensure that the model correctly classifies source domain samples;
[0085] Domain discriminant loss: adversarial training is performed between the feature extractor and the domain discriminator, and the gradient reversal layer is used to encourage the generation of domain-invariant features;
[0086] Class-conditioned alignment loss: pseudo labels are assigned to high-confidence prediction samples in the target domain, and the mean square error between the feature centers of the same class samples in the source and target domains is calculated to reduce the distance between the same class samples across domains;
[0087] The total loss function is the weighted sum of the three losses: where and represent the weights of the loss terms and .
[0088] Embodiment two: electrocardiosignal classification device
[0089] The present embodiment provides an electrocardiosignal classification device based on multi-modal electrocardio features, comprising:
[0090] Preprocessing module: configured to denoise, resample and R-peak-based heartbeat segmentation of the input electrocardiosignal;
[0091] Feature extraction module: including three parallel units;
[0092] Wavelet feature extraction unit: configured to extract multi-scale energy features through discrete wavelet transform;
[0093] Deep abstract feature extraction unit: configured to extract deep features through a neural network containing multi-scale residual blocks, a Transformer encoder and a WGLA module;
[0094] Clinical concept feature extraction unit: configured to construct a knowledge graph based on clinical prior knowledge and extract structural features through GCN;
[0095] Feature fusion module: configured to perform cross-modal fusion of the three types of features to generate a fused feature representation;
[0096] Classification module: configured to classify arrhythmias based on the fused features;
[0097] Domain adaptation module: configured to achieve alignment of feature distributions between the source and target domains during training.
[0098] Embodiment three: electronic device
[0099] The embodiment provides an electronic device, comprising at least one processor and a memory connected with the at least one processor. The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the electrocardiosignal classification method in the embodiment one.
[0100] Embodiment four: computer readable storage medium
[0101] The embodiment provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the electrocardiosignal classification method in the embodiment one.
[0102] The embodiments of the present application are given for example and description, although the embodiments of the present application have been shown and described above, it can be understood that the above-mentioned embodiments are exemplary, and cannot be understood as the limitation of the present application, and the changes, modifications, replacements and variations of the above-mentioned embodiments made by the ordinary skilled in the art within the scope of the present application should be included in the protection scope of the present application.
Claims
1. A method for electrocardiosignal classification based on multi-modal electrocardio features, characterized in that, The method comprises the following steps: Step S1: preprocessing the input original electrocardio signal, including denoising, resampling to a uniform frequency, and heartbeat segmentation based on R peak detection; Step S2: extracting three types of features from the preprocessed electrocardio signal in parallel: Wavelet energy feature: extracting multi-scale energy features through discrete wavelet transform; Deep abstract feature: extracting through a neural network comprising a multi-scale residual block, a Transformer encoder, and a windowed global-local attention WGLA module; Clinical concept feature: constructing a knowledge graph based on clinical prior knowledge, and extracting the structural relationship between feature nodes through a graph convolution network GCN; Step S3: inputting the wavelet energy feature, the deep abstract feature, and the clinical concept feature into a multi-modal feature fusion module for fusion to obtain a fused feature; Step S4: classifying the electrocardio signal based on the fused feature, and adopting an unsupervised domain adaptation strategy in the model training process, the strategy comprising an adversarial domain alignment loss based on a gradient reversal layer GRL and a class conditional alignment loss based on a high-confidence pseudo label.
2. The method of claim 1, wherein, The wavelet energy feature is extracted by: using a Daubechies 5 wavelet basis to perform 9-layer discrete wavelet transform on the electrocardio signal; selecting the detail coefficients of the 4th to 8th layers, and calculating the energy of each layer; splicing the energies to form a wavelet energy feature vector.
3. The method of claim 1, wherein, The deep abstract feature is extracted by: using multiple residual blocks with different convolution kernel sizes to extract multi-scale local features; inputting the multi-scale local features into a Transformer encoder to model global dependency relationships; inputting the output of the Transformer encoder into a WGLA module to enhance the representation of local and global features through window partitioning, logarithmic relative position encoding, and depth separable convolution.
4. The method of claim 1, wherein, The clinical concept feature is extracted by: dividing the features of the electrocardio signal into five feature groups: time, amplitude, slope, geometry, and statistics; compressing each feature group into a graph node through linear projection to construct a fully connected graph; performing information propagation and aggregation on the graph nodes through at least one layer of graph convolution network GCN; performing global average pooling on the node features output by the GCN to obtain a clinical concept feature representation.
5. The method of claim 1, wherein, The multi-modal feature fusion module fuses by: performing linear transformation on the three types of input features to align the dimensions, and splicing; summing the spliced tensors along the modal dimension, and obtaining a channel descriptor through global average pooling; calculating the attention weights of each modality through a multi-layer perceptron MLP comprising convolution layers; performing weighted summation on each type of feature using the attention weights to obtain a fused feature.
6. Apparatus for electrocardiosignal classification based on multi-modal electrocardio features, characterized in that It comprises: a preprocessing module for denoising, resampling, and heartbeat segmentation of the electrocardio signal; a feature extraction module for extracting wavelet energy features, deep abstract features, and clinical concept features of the electrocardio signal; a feature fusion module for fusing the three types of features; a classification module for classifying arrhythmia based on the fused features; a domain adaptation module for aligning the feature distributions between the source domain and the target domain during the training process. The apparatus is configured to perform the method of any one of claims 1 to 5.
7. An electronic device, characterized by Comprise: a processor; a memory for storing a computer program; the computer program, when executed by the processor, implements the method of any one of claims 1 to 5.
8. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by the processor, implements the method of any one of claims 1 to 5.
Citation Information
Cited By
Depression type electroencephalogram signal recognition method, storage medium, product and recognition device
CN122163232A