Search

CN-122004882-A - Electrocardiogram signal classification system based on residual error grouping attention pyramid network

CN122004882ACN 122004882 ACN122004882 ACN 122004882ACN-122004882-A

Abstract

The invention discloses an electrocardiosignal classification system based on a residual error grouping attention pyramid network, belongs to the technical field of biomedical signal processing and artificial intelligence, and particularly relates to an electrocardiosignal classification system based on a residual error grouping attention pyramid network. The invention aims to solve the problems of low electrocardiosignal classification accuracy caused by insufficient feature extraction, noise interference and unbalanced classification in the existing study in the electrocardiograph intelligent classification. An electrocardiosignal classification system based on a residual packet attention pyramid network comprises an electrocardio data acquisition module, an electrocardio sequence acquisition module, a standardized electrocardio sequence acquisition module, a recursion diagram conversion module, a training set and test set acquisition module, a RSPNet network model construction module, a trained RSPNet network model acquisition module and a prediction module, wherein the RSPNet network model is a residual packet attention pyramid network model.

Inventors

  • ZHAO YAQIN
  • FENG JIANCHAO
  • WU LONGWEN
  • HE XIN
  • LI HAN
  • XU JINHAO

Assignees

  • 哈尔滨工业大学

Dates

Publication Date
20260512
Application Date
20260130

