Electrocardiosignal classification system based on residual grouping attention pyramid network

By combining Residual Grouped Attention Pyramid Network (RSPNet) with Depthwise Separable Convolution and Tversky-Focus Combination Loss Function (TFCLF), the problems of insufficient feature extraction, noise interference, and class imbalance in ECG signal classification are solved, thereby improving classification accuracy and robustness.

CN122004882APending Publication Date: 2026-05-12HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HARBIN INST OF TECH
Filing Date
2026-01-30
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing ECG signal classification technologies face problems such as insufficient feature extraction, noise interference, and class imbalance, resulting in low classification accuracy.

Method used

We employ a residual grouped attention pyramid network (RSPNet) combined with depthwise separable convolution and dilated convolution, and use the Tversky-Focus Combination Loss Function (TFCLF) to enhance feature representation and robustness, thereby mitigating class imbalance.

Benefits of technology

It improves the accuracy and robustness of ECG signal classification and provides a more efficient and reliable intelligent diagnostic solution for arrhythmias.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122004882A_ABST
    Figure CN122004882A_ABST
Patent Text Reader

Abstract

The invention discloses an electrocardiosignal classification system based on a residual packet attention pyramid network, belongs to the technical field of biomedical signal processing and artificial intelligence, and particularly relates to the electrocardiosignal classification system based on the residual packet attention pyramid network. The objective of the invention is to solve the problem of low electrocardiosignal classification accuracy caused by insufficient feature extraction, noise interference and class imbalance in electrocardiogram intelligent classification in the existing research. The invention discloses an electrocardiosignal classification system based on a residual grouping attention pyramid network. The electrocardiosignal classification system comprises an electrocardiosignal data acquisition module, an electrocardiosignal sequence acquisition module, a standardized electrocardiosignal sequence acquisition module, a recurrence plot conversion module, a training set and test set acquisition module, an RSPNet network model construction module, a trained RSPNet network model acquisition module and a prediction module. The RSPNet network model is a residual packet attention pyramid network model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of biomedical signal processing and artificial intelligence technology, specifically relating to an electrocardiogram signal classification system based on residual grouped attention pyramid network. Background Technology

[0002] Cardiac arrhythmia is a common and serious cardiovascular disease, and early detection and accurate diagnosis are crucial for reducing mortality. Electrocardiography (ECG), as the gold standard for clinical diagnosis, reflects changes in cardiac electrical activity; however, manual analysis is inefficient, subjective, and prone to misdiagnosis and missed diagnosis. With the development of deep learning, computer-aided diagnosis is gradually becoming an important direction for arrhythmia identification.

[0003] Existing research has made significant progress in ECG intelligent classification, but still faces three major challenges: (1) Insufficient feature extraction: ECG signals have nonlinear and non-stationary characteristics, and traditional methods are difficult to capture their complex dynamic features; (2) Noise interference: noise such as power frequency, electromyography, and baseline drift during the acquisition process affects the robustness of the model; (3) Class imbalance: There are far more normal heartbeats than abnormal heartbeats, and the model is prone to overfitting the majority class and ignoring the minority class.

[0004] To address these issues, researchers have proposed various improved methods based on time-frequency transformation, attention mechanisms, feature pyramid networks, and adversarial generation, but these methods still fall short in terms of noise resistance and generalization performance. Summary of the Invention

[0005] The purpose of this invention is to address the problems of insufficient feature extraction, noise interference, and class imbalance in existing research on intelligent electrocardiogram (ECG) classification, which lead to low accuracy in ECG signal classification. Therefore, this invention proposes an ECG signal classification system based on a residual grouped attention pyramid network.

[0006] An electrocardiogram (ECG) signal classification system based on a residual grouped attention pyramid network includes:

[0007] The module includes: ECG data acquisition module, ECG sequence acquisition module, standardized ECG sequence acquisition module, recursive graph conversion module, training set and test set acquisition module, RSPNet network model construction module, trained RSPNet network model acquisition module, and prediction module.

[0008] The RSPNet network model is a residual grouped attention pyramid network model.

[0009] The electrocardiogram (ECG) data acquisition module is used to acquire ECG data;

[0010] The ECG sequence acquisition module is used to segment the ECG data to obtain... Each ECG sequence and its corresponding label;

[0011] The standardized ECG sequence acquisition module is used to standardize each ECG sequence to obtain each standardized ECG sequence and a corresponding label for each ECG sequence.

[0012] The recursive graph conversion module is used to convert each standardized electrocardiogram sequence to obtain each two-dimensional image;

