A multi-task deep learning method for ECG signal analysis

By integrating the ECG signal denoising and arrhythmia recognition tasks through a multi-task deep learning method, and utilizing a bidirectional deep feature extraction model and a feature pyramid network, the problem of unified processing of signal quality optimization and arrhythmia recognition in ECG signal analysis is solved, thereby improving the robustness and accuracy of signal analysis.

CN120345904BActive Publication Date: 2025-09-12EAST CHINA JIAOTONG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510865831.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-09-12
Estimated Expiration
2045-06-26

AI Technical Summary

Technical Problem

Existing technologies lack a unified multi-task collaborative processing framework and are unable to effectively balance ECG signal quality optimization, heart rate feature extraction, and arrhythmia recognition. Especially when faced with real challenges such as inter-class imbalance, easy confusion of minor anomalies, and strong noise interference, traditional methods exhibit weak generalization ability and poor robustness.

Method used

A multi-task deep learning method is adopted. Through a bidirectional deep feature extraction model and a feature pyramid network structure, signal denoising and arrhythmia recognition tasks are integrated. Convolutional autoencoders are used to suppress noise, and a multi-scale feature fusion strategy is constructed to improve the robustness and accuracy of signal processing.

Benefits of technology

It significantly reduces deployment cost and complexity, improves the real-time and stability of ECG signal analysis, enhances the ability to identify pathological information, and improves the accuracy and robustness of abnormal heart rhythm identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120345904B_ABST
    Figure CN120345904B_ABST
Patent Text Reader

Abstract

The present invention proposes a multi-task deep learning method for ECG signal analysis, which includes: obtaining the original ECG signal, preprocessing the original ECG signal to obtain a standardized noisy ECG signal, using a bidirectional deep feature extraction model to perform denoising on the standardized noisy ECG signal to obtain a reconstructed ECG signal, using the second-stage bidirectional deep feature extraction model to extract and optimize the reconstructed ECG signal to obtain optimized multi-scale features, and using the optimized multi-scale features to construct an arrhythmia classification task and a heart rate detection task, respectively, to obtain an arrhythmia classification result and a heart rate prediction value. The present invention innovatively integrates three ECG processing tasks into the same deep learning method, solving the drawback of traditional methods requiring separate task modeling, significantly reducing deployment costs and complexity, and improving the real-time and stability of practical applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical artificial intelligence and bioelectric signal processing technology, and in particular to a multi-task deep learning method for electrocardiogram signal analysis. Background Art

[0002] The electrocardiogram (ECG), a standard method for assessing cardiac electrical activity, is widely used to detect and monitor various cardiac abnormalities, including arrhythmias, bradycardia, and tachycardia. ECG signals consist of a series of waveforms, such as the P wave, QRS complex, T wave, and RR interval. Variations in the timing and amplitude of these waveform features reflect the electrical activity of the heart at different stages. Accurately detecting abnormalities in these waveforms helps promptly identify typical pathological conditions such as atrial fibrillation (AFIB), sinus arrhythmia (SR), and supraventricular tachycardia (GSVT). However, ECG signals are often contaminated by multiple sources of noise, including baseline drift, power frequency interference, and myoelectric noise, which seriously affects the accuracy of subsequent analysis. Therefore, efficient denoising techniques (such as wavelet transform, PCA, adaptive filtering, and EMD) are crucial in the preprocessing of ECG signals.

[0003] The current mainstream ECG analysis process typically adopts a phased strategy: first, the signal is preprocessed for denoising, and then tasks such as heart rate detection and arrhythmia classification are performed. During the classification process, commonly used technical approaches include machine learning methods based on artificial feature extraction (such as SVM, KNN, and decision trees) or shallow deep networks. These methods rely on empirically driven waveform analysis (such as RR intervals and QRS morphology). In practical applications, there are two prominent problems: first, the model over-relies on artificial features and has difficulty adapting to the variability of ECG signals between different individuals; second, the signal preprocessing and classification stages are separated, which can easily cause errors in the former stage to be amplified in subsequent tasks. Furthermore, due to the independent design of task modules, classification models often cannot fully utilize intermediate information from signal denoising or heart rate detection, affecting overall performance and deployment efficiency.

