Electrocardiogram long tail classification method and device based on abnormal detection pre-training and medium

Through the electrocardiogram long-tail classification method based on abnormal detection based on pre-training, combined with multi-scale signals and attribute information, the neglect of the long-tail distribution and attribute indicators of the electrocardiogram data in the existing technology is solved, and the accuracy of common and rare abnormal types is achieved. Classification improves the comprehensiveness and reliability of electrocardiogram diagnosis.

CN118873148AActive Publication Date: 2024-11-01SHANGHAI JIAOTONG UNIV +2

Patent Information

Application Number
CN202410919093.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-11-01
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

The existing ECG classification methods fail to effectively consider the long-tail distribution characteristics and attribute indicators of ECG data, resulting in insufficient classification accuracy of common and rare ECG types, especially ignoring the diagnosis of low-frequency rare abnormalities.

Method used

Using the electrocardiogram long-tail classification method based on abnormal detection pre-training, by obtaining multi-scale ECG signal and report attribute information, signal preprocessing, multi-scale cross recovery and signal trend assisted recovery, combined with attribute prediction, long-tail classification network is trained to achieve Multi-categorization of common and rare exception types.

Benefits of technology

It improves the comprehensiveness and reliability of the electrocardiogram classification results, can identify cardiac abnormalities that are different from normal, including common and rare abnormalities, reduces misdiagnosis and misdiagnosis, and significantly improves the auxiliary performance of clinical diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118873148A_ABST
    Figure CN118873148A_ABST
Patent Text Reader

Abstract

The invention relates to an electrocardiogram long tail classification method and device based on abnormal detection pre-training and a medium. The method comprises the following steps: acquiring a multi-scale electrocardiogram signal; acquiring electrocardiogram report information, and extracting report attribute information and a classification result; pre-training an anomaly detection model based on the multi-scale electrocardiogram signals and the report attribute information; training a long-tail classification network by taking a series combination of a signal trend feature obtained in signal trend auxiliary recovery and a global electrocardio feature obtained in multi-scale cross recovery as input of the long-tail classification network and taking a classification result extracted from the electrocardio report as output; and inputting a to-be-detected electrocardiogram signal into the pre-trained anomaly detection model, carrying out series combination on the obtained signal trend characteristics and global electrocardiogram characteristics, and inputting the combined characteristics into a downstream long-tail classification network to carry out anomaly type multi-classification so as to obtain a classification prediction result probability. Compared with the prior art, the method has the advantages of improving the comprehensiveness and reliability of a classification result and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to an electrocardiogram long-tail classification method, device and medium based on abnormality detection pre-training. Background Art

[0002] In the past few years, classification models have achieved great success in the field of ECG diagnosis, achieving high accuracy in diagnosing certain common types of ECG abnormalities. However, existing ECG diagnosis technology faces the problem of long-tail distribution, that is, there are many samples of common diseases, but few samples of rare diseases, which makes the model easily ignore the abnormalities of a few categories. In addition, supervised learning methods require a large amount of manually annotated data, and samples of rare diseases are often difficult to obtain, which limits the generalization ability of the model.

[0003] "Multi-scale Cross-restoration Framework for Electrocardiogram Anomaly Detection" proposes an anomaly detection algorithm based on multi-scale cross-restoration, which starts from multi-scale ECG data and interacts with each other through multi-scale ECG features to achieve better ECG feature learning. By learning on normal ECG, all samples that are different from normal features are regarded as abnormal, which can be considered as a binary classification ECG diagnosis task. In addition, based on the conclusion of normal or abnormal binary classification of each patient's ECG, fine-grained ECG anomaly positioning results can be given to assist doctors in making judgments. Although this paper proposes an ECG anomaly detection method, the construction process of the entire system is still limited to binary classification anomaly detection, and does not consider the subsequent ECG long-tail diagnosis process and the impact of attribute indicators on ECG diagnosis. There is still room for improvement.

[0004] CN117958834A discloses an ECG classification method based on random masking and generative self-supervised learning, which randomly masks the lead signal of the original ECG signal under certain constraints to destroy the integrity of the original ECG signal, and then generates a signal under a random masking strategy through an encoder, reconstructing the lead ECG signal masked in time and lead dimensions to learn spatiotemporal representation. However, this method only considers local signals, and the representation of signal features is relatively one-sided, which affects the accuracy of the classification results, and it also does not consider the influence of attributes.

[0005] In summary, the existing ECG classification prediction methods have the following defects:

