A method and device for classifying electrocardiogram signals and an electrocardiogram monitor

By using a multi-scale dilated convolutional network model and branch networks with multiple receptive fields, the problem of poor generalization of ECG signal classification models was solved, and more reliable ECG signal classification was achieved.

CN119924848BActive Publication Date: 2026-04-17HUBEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUBEI UNIV OF TECH
Filing Date
2025-03-27
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing electrocardiogram signal classification models have poor generalization ability, resulting in insufficient reliability of classification results.

Method used

A multi-scale dilated convolutional network model is adopted to extract the basic features of electrocardiogram signals through multiple branches with different receptive fields, and weight fusion is performed to determine the classification label. This includes the use of preprocessing, multi-scale dilated convolutional network model, deep gating module and spatial attention fusion module.

Benefits of technology

This improved the model's effective receptive field, enhancing its generalization ability and the reliability of the classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119924848B_ABST
    Figure CN119924848B_ABST
Patent Text Reader

Abstract

This invention discloses a method, device, and ECG monitor for classifying electrocardiogram (ECG) signals, belonging to the field of signal processing technology. The method includes: extracting basic features of the ECG signal; sending the basic features to a multi-scale dilated convolutional network (DCN) model, wherein the multi-scale branch module of the DCN model includes multiple branch networks with different receptive fields, and the dilation rate of the receptive field of at least one branch network is positively correlated with the current input signal length of the basic features; determining multiple branch features of the basic features based on the multiple branch networks with different receptive fields; fusing the multiple branch features with weights, and determining the classification label of the ECG signal based on the weighted features; by extracting branch features of the basic features of the ECG signal through multiple branch networks with different receptive fields in the multi-scale branch module, the effective receptive field of the model is improved, and the generalization ability of the model is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal processing technology, and in particular to a method, apparatus, and electrocardiogram (ECG) monitor for classifying ECG signals. Background Technology

[0002] Electrocardiography (ECG) is an important tool for diagnosing cardiovascular diseases. By analyzing the waveform, frequency, rhythm, and other characteristics of an ECG, doctors can determine whether a patient has abnormalities such as arrhythmia or myocardial ischemia. The classification of ECG signals helps doctors quickly and accurately identify different types of ECG features, thus providing important evidence for clinical diagnosis.

[0003] Because the amount of ECG signal data in each lead is extremely large during arrhythmia detection, relying on experts to manually analyze patients' ECG signals in real time to achieve real-time monitoring of patients' cardiovascular health is impractical. Currently, although existing models can automatically classify ECG signals, each model typically corresponds to only one type of receptive field. The size of the receptive field determines the network's understanding of the input image. Therefore, existing models are limited by the number of receptive fields. Furthermore, different databases have different data focuses and different data targets for querying—sometimes requiring the extraction of local features, sometimes global features—resulting in poor generalization across different databases and making it difficult to guarantee the reliability of ECG signal classification results.

[0004] Therefore, existing technologies for classifying electrocardiogram (ECG) signals suffer from poor model generalization, making it difficult to guarantee the reliability of ECG signal classification results. Summary of the Invention

[0005] In view of this, it is necessary to provide a method, device and electrocardiogram monitor for classifying electrocardiogram signals, so as to solve the problem that the existing technology has difficulty in ensuring the reliability of electrocardiogram signal classification results due to the poor generalization of the model.

[0006] To address the aforementioned problems, in a first aspect, the present invention provides a method for classifying electrocardiogram (ECG) signals, comprising:

[0007] Extracting the basic features of electrocardiogram signals;

[0008] The basic features are sent to a multi-scale dilated convolutional network model, wherein the multi-scale branch module of the multi-scale dilated convolutional network model includes multiple branch networks with different receptive fields, and the dilation rate of the receptive field of at least one branch network is positively correlated with the current input signal length of the basic features.

[0009] Multiple branch features of the basic feature are determined based on a branch network with multiple different receptive fields;

[0010] Multiple branch features are weighted and fused, and the classification label of the electrocardiogram signal is determined based on the weighted and fused features.

[0011] In one possible implementation, before extracting the basic features of the electrocardiogram signal, the following steps are also included:

[0012] The baseline drift of the initial electrocardiogram signal was removed by high-pass filtering, and the initial electrocardiogram signal was denoised by an improved threshold wavelet denoising method to obtain a denoised electrocardiogram signal.

[0013] Locate the R peak of the denoised ECG signal to obtain the heartbeat of the denoised ECG signal;

[0014] The heartbeats are segmented to obtain preprocessed electrocardiogram signals.

[0015] In one possible implementation, when the multi-scale branch module includes four branch networks, the dilated convolution rates are as follows:

[0016]

[0017]

[0018]

[0019]

[0020] in, For the first i The dilation rate is L, the length of the current input signal is L, and [x] represents the rounding operation on x.

