Automatic multi-tag electrocardiogram processing system and method

Through the combination of hybrid residual cyclic convolutional neural network and hybrid RNN, the problem of insufficient feature extraction and time-dependent modeling in single-lead ECG signal processing is solved, and efficient and accurate ECG multi-label classification diagnosis is achieved.

CN119646686APending Publication Date: 2025-03-18上海哈特智康医疗技术有限公司

Patent Information

Application Number
CN202411694320.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing automatic ECG classification method faces problems such as low computational efficiency, insufficient feature extraction, and difficulty in effectively modeling long-term signals.

Method used

A hybrid residual cyclic convolutional neural network is used to extract spatial and short-term time features through convolution layers and residual blocks, combine mixed RNN to capture long-term and short-term dependency features, and generate multi-label classification results through attention mechanism and full-connection layer.

Benefits of technology

It improves the accuracy, sensitivity and specificity of multi-label ECG classification, and achieves efficient and accurate diagnostic results. It is suitable for portable ECG monitoring equipment and large-scale ECG screening.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646686A_ABST
    Figure CN119646686A_ABST
Patent Text Reader

Abstract

The invention provides an automatic multi-label electrocardiogram processing system and method, and the system comprises a preprocessing module which carries out the standardization processing of original single-lead ECG data, and generates a signal segment with a unified length; the feature extraction module is used for extracting space and short-term time features by using a convolutional layer and a residual block based on the signal segments with the uniform length; the time feature capturing module is used for further capturing long-term and short-term dependency features through the hybrid RNN; the classification output module is used for generating a final multi-label classification result through an attention mechanism and a full connection layer based on the feature extraction and time feature capture result; by adopting a structure of combining the convolutional network, the residual network and the recursive network, the problems of insufficient diagnosis precision, time sequence information loss and low calculation efficiency caused by insufficient feature extraction of the existing single-lead ECG data in automatic multi-label diagnosis are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal processing, and in particular, to an automatic multi-label electrocardiogram processing system and method; more particularly, to a hybrid residual recurrent convolutional neural network for automatic multi-label diagnosis of a single-lead electrocardiogram. Background Art

[0002] Most current automatic ECG classification methods, such as convolutional neural networks (CNNs) or recurrent neural networks (RNNs), can only perform single-label diagnosis and face challenges such as low computational efficiency and insufficient feature extraction when processing long-duration ECG signals. Traditional CNN methods have limitations in spatial feature extraction and cannot effectively model the temporal dependency of long-duration signals. Pure RNN methods are prone to gradient vanishing as the depth increases, resulting in the loss of long-duration dependency features.

[0003] In addition, many methods use zero padding to deal with the problem of inconsistent data length, which will introduce a lot of redundant information and affect model performance.

[0004] Patent document CN114496221B discloses an automatic diagnosis system for depression based on closed-loop speech chain and deep learning, including: a speech chain feature extraction module for extracting speech chain features from segmented speech, establishing vocal tract and ear canal models, extracting Mel cepstral coefficient features of preset dimensions according to the ear canal model, and extracting linear prediction coefficient features of another preset dimension according to the vocal tract model; an intra-segment feature extraction module for establishing a one-dimensional convolutional neural network to extract depression-related features from the MFCC features and LPC features of each speech segment, and outputting multi-dimensional depression features after extraction of the MFCC features and LPC features corresponding to each speech segment; a feature-level fusion module for fusing the multi-dimensional depression features corresponding to each segment, and fusing all segment features corresponding to each subject; an inter-segment feature extraction and classification output module for establishing a long-short-term memory network to extract depression features between segments and realize classification output of depression and non-depression. However, this invention is aimed at diagnosis of depression, not electrocardiogram diagnosis. Summary of the invention

[0005] In view of the defects in the prior art, the object of the present invention is to provide an automatic multi-label electrocardiogram processing system and method.

[0006] An automatic multi-label electrocardiogram processing system provided by the present invention comprises:

[0007] Preprocessing module: standardizes the original single-lead ECG data to generate signal segments of uniform length;

[0008] Feature extraction module: extracts spatial and short-term temporal features using convolutional layers and residual blocks based on signal segments of uniform length;

[0009] Temporal feature capture module: further captures long-term and short-term dependency features through hybrid RNN;

[0010] Classification output module: Based on the feature extraction and temporal feature capture results, the final multi-label classification results are generated through the attention mechanism and the fully connected layer;