[0006] 1. The characteristics of the long-tail distribution of ECG data are not considered. The long tail is a probability distribution characterized by a small number of events with high frequency at the head and a large number of rare events with low frequency at the tail. This means that its classification results include: ① A few high-frequency abnormality types: There are a few types of ECG abnormalities (for example, atrial fibrillation or ventricular premature beats) that are relatively common in patients and occur frequently. These abnormality types are located in the "head" of the long-tail distribution; ② A large number of low-frequency abnormality types: There are a large number of other ECG abnormality types that are relatively rare in patients and occur at very low frequencies. These abnormality types are located in the "tail" of the long-tail distribution. Among them, the number of samples of high-frequency abnormality types is large, while the number of samples of low-frequency abnormality types is small, and the accurate abnormality type needs to be diagnosed. However, most of the current methods directly classify high-frequency common abnormality types, ignoring the classification of low-frequency rare abnormality types.

[0007] 2. The influence of attribute indicators is not considered. The current method is based on the analysis of a simple electrocardiogram, without considering the patient's attribute information such as age and gender, and the influence of common electrocardiogram indicators such as heart rate on the electrocardiogram classification results. Summary of the invention

[0008] The purpose of the present invention is to provide an electrocardiogram long-tail classification method, device and medium based on anomaly detection pre-training, taking into account attribute indicators, to achieve accurate classification of common anomaly types and rare anomaly types.

[0009] The purpose of the present invention can be achieved by the following technical solutions:

[0010] An electrocardiogram long-tail classification method based on anomaly detection pre-training includes the following steps:

[0011] Acquire multi-scale ECG signals;

[0012] Obtain ECG report information, and extract report attribute information and classification results from the ECG report;

[0013] Pre-training an anomaly detection model based on multi-scale electrocardiogram signals and report attribute information, wherein the anomaly detection model performs signal preprocessing on the input multi-scale electrocardiogram signal to obtain a global electrocardiogram signal and a local electrocardiogram signal, performs multi-scale cross-recovery on the global electrocardiogram signal and the local electrocardiogram signal, performs signal trend auxiliary recovery on the global electrocardiogram signal, and performs report attribute prediction;

[0014] The series combination of the signal trend features obtained in the signal trend assisted recovery and the global ECG features obtained in the multi-scale cross recovery is used as the input of the long-tail classification network, and the classification results extracted from the ECG report are used as the output to train the long-tail classification network;