[0021] In one possible implementation, the multi-scale dilated convolutional network model includes a depth-gating module, a spatial attention fusion module, and a classification module; it fuses the features from multiple branches with weights and determines the classification label of the electrocardiogram signal based on the weighted features, including:

[0022] The deep gating module is used to obtain the weights of basic features in multiple branch networks;

[0023] The features of multiple branches and multiple weights are multiplied together and then input into the spatial attention fusion module to obtain the final feature map of the electrocardiogram signal.

[0024] The classification module classifies the final feature map to obtain the classification label of the electrocardiogram signal.

[0025] In one possible implementation, the weights of the basic features in multiple branch networks are obtained from the depth gating module, including:

[0026] Adjust the number of output tags of the depth gating module based on the number of branch networks;

[0027] The basic features are input into the deep gating module to obtain multiple unlabeled probabilities corresponding to the number of output labels;

[0028] Multiple unlabeled probabilities are used as weights for the branch network;

[0029] In this process, when the basic features are updated, the weights change based on the corresponding unlabeled probabilities.

[0030] In one possible implementation, multiple branch features and multiple weights are multiplied and then input into a spatial attention fusion module to obtain the final feature map of the electrocardiogram signal, including:

[0031] Multiply the branch feature matrix by the weights to obtain the weighted branch feature matrix;

[0032] The final feature map of the electrocardiogram signal is obtained by splicing the weighted branch feature matrix according to the spatial attention fusion module.

[0033] In one possible implementation, the spatial attention fusion module includes a first connection operation unit, a first average pooling unit, a max pooling unit, a second connection operation unit, a convolutional kernel unit, an activation function unit, a broadcast weighting unit, and a second average pooling unit. The spatial attention fusion module performs feature concatenation on the weighted branch feature matrix to obtain the final feature map of the electrocardiogram signal, including:

[0034] The first connection operation unit connects the weighted branch feature matrix in the second dimension to obtain the first connection fusion feature.

[0035] The first connection fusion feature is sequentially passed through the first average pooling unit, the max pooling unit, the second connection operation unit, the convolution kernel unit, the activation function unit, and the broadcast weighting unit to obtain the first splicing feature of the electrocardiogram signal;

[0036] The first concatenated feature is fed back into the max pooling unit to update the parameters of the max pooling unit, and the first concatenated feature is repeatedly iterated and fused. The iteratively fused concatenated feature is then fed into the second average pooling unit to obtain the final feature map.

[0037] In one possible implementation, the training of a multi-scale dilated convolutional network model includes:

[0038] The training dataset is input into the initial multi-scale dilated convolutional network model for iterative training. The loss value between the training prediction result and the actual result of the initial multi-scale dilated convolutional network model is calculated based on the cross-entropy loss function. The parameters of the initial multi-scale dilated convolutional network model are adjusted based on the loss value. The training is iterated to a preset number of times to obtain a fully trained multi-scale dilated convolutional network model.

[0039] Among them, the cross-entropy loss function L The expression is:

[0040]

[0041] in, N It is the total number of samples. C It is the total number of categories; Representing the true value, it is a one-hot encoded vector. If the... i Each sample belongs to the corresponding category. k ,but It is 1 if it is true, otherwise it is 0. It is the first of the models i Each predicted sample belongs to the category k The probability, This is the final feature map.

[0042] Secondly, the present invention also provides an electrocardiogram signal classification device, comprising:

[0043] A basic feature extraction component is used to extract basic features from electrocardiogram (ECG) signals.

[0044] A multi-scale dilated convolution component is used to send basic features to a multi-scale dilated convolution network model, wherein the multi-scale branch module of the multi-scale dilated convolution network model includes multiple branch networks with different receptive fields, and the dilation convolution rate of the receptive field of at least one branch network is positively correlated with the current input signal length of the basic features.

[0045] A branch feature extraction component is used to determine multiple branch features of the basic features based on branch networks with multiple different receptive fields;

[0046] The classification label determination component is used to perform weighted fusion of multiple branch features and determine the classification label of the electrocardiogram signal based on the weighted fused features.

[0047] Thirdly, the present invention also provides an electrocardiogram monitor, including a memory and a processor, wherein,

[0048] Memory, used to store programs;

[0049] The processor, coupled to the memory, executes the program stored in the memory to implement the steps in the electrocardiogram signal classification method described above.

[0050] The beneficial effects of the above embodiments are as follows: The present invention provides a classification method for electrocardiogram (ECG) signals. By using a branch network with multiple different receptive fields in a multi-scale branch module to extract branch features from the basic features of ECG signals, the effective receptive field of the model is improved, and the generalization ability of the model is enhanced. Furthermore, the weights of multiple branch features are fused to determine the classification label of the ECG signal, thereby realizing the classification of ECG signals based on the features of multiple effective receptive fields and improving the reliability of the classification results. Attached Figure Description

[0051] Figure 1 A flowchart illustrating an embodiment of the electrocardiogram signal classification method provided by the present invention;