[0011] Preferably, in the preprocessing module:

[0012] The process includes standardization and segmentation of the raw data. First, the length of all ECG records is standardized to preset data points by zero padding or truncation. The standardized ECG records are segmented to retain preset valid segments containing multiple heartbeat signals and discard all-zero segments.

[0013] Preferably, in the feature extraction module:

[0014] It includes convolutional neural network module and residual network module; the spatial features of ECG are extracted through convolutional layer; the convolutional layer uses multi-scale convolution kernel for feature extraction, including large-scale convolution for presetting long-term dependency features and small-scale convolution for presetting short-term detail features; after feature extraction, the convolutional features are mined using multi-layer residual network; the channel attention mechanism is introduced to improve the network's expression ability by adjusting the weights of feature channels;

[0015] Specific convolution extraction process: The preset large-scale convolution uses a larger convolution kernel to capture the long-term dependency features in the signal, and the preset small-scale convolution uses a smaller convolution kernel to extract the short-term detail features in the signal. The convolution extraction process continuously compresses the feature dimension through layer-by-layer convolution and pooling operations while retaining the preset time and frequency information;

[0016] The multi-layer residual network introduces skip connections. The convolutional layers in each residual block are used to extract features of different scales, gradually refine and fuse multi-level information;

[0017] The channel attention mechanism is implemented using the Squeeze-and-Excitation mechanism, which compresses each channel through global average pooling to obtain the global features of each channel; it generates the weight of each channel through a two-layer fully connected network, and applies these weights to the original features to activate preset important channels and suppress preset unimportant channels.

[0018] Preferably, in the time feature capturing module:

[0019] It includes a hybrid recursive neural network module and feature fusion; it adopts a double-layer bidirectional GRU and a single-layer bidirectional LSTM parallel structure. The GRU part is used to capture the preset short-term dependencies in the signal, and the LSTM part is used to retain the preset long-term time features. In the hybrid recursive neural network, the outputs of different structures are fused, and the classification ability of multi-label ECG signals is improved through weighted averaging.

[0020] Preferably, in the classification output module:

[0021] It includes attention layer and fully connected layer. It introduces attention mechanism, calculates the weight of input features and determines the importance of each feature, maps the features processed by attention mechanism to multi-label classification output, and solves the problem of sample category imbalance by using multi-label classification loss function.

[0022] The importance of each feature is determined by calculating the weighted sum of the input features through the attention mechanism. The input features are converted into low-dimensional representations through a linear layer, processed through a Tanh nonlinear activation function, and then generated weight scores through another linear layer. The scores are normalized into probabilities using the softmax function to represent the importance of each feature. The weighted sum of each input feature and its corresponding weight is calculated.

[0023] Focal Loss introduces a regulation factor based on the traditional cross entropy loss, adjusting the loss contribution according to the difficulty of the sample. Focal Loss is calculated by the formula FL(p t )=-α t (1-p t ) γ log(p t ) calculation; where p t is the model's predicted probability for the positive class, α t is the category balance factor, and γ is a tuning parameter used to control the weight reduction of easy-to-classify samples.

[0024] An automatic multi-label electrocardiogram processing method provided by the present invention comprises:

[0025] Step S1: instructing the preprocessing module to perform standardization processing on the original single-lead ECG data to generate signal segments of uniform length;

[0026] Step S2: Instruct the feature extraction module to extract spatial and short-term temporal features based on signal segments of uniform length using convolutional layers and residual blocks;

[0027] Step S3: The temporal feature capture module further captures long-term and short-term dependency features through a hybrid RNN;

[0028] Step S4: The classification output module generates the final multi-label classification result through the attention mechanism and the fully connected layer based on the feature extraction and temporal feature capture results;

[0029] Preferably, in step S1:

[0030] In the preprocessing module:

[0031] The process includes standardization and segmentation of the raw data. First, the length of all ECG records is standardized to preset data points by zero padding or truncation. The standardized ECG records are segmented to retain preset valid segments containing multiple heartbeat signals and discard all-zero segments.

[0032] Preferably, in step S2:

[0033] In the feature extraction module:

[0034] It includes convolutional neural network module and residual network module; the spatial features of ECG are extracted through convolutional layer; the convolutional layer uses multi-scale convolution kernel for feature extraction, including large-scale convolution for presetting long-term dependency features and small-scale convolution for presetting short-term detail features; after feature extraction, the convolutional features are mined using multi-layer residual network; the channel attention mechanism is introduced to improve the network's expression ability by adjusting the weights of feature channels;