[0013] The training set acquisition module is used to... Each two-dimensional image and its corresponding label are segmented into a training set and a test set;

[0014] The RSPNet network model building module is used to build the RSPNet network model;

[0015] The module for acquiring the trained RSPNet network model is used to obtain the data matrix from the training set. Input an RSPNet network model, and the RSPNet network model outputs a category label matrix corresponding to the data matrix. Continue until the loss function converges to obtain the trained RSPNet network model.

[0016] The prediction module is used to obtain each test sample to be tested in the test set. Each test sample Input the trained RSPNet network model, and the trained RSPNet network model will output the class label corresponding to each test sample.

[0017] The beneficial effects of this invention are as follows:

[0018] This invention proposes a Residual-based Spatial PoolingAttention Pyramid Network (RSPNet), which combines depthwise separable convolution, dilated convolution, and the Tversky-Focused Combination Loss Function (TFCLF) to enhance feature representation, improve robustness, and alleviate class imbalance, providing a more efficient and reliable technical solution for intelligent diagnosis of arrhythmias. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating the overall implementation of the present invention;

[0020] Figure 2 This invention provides a diagram illustrating the central beat segmentation process of the arrhythmia classification model.

[0021] Figure 3This invention converts ECG heart rate samples into a recursive graph.

[0022] Figure 4 A schematic diagram of the RSPNet network architecture proposed in this invention is shown. Detailed Implementation

[0023] Specific Implementation Method 1: This implementation method provides an electrocardiogram signal classification system based on a residual grouping attention pyramid network, which includes:

[0024] The module includes: ECG data acquisition module, ECG sequence acquisition module, standardized ECG sequence acquisition module, recursive graph conversion module, training set and test set acquisition module, RSPNet network model construction module, trained RSPNet network model acquisition module, and prediction module.

[0025] The RSPNet network model is a Residual Split-Attention Pyramid Network.

[0026] The electrocardiogram (ECG) data acquisition module is used to acquire ECG data;

[0027] The ECG sequence acquisition module is used to segment the ECG data to obtain... Each ECG sequence and its corresponding label;

[0028] The standardized ECG sequence acquisition module is used to standardize each ECG sequence to obtain each standardized ECG sequence and a corresponding label for each ECG sequence.

[0029] The recursive graph conversion module is used to convert each standardized electrocardiogram sequence to obtain each two-dimensional image;

[0030] The training set acquisition module is used to... Each two-dimensional image and its corresponding label are segmented into a training set and a test set;

[0031] The RSPNet network model building module is used to build the RSPNet network model;

[0032] The module for acquiring the trained RSPNet network model is used to obtain the data matrix from the training set. Input an RSPNet network model, and the RSPNet network model outputs a category label matrix corresponding to the data matrix. Continue until the loss function converges to obtain the trained RSPNet network model.

[0033] The prediction module is used to obtain each test sample to be tested in the test set. Each test sample Input the trained RSPNet network model, and the trained RSPNet network model will output the class label corresponding to each test sample.

[0034] Specific Implementation Method Two: This implementation method differs from Specific Implementation Method One in that the ECG sequence acquisition module is used to segment the ECG data to obtain... Each ECG sequence and its corresponding label;

[0035] The specific process is as follows:

[0036] 11) Use an electrocardiogram (ECG) acquisition device (ECG machine or 24-hour Holter monitor) to record ECG sampling data of different subjects. The recording time for each ECG sampling data should be greater than 10 seconds.

[0037] 12) Label the recorded ECG sampling data of different subjects with category labels;

[0038] The arrhythmia classification method based on the AMMI standard was adopted, with the categories being normal heartbeat, supraventricular ectopic beat, ventricular ectopic beat, fusion beat, and unknown.

[0039] The other steps and parameters are the same as in Specific Implementation Method 1.

[0040] Specific Implementation Method Three: This implementation method differs from Specific Implementation Method One or Two in that: the ECG sequence acquisition module is used to segment the ECG sampling data to obtain... Each ECG sequence and its corresponding tag; the specific process is as follows:

[0041] 21) Obtain the R-peak position and the corresponding category label for each ECG sampling data;

[0042] 22) Select 149 sampling points before and 150 sampling points after the R peak of each ECG sampling data, for a total of 300 sampling points, as an ECG sequence.

[0043] Other steps and parameters are the same as in specific implementation method one or two.

[0044] Specific Implementation Method Four: This implementation method differs from Specific Implementation Methods One to Three in that: the standardized ECG sequence acquisition module is used to standardize each ECG sequence to obtain a standardized ECG sequence; the specific process is as follows:

[0045] Using the Z-score standardization method, the first... A single electrocardiogram (ECG) sequence is converted into a vector with a mean of zero and a standard deviation of 1. ;

[0046] The formula for calculating the Z-score using the normalization method is as follows:

[0047] (1)

[0048] in, Indicates the first One electrocardiogram sequence, Represents the standardized first One electrocardiogram sequence, and The first ECG sequence The mean and standard deviation.

[0049] The other steps and parameters are the same as those in one of the specific implementation methods one to three.

[0050] Specific Implementation Method Five: This implementation method differs from Specific Implementation Methods One to Four in that the recursive graph conversion module is used to convert each standardized ECG sequence to obtain a two-dimensional image (one ECG sequence corresponds to one image); the specific process is as follows:

[0051] 1) Using time-delay embedding, each ECG sequence is... Mapped to Phase space, The mapped phase space central electrical sequence state vector Defined as:

[0052] (2)

[0053] (3)

[0054] (4)

[0055] in, Represents the mapped phase space central electrical sequence The state vector; include , and ;

[0056] Represents the mapped phase space center electrical sequence The first-dimensional state vector; Represents the mapped phase space center electrical sequence The second-dimensional state vector; Represents the mapped phase space center electrical sequence The third-dimensional state vector;

[0057] Represents the state vector of the th One sampling point, Represents the state vector of the th One sampling point, Represents the state vector of the th One sampling point, State vector The Middle One sampling point;

[0058] This indicates a total of 300 sampling points. Indicates the time delay of the sampling point; Indicates sampling point ;

[0059] middle , middle and middle Constitutes the central electrical sequence of phase space The first point ;

[0060] middle , middle and middle Constitutes the central electrical sequence of phase space The second point ;

[0061] middle , middle and middle Constitutes the central electrical sequence of phase space The third point ;

[0062] middle , middle and middle Constitutes the central electrical sequence of phase space The 298th point ;

[0063] 2) Calculate the phase space center electrical sequence in phase space. The first point With the second point distance ;

[0064] Calculate the central electrical sequence of phase space any two points and Distance between ,get One distance; Indicates the first One point; Indicates the first One point;

[0065] ; ;

[0066] The phase space center electrical sequence The The point and the first Distance between points Defined as:

[0067] (5)

[0068] 3) Based on the preset threshold and distance Construct each ECG sequence The corresponding recursion matrix ; indicates as:

[0069] (6)

[0070] in, Represents the first recursive matrix The first ECG sequence corresponding to the Line 1 Column elements;

[0071] This represents the recursion threshold, used to control the density of recursion points;

[0072] Represents the phase space center electrical sequence The The point and the first The distance between points;

[0073] 4) Each ECG sequence The corresponding recursion matrix Convert to a two-dimensional image; the specific process is as follows:

[0074] The black dots in the image represent electrocardiogram (ECG) sequences. The Points and the Points Similar in phase space; The white dots in the image represent electrocardiogram (ECG) sequences. The Points and the Points They are not similar in phase space.

[0075] An electrocardiogram (ECG) sequence is a one-dimensional time series, with values ​​representing the lead voltage amplitude at ordered time points. To fully utilize the advantages of deep neural networks (DNNs) in two-dimensional image feature extraction while preserving the dynamic characteristics and detailed information of ECG signals, this invention employs the Recurrence Plot (RP) method to transform the one-dimensional ECG sequence into a two-dimensional image representation.

[0076] The other steps and parameters are the same as in any of the specific implementation methods one to four.

[0077] Specific Implementation Method Six: This implementation method differs from Specific Implementation Methods One to Five in that: the training set acquisition module is used to... Each two-dimensional image and its corresponding label are segmented into a training set and a test set;

[0078] 51) According to Judgment of two-dimensional images and their corresponding labels Number of categories corresponding to each two-dimensional image , Indicates the total number of categories;

[0079] 52) Order , Indicates category , ;

[0080] 53) will In the ECG sequence belonging to the number The electrocardiogram sequences of each category were randomly divided into 10 groups;

[0081] The electrocardiogram sequences in each group belong to the same classification category;

[0082] The electrocardiogram sequences in the 10 groups are completely different from each other;

[0083] All ECG sequences of the same category in the same group are spliced ​​together in random order to form a complete ECG sequence data;

[0084] Will belong to the The first nine groups out of 10 in each category are used as the training set, and the tenth group is used as the test set;

[0085] 54) Order Repeat step 53 until... This yields a training set and a test set, where the number of groups in the training set is... The number of test sets is .