[0052] Figure 2 This is a schematic flowchart of an embodiment of the preprocessing of electrocardiogram signals provided by the present invention.

[0053] Figure 3 A schematic diagram showing the results of an embodiment of the effect of the dilation rate on the receptive field size of a one-dimensional convolutional layer provided by the present invention;

[0054] Figure 4 A flowchart illustrating an embodiment of the present invention for determining classification labels for electrocardiogram signals;

[0055] Figure 5 A schematic diagram of the structure of an embodiment of the multi-scale dilated convolutional network model provided by the present invention;

[0056] Figure 6 A flowchart illustrating an embodiment of obtaining the weights of a branch network provided by the present invention;

[0057] Figure 7 This is a schematic flowchart of the first embodiment of obtaining the final feature map provided by the present invention;

[0058] Figure 8 This is a schematic flowchart of the second embodiment of obtaining the final feature map provided by the present invention;

[0059] Figure 9 This is a schematic diagram of the structure of an embodiment of the spatial attention fusion module provided by the present invention;

[0060] Figure 10 This is a schematic diagram of an embodiment of the electrocardiogram signal classification device provided by the present invention;

[0061] Figure 11 This is a structural block diagram of an embodiment of the electrocardiogram monitor provided by the present invention. Detailed Implementation

[0062] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which constitute a part of the present invention and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0063] To address the problem that existing technologies for classifying electrocardiogram (ECG) signals suffer from poor model generalization, making it difficult to guarantee the reliability of ECG signal classification results, this invention provides a method, device, and ECG monitor for ECG signal classification, which will be described in detail below.

[0064] like Figure 1 As shown, Figure 1 A flowchart illustrating an embodiment of the electrocardiogram signal classification method provided by the present invention includes:

[0065] S101: Extracting basic features of electrocardiogram signals;

[0066] In some embodiments of the present invention, an electrocardiogram (ECG) signal is a weak electrical signal originating from within the human body that records the potential changes generated during the depolarization and repolarization of heart muscle cells. Specifically, the electrical signal of the heart begins in the atria, passes through the ventricles, and causes the heart muscle to contract. During this process, the potential of the heart muscle cells changes, thereby generating an electrocardiogram signal.

[0067] S102: Send the basic features to the multi-scale dilated convolutional network model, wherein the multi-scale branch module of the multi-scale dilated convolutional network model includes multiple branch networks with different receptive fields, and the dilation rate of the receptive field of at least one branch network is positively correlated with the current input signal length of the basic features.

[0068] In some embodiments of the present invention, the multi-scale dilated convolutional network model is essentially still a neural network model. Specifically, the execution entity of the multi-scale dilated convolutional network model can be any one of a high-performance GPU (graphics processing unit), a dedicated deep learning accelerator (such as Tensor Processing Units (TPUs), Neural Processing Units (NPUs), etc.), an FPGA (Field Programmable Gate Array), an ASIC (Application-Specific Integrated Circuit), and an embedded system. The specific selection and adjustment can be made according to actual needs.

[0069] In some embodiments of the present invention, the receptive field refers to the region of the input image that a point on the feature map can see; that is, the point on the feature map is calculated from the region of the receptive field in the input image. In other words, the region that a neuron in a neural network can perceive, in a convolutional neural network (CNN), is the region on the feature map where the calculation of a certain element is affected by the input image; this region is the receptive field of the element on the feature map.

[0070] The size of the receptive field determines how well the network understands the input image, i.e., how much feature information it can capture. A smaller receptive field can capture more detailed features but may miss information over a larger area; a larger receptive field can capture more global information but may miss more detailed features.

[0071] In convolutional neural networks, increasing the receptive field can improve the model's ability to understand input images, but it may also lead to overfitting or excessive computation. Therefore, increasing the receptive field should be done while ensuring model performance.

[0072] S103: Determine multiple branch features of the basic features based on a branch network with multiple different receptive fields;

[0073] S104: Weight fusion of multiple branch features, and determination of the classification label of the electrocardiogram signal based on the weighted features.

[0074] In some embodiments of the present invention, the classification labels of electrocardiogram signals include normal test results, supraventricular arrhythmia, ventricular arrhythmia, and a fusion of supraventricular and ventricular arrhythmia.

[0075] In this embodiment, branch features are extracted from the basic features of the electrocardiogram (ECG) signal through a branch network with multiple different receptive fields in the multi-scale branch module, which improves the effective receptive field of the model and enhances the generalization ability of the model. Furthermore, the weights of multiple branch features are fused to determine the classification label of the ECG signal, thereby realizing the classification of the ECG signal based on the features of multiple effective receptive fields and improving the reliability of the classification results.

[0076] In some embodiments of the present invention, in S101, before extracting the basic features of the electrocardiogram (ECG) signal, the ECG signal needs to be preprocessed, such as... Figure 2 As shown, Figure 2 This is a schematic flowchart of an embodiment of the preprocessing of electrocardiogram signals provided by the present invention, including:

[0077] S201: The baseline drift of the initial electrocardiogram signal is removed by high-pass filtering, and the initial electrocardiogram signal is denoised by the improved threshold wavelet denoising method to obtain a denoised electrocardiogram signal.

[0078] In some embodiments of the present invention, after removing baseline drift by using a fourth-order Butterworth high-pass filter with a cutoff frequency of 0.75 Hz on the ECG data, an improved threshold wavelet denoising method is used to denoise the ECG signal. The expression for the improved threshold wavelet denoising method is as follows:

[0079]

[0080] In the formula, b (b = 1,…,9) is the wavelet decomposition level, and c is the number of sampling points in the signal. TEb is the set threshold, which is calculated as follows: , It is the L2 norm of the wavelet coefficients. The estimated noise level is calculated as follows: Here, 0.6745 is the area of ​​75% of a Gaussian distribution with a mean of 0 and a variance of 1 (p = 0.25).

[0081] Then, during the signal decomposition and reconstruction process, the dB6 wavelet is selected as the wavelet basis, and the signal is decomposed into a 4-level stationary wavelet. The wavelet coefficients smaller than TEb after decomposition are set to zero, thereby removing other noise signals.

[0082] S202: Locate the R peak of the denoised ECG signal to obtain the heartbeat of the denoised ECG signal;

[0083] S203: Segment the heartbeats to obtain the preprocessed electrocardiogram signal.

[0084] In some embodiments of the present invention, the Pan-Tompkins algorithm is used to locate the R peak, and data 0.3s before and 0.45s after the R peak are taken as a heartbeat.

[0085] The Pan-Tompkins algorithm is a classic algorithm for electrocardiogram (ECG) signal processing, primarily used to detect the QRS waveform of the heart, thereby enabling heart rate measurement and rhythm analysis. In particular, the Pan-Tompkins algorithm is advantageous due to its simplicity and efficiency; it can accurately detect the R-wave peak value on the ECG using a mathematical model, while effectively reducing noise and enhancing the signal.

[0086] In this embodiment, by preprocessing the initial electrocardiogram signal, interference factors can be eliminated while retaining effective information, thereby improving the reliability and relevance of the electrocardiogram signal.

[0087] Furthermore, in some embodiments of the present invention, the multi-scale dilated convolutional network model further includes a convolutional feature extraction module, wherein the convolutional feature extraction module is used to extract basic features of the electrocardiogram signal.

[0088] Specifically, the convolutional feature extraction module includes a convolutional layer, a batch normalization layer, and a dropout layer connected in sequence;

[0089] The initial kernel size of the convolutional layer is 3;

[0090] Each convolutional layer is connected to a batch normalization layer and a dropout layer, with the dropout value of the dropout layer being 0.3.

[0091] By revising the convolution kernel size and setting corresponding batch normalization and dropout layers to adapt to the model's needs, gradient changes during model training can be stabilized, avoiding gradient explosion or overfitting problems.

[0092] In some embodiments of the present invention, in S102, the basic features are sent to a multi-scale dilated convolutional network model, wherein the multi-scale branch module of the multi-scale dilated convolutional network model includes multiple branch networks with different receptive fields, and the dilation rate of the receptive field of at least one branch network is positively correlated with the current input signal length of the basic features.

[0093] Since each branch network corresponding to a receptive field can specifically extract features from the basic features, the basic features can be obtained in multiple aspects based on the branch networks of multiple different receptive fields. Furthermore, since the length of the current input signal is variable, in order to dynamically adjust the size of the dilation convolution rate, the dilation convolution rate is adaptively linked with the length of the current input signal, thereby realizing automatic adjustment of the size of the receptive field and improving the dynamic stability when acquiring features.

[0094] In some embodiments of the present invention, in order to ensure the usability of the multi-scale dilated convolutional network model, the model needs to be trained before classification. Specifically, firstly, the training dataset is input into the initial multi-scale dilated convolutional network model for iterative training, and the loss value between the training prediction result and the actual result of the initial multi-scale dilated convolutional network model is calculated according to the cross-entropy loss function. Then, the parameters of the initial multi-scale dilated convolutional network model are adjusted based on the loss value, and iterative training is performed to a preset number of times to obtain a fully trained multi-scale dilated convolutional network model.

[0095] Among them, the cross-entropy loss function L The expression is:

[0096]

[0097] in, N It is the total number of samples. C It is the total number of categories; Representing the true value, it is a one-hot encoded vector. If the... i Each sample belongs to the corresponding category. k ,but It is 1 if it is true, otherwise it is 0. It is the first of the models i Each predicted sample belongs to the category k The probability, This is the final feature map.

