A method for arrhythmia detection based on deep residual network
By processing ECG signals through a deep residual network, extracting ECG features using masking vectors and channel attention convolutional networks, and combining gated recurrent units and label embedding learning, the problem of low arrhythmia detection accuracy in existing technologies is solved, and ECG data analysis that better adapts to different patients and pathological conditions is achieved.
Patent Information
- Application Number
- CN202410825431.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2044-06-25
AI Technical Summary
Existing arrhythmia detection methods cannot effectively capture the temporal dynamic information of ECG signals, resulting in low detection accuracy. Traditional preprocessing methods are difficult to adapt to the physiological differences and complex pathological characteristics of different patients, and ignore the multi-label correlation between different ECG abnormalities.
An arrhythmia detection method based on a deep residual network is adopted. By introducing a masking vector to process the ECG heartbeat sequence, the channel attention convolutional network and the gated recurrent unit are used to extract complex pathological ECG features, and the arrhythmia-specific features are captured through label-related embedding learning. Multi-layer perceptron is combined for multi-label classification.
The model's adaptability to ECG signals of different lengths is improved, complex pathological features are captured, the diagnostic capability of ECG data for different patients and pathological conditions is enhanced, and the detection accuracy and clinical diagnostic performance are improved.
Smart Images

Figure CN118806293B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for detecting arrhythmia based on a deep residual network. Background Art
[0002] Arrhythmia is a general term for symptoms such as irregular, rapid, or slow heartbeats caused by abnormalities in the heart's electrical conduction system. With the aging of the population and changes in lifestyle, the incidence of arrhythmias is rapidly increasing, with a trend of younger and increasing prevalence. Clinically, arrhythmias can be divided into two main categories based on the site of occurrence: supraventricular (including sinus, atrial, and atrioventricular junctional) and ventricular arrhythmias. Under normal circumstances, the heart's beat is controlled by electrical signals, which propagate through the heart's tissues, triggering its contraction and relaxation. When these electrical signals become abnormal, arrhythmias can result.
[0003] ECG signals record electrical activity over a period of time, providing important information for detecting arrhythmias. Chinese patent application CN116369933A discloses an arrhythmia detection method based on a fusion of a lightweight convolutional neural network and a Transformer. ECG signals are first collected and preprocessed through resampling, segmentation, and normalization to generate an ECG data set. A backbone CNN is constructed using hourglass blocks, and hyperparameters are introduced to build an arrhythmia feature extraction network. Finally, an arrhythmia classification network is constructed using a Transformer model and a feedforward neural network (FFN).
[0004] Chinese patent application CN115530788A discloses a method for arrhythmia classification based on a self-attention mechanism. First, the collected ECG signal data is preprocessed using a wavelet transform to remove baseline drift and noise. A multi-head self-attention arrhythmia classification network is constructed, including an ECG vector representation layer, a linear interval projection layer, a signal sequence encoding layer, a multi-head self-attention calculation layer, a normalization layer, and an ECG signal output layer. An arrhythmia classification algorithm based on the multi-head self-attention mechanism is designed, and the arrhythmia classification network is trained to classify ECG signals.
[0005] The above-mentioned traditional preprocessing methods for ECG signals generally use resampling, segmentation, and normalization. Excessive preprocessing may make it difficult for the model to adapt to the signal changes of real data during both training and testing stages. For example, excessive normalization may make the model unable to adapt to the physiological differences between patients. The effect of wavelet transform preprocessing of ECG signals depends largely on the selected wavelet basis. Different wavelet bases are suitable for different types of signals. Wavelet transform may produce undesirable boundary effects at the boundaries of the signal, which may cause artifacts at the beginning and end of the signal. The computational complexity of wavelet transform is high, especially for continuous wavelet transform.
[0006] Existing arrhythmia detection methods are unable to capture the temporal dynamics of ECG signals, which affects detection accuracy. ECG signals may differ from patient to patient, which may be affected by factors such as age, gender, and physiological status. A patient may experience more than one arrhythmia at the same time, that is, an ECG record may be associated with multiple types of arrhythmias. Traditional ECG signal feature extraction methods cannot well represent complex pathological ECG signal features. Most previous studies have focused on the ECG classification of multiple types of arrhythmias, treating each arrhythmia independently and ignoring the multi-label correlation between different ECG abnormalities. Summary of the Invention
[0007] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a method for detecting arrhythmias based on deep residual networks that can learn more abstract and complex features, thereby better responding to electrocardiogram data of different patients and different pathological conditions.
[0008] The object of the present invention is to achieve the following technical solution: a method for detecting arrhythmia based on a deep residual network, comprising the following steps:
[0009] Step 1: ECG signal preprocessing: The PhysioNet Challenge dataset is used as the training set, and the data is preprocessed using one-hot encoding.
[0010] The ECG heartbeat sequence in the training set is recorded as X = [x1, x2, ..., x t ,…,x K ] T , where x t represents the heartbeat information of time step t, K represents the length of the heartbeat sequence, and T represents the matrix transpose; the masking vector M is introduced to process invalid heartbeat sequences, M=(m1,…,m t ,…,m K ) T ∈R K , m t Represents the masking value of time step t; the masked ECG heartbeat sequence is recorded as It is expressed as follows:
[0011]
[0012] Among them, m t =1 means the corresponding ECG heartbeat information is valid, otherwise means except m t =1, in all other cases, * means discarding invalid heartbeat information;
[0013] Step 2: Extract complex pathological ECG features using a channel-attention convolutional network and a gated recurrent unit: First, a channel-attention convolutional network is used to extract and optimize ECG features. Then, a gated recurrent unit is used to learn the heartbeat sequence feature representation, and complex pathological ECG features are hierarchically extracted through multi-layer gated recurrent units with residual connections.
[0014] Step 3: Embedding learning for multi-label arrhythmia classification: Based on the co-occurrence counts of arrhythmias in the training set and conditional probability, a label correlation matrix is established in a data-driven manner. Then, based on the label correlation matrix and similarity measurement method, a multi-layer perceptron is used to obtain the optimal arrhythmia classification label correlation embedding set.
[0015] Step 4: Weight the arrhythmia feature vector by the label-aware attention coefficient;
[0016] Step 5: Arrhythmia classification: The weighted vector is fed into the convolutional and fully connected layers to obtain the final arrhythmia prediction probability.
[0017] The beneficial effects of the present invention are:
[0018] (1) Introducing masking vectors to process ECG heartbeat sequences helps improve the model's adaptability to ECG signals of different lengths;
[0019] (2) Capturing the dependencies of label embeddings to guide the feature extraction module to learn arrhythmia-specific features, thereby improving clinical diagnostic performance;
[0020] (3) The deep residual network effectively simulates the temporal dynamics of continuous electrocardiogram (ECG) data and extracts more clinically meaningful complex pathological feature representations, which helps to better capture and analyze the complex features in ECG signals and improve the diagnostic capabilities of different pathological conditions. The residual connection allows the gradient in the deep multi-layer recurrent neural network (RNN) to be effectively propagated, thereby improving the network's representation ability. This ensures that the model can learn more abstract and complex features, thereby better handling ECG data from different patients and different pathological conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 Flowchart of the arrhythmia detection method based on deep residual network of the present invention;
[0022] Figure 2 Design diagram for the convolutional channel attention network module;
[0023] Figure 3 Design graphs for deep residual networks;
[0024] Figure 4 Design diagram of GRU with residual connection. DETAILED DESCRIPTION
[0025] The present invention proposes a method for detecting arrhythmias based on a deep residual network. First, a gated recurrent unit (GRU) is used to encode the temporal dynamics of the original ECG beat, and a multi-layer gated recurrent unit with residual connections is used to hierarchically extract the complex pathological feature representation of the ECG signal. A label-related embedding learning method is introduced to effectively identify multi-label arrhythmias and explore the correlation between electrocardiogram (ECG) abnormalities. The feature extraction module is guided to learn arrhythmia-specific features by capturing the dependency of label embeddings. Finally, the attention fusion module identifies the hidden state vector corresponding to the diagnostically prominent ECG signal features to form an attention representation for improving the arrhythmia detection method. The technical solution of the present invention is further illustrated below in conjunction with the accompanying drawings.
[0026] like Figure 1 As shown, a method for detecting arrhythmia based on a deep residual network of the present invention includes the following steps:
[0027] Step 1. ECG signal preprocessing: The PhysioNet Challenge dataset is used as the training set. The PhysioNet Challenge dataset consists of 2,322,513 ECG records from 1,676,384 different patients. The dataset contains 6 types of abnormal heart rhythm and 1 type of normal heart rhythm. The 6 abnormal types are 1st degree atrioventricular (AV) block (1dAVb), right bundle branch block (RBBB), left bundle branch block (LBBB), sinus bradycardia (SB), atrial fibrillation (AF), and sinus tachycardia (ST). The data is preprocessed using one-hot encoding, and the 1 type of normal heart rhythm and the 6 types of abnormal heart rhythm are encoded using o i The normal heart rhythm type is represented by o i =[1,0,0,0,0,0,0], first-degree atrioventricular block is represented by o i =[0,1,0,0,0,0,0], right bundle branch block is represented by o i =[0,0,1,0,0,0,0], left bundle branch block is represented by o i =[0,0,0,1,0,0,0], sinus bradycardia is represented by o i =[0,0,0,0,1,0,0], atrial fibrillation is represented by o i =[0,0,0,0,0,1,0], atrial fibrillation is represented by o i =[0,0,0,0,0,0,1].
[0028] The ECG heartbeat sequence in the training set is recorded as X = [x1, x2, ..., x t ,…,xK ] T ∈R K , where x t represents the heartbeat information of time step t, K represents the length of the heartbeat sequence, and T represents the matrix transpose; since the ECG heartbeat sequence X contains a variety of noise effects (such as baseline drift, environmental interference, muscle movement noise, etc.), which brings some invalid heartbeat sequences, the present invention introduces a masking vector M to process invalid heartbeat sequences, M = (m1,…,m t ,…,m K ) T ∈R K , m t Represents the masking value of the time step t; M is the same size as X and is used to mark a valid heartbeat sequence or an invalid heartbeat sequence; the masked ECG heartbeat sequence is recorded as It is expressed as follows:
[0029]
[0030] Among them, m t =1 means the corresponding ECG heartbeat information is valid, otherwise means except m t =1, in all other cases, * means discarding invalid heartbeat information;
[0031] Step 2: Use channel-attention convolutional networks and gated recurrent units to extract complex pathological ECG features: First, use the channel-attention convolutional network to extract and optimize ECG features, highlighting important ECG feature parts; then, use gated recurrent units to learn heartbeat sequence feature representation, and use multi-layer gated recurrent units with residual connections to hierarchically extract complex pathological ECG features.
[0032] The specific implementation method of step 2 is:
[0033] Step 21: Use channel attention convolutional network to extract ECG features: the channel attention convolutional network includes multi-layer convolutional channel attention module, global pooling layer and normalization layer; Figure 2 The design of a channel-attention convolutional network is presented in [1]. The multi-layer convolutional channel attention (CMC) module extracts and optimizes ECG features. Global pooling and normalization layers stabilize the module's ECG feature extraction process, reducing training time and memory consumption. Three convolutional channel attention modules are used to mitigate the adverse effects of imbalanced classification of arrhythmia samples and avoid overfitting.
[0034] The convolutional channel attention module consists of three parts: a one-dimensional convolution layer, a Mish activation function layer, and a channel attention function layer. The overall structure of the convolutional channel attention module is as follows:
[0035]
[0036] Among them, Conv1D represents a one-dimensional convolutional layer, in which the characteristic information of the input one-dimensional ECG signal is extracted through a sliding window; then the Mish activation function is applied. The nonlinear characteristics of the Mish activation function can smooth the model gradient flow during training while improving the model's expressive ability. The Mish activation function is Tanh is the hyperbolic tangent function; finally, the channel attention function ChannelAttention is used to highlight the important ECG feature parts; after the convolution channel attention module, the ECG heartbeat sequence is recorded as
[0037]
[0038] will sequence Input the global pooling layer, perform global average pooling and global maximum pooling on all channels, aggregate the spatial information in the ECG heartbeat features through global average pooling and global maximum pooling, and generate two different semantic information sets: F avg and F max :
[0039]
[0040]
[0041] These sets are then sent to a weight-sharing multilayer perceptron (MLP) to learn the importance of ECG heartbeat sequence features and the channel correlation relationship. After adding the two semantic information passed by the multilayer perceptron, the sigmoid activation function is applied to normalize them to obtain the channel attention score:
[0042]
[0043] Among them, σ is the Sigmoid activation function, Score channel attention;
[0044] Finally, based on the attention score, the channel attention information is merged with the original ECG heartbeat sequence features using the dot product operation:
[0045]
[0046] In this way, the original ECG heartbeat sequence features are re-weighted, and the utilization of basic channel information is enhanced. It is defined as the electrocardiogram feature after convolution channel attention module, global maximum pooling, global average pooling and weighted optimization, denoted as ⊙ represents element-by-element multiplication, It means element-by-element addition;
[0047] Step 22: Learn ECG heartbeat representation from continuous ECG data through the first gated recurrent unit: Encoded by the first gated recurrent unit as a hidden vector where d h Indicates the encoding size, such as Figure 3 The details are as follows:
[0048] The Gated Recurrent Unit (GRU) consists of two important gates, the reset gate (s) and the update gate (z), which are used to regulate the flow of information. The calculation of the GRU at time step t is as follows:
[0049]
[0050] where h t and h t-1 denote the hidden state vectors at time steps t and t-1, respectively, represents the candidate hidden state. σ(·) is the sigmoid activation function, tanh is the hyperbolic tangent activation function, and ⊙ represents element-wise multiplication. W rh 、W zh 、W cr is the cyclic weight matrix, w ri 、w zi 、w ci is the weight vector (the matrix in the residual gated recurrent unit (GRU) layer), b r 、b z 、b c is the bias vector. is the ECG feature after convolutional channel attention module, global maximum pooling, average pooling and weighted optimization, t∈{1,2,…,K}. The GRU unit has fewer trainable parameters and lower computational complexity, which can produce better generalization results.
[0051] Step 23: Use a multi-layer gated recurrent unit with residual connections to extract complex pathological features of the electrocardiogram (ECG) to obtain a feature vector A deep residual network is composed of multiple layers of GRU with residual connections, such as Figure 3 As shown in the dotted box. The structure of the residual GRU is as follows Figure 4 As shown, at time step t, the residual layer is l, l∈{1,2,…,L}, where L represents the total number of residual layers in the gated recurrent unit (GRU), and its formula is as follows:
[0052]
[0053] Where Q lrepresents the gated recurrent unit (GRU) function (7)-(10), corresponding to the weight matrix W [l] , generates the current hidden vector There are two inputs in the function and is the current remaining input, which comes from the output of the reset gate s, is the hidden vector of the previous time step. Using skip connection, and Add element by element to obtain the output residual vector The vector is then fed back to the next layer (l+1) of the gated recurrent unit (GRU) with a residual connection.
[0054] The deep residual recurrent neural network model is designed by stacking multiple GRUs with residual connection blocks in sequence. The output of the previous layer forms the input of the next layer. The output of the last layer of residual GRU modules can be calculated as:
[0055]
[0056] Will Recorded as le is the position on the feature dimension, le = 1, 2,…, Le, and Le is the length of the feature.
[0057] Step 3, embedding learning for multi-label classification of arrhythmias: In clinical practice, each electrocardiogram record may be associated with many arrhythmias. There is an inherent dependency between different arrhythmias, which plays a vital role in automatic electrocardiogram diagnosis. It is crucial to explore the relationship between different arrhythmias and apply it to multi-label electrocardiogram diagnosis. Based on the number of co-occurrences of arrhythmias in the training set and conditional probability, the present invention establishes a label correlation matrix in a data-driven manner. The conditional probability represents the conditional probability of a secondary arrhythmia (type 2) occurring after an arrhythmia (type 1) occurs. Then, based on the label correlation matrix and the similarity measurement method, the optimal arrhythmia classification label correlation embedding set is obtained through a multi-layer perceptron (MLP).
[0058] The specific implementation method of step 3 is: count the number of co-occurrences of arrhythmia pairs and establish a label correlation matrix; each element of the label correlation matrix is represented by a conditional probability:
[0059] p i,j (d i |d j ) = u(d i , d j ) / u(d j ) (14)
[0060] Where, u(d i ,d j ) is arrhythmia d i and d j Co-occurrence times (d i and d j Represents different types of arrhythmias. By counting their co-occurrence times and conditional probabilities, a label correlation matrix can be established to analyze the correlation between different types of arrhythmias). j ) indicates arrhythmia j The number of occurrences, p i,j (d i |d j ) indicates arrhythmia j Arrhythmia occurs i probability;
[0061] In the label correlation matrix, rare co-occurring arrhythmia pairs may be noise. Therefore, a nonlinear reweighting method is introduced to process the label correlation matrix to remove noise and retain the details of the label relationship:
[0062]
[0063] Among them, P[i][j] is the element in the i-th row and j-th column of the final label correlation matrix used for label embedding, τ is the threshold of noise filtering, For the rescaling parameter, ε is set to 1×10 -6 , C represents the number of arrhythmia types;
[0064] To obtain label dependencies, a multi-layer perceptron (MLP) is used to multi-hot encode each arrhythmia type. i Mapped to the semantic embedding space, the label embedding e is obtained i :
[0065] e i = Φ(o i ) (16)
[0066] Among them, i represents the multi-hot encoding of arrhythmia types, Φ represents the multilayer perceptron;
[0067] Combine all label embeddings to get the optimal arrhythmia classification label related embedding set Ch is the number of channels; the cosine similarity metric is used to represent the degree of dependency of different label embeddings; the cosine similarity matrix of the label embedding set E is defined as:
[0068]
[0069] Where ‖*‖ represents the modulo operation of the vector, G[i][j] is the element in the i-th row and j-th column of the cosine similarity matrix of the label embedding set E;
[0070] The goal of label embedding is to make the cosine similarity matrix of the label embedding set close to the label correlation matrix; therefore, the optimized loss function is defined as:
[0071]
[0072] Step 4: Weight the arrhythmia feature vector by using the label-aware attention coefficient; the specific implementation method is: by calculating the feature vector The embedding vector e associated with the label c The cosine similarity at the feature position le is used to obtain the label-aware attention coefficient of the feature dimension. As shown below:
[0073]
[0074] Among them, le is the position on the feature dimension, le=1,2,…,Le, Le is the length of the feature; c=1,2,…,C, e c Represents the label-related embedding vector, ReLU represents the activation function, T represents the matrix transpose, and the label-aware attention coefficient is normalized:
[0075]
[0076] Use the normalized attention coefficient to perform weighted superposition on the feature vectors of class C arrhythmia:
[0077]
[0078] in, is the weighted feature vector of type C arrhythmia, le is the position on the feature dimension, le=1,2,…,Le, Le is the length of the feature; c=1,2,…,C, C represents the number of arrhythmia types, is the normalized label-aware attention coefficient, is the output feature vector of the last layer of residual gated recurrent unit (GRU) module.
[0079] Step 5: Arrhythmia classification: weighted vector The convolutional and fully connected layers are fed to obtain the final arrhythmia prediction probability for class C, as shown below:
[0080]
[0081] Among them, w c and b are weight coefficients and bias parameters, σ is the Sigmoid activation function, To predict the probability of class C arrhythmia, the Conv operation is a 1×1 convolution operation used to match the superposition operation, and its parameters can be learned during the training process.
[0082] Step 6. Loss optimization: The objective loss function of the model consists of two parts: prediction loss and label embedding training loss. For prediction loss, the traditional binary cross entropy loss is used for multi-label ECG diagnosis. Considering the imbalance of training samples, a weight factor β is introduced that is proportional to the number of ECG samples of class c arrhythmia. c The weighted binary cross entropy loss function is expressed as:
[0083]
[0084] Where N is the number of samples, c = 1, 2, ..., C, and C is the number of arrhythmia types. c represents the weight factor, n c is the number of samples of type c arrhythmia, represents the probability that sample i is predicted to be arrhythmia class C, y i,c represents the true label of sample i.
[0085] For label embedding training loss, the loss function is
[0086] The overall target loss function is expressed as the weighted sum of the above two terms: Loss = Loss p +λLoss e , where λ is a trade-off parameter, Loss e is the label embedding loss.
[0087] To optimize the network model, the Adam adaptive learning rate optimization method is used. This method can automatically adjust the learning rate according to the actual situation, thereby improving training efficiency.
[0088] During the training process, an early stopping condition is set: if the loss on the validation set does not decrease or starts to increase in several consecutive training rounds, training is stopped early. This can effectively prevent the model from overfitting.
[0089] The present invention ignores the ECG features of invalid time steps by applying a masking vector to the input of the gated recurrent unit (GRU), which helps to improve the adaptability of the model to ECG signals of different lengths. A deep residual network is used to effectively simulate the temporal dynamics of continuous electrocardiogram (ECG) data, and by using a stacked structure design of the gated recurrent unit (GRU), it focuses on detecting important ECG features and extracting more clinically significant complex pathological feature representations. A label-dependent embedding learning method is introduced to effectively identify multi-label arrhythmias and explore the correlation between ECG abnormalities. A dual-attention hybrid network is constructed for arrhythmia classification under sample imbalance, which focuses on both local and global ECG information.
[0090] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and it should be understood that the scope of protection of the present invention is not limited to such specific descriptions and embodiments. Those skilled in the art can make various other specific variations and combinations based on the technical teachings disclosed in the present invention without departing from the essence of the present invention, and such variations and combinations are still within the scope of protection of the present invention.
Claims
1. A method for detecting arrhythmia based on a deep residual network, characterized in that: The steps include: Step 1: ECG signal preprocessing: The PhysioNet Challenge dataset is used as the training set, and the data is preprocessed using one-hot encoding. The ECG heartbeat sequence in the training set is recorded as X = [x1, x2, ..., x t ,…,x K ] T ∈R K , where x t represents the heartbeat information of time step t, K represents the length of the heartbeat sequence, and T represents the matrix transpose; the masking vector M is introduced to process invalid heartbeat sequences, M=(m1,…,m t ,…,m K ) T ∈R K , m t Represents the masking value of time step t; the masked ECG heartbeat sequence is recorded as It is expressed as follows: Among them, m t =1 means the corresponding ECG heartbeat information is valid, otherwise means except m t =1, in all other cases, * means discarding invalid heartbeat information; Step 2: Extract complex pathological ECG features using channel-attention convolutional networks and gated recurrent units: First, use channel-attention convolutional networks to extract and optimize ECG features; A channel attention convolutional network is used to extract ECG features: the channel attention convolutional network consists of a multi-layer convolutional channel attention module, a global pooling layer, and a normalization layer; The convolutional channel attention module consists of three parts: a one-dimensional convolution layer, a Mish activation function layer, and a channel attention function layer. The overall structure of the convolutional channel attention module is as follows: Among them, Conv1D represents a one-dimensional convolutional layer, in which the feature information of the input one-dimensional ECG signal is extracted through a sliding window; then the Mish activation function is applied; finally, the channel attention function ChannelAttention is used to highlight the important ECG feature parts; Then, the gated recurrent unit is used to learn the heartbeat sequence feature representation, and complex pathological ECG features are hierarchically extracted through multi-layer gated recurrent units with residual connections; Step 3: Embedding learning for multi-label arrhythmia classification: Count the co-occurrence counts of arrhythmia pairs and establish a label correlation matrix. Based on the co-occurrence counts of arrhythmias in the training set and conditional probability, a data-driven label correlation matrix is established. Then, based on the label correlation matrix and similarity metrics, a multi-layer perceptron is used to obtain the optimal arrhythmia classification label correlation embedding set. Multi-layer perceptron was used to multi-hot encode each arrhythmia type. i Mapped to the semantic embedding space, the label embedding e is obtained i : and i = Φ(o i ) (16) Where Φ represents a multilayer perceptron; Combine all label embeddings to get the optimal arrhythmia classification label related embedding set Ch is the number of channels; the cosine similarity metric is used to represent the degree of dependency of different label embeddings; the goal of label embedding is to make the cosine similarity matrix of the label embedding set close to the label correlation matrix; Step 4: Weight the arrhythmia feature vector by label-aware attention coefficient; calculate the feature vector The embedding vector e associated with the label c The cosine similarity at the feature position le is used to obtain the label-aware attention coefficient of the feature dimension. Step 5: Arrhythmia classification: The weighted vector is fed into the convolutional and fully connected layers to obtain the final arrhythmia prediction probability.
2. The arrhythmia detection method based on deep residual network according to claim 1, characterized in that: The specific implementation method of step 2 is: Step 21: After the convolution channel attention module, the ECG heartbeat sequence is recorded as will sequence Enter the global pooling layer, perform global average pooling and global maximum pooling on all channels, and generate two different semantic information sets: F avg and F max : These sets are then sent to a weight-sharing multilayer perceptron to learn the importance of ECG heartbeat sequence features and the correlation between channels. After adding the two semantic information passed by the multilayer perceptron, the Sigmoid activation function is applied to normalize them to obtain the channel attention score: Among them, σ is the Sigmoid activation function, Score channel attention; Finally, based on the attention score, the channel attention information is merged with the original ECG heartbeat sequence features using the dot product operation: in It is defined as the electrocardiogram feature after convolution channel attention module, global maximum pooling, global average pooling and weighted optimization, denoted as ⊙ represents element-by-element multiplication, It means element-by-element addition; Step 22: Learn ECG heartbeat representation from continuous ECG data through the first gated recurrent unit: Encoded by the first gated recurrent unit into a hidden vector h t , t∈{1,2,…,K}, where d h Indicates the encoding size; Step 23: Use a multi-layer gated recurrent unit with residual connections to extract ECG complex pathological features and obtain a feature vector 3. The arrhythmia detection method based on deep residual network according to claim 2, characterized in that: The specific implementation method of step 3 is: each element of the label correlation matrix is represented by a conditional probability: p i,j (d i |d j )=u(d i ,d j ) / u(d j ) (14) Where, u(d i ,d j ) is arrhythmia d i and d j Co-occurrence count, u(d j ) indicates arrhythmia j The number of occurrences, p i,j (d i |d j ) indicates arrhythmia j Arrhythmia occurs i probability; A nonlinear reweighting method is introduced to process the label correlation matrix to remove noise and retain the details of the label relationship: Among them, P[i][j] is the element in the i-th row and j-th column of the final label correlation matrix used for label embedding, τ is the threshold of noise filtering, For the rescaling parameter, ε is set to 1×10 -6 , C represents the number of arrhythmia types; The cosine similarity matrix of the label embedding set E is defined as: Where ‖*‖ represents the modulo operation of the vector, G[i][j] is the element in the i-th row and j-th column of the cosine similarity matrix of the label embedding set E; The goal of label embedding is to make the cosine similarity matrix of the label embedding set close to the label correlation matrix; therefore, the optimized loss function is defined as:
4. The arrhythmia detection method based on deep residual network according to claim 3, characterized in that: The specific implementation method of step 4 is: label perception attention coefficient As shown below: Among them, le is the position on the feature dimension, le=1,2,…,Le, Le is the length of the feature; c=1,2,…,C, e c Represents the label-related embedding vector, ReLU represents the activation function, T represents the matrix transpose, and the label-aware attention coefficient is normalized: Use the normalized attention coefficient to perform weighted superposition on the feature vectors of class C arrhythmia: in, is the weighted feature vector of type C arrhythmia, le is the position on the feature dimension, le=1,2,…,Le, Le is the length of the feature; c=1,2,…,C, C represents the number of arrhythmia types, is the normalized label-aware attention coefficient, is the output feature vector of the last layer of residual gated recurrent unit module.
Citation Information
Patent Citations
Arrhythmia classification method based on self-attention mechanism
CN115530788A
Lightweight convolutional neural network and Transform fusion-based arrhythmia detection method
CN116369933A
Apparatus for Detecting Arrhythmia by Using Attention Mechanism
KR102437349B1
KR20190141326A