[0086] The other steps and parameters are the same as those in any of the specific implementation methods one to five.

[0087] Specific Implementation Method Seven: This implementation method differs from Specific Implementation Methods One to Six in that the RSPNet network model construction module is used to construct the RSPNet network model;

[0088] The specific process is as follows:

[0089] 61) Construct the RSPNet network model; the specific process is as follows:

[0090] The RSPNet network model includes:

[0091] First Convolutional layer, second Convolutional layer, third Convolutional layer, fourth max pooling layer, fifth DRSN module, sixth DRSN module, seventh Convolutional layer, eighth DRSN module, ninth Convolutional layer, 10th DRSN module, 11th Convolutional layer, twelfth Convolutional layer, thirteenth Convolutional layer, fourteenth double upsampling, fifteenth Convolutional layer, sixteenth double upsampling, seventeenth Convolutional layer, 18th double upsampling, 19th Convolutional layer, 20th global average pooling layer, 21st flattening layer, 22nd fully connected layer, 23rd softmax activation function layer, 24th output layer;

[0092] 62) The working process of the RSPNet network model is as follows:

[0093] The training set is input sequentially into the first... Convolutional layer, second Convolutional layer, third Convolutional layer, fourth max pooling layer, output features of the fourth max pooling layer ;

[0094] Output features of the fourth max pooling layer Input to the fifth DRSN module, the fifth DRSN module outputs features ;

[0095] The fifth DRSN module output features Input to the sixth DRSN module, output features from the fifth DRSN module ;

[0096] The fifth DRSN module output features Enter the seventh Convolutional layer, seventh Convolutional layer output features ;

[0097] The fifth DRSN module output features Input to the eighth DRSN module, the eighth DRSN module outputs features ;

[0098] The fifth DRSN module output features Enter the ninth Convolutional layer, ninth Convolutional layer output features ;

[0099] The output characteristics of the eighth DRSN module Input to the 10th DRSN module, the 10th DRSN module outputs features ;

[0100] The output characteristics of the eighth DRSN module Enter the eleventh Convolutional layer, eleventh Convolutional layer output features ;

[0101] Output characteristics of the tenth DRSN module Enter the twelfth number in sequence. Convolutional layer, thirteenth Convolutional layer, fourteenth upsampling, fourteenth upsampling output features ;

[0102] Fourteenth double upsampling output feature and the eleventh Convolutional layer output features By adding elements one by one, we can obtain the features. ;

[0103] feature Enter the fifteenth number in sequence. Convolutional layer, sixteenth upsampling, sixteenth upsampling output features ;

[0104] Sixteenth double upsampling output feature and the Ninth Convolutional layer output features By adding elements one by one, we can obtain the features. ;

[0105] feature Enter the seventeenth number in sequence. Convolutional layer, 18th upsampling, 18th upsampling output features ;

[0106] Eighteenth double upsampling output feature and the seventh Convolutional layer output features By adding elements one by one, we can obtain the features. ;

[0107] feature Enter the nineteenth one in sequence The system consists of a convolutional layer, a 20th global average pooling layer, a 21st flattening layer, a 22nd fully connected layer, and a 23rd softmax activation function layer. The 23rd softmax activation function layer outputs probability values, which are then output through the 24th output layer.

[0108] The other steps and parameters are the same as those in one of the specific implementation methods one to six.

[0109] Specific Implementation Method Eight: This implementation method differs from Specific Implementation Methods One to Seven in that: the fifth DRSN module, the sixth DRSN module, and the seventh DRSN module... The specific working process of each DRSN module in the convolutional layer and the eighth DRSN module is as follows:

[0110] Given the size of the input feature map , The number of channels in the feature map. The width of the feature map, The height of the feature map;

[0111] First, the number of channels in the feature map is divided into... Groups, each group has 10 channels. ;

[0112] Then, divide each group into There are branches, and the number of feature map channels in each branch is . ;

[0113] No. Group feature map Represented as the first The branch to the first The sum of the feature maps of each branch has a size of ,Right now:

[0114] (7)

[0115] in, , Indicates the first Feature maps of each branch;

[0116] For the Feature map of each branch First through a Convolution yields features Figure 1 ,feature Figure 1 The number of channels is Low-dimensional features; then features Figure 1 Through a Depth-separable convolution yields features Figure 2 ,feature Figure 2 The number of channels is ;feature Figure 2 As the output feature map of each branch;

[0117] Each group of The output feature maps of each branch are jointly input into the group attention module, and the output size of the group attention module is [value missing]. Feature map ;