[0098] In particular, during the training process, in order to increase the number of training samples and avoid the problem of uneven distribution of data among different categories, data augmentation was performed on the relatively few supraventricular arrhythmia labels and ventricular arrhythmia labels in the database. Specifically, data augmentation was performed on the data corresponding to the above two labels by horizontal flipping, vertical flipping, and random addition of Gaussian white noise.

[0099] In this embodiment, the cross-entropy loss function is used as a reference standard to evaluate the iterative training effect of the multi-scale dilated convolutional network model. This can drive the multi-scale dilated convolutional network model to shift towards the target direction, thereby making the multi-scale dilated convolutional network model more in line with actual needs and ensuring the reliability of the electrocardiogram signal classification results.

[0100] In some embodiments of the present invention, in S103, during the process of determining multiple branch features of the basic feature based on multiple branch networks with different receptive fields, specifically, the dilation convolution rate of the branch network is adjusted according to the current input signal length of the basic feature, and multiple branch features of the basic feature under different receptive fields are extracted based on the adjusted multiple branch networks with different dilation convolution rates.

[0101] In some embodiments of the present invention, the dilation rate is a key parameter in convolutional neural networks (CNNs), particularly in the application of dilated convolutions. It determines the spacing between elements in the convolution kernel, thereby affecting the size of the output feature map and the receptive field.

[0102] Specifically, dilated convolution increases the effective receptive field of the convolution kernel by inserting gaps (i.e., "holes") between kernel elements, without increasing the physical size of the kernel or requiring additional computation. This mechanism allows dilated convolution to capture a wider range of contextual information while maintaining feature map resolution.

[0103] It should be noted that further extraction of signal features is performed under different receptive fields. The effect of different expansion rates on the model's receptive field is shown in the following equation:

[0104]

[0105] in K d This is the equivalent kernel size for the same receptive field after using dilated convolution. d Given the current expansion rate, K This represents the original kernel size.

[0106] like Figure 3 As shown, Figure 3 This is a schematic diagram illustrating the effect of the dilation rate on the receptive field size of a one-dimensional convolutional layer according to an embodiment of the present invention. In this diagram, Receptive field represents the model's receptive field, input represents the input of a one-dimensional signal, output represents the output of a one-dimensional signal, and d represents different dilation rates.

[0107] In some embodiments of the present invention, four branches of the CNN network are set, j∈{1,2,3,4}; when j∈{1,2,3}, the convolution kernel K=3, and when j=4, the convolution kernel K=4.

[0108] For the dilation convolution rate d in each branch j When j=4, d4=1; when j∈{1,2,3}, d1, d2, and d3 are set as coprime numbers according to the following formulas:

[0109]

[0110]

[0111]

[0112] In the formula, L represents the length of the current input signal, and [x] represents the rounding operation on x.

[0113] In this embodiment, by setting the dilated convolution rate of each branch network, it is possible to adapt to the prediction needs of the model and improve the adaptability of branch features.

[0114] In this embodiment, the dynamic stability of the branch features is improved by dynamically limiting the dilated convolution rate.

[0115] In some embodiments of the present invention, in S104, the multi-scale dilated convolutional network model includes a depth-gating module, a spatial attention fusion module, and a classification module; in order to perform weighted fusion of features from multiple branches and determine the classification label of the electrocardiogram signal based on the weighted fused features, such as... Figure 4 As shown, Figure 4 A flowchart illustrating an embodiment of the present invention for determining classification labels for electrocardiogram signals includes:

[0116] S401: Obtain multiple weights of basic features in multiple branch networks based on the deep gating module;

[0117] S402: Multiply multiple branch features and multiple weights and then input them into the spatial attention fusion module to obtain the final feature map of the electrocardiogram signal;

[0118] S403: Classify the final feature map based on the classification module to obtain the classification label of the electrocardiogram signal.

[0119] In this embodiment, the weights of each branch feature are adaptively revised by the depth gating module, which improves the reliability of the weights; the spatial attention fusion module fuses multiple branch features to obtain the final feature map, which ensures the reliability of the final feature map and thus improves the reliability of the ECG signal classification results.

[0120] Specifically, in order to clearly describe the changes in electrocardiogram signals in a multi-scale dilated convolutional network model, such as... Figure 5 As shown, Figure 5 This is a schematic diagram of the structure of an embodiment of the multi-scale dilated convolutional network model provided by the present invention, wherein the CNN backbone is a convolutional feature extraction module; f b The basic features extracted from it; Multi-scale dilationconvolution module represents the multi-scale branch module; CNN branch_i represents each branch network of the multi-scale branch module; f bi This refers to the branch features output by each branch network; Gated network is a deep gating module; g i The importance weights for each branch network output by the depth gating module; f bi’ This represents the result of multiplying each branch feature by its corresponding weight; the Spatial attention fusion module is the spatial attention fusion module, f zThe final feature map is represented by Outputresults, which represents the prediction results of the multi-scale dilated convolutional network model for the input electrocardiogram signal. Here, N indicates that the detection result is normal, S indicates supraventricular arrhythmia, V indicates ventricular arrhythmia, and F indicates a fusion arrhythmia of supraventricular and ventricular arrhythmia.