[0004] Currently, there is a lack of a unified, multi-task collaborative analysis framework that can simultaneously optimize signal quality, extract heart rate features, and identify arrhythmias. Traditional methods exhibit weaknesses such as weak generalization and robustness when faced with real-world challenges such as inter-class imbalance, confusion between minor anomalies, and strong noise interference. Therefore, there is an urgent need for an end-to-end model with deep feature learning capabilities to jointly model and integrate ECG signals. Summary of the Invention

[0005] In view of the above situation, the main purpose of this invention is to propose a multi-task deep learning method for ECG signal analysis to solve the above technical problems.

[0006] The present invention proposes a multi-task deep learning method for electrocardiogram signal analysis, which includes the following steps:

[0007] Step 1: Obtain the original ECG signal, pre-process the original ECG signal, and obtain a standardized noisy ECG signal;

[0008] Step 2: In the first stage, the standardized noisy ECG signal is denoised using the bidirectional deep feature extraction model to obtain a reconstructed ECG signal. The mean square error is constructed based on the reconstructed ECG signal. The mean square error is used as the loss function to train the bidirectional deep feature extraction model, thereby obtaining the bidirectional deep feature extraction model after the first stage of training.

[0009] Step 3. In the second stage, the parameters of the bidirectional deep feature extraction model trained in the first stage are extracted as initialization weights and embedded into the bidirectional deep feature extraction model to obtain the bidirectional deep feature extraction model of the second stage. The bidirectional deep feature extraction model of the second stage is used to extract and optimize the reconstructed ECG signal to obtain the optimized multi-scale features.

[0010] Step 4: Based on the classifier and multi-layer perceptron, the optimized multi-scale features are used to construct the arrhythmia classification task and the heart rate detection task respectively, and the arrhythmia classification results and heart rate prediction values ​​are obtained respectively.

[0011] Compared with the prior art, the present invention has the following beneficial effects:

[0012] 1. A unified multi-task learning framework. This invention innovatively integrates three core ECG processing tasks into a single deep learning method, addressing the drawbacks of traditional methods that require separate task modeling. This significantly reduces deployment cost and complexity, and improves the real-time performance and stability of practical applications.

[0013] 2. Multi-scale feature fusion strategy. This paper introduces the concept of feature pyramid network structure to build a bidirectional deep feature extraction model, realizing the fusion expression of multi-dimensional and multi-scale information. This enables the model to simultaneously capture subtle rhythm changes and global trends in the ECG waveform, improving the accuracy and robustness of abnormal rhythm recognition.

[0014] 3. Noise reduction and classification are collaboratively optimized, utilizing the signal restoration mechanism of convolutional autoencoders to significantly suppress noise such as baseline drift and electromyographic interference; the bidirectional deep feature extraction model effectively improves the sensitivity of classification and detection tasks to abnormal ECG patterns by sharing features, thereby enhancing the ability to identify pathological information.

[0015] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is a flowchart of the steps of a multi-task deep learning method for ECG signal analysis proposed by the present invention;

[0017] Figure 2 This is a method framework diagram of a multi-task deep learning method for ECG signal analysis proposed in the present invention;

[0018] Figure 3 This is a model architecture diagram of the bidirectional deep feature extraction model proposed in this invention. DETAILED DESCRIPTION

[0019] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.

[0020] These and other aspects of the embodiments of the present invention will become clear with reference to the following description and accompanying drawings. In these descriptions and accompanying drawings, some specific implementations of the embodiments of the present invention are specifically disclosed to illustrate some ways of implementing the principles of the embodiments of the present invention, but it should be understood that the scope of the embodiments of the present invention is not limited thereto.

[0021] See also Figure 1 This embodiment provides a multi-task deep learning method for ECG signal analysis, which includes the following steps:

[0022] Step 1: Obtain the original ECG signal, preprocess the original ECG signal, and obtain a standardized noisy ECG signal.

[0023] See also Figure 2 In step 1, the original ECG signal is obtained and preprocessed to obtain a standardized noisy ECG signal, which specifically includes the following sub-steps:

[0024] Obtain the original ECG signal, resample the original ECG signal to obtain a resampled ECG signal, and perform noise addition on the resampled ECG signal to obtain a noisy ECG signal. The following relationship exists in the corresponding process:

[0025] ;