[0118] Will Feature maps corresponding to the group Adding them together, we get a value of Feature map;

[0119] Subsequently, the size is The feature map is obtained through a The convolution kernel restores the feature map to a size of [size missing]. Finally, the size is equal to the initially given size. The input feature maps are concatenated to obtain the final output feature map of each DRSN module.

[0120] The other steps and parameters are the same as those in any of the specific implementation methods one to seven.

[0121] Specific Implementation Method Nine: This implementation method differs from Specific Implementation Methods One through Eight in that: the step of grouping each group of The output feature maps of each branch are jointly input into the group attention module, and the output size of the group attention module is [value missing]. Feature map ;

[0122] The specific process is as follows:

[0123] Each group Each branch output channel The feature map is ;

[0124] Each group All branches output feature maps Perform element-wise addition, and then input the sum into a global average pooling layer; the global average pooling layer outputs the first element. Group Channel eigenvectors ;

[0125] eigenvectors The input layers are sequentially a fully connected layer, a batch normalized (BN) layer, and a ReLU activation function layer. The output dimension of the ReLU activation function layer is... The compressed vector;

[0126] The compressed vector is sequentially input into a fully connected layer and a Softmax activation function layer, and the weight vector of each channel of the compressed vector is calculated. The importance of different channels is dynamically adjusted.

[0127] Each branch feature map is associated with its corresponding channel weight. Multiply, we get The results of each branch; Adding the results of the nth branch together, we get the nth branch. Feature maps after group fusion ;No. Feature maps after group fusion The calculation formula is:

[0128] (8)

[0129] in, Indicates the first Group 1 Channel fusion characteristics Indicates the first Group 1 Branch in the Channel weights, Indicates the first Group 1 The branch Channel characteristics;

[0130] Channel-level weights are calculated using global context information and the Softmax operation. The formula is as follows:

[0131]

[0132] in, This represents a mapping function used to map the global context vector. This is converted into channel weights for each branch. For the first The context vector obtained after global average pooling.

[0133] The other steps and parameters are the same as those in one of the specific implementation methods one to eight.

[0134] Specific Implementation Method Ten: This implementation method differs from Specific Implementation Methods One through Nine in that: the trained RSPNet network model acquisition module is used to obtain the data matrix from the training set. Input an RSPNet network model, and the RSPNet network model outputs a category label matrix corresponding to the data matrix. Continue until the loss function converges to obtain the trained RSPNet network model.

[0135] The specific process is as follows:

[0136] Data matrix from the training set Input an RSPNet network model, and the RSPNet network model outputs a category label matrix corresponding to the data matrix. Continue until the loss function converges to obtain the trained RSPNet network model.

[0137] The loss function is the Tversky-Focus Combination Loss Function. ;

[0138] Tversky-Focus Combination Loss Function It is composed of a weighted combination of the Tversky Loss (TL) and the Focal Loss (FL); expressed as:

[0139] (9)

[0140] in, Indicates the combined weight coefficient; Represents the Tversky loss function; Represents the focus loss function;

[0141] This invention proposes a Tversky-Focus Combination Loss Function (TFCL), which dynamically adjusts parameters. By flexibly combining the advantages of Tversky Loss and Focal Loss, a balance can be achieved between false positives and false negatives, and greater attention can be paid to hard-to-classify samples, thus having a significant effect on alleviating class imbalance problems.

[0142] Among them, the Tversky loss function Defined as:

[0143] (10)

[0144] in, This represents the prediction results of the RSPNet network model; One-hot encoding representing the actual label;

[0145] Corresponding to a true positive (TP). and These correspond to false positives (FP) and false negatives (FN), respectively.

[0146] parameter and Used to control the severity of penalties for false positives and false negatives;

[0147] To prevent the denominator from being zero, this invention uses the Tversky loss function. Add smoothing factors to the numerator and denominator respectively ,Pick ;

[0148] Tversky Loss measures the similarity between model predictions and true values ​​using the ratios of TP, FP, and FN. Originally designed for segmentation tasks, it also has the potential to be transferred to classification tasks. When transferring to classification, the core formula of Tversky Loss remains unchanged: the prediction result for each sample can be viewed as a "pixel" prediction in segmentation, the model output is the class probability distribution, and the true label is represented by one-hot encoding. By adjusting TP, FP, and FN to sample-level statistics, Tversky Loss can be naturally transferred to classification tasks.

[0149] Tversky Loss adjusts parameters and It can flexibly adjust the model's attention to false positives and false negatives, achieving a balance between precision and recall, thereby alleviating the problem of class imbalance;

