Multi-task electrocardiogram analysis method and system based on deep learning and medium
By using static wavelet transform to generate feature points and attention mechanism guidance in electrocardiogram analysis, a multi-task electrocardiogram detection model is constructed, and the problems of insufficient accuracy and poor interpretability of electrocardiogram analysis in the existing technology are solved, and the problem of insufficient electrogram analysis and poor interpretability are realized. High precision and interpretability of electrocardiogram diagnosis.
Patent Information
- Application Number
- CN202411634924.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-01-03
AI Technical Summary
Existing electrocardiogram analysis methods are insufficient in diagnosing complex heart diseases and lack interpretability, resulting in misdiagnosis or misdiagnosis, and most methods fail to make full use of the relationship between electrocardiogram characteristics and disease pathology.
Using a multi-task electrocardiogram analysis method based on deep learning, the characteristic points are generated through static wavelet transformation, and combined with the dual-modal fusion module guided by attention mechanism, the electrocardiogram signal and characteristic points are fused to build a multi-task electrocardiogram detection model to improve diagnosis Accuracy and interpretability.
High diagnostic accuracy and model stability on the unbalanced data set are achieved, which reduces sensitivity to noise and data distribution changes, and significantly improves the interpretability of electrocardiogram analysis and the significance of diagnostic results.
Smart Images