[0121] In some embodiments of the present invention, in S401, in order to obtain multiple weights of basic features in multiple branch networks according to the depth gating module, such as Figure 6 As shown, Figure 6 A flowchart illustrating an embodiment of obtaining the weights of a branch network provided by the present invention includes:

[0122] S601: Adjust the number of output tags of the depth gating module based on the number of branch networks;

[0123] S602: Input the basic features into the deep gating module to obtain multiple unlabeled probabilities corresponding to the number of output labels;

[0124] S603: Use multiple unlabeled probabilities as weights for the branch network;

[0125] In this process, when the basic features are updated, the weights change based on the corresponding unlabeled probabilities.

[0126] In some embodiments of the present invention, the primary features extracted by the convolutional neural network are fed into the deep gating module, and the four unlabeled probabilities of its output are used as the weights when the four branch networks perform feature fusion. Since the design idea of ​​this gating network is similar to that of the self-attention mechanism, both of which use the input features to assign importance weights to the output and update them dynamically, thereby improving the generalization performance of the model.

[0127] In some embodiments of the present invention, in S402, in order to multiply multiple branch features and multiple weights and then input them into the spatial attention fusion module to obtain the final feature map of the electrocardiogram signal, such as... Figure 7 As shown, Figure 7 A flowchart illustrating the first embodiment of obtaining the final feature map provided by the present invention includes:

[0128] S701: Multiply the branch feature matrix by the weights to obtain the weighted branch feature matrix;

[0129] S702: Based on the spatial attention fusion module, the weighted branch feature matrix is ​​spliced ​​to obtain the final feature map of the electrocardiogram signal.

[0130] In some embodiments of the present invention, the spatial attention fusion module includes a first connection operation unit, a first average pooling unit, a max pooling unit, a second connection operation unit, a convolutional kernel unit, an activation function unit, a broadcast weighting unit, and a second average pooling unit; such as Figure 8 As shown, Figure 8 A schematic flowchart of the second embodiment of obtaining the final feature map provided by the present invention includes:

[0131] S801: Connect the weighted branch feature matrix in the second dimension according to the first connection operation unit to obtain the first connection fusion feature;

[0132] In some embodiments of the present invention, the concatenation operation (Cat operation) is a commonly used operation in feature fusion, especially in convolutional neural networks (CNNs) and other types of neural networks. The concatenation operation primarily involves joining two or more feature maps or feature vectors along a specific dimension.

[0133] S802: The first connection fusion feature is sequentially passed through the first average pooling unit, the maximum pooling unit, the second connection operation unit, the convolution kernel unit, the activation function unit, and the broadcast weighting unit to obtain the first splicing feature of the electrocardiogram signal;

[0134] S803: Feed the first concatenated feature back to the max pooling unit to update the parameters of the max pooling unit, and repeatedly iterate and fuse the first concatenated feature. Then, input the iteratively fused concatenated feature to the second average pooling unit to obtain the final feature map.

[0135] To clearly describe the process of obtaining the final feature map based on the spatial attention fusion module, such as Figure 9 As shown, Figure 9 This is a schematic diagram of the structure of an embodiment of the spatial attention fusion module provided by the present invention, wherein fbi' represents each branch feature with importance weights; Cat represents feature fusion based on Cat operation on the input features; fc represents the feature after cat feature fusion of fb1, fb2, fb3, and fb4; GAP represents global average pooling; GMP represents global max pooling; Conv1_1_1 represents a 1*1 convolutional kernel; Sigmoid represents the Sigmoid activation function; and Broadcast represents broadcast weighting.

[0136] In some embodiments of the present invention, the weights output by the gated network are multiplied by the feature matrices output by the branch networks to weight them. Then, the four weighted feature matrices are input into a feature fusion module incorporating a spatial attention mechanism. The weighted feature matrices output by the four branches are concatenated in the second dimension and then input into the spatial attention mechanism module. The output feature map is then broadcast weighted from high to low dimension to further extract features at different scales. Subsequently, the final fused feature matrix is ​​fed into a classification module for learning, and a loss function is calculated based on the classification results and standard results to optimize the model. The classification module takes input x as input... i The probability distribution P of the output is shown in the following equation:

[0137]

[0138] Where, x i Let y represent the i-th input ECG signal. i Let y represent the output label corresponding to the i-th ECG signal, and p be the model's label y. i Assign to input x i The probability, w n Here, C is the number of tag categories, and f is the parameter for class n. z This is the final feature map.

[0139] In this embodiment, the branch features are fused in a targeted manner through the spatial attention fusion module, which effectively ensures the adaptability of the final feature map and thus improves the reliability of the classification results of the electrocardiogram signal.