[0150] Among them, the focus loss function The class imbalance problem is solved by increasing the model's attention to minority class samples, defined as:

[0151] (11)

[0152] in, This represents the predicted probability of the model. A balancing factor representing the sample categories, used to adjust the weights of positive and negative samples; This is a modulating factor used to reduce the contribution of easily classified samples to the loss.

[0153] It helps improve the identification of minority samples, but it lacks the ability to flexibly regulate the impact of false positives and false negatives.

[0154] The other steps and parameters are the same as those in any of the specific implementation methods one to nine.

[0155] This invention may have other embodiments. Without departing from the spirit and essence of this invention, those skilled in the art can make various corresponding changes and modifications according to this invention, but these corresponding changes and modifications should all fall within the protection scope of the appended claims.

Claims

1. A classification system for electrocardiogram signals based on residual grouped attention pyramid networks, characterized in that: The system includes: The module includes: ECG data acquisition module, ECG sequence acquisition module, standardized ECG sequence acquisition module, recursive graph conversion module, training set and test set acquisition module, RSPNet network model construction module, trained RSPNet network model acquisition module, and prediction module. The RSPNet network model is a residual grouped attention pyramid network model. The electrocardiogram (ECG) data acquisition module is used to acquire ECG data; The ECG sequence acquisition module is used to segment the ECG data to obtain... Each ECG sequence and its corresponding label; The standardized ECG sequence acquisition module is used to standardize each ECG sequence to obtain each standardized ECG sequence and a corresponding label for each ECG sequence. The recursive graph conversion module is used to convert each standardized electrocardiogram sequence to obtain each two-dimensional image; The training set acquisition module is used to... Each two-dimensional image and its corresponding label are segmented into a training set and a test set; The RSPNet network model building module is used to build the RSPNet network model; The module for acquiring the trained RSPNet network model is used to obtain the data matrix from the training set. Input an RSPNet network model, and the RSPNet network model outputs a category label matrix corresponding to the data matrix. Continue until the loss function converges to obtain the trained RSPNet network model. The prediction module is used to obtain each test sample to be tested in the test set. Each test sample Input the trained RSPNet network model, and the trained RSPNet network model will output the class label corresponding to each test sample.

2. The ECG signal classification system based on residual grouped attention pyramid network according to claim 1, characterized in that: The ECG sequence acquisition module is used to segment the ECG data to obtain... Each ECG sequence and its corresponding label; The specific process is as follows: 11) Use an electrocardiogram (ECG) signal acquisition device to record ECG sampling data of different subjects. The recording time for each ECG sampling data should be greater than 10 seconds. 12) Label the recorded ECG sampling data of different subjects with category labels; The arrhythmia classification method based on the AMMI standard was adopted, with the categories being normal heartbeat, supraventricular ectopic beat, ventricular ectopic beat, fusion beat, and unknown.

3. The ECG signal classification system based on residual grouped attention pyramid network according to claim 2, characterized in that: The ECG sequence acquisition module is used to segment the ECG sampling data to obtain... Each ECG sequence and its corresponding label; The specific process is as follows: 21) Obtain the R-peak position and the corresponding category label for each ECG sampling data; 22) Select 149 sampling points before and 150 sampling points after the R peak of each ECG sampling data, for a total of 300 sampling points, as an ECG sequence.

4. The ECG signal classification system based on residual grouped attention pyramid network according to claim 3, characterized in that: The standardized ECG sequence acquisition module is used to standardize each ECG sequence to obtain a standardized ECG sequence; the specific process is as follows: Using the Z-score standardization method, the first... A single electrocardiogram (ECG) sequence is converted into a vector with a mean of zero and a standard deviation of 1. ; The formula for calculating the Z-score using the normalization method is as follows: (1) in, Indicates the first One electrocardiogram sequence, Represents the standardized first One electrocardiogram sequence, and The first ECG sequence The mean and standard deviation.