[0035] Specific convolution extraction process: The preset large-scale convolution uses a larger convolution kernel to capture the long-term dependency features in the signal, and the preset small-scale convolution uses a smaller convolution kernel to extract the short-term detail features in the signal. The convolution extraction process continuously compresses the feature dimension through layer-by-layer convolution and pooling operations while retaining the preset time and frequency information;

[0036] The multi-layer residual network introduces skip connections. The convolutional layers in each residual block are used to extract features of different scales, gradually refine and fuse multi-level information;

[0037] The channel attention mechanism is implemented using the Squeeze-and-Excitation mechanism, which compresses each channel through global average pooling to obtain the global features of each channel; it generates the weight of each channel through a two-layer fully connected network, and applies these weights to the original features to activate preset important channels and suppress preset unimportant channels.

[0038] Preferably, in step S3:

[0039] In the time feature capture module:

[0040] It includes a hybrid recursive neural network module and feature fusion; it adopts a double-layer bidirectional GRU and a single-layer bidirectional LSTM parallel structure. The GRU part is used to capture the preset short-term dependencies in the signal, and the LSTM part is used to retain the preset long-term time features. In the hybrid recursive neural network, the outputs of different structures are fused, and the classification ability of multi-label ECG signals is improved through weighted averaging.

[0041] Preferably, in step S4:

[0042] In the classification output module:

[0043] It includes attention layer and fully connected layer. It introduces attention mechanism, calculates the weight of input features and determines the importance of each feature, maps the features processed by attention mechanism to multi-label classification output, and solves the problem of sample category imbalance by using multi-label classification loss function.

[0044] The importance of each feature is determined by calculating the weighted sum of the input features through the attention mechanism. The input features are converted into low-dimensional representations through a linear layer, processed through a Tanh nonlinear activation function, and then generated weight scores through another linear layer. The scores are normalized into probabilities using the softmax function to represent the importance of each feature. The weighted sum of each input feature and its corresponding weight is calculated.

[0045] Focal Loss introduces a regulation factor based on the traditional cross entropy loss, adjusting the loss contribution according to the difficulty of the sample. Focal Loss is calculated by the formula FL(p t )=-α t (1-p t ) γ log(p t ) calculation; where p t is the model's predicted probability for the positive class, α t is the category balance factor, and γ is a tuning parameter used to control the weight reduction of easy-to-classify samples.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] 1. The present invention solves the problems of insufficient diagnostic accuracy, loss of time series information and low computational efficiency in automatic multi-label diagnosis of existing single-lead ECG data due to insufficient feature extraction by adopting a structure combining convolutional networks, residual networks and recursive networks;

[0048] 2. By combining the deep feature extraction of the residual network with the temporal capture capability of the recursive network, the present invention realizes the comprehensive extraction of spatial and temporal information in ECG signals, and improves the accuracy, sensitivity and specificity of multi-label classification;

[0049] 3. The present invention achieves efficient and accurate diagnostic effects and is suitable for portable ECG monitoring equipment and large-scale ECG screening application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0051] Figure 1 Schematic diagram of the system of the present invention. DETAILED DESCRIPTION

[0052] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0053] Embodiment 1:

[0054] This paper proposes a hybrid residual recurrent convolutional neural network for automatic multi-label classification diagnosis of single-lead electrocardiograms. The network comprehensively extracts ECG signal features in space and time by combining convolutional neural networks, residual modules and recurrent neural networks, and is suitable for portable and non-clinical cardiac health monitoring.

[0055] According to an automatic multi-label electrocardiogram processing method provided by the present invention, Figure 1 As shown, including:

[0056] Step S1: instructing the preprocessing module to perform standardization processing on the original single-lead ECG data to generate signal segments of uniform length;

[0057] Specifically, in step S1:

[0058] In the preprocessing module:

[0059] The process includes standardization and segmentation of the raw data. First, the length of all ECG records is standardized to preset data points by zero padding or truncation. The standardized ECG records are segmented to retain preset valid segments containing multiple heartbeat signals and discard all-zero segments.

[0060] Step S2: Instruct the feature extraction module to extract spatial and short-term temporal features based on signal segments of uniform length using convolutional layers and residual blocks;

[0061] Specifically, in step S2:

[0062] In the feature extraction module:

[0063] It includes convolutional neural network module and residual network module; the spatial features of ECG are extracted through convolutional layer; the convolutional layer uses multi-scale convolution kernel for feature extraction, including large-scale convolution for presetting long-term dependency features and small-scale convolution for presetting short-term detail features; after feature extraction, the convolutional features are mined using multi-layer residual network; the channel attention mechanism is introduced to improve the network's expression ability by adjusting the weights of feature channels;

[0064] Specific convolution extraction process: The preset large-scale convolution uses a larger convolution kernel to capture the long-term dependency features in the signal, and the preset small-scale convolution uses a smaller convolution kernel to extract the short-term detail features in the signal. The convolution extraction process continuously compresses the feature dimension through layer-by-layer convolution and pooling operations while retaining the preset time and frequency information;

[0065] The multi-layer residual network introduces skip connections. The convolutional layers in each residual block are used to extract features of different scales, gradually refine and fuse multi-level information;

[0066] The channel attention mechanism is implemented using the Squeeze-and-Excitation mechanism, which compresses each channel through global average pooling to obtain the global features of each channel; it generates the weight of each channel through a two-layer fully connected network, and applies these weights to the original features to activate preset important channels and suppress preset unimportant channels.

[0067] Step S3: The temporal feature capture module further captures long-term and short-term dependency features through a hybrid RNN;

[0068] Specifically, in step S3:

[0069] In the time feature capture module:

[0070] It includes a hybrid recursive neural network module and feature fusion; it adopts a double-layer bidirectional GRU and a single-layer bidirectional LSTM parallel structure. The GRU part is used to capture the preset short-term dependencies in the signal, and the LSTM part is used to retain the preset long-term time features. In the hybrid recursive neural network, the outputs of different structures are fused, and the classification ability of multi-label ECG signals is improved through weighted averaging.

[0071] Step S4: The classification output module generates the final multi-label classification result through the attention mechanism and the fully connected layer based on the feature extraction and temporal feature capture results;

[0072] Specifically, in step S4:

[0073] In the classification output module:

[0074] It includes attention layer and fully connected layer. It introduces attention mechanism, calculates the weight of input features and determines the importance of each feature, maps the features processed by attention mechanism to multi-label classification output, and solves the problem of sample category imbalance by using multi-label classification loss function.

[0075] The importance of each feature is determined by calculating the weighted sum of the input features through the attention mechanism. The input features are converted into low-dimensional representations through a linear layer, processed through a Tanh nonlinear activation function, and then generated weight scores through another linear layer. The scores are normalized into probabilities using the softmax function to represent the importance of each feature. The weighted sum of each input feature and its corresponding weight is calculated.

[0076] Focal Loss introduces a regulation factor based on the traditional cross entropy loss, adjusting the loss contribution according to the difficulty of the sample. Focal Loss is calculated by the formula FL(p t )=-α t (1-p t ) γ log(p t ) calculation; where p t is the model's predicted probability for the positive class, α t is the category balance factor, and γ is a tuning parameter used to control the weight reduction of easy-to-classify samples.

[0077] Embodiment 2:

[0078] Embodiment 2 is a preferred example of Embodiment 1, and is used to illustrate the present invention in more detail.

[0079] The present invention also provides an automatic multi-label ECG processing system, which can be implemented by executing the process steps of the automatic multi-label ECG processing method, that is, technical personnel in this field can understand the automatic multi-label ECG processing method as a preferred implementation of the automatic multi-label ECG processing system.

[0080] An automatic multi-label electrocardiogram processing system provided by the present invention comprises:

[0081] Preprocessing module: standardizes the original single-lead ECG data to generate signal segments of uniform length;

[0082] Specifically, in the preprocessing module:

[0083] The process includes standardization and segmentation of the raw data. First, the length of all ECG records is standardized to preset data points by zero padding or truncation. The standardized ECG records are segmented to retain preset valid segments containing multiple heartbeat signals and discard all-zero segments.

[0084] Feature extraction module: extracts spatial and short-term temporal features using convolutional layers and residual blocks based on signal segments of uniform length;

[0085] Specifically, in the feature extraction module:

[0086] It includes convolutional neural network module and residual network module; the spatial features of ECG are extracted through convolutional layer; the convolutional layer uses multi-scale convolution kernel for feature extraction, including large-scale convolution for presetting long-term dependency features and small-scale convolution for presetting short-term detail features; after feature extraction, the convolutional features are mined using multi-layer residual network; the channel attention mechanism is introduced to improve the network's expression ability by adjusting the weights of feature channels;