[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, and the combined features are 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 ECG signal, the baseline drift and high-frequency noise interference are removed by the signal filter to obtain the denoised ECG signal;

[0018] A sliding window method is used to minimize the standard deviation of continuous differences, and the dynamic threshold is adaptively calculated to detect the R peak in the denoised ECG signal;

[0019] According to 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 ECG signals and local 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 restoration comprises the following steps:

[0023] Perform random masking on the multi-scale ECG signal, and g Randomly mask the scattered areas on the local ECG signal x l The specific continuous area is randomly masked, and the signal after masking is recorded as and

[0024] Using independent global encoders E g and the local encoder e l Extract signal features to obtain global features and local features;

[0025] The global features and local features are fused into a unified cross-attention feature by concatenation:

[0026]

[0027] in,(·) T is a matrix transpose operation, softmax(·) is a normalized exponential function, represents the square root of the feature dimension as a scaling factor, and concat(·) represents the concatenation of two tensors;

[0028] After obtaining the fused feature information, the fused feature information is re-divided 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 ECG characteristics l ;

[0029] Decoding and restoring multi-scale ECG features: using an independent global decoder D g and local decoder D l Generate global restored signals for multi-scale ECG features Local recovery signal and the corresponding uncertainty σ g ,σ l .

[0030] The signal trend assisted recovery comprises the following steps:

[0031] For the global ECG signal x g Apply a sliding average window for smoothing in the time dimension;

[0032] The smoothed signal is differentiated between adjacent signal points and normalized to obtain the trend signal of the global ECG signal, denoted as x t ;

[0033] The signal feature extraction network is used to extract the high-dimensional feature information of the trend signal, which is recorded as the signal trend feature f t , and the global ECG feature f obtained in multi-scale cross-recovery g The signals are combined in series and the global ECG signal is reconstructed through the decoder. The mask-occluded area is assisted in recovery to obtain a trend-based recovery signal.

[0034] The report attribute prediction specifically includes: using an attribute prediction network to predict the report attribute based on the series combination of signal trend features and global electrocardiogram features.

[0035] The loss function of the anomaly detection model is obtained by weighted average at different levels of the loss function of global and local multi-scale cross recovery, the loss function of signal trend auxiliary recovery, and the loss function of report attribute prediction:

[0036]

[0037] Among them, λ1,λ2,λ3,λ4 are hyperparameters, is the loss function of global multi-scale cross-recovery, is the loss function of local multi-scale cross-recovery, is the loss function for signal trend assisted recovery, The loss function for reporting attribute predictions;

[0038] By respectively and local recovery signal The global and local ECG signals x before masking g 、x l For comparison, calculate the loss function of multi-scale cross-recovery:

[0039]

[0040] Among them, the superscript k represents the signal point in the time dimension, and D and d represent the time length of the global and local ECG, respectively;

[0041] Trend-based recovery signals With the original global ECG signal x g For comparison, calculate the loss function of signal trend assisted recovery:

[0042]

[0043] Compare the predicted report attribute values ​​with the true attribute values ​​of the ECG report record, and calculate the loss function of the report attribute prediction:

[0044]

[0045] Among them, y i is the actual reported attribute value, is the predicted reported attribute value, and n is the number of reported attributes.

[0046] The predicted classification results of the long-tail classification network are compared with the actual classification results of the ECG report records, and the symmetric loss function is used for supervision to realize the training of the long-tail classification network. The symmetric loss function is expressed as:

[0047]

[0048] Among them, γ + ,γ - Represents the allocation coefficient of positive and negative labels in multi-label classification, is the true classification result, p km =max(p k -m,0) indicates threshold screening of negative labels that are easy to classify, where p k It represents the model's classification prediction result for the kth type. m is a fixed value used to filter out categories with low prediction results, that is, categories that are easy to classify. K is the number of classification results.

[0049] An electrocardiogram long-tail classification device based on abnormal detection pre-training includes a memory, a processor, and a program stored in the memory. When the processor executes the program, the method described above is implemented.

[0050] A storage medium stores a program, which implements the method described above when executed.

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

[0052] 1. The present invention utilizes self-supervised anomaly detection technology and uses normal data for training without the need for additional supervisory data, so that the electrocardiogram-assisted classification can identify all types of cardiac anomalies that are different from the normal, including common and rare anomalies, not limited to specific types of anomalies.

[0053] 2. The present invention utilizes attribute information prediction technology to introduce attribute information in the ECG report by comparing the model predicted attributes with the real attributes in the ECG report, thereby reducing the impact of individual ECG differences and improving the comprehensiveness and reliability of the classification results. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0055] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0056] Existing ECG diagnostic systems based on classification models usually only diagnose specific common types of ECG abnormalities and rely on a large amount of manually annotated data. Diagnostic models tend to predict common abnormality types and ignore the detection of rare abnormality types. The present invention is based on pre-training of self-supervised anomaly detection. By using normal ECG for pre-training, it can identify potential abnormal states, provide richer abnormality recognition capabilities for ECG auxiliary diagnosis, further realize ECG diagnosis under long-tail distribution, and achieve significant effect improvement in clinical diagnosis scenarios.

[0057] This embodiment provides an electrocardiogram long-tail classification method based on anomaly detection pre-training, such as Figure 1 As shown, the following steps are included:

[0058] S1, obtain multi-scale ECG signals.

[0059] S2, obtaining ECG report information, and extracting report attribute information and classification results from the ECG report.

[0060] In this embodiment, the report attribute information includes 7 different attributes, namely age, gender, heart rate, PR interval, QT interval, QRS interval and modified QRS interval, represented by vector Y attr =[y1,…,y7], which is used for anomaly detection pre-training. The classification results may contain 116 different anomaly types, represented by a one-hot encoding vector: in Indicates whether the current electrocardiogram contains the i-th abnormal type, which is used for training the long-tail classification network.

[0061] S3, pre-trained anomaly detection model based on multi-scale ECG signals and report attribute information.

[0062] In this embodiment, the anomaly detection model performs signal preprocessing on the input multi-scale ECG signal to obtain the global ECG signal and the local ECG signal, performs multi-scale cross-recovery on the global ECG signal and the local ECG signal, performs signal trend auxiliary recovery on the global ECG signal, and performs report attribute prediction. The details are as follows:

[0063] S31, signal preprocessing

[0064] S311, for the noisy original electrocardiogram signal, removing the baseline drift and high-frequency noise interference through a signal filter to obtain a denoised electrocardiogram signal;

[0065] S312, using a sliding window method to minimize the standard deviation of continuous differences, adaptively calculating a dynamic threshold, and detecting an R peak in the denoised electrocardiogram signal;