Claims (10)

  1. 1. An electrocardiosignal classification system based on a residual group attention pyramid network is characterized by comprising: the system comprises an electrocardio data acquisition module, an electrocardio sequence acquisition module, a standardized electrocardio sequence acquisition module, a recursion diagram conversion module, a training set and test set acquisition module, a RSPNet network model construction module, a trained RSPNet network model acquisition module and a prediction module; The RSPNet network model is a residual group attention pyramid network model; The electrocardio data acquisition module is used for acquiring electrocardio data; the electrocardio sequence acquisition module is used for dividing electrocardio data to obtain Each electrocardio sequence and a label corresponding to each electrocardio sequence; the standardized electrocardio sequence acquisition module is used for carrying out standardized processing on each electrocardio sequence to obtain each standardized electrocardio sequence and a label corresponding to each electrocardio sequence; the recursion map conversion module is used for converting each standardized electrocardio sequence to obtain each two-dimensional image; the training set acquisition module is used for acquiring the training set Dividing the two-dimensional images and corresponding labels into a training set and a testing set; The RSPNet network model building module is used for building RSPNet network model; the trained RSPNet network model acquisition module is used for training the concentrated data matrix Inputting RSPNet network model, RSPNet network model outputting class label matrix corresponding to data matrix Until the loss function converges, obtaining a trained RSPNet network model; the prediction module is used for obtaining each test sample to be tested in the test set Each test sample is subjected to And inputting a trained RSPNet network model, and outputting class labels corresponding to each test sample by the trained RSPNet network model.
  2. 2. The electrocardiosignal classification system based on the residual error grouping attention pyramid network as claimed in claim 1, wherein the electrocardiosignal sequence acquisition module is used for dividing electrocardiosignal data to obtain Each electrocardio sequence and a label corresponding to each electrocardio sequence; The specific process is as follows: 11 Using electrocardiosignal acquisition equipment to record electrocardiosignal sampling data of different testees, wherein the recording time length of each electrocardiosignal sampling data is more than 10 seconds; 12 Labeling category labels on the recorded electrocardiographic sampling data of different testees; the arrhythmia five-classification dividing mode based on AMMI standard is adopted, and the categories are normal heart beat, supraventricular ectopic beat, ventricular ectopic beat, fusion beat and unknown.
  3. 3. The electrocardiosignal classification system based on the residual error grouping attention pyramid network as claimed in claim 2, wherein the electrocardiosignal sequence acquisition module is used for dividing electrocardiosignal sampling data to obtain Each electrocardio sequence and a label corresponding to each electrocardio sequence; the specific process is as follows: 21 Acquiring R peak positions of each electrocardiograph sampling data and class labels corresponding to the R peak positions; 22 Selecting the front 149 sampling points to the back 150 sampling points of the R peak of each electrocardiograph sampling data, and taking 300 sampling points as an electrocardiograph sequence.
  4. 4. The electrocardiosignal classification system based on the residual group attention pyramid network as claimed in claim 3, wherein the standardized electrocardiosignal acquisition module is used for carrying out standardized processing on each electrocardiosignal to obtain each standardized electrocardiosignal, and the specific process is as follows: the Z-score normalization method was used to normalize the sample The electrocardio sequences are converted into vectors with the mean value of zero and the standard deviation of 1; ; the calculation formula of the Z-score normalization method is as follows: (1) Wherein, the Represent the first A sequence of the electrocardio-signals, Representing normalized first A sequence of the electrocardio-signals, And Respectively the first Personal electrocardiographic sequence Mean and standard deviation of (a).
  5. 5. The electrocardiosignal classification system based on the residual group attention pyramid network as claimed in claim 4, wherein the recursive graph conversion module is used for converting each standardized electrocardiosignal sequence to obtain a two-dimensional image, and the specific process is as follows: 1) Each electrocardiographic sequence Mapping to The phase space is maintained in the phase space, Mapped phase space center electrical sequence State vector of (a) The definition is as follows: (2) (3) (4) Wherein, the Representing mapped phase space center electrical sequences State vectors of (2); Comprising 、 And ; Representing mapped phase space center electrical sequences Is the 1 st dimensional state vector of (2); representing mapped phase space center electrical sequences Is the 2 nd dimensional state vector of (2); representing mapped phase space center electrical sequences Is the 3 rd dimensional state vector of (2); Representing the first of the state vectors A number of sampling points are used to sample the sample, Representing the first of the state vectors A number of sampling points are used to sample the sample, Representing the first of the state vectors A number of sampling points are used to sample the sample, Representing state vectors Middle (f) Sampling points; representing the total number of sampling points 300; representing the time delay of the sampling point; Representing sampling points ; In (a) 、 In (a) And In (a) Constructing phase space center electrical sequence Is 1 st point of (2) ; In (a) 、 In (a) And In (a) Constructing phase space center electrical sequence Is the 2 nd point of (2) ; In (a) 、 In (a) And In (a) Constructing phase space center electrical sequence Is the 3 rd point of (2) ; In (a) 、 In (a) And In (a) Constructing phase space center electrical sequence 298 Th point of (C) ; 2) In the phase space, calculate the phase space center electrical sequence Is 1 st point of (2) And the 2 nd point Distance of (2) ; Calculating phase space center electrical sequence Any two points of (3) And Distance between Obtaining A plurality of distances; Represent the first A plurality of points; Represent the first A plurality of points; ; ; Wherein the phase space center electrical sequence Is the first of (2) Points and the first Distance of individual points The definition is as follows: (5) 3) According to a preset threshold value Sum distance Construction of each electrocardiographic sequence Corresponding recursive matrix And is expressed as: (6) Wherein, the Representing the first of the recurrence matrix The first corresponding to the electrocardio sequence Line 1 Column elements; Representing a recursive threshold; Representing phase space center electrical sequence Is the first of (2) Points and the first The distance of the individual points; 4) Each electrocardiographic sequence Corresponding recursive matrix Converting into a two-dimensional image; the specific process is as follows: Black dots in the corresponding image represent the electrocardiographic sequence Is the first of (2) Individual points And (d) Individual points Similar in phase space; Corresponding to white spots in the image, representing an electrocardiographic sequence Is the first of (2) Individual points And (d) Individual points Dissimilar in phase space.
  6. 6. The electrocardiosignal classification system based on the residual group attention pyramid network as claimed in claim 5, wherein the training set acquisition module is used for acquiring the residual group attention pyramid network Dividing the two-dimensional images and corresponding labels into a training set and a testing set; 51 According to the following Two-dimensional images and corresponding label judgment Number of categories corresponding to each two-dimensional image , Representing the total number of categories; 52 Instruction) and order , Representing categories , ; 53 Is to be used as a main component) The electrocardiograph sequence belongs to The electrocardiographic sequences of the individual classes are randomly divided into 10 groups; the electrocardio sequences in each group are of the same classification class; the electrocardiographic sequences in the 10 groups are completely different from each other; splicing all the electrocardio sequences of the same classification category in the same group into a complete piece of electrocardio sequence data according to a random sequence; Will belong to the first The first nine groups in 10 groups of the individual categories are used as training sets, and the tenth group is used as a test set; 54 Instruction) and order Repeating 53) until Obtaining a training set and a testing set, wherein the number of groups of the training set is The number of groups of the test set is 。
  7. 7. The system for classifying electrocardiographic signals based on residual packet attention pyramid network of claim 6 wherein said RSPNet network model building module is configured to build RSPNet network model; The specific process is as follows: 61 Constructing RSPNet a network model, wherein the specific process is as follows: RSPNet the network model includes: First one Convolutional layer, second Convolutional layer, third Convolution layer, fourth max pooling layer, fifth DRSN module, sixth DRSN module, seventh Convolutional layer, eighth DRSN block, ninth Convolutional layer, tenth DRSN module, eleventh Convolutional layer, twelfth Convolutional layer, thirteenth Convolutional layer, fourteenth double upsampling, fifteenth Convolutional layer, sixteenth double upsampling, seventeenth Convolutional layer, eighteenth double upsampling, nineteenth double upsampling A convolution layer, a twenty-first global average pooling layer, a twenty-first flattening layer, a twenty-second full connection layer, a twenty-third Softmax activation function layer and a twenty-fourth output layer; 62 The working process of the RSPNet network model is as follows: the training set is sequentially input into the first Convolutional layer, second Convolutional layer, third A convolution layer, a fourth max-pooling layer, fourth maximum pooling layer output feature ; Fourth maximum pooling layer output feature Input to fifth DRSN module, output features of fifth DRSN module ; Fifth DRSN module output features Input to the sixth DRSN module, output features from the fifth DRSN module ; Fifth DRSN module output features Inputting the seventh Convolution layer, seventh Convolutional layer output features ; Fifth DRSN module output features Input eighth DRSN module, eighth DRSN module output features ; Fifth DRSN module output features Input ninth Convolution layer, ninth Convolutional layer output features ; Eighth DRSN module output features Input tenth DRSN module, tenth DRSN module output characteristics ; Eighth DRSN module output features Input eleventh Convolutional layer, eleventh Convolutional layer output features ; Tenth DRSN module output features Sequentially input twelfth Convolutional layer, thirteenth Convolutional layer, fourteenth double up-sampling output features ; Fourteenth two-fold upsampling output feature And eleventh one Convolutional layer output features Adding elements by elements to obtain features ; Features (e.g. a character) Sequentially input fifteenth Convolution layer, sixteenth double up-sampling output feature ; Sixteenth two-fold upsampling output feature And ninth one Convolutional layer output features Adding elements by elements to obtain features ; Features (e.g. a character) Sequentially input seventeenth Convolution layer, eighteenth double up-sampling output characteristics ; Eighteenth two-fold upsampling output feature And seventh Convolutional layer output features Adding elements by elements to obtain features ; Features (e.g. a character) Sequentially input nineteenth The method comprises a convolution layer, a twenty-first global average pooling layer, a twenty-first flattening layer, a twenty-second full connection layer, a twenty-third Softmax activation function layer, wherein the twenty-third Softmax activation function layer outputs a probability value, and the probability value is output through a twenty-fourth output layer.
  8. 8. The electrocardiosignal classification system based on the residual group attention pyramid network as claimed in claim 7, wherein the electrocardiosignal classification system comprises a fifth DRSN module, a sixth DRSN module and a seventh module The specific working process of each DRSN module in the convolution layer and the eighth DRSN module is as follows: Given an input feature map of the size of , As the number of channels of the feature map, For the width of the feature map, Is the high of the feature map; First, the number of channels of a feature map is divided into Groups, the number of channels of each group is ; Then, each component is further divided into A number of branches, each branch having a feature map channel number of ; First, the Group feature map Denoted as the first Branch to the first The sum of the feature maps of the branches is of the size of The method comprises the following steps: (7) Wherein, the , Represent the first Feature maps of the branches; For the first Feature map of each branch of group First by one of Is convolved to obtain a characteristic diagram 1, wherein the number of channels of the characteristic diagram 1 is Is then characterized by FIG. 1 by one Is convolved with the depth of the channel number of the feature map 2 to obtain the feature map 2, wherein the number of the channels of the feature map 2 is Feature map 2 as an output feature map for each branch; Each group is provided with A kind of electronic device The output characteristic diagrams of the branches are input to a group attention module together, and the output size of the group attention module is that Is characterized by (a) ; Will be Group-corresponding feature map Adding to obtain a product with a size of Is a feature map of (1); Subsequently, the size is Through a feature map of Is to restore the feature map to a size of Finally and initially given a size of And (3) splicing the input feature graphs of the modules to obtain a final output feature graph of each DRSN module.
  9. 9. An electrocardiosignal classification system based on a residual group attention pyramid network as claimed in claim 8 wherein each group is A kind of electronic device The output characteristic diagrams of the branches are input to a group attention module together, and the output size of the group attention module is that Is characterized by (a) ; The specific process is as follows: Each group of Each branch output channel of (a) Is characterized in that ; Each group is provided with All branch output feature graphs of (1) Adding element by element, inputting into global average pooling layer after adding element by element, outputting by global average pooling layer Group channel Feature vectors of (a) ; Feature vector Sequentially inputting a full connection layer, a batch normalization BN and a ReLU activation function layer, wherein the output dimension of the ReLU activation function layer is as follows Is a compressed vector of (a); inputting the compressed vector into a full connection layer and a Softmax activation function layer in sequence, and calculating the weight vector of each channel of the compressed vector ; The branch feature graphs are respectively and correspondingly weighted by the channels Multiplying to obtain The result of each branch, will The results of the branches are added to obtain the first Feature map after group fusion First, a third step Feature map after group fusion The calculation formula of (2) is as follows: (8) Wherein, the Represent the first Group III The fusion characteristics of the channels, Represent the first Group III Branching at the first The weight of the channel is determined by the weight of the channel, Represent the first Group III Branch No Channel characteristics.
  10. 10. The system for classifying electrocardiographic signals based on residual packet attention pyramid network of claim 9, wherein said trained RSPNet network model acquisition module is configured to concentrate training data matrix Inputting RSPNet network model, RSPNet network model outputting class label matrix corresponding to data matrix Until the loss function converges, obtaining a trained RSPNet network model; The specific process is as follows: data matrix in training set Inputting RSPNet network model, RSPNet network model outputting class label matrix corresponding to data matrix Until the loss function converges, obtaining a trained RSPNet network model; the loss function is a te-k focal point combined loss function ; Focus-specific loss function The method is composed of weighted combination of a Twok loss function and a focus loss function, and is expressed as follows: (9) Wherein, the Representing the combined weight coefficients; Representing a te-wok loss function; representing a focus loss function; wherein the Twok loss function The definition is as follows: (10) Wherein, the Representing RSPNet the predicted results of the network model; A one-hot code representing a genuine label; Corresponding to the positive value of the Chinese medicinal composition, And Respectively corresponding to false positive and false negative; Parameters (parameters) And The punishment force for the false positive and the false negative is controlled; to prevent the denominator from being zero, the invention uses the te-Walsh loss function Respectively adding smoothing factors to the numerator and denominator of (2) Taking out ; Wherein the focal point loss function The definition is as follows: (11) Wherein, the The prediction probability of the model is represented, A balance factor representing a class of samples; is a regulatory factor.