[0087] Specific convolution extraction process: The preset large-scale convolution uses a larger convolution kernel to capture the long-term dependency features in the signal, and the preset small-scale convolution uses a smaller convolution kernel to extract the short-term detail features in the signal. The convolution extraction process continuously compresses the feature dimension through layer-by-layer convolution and pooling operations while retaining the preset time and frequency information;

[0088] The multi-layer residual network introduces skip connections. The convolutional layers in each residual block are used to extract features of different scales, gradually refine and fuse multi-level information;

[0089] The channel attention mechanism is implemented using the Squeeze-and-Excitation mechanism, which compresses each channel through global average pooling to obtain the global features of each channel; it generates the weight of each channel through a two-layer fully connected network, and applies these weights to the original features to activate preset important channels and suppress preset unimportant channels.

[0090] Temporal feature capture module: further captures long-term and short-term dependency features through hybrid RNN;

[0091] Specifically, in the time feature capture module:

[0092] It includes a hybrid recursive neural network module and feature fusion; it adopts a double-layer bidirectional GRU and a single-layer bidirectional LSTM parallel structure. The GRU part is used to capture the preset short-term dependencies in the signal, and the LSTM part is used to retain the preset long-term time features. In the hybrid recursive neural network, the outputs of different structures are fused, and the classification ability of multi-label ECG signals is improved through weighted averaging.

[0093] Classification output module: Based on the feature extraction and temporal feature capture results, the final multi-label classification results are generated through the attention mechanism and the fully connected layer;

[0094] Specifically, in the classification output module:

[0095] It includes attention layer and fully connected layer. It introduces attention mechanism, calculates the weight of input features and determines the importance of each feature, maps the features processed by attention mechanism to multi-label classification output, and solves the problem of sample category imbalance by using multi-label classification loss function.

[0096] The importance of each feature is determined by calculating the weighted sum of the input features through the attention mechanism. The input features are converted into low-dimensional representations through a linear layer, processed through a Tanh nonlinear activation function, and then generated weight scores through another linear layer. The scores are normalized into probabilities using the softmax function to represent the importance of each feature. The weighted sum of each input feature and its corresponding weight is calculated.

[0097] Focal Loss introduces a regulation factor based on the traditional cross entropy loss, adjusting the loss contribution according to the difficulty of the sample. Focal Loss is calculated by the formula FL(p t )=-α t (1-p t ) γ log(p t ) calculation; where p t is the model's predicted probability for the positive class, α t is the category balance factor, and γ is a tuning parameter used to control the weight reduction of easy-to-classify samples.

[0098] Embodiment 3:

[0099] Embodiment 3 is a preferred example of Embodiment 1, and is used to illustrate the present invention in more detail.

[0100] An automatic multi-label electrocardiogram processing system includes: a preprocessing unit first normalizes the original single-lead ECG data to generate signal segments of uniform length. Then, a feature extraction unit extracts spatial and short-term temporal features using a convolutional layer and a residual block. Then, a temporal feature capture unit further captures long-term and short-term dependency features through a hybrid RNN. Finally, a classification output unit generates a final multi-label classification result through an attention mechanism and a fully connected layer.

[0101] Generate signal segments of uniform length: Signal segments of uniform length help improve the effect of feature extraction. The length difference of variable-length input itself and the possible presence of a large amount of zero padding will affect the quality of feature extraction. Our strategy can ensure that feature extraction always works under optimal conditions.

[0102] Extracting spatial and short-term temporal features: The spatial and short-term temporal features extracted from the signal segments are first reorganized and zero-padded into a feature set of uniform length in the original order. (The reason for this strategy is that RNN is less sensitive to zero padding than CNN, so CNN uses non-zero-padded signal segments when extracting features while RNN uses zero-padded feature sets when extracting features.) Since the convolution kernel and step size settings of the feature extraction unit cannot capture long-range temporal features (such as rhythms in seconds), the temporal feature capture unit is used to additionally extract temporal features.

[0103] The long-term and short-term dependency features are the features mainly based on time information such as rhythm and interval extracted by LSTM in the hybrid RNN. This is the final feature output of the two feature extraction steps and is mapped into the classification results by the classification output unit.