[0066] S313, segmenting the electrocardiogram signal according to the detected R peak position to obtain a local signal of a single heartbeat;

[0067] S314, based on the above steps, obtain the global ECG signal x g and local ECG signal x l .

[0068] Next, consider a specific multi-scale ECG signal x g ,x l and the corresponding attribute information Y attr , used in the self-supervised anomaly detection pre-training process.

[0069] S32, multi-scale cross restoration

[0070] S321, perform random masking on the multi-scale ECG signal, and g Randomly mask the scattered areas on the local ECG signal x lThe specific continuous area is randomly masked, and the signal after masking is recorded as and

[0071] S322, respectively using independent global encoders E g and the local encoder E l Signal feature extraction is performed to obtain global features and local features; the encoder is composed of several layers of convolution operations, and of course other deformations and improvements can be adopted without affecting the main purpose of the present invention.

[0072] S323, the global features and local features are fused into a unified cross-attention feature by concatenation. This cross-attention feature is dynamically weighted by the self-attention mechanism to guide the model to focus on the most relevant signal area. This process can be expressed as:

[0073]

[0074] in,(·) T is a matrix transpose operation, softmax(·) is a normalized exponential function, represents the square root of the feature dimension as a scaling factor, and concat(·) represents the concatenation of two tensors.

[0075] S324, after obtaining the fused feature information, the fused feature information is re-divided into multi-scale ECG features through two different fully connected networks, and residual connection is performed with the multi-scale ECG features before the attention mechanism to obtain the global ECG feature f g and local ECG characteristics l .

[0076] S325, decoding and restoring multi-scale ECG features: using an independent global decoder D g and local decoder D l Generate global restored 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 restored signal in the time dimension, which is used to measure the difficulty of restoring different signal points in the time dimension to avoid misjudging normal signals that are difficult to restore as abnormal signals. The decoder is composed of several layers of deconvolution operations. Of course, other deformations and improvements can be adopted without affecting the main purpose of the present invention.

[0077] By respectively and local recovery signal The global and local ECG signals x before maskingg 、x l For comparison, calculate the loss function of multi-scale cross-recovery:

[0078]

[0079] Among them, the superscript k represents the signal point in the time dimension, and D and d represent the time lengths of the global and local ECG, respectively.

[0080] S33, Signal Trend Assisted Recovery

[0081] S331, for the global ECG signal x g A sliding average window is applied in the time dimension for smoothing.

[0082] S332, perform differential analysis on adjacent signal points of the smoothed signal and normalize it to obtain a trend signal of the global ECG signal, denoted as x t .

[0083] S333, using the signal feature extraction network to extract high-dimensional feature information of the trend signal, recorded as signal trend feature f t , the signal feature extraction network here has the same structure as the encoder in the previous multi-scale cross restoration.

[0084] S334, the signal trend feature f t The global ECG feature f obtained from multi-scale cross-recovery g The signals are combined in series and the global ECG signal is reconstructed through the decoder. The mask-occluded area is assisted in recovery to obtain a trend-based recovery signal.

[0085] Trend-based recovery signals With the original global ECG signal x g For comparison, calculate the loss function of signal trend assisted recovery:

[0086]

[0087] Here, the superscript k represents the signal point in the time dimension, and D represents the time length of the global ECG.

[0088] S34, Report attribute prediction

[0089] The attribute prediction network is used to predict the report attributes for the series combination of signal trend features and global ECG features. In this embodiment, the attribute prediction network includes two linear fully connected layers. Of course, other deformations and improvements can be adopted without affecting the main purpose of the present invention.

[0090] The predicted attribute vector is recorded as The predicted attribute value is compared with the actual attribute value Y recorded in the ECG report attr Compare and calculate the loss function of the reported attribute prediction to achieve perception of attribute information, thereby reducing the impact of individual differences.

[0091]

[0092] Among them, y i is the actual reported attribute value, Reports attribute values ​​for predictions.

[0093] Then, the loss function of the anomaly detection model is obtained by weighted average of the loss functions 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, which are all selected as 1.0 in this embodiment, and their values ​​can also be specifically selected by those skilled in the art; is the loss function of global multi-scale cross-recovery, is the loss function of local multi-scale cross-recovery, is the loss function for signal trend assisted recovery, The loss function for reporting attribute predictions.

[0096] By using the above supervised loss and combining it with any mainstream deep learning gradient descent algorithm, the anomaly detection model can be trained.