Description

Electrocardiogram signal classification system based on residual error grouping attention pyramid network Technical Field The invention belongs to the technical field of biomedical signal processing and artificial intelligence, and particularly relates to an electrocardiosignal classification system based on a residual error grouping attention pyramid network. Background Arrhythmia is one of the common and serious cardiovascular diseases, and early detection and accurate diagnosis are critical to reduce mortality. An Electrocardiogram (ECG) is used as a gold standard for clinical diagnosis, can reflect the change of the heart electric activity, but has low manual analysis efficiency and strong subjectivity, and is easy to cause misdiagnosis and missed diagnosis. With the development of deep learning, computer-aided diagnosis is becoming an important direction for arrhythmia recognition. The existing research has remarkable progress in the ECG intelligent classification, but still faces three major challenges, namely (1) the characteristic extraction is insufficient, the electrocardiosignal has nonlinear and non-stable characteristics, the complex dynamic characteristics of the electrocardiosignal are difficult to capture by the traditional method, (2) noise interference, namely the robustness of a model is influenced by power frequency, myoelectricity, baseline drift and other noise in the acquisition process, and (3) the class is unbalanced, namely the normal heart beat is far more than the abnormal heart beat, and the model is easy to fit most classes and neglect minority classes. In order to cope with the above problems, researchers have proposed various improved methods based on time-frequency transformation, attention mechanism, feature pyramid network, countermeasure generation, etc., but there are still disadvantages in terms of noise immunity and generalization performance. Disclosure of Invention The invention aims to solve the problems of low electrocardiosignal classification accuracy caused by insufficient feature extraction, noise interference and unbalanced classification in the existing study on the intelligent electrocardiograph classification, and provides an electrocardiosignal classification system based on a residual error grouping attention pyramid network. An electrocardiosignal classification system based on a residual packet attention pyramid network comprises: the system comprises an electrocardio data acquisition module, an electrocardio sequence acquisition module, a standardized electrocardio sequence acquisition module, a recursion diagram conversion module, a training set and test set acquisition module, a RSPNet network model construction module, a trained RSPNet network model acquisition module and a prediction module; The RSPNet network model is a residual group attention pyramid network model; The electrocardio data acquisition module is used for acquiring electrocardio data; the electrocardio sequence acquisition module is used for dividing electrocardio data to obtain Each electrocardio sequence and a label corresponding to each electrocardio sequence; the standardized electrocardio sequence acquisition module is used for carrying out standardized processing on each electrocardio sequence to obtain each standardized electrocardio sequence and a label corresponding to each electrocardio sequence; the recursion map conversion module is used for converting each standardized electrocardio sequence to obtain each two-dimensional image; the training set acquisition module is used for acquiring the training set Dividing the two-dimensional images and corresponding labels into a training set and a testing set; The RSPNet network model building module is used for building RSPNet network model; the trained RSPNet network model acquisition module is used for training the concentrated data matrix Inputting RSPNet network model, RSPNet network model outputting class label matrix corresponding to data matrixUntil the loss function converges, obtaining a trained RSPNet network model; the prediction module is used for obtaining each test sample to be tested in the test set Each test sample is subjected toAnd inputting a trained RSPNet network model, and outputting class labels corresponding to each test sample by the trained RSPNet network model. The beneficial effects of the invention are as follows: The invention provides a Residual group attention pyramid network (Residual-based Spatial Pooling Attention Pyramid Network, RSPNet), which combines depth separable convolution, expansion convolution and a Twok-focus combined loss function (Tversky-Focused Combination Loss Function, TFCLF) to enhance feature expression, improve robustness and relieve category imbalance, and provides a more efficient and reliable technical scheme for intelligent diagnosis of arrhythmia. Drawings FIG. 1 is a general flow chart of an implementation of the present invention; FIG. 2 is a diagram showing the cent