5. The ECG signal classification system based on residual grouped attention pyramid network according to claim 4, characterized in that: The recursive graph conversion module is used to convert each standardized ECG sequence to obtain a two-dimensional image; the specific process is as follows: 1) Each ECG sequence Mapped to Phase space, The mapped phase space central electrical sequence state vector Defined as: (2) (3) (4) in, Represents the mapped phase space center electrical sequence The state vector; include , and ; Represents the mapped phase space center electrical sequence The first-dimensional state vector; Represents the mapped phase space center electrical sequence The second-dimensional state vector; Represents the mapped phase space center electrical sequence The third-dimensional state vector; Represents the state vector of the th One sampling point, Represents the state vector of the th One sampling point, Represents the state vector of the th One sampling point, State vector The Middle One sampling point; This indicates a total of 300 sampling points. Indicates the time delay of the sampling point; Indicates sampling point ; middle , middle and middle Constitutes the central electrical sequence of phase space The first point ; middle , middle and middle Constitutes the central electrical sequence of phase space The second point ; middle , middle and middle Constitutes the central electrical sequence of phase space The third point ; middle , middle and middle Constitutes the central electrical sequence of phase space The 298th point ; 2) Calculate the phase space center electrical sequence in phase space. The first point With the second point distance ; Calculate the central electrical sequence of phase space any two points and Distance between ,get One distance; Indicates the first One point; Indicates the first One point; ; ; The phase space center electrical sequence The The point and the first Distance between points Defined as: (5) 3) Based on the preset threshold and distance Construct each ECG sequence The corresponding recursion matrix ; indicates as: (6) in, Represents the first recursive matrix The first ECG sequence corresponding to the Line 1 Column elements; Indicates the recursive threshold; Represents the phase space center electrical sequence The The point and the first The distance between points; 4) Each ECG sequence The corresponding recursion matrix Convert to a two-dimensional image; the specific process is as follows: The black dots in the image represent electrocardiogram (ECG) sequences. The Points and the Points Similar in phase space; The white dots in the image represent electrocardiogram (ECG) sequences. The Points and the Points They are not similar in phase space.

6. The ECG signal classification system based on residual grouped attention pyramid network according to claim 5, characterized in that: The training set acquisition module is used to... Each two-dimensional image and its corresponding label are segmented into a training set and a test set; 51) According to Judgment of two-dimensional images and their corresponding labels Number of categories corresponding to each two-dimensional image , Indicates the total number of categories; 52) Order , Indicates category , ; 53) will In the ECG sequence belonging to the number The electrocardiogram sequences of each category were randomly divided into 10 groups; The electrocardiogram sequences in each group belong to the same classification category; The electrocardiogram sequences in the 10 groups are completely different from each other; All ECG sequences of the same category in the same group are spliced ​​together in random order to form a complete ECG sequence data; Will belong to the The first nine groups out of 10 in each category are used as the training set, and the tenth group is used as the test set; 54) Order Repeat step 53 until... This yields a training set and a test set, where the number of groups in the training set is... The number of test sets is .

7. The ECG signal classification system based on residual grouped attention pyramid network according to claim 6, characterized in that: The RSPNet network model building module is used to build the RSPNet network model; The specific process is as follows: 61) Construct the RSPNet network model; the specific process is as follows: The RSPNet network model includes: First Convolutional layer, second Convolutional layer, third Convolutional layer, fourth max pooling layer, fifth DRSN module, sixth DRSN module, seventh Convolutional layer, eighth DRSN module, ninth Convolutional layer, 10th DRSN module, 11th Convolutional layer, twelfth Convolutional layer, thirteenth Convolutional layer, fourteenth double upsampling, fifteenth Convolutional layer, sixteenth double upsampling, seventeenth Convolutional layer, 18th double upsampling, 19th Convolutional layer, 20th global average pooling layer, 21st flattening layer, 22nd fully connected layer, 23rd softmax activation function layer, 24th output layer; 62) The working process of the RSPNet network model is as follows: The training set is input sequentially into the first... Convolutional layer, second Convolutional layer, third Convolutional layer, fourth max pooling layer, output features of the fourth max pooling layer ; Output features of the fourth max pooling layer Input to the fifth DRSN module, the fifth DRSN module outputs features ; The fifth DRSN module output features Input to the sixth DRSN module, output features from the fifth DRSN module ; The fifth DRSN module output features Enter the seventh Convolutional layer, seventh Convolutional layer output features ; The fifth DRSN module output features Input to the eighth DRSN module, the eighth DRSN module outputs features ; The fifth DRSN module output features Enter the ninth Convolutional layer, ninth Convolutional layer output features ; The output characteristics of the eighth DRSN module Input to the 10th DRSN module, the 10th DRSN module outputs features ; The output characteristics of the eighth DRSN module Enter the eleventh Convolutional layer, eleventh Convolutional layer output features ; Output characteristics of the tenth DRSN module Enter the twelfth number in sequence. Convolutional layer, thirteenth Convolutional layer, fourteenth upsampling, fourteenth upsampling output features ; Fourteenth double upsampling output feature and the eleventh Convolutional layer output features By adding elements one by one, we can obtain the features. ; feature Enter the fifteenth number in sequence. Convolutional layer, 16th upsampling, 16th upsampling output features ; Sixteenth double upsampling output feature and the Ninth Convolutional layer output features By adding elements one by one, we can obtain the features. ; feature Enter the seventeenth number in sequence. Convolutional layer, 18th upsampling, 18th upsampling output features ; Eighteenth double upsampling output feature and the seventh Convolutional layer output features By adding elements one by one, we can obtain the features. ; feature Enter the nineteenth one in sequence The system consists of a convolutional layer, a 20th global average pooling layer, a 21st flattening layer, a 22nd fully connected layer, and a 23rd softmax activation function layer. The 23rd softmax activation function layer outputs probability values, which are then output through the 24th output layer.