[0097] S4, takes the series combination of the signal trend features obtained in the signal trend assisted recovery and the global ECG features obtained in the multi-scale cross recovery as the input of the long-tail classification network, and the classification results extracted from the ECG report as the output to train the long-tail classification network.

[0098] Based on the pre-trained model obtained by self-supervised anomaly detection pre-training, the parameters of the model are fixed and the signal trend feature f of the ECG signal is extracted. t and the global signal feature f g The combined features are input into the downstream long-tail classification network residual network 18 for multiple classification of abnormal types, and the classification prediction result probability is obtained, which is recorded as P = [p1, ..., p 116 ], including the predicted probabilities of 116 different abnormality types. The predicted classification results are compared with the one-hot vector of the actual abnormality type recorded in the ECG report. For comparison, the symmetric loss function is used for supervision to realize the training of the long-tail classification network. The process can be expressed as:

[0099]

[0100] Among them, γ + ,γ - represents the allocation coefficient of positive and negative labels in multi-label classification, and in this embodiment, it is 1 and 4 respectively, and its value can also be specifically selected by those skilled in the art; is the true classification result, p km =max(p l -m,0) indicates threshold screening of negative labels that are easy to classify, where p l It represents the classification prediction result of the model for the kth type, and m is a fixed value used to filter out the categories with lower prediction results, that is, the categories that are easy to classify. In this embodiment, it is 0.05, and its value can also be specifically selected by those skilled in the art.

[0101] In another embodiment, in addition to fixing the pre-trained model, the anomaly detection model and the long-tail classification network can be jointly trained by adding the loss function. In this case, the supervised loss function is This loss function is used for parameter update of both the anomaly detection model and the long-tail classification network.

[0102] S5, input the ECG signal to be detected into the pre-trained anomaly detection model, combine the obtained signal trend features and global ECG features in series, and input the combined features into the downstream long-tail classification network for multi-classification of anomaly types to obtain the classification prediction result probability. The higher the predicted probability, the more likely it is to have the anomaly.

[0103] The present invention can identify all types of cardiac abnormalities, including common and rare abnormalities, not just specific types of abnormalities, by introducing self-supervised anomaly detection pre-training. The present invention not only performs anomaly detection from the perspective of ECG signals, but also combines the attribute information in the ECG report, taking into account the patient's gender, age, heart rate, PR interval and other ECG indicators, thereby improving the comprehensiveness and reliability of the classification results. Especially in the detection of rare abnormalities, the present invention significantly reduces misdiagnosis and missed diagnosis, providing better clinical auxiliary diagnosis performance.

[0104] This embodiment also provides an electrocardiogram long-tail classification device based on abnormality detection pre-training, including a memory, a processor, and a program stored in the memory, and the processor implements the method described above when executing the program.

[0105] If the above functions are implemented in the form of 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 the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0106] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A long-tail electrocardiogram classification method based on anomaly detection pre-training, characterized in that: The following steps are involved: Acquire multi-scale ECG signals; Obtain ECG report information, and extract report attribute information and classification results from the ECG report; Pre-training an anomaly detection model based on multi-scale electrocardiogram signals and report attribute information, wherein the anomaly detection model performs signal preprocessing on the input multi-scale electrocardiogram signal to obtain a global electrocardiogram signal and a local electrocardiogram signal, performs multi-scale cross-recovery on the global electrocardiogram signal and the local electrocardiogram signal, performs signal trend auxiliary recovery on the global electrocardiogram signal, and performs report attribute prediction; The series combination of the signal trend features obtained in the signal trend assisted recovery and the global ECG features obtained in the multi-scale cross recovery is used as the input of the long-tail classification network, and the classification results extracted from the ECG report are used as the output to train the long-tail classification network; 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, and the combined features are input into the downstream long-tail classification network for multi-classification of anomaly types to obtain the probability of classification prediction results.

2. The electrocardiogram long-tail classification method based on anomaly detection pre-training according to claim 1 is characterized in that: The anomaly detection model performs signal preprocessing on the input multi-scale electrocardiogram signal as follows: For the noisy original ECG signal, the baseline drift and high-frequency noise interference are removed by the signal filter to obtain the denoised ECG signal; A sliding window method is used to minimize the standard deviation of continuous differences, and the dynamic threshold is adaptively calculated to detect the R peak in the denoised ECG signal; According to 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 ECG signals and local ECG signals are obtained.