[0104] The preprocessing unit includes the standardization and segmentation of the raw data. The input single-lead ECG data has different lengths and cannot be directly processed in batches. Therefore, the length of all ECG records is first standardized to 20,000 data points (equivalent to 40 seconds) by zero padding or truncation. In order to reduce computational overhead and prevent data loss, the standardized ECG records are segmented, retaining valid segments containing multiple heartbeat signals and discarding all-zero segments. This process not only retains the mutual information between heartbeats, but also reduces the waste of redundant computing resources.

[0105] The feature extraction unit includes a convolutional neural network module and a residual network module; first, the spatial features of the ECG are extracted through the convolution layer. The convolution layer uses multi-scale convolution kernels for feature extraction, including large-scale convolution for long-term dependency features and small-scale convolution for short-term detail features. These convolution operations can not only improve the efficiency of feature extraction, but also reduce computational complexity through dimensionality reduction and feature aggregation. After feature extraction, a multi-layer residual network is used to deeply mine the convolution features. The introduction of the residual module effectively avoids the gradient vanishing problem in the deep network and ensures that the increase in network depth does not lead to performance degradation. In addition, a channel attention mechanism is introduced to improve the network's expressiveness by adjusting the weights of feature channels;

[0106] Specific convolution extraction process: Large-scale convolution uses larger convolution kernels (e.g., longer time windows) to capture long-term dependent features in the signal. Such features usually reflect the global structure of the ECG signal, such as trends and rhythm changes in the overall heartbeat cycle. Large-scale convolution can integrate signals over a longer period of time, helping the model capture relevant information across multiple heartbeats. Small-scale convolution uses smaller convolution kernels (i.e., shorter time windows) to extract short-term detail features in the signal, such as local waveform changes in the electrocardiogram (such as morphological features of P waves, QRS complexes, T waves, etc.). Small-scale convolution focuses on finer, localized signal fluctuations, which helps to identify small abnormal changes or sudden ECG events. Large-scale convolution and small-scale convolution are used in combination to extract diverse features from different time scales. Through this combination, the model can capture both long-term dependent features in the ECG signal and subtle local information, ensuring that the model has a deep understanding of both the global and local features of the signal. The convolution extraction process continuously compresses the feature dimension through layer-by-layer convolution and pooling operations, while retaining important time and frequency information, ultimately providing rich input features for subsequent time feature capture units.

[0107] The multi-layer residual network avoids information loss by introducing skip connections, allowing the network to further mine deep convolutional features while maintaining shallow features. The convolutional layers in each residual block are used to extract features of different scales, gradually refine and fuse multi-level information, and ensure that the model can effectively capture complex spatiotemporal patterns. This structure not only improves the training efficiency of the network, but also enhances the ability to deeply mine convolutional features.

[0108] Specifically, the channel attention mechanism is implemented using the Squeeze-and-Excitation (SE) mechanism. The SE mechanism first "squeezes" each channel through global average pooling to obtain the global features of each channel. Then, the weights of each channel are generated through a two-layer fully connected network, and these weights are applied to the original features to "activate" important channels and suppress unimportant channels. This method can dynamically adjust the importance of channels, thereby improving the network's expressiveness and sensitivity to key information.

[0109] The temporal feature capture unit includes a hybrid recurrent neural network module and feature fusion. In order to further capture the long-term and short-term temporal features of ECG signals, a double-layer bidirectional GRU and a single-layer bidirectional LSTM parallel structure are used. The GRU part is used to capture short-term dependencies in the signal, while the LSTM part is used to retain long-term temporal features. This module solves the problem of gradient vanishing and long-term dependency loss caused by the increase in the depth of the recurrent network through a hybrid structure. In the hybrid recurrent neural network, the outputs of different structures are fused, and the classification ability of multi-label ECG signals is improved through weighted averaging.

[0110] The parallel structure of the two-layer bidirectional GRU and the single-layer bidirectional LSTM is used to capture the long-term and short-term temporal features of the ECG signal. The bidirectional GRU is good at processing short-term dependencies, while the bidirectional LSTM is better at capturing long-term dependency features. By using the two in parallel, the network can capture both short-term and long-term features in the signal, avoid information loss, and achieve more comprehensive feature extraction in terms of temporal dependencies.

[0111] Classification output unit, including attention layer and fully connected layer; introduces attention mechanism to determine the importance of each feature by calculating the weighted sum of input features, so as to better focus on key information related to abnormal heart rhythm. This makes the model perform better when processing ECG records with multiple lesions. Map the features processed by the attention mechanism to multi-label classification output, and solve the problem of sample class imbalance by using multi-label classification loss function (such as Focal Loss);