[0140] To better implement the electrocardiogram (ECG) signal classification method in the embodiments of the present invention, based on the ECG signal classification method, the embodiments of the present invention also provide an ECG signal classification device, such as... Figure 10 As shown, Figure 10 This is a schematic diagram of an embodiment of the electrocardiogram (ECG) signal classification device provided by the present invention. The ECG signal classification device 1000 includes:

[0141] Basic feature extraction component 1001 is used to extract basic features of electrocardiogram signals;

[0142] A multi-scale dilated convolution component 1002 is used to send basic features to a multi-scale dilated convolution network model, wherein the multi-scale branch module of the multi-scale dilated convolution network model includes multiple branch networks with different receptive fields, and the dilation convolution rate of the receptive field of at least one branch network is positively correlated with the current input signal length of the basic features.

[0143] Branch feature extraction component 1003 is used to determine multiple branch features of the basic features based on branch networks with multiple different receptive fields;

[0144] The classification label determination component 1004 is used to perform weighted fusion of multiple branch features and determine the classification label of the electrocardiogram signal based on the weighted fused features.

[0145] like Figure 11 As shown, Figure 11 The present invention provides a structural block diagram of an embodiment of an electrocardiogram (ECG) monitor 1100, which includes a processor 1101, a memory 1102, and a display 1103. Figure 11 Only some components of the ECG monitor 1100 are shown; however, it should be understood that implementation of all shown components is not required, and more or fewer components may be implemented instead.

[0146] In some embodiments, processor 1101 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 1102 or process data, such as the electrocardiogram signal classification method of the present invention.

[0147] In some embodiments, processor 1101 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 1101 may be local or remote. In some embodiments, processor 1101 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, inter-cloud, multi-cloud, or any combination thereof.

[0148] In some embodiments, the memory 1102 may be an internal storage unit of the electrocardiogram monitor 1100, such as a hard disk or memory of the electrocardiogram monitor 1100. In other embodiments, the memory 1102 may also be an external storage device of the electrocardiogram monitor 1100, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electrocardiogram monitor 1100.

[0149] Furthermore, the memory 1102 may include both internal storage units of the electrocardiogram monitor 1100 and external storage devices. The memory 1102 is used to store the application software and various types of data installed on the electrocardiogram monitor 1100.

[0150] In some embodiments, display 1103 may be an LED display, a liquid crystal display, a touch-screen liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 1103 is used to display information from the electrocardiogram monitor 1100 and to display a visual user interface. Components 1101-1103 of the electrocardiogram monitor 1100 communicate with each other via a system bus.

[0151] In one embodiment, when processor 1101 executes a classification program for electrocardiogram signals in memory 1102, the following steps can be implemented:

[0152] Extracting the basic features of electrocardiogram signals;

[0153] The basic features are sent to a multi-scale dilated convolutional network model, wherein the multi-scale branch module of the multi-scale dilated convolutional network model includes multiple branch networks with different receptive fields, and the dilation rate of the receptive field of at least one branch network is positively correlated with the current input signal length of the basic features.

[0154] Multiple branch features of the basic feature are determined based on a branch network with multiple different receptive fields;

[0155] Multiple branch features are weighted and fused, and the classification label of the electrocardiogram signal is determined based on the weighted and fused features.

[0156] It should be understood that when the processor 1101 executes the electrocardiogram signal classification program in the memory 1102, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.

[0157] Furthermore, this embodiment of the invention does not specifically limit the type of the electrocardiogram (ECG) monitor 1100 mentioned. The ECG monitor 1100 can be a portable electronic device such as a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, or laptop computer. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the invention, the ECG monitor 1100 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0158] Accordingly, this application also provides a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions of the electrocardiogram signal classification methods provided in the above-described method embodiments.

[0159] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0160] The above provides a detailed description of the electrocardiogram signal classification method, apparatus, electronic device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for classifying electrocardiogram (ECG) signals, characterized in that, include: Extracting the basic features of electrocardiogram signals; The basic features are sent to a multi-scale dilated convolutional network model, wherein the multi-scale branch module of the multi-scale dilated convolutional network model includes multiple branch networks with different receptive fields, and the dilation rate of the receptive field of at least one branch network is positively correlated with the current input signal length of the basic features. Based on the branch networks with multiple different receptive fields, multiple branch features of the basic feature are determined; The multiple branch features are weighted and fused, and the classification label of the electrocardiogram signal is determined based on the weighted and fused features; The multi-scale dilated convolutional network model includes a depth gating module, a spatial attention fusion module, and a classification module; the step of weighting and fusing the features of the multiple branches and determining the classification label of the electrocardiogram signal based on the weighted features includes: The deep gating module obtains multiple weights of the basic features in multiple branch networks; The number of output tags of the depth gating module is adjusted based on the number of branch networks; The basic features are input into the depth gating module to obtain multiple unlabeled probabilities corresponding to the number of output labels; The plurality of unlabeled probabilities are used as the weights of the branch network; When the basic features are updated during the iteration process, the weights change accordingly based on the unlabeled probability.