3. The electrocardiogram long-tail classification method based on anomaly detection pre-training according to claim 1 is characterized in that: The report attribute information includes age, gender, heart rate, PR interval, QT interval, QRS interval and modified QRS interval.

4. The electrocardiogram long-tail classification method based on anomaly detection pre-training according to claim 1 is characterized in that: The multi-scale cross restoration comprises the following steps: Perform random masking on the multi-scale ECG signal, and g Randomly mask the scattered areas on the local ECG signal x l The specific continuous area is randomly masked, and the signal after masking is recorded as and Using independent global encoders E g and the local encoder e l Extract signal features to obtain global features and local features; The global features and local features are fused into a unified cross-attention feature by concatenation: in,(·) T is a matrix transpose operation, softmax(·) is a normalized exponential function, represents the square root of the feature dimension as a scaling factor, and concat(·) represents the concatenation of two tensors; After obtaining the fused feature information, the fused feature information is re-divided 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 ECG characteristics l ; Decoding and restoring multi-scale ECG features: using an independent global decoder D g and local decoder D l Generate global restored signals for multi-scale ECG features Local recovery signal and the corresponding uncertainty σ g ,σ l .

5. The electrocardiogram long-tail classification method based on anomaly detection pre-training according to claim 1 is characterized in that: The signal trend assisted recovery comprises the following steps: For the global ECG signal x g Apply a sliding average window for smoothing in the time dimension; The smoothed signal is differentiated between adjacent signal points and normalized to obtain the trend signal of the global ECG signal, denoted as x t ; The signal feature extraction network is used to extract the high-dimensional feature information of the trend signal, which is recorded as the signal trend feature f t , and the global ECG feature f obtained in multi-scale cross-recovery g The signals are combined in series and the global ECG signal is reconstructed through the decoder. The mask-occluded area is assisted in recovery to obtain a trend-based recovery signal.

6. The electrocardiogram long-tail classification method based on anomaly detection pre-training according to claim 1 is characterized in that: The report attribute prediction specifically includes: using an attribute prediction network to predict the report attribute based on the series combination of signal trend features and global electrocardiogram features.

7. The electrocardiogram long-tail classification method based on anomaly detection pre-training according to claim 4 is characterized in that: The loss function of the anomaly detection model is obtained by weighted average at different levels of the loss function of global and local multi-scale cross recovery, the loss function of signal trend auxiliary recovery, and the loss function of report attribute prediction: Among them, λ1,λ2,λ3,λ4 are hyperparameters, is the loss function of global multi-scale cross-recovery, is the loss function of local multi-scale cross-recovery, is the loss function for signal trend assisted recovery, The loss function for reporting attribute predictions; By respectively and local recovery signal The global and local ECG signals x before masking g 、x l For comparison, calculate the loss function of multi-scale cross-recovery: Among them, the superscript k represents the signal point in the time dimension, and D and d represent the time length of the global and local ECG, respectively; Trend-based recovery signals With the original global ECG signal x g For comparison, calculate the loss function of signal trend assisted recovery: Compare the predicted report attribute values ​​with the true attribute values ​​of the ECG report record, and calculate the loss function of the report attribute prediction: Among them, y i is the actual reported attribute value, is the predicted reported attribute value, and n is the number of reported attributes.

8. The electrocardiogram long-tail classification method based on anomaly detection pre-training according to claim 1 is characterized in that: The predicted classification results of the long-tail classification network are compared with the actual classification results of the ECG report records, and the symmetric loss function is used for supervision to realize the training of the long-tail classification network. The symmetric loss function is expressed as: Among them, γ + ,γ - Represents the allocation coefficient of positive and negative labels in multi-label classification, is the true classification result, p km =max(p k -m,0) indicates threshold screening of negative labels that are easy to classify, where p k It represents the model's classification prediction result for the kth type. m is a fixed value used to filter out categories with low prediction results, that is, categories that are easy to classify. K is the number of classification results.

9. An electrocardiogram long-tail 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, the method according to any one of claims 1 to 8 is implemented.

10. A storage medium having a program stored thereon, characterized in that: When the program is executed, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • EEG emotion recognizing method and device based on images

    CN110353675A

  • Abnormal-electrocardiogram screening method based on electrocardiogram global and local deep feature fusion

    CN110731773A

  • Electrocardiogram data generation method

    CN113303807A

  • Sleep dyspnea detection method and system based on self-supervised memory network

    CN114027786A

  • Electrocardiogram monitoring method and device based on electrocardio information activation

    CN115708684A

Cited By

  • Automatic atrial fibrillation detection system and detection method

    CN119791675A