[0112] The importance of each feature is determined by calculating the weighted sum of the input features through the attention mechanism. First, the input features are converted to a low-dimensional representation through a linear layer, then processed through a Tanh nonlinear activation function, and then generated through another linear layer. Weight scores are then normalized to probabilities using the softmax function to represent the importance of each feature. Finally, the weighted sum of each input feature and its corresponding weight is calculated to highlight key feature information.

[0113] Focal Loss introduces a regulation factor based on the traditional cross entropy loss to adjust the loss contribution according to the difficulty of the sample. Specifically, Focal Loss is calculated by the formula FL(p t )=-α t (1-p t ) γ log(p t ) calculation. Where p t is the model's predicted probability for the positive class, α tis the category balance factor, and γ is a parameter used to control the weight reduction of easy-to-classify samples. This allows the model to pay more attention to difficult-to-classify samples and improves performance on unbalanced data.

[0114] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

[0115] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. An automatic multi-label electrocardiogram processing system, characterized in that: include: Preprocessing module: standardizes the original single-lead ECG data to generate signal segments of uniform length; Feature extraction module: extracts spatial and short-term temporal features using convolutional layers and residual blocks based on signal segments of uniform length; Temporal feature capture module: further captures long-term and short-term dependency features through hybrid RNN; Classification output module: Based on the feature extraction and temporal feature capture results, the final multi-label classification results are generated through the attention mechanism and the fully connected layer.

2. The automatic multi-label electrocardiogram processing system according to claim 1, characterized in that: In the preprocessing module: The process includes standardization and segmentation of the raw data. First, the length of all ECG records is standardized to preset data points by zero padding or truncation. The standardized ECG records are segmented to retain preset valid segments containing multiple heartbeat signals and discard all-zero segments.

3. The automatic multi-label electrocardiogram processing system according to claim 1, characterized in that: In the feature extraction module: It includes a convolutional neural network module and a residual network module; the spatial features of ECG are extracted through the convolution layer; the convolution layer uses multi-scale convolution kernels for feature extraction, including large-scale convolution for presetting long-term dependency features and small-scale convolution for presetting short-term detail features; After feature extraction, a multi-layer residual network is used to mine convolutional features. A channel attention mechanism is introduced to improve the network's expressiveness by adjusting the weights of feature channels. Specific convolution extraction process: The preset large-scale convolution uses a larger convolution kernel to capture the long-term dependency features in the signal, and the preset small-scale convolution uses a smaller convolution kernel to extract the short-term detail features in the signal. The convolution extraction process continuously compresses the feature dimension through layer-by-layer convolution and pooling operations while retaining the preset time and frequency information; The multi-layer residual network introduces skip connections. The convolutional layers in each residual block are used to extract features of different scales, gradually refine and fuse multi-level information; The channel attention mechanism is implemented using the Squeeze-and-Excitation mechanism, which compresses each channel through global average pooling to obtain the global features of each channel; The weights of each channel are generated through a two-layer fully connected network, and these weights are applied to the original features to activate the preset important channels and suppress the preset unimportant channels.

4. The automatic multi-label electrocardiogram processing system according to claim 1, characterized in that: In the time feature capture module: It includes a hybrid recursive neural network module and feature fusion; it adopts a double-layer bidirectional GRU and a single-layer bidirectional LSTM parallel structure. The GRU part is used to capture the preset short-term dependencies in the signal, and the LSTM part is used to retain the preset long-term time features. In the hybrid recursive neural network, the outputs of different structures are fused, and the classification ability of multi-label ECG signals is improved through weighted averaging.

5. The automatic multi-label electrocardiogram processing system according to claim 1, characterized in that: In the classification output module: It includes attention layer and fully connected layer. It introduces attention mechanism, calculates the weight of input features and determines the importance of each feature, maps the features processed by attention mechanism to multi-label classification output, and solves the problem of sample category imbalance by using multi-label classification loss function. The importance of each feature is determined by calculating the weighted sum of the input features through the attention mechanism. The input features are converted into low-dimensional representations through a linear layer, processed through a Tanh nonlinear activation function, and then generated weight scores through another linear layer. The scores are normalized into probabilities using the softmax function to represent the importance of each feature. The weighted sum of each input feature and its corresponding weight is calculated. FocalLoss introduces a regulation factor based on the traditional cross entropy loss, adjusting the loss contribution according to the difficulty of the sample. Focal Loss is calculated by the formula FL(p t )=-α t (1-p t ) γ log(p t ) calculation; where p t is the model's predicted probability for the positive class, α t is the category balance factor, and γ is a tuning parameter used to control the weight reduction of easy-to-classify samples.

