Multi-label arrhythmia identification method based on multi-branch residual attention network
By using a multi-branch residual attention network in electrocardiogram signal processing, the problem of low feature extraction and classification efficiency in the prior art is solved, and a high-accuracy arrhythmia recognition effect is achieved.
Patent Information
- Application Number
- CN202411644312.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology has limitations when processing ECG signals. The CNN model lacks the ability to extract multi-scale feature. The LSTM model cannot implement parallel computing due to the sequential dependence, resulting in low training efficiency. The Transformer model has high demand for computing resources and is in long-range ECG. Poor performance during signal processing.
The multi-label arrhythmia recognition method based on the multi-branch residual attention network is adopted, and the ECG signal characteristics of different scales are extracted through the multi-branch feature extraction module, and the feature fusion and classification are performed through the residual attention module. This method combines multi-branch networks and residual attention mechanisms to improve the ability of feature extraction and classification.
The accuracy of multi-label arrhythmia detection is significantly improved, and the electrocardiogram features at different levels are effectively extracted by fusing features with different resolutions, which enhances the feature expression ability of the model, reduces the impact of category imbalance, and improves the accuracy of classification tasks.
Smart Images

Figure CN119498810A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electrocardiogram signal classification, and specifically relates to a multi-label arrhythmia recognition method based on a multi-branch residual attention network. Background Art
[0002] Cardiovascular disease (CVD) is a general term for a series of heart or blood vessel abnormalities and is the leading cause of death worldwide. Arrhythmia is caused by abnormal conduction of electrical signals in the heart, resulting in abnormal changes in heart rhythm, including too fast, too slow or irregular beating. It may cause fainting, chest pain or stroke, and in severe cases can lead to heart failure or sudden death. Electrocardiogram is a very important means to monitor cardiac electrical activity, capture and diagnose arrhythmias. However, ECG signals are complex and changeable, and it is particularly difficult to identify various arrhythmias. Faced with so many patients, even for ECG experts, analyzing ECG signals is time-consuming and laborious. Therefore, computer-assisted methods are needed to reduce the burden on doctors who read the images and reduce the risk of misjudgment due to fatigue and individual differences among doctors.
[0003] At present, researchers have proposed a variety of methods for the problem of arrhythmia detection, mainly including machine learning and deep learning. Machine learning methods require manual feature engineering based on a large amount of expert knowledge. The manual features of different disease characteristics may be slightly different, and the generalization ability of the model is limited. Deep learning methods can automatically extract the features of ECG signals. Most deep learning methods, such as traditional convolutional neural networks (CNN) and long short-term memory networks (LSTM), can also be applied to the processing of sequence data. However, these models have limitations in processing ECG signals: CNN models rely on fixed-structure convolutional layers and lack the ability to extract multi-scale features; although LSTM performs well in time series prediction tasks, it cannot achieve parallel computing due to its sequential dependency characteristics, thus limiting training efficiency.
[0004] In recent years, the Transformer model has attracted attention due to its advantages in extracting contextual information. However, it is still challenging to effectively vectorize complex ECG signals. In addition, due to the high demand for computing resources of the Transformer model, its training efficiency and model performance are difficult to be satisfactory when processing long-range ECG signals. How to design efficient vectorization methods and optimize the application of Transformer in arrhythmia classification tasks is still a difficulty in current research. Summary of the invention
[0005] In order to overcome the shortcomings of the existing technology, the present invention provides a multi-label arrhythmia recognition method based on a multi-branch residual attention network. The method can automatically extract ECG signal features of different scales and automatically identify multiple categories of arrhythmia signals, which helps assist doctors to analyze ECG signals more efficiently.
[0006] The technical solution adopted by the present invention to solve its technical problem is:
[0007] A multi-label arrhythmia recognition method based on a multi-branch residual attention network, the method comprising the following steps:
[0008] Step 1: Preprocessing of ECG signals and labels: Segment the ECG signals in the labeled data set into data segments of fixed length. Signals with different sampling rates need to be resampled to the same sampling rate, and then binarize the labels.
[0009] Step 2: Data preparation and division: shuffle the data by category, and construct training, validation, and test data sets for neural network training in proportion;
[0010] Step 3, constructing a multi-branch residual attention network: inputting the training data set into the multi-branch residual attention network, introducing a multi-branch feature extraction module to extract ECG signal features at different scales, and fusing them, then using the residual attention module to further extract the fused features, and classify them to construct a classification network model;
[0011] Step 4: Model training: The multi-branch residual attention network model is trained and verified by using the constructed training and verification arrhythmia datasets to obtain the optimal arrhythmia classification model of the verification set;
[0012] Step 5, application of the model: In the inference stage, the ECG signal test set is input into the trained model, and the model will output the probability value of each category; according to the preset threshold, the categories greater than the threshold are screened out, and the predicted label is finally determined; and by comparing with the correct label, the accuracy of the model classification is obtained; thus completing the arrhythmia recognition method described in the present invention.
[0013] Furthermore, in step 1, the preprocessing process of the ECG signal and the label is as follows:
[0014] Step 1.1, the applicability of this method is not limited by the specific data set, and is applicable to ECG data sets with various sampling rates, number of categories, and data volumes;
[0015] Step 1.2: The data segmentation length is also not limited. Here, the signal length is set to L. Then the signal is resampled to the specified sampling rate;
[0016] Step 1.3: Each signal segment contains the label annotated by the doctor. The label is binarized. The binarization process is as follows: Each data label generates a corresponding initial zero matrix B i , for the signal x i , if it is labeled as category y j , set the label value of the corresponding category index position to 1;
[0017] B i =[b i1 ,b i2 ,b i3 ,...,b ic ]
[0018]
[0019] Where C represents the total number of categories, Y = {y1,y2,...,y c} represents the possible C tags, B i Indicates the binary label of the i-th data, b ij Indicates that for the i-th data, if its true label is category y j , the corresponding position takes the value of 1, otherwise it takes the value of 0.
[0020] Furthermore, in step 2, the data preparation and division process is as follows: a fixed random seed is set to ensure the reproducibility of the results, the data of each category is shuffled separately to ensure that the data order within each category is random, the training set, validation set, and test set are selected in proportion, and then the training set, validation set, and test set of each category are merged, and then the merged data set is deduplicated, duplicate data is deleted from the training set, and the validation set and test set remain unchanged to obtain the final training set, validation set, and test set.
[0021] Furthermore, in step 3, the process of constructing a multi-branch residual attention network is as follows:
[0022] Step 3.1, the multi-branch network extracts the ECG signal features at different scales and fuses them; the multi-branch feature module includes three branches, each of which includes a one-dimensional convolution layer, a batch normalization layer, a ReLU activation layer, a one-dimensional convolution layer, a batch normalization layer, and a ReLU activation layer. The one-dimensional convolution kernel size used in each branch is 5, 9, and 13 respectively; finally, the connection layer is used to splice and fuse the features in the channel dimension. The expression of this process is,
[0023]
[0024] F concatis the merged feature, where N is the time step or sample length of the feature. C1, C2, and C3 are the number of channels of the three branches, which is equal to the number of filters in the second convolutional layer, 64. The three feature matrices are directly connected in the channel dimension; the number of channels of the result is C1+C2+C3, and the fused features are further input into the residual attention feature extraction module;
[0025] Step 3.2, the residual attention module is composed of four stacked SE_Basic modules of different numbers to achieve the fusion of layer-by-layer feature extraction and channel attention mechanism. The number of SE_Basic modules contained in each stack is 3, 4, 6 and 3, corresponding to the output of 64, 128, 256 and 512 channels respectively. The SE_Basic module combines convolution operation, batch normalization, SE (Squeeze-and-Excitation) module and residual connection mechanism to improve the feature extraction ability and channel adaptability of the network; the whole process first inputs F SE_Basic_in After the first layer of convolution, batch normalization and ReLU activation, the SE module is used to adjust the weight of channel attention and obtain the feature F SE1 ; Then, the output optimized by the SE module is processed again by convolution and batch normalization, and the feature expression is further enhanced by the SE module to obtain F SE2 ; Then, the initial input is added to the features after the second SE module through the residual connection mechanism to form a residual path, and finally the ReLU activation function is used to process the residual output to generate the final result F of this module SE_Basic_out ;
[0026] F SE1 =SE(BN(ReLU(Conv1d(F SE_Basic_in) )))
[0027] F SE2 =SE(BN(Conv1d(F SE1 )))
[0028] F SE_Basic_out =ReLU(F SE2 +F SE_Basic_in )
[0029] F SE_Basic_in is the input feature, F SE1 , F SE2 denotes the features calculated by the SE module, Conv1d(·) denotes one-dimensional convolution, BN(·) denotes batch normalization, ReLU(·) is the ReLU activation function, SE(·) is the Squeeze-and-Excitation attention module, and F SE_Basic_out Represents the output of the SE_Basic module;
[0030] Step 3.4, the process of SE module includes the following steps: First, the input features are globally averaged pooled in the time dimension through the global average pooling layer to generate channel-level feature descriptions. Let the input be F SE_in ∈R N×C , where N represents the time step or sample length, and C is the number of input channels. Subsequently, the pooled features are processed by the first fully connected layer, and the output size is C / r. This layer does not use bias and uses the ReLU activation function; then, after passing through the second fully connected layer, the output is restored to the original number of channels, and the channel-level weights are generated by the Sigmoid activation function; finally, the channel weights generated by the second fully connected layer are multiplied by the input features channel by channel using element-by-element multiplication to obtain the optimized output features. Through this process, the SE module realizes the adaptive enhancement of important features and enhances the feature expression ability of the model;
[0031] Global draw pooling: z∈R C ;
[0032] Fully connected layer 1: z1 = ReLU(W1z),
[0033] Fully connected layer 2: s = Sigmoid(W2z1),
[0034] Channel weighting: Represents element-wise multiplication;
[0035] Step 3.5: The features extracted by the residual attention module are then passed through the global average pooling layer, which performs global average pooling on the time dimension to obtain the average value of each channel and flatten it into a one-dimensional feature vector. The flattened feature vector is input into the fully connected layer, and the output dimension is the number of classification categories. Finally, the Sigmoid activation function is used to generate the probability value of each category.
[0036] In step 4, the training process of the model is as follows:
[0037] Step 4.1: Use the divided training set to input into the arrhythmia classification model, set the learning rate to 0.001, and use the asymmetric loss function to solve the problem of data imbalance. This loss function models the asymmetry of positive and negative samples, which can suppress the influence of negative samples and give higher weights to error-prone positive samples, thereby improving the robustness of the model. The expression of the asymmetric loss function is:
[0038]
[0039] Among them, L asymis an asymmetric loss, N is the number of samples, y i represents the true label of the i-th sample, represents the probability value predicted by the i-th sample, γ + and γ - is the adjustment coefficient for positive and negative categories;.
[0040] Step 4.2: Use the Adam optimizer to update the model weights and save the model with the smallest test loss value in the validation set.
[0041] In step 5, the application process of the model is as follows: in the inference stage, the ECG signal test set is input into the trained model, and the model outputs the probability value of each category; according to the preset threshold, the categories greater than the threshold are screened out as the predicted arrhythmia labels, and then compared with the labels marked by the doctor, the precision and recall rate of each arrhythmia category are obtained.
[0042] The beneficial effects of the present invention are: based on the multi-branch residual attention network, it adapts to the feature extraction and classification requirements of ECG signals, and also significantly improves the accuracy of multi-label arrhythmia detection. The model can first effectively extract ECG features at different levels by fusing features of different resolutions. By combining the residual connection mechanism and the SE module, the adaptive optimization and effective fusion of channel-level features are realized, which significantly improves the feature expression ability of the model. With the help of an asymmetric loss function, the model can adaptively adjust the loss contribution of positive and negative samples, reduce the impact of category imbalance, and improve the accuracy of classification tasks, so that it has significant advantages in multi-label classification and complex signal processing tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 Flowchart of the multi-label arrhythmia recognition method based on multi-branch residual attention network;
[0044] Figure 2 This is the structural diagram of the multi-branch residual attention network;
[0045] Figure 3 Detailed diagram of each module of the multi-branch residual attention network, where (a) is the branch convolution module, (b) is the SE_Basic module, and (c) is the SE_attention mechanism module. DETAILED DESCRIPTION
[0046] The present invention will be further described below in conjunction with the accompanying drawings.
[0047] Reference Figure 1 to Figure 3 , a multi-label arrhythmia recognition method based on multi-branch residual attention network, such as Figure 1 As shown, the method includes:
[0048] Step 1: Collect and read the original ECG signal for preprocessing, segment the ECG data, resample, and binarize the labels; the process is as follows:
[0049] Step 1.1, ECG signal collection: Use Proton's self-built database, including tens of thousands of original ECG data annotated by doctors. Optionally, the acquisition of ECG data signals includes: original ECG signals collected through wearable devices, such as ECG stickers, ECG cards, etc., and Physionet related ECG data sets can also be used;
[0050] Step 1.2: Segment the ECG signal, with each ECG signal segment being 30 seconds long. Then resample the signal to 256 Hz;
[0051] Step 1.3: Binarize the labels. The binarization process is as follows: Generate a corresponding initial zero matrix B i , for the signal x i , if it is labeled as category y j , set the label value of the corresponding category index position to 1;
[0052] B i =[b i1 ,b i2 ,b i3 ,...,b ic ]
[0053]
[0054] Where C represents the total number of categories, Y = {y1,y2,...,y c} represents the possible C labels, where C is 28. B i Indicates the binary label of the i-th data. ij Indicates that for the i-th data, if its true label is category y j , the corresponding position takes the value of 1, otherwise it takes the value of 0;
[0055] Step 2, data preparation and division: Set a fixed random seed of 42 to ensure the reproducibility of the results, shuffle the data of each category separately, ensure that the data order within each category is random, and select the training set, validation set, and test set in the ratio of 8:1:1. Then merge the training set, validation set, and test set of each category; then deduplicate the merged data set, delete duplicate data from the training set, and keep the validation set and test set unchanged to obtain the final training set, validation set, and test set;
[0056] Step 3: Construct a multi-branch residual attention network: The multi-branch residual attention network includes a multi-branch network extraction module and a residual attention module as well as the final global average pooling layer and classification layer, such as Figure 2 As shown, the process is as follows:
[0057] Step 3.1: The multi-branch network extracts the ECG signal features at different scales and fuses them. The multi-branch feature module includes three branches, namely branch 1, branch 2 and branch 3. The detailed structure of the branch is as follows: Figure 3 As shown in (a), each branch includes a one-dimensional convolution layer, a batch normalization layer, a ReLU activation layer, a one-dimensional convolution layer, a batch normalization layer, and a ReLU activation layer. The one-dimensional convolution kernel sizes used in each branch are 5, 9, and 13 respectively. Finally, the connection layer is used to concatenate and fuse the features in the channel dimension. The expression of this process is,
[0058]
[0059] F concat is the merged feature. N is the time step or sample length of the feature, C1, C2, and C3 are the number of channels of the three branches, which is equal to the number of filters in the second convolutional layer, 64. The three feature matrices are directly connected in the channel dimension, and the final number of channels is 192. The fused features are further input into the residual attention feature extraction module;
[0060] Step 3.2: The residual attention module consists of four stacked SE_Basic modules of different numbers to achieve the fusion of layer-by-layer feature extraction and channel attention mechanism. The number of SE_Basic modules contained in each stack is 3, 4, 6, and 3, corresponding to the output of 64, 128, 256, and 512 channels, respectively. The detailed structure of SE_Basic is shown in Figure 3 As shown in (b), this module combines convolution operation, batch normalization, SE (Squeeze-and-Excitation) module and residual connection mechanism to improve the network's feature extraction ability and inter-channel adaptability; the whole process first inputs F SE_Basic_in After the first layer of convolution, batch normalization and ReLU activation, the SE module is used to adjust the weight of channel attention and obtain the feature F SE1 ; Then, the output optimized by the SE module is processed again by convolution and batch normalization, and the feature expression is further enhanced by the SE module to obtain F SE2 ; Then, the initial input is added to the features after the second SE module through the residual connection mechanism to form a residual path, and finally the ReLU activation function is used to process the residual output to generate the final result F of this module SE_Basic_out ;
[0061] F SE1 =SE(BN(ReLU(Conv1d(F SE_Basic_in) )))
[0062] F SE2 =SE(BN(Conv1d(F SE1 )))
[0063] F SE_Basic_out =ReLU(F SE2 +F SE_Basic_in )
[0064] F SE_Basic_in is the input feature, F SE1 , F SE2 denotes the features calculated by the SE module, Conv1d(·) denotes one-dimensional convolution, BN(·) denotes batch normalization, ReLU(·) is the ReLU activation function, SE(·) is the Squeeze-and-Excitation attention module, and F SE_Basic_out Represents the output of the SE_Basic module;
[0065] Step 3.3, SE module such as Figure 3 As shown in (c), the process includes the following steps: First, the input features are globally averaged pooled in the time dimension through the global average pooling layer to generate channel-level feature descriptions; let the input be F SE_in ∈R N×C , where N represents the time step or sample length, and C is the number of input channels. Subsequently, the pooled features are processed by the first fully connected layer, and the output size is C / r, where r is set to 16. This layer does not use bias and uses the ReLU activation function; then, after the second fully connected layer, the output is restored to the original number of channels, and the channel-level weights are generated by the Sigmoid activation function; finally, the channel weights generated by the second fully connected layer are multiplied by the input features channel by channel using element-by-element multiplication to obtain the optimized output features. Through this process, the SE module realizes the adaptive reinforcement of important features and enhances the feature expression ability of the model.
[0066] Global draw pooling: z∈R C ;
[0067] Fully connected layer 1: z1 = ReLU(W1z),
[0068] Fully connected layer 2: s = Sigmoid(W2z1),
[0069] Channel weighting: Represents element-wise multiplication;
[0070] Step 3.4: The features extracted by the residual attention module are then passed through the global average pooling layer, which performs global average pooling on the time dimension to obtain the average value of each channel and flatten it into a one-dimensional feature vector. The flattened feature vector is input into the fully connected layer, and the output dimension is the number of categories. Finally, the Sigmoid activation function is used to generate the probability value of each category;
[0071] Step 4: Model training: The multi-branch residual attention network model is trained and verified by using the constructed training and verification arrhythmia datasets to obtain the optimal arrhythmia classification model of the verification set. The process is as follows:
[0072] Step 4.1: Use the divided training set to input into the arrhythmia classification model, set the learning rate to 0.001, and use the asymmetric loss function to solve the problem of data imbalance. This loss function models the asymmetry of positive and negative samples, which can suppress the influence of negative samples and give higher weights to error-prone positive samples, thereby improving the robustness of the model. The expression of the asymmetric loss function is:
[0073]
[0074] Among them, L asym is an asymmetric loss, N is the number of samples, y i represents the true label of the i-th sample, represents the probability value predicted by the i-th sample, γ + and γ - is the adjustment coefficient for the positive and negative categories.
[0075] Step 4.2: Use the Adam optimizer to update the model weights, update the model weights and learning rate, and save the model with the smallest test loss value in the validation set;
[0076] Step 5, application of the model: In the inference stage, the ECG signal test set is input into the trained model, and the model will output the probability value of each category; according to the preset threshold, the categories greater than the threshold are screened out, and the predicted label is finally determined; and by comparing with the correct label, the accuracy of the model classification is obtained; thus completing the arrhythmia recognition method described in the present invention.
[0077] In this embodiment, according to a preset threshold, categories greater than the threshold are screened out as predicted arrhythmia labels, where the threshold is set to 0.5; then the precision and recall of each arrhythmia category are obtained by comparing and calculating with the labels marked by the doctor.
[0078] The contents described in the embodiments of this specification are merely enumerations of implementation forms of the inventive concept and are for illustrative purposes only. The protection scope of the present invention should not be considered to be limited to the specific forms described in this embodiment, and the protection scope of the present invention also extends to equivalent technical means that can be thought of by ordinary technicians in this field based on the inventive concept.
Claims
1. A multi-label arrhythmia recognition method based on a multi-branch residual attention network, characterized in that: The method comprises the following steps: Step 1: Preprocessing of ECG signals and labels: Segment the ECG signals in the labeled data set into data segments of fixed length. Signals with different sampling rates need to be resampled to the same sampling rate, and then binarize the labels. Step 2: Data preparation and division: shuffle the data by category, and construct training, validation, and test data sets for neural network training in proportion; Step 3, constructing a multi-branch residual attention network: inputting the training data set into the multi-branch residual attention network, introducing a multi-branch feature extraction module to extract ECG signal features at different scales, and fusing them, then using the residual attention module to further extract the fused features, and classify them to construct a classification network model; Step 4: Model training: The multi-branch residual attention network model is trained and verified by using the constructed training and verification arrhythmia datasets to obtain the optimal arrhythmia classification model of the verification set; Step 5, application of the model: In the inference stage, the ECG signal test set is input into the trained model, and the model will output the probability value of each category; according to the preset threshold, the categories greater than the threshold are screened out, and the predicted label is finally determined; and by comparing with the correct label, the accuracy of the model classification is obtained; thus completing the arrhythmia recognition method described in the present invention.
2. The multi-label arrhythmia recognition method based on a multi-branch residual attention network as claimed in claim 1, characterized in that In step 1, the preprocessing process of the ECG signal and the label is as follows: Step 1.1, the applicability of this method is not limited by the specific data set, and is applicable to ECG data sets with various sampling rates, number of categories, and data volumes; Step 1.2: The data segmentation length is also not limited. Here, the signal length is set to L, and then the signal is resampled to the specified sampling rate. Step 1.3: Each signal segment contains the label annotated by the doctor. The label is binarized. The binarization process is as follows: Each data label generates a corresponding initial zero matrix B i , for the signal x i , if it is labeled as category y j , set the label value of the corresponding category index position to 1; B i =[b i1 ,b i2 ,b i3 ,...,b ic ] Where C represents the total number of categories, Y = {y1,y2,...,y c } represents the possible C tags, B i Indicates the binary label of the i-th data, b ij Indicates that for the i-th data, if its true label is category y j , the corresponding position takes the value of 1, otherwise it takes the value of 0.
3. The multi-label arrhythmia recognition method based on a multi-branch residual attention network as described in claim 1 or 2, characterized in that: In step 2, the data preparation and division process is as follows: a fixed random seed is set to ensure the reproducibility of the results, the data of each category is shuffled separately to ensure that the data order within each category is random, the training set, validation set, and test set are selected in proportion, and then the training set, validation set, and test set of each category are merged, and then the merged data set is deduplicated, duplicate data is deleted from the training set, and the validation set and test set remain unchanged to obtain the final training set, validation set, and test set.
4. The multi-label arrhythmia recognition method based on a multi-branch residual attention network according to claim 1 or 2, characterized in that: In step 3 above, the process of constructing a multi-branch residual attention network is as follows: Step 3.1, the multi-branch network extracts the ECG signal features at different scales and fuses them; the multi-branch feature module includes three branches, each of which includes a one-dimensional convolution layer, a batch normalization layer, a ReLU activation layer, a one-dimensional convolution layer, a batch normalization layer, and a ReLU activation layer. The one-dimensional convolution kernel size used in each branch is 5, 9, and 13 respectively; finally, the connection layer is used to splice and fuse the features in the channel dimension. The expression of this process is, F concat is the merged feature, where N is the time step or sample length of the feature, C1, C2, and C3 are the number of channels of the three branches, which is equal to the number of filters in the second convolutional layer, 64. The three feature matrices are directly connected in the channel dimension; the number of channels of the result is C1+C2+C3, and the fused features are further input into the residual attention feature extraction module; Step 3.2, the residual attention module is composed of four stacked SE_Basic modules of different numbers to achieve the fusion of layer-by-layer feature extraction and channel attention mechanism; the number of SE_Basic modules contained in each stack is 3, 4, 6 and 3, corresponding to the output of 64, 128, 256 and 512 channels respectively. The SE_Basic module combines convolution operation, batch normalization, SE module and residual connection mechanism to improve the feature extraction ability and channel adaptability of the network; the whole process first inputs F SE_Basic_in After the first layer of convolution, batch normalization and ReLU activation, the SE module is used to adjust the weight of channel attention and obtain the feature F SE1 ; Then, the output optimized by the SE module is processed again by convolution and batch normalization, and the feature expression is further enhanced by the SE module to obtain F SE2 ; Then, the initial input is added to the features after the second SE module through the residual connection mechanism to form a residual path, and finally the ReLU activation function is used to process the residual output to generate the final result F of this module SE_Basic_out ; F SE1 =SE(BN(ReLU(Conv1d(F SE_Basic_in) ))) F SE2 =SE(BN(Conv1d(F SE1 ))) F SE_Basic_out =ReLU(F SE2 +F SE_Basic_in ) F SE_Basic_in is the input feature, F SE1 , F SE2 denotes the features calculated by the SE module, Conv1d(·) denotes one-dimensional convolution, BN(·) denotes batch normalization, ReLU(·) is the ReLU activation function, SE(·) is the Squeeze-and-Excitation attention module, and F SE_Basic_out Represents the output of the SE_Basic module; Step 3.4, the process of SE module includes the following steps: First, the input features are globally averaged pooled in the time dimension through the global average pooling layer to generate channel-level feature descriptions; let the input be F SE_in ∈R N×C , where N represents the time step or sample length, and C is the number of input channels. Subsequently, the pooled features are processed by the first fully connected layer, and the output size is C / r. This layer does not use bias and adopts the ReLU activation function; then, after passing through the second fully connected layer, the output is restored to the original number of channels, and the channel-level weights are generated by the Sigmoid activation function; finally, the channel weights generated by the second fully connected layer are multiplied by the input features channel by channel using the element-by-element multiplication method to obtain the optimized output features; through this process, the SE module realizes the adaptive enhancement of important features and enhances the feature expression ability of the model; Global draw pooling: z∈R C ; Fully connected layer 1: z1 = ReLU(W1z), Fully connected layer 2: s = Sigmoid(W2z1), Channel weighting: Represents element-wise multiplication; Step 3.5: The features extracted by the residual attention module are then passed through the global average pooling layer, which performs global average pooling on the time dimension to obtain the average value of each channel and flatten it into a one-dimensional feature vector. The flattened feature vector is input into the fully connected layer, and the output dimension is the number of classification categories. Finally, the Sigmoid activation function is used to generate the probability value of each category.
5. The multi-label arrhythmia recognition method based on a multi-branch residual attention network as claimed in claim 4, characterized in that: In step 4, the training process of the model is as follows: Step 4.1: Use the divided training set to input into the arrhythmia classification model, set the learning rate to 0.001, and use the asymmetric loss function to solve the problem of data imbalance. This loss function models the asymmetry of positive and negative samples, which can suppress the influence of negative samples and give higher weights to error-prone positive samples, thereby improving the robustness of the model. The expression of the asymmetric loss function is: Among them, L asym is an asymmetric loss, N is the number of samples, y i represents the true label of the i-th sample, represents the probability value predicted by the i-th sample, γ + and γ - is the adjustment coefficient for positive and negative categories; Step 4.2: Use the Adam optimizer to update the model weights and save the model with the smallest test loss value in the validation set.
6. The multi-label arrhythmia recognition method based on a multi-branch residual attention network according to claim 1 or 2, characterized in that: In step 5, during the application of the model, the categories with a value greater than the threshold are screened out according to a preset threshold as the predicted arrhythmia labels, and then the precision and recall of each arrhythmia category are obtained by comparing and calculating with the labels marked by the doctor.
Citation Information
Patent Citations
Wearable electrocardiogram monitoring and arrhythmia remote real-time diagnosis device for multiple scenes
CN110916647A
Method and device for generating heart beat classification result
CN111126350A
Analysis method and device for electrocardiogram QRST waveform, medium and electrocardiograph
CN112869753A
Electrocardiosignal real-time classification method, device and readable storage medium
CN114041800A
Multi-lead multi-scale electrocardiogram detection method and system based on deep learning
CN114587376A
Cited By
Structural damage identification method and system based on improved channel attention mechanism and one-dimensional convolutional neural network
CN120316593A
Emotion recognition method and device, electronic equipment and storage medium
CN120354210A
Mine dust concentration image recognition method based on prior features and multi-kernel residual attention network
CN121170535A
Weak supervision robust multi-label identification method for multi-source twelve-lead electrocardiogram
CN122531769A