Electrocardio diagnosis method, model training method and device
By collaboratively learning the local morphology and global dependency features of ECG signals using the ELOGOnet model and cross-gating fusion with patient metadata, the problem of incomplete feature representation and insufficient utilization of prior knowledge in existing technologies is solved, thus achieving high-precision and reliable ECG diagnosis.
Patent Information
- Application Number
- CN202511437916.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2025-12-26
AI Technical Summary
Existing deep learning-based electrocardiogram (ECG) diagnostic technologies struggle to efficiently and collaboratively learn local morphological details and global rhythm patterns of ECG signals within a unified framework, and fail to effectively utilize prior medical knowledge and patient metadata, resulting in insufficient robustness and accuracy in diagnosis.
The ELOGOnet model is adopted, which extracts local morphological and global dependency features of ECG signals through the LoGo backbone network, and performs cross-gating fusion with patient metadata. Combined with the correlation loss function to guide model training, it realizes the collaborative learning of local and global features and the effective utilization of medical knowledge.
It significantly improves the accuracy and robustness of ECG diagnosis, better copes with complex diagnostic scenarios, enhances the model's adaptability to noise and missing data, improves the personalization and reliability of diagnosis, and conforms to clinical diagnostic logic.
Smart Images

Figure CN121196475A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence and medical diagnosis, and in particular to an electrocardiogram diagnosis method and a model training method and device. BACKGROUND
[0002] An electrocardiogram (ECG) signal is an indispensable clinical tool for diagnosing cardiovascular diseases. The diagnostic process of an experienced cardiologist is a holistic reasoning behavior that integrates two key aspects: 1) collaborative analysis of signals: overall interpretation of the electrocardiogram signal itself, including both detailed examination of local waveform morphology (such as P-QRS-T wave groups) and macroscopic assessment of global rhythm patterns (such as heart rate variability); 2) prior knowledge guided interpretation: calibration and contextualization of observed features in the signal with external knowledge, including internalized medical prior knowledge (such as concurrent and mutually exclusive relationships between diseases) and external patient-specific information (i.e. metadata, such as age, gender, etc.).
[0003] With the development of artificial intelligence technology, deep learning models have made significant progress in automated electrocardiogram interpretation. Existing mainstream methods show two different focuses when processing signal features. One class of methods takes convolutional neural networks (CNN) as the core, which are good at extracting local morphological features of signals, but their inherent limited receptive field makes it difficult to effectively capture long-term global rhythm information. Another class of methods uses Transformer or state space models (SSM) architecture, which are originally designed to capture long-range temporal dependencies to grasp the overall pattern of the signal, but doing so may not fully utilize the valuable convolutional inductive bias advantage that CNNs have in extracting fine-grained features. SUMMARY
[0004] In view of this, the present application provides an electrocardiogram diagnosis method, a model training method and device.
[0005] According to a first aspect of the present application, an electrocardiogram diagnosis method is provided, comprising: extracting original features, local morphological features and global dependency features from electrocardiogram data of a target object, fusing the original features, global dependency features and local morphological features to obtain electrocardiogram fusion features; extracting metadata features from metadata of the target object, and mutually modulating the metadata features and the electrocardiogram fusion features to obtain enhanced metadata features and enhanced electrocardiogram fusion features; and predicting a disease category of the target object based on the enhanced metadata features and the enhanced electrocardiogram fusion features to obtain a diagnosis result.
[0006] According to an embodiment of the present application, the original feature, the local morphological feature and the global dependence feature are extracted from the electrocardio data of the target object, the original feature, the global dependence feature and the local morphological feature are fused to obtain the electrocardio fusion feature, including: obtaining a feature tensor of the electrocardio data, dividing the feature tensor along a channel dimension into independent and parallel first segmentation features, second segmentation features and third segmentation features; based on the first segmentation features, the second segmentation features and the third segmentation features, respectively generating the original feature, the local morphological feature and the global dependence feature; channel splicing the original feature, the local morphological feature and the global dependence feature to obtain the electrocardio fusion feature.
[0007] According to an embodiment of the present application, the original feature is generated based on the first segmentation feature, including: performing an identity mapping on the first segmentation feature to obtain the original feature.
[0008] According to an embodiment of the present application, the local morphological feature is generated based on the second segmentation feature, including: cutting the second segmentation feature to obtain a plurality of segmentation sub-features; respectively performing convolution on each segmentation sub-feature by using convolution layers with different expansion rates to obtain convolution features of each segmentation sub-feature; and splicing each convolution feature to obtain the local morphological feature.
[0009] According to an embodiment of the present application, the global dependence feature is generated based on the third segmentation feature, including: performing depth separable convolution and batch normalization processing on the third segmentation feature to obtain a preprocessed feature; modeling long-range dependence of the preprocessed feature based on a unidirectional state space model to obtain a modeled feature; performing nonlinear transformation on the modeled feature by using a feedforward network to obtain a transformed feature; performing element-wise addition of the transformed feature and the third segmentation feature through residual connection, and performing layer normalization processing on the added feature to obtain the global dependence feature.
[0010] According to an embodiment of the present application, the metadata feature and the electrocardio fusion feature are mutually modulated to obtain an enhanced metadata feature and an enhanced electrocardio fusion feature, including: mutually modulating the metadata feature and the electrocardio fusion feature through a bidirectional gating mechanism to obtain the enhanced metadata feature and the enhanced electrocardio fusion feature.
[0011] According to an embodiment of the present application, the metadata features and the electrocardio fusion features are mutually modulated through a bidirectional gating mechanism to obtain enhanced metadata features and enhanced electrocardio fusion features, including: based on a first gating function, a first gating signal corresponding to the metadata features is generated, the first gating signal is multiplied with the electrocardio fusion features element by element, and the multiplication result is added to the electrocardio fusion features through a residual connection to obtain the enhanced electrocardio fusion features; based on a second gating function, a second gating signal corresponding to the electrocardio fusion features is obtained, the second gating signal is multiplied with the metadata features element by element, and the multiplication result is added to the metadata features through a residual connection to obtain the enhanced metadata features.
[0012] According to an embodiment of the present application, based on the enhanced metadata features and the enhanced electrocardio fusion features, the disease categories of the target object are predicted to obtain a diagnosis result, including: the enhanced metadata features and the enhanced electrocardio fusion features are spliced to obtain spliced features; the spliced features are globally pooled to obtain a global feature vector; and the global feature vector is input into a classification head to output prediction probabilities of each disease category, thereby obtaining the diagnosis result.
[0013] The second aspect of the present application provides a training method of an electrocardio diagnosis model, including: obtaining training samples, the training samples including electrocardio data, patient metadata, and corresponding multi-label disease diagnosis labels; based on the multi-label diagnosis labels, the co-occurrence frequency or correlation between diseases is counted, and a disease correlation matrix is constructed based on the counting result; a set of clinically mutually exclusive disease pairs is predefined; in the training process of the electrocardio diagnosis model, for each training batch: a standard classification loss is calculated; a co-morbidity loss is calculated based on the difference between the disease correlation predicted by the model and the disease correlation matrix; an inhibition loss is calculated based on the joint high probability prediction of mutually exclusive disease pairs by the model; the standard classification loss, the co-morbidity loss, and the inhibition loss are weighted and summed to obtain a total loss function; and the parameters of the electrocardio diagnosis model are updated based on the total loss function through a back propagation algorithm to complete the model training.
[0014] The third aspect of the present application provides an electrocardio diagnosis device, including: an extraction module for extracting original features, local morphological features, and global dependency features from electrocardio data of a target object, and fusing the original features, the global dependency features, and the local morphological features to obtain electrocardio fusion features; a fusion module for extracting metadata features from metadata of the target object, and mutually modulating the metadata features and the electrocardio fusion features to obtain enhanced metadata features and enhanced electrocardio fusion features; and a diagnosis module for predicting disease categories of the target object based on the enhanced metadata features and the enhanced electrocardio fusion features to obtain a diagnosis result. BRIEF DESCRIPTION OF DRAWINGS
[0015] The above and other objects, features and advantages of the present application will become more apparent from the following description when taken in conjunction with the accompanying drawings, in which:
[0016] Figure 1 An ELOGOnet simulation expert diagnosis flowchart according to an embodiment of the present application is schematically shown;
[0017] Figure 2 An architecture diagram of a LoGo backbone network according to an embodiment of the present application is schematically shown;
[0018] Figure 3 A processing flowchart of a global dependency branch according to an embodiment of the present application is schematically shown;
[0019] Figure 4 An electrocardio data and patient metadata fusion flowchart according to an embodiment of the present application is schematically shown;
[0020] Figure 5 A flowchart of an electrocardio diagnosis method according to an embodiment of the present application is schematically shown;
[0021] Figure 6 A flowchart of a training method of an electrocardio diagnosis model according to an embodiment of the present application is schematically shown;
[0022] Figure 7 A structural block diagram of an electrocardio diagnosis device according to an embodiment of the present application is schematically shown;
[0023] Figure 8 A block diagram of an electronic device suitable for implementing the methods herein according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0024] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. It is to be understood, however, that the description is merely exemplary of the present application, and is intended to provide a thorough description for those skilled in the art to understand the present application. Therefore, the description is not intended to limit the scope of the present application. In the following detailed description of the embodiments, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without these specific details. In other instances, well-known structures and functions have not been described in detail in order to avoid obscuring aspects of the present application.
[0025] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the present application. As used herein, the term "includes" and "comprising" and the like are meant to be inclusive in a manner that there are no other non-mentioned items.
[0026] All terms used herein, including technical and scientific terms, have the meanings commonly understood by one of ordinary skill in the art unless otherwise defined. It should be further noted that the use of terms such as first and second, etc., is only intended to differentiate and does not imply these terms have any ordinal, hierarchical or serial meanings. It is to be understood that the terms so used are interchangeable under appropriate circumstances and embodiments.
[0027] In the case of using expressions similar to "at least one of A, B, and C, etc.", it should generally be interpreted that the expression is inclusive of the possibilities of A alone, B alone, C alone, A and B together, A and C together, B and C together, and / or A, B, and C together, etc.
[0028] Applicants found in the research that the existing deep learning-based electrocardiogram diagnosis technology mainly has the following shortcomings:
[0029] (1) Lack of coordination between local and global feature learning: Existing model architectures are generally difficult to efficiently and collaboratively learn the local morphological details and global rhythm patterns of electrocardiogram signals in a unified framework. They either focus on the local and ignore the global, or focus on the global and may lose local key information, and cannot simulate the expert doctor's "local-global" combined collaborative analysis process.
[0030] (2) Insufficient use of medical prior knowledge and patient metadata: Existing models generally ignore low-cost but valuable sources of prior knowledge. They fail to effectively use the relevance between diseases (such as complications, mutually exclusive diseases) to improve the clinical consistency of diagnosis; at the same time, when fusing patient metadata, there is a lack of robust processing mechanism for data missing problems, which limits the reliability of the model in real clinical scenarios.
[0031] To solve the problem of incomplete feature representation and insufficient use of prior knowledge in existing ECG automatic diagnosis technology, the embodiment of the present application proposes a knowledge-enhanced local and global feature collaborative learning electrocardiogram diagnosis method named ELOGOnet. Figure 1 Analogous expert diagnosis flowchart according to the embodiment of the present application is schematically shown.
[0032] As Figure 1As shown, in the expert diagnosis process, experienced cardiologists can perform electrocardiogram analysis (including local morphology and global rhythm), patient interrogation and medical history collection, and clinical diagnosis combined with internal knowledge base (including doctors' internalized medical prior knowledge, such as concurrent and mutually exclusive relationships between diseases). The present application simulates the multi-dimensional reasoning process of experienced cardiologists by constructing a systematic deep learning framework (referred to as ELOGOnet) to achieve high-precision, multi-label classification of cardiovascular diseases. The ELOGOnet model can mainly consist of three core parts in structure: a LoGo backbone network, which is a network for extracting local-global features of ECG signals, which can simulate expert electrocardiogram analysis; a metadata encoder, which is a multi-modal fusion module for fusing patient metadata, which can simulate expert patient interrogation and medical history collection; and a correlation loss for guiding the final classification, which can simulate the combination of internal knowledge base and differential diagnosis results by experts.
[0033] Specifically, when applied to an electrocardiogram diagnosis method, the input electrocardiogram signal first flows through the LoGo backbone network to extract original features, local morphology features and global dependency features from the electrocardiogram data of the target object, fuse the original features, global dependency features and local morphology features to obtain electrocardiogram fusion features. The electrocardiogram fusion features are a kind of multi-scale, complementary ECG representation covering local details and global context. In the deep layer of the backbone network, the extracted electrocardiogram fusion features and the encoded patient metadata features are mutually modulated through the cross-gating fusion module to obtain enhanced metadata features and enhanced electrocardiogram fusion features. Finally, the electrocardiogram fusion features are sent to the classification head, and the classification head predicts the disease category of the target object based on the enhanced metadata features and the enhanced electrocardiogram fusion features to obtain the diagnosis result. For example, the output is the prediction probability of multiple diseases. The training process of the whole model can be guided end-to-end by a composite loss function integrating the correlation loss.
[0034] The model cooperatively extracts and fuses local morphology and global dependency features of electrocardiogram signals to achieve comprehensive perception of waveform details and rhythm patterns. The bidirectional modulation mechanism of electrocardiogram features and patient metadata is innovatively introduced to dynamically interact and mutually enhance each other, improving the personalization and robustness of diagnosis. The overall architecture simulates the comprehensive interpretation process of experts, not only significantly improving the accuracy of multi-disease classification, but also enhancing the adaptability of the model to noise and missing data, providing more reliable and interpretable intelligent diagnosis support for clinical practice.
[0035] Figure 2 An architectural diagram of the LoGo backbone network according to an embodiment of the present application is schematically shown.
[0036] AsFigure 2 As shown, the LoGo backbone network can convert the feature tensor x of the obtained electrocardiogram data ecg_in The first segmentation feature x is divided into independent and parallel segments along the channel dimension. id_in Second segmentation feature x lo_in and the third segmentation feature x gl_in The LoGo backbone network can include an information preservation branch, a local morphology extraction branch, and a global dependency modeling branch. The information preservation branch can be based on the first segmentation feature x. id_in Generate original feature x identity The local morphology extraction branch can be based on the second segmentation feature x. lo_in Generate local morphological features x local The global dependency modeling branch can be based on the third segmentation feature x. gl_in Generate global dependency features x global The LoGo backbone network can convert the original features x identity Local morphological features x local and global dependency feature x global Channel splicing is performed to form a unified feature representation, thus obtaining the ECG fusion feature x. ecg ECG fusion characteristics x ecg It can be represented as:
[0037]
[0038] This design allows features learned from different receptive fields and levels of abstraction to be combined synergistically to generate a comprehensive ECG representation rich in local detail and global context.
[0039] like Figure 2 As shown, in some embodiments, the information-preserving branch can be applied to the first segmentation feature x. id_in Perform identity mapping to generate the original feature x. identity Identity mapping can preserve original features, prevent information loss during depth transformations, and improve computational efficiency.
[0040] In some embodiments, the local morphology extraction branch can extract the second segmentation feature x. lo_in The segmentation is further divided to obtain multiple sub-features. Then, convolutional layers with different dilation rates are used to convolve each sub-feature, resulting in convolutional features for each sub-feature. Finally, these convolutional features are concatenated to obtain the local morphological feature x. local .like Figure 2As shown, the local morphology extraction branch can, for example, employ two one-dimensional convolutional layers with different dilation rates (d=1 and d=2, respectively) to convolve each segmentation feature. The standard convolution with a dilation rate of 1 focuses on capturing immediate morphological details, while the convolution with a dilation rate of 2 captures a broader range of local context. This multi-scale design enables the accurate extraction of fine-grained waveform features with relatively low computational cost.
[0041] like Figure 2 As shown, the global dependency modeling branch can use the Unidirectional Causal Channel-Mixed State Space Model (UICM-SSM) designed in this invention to generate global dependency features x. global UICM-SSM is an SSM based on the S4 architecture. Unlike models that rely on explicit data-driven selection mechanisms, the SSM based on the S4 architecture used in this invention has structured parameters that enable it to implicitly and independently learn state transitions. This design is highly compatible with the inherent unidirectional causality and regularity of cardiac electrophysiological signals, enabling the learning of more stable and universal physiological and pathological patterns. This branch also runs in parallel with a residual module, whose output is fused with the output of UICM-SSM through element-wise addition to enhance feature diversity. Figure 3 A flowchart illustrating the processing of global dependency branches according to an embodiment of the present invention is shown.
[0042] like Figure 3 As shown, the feature input of the global dependency branch is the third segmentation feature x. gl_in The input features first pass through a preprocessing layer consisting of depthwise separable convolutions (DWConv) and batch normalization (BatchNorm), resulting in preprocessed features x. gl_pre This can be represented as:
[0043]
[0044] Next, preprocess feature x gl_pre The data is fed into the core Unidirectional StateSpace Model (Ui-SSM) layer for long-range dependency modeling, resulting in the modeling feature x. ssm This can be represented as:
[0045]
[0046] Subsequently, modeling feature x ssm The transformation feature x is obtained by performing a nonlinear transformation through a feedforward network (FFN). ffnIn some embodiments, the feedforward network can include a GELU activation function and a channel-mixed multi-layer perceptron (MLP). It can be represented as:
[0047]
[0048] Finally, the transformed feature x ffn is added element-wise to the input third segmentation feature x gl_in to enhance the diversity of features and stabilize training, and then passed through a LayerNorm to obtain the final output of the global dependency modeling branch, i.e., the global dependency feature x global . It can be represented as:
[0049]
[0050] To achieve deep fusion of ECG features and patient metadata rather than simple feature concatenation, the present application designs a cross-gated fusion module. The core idea is that features of different modalities should adjust to each other, dynamically and selectively enhancing the key parts of each other's information. This process can be achieved, for example, through a bidirectional gating mechanism. Figure 4 An ECG data and patient metadata fusion flowchart according to an embodiment of the present application is schematically shown.
[0051] As shown in Figure 4 , the cross-gated fusion module receives the ECG fusion feature x ecg output from the LoGo backbone network and the output metadata feature x mate from the metadata encoder as input, and realizes mutual modulation and enhancement of features through a bidirectional gating mechanism, which includes two symmetric information flows, the specific calculation process of which is as follows.
[0052] One aspect is the gating modulation of the metadata feature x mate to the ECG fusion feature x ecg . In this information flow, the patient's metadata is used to filter and weight the ECG waveform features. Specifically, the metadata feature x mate is first passed through a gating function G m . This function can consist of a linear layer and a Sigmoid activation function. The output value range of the Sigmoid function is (0, 1), which makes its output can be regarded as a gating signal of information permeability, where each element value represents the importance weight of the corresponding ECG feature channel. This signal then performs element-wise multiplication on the ECG fusion feature x ecg , and the result is added to the original ECG fusion feature x ecg through a residual connection.The addition obtains the enhanced electrocardio fusion feature x' ecg The process can be represented by the following formula:
[0053]
[0054]
[0055] Wherein, represents element-wise multiplication.
[0056] On the other hand, the electrocardio fusion feature x ecg is also used to modulate the metadata feature x mate to form a dynamic, context-aware metadata representation, since the weights of the metadata will also change according to the current observed ECG feature pattern. The electrocardio fusion feature x ecg generates a gating signal through another gating function G ecg . Similar to the gating function G m , the gating function G ecg can consist of a linear layer and a Sigmoid activation function. The signal then performs element-wise modulation on the metadata feature x mate , and generates the enhanced metadata feature x' mate through a residual connection.
[0057]
[0058]
[0059] Through this bidirectional, mutually enhanced gating mechanism, the model can adaptively and nonlinearly learn the deep fusion pattern of the two heterogeneous features, rather than performing a static linear combination.
[0060] Then, the enhanced electrocardio fusion feature x' ecg and the metadata feature x' mate can be concatenated to obtain the concatenated feature. The concatenated feature is globally pooled to obtain a global feature vector. For example, average pooling can be performed. Then the global feature vector is input into the classification head to output the prediction probability of each disease category, obtaining the diagnosis result.
[0061] Please refer back to Figure 1 . To incorporate medical prior knowledge into the model learning process, the present application innovatively designs an association loss function to guide model training. The loss function, as a regularization term of the standard classification loss, can consist of two complementary parts.
[0062] One part is the comorbidity loss L 共病It can guide the model to learn the objective co-morbidity relationship between diseases by aligning the model-predicted disease correlations with the benchmark correlations statistically derived from real clinical data. Before the model training starts, a global statistical analysis can be first performed on the real labels of the whole training dataset. By calculating the Pearson correlation coefficients or normalized co-occurrence frequencies between different disease labels, a disease correlation matrix is constructed. This matrix quantifies the objective co-morbidity strength between any two diseases in the dataset.
[0063] During the model training process, for each training batch, the model's prediction probabilities for all diseases can be calculated through the co-morbidity loss function. Subsequently, these prediction probabilities are compared with the pre-computed disease correlation matrix. Specifically, for the disease pairs that present strong positive correlations in the correlation matrix, the loss function will encourage the model to make correlated predictions. If the model's prediction trend for a pair of strongly correlated diseases deviates, the loss value will increase. This increased loss value drives the model parameters to adjust through the backpropagation mechanism, so that the model's prediction behavior gradually aligns with the real disease correlation patterns embedded in the data.
[0064] Another part is the inhibition loss L 抑制 . It can model the mutual exclusive relationship between diseases by penalizing the model's behavior of simultaneously making high probability predictions for predefined pairs of clinically exclusive diseases. First, a set of predefined exclusive disease pairs can be constructed. This set includes all disease combinations that do not coexist in the training set.
[0065] During the model training process, the mutual exclusive loss function can iteratively evaluate the model's prediction output for each sample. For any pair of diseases defined in the exclusive disease pair set, if the model gives them both high prediction probabilities, the loss function will calculate a penalty term. In this way, the model is guided to learn the exclusive relationship between diseases, thereby avoiding generating self-contradictory diagnostic conclusions.
[0066] Finally, the training process of the entire framework is optimized through an integrated total loss function. This total loss function is a weighted sum of the standard classification loss L 分类 , the co-morbidity loss L 共病 and the inhibition loss L 抑制 , which can be represented as follows:
[0067]
[0068] where the standard classification loss L 分类Binary Cross-Entropy can be used for calculation, which is suitable for multi-label classification scenarios where multiple diseases may exist for each sample. The weight coefficients λ1 and λ2 are hyperparameters that balance the contributions of each item. For example, λ1=0.5, λ2=0.1. By jointly optimizing this composite loss, the model not only learns to distinguish individual diseases, but also actively learns and utilizes the inherent relationships between diseases, making its diagnostic logic more in line with clinical practice. After training is complete, the framework can be used for accurate, robust, and clinically logical automatic cardiac disease diagnosis of new ECG signals and patient metadata.
[0069] Based on the above multiple embodiments, compared with the prior art, the present application has at least the following beneficial effects:
[0070] (1) Local-global collaborative analysis is achieved: the parallel fusion architecture enables the model to simultaneously focus on local waveform details (excellent performance on morphological disease diagnosis) and global rhythm patterns (excellent performance on rhythm disease diagnosis), forming a more comprehensive and powerful ECG representation that can handle a wider and more complex diagnostic scenario.
[0071] (2) The robustness of the diagnostic decision is strong: the cross-gating fusion mechanism of the present application can adaptively weigh the importance of ECG signals and patient metadata. It can effectively amplify key diagnostic clues and suppress potential noise by learning the dynamic interaction between the two information modalities, which enables the model to make more stable and reliable diagnostic decisions when faced with different quality and relevance of metadata.
[0072] (3) Higher clinical consistency and credibility: by introducing the association loss function, the present application can actively learn and utilize the concurrent and mutually exclusive relationships between diseases, making the model's diagnostic results more in line with clinical logic. This not only improves the accuracy of the model, but also enhances the credibility and clinical application potential of its prediction results.
[0073] (4) The diagnostic accuracy is significantly improved: the method proposed in the present application achieves the best performance on multi-label and individual disease classification tasks on some mainstream public electrocardiogram datasets (such as ptb-xl, cpsc, g12ec).
[0074] Figure 5 A flowchart of an electrocardiogram diagnosis method according to an embodiment of the present application is schematically shown.
[0075] As Figure 5 shown, the electrocardiogram diagnosis method of the present embodiment can include steps S510-S530.
[0076] In step S510, original features, local morphological features and global dependency features are extracted from the electrocardio data of the target object, the original features, the global dependency features and the local morphological features are fused to obtain electrocardio fusion features;
[0077] In step S520, metadata features are extracted from the metadata of the target object, and the metadata features and the electrocardio fusion features are modulated with each other to obtain enhanced metadata features and enhanced electrocardio fusion features.
[0078] In step S530, based on the enhanced metadata features and the enhanced electrocardio fusion features, the disease category of the target object is predicted to obtain a diagnosis result.
[0079] Figure 6 A flowchart of a training method of an electrocardio diagnosis model according to an embodiment of the present application is schematically shown. In some embodiments, the electrocardio diagnosis model can be the ELOGOnet model proposed above.
[0080] As shown in Figure 6 The training method of the electrocardio diagnosis model of the present embodiment can include steps S610-S660.
[0081] In step S610, training samples are obtained, which include electrocardio data, patient metadata and corresponding multi-label disease diagnosis labels.
[0082] In step S620, based on the multi-label diagnosis labels, the co-occurrence frequency or correlation between diseases is counted, and a disease correlation matrix is constructed based on the counting result.
[0083] In step S630, a set of clinically mutually exclusive disease pairs is predefined.
[0084] In step S640, during the training process of the electrocardio diagnosis model, for each training batch: a standard classification loss is calculated; a comorbidity loss is calculated based on the difference between the disease correlation predicted by the model and the disease correlation matrix; and an inhibition loss is calculated based on the joint high probability prediction of mutually exclusive disease pairs by the model.
[0085] In step S650, the standard classification loss, the comorbidity loss and the inhibition loss are weighted and summed to obtain a total loss function.
[0086] In step S660, based on the total loss function, the parameters of the electrocardio diagnosis model are updated by a back propagation algorithm to complete the model training.
[0087] Figure 7 A structural block diagram of an electrocardio diagnosis device according to an embodiment of the present application is schematically shown.
[0088] As shown in Figure 7As shown, the electrocardiogram diagnosis apparatus 700 can include an extraction module 710, a fusion module 720 and a diagnosis module 730.
[0089] The extraction module 710 is configured to extract original features, local morphological features and global dependency features from electrocardiogram data of a target object, fuse the original features, the global dependency features and the local morphological features to obtain electrocardiogram fusion features.
[0090] The fusion module 720 is configured to extract metadata features from metadata of the target object, and modulate the metadata features and the electrocardiogram fusion features to obtain enhanced metadata features and enhanced electrocardiogram fusion features.
[0091] The diagnosis module 730 is configured to predict a disease category of the target object based on the enhanced metadata features and the enhanced electrocardiogram fusion features to obtain a diagnosis result.
[0092] In some embodiments, the extraction module 710 can be configured to perform the step S510 described above. In some embodiments, the fusion module 720 can be configured to perform the step S520 described above. In some embodiments, the diagnosis module 730 can be configured to perform the step S530 described above.
[0093] The specific details of the electrocardiogram diagnosis method, the training method of the electrocardiogram diagnosis model and the electrocardiogram diagnosis apparatus can be referred to the foregoing, and will not be described here.
[0094] It should be emphasized that the present application designs ELOGOnet, LoGo backbone network, UICM-SSM, and these names are only designed for the convenience of describing the characteristics of the model or module, and do not constitute further limitations on the structure and function of the model or module. In other embodiments, these models or modules can also be replaced by other names with the same technical connotation.
[0095] Figure 8 A block diagram of an electronic device suitable for implementing the methods herein according to an embodiment of the present application is schematically shown.
[0096] As Figure 8 As shown, the electronic device 800 according to an embodiment of the present application includes a processor 801, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 802 or loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 can include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor, and / or a related chipset, and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 can also include an on-board memory for cache use. The processor 801 can include a single processing unit or multiple processing units for performing different actions of the method processes according to embodiments of the present application.
[0097] In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other via the bus 804. The processor 801 performs various operations of the method flow according to the embodiments of the present application by executing the programs in the ROM 802 and / or the RAM 803. It should be noted that the programs can also be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 can also perform various operations of the method flow according to the embodiments of the present application by executing the programs stored in the one or more memories.
[0098] According to the embodiments of the present application, the electronic device 800 can further include an input / output (I / O) interface 805, which is also connected to the bus 804. The electronic device 800 can further include one or more of the following components connected to the input / output (I / O) interface 805: an input part 806 including a keyboard, a mouse, etc.; an output part 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage part 808 including a hard disk, etc.; and a communication part 809 including a network interface card such as a LAN card, a modem, etc. The communication part 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 810 as necessary, so that a computer program read out therefrom is installed in the storage part 808 as necessary.
[0099] The present application also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments; or can exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, when the one or more programs are executed, the method according to the embodiments of the present application is implemented.
[0100] According to an embodiment of the present application, the computer readable storage medium can be a non-transitory computer readable storage medium, for example, can include but not limited to: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this application, a computer readable storage medium can be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer readable storage medium can include the ROM 802 and / or the RAM 803 described above, and / or one or more memory devices other than the ROM 802 and the RAM 803.
[0101] Embodiments of the present application also include a computer program product that includes a computer program for performing the methods presented in the flowcharts. The program code of the computer program product is used to cause a computer system to implement the methods provided by embodiments of the present application when the computer program product is run on the computer system.
[0102] The above described functions defined in the system / apparatus of the embodiments of the present application are performed when the computer program is executed by the processor 801. According to an embodiment of the present application, the above described system, apparatus, module, unit, etc. can be implemented by means of a computer program module.
[0103] In one embodiment, the computer program can be stored in a tangible storage medium, such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program can also be transmitted in a signal form, such as downloaded and installed through the communications portion 809, and / or installed from the removable medium 811. The program code of the computer program contains the instructions that are used to implement the methods provided by the embodiments of the present application. The program code can be transmitted using any suitable network medium, including but not limited to wireless, wired, etc., or any suitable combination of the foregoing.
[0104] In such an embodiment, the computer program can be downloaded and installed from the network through the communications portion 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above described functions defined in the system of the embodiments of the present application are performed. According to an embodiment of the present application, the above described system, apparatus, device, module, unit, etc. can be implemented by means of a computer program module.
[0105] According to embodiments of the present application, program code for implementing the computer programs provided by embodiments of the present application can be written in any combination of one or more programming languages, and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The programming language can include, but is not limited to, Java, C++, python, "C" language, or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the remote computing device, or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.
[0106] The computer program instructions can also be loaded onto a computer or other programmable information processing apparatus to cause a series of operations to be performed on the computer or other programmable information processing apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable information processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0107] Those skilled in the art will appreciate that the features recited in the various embodiments of the present application can be combined and / or integrated in a variety of ways, even if such combinations or integrations are not expressly noted in the present application. In particular, the features recited in the various embodiments of the present application can be combined and / or integrated in a variety of ways without departing from the spirit and scope of the present application. All such combinations and / or integrations are within the scope of the present application.
[0108] The embodiments of the present application described above are merely intended to illustrate the present application. These embodiments are merely for illustrative purposes, and are not intended to limit the scope of the present application. Although the above describes each embodiment separately, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Numerous alternatives and modifications of embodiments of the present application can be made by those skilled in the art without departing from the scope of the present application, and all such alternatives and modifications are to be included within the scope of the present application.
Claims
1. A method for electrocardiogram diagnosis, characterized in that, include: The original features, local morphological features, and global dependency features are extracted from the electrocardiogram (ECG) data of the target object. The original features, the global dependency features, and the local morphological features are then fused to obtain the ECG fusion features. Metadata features are extracted from the metadata of the target object, and the metadata features and the ECG fusion features are modulated to obtain enhanced metadata features and enhanced ECG fusion features; Based on the enhanced metadata features and the enhanced electrocardiogram fusion features, the disease category of the target object is predicted, and a diagnosis result is obtained.
2. The electrocardiogram diagnostic method according to claim 1, characterized in that, The step of extracting original features, local morphological features, and global dependency features from the electrocardiogram (ECG) data of the target object, and fusing the original features, the global dependency features, and the local morphological features to obtain ECG fused features includes: Obtain the feature tensor of the electrocardiogram data, and divide the feature tensor into independent and parallel first segmentation features, second segmentation features and third segmentation features along the channel dimension; Based on the first segmentation feature, the second segmentation feature, and the third segmentation feature, the original feature, the local morphological feature, and the global dependency feature are generated respectively. The original features, local morphological features, and global dependency features are concatenated to obtain the ECG fusion features.
3. The electrocardiogram diagnostic method according to claim 2, characterized in that, Generating original features based on the first segmentation features includes: The first segmentation feature is subjected to an identity mapping to obtain the original feature.
4. The electrocardiogram diagnostic method according to claim 2, characterized in that, Generating the local morphological features based on the second segmentation feature includes: The second segmentation feature is divided into multiple segmentation sub-features; Each segmentation feature is convolved by a convolutional layer with a different dilation rate to obtain the convolutional features of each segmentation feature; The convolutional features are concatenated to obtain the local morphological features.
5. The electrocardiogram diagnostic method according to claim 2, characterized in that, Generating the global dependency feature based on the third segmentation feature includes: The third segmentation feature is subjected to depthwise separable convolution and batch normalization to obtain preprocessed features; Based on a one-way state-space model, long-range dependency modeling is performed on the preprocessed features to obtain modeling features. The modeling features are nonlinearly transformed using a feedforward network to obtain the transformed features. By using residual connections, the transformed features and the third segmentation features are added element-wise, and the added features are then subjected to layer normalization to obtain the global dependency features.
6. The electrocardiogram diagnostic method according to claim 1, characterized in that, The step of intermodulating the metadata features and the ECG fusion features to obtain enhanced metadata features and enhanced ECG fusion features includes: The metadata features and the ECG fusion features are modulated by a bidirectional gating mechanism to obtain enhanced metadata features and enhanced ECG fusion features.
7. The electrocardiogram diagnostic method according to claim 6, characterized in that, The step of modulating the metadata features and the ECG fusion features through a bidirectional gating mechanism to obtain enhanced metadata features and enhanced ECG fusion features includes: Based on the first gating function, a first gating signal corresponding to the metadata feature is generated. The first gating signal is multiplied element-wise with the ECG fusion feature. The multiplication result is added to the ECG fusion feature through residual connection to obtain the enhanced ECG fusion feature. Based on the second gating function, a second gating signal corresponding to the ECG fusion feature is generated. The second gating signal is multiplied element-wise with the metadata feature. The multiplication result is added to the metadata feature through residual connection to obtain the enhanced metadata feature.
8. The electrocardiogram diagnostic method according to claim 1, characterized in that, The method of predicting the disease category of the target object based on the enhanced metadata features and the enhanced electrocardiogram fusion features, and obtaining the diagnostic results, includes: The enhanced metadata features and the enhanced ECG fusion features are concatenated to obtain the concatenated features; The concatenated features are subjected to global pooling to obtain a global feature vector; The global feature vector is input into the classification head, which outputs the predicted probability of each disease category to obtain the diagnosis result.
9. A training method for an electrocardiogram (ECG) diagnostic model, characterized in that, include: Acquire training samples, which include electrocardiogram data, patient metadata, and corresponding multi-label disease diagnosis labels; Based on the multi-label diagnostic labels, the co-occurrence frequency or correlation between diseases is statistically analyzed, and a disease association matrix is constructed based on the statistical results. Predefine a set of clinically mutually exclusive disease pairs; During the training process of the ECG diagnostic model, for each training batch: Calculate the standard classification loss; The comorbidity loss is calculated based on the difference between the disease correlation predicted by the model and the disease correlation matrix. Based on the model's joint high-probability prediction of mutually exclusive disease pairs, the inhibition loss is calculated; The total loss function is obtained by weighted summation of the standard classification loss, comorbidity loss, and inhibition loss. Based on the total loss function, the parameters of the ECG diagnostic model are updated using the backpropagation algorithm to complete model training.
10. An electrocardiogram (ECG) diagnostic device, characterized in that, include: The extraction module is used to extract original features, local morphological features and global dependency features from the electrocardiogram data of the target object, and to fuse the original features, the global dependency features and the local morphological features to obtain the electrocardiogram fusion features; The fusion module is used to extract metadata features from the metadata of the target object, and to modulate the metadata features and the ECG fusion features to obtain enhanced metadata features and enhanced ECG fusion features; The diagnostic module is used to predict the disease category of the target object based on the enhanced metadata features and the enhanced electrocardiogram fusion features, and obtain a diagnostic result.