2. The method for classifying electrocardiogram signals according to claim 1, characterized in that, Before extracting the basic features of an electrocardiogram (ECG) signal, the following steps are also included: The baseline drift of the initial electrocardiogram signal is removed by high-pass filtering, and the initial electrocardiogram signal is denoised by an improved threshold wavelet denoising method to obtain a denoised electrocardiogram signal. Locate the R peak of the denoised electrocardiogram signal to obtain the heartbeat of the denoised electrocardiogram signal; The heartbeats are segmented to obtain the preprocessed electrocardiogram signal.

3. The method for classifying electrocardiogram signals according to claim 1, characterized in that, When the multi-scale branching module includes four branch networks, the dilated convolution rates are as follows: in, For the first i The dilated convolution rate is L, the length of the current input signal is L, and [x] represents the rounding operation on x.

4. The method for classifying electrocardiogram signals according to claim 1, characterized in that, The step of multiplying the multiple branch features and the multiple weights and then inputting the result into the spatial attention fusion module to obtain the final feature map of the electrocardiogram signal includes: Multiply the matrix of the branch features by the weights to obtain the weighted branch feature matrix; The spatial attention fusion module performs feature splicing on the weighted branch feature matrix to obtain the final feature map of the electrocardiogram signal.

5. The method for classifying electrocardiogram signals according to claim 4, characterized in that, The spatial attention fusion module includes a first connection operation unit, a first average pooling unit, a max pooling unit, a second connection operation unit, a convolution kernel unit, an activation function unit, a broadcast weighting unit, and a second average pooling unit; the step of performing feature concatenation on the weighted branch feature matrix according to the spatial attention fusion module to obtain the final feature map of the electrocardiogram signal includes: The first connection operation unit connects the weighted branch feature matrix in the second dimension to obtain the first connection fusion feature. The first connection fusion feature is sequentially passed through the first average pooling unit, the maximum pooling unit, the second connection operation unit, the convolution kernel unit, the activation function unit, and the broadcast weighting unit to obtain the first splicing feature of the electrocardiogram signal; The first spliced ​​feature is fed back into the max pooling unit to update the parameters of the max pooling unit, and the first spliced ​​feature is repeatedly iterated and fused. The iteratively fused spliced ​​feature is then input into the second average pooling unit to obtain the final feature map.

6. The method for classifying electrocardiogram signals according to claim 1, characterized in that, The training of the multi-scale dilated convolutional network model includes: The training dataset is input into the initial multi-scale dilated convolutional network model for iterative training. The loss value between the training prediction result and the actual result of the initial multi-scale dilated convolutional network model is calculated according to the cross-entropy loss function. The parameters of the initial multi-scale dilated convolutional network model are adjusted based on the loss value. The training is iterated to a preset number of times to obtain the fully trained multi-scale dilated convolutional network model. Wherein, the cross-entropy loss function L The expression is: in, N It is the total number of samples. C It is the total number of categories; Representing the true value, it is a one-hot encoded vector. If the... i Each sample belongs to the corresponding category. k ,but It is 1 if it is true, otherwise it is 0. It is the first of the models i Each predicted sample belongs to the category. k The probability, This is the final feature map.

7. An electrocardiogram signal classification device, characterized in that, include: A basic feature extraction component is used to extract basic features from electrocardiogram (ECG) signals. A multi-scale dilated convolution component is used to send the basic features to a multi-scale dilated convolution network model, wherein the multi-scale branch module of the multi-scale dilated convolution network model includes multiple branch networks with different receptive fields, and the dilation convolution rate of the receptive field of at least one branch network is positively correlated with the current input signal length of the basic features. A branch feature extraction component is used to determine multiple branch features of the basic feature based on the multiple branch networks with different receptive fields; A classification label determination component is used to perform weighted fusion of the multiple branch features and determine the classification label of the electrocardiogram signal based on the weighted fused features; The multi-scale dilated convolutional network model includes a depth gating module, a spatial attention fusion module, and a classification module; the step of weighting and fusing the features of the multiple branches and determining the classification label of the electrocardiogram signal based on the weighted features includes: The deep gating module obtains multiple weights of the basic features in multiple branch networks; The number of output tags of the depth gating module is adjusted based on the number of branch networks; The basic features are input into the depth gating module to obtain multiple unlabeled probabilities corresponding to the number of output labels; The plurality of unlabeled probabilities are used as the weights of the branch network; When the basic features are updated during the iteration process, the weights change accordingly based on the unlabeled probability.

8. An electrocardiogram (ECG) monitor, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the electrocardiogram signal classification method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Signal feature extraction method and device based on dynamic expansion convolution

    CN118734033A

  • Single-lead electrocardiogram arrhythmia detection method and system based on adaptive attention

    CN119046724A