[0026] in, represents the noisy ECG signal, represents the original ECG signal, represents the low-frequency baseline drift noise, represents a random factor, represents the random factor that controls the intensity of low-frequency baseline drift noise, Indicates power frequency interference noise, Represents the random factor that controls the intensity of power frequency interference noise, represents the myoelectric interference noise, Represents the random factor that controls the intensity of myoelectric interference noise;

[0027] The resampled ECG signal is normalized to obtain a normalized resampled ECG signal. The following relationship exists in the corresponding process:

[0028] ;

[0029] in, Represents the normalized resampled ECG signal, and the normalized resampled ECG signal is used as the true label; represents the mean value of the original ECG signal, Indicates the standard deviation of the original ECG signal;

[0030] The noisy ECG signal is normalized to obtain a normalized noisy ECG signal. The following relationship exists in the corresponding process:

[0031] ;

[0032] in, represents the normalized noisy ECG signal, represents the mean value of the noisy ECG signal, Represents the standard deviation of the noisy ECG signal.

[0033] It should be noted that in Figure 2 In the model, SB represents sinus bradycardia, SR represents sinus rhythm, AFIB represents atrial fibrillation, GSVT represents general supraventricular tachycardia, and BDFE represents a bidirectional deep feature extraction model. The present invention simulates a real-world acquisition environment by adding a variety of common interference noises to the original ECG signal, specifically including low-frequency baseline drift, power frequency interference, myoelectric interference, and random noise. These noises are superimposed on the original signal in the time domain, and the amplitude of each noise is dynamically adjusted by introducing a random factor, thereby enhancing the diversity and complexity of the data. The generated noisy signal is used to train the model, so that it can still accurately extract key features reflecting the physiological state when faced with actual complex noise conditions, thereby improving overall robustness and generalization capabilities.

[0034] Step 2. In the first stage, the bidirectional deep feature extraction model is used to perform denoising on the standardized noisy ECG signal to obtain a reconstructed ECG signal. The mean square error is constructed based on the reconstructed ECG signal. The mean square error is used as the loss function to train the bidirectional deep feature extraction model to obtain the bidirectional deep feature extraction model after the first stage training.

[0035] See also Figure 3 In step 2, in the first stage, the standardized noisy ECG signal is denoised using the bidirectional deep feature extraction model to obtain a reconstructed ECG signal. The mean square error is constructed based on the reconstructed ECG signal, and the mean square error is used as the loss function to train the bidirectional deep feature extraction model. The bidirectional deep feature extraction model after the first stage of training is obtained. The corresponding process has the following relationship:

[0036] ;

[0037] in, represents the mean square error, represents the total number of samples, represents the index of the sample, Indicates the The input features of samples, Indicates the The prediction results of samples, Indicates the The true labels of the samples.

[0038] It should be noted that the bidirectional deep feature extraction model is constructed by embedding a self-attention mechanism within a convolutional autoencoder based on the concept of a feature pyramid network. The concept behind the feature pyramid network is to significantly improve detection performance while maintaining efficiency by constructing a top-down, horizontally connected feature pyramid, particularly for small object detection.

[0039] Specifically, when using the bidirectional deep feature extraction model to process the input features, the following sub-steps are included:

[0040] The input features are sequentially passed through 7 layers of convolutional autoencoders to gradually extract multi-scale features, and the self-attention mechanism is embedded in the last 3 convolutional layers. The following relationship exists in the corresponding process:

[0041] ;

[0042] in, represents the query matrix, represents the bond matrix, represents the value matrix, Indicates that it has been processed by the softmax activation function. represents transpose, represents the dimension of the key vector;

[0043] The output features of the last four layers of encoders are used as C-layer features, and one-dimensional convolution operations are performed on the four C-layer features to obtain four P-layer features respectively;

[0044] The four P-layer features are upsampled twice to obtain four initial Q-layer features respectively;

[0045] The four initial Q-layer features are horizontally fused to obtain four Q-layer features;

[0046] The four Q-layer features are downsampled by two times to obtain four initial N-layer features;

[0047] The four initial N-layer features are horizontally fused and residually connected with the four C-layer features to obtain four N-layer features;

[0048] Based on the four N-layer features, the difference between each N-layer feature is calculated to obtain the difference between the N-layer features. The following relationship exists in the corresponding process:

[0049] ;

[0050] in, Indicates the Nth layer Features and N layers The difference of the features, Indicates the Nth layer Features, Indicates the Nth layer Features