6. An automatic multi-label electrocardiogram processing method, characterized in that: include: Step S1: instructing the preprocessing module to perform standardization processing on the original single-lead ECG data to generate signal segments of uniform length; Step S2: Instruct the feature extraction module to extract spatial and short-term temporal features based on signal segments of uniform length using convolutional layers and residual blocks; Step S3: The temporal feature capture module further captures long-term and short-term dependency features through a hybrid RNN; Step S4: Let the classification output module capture the results based on feature extraction and time features, and generate the final multi-label classification results through the attention mechanism and the fully connected layer.

7. The automatic multi-label electrocardiogram processing method according to claim 6, characterized in that: In step S1: In the preprocessing module: The process includes standardization and segmentation of the raw data. First, the length of all ECG records is standardized to preset data points by zero padding or truncation. The standardized ECG records are segmented to retain preset valid segments containing multiple heartbeat signals and discard all-zero segments.

8. The automatic multi-label electrocardiogram processing method according to claim 6, characterized in that: In step S2: In the feature extraction module: It includes a convolutional neural network module and a residual network module; the spatial features of ECG are extracted through the convolution layer; the convolution layer uses multi-scale convolution kernels for feature extraction, including large-scale convolution for presetting long-term dependency features and small-scale convolution for presetting short-term detail features; After feature extraction, a multi-layer residual network is used to mine convolutional features. A channel attention mechanism is introduced to improve the network's expressiveness by adjusting the weights of feature channels. Specific convolution extraction process: The preset large-scale convolution uses a larger convolution kernel to capture the long-term dependency features in the signal, and the preset small-scale convolution uses a smaller convolution kernel to extract the short-term detail features in the signal. The convolution extraction process continuously compresses the feature dimension through layer-by-layer convolution and pooling operations while retaining the preset time and frequency information; The multi-layer residual network introduces skip connections. The convolutional layers in each residual block are used to extract features of different scales, gradually refine and fuse multi-level information; The channel attention mechanism is implemented using the Squeeze-and-Excitation mechanism, which compresses each channel through global average pooling to obtain the global features of each channel; The weights of each channel are generated through a two-layer fully connected network, and these weights are applied to the original features to activate the preset important channels and suppress the preset unimportant channels.

9. The automatic multi-label electrocardiogram processing method according to claim 6, characterized in that: In step S3: In the time feature capture module: It includes a hybrid recursive neural network module and feature fusion; it adopts a double-layer bidirectional GRU and a single-layer bidirectional LSTM parallel structure. The GRU part is used to capture the preset short-term dependencies in the signal, and the LSTM part is used to retain the preset long-term time features. In the hybrid recursive neural network, the outputs of different structures are fused, and the classification ability of multi-label ECG signals is improved through weighted averaging.

10. The automatic multi-label electrocardiogram processing method according to claim 6, characterized in that: In step S4: In the classification output module: It includes attention layer and fully connected layer. It introduces attention mechanism, calculates the weight of input features and determines the importance of each feature, maps the features processed by attention mechanism to multi-label classification output, and solves the problem of sample category imbalance by using multi-label classification loss function. The importance of each feature is determined by calculating the weighted sum of the input features through the attention mechanism. The input features are converted into low-dimensional representations through a linear layer, processed through a Tanh nonlinear activation function, and then generated weight scores through another linear layer. The scores are normalized into probabilities using the softmax function to represent the importance of each feature. The weighted sum of each input feature and its corresponding weight is calculated. FocalLoss introduces a regulation factor based on the traditional cross entropy loss, adjusting the loss contribution according to the difficulty of the sample. Focal Loss is calculated by the formula FL(p t )=-α t (1-p t ) γ log(p t ) calculation; where p t is the model's predicted probability for the positive class, α t is the category balance factor, and γ is a tuning parameter used to control the weight reduction of easy-to-classify samples.

Citation Information

Patent Citations

  • Automatic diagnosis system for depression based on closed-loop speech chain and deep learning

    CN114496221B

Cited By

  • Portable dynamic high-frequency electrocardiogram monitoring method and system

    CN120284282A