Electrocardiogram long tail classification method and device based on anomaly detection pre-training and medium
By combining multi-scale cross-recovery and signal trend-assisted recovery techniques with patient attribute information, a pre-trained abnormality detection model was developed. This solved the problems of long-tail distribution and attribute index influence in ECG classification, enabling accurate identification of common and rare abnormality types and improving the comprehensiveness and reliability of ECG diagnosis.
Patent Information
- Application Number
- CN202410919093.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-07-10
AI Technical Summary
Existing ECG classification methods fail to effectively consider the long-tail distribution characteristics and the influence of attribute indicators of ECG data, resulting in high classification accuracy for common abnormal types but low classification accuracy for rare abnormal types, and ignoring the influence of patient attribute information.
By employing multi-scale cross-recovery and signal trend-assisted recovery techniques, combined with patient attribute information, a pre-trained abnormality detection model is developed. Self-supervised learning is then performed using normal electrocardiograms to identify various types of electrocardiogram abnormalities, and a long-tail classification network is used for multi-classification.
It improves the accuracy of ECG classification for common and rare abnormalities, reduces the impact of individual differences, significantly reduces misdiagnosis and missed diagnosis, and provides more comprehensive clinical auxiliary diagnostic performance.
Smart Images

Figure CN118873148B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a long-tail classification method, device and medium for electrocardiograms based on anomaly detection pre-training. Background Technology
[0002] In recent years, classification models have achieved great success in the field of electrocardiogram (ECG) diagnosis, achieving high accuracy in diagnosing specific common types of ECG abnormalities. However, existing ECG diagnostic techniques face the problem of long-tail distribution, meaning that there are many samples of common diseases but few samples of rare diseases, causing models to easily overlook abnormalities in a minority of categories. In addition, supervised learning methods require a large amount of manually labeled data, while rare disease samples are often difficult to obtain, limiting the generalization ability of the models.
[0003] The paper "Multi-scale Cross-restoration Framework for Electrocardiogram Anomaly Detection" proposes an anomaly detection algorithm based on multi-scale cross-restoration. Starting from multi-scale ECG data, it leverages the interaction of ECG features across multiple scales to achieve better ECG feature learning. By learning from normal ECGs, all samples with features different from normal are considered abnormal, which can be considered a binary classification ECG diagnostic task. Furthermore, based on the binary classification of each patient's ECG as normal or abnormal, it can provide fine-grained ECG abnormality localization results to assist physicians in their judgment. While this paper proposes an ECG abnormality detection method, the overall system construction process is still limited to binary anomaly detection, failing to consider subsequent long-tail ECG diagnostic processes and the impact of attribute indicators on ECG diagnosis, indicating room for improvement.
[0004] CN117958834A discloses an ECG classification method based on random masking and generative self-supervised learning. This method randomly masks the lead signals of the original ECG signal under certain constraints, disrupting the integrity of the original signal. Then, an encoder generates signals under the random masking strategy, reconstructing the masked lead ECG signals in both time and lead dimensions to learn spatiotemporal representations. However, this method only considers local signals, resulting in a one-sided representation of signal features, which affects the accuracy of the classification results. Furthermore, it does not consider the influence of attributes.
[0005] In summary, existing electrocardiogram classification and prediction methods have the following shortcomings:
[0006] 1. The long-tail distribution of ECG data is not considered. A long tail is a probability distribution characterized by a small number of high-frequency events at the head and a large number of low-frequency rare events at the tail. This means that the classification results include: ① A few high-frequency abnormalities: A few types of ECG abnormalities (e.g., atrial fibrillation or premature ventricular contractions) are relatively common in patients and occur frequently. These abnormalities are located at the "head" of the long tail distribution; ② A large number of low-frequency abnormalities: A large number of other ECG abnormalities are relatively rare in patients and occur infrequently. These abnormalities are located at the "tail" of the long tail distribution. High-frequency abnormalities have a large sample size, while low-frequency abnormalities have a small sample size, requiring accurate diagnosis. However, most current methods classify directly based on high-frequency common abnormalities, ignoring the classification of low-frequency rare abnormalities.
[0007] 2. The influence of attribute indicators is not considered. The current method only analyzes electrocardiograms and does not take into account the influence of patient attribute information such as age and gender, as well as common electrocardiogram indicators such as heart rate on the electrocardiogram classification results. Summary of the Invention
[0008] The purpose of this invention is to provide a long-tail classification method, device, and medium for electrocardiograms based on anomaly detection pre-training, which takes into account attribute indicators to achieve accurate classification of common and rare abnormality types.
[0009] The objective of this invention can be achieved through the following technical solutions:
[0010] A long-tail classification method for electrocardiograms based on anomaly detection pre-training includes the following steps:
[0011] Acquire multiscale electrocardiogram signals;
[0012] Obtain ECG report information and extract report attribute information and classification results from the ECG report;
[0013] An anomaly detection model is pre-trained based on multi-scale electrocardiogram (ECG) signals and report attribute information. The anomaly detection model performs signal preprocessing on the input multi-scale ECG signals to obtain global ECG signals and local ECG signals. Multi-scale cross-recovery is performed on the global ECG signals and local ECG signals. Signal trend-assisted recovery is performed on the global ECG signals, and report attribute prediction is performed.
[0014] The long-tail classification network is trained by using the cascaded combination of signal trend features obtained from signal trend-assisted recovery and global ECG features obtained from multi-scale cross-recovery as input and the classification results extracted from ECG reports as output.
[0015] The ECG signal to be detected is input into the pre-trained anomaly detection model. The obtained signal trend features and global ECG features are combined in series. The combined features are then input into the downstream long-tail classification network for multi-classification of anomaly types to obtain the probability of classification prediction results.
[0016] The anomaly detection model performs signal preprocessing on the input multi-scale electrocardiogram signal as follows:
[0017] For the noisy original electrocardiogram (ECG) signal, a signal filter is used to remove baseline drift and high-frequency noise interference to obtain a denoised ECG signal;
[0018] The sliding window method is used to detect the R-peak in the denoised electrocardiogram signal by adaptively calculating the dynamic threshold with the goal of minimizing the standard deviation of continuous differences.
[0019] Based on the detected R peak position, the electrocardiogram signal is segmented to obtain the local signal of a single heartbeat;
[0020] Based on the above steps, global and local electrocardiogram (ECG) signals are obtained.
[0021] The report attribute information includes age, gender, heart rate, PR interval, QT interval, QRS interval, and modified QRS interval.
[0022] The multi-scale cross-recovery includes the following steps:
[0023] Random masking is applied to multi-scale ECG signals, and the global ECG signal x is masked. g Random masking is applied to the scattered area, and the local ECG signal x is then masked. l The signal obtained by randomly masking a specific continuous region is denoted as follows: and
[0024] Using independent global encoders E g and local encoder e l Perform signal feature extraction to obtain global and local features;
[0025] Global and local features are fused into a unified cross-attention feature through concatenation:
[0026]
[0027] in,(·) T For matrix transpose, softmax(·) is a normalized exponential function. The square root of the feature dimension is used as the scaling factor, and concat(·) means concatenating two tensors.
[0028] After obtaining the fused feature information, it is reclassified into multi-scale ECG features through two different fully connected networks, and then residually connected with the multi-scale ECG features before the attention mechanism is applied to obtain the global ECG feature f. g and local electrocardiographic features f l ;
[0029] Decoding and recovery of multi-scale ECG features: using an independent global decoder D g and local decoder D l Generate global recovery signals for multi-scale ECG features. Local recovery signal and the corresponding uncertainty σ g ,σ l .
[0030] The signal trend-assisted recovery includes the following steps:
[0031] For global electrocardiogram signal x g Smoothing is achieved by applying a moving average window over the time dimension;
[0032] The smoothed signal is then differentiated from its adjacent signal points and normalized to obtain the global ECG trend signal, denoted as x. t ;
[0033] High-dimensional feature information of trend signals is extracted using a signal feature extraction network, denoted as signal trend feature f. t The global electrocardiogram features f obtained from multi-scale cross-recovery g The signals are cascaded and merged, and the global ECG signal is reconstructed using a decoder. Assisted recovery is then performed on the masked areas to obtain a trend-based recovery signal.
[0034] The report attribute prediction specifically involves using an attribute prediction network to predict report attributes based on a cascaded combination of signal trend features and global ECG features.
[0035] The loss function of the anomaly detection model is obtained by weighting the loss function of global and local multi-scale cross-recovery, the loss function of signal trend-assisted recovery, and the loss function of reporting attribute prediction at different levels.
[0036]
[0037] Where λ1, λ2, λ3, λ4 are hyperparameters. The loss function for global multi-scale cross-recovery is... The loss function for local multi-scale cross-recovery is... The loss function for signal trend-assisted recovery. The loss function for predicting report attributes;
[0038] By separately dividing the global recovery signal and local recovery signals Compared with global and local ECG signals before masking x g x l Compare and calculate the loss function for multi-scale cross-recovery:
[0039]
[0040] Wherein, the superscript k represents the signal point in the time dimension, and D and d represent the time length of the global and local electrocardiograms, respectively;
[0041] Trend-based recovery signals Compared with the original global ECG signal x g By comparison, the loss function for signal trend-assisted recovery is calculated:
[0042]
[0043] The predicted report attribute values are compared with the actual attribute values recorded in the ECG report, and the loss function for predicting the report attributes is calculated:
[0044]
[0045] Among them, y i For the actual report attribute values, To predict the report attribute values, n is the number of report attributes.
[0046] The predicted classification results of the long-tail classification network are compared with the actual classification results of the electrocardiogram report records. Supervision is performed using a symmetric loss function to train the long-tail classification network. The symmetric loss function is expressed as:
[0047]
[0048] Where, γ + ,γ - This represents the adjustment coefficient for positive and negative labels in multi-label classification. For the true classification result, p km =max(p k -m,0) indicates threshold filtering for easily categorized negative labels, where p k This represents the model's classification prediction result for the k-th type, where m is a fixed value used to filter out categories with lower prediction results, i.e., those that are easy to classify, and K is the number of categories in the classification result.
[0049] An electrocardiogram long-tail classification device based on anomaly detection pre-training includes a memory, a processor, and a program stored in the memory, wherein the processor executes the program to implement the method described above.
[0050] A storage medium having a program stored thereon, which, when executed, implements the method described above.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] 1. This invention utilizes self-supervised anomaly detection technology, which trains on normal data without requiring additional supervisory data, enabling ECG-assisted classification to identify all types of cardiac abnormalities that are different from normal, including common and rare abnormalities, and is not limited to specific types of abnormalities.
[0053] 2. This invention utilizes attribute information prediction technology. By comparing the model-predicted attributes with the actual attributes in the electrocardiogram (ECG) report, attribute information from the ECG report is introduced, thereby reducing the impact of individual differences in ECG and improving the comprehensiveness and reliability of the classification results. Attached Figure Description
[0054] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0055] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0056] Existing classification-based electrocardiogram (ECG) diagnostic systems typically only diagnose specific common types of ECG abnormalities and rely heavily on manually labeled data. These diagnostic models tend to predict common abnormality types, neglecting the detection of rare abnormalities. This invention, based on self-supervised anomaly detection pre-training, utilizes normal ECGs for pre-training to identify potential abnormal states, providing richer anomaly recognition capabilities for ECG-assisted diagnosis. It further enables ECG diagnosis under long-tailed distributions and has achieved significant performance improvements in clinical diagnostic scenarios.
[0057] This embodiment provides a long-tailed electrocardiogram classification method based on anomaly detection pre-training, such as... Figure 1 As shown, it includes the following steps:
[0058] S1, acquire multi-scale electrocardiogram signals.
[0059] S2, obtain ECG report information, and extract report attribute information and classification results from the ECG report.
[0060] In this embodiment, the reported attribute information includes seven different attributes: age, gender, heart rate, PR interval, QT interval, QRS interval, and modified QRS interval, represented by a vector Y. attr =[y1,…,y7] represents the pre-training for anomaly detection. The classification results may contain 116 different anomaly types, represented by a one-hot encoded vector. in This indicates whether the current electrocardiogram contains the i-th abnormality type, and is used for training the long-tail classification network.
[0061] S3 is an abnormality detection model pre-trained based on multi-scale electrocardiogram signals and report attribute information.
[0062] In this embodiment, the anomaly detection model preprocesses the input multi-scale electrocardiogram (ECG) signal to obtain global and local ECG signals. Multi-scale cross-recovery is then performed on the global and local ECG signals, signal trend-assisted recovery is performed on the global ECG signal, and report attribute prediction is conducted. Specifically:
[0063] S31, Signal Preprocessing
[0064] S311, for the noisy original electrocardiogram signal, removes baseline drift and high-frequency noise interference through a signal filter to obtain a denoised electrocardiogram signal;
[0065] S312 uses a sliding window method to adaptively calculate a dynamic threshold with the goal of minimizing the standard deviation of continuous differences, and detects the R-peak in the denoised electrocardiogram signal.
[0066] S313, based on the detected R peak position, the electrocardiogram signal is segmented to obtain the local signal of a single heartbeat;
[0067] S314, Based on the above steps, obtain the global electrocardiogram signal x. g and local electrocardiogram signal x l .
[0068] Next, consider a specific multiscale ECG signal x. g ,x l and the corresponding attribute information Y attr This is used for the pre-training process of self-supervised anomaly detection.
[0069] S32, Multiscale Cross-Recovery
[0070] S321, performs random masking on multi-scale ECG signals, in the global ECG signal x g Random masking is applied to the scattered area, and the local ECG signal x is then masked. lThe signal obtained by randomly masking a specific continuous region is denoted as follows: and
[0071] S322, each utilizing an independent global encoder E g and local encoder E l Signal feature extraction is performed to obtain global and local features; the encoder consists of several layers of convolution operations, and of course, other variations and improvements can be adopted without affecting the main idea of this invention.
[0072] S323 fuses global and local features into a unified cross-attention feature through concatenation. This cross-attention feature is dynamically weighted using a self-attention mechanism, guiding the model to focus on the most relevant signal regions. This process can be represented as:
[0073]
[0074] in,(·) T For matrix transpose, softmax(·) is a normalized exponential function. The square root of the feature dimension is used as the scaling factor, and concat(·) means concatenating two tensors.
[0075] S324, after obtaining the fused feature information, the fused feature information is reclassified into multi-scale ECG features through two different fully connected networks, and residual connections are made with the multi-scale ECG features before the attention mechanism to obtain the global ECG feature f. g and local electrocardiographic features f l .
[0076] S325, decoding and recovering multi-scale ECG features: utilizing an independent global decoder D g and local decoder D l Generate global recovery signals for multi-scale ECG features. Local recovery signal and the corresponding uncertainty σ g ,σ l : Uncertainty is a tensor with the same scale as the recovered signal in the time dimension. It is used to measure the difficulty of recovering different signal points in the time dimension, avoiding misclassification of normal signals that are difficult to recover as abnormal signals. The decoder consists of several layers of deconvolution operations. Of course, other variations and improvements can be adopted without affecting the main idea of this invention.
[0077] By separately dividing the global recovery signal and local recovery signals Compared with global and local ECG signals before masking xg x l Compare and calculate the loss function for multi-scale cross-recovery:
[0078]
[0079] In this context, the superscript k represents a signal point in the time dimension, and D and d represent the time lengths of the global and local electrocardiograms, respectively.
[0080] S33, Signal Trend Assisted Recovery
[0081] S331, for the global ECG signal x g A sliding average window is applied over time for smoothing.
[0082] S332, the smoothed signal is differentially analyzed from adjacent signal points and then normalized to obtain the global ECG trend signal, denoted as x. t .
[0083] S333 utilizes a signal feature extraction network to extract high-dimensional feature information of the trend signal, denoted as the signal trend feature f. t The signal feature extraction network here has the same structure as the encoder in the previous multi-scale cross-recovery.
[0084] S334, the signal trend feature f t Global ECG features f obtained from multiscale cross-recovery g The signals are cascaded and merged, and the global ECG signal is reconstructed using a decoder. Assisted recovery is then performed on the masked areas to obtain a trend-based recovery signal.
[0085] Trend-based recovery signals Compared with the original global ECG signal x g By comparison, the loss function for signal trend-assisted recovery is calculated:
[0086]
[0087] Here, the superscript k represents a signal point in the time dimension, and D represents the time length of the global electrocardiogram.
[0088] S34, Report Attribute Prediction
[0089] An attribute prediction network is used to predict report attributes based on a cascaded combination of signal trend features and global ECG features. In this embodiment, the attribute prediction network consists of two fully connected linear layers. Of course, other variations and improvements can be adopted without affecting the main theme of this invention.
[0090] The predicted attribute vector is denoted as Compare the predicted attribute values with the actual attribute values Y recorded in the electrocardiogram report. attr By comparing and calculating the loss function for attribute prediction, we can achieve perception of attribute information and thus reduce the impact of individual differences.
[0091]
[0092] Among them, y i For the actual report attribute values, To predict the attribute values for the report.
[0093] Therefore, the loss function of the anomaly detection model is obtained by weighting the loss function of global and local multi-scale cross-recovery, the loss function of signal trend-assisted recovery, and the loss function of report attribute prediction at different levels:
[0094]
[0095] Wherein, λ1, λ2, λ3, and λ4 are hyperparameters, all of which are selected as 1.0 in this embodiment, but their values can also be specifically selected by those skilled in the art; The loss function for global multi-scale cross-recovery is... The loss function for local multi-scale cross-recovery is... The loss function for signal trend-assisted recovery. The loss function for predicting reported attributes.
[0096] By utilizing the supervised loss described above, and combining it with any mainstream deep learning gradient descent algorithm, the training of an anomaly detection model can be completed.
[0097] S4 uses the cascaded combination of signal trend features obtained from signal trend-assisted recovery and global ECG features obtained from multi-scale cross-recovery as input to the long-tail classification network, and the classification results extracted from the ECG report as output to train the long-tail classification network.
[0098] Based on the pre-trained model obtained from self-supervised anomaly detection pre-training, the parameters of the model are fixed, and the signal trend features f of the electrocardiogram signal are extracted. t and global signal characteristics f g The features obtained from the combination are then fed into the downstream long-tail classification network residual network 18 for anomaly type multi-classification, and the probability of the classification prediction result is obtained, denoted as P = [p1, ..., p]. 116 This includes predicting probabilities for 116 different abnormality types. The predicted classification results are then compared with the one-hot vectors of the true abnormality types recorded in the ECG report. By comparing and using a symmetric loss function for supervision, the long-tail classification network is trained. This process can be represented as:
[0099]
[0100] Where, γ + ,γ - This represents the adjustment coefficient for positive and negative labels in multi-label classification. In this embodiment, it is taken as 1 and 4 respectively, but the value can also be specifically selected by those skilled in the art. For the true classification result, p km =max(p l -m,0) indicates threshold filtering for easily categorized negative labels, where p l This represents the model's classification prediction result for the k-th type. m is a fixed value used to filter out categories with lower prediction results, i.e., those that are easy to classify. In this embodiment, it is set to 0.05, but its value can also be specifically selected by those skilled in the art.
[0101] In another embodiment, besides fixing the pre-trained model, joint training of the anomaly detection model and the long-tail classification network can be achieved by adding the loss functions. In this case, the supervised loss function is... This loss function is used for parameter updates in both the anomaly detection model and the long-tail classification network.
[0102] S5 inputs the ECG signal to be detected into the pre-trained anomaly detection model, concatenates and combines the obtained signal trend features and global ECG features, and then inputs the combined features into a downstream long-tail classification network for multi-classification of anomaly types, obtaining the probability of the classification prediction result. The higher the predicted probability, the more likely the patient is to have the anomaly.
[0103] This invention, by introducing self-supervised anomaly detection pre-training, can identify all types of cardiac abnormalities, including both common and rare ones, and is not limited to specific types. This invention not only detects abnormalities from the perspective of electrocardiogram (ECG) signals but also incorporates attribute information from ECG reports, taking into account the patient's gender, age, and the influence of ECG indicators such as heart rate and PR interval, thus improving the comprehensiveness and reliability of the classification results. Particularly in the detection of rare abnormalities, this invention significantly reduces misdiagnosis and missed diagnosis, providing superior clinical auxiliary diagnostic performance.
[0104] This embodiment also provides an ECG long-tail classification device based on anomaly detection pre-training, including a memory, a processor, and a program stored in the memory, wherein the processor executes the program to implement the method described above.
[0105] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0106] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A long-tail classification method for electrocardiograms based on anomaly detection pre-training, characterized in that, Includes the following steps: Acquire multiscale electrocardiogram signals; Obtain ECG report information and extract report attribute information and classification results from the ECG report; An anomaly detection model is pre-trained based on multi-scale electrocardiogram (ECG) signals and report attribute information. The anomaly detection model performs signal preprocessing on the input multi-scale ECG signals to obtain global ECG signals and local ECG signals. Multi-scale cross-recovery is performed on the global ECG signals and local ECG signals. Signal trend-assisted recovery is performed on the global ECG signals, and report attribute prediction is performed. The long-tail classification network is trained by using the cascaded combination of signal trend features obtained from signal trend-assisted recovery and global ECG features obtained from multi-scale cross-recovery as input and the classification results extracted from ECG reports as output. The ECG signal to be detected is input into the pre-trained anomaly detection model. The obtained signal trend features and global ECG features are combined in series. The combined features are then input into the downstream long-tail classification network for multiple classification of anomaly types to obtain the probability of classification prediction results. The multi-scale cross-recovery includes the following steps: Random masking of multi-scale ECG signals, in global ECG signals Random masking is applied to the scattered areas to detect local ECG signals. The signal obtained by randomly masking a specific continuous region is denoted as follows: and ; Using separate global encoders and local encoder Perform signal feature extraction to obtain global and local features; Global and local features are fused into a unified cross-attention feature through concatenation: in, This is a matrix transpose operation. It is a normalized exponential function. The square root of the feature dimension is used as the scaling factor. This indicates that two tensors are concatenated. After obtaining the fused feature information, it is reclassified into multi-scale ECG features through two different fully connected networks, and then residually connected with the multi-scale ECG features before the attention mechanism is applied to obtain the global ECG features. and local electrocardiographic features ; Decoding and recovering multi-scale ECG features: using an independent global decoder and local decoder Generate global recovery signals for multi-scale ECG features. Local recovery signal and the corresponding uncertainty ; The signal trend-assisted recovery includes the following steps: global electrocardiogram signals Smoothing is achieved by applying a moving average window over the time dimension; The smoothed signal is then differentiated from its adjacent signal points and normalized to obtain the global ECG trend signal, denoted as . ; High-dimensional feature information of trend signals is extracted using a signal feature extraction network, denoted as signal trend features. Global ECG features obtained from multi-scale cross-recovery The signals are cascaded and merged, and the global ECG signal is reconstructed using a decoder. Assisted recovery is then performed on the masked areas to obtain a trend-based recovery signal. ; The predicted classification results of the long-tail classification network are compared with the actual classification results of the electrocardiogram report records. Supervision is performed using a symmetric loss function to train the long-tail classification network. The symmetric loss function is expressed as: in, This represents the adjustment coefficient for positive and negative labels in multi-label classification. For the true classification results, This indicates that a threshold is used to filter negative labels that are easy to classify, where The model represents the first Classification prediction results for each type It is a fixed value used to filter out categories with lower prediction results, i.e., those that are easy to classify. K The number of categories in the classification results.
2. The ECG long-tail classification method based on anomaly detection pre-training according to claim 1, characterized in that, The anomaly detection model performs signal preprocessing on the input multi-scale electrocardiogram signal as follows: For the noisy original electrocardiogram (ECG) signal, a signal filter is used to remove baseline drift and high-frequency noise interference to obtain a denoised ECG signal; The sliding window method is used to detect the R-peak in the denoised electrocardiogram signal by adaptively calculating the dynamic threshold with the goal of minimizing the standard deviation of continuous differences. Based on the detected R peak position, the electrocardiogram signal is segmented to obtain the local signal of a single heartbeat; Based on the above steps, global and local electrocardiogram (ECG) signals are obtained.
3. The ECG long-tail classification method based on anomaly detection pre-training according to claim 1, characterized in that, The report attribute information includes age, gender, heart rate, PR interval, QT interval, QRS interval, and modified QRS interval.
4. The ECG long-tail classification method based on anomaly detection pre-training according to claim 1, characterized in that, The report attribute prediction specifically involves using an attribute prediction network to predict report attributes based on a cascaded combination of signal trend features and global ECG features.
5. The ECG long-tail classification method based on anomaly detection pre-training according to claim 1, characterized in that, The loss function of the anomaly detection model is obtained by weighting the loss function of global and local multi-scale cross-recovery, the loss function of signal trend-assisted recovery, and the loss function of reporting attribute prediction at different levels. in, For hyperparameters, The loss function for global multi-scale cross-recovery is... The loss function for local multi-scale cross-recovery is... The loss function for signal trend-assisted recovery. The loss function for predicting report attributes; By separately dividing the global recovery signal and local recovery signals Compared with global and local ECG signals before masking , Compare and calculate the loss function for multi-scale cross-recovery: Among them, superscript k Representing signal points in the time dimension, D and d These represent the duration of the global and local ECGs, respectively. Trend-based recovery signals Compared with the original global electrocardiogram signal By comparison, the loss function for signal trend-assisted recovery is calculated: The predicted report attribute values are compared with the actual attribute values recorded in the ECG report, and the loss function for predicting the report attributes is calculated: in, For the actual report attribute values, To predict report attribute values, n This represents the number of reported attributes.
6. A long-tail electrocardiogram classification device based on anomaly detection pre-training, comprising a memory, a processor, and a program stored in the memory, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-5.
7. A storage medium having a program stored thereon, characterized in that, When the program is executed, it implements the method as described in any one of claims 1-5.
Citation Information
Patent Citations
EEG emotion recognizing method and device based on images
CN110353675A
Electrocardiogram data generation method
CN113303807A