Figure CN119235325A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical detection, and in particular to a multi-task electrocardiogram analysis method, system and medium for feature point positioning and disease detection based on deep learning. Background Art
[0002] Cardiovascular disease has become the main cause of rising morbidity and mortality among non-communicable diseases worldwide. According to relevant data, its wide range of harm and profound impact seriously threaten human health.
[0003] In addition, within just one year after the initial infection with COVID-19, patients' risk of cardiovascular disease increased significantly, including a significant increase in the incidence of diseases such as cardiac arrest and heart failure, which undoubtedly casts a shadow on the patients' lives and health.
[0004] In recent years, the emergence of electrocardiogram (ECG) and the continuous advancement of computer-assisted technology have greatly facilitated the assessment of patients' health conditions. ECG can obtain relevant information about the electrical activity of the heart, and computer-assisted technology can quickly process and analyze this information.
[0005] However, current technologies still have obvious shortcomings. For some complex heart diseases, the existing analysis methods still need to be further improved in terms of diagnostic accuracy, and often fail to accurately judge the condition, resulting in misdiagnosis or missed diagnosis. Moreover, most of these methods lack interpretability, and it is difficult for doctors and patients to clearly understand how the diagnosis results are obtained, which greatly affects the formulation and implementation of subsequent treatment plans.
[0006] Through searching patent documents, it is found that the Chinese patent with application number 201510520104.X discloses an intelligent ECG processing method based on deep neural network, which includes: a). signal normalization processing; b). determining the training sample space; c). determining the verification sample space; d). determining the neural network structure; e). determining the activation function and the target function; f). training the neural network; g). automatic analysis of the ECG signal. However, the patent directly inputs the waveform characteristics of the ECG signal as a whole into the model without considering the discrete feature set in the time domain, which lacks interpretability.
[0007] In November 2021, the 43rd IEEE International Annual Meeting of the Engineering in Medicine and Biology Society (EMBC) published a paper on page 591 titled "Arrhythmia Detection Based on Self-Supervised Learning of ECG Contours". This paper uses a method of training ECG feature points for downstream arrhythmia classification. However, this method requires a large amount of data, may lead to the loss of relevant information, and may not fully link ECG features to disease pathology.
[0008] In summary, in response to the above-mentioned problems of the prior art, studying a multi-task ECG analysis method and system for feature point positioning and disease detection based on deep learning has become a key task that needs to be solved urgently. Summary of the invention
[0009] In view of the defects in the prior art, the purpose of the present invention is to provide a multi-task electrocardiogram analysis method, system and medium based on deep learning.
[0010] A multi-task electrocardiogram analysis method based on deep learning provided by the present invention comprises the following steps:
[0011] Step S1, receiving the ECG data to be analyzed sent by the client, and preprocessing the ECG data to be analyzed to obtain the preprocessed ECG data to be analyzed;
[0012] Step S2, using the trained multi-task ECG detection model to perform arrhythmia recognition processing on the pre-processed ECG data to be analyzed, to obtain a recognition result;
[0013] Step S3, transmitting the recognition result to the terminal device.
[0014] Preferably, in step S1, preprocessing includes: data standardization and filtering processing.
[0015] Preferably, step S2 includes the following sub-steps:
[0016] Step S2.1, constructing a multi-task ECG detection model;
[0017] Step S2.2, constructing an ECG database;
[0018] Step S2.3, based on the ECG database, preprocessing the ECG database to obtain a preprocessed ECG database;
[0019] Step S2.4, for each ECG signal in the preprocessed ECG database, a static wavelet transform method is used to generate waveform feature points, and then the waveform feature points are stored together with the corresponding ECG signal in the ECG database to obtain an updated ECG database;
[0020] Step S2.5, using the updated ECG database, iteratively training the multi-task ECG detection model to obtain a trained multi-task ECG detection model;
[0021] Step S2.6, using the trained multi-task ECG detection model to perform arrhythmia recognition processing on the pre-processed ECG data to be analyzed, to obtain a recognition result.
[0022] Preferably, in step S2.1, the multi-task ECG detection model includes: a one-dimensional convolution feature extraction module, a bimodal fusion module guided by an attention mechanism, a feature point segmentation module and an arrhythmia disease classification module.
[0023] Preferably, step S2.2 includes: determining the type of heart disease based on the ECG data, labeling the entire arrhythmia type to obtain a diagnostic label, and constructing an ECG database.
[0024] Preferably, step S2.3 includes: ECG database preprocessing includes: data standardization and filtering processing.
[0025] Preferably, in step S2.4, the process of using the static wavelet transform method includes the following sub-steps:
[0026] Step S2.4.1, the waveform includes a QRS complex wave, a T wave and a P wave, the characteristic points of the QRS complex wave are obtained by QRS complex wave detection, the characteristic points of the T wave are obtained by T wave detection, the characteristic points of the P wave are determined by P wave detection, the peak points of each waveform are calculated, and the peak points are marked by a threshold-based sliding window research method;
[0027] Step S2.4.2, using the static wavelet transform method to calculate the start and end points of each waveform, the formula is as follows:
[0028]
[0029] Among them, φ j,k is the scaling function, ψ j,k (t) is the wavelet function, and the calculation formula is as follows:
[0030]
[0031] Where j is the scale parameter, k is the translation parameter, and the approximate coefficient c is obtained. j,k and detail factor d j,k , as shown in the following formula:
[0032]
[0033] Among them, the detail coefficient contains the high-frequency component of the signal, which is used to represent the sudden or rapidly changing information in the signal; the approximate coefficient represents the low-frequency component of the signal, which is used to reflect the overall trend of the signal. The calculated detail coefficient is further subjected to the sliding window method to obtain the starting point and end point of each waveform.
[0034] Preferably, in step S2.6: when performing arrhythmia recognition processing on the pre-processed ECG data to be analyzed, the following operations are performed using the trained multi-task ECG detection model:
[0035] The preprocessed ECG signal to be analyzed is input, and the fused features are obtained through a one-dimensional convolution feature extraction module and a bimodal fusion module guided by an attention mechanism. The feature point segmentation module segments the fused ECG signal waveform to obtain feature points corresponding to the waveform. The arrhythmia disease classification module uses the fused features and the feature points corresponding to the waveform for analysis and processing, and outputs recognition results including arrhythmia classification and waveform feature significance map.
[0036] The present invention also provides a multi-task electrocardiogram analysis system based on deep learning, comprising:
[0037] Model M1 receives the ECG data to be analyzed sent by the client, and preprocesses the ECG data to be analyzed to obtain the preprocessed ECG data to be analyzed;
[0038] Model M 2, using the trained multi-task ECG detection model to perform arrhythmia recognition processing on the pre-processed ECG data to be analyzed, to obtain a recognition result;
[0039] Model M 3, transmits the recognition result to the terminal device.
[0040] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-mentioned multi-task electrocardiogram analysis method based on deep learning.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] 1. The present invention adopts a dual-modal fusion method guided by an attention mechanism, which effectively realizes information fusion between different tasks, highlights the saliency map of diagnostic information, and effectively solves the problem of poor interpretability of ECG signal diagnosis. Even on an unbalanced data set containing a variety of heart diseases, high diagnostic accuracy is achieved.
[0043] 2. The present invention adopts an auxiliary task based on feature point positioning (generating feature points for model training through static wavelet transform), which solves the problems of model stability and robustness, and achieves the effect of reducing sensitivity to noise and data distribution changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0045] Figure 1 This is a flow chart of a multi-task electrocardiogram analysis method based on deep learning in an embodiment of the present invention;
[0046] Figure 2A diagram of a bimodal fusion module guided by an attention mechanism in an embodiment of the present invention;
[0047] Figure 3 This is the task ECG detection model training and reasoning process in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0049] The present invention proposes a multi-task ECG detection model based on deep learning. By combining ECG feature points with ECG waveforms, multi-label heart disease classification in complex scenarios is achieved. Feature points are generated by static wavelet transform for model training, and the feature points are fused with ECG signal waveform features using a bimodal fusion module guided by an attention mechanism to improve the classification performance of complex ECG diseases. At the same time, the feature points corresponding to the waveform are segmented to improve the interpretability of the model.
[0050] Embodiment 1:
[0051] This embodiment provides a multi-task electrocardiogram analysis method based on deep learning, including the following steps:
[0052] Step S1, receiving the ECG data to be analyzed sent by the client, and preprocessing the ECG data to be analyzed to obtain the preprocessed ECG data to be analyzed.
[0053] Specifically, preprocessing includes: data standardization and filtering.
[0054] Step S2, using the trained multi-task ECG detection model to perform arrhythmia recognition processing on the pre-processed ECG data to be analyzed, to obtain a recognition result.
[0055] Specifically, step S2 includes the following sub-steps:
[0056] Step S2.1, construct a multi-task ECG detection model.
[0057] In this embodiment, the multi-task ECG detection model includes: a one-dimensional convolution feature extraction module, a bimodal fusion module guided by an attention mechanism, a feature point segmentation module and an arrhythmia disease classification module.
[0058] The one-dimensional convolution feature extraction module is used to extract the preliminary features of the ECG data, the feature point segmentation module is used to segment the feature points corresponding to the waveform, and the arrhythmia disease classification module is used to classify the types of heart diseases.
[0059] Figure 2 This is a diagram of a bimodal fusion module guided by an attention mechanism in an embodiment of the present invention.
[0060] like Figure 2 As shown in Figure 1, the dual-modal fusion module is used to fuse feature information of different modalities.
[0061] Step S2.2, constructing an ECG database.
[0062] In this embodiment, the type of heart disease is determined based on the ECG data, and the type of arrhythmia in the entire segment is labeled to obtain a diagnostic label to construct an ECG database.
[0063] Step S2.3, based on the ECG database, preprocessing the ECG database is performed to obtain a preprocessed ECG database.
[0064] In this embodiment, the ECG database preprocessing includes: data standardization and filtering processing.
[0065] Step S2.4, for each ECG signal in the preprocessed ECG database, use the static wavelet transform method to generate the characteristic points of the waveform, and then save the characteristic points of the waveform together with the corresponding ECG signal in the ECG database to obtain an updated ECG database, which includes ECG signals, disease labels and characteristic point annotations.
[0066] Specifically, the process of using the static wavelet transform method includes the following sub-steps:
[0067] Step S2.4.1, the waveform includes a QRS complex wave, a T wave and a P wave. The characteristic points of the QRS complex wave are obtained by QRS complex wave detection, the characteristic points of the T wave are obtained by T wave detection, the characteristic points of the P wave are determined by P wave detection, and the peak points of each waveform are calculated. The peak points are marked by a threshold-based sliding window research method.
[0068] In this embodiment, the initial threshold is 0.5 times the maximum point in the maximum value sequence.
[0069] Step S2.4.2, the static wavelet transform (SWT) method is used to calculate the start and end points of each waveform, and the formula is as follows:
[0070]
[0071] Among them, φ j,k is the scaling function, ψ j,k (t) is the wavelet function, and the calculation formula is as follows:
[0072]
[0073] Where j is the scale parameter, k is the translation parameter, and the approximate coefficient c is obtained. j,k and detail factor d j,k , as shown in the following formula:
[0074]
[0075] Among them, the detail coefficient contains the high-frequency components of the signal, which is used to represent the sudden or rapidly changing information in the signal, such as the detailed characteristics of the wave; the approximate coefficient represents the low-frequency components of the signal, which is used to reflect the overall trend of the signal. The calculated detail coefficient is further subjected to the sliding window method to obtain the starting point and end point of each waveform.
[0076] Step S2.5, using the updated ECG database, iteratively train the multi-task ECG detection model to obtain a trained multi-task ECG detection model.
[0077] Step S2.6, using the trained multi-task ECG detection model to perform arrhythmia recognition processing on the pre-processed ECG data to be analyzed, to obtain a recognition result.
[0078] Figure 3 This is the task ECG detection model training and reasoning process in an embodiment of the present invention.
[0079] like Figure 3 As shown, when performing arrhythmia recognition processing on the pre-processed ECG data to be analyzed, the following operations are performed using the trained multi-task ECG detection model:
[0080] The preprocessed ECG signal to be analyzed is input, and the fused features are obtained through a one-dimensional convolution feature extraction module and a bimodal fusion module guided by an attention mechanism. The feature point segmentation module segments the fused ECG signal waveform to obtain feature points corresponding to the waveform. The arrhythmia disease classification module uses the fused features and the feature points corresponding to the waveform for analysis and processing, and outputs recognition results including arrhythmia classification and waveform feature significance map.
[0081] Step S3, transmitting the recognition result to the terminal device.
[0082] Embodiment 2:
[0083] The present embodiment provides a multi-task ECG analysis system based on deep learning. The multi-task ECG analysis system based on deep learning can be implemented by executing the process steps of the multi-task ECG analysis method based on deep learning, that is, those skilled in the art can understand the multi-task ECG analysis method based on deep learning as a preferred implementation of the multi-task ECG analysis system based on deep learning.
[0084] The multi-task ECG analysis system includes:
[0085] Model M1: receives the ECG data to be analyzed sent by the client, and preprocesses the ECG data to be analyzed to obtain the preprocessed ECG data to be analyzed;
[0086] Model M2 uses the trained multi-task ECG detection model to perform arrhythmia recognition on the pre-processed ECG data to be analyzed, and obtains the recognition result;
[0087] Model M3 transmits the recognition result to the terminal device.
[0088] Embodiment 3:
[0089] This embodiment provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the steps of a multi-task electrocardiogram analysis method based on deep learning in the above-mentioned embodiment 1 are implemented.
[0090] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0091] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A multi-task electrocardiogram analysis method based on deep learning, characterized in that: The following steps are involved: Step S1, receiving the ECG data to be analyzed sent by the client, and preprocessing the ECG data to be analyzed to obtain the preprocessed ECG data to be analyzed; Step S2, using the trained multi-task ECG detection model to perform arrhythmia recognition processing on the pre-processed ECG data to be analyzed to obtain a recognition result; Step S3: transmitting the recognition result to the terminal device.
2. A multi-task electrocardiogram analysis method based on deep learning according to claim 1, characterized in that: In the step S1, the preprocessing includes: data standardization and filtering processing.
3. The multi-task electrocardiogram analysis method based on deep learning according to claim 1, characterized in that: The step S2 includes the following sub-steps: Step S2.1, constructing a multi-task ECG detection model; Step S2.2, constructing an ECG database; Step S2.3, performing preprocessing of the ECG database based on the ECG database to obtain a preprocessed ECG database; Step S2.4, for each ECG signal in the preprocessed ECG database, a static wavelet transform method is used to generate waveform feature points, and then the waveform feature points are stored together with the corresponding ECG signal in the ECG database to obtain an updated ECG database; Step S2.5, using the updated ECG database, iteratively training the multi-task ECG detection model to obtain a trained multi-task ECG detection model; Step S2.6, using the trained multi-task ECG detection model to perform arrhythmia recognition processing on the pre-processed ECG data to be analyzed, to obtain a recognition result.
4. The multi-task electrocardiogram analysis method based on deep learning according to claim 3, characterized in that: In step S2.1, the multi-task ECG detection model includes: a one-dimensional convolution feature extraction module, a bimodal fusion module guided by an attention mechanism, a feature point segmentation module and an arrhythmia disease classification module.
5. The multi-task electrocardiogram analysis method based on deep learning according to claim 4, characterized in that: The step S2.2 includes: determining the type of heart disease based on the ECG data, labeling the entire arrhythmia type to obtain a diagnostic label, and constructing an ECG database.
6. A multi-task electrocardiogram analysis method based on deep learning according to claim 5, characterized in that: The step S2.3 includes: the ECG database preprocessing includes: data standardization and filtering processing.
7. A multi-task electrocardiogram analysis method based on deep learning according to claim 6, characterized in that: In step S2.4, the process of using the static wavelet transform method includes the following sub-steps: Step S2.4.1, the waveform includes a QRS complex wave, a T wave and a P wave, the characteristic points of the QRS complex wave are obtained by QRS complex wave detection, the characteristic points of the T wave are obtained by T wave detection, the characteristic points of the P wave are determined by P wave detection, the peak points of each waveform are calculated, and the peak points are marked by a threshold-based sliding window research method; Step S2.4.2, using the static wavelet transform method to calculate the start and end points of each waveform, the formula is as follows: Among them, φ j,k is the scaling function, ψ j,k (t) is the wavelet function, and the calculation formula is as follows: Where j is the scale parameter, k is the translation parameter, and the approximate coefficient c is obtained. j,k and detail factor d j,k , as shown in the following formula: Among them, the detail coefficient contains the high-frequency component of the signal, which is used to represent the sudden or rapidly changing information in the signal; the approximate coefficient represents the low-frequency component of the signal, which is used to reflect the overall trend of the signal. The calculated detail coefficient is further subjected to the sliding window method to obtain the starting point and end point of each waveform.
8. The multi-task electrocardiogram analysis method based on deep learning according to claim 7, characterized in that: In step S2.6: when performing arrhythmia recognition processing on the pre-processed ECG data to be analyzed, the following operations are performed using the trained multi-task ECG detection model: The preprocessed ECG signal to be analyzed is input, and the fused features are obtained through a one-dimensional convolution feature extraction module and a dual-modal fusion module guided by an attention mechanism. The feature point segmentation module segments the fused ECG signal waveform to obtain feature points corresponding to the waveform. The arrhythmia disease classification module uses the fused features and the feature points corresponding to the waveform for analysis and processing, and outputs recognition results including arrhythmia classification and waveform feature significance maps.
9. A multi-task electrocardiogram analysis system based on deep learning, characterized in that: include: Model M1: receiving the ECG data to be analyzed sent by the client, and preprocessing the ECG data to be analyzed to obtain the preprocessed ECG data to be analyzed; Model M2, using the trained multi-task ECG detection model to perform arrhythmia recognition processing on the pre-processed ECG data to be analyzed, to obtain a recognition result; Model M3 transmits the recognition result to the terminal device.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a multi-task electrocardiogram analysis method based on deep learning as described in any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Electrocardiogram detection and analysis method and device, electronic equipment and storage medium
CN120436657A
Electrocardiogram detection and analysis method, device, electronic equipment and storage medium
CN120436657B