[0051] The difference between the N layers of features is averaged to obtain a difference map. The following relationship exists in the corresponding process:

[0052] ;

[0053] in, represents a difference map;

[0054] The difference map is processed in sequence through a three-dimensional convolution operation, a ReLU activation function, a one-dimensional convolution operation, and a Sigmoid activation function to obtain an attention weight map. The following relationship exists in the corresponding process:

[0055] ;

[0056] in, represents the attention weight map, Indicates that it has been processed by the Sigmoid activation function. Indicates that after one-dimensional convolution operation, Indicates that it has been processed by the ReLU activation function. Indicates that it has undergone a three-dimensional convolution operation;

[0057] The four N-layer features are weightedly fused and averaged to obtain the output features. The following relationship exists in the corresponding process:

[0058] ;

[0059] in, represents the output features, represents element-wise multiplication, Represents the mean of the four N-layer features.

[0060] It should be noted that, in the step of horizontally fusing the four initial Q-layer features to obtain four Q-layer features, the specific operation is to directly use the first initial feature of the Q layer as the first feature of the Q layer; fuse the first initial feature of the Q layer with the second initial feature of the Q layer to obtain the second feature of the Q layer, and so on, to obtain four Q-layer features; when horizontally fusing the four initial N-layer features, the operation is the same as that of horizontally fusing the four initial Q-layer features.

[0061] Furthermore, the power of the normalized original ECG signal is calculated, and the following relationship exists in the corresponding process:

[0062] ;

[0063] in, represents the power of the normalized original ECG signal, Represents the normalized original ECG signal sampling points;

[0064] Calculate the power of the normalized noisy ECG signal. The following relationship exists in the corresponding process:

[0065] ;

[0066] in, represents the power of the normalized noisy ECG signal, Represents the normalized noisy ECG signal sampling points;

[0067] Calculate the power of the reconstructed ECG signal. The following relationship exists in the corresponding process:

[0068] ;

[0069] in, represents the power of the reconstructed ECG signal, Represents the reconstructed ECG signal sampling points;

[0070] Calculate the signal-to-noise ratio of the normalized original ECG signal and the normalized noisy ECG signal. The following relationship exists in the corresponding process:

[0071] ;

[0072] in, It represents the signal-to-noise ratio of the normalized original ECG signal to the normalized noisy ECG signal. Indicates taking logarithm;

[0073] Calculate the signal-to-noise ratio of the normalized original ECG signal and the reconstructed ECG signal. The following relationship exists in the corresponding process:

[0074] ;

[0075] in, Represents the signal-to-noise ratio of the reconstructed ECG signal to the normalized original ECG signal;

[0076] The signal noise reduction effect is evaluated based on the signal-to-noise ratio of the normalized original ECG signal and the normalized noisy ECG signal, as well as the signal-to-noise ratio of the reconstructed ECG signal and the normalized original ECG signal.

[0077] Step 3. In the second stage, the parameters of the bidirectional deep feature extraction model trained in the first stage are extracted as initialization weights and embedded into the bidirectional deep feature extraction model to obtain the bidirectional deep feature extraction model of the second stage. The bidirectional deep feature extraction model of the second stage is used to extract and optimize the reconstructed ECG signal to obtain the optimized multi-scale features.

[0078] In step 3, in the second stage, the parameters of the bidirectional deep feature extraction model trained in the first stage are extracted as initialization weights and embedded into the bidirectional deep feature extraction model to obtain the bidirectional deep feature extraction model of the second stage. The bidirectional deep feature extraction model of the second stage is used to extract and optimize the reconstructed ECG signal to obtain the optimized multi-scale features, which specifically includes the following sub-steps:

[0079] In the second stage, the parameters of the bidirectional deep feature extraction model trained in the first stage are extracted as initialization weights and embedded into the bidirectional deep feature extraction model to obtain the bidirectional deep feature extraction model of the second stage. The following relationship exists in the corresponding process:

[0080] ;

[0081] in, Represents the parameters after the first stage of training is completed, Indicates taking the minimum value, represents the original parameters of the bidirectional deep feature extraction model, Indicates feature extraction through bidirectional deep feature extraction model, Indicates the corresponding supervision target;

[0082] Specifically, the parameters of the bidirectional deep feature extraction model after the first stage of training are extracted, including weights and biases.

[0083] The bidirectional deep feature extraction model in the second stage is used to extract and optimize the reconstructed ECG signal to obtain optimized multi-scale features.