8. The ECG signal classification system based on residual grouped attention pyramid network according to claim 7, characterized in that: The fifth DRSN module, the sixth DRSN module, and the seventh The specific working process of each DRSN module in the convolutional layer and the eighth DRSN module is as follows: Given the size of the input feature map , The number of channels in the feature map. The width of the feature map, The height of the feature map; First, the number of channels in the feature map is divided into... Groups, each group has 10 channels. ; Then, divide each group into There are branches, and the number of feature map channels in each branch is . ; No. Group feature map Represented as the first The branch to the first The sum of the feature maps of each branch has a size of ,Right now: (7) in, , Indicates the first Feature maps of each branch; For the Feature map of each branch First through a The convolution yields feature map 1, which has 10 channels. The low-dimensional features; then feature map 1 is obtained through a The depthwise separable convolution yields feature map 2, which has the following number of channels: Feature map 2 serves as the output feature map for each branch. Each group of The output feature maps of each branch are jointly input into the group attention module, and the output size of the group attention module is [size missing]. Feature map ; Will Feature maps corresponding to the group Adding them together, we get a value of Feature map; Subsequently, the size is Feature maps through a The convolution kernel restores the feature map to a size of [size missing]. Finally, the size is equal to the initially given size. The input feature maps are concatenated to obtain the final output feature map of each DRSN module.

9. The ECG signal classification system based on residual grouped attention pyramid network according to claim 8, characterized in that: The group of The output feature maps of each branch are jointly input into the group attention module, and the output size of the group attention module is [size missing]. Feature map ; The specific process is as follows: Each group Each branch output channel The feature map is ; Each group All branches output feature maps Perform element-wise addition, and then input the sum into a global average pooling layer; the global average pooling layer outputs the first element. Group Channel eigenvectors ; eigenvectors The input layers are sequentially a fully connected layer, a batch normalized (BN) layer, and a ReLU activation function layer. The output dimension of the ReLU activation function layer is... The compressed vector; The compressed vector is sequentially input into a fully connected layer and a Softmax activation function layer, and the weight vector of each channel of the compressed vector is calculated. ; Each branch feature map is associated with its corresponding channel weight. Multiply, we get The results of each branch; Adding the results of the nth branch together, we get the nth branch. Feature maps after group fusion ;No. Feature maps after group fusion The calculation formula is: (8) in, Indicates the first Group 1 Channel fusion characteristics Indicates the first Group 1 Branch in the Channel weights, Indicates the first Group 1 The branch Channel characteristics.

10. The ECG signal classification system based on residual grouped attention pyramid network according to claim 9, characterized in that: The module for acquiring the trained RSPNet network model is used to obtain the data matrix from the training set. Input an RSPNet network model, and the RSPNet network model outputs a category label matrix corresponding to the data matrix. Continue until the loss function converges to obtain the trained RSPNet network model. The specific process is as follows: Data matrix from the training set Input an RSPNet network model, and the RSPNet network model outputs a category label matrix corresponding to the data matrix. Continue until the loss function converges to obtain the trained RSPNet network model. The loss function is the Tversky-Focus Combination Loss Function. ; Tversky-Focus Combination Loss Function It is composed of a weighted combination of the Tversky loss function and the focus loss function; expressed as: (9) in, Indicates the combined weight coefficient; Represents the Tversky loss function; Represents the focus loss function; Among them, the Tversky loss function Defined as: (10) in, This represents the prediction results of the RSPNet network model; One-hot encoding representing the actual label; Corresponding to a true positive, and These correspond to false positives and false negatives, respectively. parameter and Used to control the severity of penalties for false positives and false negatives; To prevent the denominator from being zero, this invention uses the Tversky loss function. Add smoothing factors to the numerator and denominator respectively ,Pick ; Among them, the focus loss function Defined as: (11) in, This represents the predicted probability of the model. A balance factor representing the sample categories; It is a regulating factor.