[0084] It should be noted that when entering the second stage of training, the parameters of the bidirectional deep feature extraction model trained in the first stage are used as initial weights and embedded into the overall model structure of the second stage. The main task of the second stage is feature extraction and optimization. By introducing the reconstructed data generated by the first stage as input, this reconstructed data is generated from the preliminary features extracted in the first stage. After noise reduction and structural restoration, it can provide a cleaner and more structured input signal for the second stage.

[0085] By initializing with trained parameters, the bidirectional deep feature extraction model has a preliminary understanding of the input data from the beginning of the second phase, helping to further discover deeper and more discriminative feature information. Compared to starting training with random weights, this approach significantly improves model convergence speed and training stability.

[0086] Through the above-mentioned phased training strategy, not only the quality and diversity of feature representation are improved, but also the generalization ability and robustness of the model in handling complex tasks are significantly enhanced, laying a solid foundation for high-precision modeling of subsequent tasks.

[0087] Step 4: Based on the classifier and multi-layer perceptron, the optimized multi-scale features are used to construct the arrhythmia classification task and the heart rate detection task respectively to obtain the arrhythmia classification results and the heart rate prediction value respectively.

[0088] In step 4, based on the classifier and the multi-layer perceptron, the optimized multi-scale features are used to construct the arrhythmia classification task and the heart rate detection task respectively, and the arrhythmia classification results and heart rate prediction values ​​are obtained respectively. The specific sub-steps include the following:

[0089] A classifier is constructed based on a two-layer fully connected network, and the classifier is used to classify arrhythmias based on the optimized multi-scale features to obtain the arrhythmia results. The following relationship exists in the corresponding process:

[0090] ;

[0091] in, Indicates the Layer neurons, Indicates the The number of all neurons in the layer, Indicates that from The first layer neurons to the Layer The connection weights of neurons, Indicates the Layer neurons, Indicates the Layer The bias of a neuron, Indicates the first elements, Indicates the first elements;

[0092] The optimized multi-scale features are used to detect the heart rate using a multi-layer perceptron to obtain the heart rate prediction value.

[0093] Furthermore, based on the arrhythmia classification results, the accuracy, F1 value and confusion matrix are respectively constructed, and the accuracy, F1 value and confusion matrix are used as evaluation indicators of the arrhythmia classification results. Based on the heart rate prediction value, the mean absolute error and determination coefficient are respectively constructed, and the mean absolute error and determination coefficient are used as evaluation indicators of the heart rate prediction value. Specifically, the following sub-steps are included:

[0094] The accuracy is constructed based on the arrhythmia classification results. The following relationship exists in the corresponding process:

[0095] ;

[0096] in, Indicates accuracy, Indicates the The predicted labels of samples, Indicates that it has been processed by the indicator function, and takes 1 when the value in the brackets is true, otherwise it takes 0;

[0097] The F1 value is constructed based on the arrhythmia classification results. The following relationship exists in the corresponding process:

[0098] ;

[0099] in, Indicates the prediction for The accuracy of the class, The correct prediction is The number of samples of the class, Indicates that the wrong prediction is The number of samples of the class, represents the index of the category, Indicates the The recall rate of correctly identified classes, Indicates the The number of samples in the class that are incorrectly predicted to be negative but are actually positive, Indicates the The F1 value of the class, It represents the average F1 value of all categories. Indicates the total number of categories;

[0100] The confusion matrix is ​​constructed based on the arrhythmia classification results. The following relationship exists in the corresponding process:

[0101] ;

[0102] in, The true category is Predicted to be The number of samples;

[0103] It should be noted that the confusion matrix is ​​a tool used to evaluate the performance of classification models. It shows the relationship between the model prediction results and the actual results in the form of a matrix.

[0104] The mean absolute error is constructed based on the heart rate prediction value, and the following relationship exists in the corresponding process:

[0105] ;

[0106] in, represents the mean absolute error;

[0107] The determination coefficient is constructed based on the heart rate prediction value, and the following relationship exists in the corresponding process:

[0108] ;

[0109] in, represents the coefficient of determination, which is used to indicate the proportion of the variability explained by the optimized bidirectional deep feature extraction model to the total variability; Represents the mean of the true values.

[0110] It should be understood that, although the various steps in the flow chart of each embodiment of the present invention are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0111] It should be understood that various components of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having logic gate circuits for implementing logic functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field-programmable gate array (FPGA), etc.

[0112] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0113] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A multi-task deep learning method for ECG signal analysis, characterized by: The method comprises the following steps: Step 1: preprocess the original ECG signal to obtain a standardized noisy ECG signal; Step 2: In the first stage, the bidirectional deep feature extraction model is used to perform denoising on the standardized noisy ECG signal to obtain a reconstructed ECG signal. The mean square error is constructed based on the reconstructed ECG signal. The mean square error is used as the loss function to train the bidirectional deep feature extraction model, and the bidirectional deep feature extraction model after the first stage training is obtained. Step 3. In the second stage, the parameters of the bidirectional deep feature extraction model trained in the first stage are extracted as initialization weights and embedded into the bidirectional deep feature extraction model to obtain the bidirectional deep feature extraction model of the second stage. The bidirectional deep feature extraction model of the second stage is used to extract and optimize the reconstructed ECG signal to obtain the optimized multi-scale features. Step 4: Based on the classifier and the multi-layer perceptron, the optimized multi-scale features are used to construct the arrhythmia classification task and the heart rate detection task respectively, so as to obtain the arrhythmia classification result and the heart rate prediction value respectively; Among them, when using the bidirectional deep feature extraction model to process the input features, the following sub-steps are specifically included: The input features are sequentially passed through a 7-layer convolutional autoencoder to gradually extract multi-scale features, and a self-attention mechanism is embedded in the last 3 convolutional layers; The output features of the last four layers of encoders are used as C-layer features, and one-dimensional convolution operations are performed on the four C-layer features to obtain four P-layer features respectively; The four P-layer features are upsampled twice to obtain four initial Q-layer features respectively; The four initial Q-layer features are horizontally fused to obtain four Q-layer features; The four Q-layer features are downsampled by two times to obtain four initial N-layer features; The four initial N-layer features are horizontally fused and residually connected with the four C-layer features to obtain four N-layer features; Based on the four N-layer features, the difference between each N-layer feature is calculated to obtain the difference between the N-layer features; Calculate the mean of the differences between N layers of features to obtain a difference map; The difference map is sequentially processed by three-dimensional convolution operation, ReLU activation function processing, one-dimensional convolution operation and activation function processing to obtain the attention weight map; The four N-layer features are weightedly fused and the mean is calculated to obtain the output features.

2. The multi-task deep learning method for ECG signal analysis according to claim 1, characterized in that: In step 1, the original ECG signal is preprocessed to obtain a standardized noisy ECG signal, which specifically includes the following sub-steps: Resampling the original ECG signal to obtain a resampled ECG signal, and performing noise addition processing on the resampled ECG signal to obtain a noisy ECG signal; performing normalization processing on the resampled ECG signal to obtain a normalized resampled ECG signal; The noisy ECG signal is normalized to obtain a normalized noisy ECG signal.

3. The multi-task deep learning method for ECG signal analysis according to claim 2, characterized in that: In the steps of resampling the original ECG signal to obtain a resampled ECG signal, and performing noise addition on the resampled ECG signal to obtain a noisy ECG signal, the following relationship exists: ; in, represents the noisy ECG signal, represents the original ECG signal, represents the low-frequency baseline drift noise, represents a random factor, represents the random factor that controls the intensity of low-frequency baseline drift noise, Indicates power frequency interference noise, Represents the random factor that controls the intensity of power frequency interference noise, represents the myoelectric interference noise, Represents the random factor that controls the intensity of myoelectric interference noise; In the step of normalizing the resampled ECG signal to obtain the standardized resampled ECG signal, the following relationship exists: ; in, represents the normalized resampled ECG signal, represents the mean of the resampled ECG signal, Represents the standard deviation of the resampled ECG signal; In the step of normalizing the noisy ECG signal to obtain the normalized noisy ECG signal, the following relationship exists: ; in, represents the normalized noisy ECG signal, represents the mean value of the noisy ECG signal, Represents the standard deviation of the noisy ECG signal.

4. The multi-task deep learning method for ECG signal analysis according to claim 3, characterized in that: In step 2, in the first stage, the standardized noisy ECG signal is subjected to denoising using the bidirectional deep feature extraction model to obtain a reconstructed ECG signal. A mean square error is constructed based on the reconstructed ECG signal, and the mean square error is used as a loss function to train the bidirectional deep feature extraction model to obtain a bidirectional deep feature extraction model after the first stage of training. The following relationship exists in the corresponding process: ; in, represents the mean square error, represents the total number of samples, represents the index of the sample, Indicates the The input features of samples, Indicates the The prediction results of samples, Indicates the The true labels of the samples.

5. The multi-task deep learning method for ECG signal analysis according to claim 1, characterized in that: In the steps of passing the input features through the 7-layer convolutional autoencoder to gradually extract multi-scale features and embedding the self-attention mechanism in the last 3 convolutional layers, the following relationship exists: ; in, represents the query matrix, represents the bond matrix, represents the value matrix, Indicates that it has been processed by the softmax activation function. represents transpose, represents the dimension of the key vector; In the step of performing difference calculation on each N-layer feature based on four N-layer features to obtain the difference between the N-layer features, the following relationship exists: ; in, Indicates the Nth layer Features and N layers The difference of the features, Indicates the Nth layer Features, Indicates the Nth layer Features In the step of calculating the mean of the differences between N layers of features to obtain a difference map, the following relationship exists: ; in, represents a difference map; In the steps of sequentially subjecting the difference map to a three-dimensional convolution operation, ReLU activation function processing, and one-dimensional convolution operation and activation function processing to obtain the attention weight map, the following relationship exists: ; in, represents the attention weight map, Indicates that it has been processed by the Sigmoid activation function. Indicates that after one-dimensional convolution operation, Indicates that it has been processed by the ReLU activation function. Indicates that it has undergone a three-dimensional convolution operation; In the steps of performing attention-weighted fusion on the four N-layer features and calculating the mean to obtain the output features, the following relationship exists: ; in, represents the output features, represents element-wise multiplication, Represents the mean of the four N-layer features.

6. The multi-task deep learning method for ECG signal analysis according to claim 5, characterized in that: In step 3, in the second stage, the parameters of the bidirectional deep feature extraction model trained in the first stage are extracted as initialization weights and embedded into the bidirectional deep feature extraction model to obtain the bidirectional deep feature extraction model of the second stage. The bidirectional deep feature extraction model of the second stage is used to extract and optimize the reconstructed ECG signal to obtain the optimized multi-scale features, which specifically includes the following sub-steps: In the second stage, the parameters of the bidirectional deep feature extraction model trained in the first stage are extracted as initialization weights and embedded into the bidirectional deep feature extraction model to obtain the bidirectional deep feature extraction model of the second stage. The following relationship exists in the corresponding process: ; in, Represents the parameters after the first stage of training is completed, Indicates taking the minimum value, represents the original parameters of the bidirectional deep feature extraction model, Indicates feature extraction through bidirectional deep feature extraction model, Indicates the corresponding supervision target; The bidirectional deep feature extraction model in the second stage is used to extract and optimize the reconstructed ECG signal to obtain optimized multi-scale features.

7. The multi-task deep learning method for ECG signal analysis according to claim 6, characterized in that: In step 4, based on the classifier and the multi-layer perceptron, the optimized multi-scale features are used to construct the arrhythmia classification task and the heart rate detection task respectively, and the arrhythmia classification result and the heart rate prediction value are obtained respectively. Specifically, the following sub-steps are included: A classifier is constructed based on a two-layer fully connected network, and the classifier is used to classify arrhythmias based on the optimized multi-scale features to obtain arrhythmia results; The optimized multi-scale features are used to detect the heart rate using a multi-layer perceptron to obtain the heart rate prediction value.

8. The multi-task deep learning method for ECG signal analysis according to claim 7, characterized in that: In the steps of constructing a classifier based on a two-layer fully connected network, using the classifier to classify arrhythmias based on the optimized multi-scale features, and obtaining arrhythmia results, the following relationship exists: ; in, Indicates the Layer neurons, Indicates the The number of all neurons in the layer, Indicates that from The first layer neurons to the Layer The connection weights of neurons, Indicates the Layer neurons, Indicates the Layer The bias of a neuron, Indicates the first elements, Indicates the first elements.

Citation Information

Patent Citations

  • Feature extraction method and device for multi-task model

    CN114037062A

  • Self-adaptive teaching strategy adjustment method based on sentiment analysis and computer device

    CN120086807A