Multi-view dynamic fusion electrocardiogram diagnosis method and system based on graph embedding

By constructing a high-quality spatiotemporal graph structure and introducing a multi-view dynamic fusion ECG diagnosis method with graph embedding, the problems of insufficient topological dependence between leads and rigid multi-view information fusion in the existing technology are solved, and high accuracy and robustness of ECG diagnosis are achieved, which can adapt to data conditions with different sampling rates and signal-to-noise ratios.

CN120632548APending Publication Date: 2025-09-12SUN YAT SEN UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510565770.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing electrocardiogram diagnosis methods have problems in multi-lead structure modeling, multi-view information fusion and graph neural network integration, such as insufficient topological dependence between leads, rigid multi-view information fusion strategy, decoupling of graph modeling and multi-view extraction process, and lack of structural plasticity and diversity adaptability of the model, resulting in insufficient diagnostic accuracy and robustness.

Method used

A multi-view dynamic fusion ECG diagnosis method based on graph embedding is adopted. By constructing a high-quality spatiotemporal graph structure, introducing three types of edges, and using graph convolutional neural networks and graph attention networks for multi-view feature encoding and graph structure modeling, combined with structure-aware gating mechanism and adaptive weight fusion mechanism, end-to-end feature fusion and diagnosis are achieved.

Benefits of technology

It improves the ability to model the spatial topological relationship between leads, enhances the discriminability and robustness of multi-view fusion expression, realizes the unified collaborative modeling of local waveforms and global spatial structures, has good adaptability to multi-source heterogeneous data, and is suitable for ECG signal diagnosis under different sampling rates, signal-to-noise ratios and acquisition conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632548A_ABST
    Figure CN120632548A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-view dynamic fusion electrocardiogram diagnosis method and system based on graph embedding, and belongs to the technical field of medical signal processing. The method comprises the following steps: S1, acquiring standard 12-lead electrocardiogram data acquired under different instruments and equipment, and preprocessing the acquired data; s2, constructing a multi-view feature coding and graph structure modeling module; s3, constructing a multi-view fusion module for graph embedding; and S4, constructing a classification prediction output module, and establishing an optimization mechanism. According to the method, the image structure and the multi-view features are fused, the problems of lead modeling stiffness, fusion strategy static state and structure optimization decoupling in an existing method are solved, the disease recognition capability is remarkably improved, the multi-source heterogeneous data verification performance is excellent, and good clinical and engineering adaptability is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of medical signal processing, and in particular relates to a multi-view dynamic fusion electrocardiogram diagnosis method and system based on graph embedding. Background Art

[0002] Cardiovascular diseases (CVD) are showing a significant trend of increasing prevalence and younger patients. Sensitive, stable, and universal diagnostic tools are urgently needed for early detection, tiered management, and prognostic assessment of cardiovascular events.

[0003] As a non-invasive, low-cost, and dynamic method for monitoring vital signs, the electrocardiogram (ECG) has long been widely used in the clinical screening and follow-up of conditions such as arrhythmias, myocardial ischemia, and myocardial infarction. The standard 12-lead ECG records the projection of cardiac electrical activity in different spatial directions using multiple leads. Its high-dimensional characteristics in the time, frequency, and spatial domains make it one of the most complex physiological data types in the current ECG diagnostic field, with the strongest signal coupling.

[0004] Although ECG intelligent analysis methods have made significant progress in recent years, there are still many deficiencies in key links such as multi-lead structure modeling, multi-view information fusion, and graph neural network integration, which are mainly reflected in the following aspects:

[0005] (1) Ignoring the spatial structural relationship between leads makes it difficult to accurately model topological dependencies;

[0006] A standard 12-lead electrocardiogram (ECG) is a projection of cardiac electrical activity along different spatial dimensions. There are significant spatial structural connections and physiological semantic coupling between leads. Current mainstream deep learning methods (such as ResNet and InceptionTime) mostly treat leads as independent input channels, fusing them only through simple concatenation or averaging after feature extraction. These methods lack the ability to model the topological structure between leads.

[0007] For example, chest leads V1–V6 have obvious regularity in reflecting the spatial continuity characteristics of myocardial ischemia. If their proximity and coordination in spatial projection are not explicitly modeled, it is very easy for the model to fail to effectively capture the electrophysiological propagation pattern of the lesion area, resulting in feature loss and misjudgment.

[0008] Although some studies have attempted to introduce graph neural networks (such as GCN and GAT) to model the relationship between leads, most of them use static, predefined adjacency graph structures and are unable to dynamically adjust the semantic edge weights between leads according to sample characteristics, showing problems such as rigid modeling and weak generalization ability.

[0009] (2) The multi-view information fusion strategy is static and rigid, lacking structural perception and dynamic adaptability;

[0010] ECG data naturally has multi-view properties: different leads provide observations of cardiac electrical activity in different directions, and different frequency components or rhythm features can constitute a multi-scale, multi-modal expression of the signal.

[0011] However, existing multi-view learning methods often use fixed structures (such as parallel branching + concatenation or average pooling) to achieve feature fusion, lacking mechanisms to adaptively adjust fusion weights for different tasks or sample characteristics. This lack of differentiation and structure-aware fusion strategies can easily lead to insufficient or redundant fusion in scenarios with irregular rhythms, poor signal quality, or highly heterogeneous diseases, resulting in reduced model expressiveness.

[0012] Especially in cases where there is redundant information or inconsistent discriminability in multiple views (such as atrial fibrillation mainly depends on the RR interval, STEMI depends on the ST segment morphology), static fusion strategies often mask key view features, affecting the final diagnostic accuracy and robustness.

[0013] (3) The graph modeling and multi-view extraction processes are decoupled, making it difficult to achieve full-process structure-driven optimization;

[0014] Current approaches to integrating graph neural networks into ECG analysis often employ a cascaded structure of "feature extraction first, graph modeling later." This involves first extracting lead temporal features through a CNN or multi-branch network, and then feeding these features into a GNN for graph modeling. This decoupling approach has two limitations:

[0015] On the one hand, the graph modeling module cannot participate in the original feature extraction process and fails to incorporate structural constraints throughout the encoding phase, resulting in the inability of structural information to be included in the feature extraction process early on.

[0016] On the other hand, there is a lack of a unified modeling path for interactions between views, graph structure learning and feature fusion strategies are independent of each other, the training process is fragmented, and the overall performance and stability are limited.

[0017] (4) The model lacks structural plasticity and diversity adaptability;

[0018] In practical applications, ECG data often faces interference from varying sampling rates (e.g., 128Hz, 256Hz), lead combinations (e.g., 5-lead, 12-lead), and signal-to-noise levels. Existing models are often based on fixed architectures, lacking structural flexibility. This makes it difficult to adjust graph structures and fusion weights based on specific data characteristics, limiting their widespread application in non-standard scenarios such as wearable devices and telemedicine. Summary of the Invention

[0019] In order to solve the above technical problems, the present invention proposes a multi-view dynamic fusion electrocardiogram diagnosis method and system based on graph embedding.

[0020] The multi-view dynamic fusion electrocardiogram diagnosis method based on graph embedding of the present invention comprises the following steps:

[0021] S1. Collect standard 12-lead electrocardiogram data obtained by different instruments and equipment, and preprocess the collected data;

[0022] S1.1. Resample data of different sampling rates to 256 Hz.

[0023] S1.2, normalize the signal amplitude to the interval [-1,1];

[0024] S1.3. Use Symlet-8 wavelet basis to perform six-level decomposition and perform soft threshold denoising in the wavelet domain to reduce EMG noise and baseline drift interference:

[0025] Perform wavelet transform on each lead signal x(t):

[0026]

[0027] Among them, a6 is the sixth layer approximation coefficient, d i is the detail coefficient of the i-th layer;

[0028] Soft threshold function definition:

[0029]

[0030] Where θ is the empirical threshold, which is the median absolute deviation (MAD) multiplied by the factor estimate;

[0031] Reconstruct the signal:

[0032]

[0033] S1.4. Use a sliding window mechanism to slice individual patient data into fixed-length 10-second slices and assign them to the training set or test set.

[0034] S1.5. Divide the 12 leads into 6 sub-views. After construction, each sample is represented as 6 view tensors:

[0035]

[0036] Among them, C i is the number of leads for each view;

[0037] S1.6. Graph convolution input data construction:

[0038] S1.6.1. Node generation:

[0039] Each sample contains 12 lead signals, each of which is 2560 points long, corresponding to 10 seconds. To ensure that each node contains complete rhythm information, a fixed-length sliding window is used, with a window length of 0.8 seconds = 205 points and a sliding step of 0.3 seconds = 77 points, for slicing. Each sliced ​​signal segment is considered a node in the graph and is marked as:

[0040] υ l,i , where,l∈{1,...,12},i∈{1,...,20}

[0041] That is, each lead generates 20 nodes, for a total of 240 nodes;

[0042] S1.6.2. Graph edge construction:

[0043] During the graph composition process, three types of edges are introduced to build a high-quality spatiotemporal graph structure:

[0044] Temporal adjacent edges within a lead:

[0045]

[0046] Leads and edges in the same view:

[0047] E2={(v l,i ,v l',i )|l,l'∈V k ,l≠l'}

[0048] Try connecting leads across the edges:

[0049] E3={(v l,i ,v l',i )|l∈Connector Leads,l'∈Oth er Views}

[0050] Finally, the graph structure input to the graph convolutional neural network is defined as:

[0051]

[0052] S2, multi-view feature encoding and graph structure modeling module construction;

[0053] S2.1. Constructing a multi-view feature encoding module. Based on the six lead views divided in S1, each view inputs fragments of different lead combinations. A universal neural network encoder is constructed for each view and outputs diagnostic features of uniform dimensions. The six views are encoded in parallel to obtain a six-way feature representation:

[0054]

[0055] Among them, d is the set intermediate feature dimension, which is selected as 128;

[0056] S2.2. Build a graph structure modeling module to enforce feature consistency constraints. The graph structure data G = (V, E) constructed during ECG data collection and processing in S1 includes: Node set, each node is a 0.8 second segment; E: edge set, including intra-lead temporal edges, intra-view synchronous edges, and cross-view connector edges; initial node feature matrix Produced by a convolutional feature extractor; a general graph neural network architecture is then used to capture the structural characteristics of the inter-lead graph;

[0057] S3, build a multi-view fusion module for graph embedding;

[0058] S3.1. Input definition, the six view feature vectors obtained in S1 and S2:

[0059]

[0060] Graph structures share feature vectors:

[0061]

[0062] S3.2. The structural design of the multi-view fusion module for graph embedding includes two key mechanisms: structure-aware gating mechanism and adaptive weight fusion mechanism;

[0063] Structure-aware gating mechanism, introducing graph embedding as a gating regulation signal:

[0064] Gating function definition:

[0065] g i =σ(W gate ·z Share +b),g i ∈(0,1);

[0066] Feature fusion function (i.e. Feature Gating module):

[0067]

[0068] Adaptive weight fusion mechanism, which gives each view feature a learnable fusion weight:

[0069] Weight generation function:

[0070]

[0071] The final fusion expression:

[0072]

[0073] All weight parameters are learned end-to-end through network training and dynamically adjusted according to individual samples;

[0074] S4. Build a classification prediction output module and establish an optimization mechanism;

[0075] S4.1. Construct a classification prediction output module and transform the unified feature vector output by the fusion module into As input, a non-restricted form of neural network classifier is used to achieve the prediction function;

[0076] S4.2. Establish an optimization mechanism, and use the standard cross entropy loss function as the main loss function:

[0077]

[0078] in, is the one-hot encoding of the true category, is the model output;

[0079] Optimizers and schedulers are used to improve training efficiency and accuracy.

[0080] Preferably, in order to ensure the discriminability and complementarity of the multi-view encoding results, the following constraint strategy is introduced in S2.1:

[0081] Projection consistency loss:

[0082]

[0083] Where P(·) represents a shared projection network;

[0084] In the present invention, let the feature vector extracted from the i-th view be f i , then its corresponding importance weight a i Calculated as follows:

[0085] a i =σ(Wf i )

[0086] Where: W is a learnable linear transformation matrix; σ(·) is a Sigmoid function used to output the normalized weight a i ∈(0,1);f i is the input view feature vector.

[0087] Then, the features are weighted based on the weight to obtain weighted features:

[0088]

[0089] Where: · represents element-wise multiplication; It is a weighted feature vector used for subsequent feature fusion and classification prediction.

[0090] Preferably, S2.2 adopts one of the following general graph neural network architectures:

[0091] GCNConv (Graph Convolutional Network):

[0092]

[0093] GATConv (Graph Attention Network):

[0094]

[0095] The final graph embedding representation:

[0096]

[0097] Readout can be a fully connected layer, global pooling or sequence tiling.

[0098] Preferably, the following structure is used in S4.1 to implement the prediction function:

[0099] Linear projection + activation function:

[0100]

[0101] Output layer (Softmax):

[0102]

[0103] Where C represents the number of diagnosis categories, and the Softmax function ensures that the prediction result is a probability distribution.

[0104] Preferably, in S4.1, the diagnostic confidence distribution is obtained by combining a Bayesian classification layer with multiple forward reasonings; specifically as follows:

[0105] Each forward propagation samples the classifier weights and generates multiple probability distributions:

[0106] {y (1) ,y (2) ,…y (T)}, T is the number of sampling times;

[0107] The averaged result is the prediction result, and the entropy value represents the uncertainty:

[0108]

[0109] Preferably, in S4.2, classification accuracy (Accuracy), weighted macro-average F1 score (Macro-F1), multi-category AUC, and diagnostic uncertainty distribution (using a Bayesian classifier) ​​are used to monitor and evaluate training during the training process.

[0110] The multi-view dynamic fusion electrocardiogram diagnostic system based on graph embedding of the present invention comprises:

[0111] The data acquisition and preprocessing module collects standard 12-lead ECG data from different instruments and equipment, and standardizes the collected signals, including downsampling, filtering and denoising, wavelet transform cleaning, and other steps. Based on the relationship between time series slices and lead space, it constructs node features and graph structures that meet the input requirements of graph neural networks.

[0112] The multi-view feature encoding module divides the 12-lead signal into six sub-views based on its spatial distribution characteristics, and inputs each sub-view into an independent convolutional neural network (CNN) sub-module for feature extraction. After extraction, each view outputs a 128-dimensional feature vector to capture the local spatiotemporal variation characteristics.

[0113] The graph structure modeling module uses a graph convolutional network (GCN) or a graph attention network (GAT) to model the constructed spatiotemporal graph at the node granularity, aggregate local node features, and learn the potential spatial topological dependencies between leads; then, through global pooling or node feature serialization, it generates a unified graph-level embedding representation, providing global structural guidance information for subsequent multi-view fusion.

[0114] During the fusion phase, the multi-view fusion module combines the global structural information output by the graph modeling module to guide the dynamic weighting and gating selection of multi-view features, achieving adaptive feature fusion based on the relationship between sample characteristics and graph structure, and improving the discriminability and robustness of the fused features.

[0115] The classification prediction output module, after fusion features are mapped through the fully connected layer, outputs the category probability distribution through the Softmax function, supporting intelligent diagnosis of various abnormal heart rhythm conditions including atrial fibrillation, ventricular premature beats, myocardial infarction, etc.

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

[0117] (1) Improve the ability to model the spatial topological relationship between leads:

[0118] The present invention inputs a node-based graph structure into a graph neural network (GNN), and through an end-to-end training method, obtains a shared feature embedding representation that can effectively capture the collaborative pattern of cardiac electrical activity in spatial distribution. Compared with the traditional method of only performing local lead or fixed structure modeling, the present invention can more accurately identify heart diseases with significant spatial distribution characteristics, such as anterior wall myocardial infarction, high lateral wall abnormalities, etc. On the PTB-XL dataset, compared with traditional graph neural network models (such as ST-ReGCN), the method of the present invention improved the AUC indicator by 4.6%, verifying its advantage in the task of identifying complex spatial structural abnormalities.

[0119] (2) Introducing structure-aware gating and dynamic weighting mechanisms to optimize multi-view fusion expression:

[0120] In the multi-view feature fusion stage, the present invention designs a dynamic gating mechanism based on graph embedding guidance, which can assign adaptive weights to different view features according to the graph structure information, and supports flexible adjustment of the diagnostic path according to the specific sample characteristics. This mechanism effectively improves the model's ability to distinguish abnormal types with similar rhythms but different pathological mechanisms (such as atrial fibrillation and atrial flutter). Ablation experiments show that compared with traditional static fusion strategies (such as average fusion and multi-head attention mechanism), the present invention improves the AUC by 0.33%–1.28% and the F1-score by 0.5–1.2 percentage points on the Chapman dataset, especially in complex scenarios with large rhythm fluctuations and heterogeneous view features.

[0121] (3) Achieve unified collaborative modeling of local waveforms and global spatial structures:

[0122] This paper, through an end-to-end graph-multi-view collaborative modeling framework, deeply integrates local waveform detail modeling with global spatial topology modeling in a unified pathway, improving the consistency and discriminability of overall feature representation. In evaluations on the PTB-XL and Chapman datasets, the full-structure model achieved an AUC of 0.9300 and 0.9956, respectively, representing improvements of over 1 percentage point compared to a simplified version without the graph modeling module, validating the advantages of the collaborative modeling strategy in terms of accuracy and model stability.

[0123] (4) Have good adaptability to multi-source heterogeneous data and engineering application potential:

[0124] The method of the present invention has achieved excellent or leading diagnostic performance on a variety of public ECG datasets (including PTB-XL, CPSC2018, and Chapman) and datasets collected by actual wearable devices, showing good adaptability to ECG signals under different sampling rates, signal-to-noise ratios, and acquisition conditions, and has high clinical application value and engineering deployment potential. BRIEF DESCRIPTION OF THE DRAWINGS

[0125] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments.

[0126] Figure 1 It is the overall framework diagram of the electrocardiogram diagnosis method of the present invention.

[0127] Figure 2 This is a schematic diagram of constructing graph convolution input data of the present invention.

[0128] Figure 3 It is a schematic diagram of the multi-view feature encoding module.

[0129] Figure 4 It is a diagram of the steps for obtaining shared features under the graph architecture.

[0130] Figure 5 It is a schematic diagram of the classification prediction output and optimization mechanism process. DETAILED DESCRIPTION

[0131] The following is a further description of the specific embodiments of the present invention. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.

[0132] Example 1

[0133] A multi-view dynamic fusion electrocardiogram diagnosis method based on graph embedding, see Figure 1 As shown, the following steps are included:

[0134] S1. Collect standard 12-lead ECG data obtained by different instruments and equipment, with a sampling frequency of 200-1000 Hz. The signal duration obtained from a single patient is inconsistent, usually 5 seconds to 24 hours, and pre-process the collected data;

[0135] S1.1. Resample data of different sampling rates to 256 Hz.

[0136] S1.2, normalize the signal amplitude to the interval [-1,1];

[0137] S1.3. Use Symlet-8 wavelet basis to perform six-level decomposition and perform soft threshold denoising in the wavelet domain to reduce EMG noise and baseline drift interference:

[0138] Perform wavelet transform on each lead signal x(t):

[0139]

[0140] Among them, a6 is the sixth layer approximation coefficient, d i is the detail coefficient of the i-th layer;

[0141] Soft threshold function definition:

[0142]

[0143] Where θ is the empirical threshold, which is the median absolute deviation (MAD) multiplied by the factor estimate;

[0144] Reconstruct the signal:

[0145]

[0146] S1.4. Use a sliding window mechanism to slice individual patient data into fixed-length 10-second segments (i.e., 2560 sampling points) and assign them to the training set or test set.

[0147] S1.5. To model ECG features from multiple perspectives, based on clinical experience and spatial physiological distribution, the 12 leads are divided into 6 sub-views according to Table 1. After construction, each sample is represented as 6 view tensors:

[0148]

[0149] Among them, C i The number of leads for each view.

[0150] Table 1 Relationship between different cardiac regions and ECG leads, divided into different views

[0151]

[0152] S1.6. Graph convolution input data construction:

[0153] S1.6.1. Node generation:

[0154] Each sample contains 12 lead signals, each of which is 2560 points long, corresponding to 10 seconds. To ensure that each node contains complete rhythm information, a fixed-length sliding window is used, with a window length of 0.8 seconds = 205 points and a sliding step of 0.3 seconds = 77 points, for slicing. Each sliced ​​signal segment is considered a node in the graph and is marked as:

[0155] υ l,i , where,l∈{1,...,12},i∈{1,...,20}

[0156] That is, each lead generates 20 nodes, for a total of 240 nodes;

[0157] S1.6.2. Graph edge construction:

[0158] During the graph composition process, three types of edges are introduced to build a high-quality spatiotemporal graph structure:

[0159] Intra-lead temporal adjacency edges, i.e., edges between adjacent nodes on the same lead (time segment context):

[0160]

[0161] The same view has the same edge, that is, different leads in the same view are connected in the same time period to enhance the local synchronization between leads:

[0162] E2={(v l,i ,v l',i )|l,l'∈V k ,l≠l'}

[0163] Cross-view connection attempts are made, and representative leads are selected as view connection nodes (e.g., aVR, I, V5, V3, V1, II) so that they connect to cross-view nodes at the same time slice:

[0164] E3={(v l,i ,v l',i )|l∈Connector Leads,l'∈Other Views}

[0165] Finally, the graph structure input to the graph convolutional neural network is defined as:

[0166]

[0167] Figure 2 The whole process from original ECG signal slicing to node generation and graph structure edge construction in the present invention is demonstrated.

[0168] S2, multi-view feature encoding and graph structure modeling module construction;

[0169] S2.1. Constructing a multi-view feature encoding module. Based on the six lead views divided in S1, each view inputs fragments of different lead combinations. A universal neural network encoder is constructed for each view and outputs diagnostic features of uniform dimensions. The six views are encoded in parallel to obtain a six-way feature representation:

[0170]

[0171] Among them, d is the set intermediate feature dimension, which is selected as 128;

[0172] Feature consistency constraints

[0173] To ensure the discriminability and complementarity of multi-view coding results, the following constraint strategies can be introduced:

[0174] Projection consistency loss (optional):

[0175]

[0176] Here, P(·) represents a shared projection network (e.g., the present invention uses a 1-layer MLP).

[0177] View Importance Attention Mechanism:

[0178] a i =σ(Wf i ),

[0179] The above mechanism is only an optional implementation strategy and does not limit the method of the present invention to rely on a specific model structure. Figure 3 shown.

[0180] S2.2, graph structure modeling module is constructed to perform feature consistency constraints, which comes from the graph structure data G = (V, E) constructed in ECG data collection and processing in S1, including Node set, each node is a 0.8 second segment; E: edge set, including intra-lead temporal edges, intra-view synchronous edges, and cross-view connector edges; initial node feature matrix Generated by a convolutional feature extractor; then a general graph neural network architecture is used to capture the structural characteristics of the inter-lead graph: GCNConv (graph convolutional network):

[0181]

[0182] GATConv (Graph Attention Network):

[0183]

[0184] The final graph embedding representation:

[0185]

[0186] Readout can be a fully connected layer, global pooling or sequence tiling.

[0187] Other graph architectures can also be used, such as GraphSAGE, which is mainly used to share graph features. Share Get;

[0188] Module relationship and integration logic:

[0189] The multi-view module and the graph structure module run in parallel;

[0190] After all feature outputs are mapped to a consistent dimension, they enter the next stage of the fusion module;

[0191] The GNN module provides an information bridge across views and leads to guide fusion, such as Figure 4 shown.

[0192] S3, build a multi-view fusion module for graph embedding;

[0193] S3.1. Input definition, the six view feature vectors obtained in S1 and S2:

[0194]

[0195] Graph structures share feature vectors:

[0196]

[0197] S3.2. The structural design of the multi-view fusion module for graph embedding includes two key mechanisms: structure-aware gating mechanism and adaptive weight fusion mechanism;

[0198] Structure-aware gating mechanism, introducing graph embedding as a gating regulation signal:

[0199] Gating function definition:

[0200] g i =σ(W gate ·z Share +b),g i ∈(0,1);

[0201] Feature fusion function (i.e. Feature Gating module):

[0202]

[0203] This approach essentially injects shared structural information into each view while retaining its own characteristics, improving the perception of cross-lead physiological signals.

[0204] Adaptive weight fusion mechanism, which gives each view feature a learnable fusion weight:

[0205] Weight generation function:

[0206]

[0207] The final fusion expression:

[0208]

[0209] All weight parameters are learned end-to-end through network training and dynamically adjusted according to individual samples;

[0210] S4. Build a classification prediction output module and establish an optimization mechanism (the ultimate goal is to perform multi-category diagnosis and prediction on the input standard 12-lead ECG signal, and identify typical ECG abnormality patterns including sinus rhythm, atrial fibrillation, supraventricular tachycardia, ventricular premature beats, ST segment changes, etc.);

[0211] S4.1. Build a classification prediction output module:

[0212] 1) Input definition

[0213] The input of this module is the unified feature vector output by the fusion module It combines the six-view encoding features with graph structure guidance information, and has strong distinguishability and global structural consistency.

[0214] 2) Classification layer design

[0215] The present invention uses a non-limiting form of neural network classifier to achieve the prediction function. The common structure is as follows:

[0216] Linear projection + activation function:

[0217]

[0218] Output layer (Softmax):

[0219]

[0220] Where C represents the number of diagnostic categories. The present invention supports custom cardiovascular disease category settings of 5 to 20 categories. The Softmax function ensures that the prediction results are probability distributions, supporting subsequent confidence assessment and threshold control.

[0221] 3) Bayesian classification layer

[0222] When conducting real-time reasoning for clinical auxiliary diagnosis and treatment, uncertainty information can be output, the classifier can be replaced by a Bayesian linear layer, and multiple forward reasonings can be combined to obtain the diagnosis confidence distribution. The details are as follows:

[0223] Each forward propagation samples the classifier weights and generates multiple probability distributions:

[0224] {y (1) ,y (2) ,…y (T)}, T is the number of sampling times, the present invention chooses 50

[0225] The averaged result is the prediction result, and the entropy value represents the uncertainty:

[0226]

[0227] This mechanism is suitable for clinical application scenarios such as diagnostic risk control and assisting doctors in decision-making;

[0228] S4.2. Establish an optimization mechanism:

[0229] 1) Loss Function

[0230] The standard cross entropy loss function is used as the main loss:

[0231]

[0232] in, is the one-hot encoding of the true category, is the model output.

[0233] 2) Optimizer and Scheduler

[0234] Optimizer: AdamW, with L2 regularization and dynamic gradient adjustment capabilities;

[0235] Learning rate scheduler: cosine annealing, which improves stability and final accuracy;

[0236] Mixed Precision Training: Automatic Mixed Precision (AMP) technology is used to improve training efficiency;

[0237] Gradient clipping: Clip the maximum gradient norm to prevent explosion (such as limiting it to less than 1.0):

[0238]

[0239] 3) Model evaluation indicators

[0240] The following indicators are used for monitoring and evaluation during the training process:

[0241] Classification accuracy (Accuracy);

[0242] Weighted macro-average F1 score (Macro-F1);

[0243] Multi-class AUC;

[0244] Diagnostic uncertainty distribution (using Bayesian classifiers).

[0245] a) Output and post-processing mechanism

[0246] The final model supports the following output formats to meet clinical needs:

[0247] Single-category diagnostic labels;

[0248] Multi-category probability ranking;

[0249] When the sample is evaluated, the output is: diagnostic uncertainty value (used to alert high-risk samples).

[0250] Classification prediction output and optimization mechanism process Figure 5 shown.

[0251] Example 2

[0252] The following is a detailed description of the general best implementation process to ensure that ordinary technicians in the relevant field have complete reproduction conditions.

[0253] (1) Experimental platform and hardware and software environment

[0254] Hardware equipment:

[0255] GPU: NVIDIA RTX 3090 or above, video memory ≥ 24GB;

[0256] CPU: Intel i9-series or equivalent;

[0257] RAM: ≥64GB;

[0258] Software environment:

[0259] Operating system: Ubuntu 20.04 / Windows 11;

[0260] Python ≥ 3.8;

[0261] PyTorch≥1.11, Torch Geometric≥2.1;

[0262] Auxiliary libraries such as NumPy, SciPy, Matplotlib, Scikit-learn, UMAP, and Seaborn.

[0263] (2) Data sources and organizational forms

[0264] Four real or public ECG datasets shown in Table 2 below were used for joint validation:

[0265] Table 2 Four real or public ECG datasets

[0266]

[0267]

[0268] All data were converted to a unified format: 12 leads × fixed sampling length (10 seconds). When necessary, resampling or truncation was performed to align the data to 256 Hz × 10 seconds = 2560 points. Data from the same patient appeared only in the training set or the test set to prevent data contamination.

[0269] (3) Signal preprocessing and view construction methods

[0270] a) Wavelet denoising:

[0271] Each lead was decomposed into 6 levels using the Symlet-8 wavelet function;

[0272] The soft threshold method was used to suppress electromyographic artifacts and low-frequency baseline drift;

[0273] After reconstructing the signal, the principal components are retained for subsequent feature extraction.

[0274] b) Multi-view partitioning strategy:

[0275] According to the spatial anatomical distribution of ECG leads, the 12 leads are divided into 6 functionally complementary views, as shown in Table 1.

[0276] c) Graph structure construction:

[0277] Each signal is divided into 20 0.8-second windows (overlap is allowed), 12 leads × 20 = 240 nodes, and a graph structure is constructed to input the graph neural network. The node construction strategy is as follows:

[0278] Sequential connection of windows within a lead (timing dependency);

[0279] Leads in the same view are connected with the same time window (spatial dependency);

[0280] Cross-view connectors such as aVR, V1, V3, V5, and II serve as cross-view bridge nodes.

[0281] (4) Model construction and configuration

[0282] a) Multi-view feature encoding module:

[0283] Each view uses a separate 1D-MobileNetV3 encoder (6-way);

[0284] The output dimension of each encoder is a 128-dimensional feature vector;

[0285] The network consists of: 1D convolution → BN → activation (h-swish) → deep separable convolution → SE channel attention → full connection.

[0286] b) Graph Neural Network Module:

[0287] Input 240 nodes, each node is 128-dimensional (after encoding);

[0288] Graph modeling uses a two-layer GCNConv (Graph Convolutional Network);

[0289] √ First layer: 128 → 64;

[0290] √ Second layer: 64 → 32;

[0291] The fully connected layer after Flatten outputs 128-dimensional shared graph features.

[0292] c) Dynamic structure fusion module:

[0293] Each view feature z i and shared graph feature z shared joint;

[0294] Gating mechanism:

[0295]

[0296] Weighted fusion:

[0297]

[0298] d) Output and training module:

[0299] The classifier is a fully connected layer (FC) + Softmax, and the output is 5-category / 12-category / multi-label probability;

[0300] Loss function: cross entropy;

[0301] Optimizer: AdamW, initial learning rate 1e-3;

[0302] Regularization strategy: Dropout = 0.65, gradient clipping (upper limit 1.0), mixed precision training.

[0303] (5) Experimental process and comparative verification

[0304] a) Model training:

[0305] All data are divided into training and test sets in a ratio of 8:2;

[0306] Train for 150 rounds and use the Early-Stopping strategy to avoid overfitting;

[0307] All training processes record indicators such as accuracy, F1, AUC, and uncertainty estimates.

[0308] b) Comparison and visualization of experimental methods

[0309] The experimental results are compared with those of existing mainstream methods, as shown in Table 3 below. The experimental results show that the method proposed in this paper can achieve the best performance on multiple datasets.

[0310] Table 3 Comparison of experimental results

[0311]

[0312] Ablation experiments were also conducted for comparison. First, the deep learning model that performs feature extraction for each view in the multi-view model was replaced and compared, as shown in Table 4 below. The results show that excellent performance can be achieved using multiple models.

[0313] Table 4 Comparison of deep learning models for feature extraction from various views

[0314]

[0315]

[0316] In addition, to verify the effectiveness of the graph embedding multi-view method of the present invention, it is compared with the traditional feature fusion method. The experimental results are shown in Table 5 below. The experimental results demonstrate the effectiveness of the method of the present invention.

[0317] Table 5 Comparison of results between image embedding multi-view method and traditional feature fusion method

[0318]

[0319] This example demonstrates the complete process of the present invention from data preprocessing → multi-view construction → graph modeling → fusion mechanism → classification output → optimization training, and achieves excellent performance in 4 multi-source ECG datasets, demonstrating the effectiveness, adaptability and engineering capabilities of the present invention.

[0320] All model architectures involved in this technical solution can be directly implemented using the PyTorch framework. Graph modeling relies on Torch Geometric to complete graph composition, adjacency matrix construction, and message propagation. The original data source is clear, the model parameters are clear, and the experimental conditions are complete, ensuring the replicability and verifiability of the method of the present invention.

Claims

1. A multi-view dynamic fusion electrocardiogram diagnosis method based on graph embedding, characterized in that: The following steps are involved: S1. Collect standard 12-lead electrocardiogram data obtained by different instruments and equipment, and preprocess the collected data; S1.

1. Resample data of different sampling rates to 256 Hz. S1.2, normalize the signal amplitude to the interval [-1,1]; S1.

3. Use Symlet-8 wavelet basis to perform six-level decomposition and perform soft threshold denoising in the wavelet domain to reduce EMG noise and baseline drift interference: Perform wavelet transform on each lead signal x(t): Among them, a6 is the sixth layer approximation coefficient, d i is the detail coefficient of the i-th layer; Soft threshold function definition: Where θ is the empirical threshold, which is the median absolute deviation (MAD) multiplied by the factor estimate; Reconstruct the signal: S1.

4. Use a sliding window mechanism to slice individual patient data into fixed-length 10-second slices and assign them to the training set or test set. S1.

5. Divide the 12-lead image into 6 sub-views. After construction, each sample is represented as 6 view tensors: Among them, C i is the number of leads for each view; S1.

6. Graph convolution input data construction: S1.6.

1. Node generation: Each sample contains 12 lead signals, each of which is 2560 points long, corresponding to 10 seconds. To ensure that each node contains complete rhythm information, a fixed-length sliding window is used, with a window length of 0.8 seconds = 205 points and a sliding step of 0.3 seconds = 77 points, for slicing. Each sliced ​​signal segment is considered a node in the graph and is marked as: υ l,i , where,l∈{1,...,12},i∈{1,...,20} That is, each lead generates 20 nodes, for a total of 240 nodes; S1.6.

2. Graph edge construction: During the graph composition process, three types of edges are introduced to build a high-quality spatiotemporal graph structure: Temporal adjacent edges within a lead: Leads and edges in the same view: E2={(v l,i ,v l',i )|l,l'∈V k ,l≠l'} Try connecting leads across the edges: E3={(v l,i ,v l',i )|l∈Connector Leads,l'∈Oth er Views} Finally, the graph structure input to the graph convolutional neural network is defined as: S2, multi-view feature encoding and graph structure modeling module construction; S2.

1. Constructing a multi-view feature encoding module. Based on the six lead views divided in S1, each view inputs fragments of different lead combinations. A universal neural network encoder is constructed for each view and outputs diagnostic features of uniform dimensions. The six views are encoded in parallel to obtain a six-way feature representation: Among them, d is the set intermediate feature dimension, which is selected as 128; S2.

2. Build a graph structure modeling module to enforce feature consistency constraints. The graph structure data G = (V, E) constructed during ECG data collection and processing in S1 includes: Node set, each node is a 0.8 second segment; E: edge set, including intra-lead temporal edges, intra-view synchronous edges, and cross-view connector edges; initial node feature matrix H Produced by a convolutional feature extractor; a general graph neural network architecture is then used to capture the structural characteristics of the inter-lead graph; S3, build a multi-view fusion module for graph embedding; S3.

1. Input definition, the six view feature vectors obtained in S1 and S2: Graph structures share feature vectors: S3.

2. The structural design of the multi-view fusion module for graph embedding includes two key mechanisms: structure-aware gating mechanism and adaptive weight fusion mechanism; Structure-aware gating mechanism, introducing graph embedding as a gating regulation signal: Gating function definition: g i =σ(W gate ·With Share +b),g i ∈(0,1); Feature fusion function (i.e. Feature Gating module): Adaptive weight fusion mechanism, which gives each view feature a learnable fusion weight: Weight generation function: The final fusion expression: All weight parameters are learned end-to-end through network training and dynamically adjusted according to individual samples; S4. Build a classification prediction output module and establish an optimization mechanism; S4.

1. Construct a classification prediction output module and transform the unified feature vector output by the fusion module into As input, a non-restricted form of neural network classifier is used to achieve the prediction function; S4.

2. Establish an optimization mechanism, and use the standard cross entropy loss function as the main loss function: in, is the one-hot encoding of the true category, is the model output; Optimizers and schedulers are used to improve training efficiency and accuracy.

2. The multi-view dynamic fusion electrocardiogram diagnosis method based on graph embedding according to claim 1 is characterized in that: In order to ensure the discriminability and complementarity of multi-view coding results, the following constraint strategy is introduced in S2.1: Projection consistency loss: Where P(·) represents a shared projection network; Let the feature vector extracted from the i-th view be f i , then its corresponding importance weight a i Calculated as follows: a i =σ(Wf i ) Where: W is a learnable linear transformation matrix; σ(·) is a Sigmoid function used to output the normalized weight a i ∈(0,1);f i is the input view feature vector; Then, the features are weighted based on the weight to obtain weighted features: Where: · represents element-wise multiplication; It is a weighted feature vector used for subsequent feature fusion and classification prediction.

3. The multi-view dynamic fusion electrocardiogram diagnosis method based on graph embedding according to claim 2 is characterized in that: S2.2 adopts one of the following general graph neural network architectures: GCNConv (Graph Convolutional Network): GATConv (Graph Attention Network): The final graph embedding representation: Readout can be a fully connected layer, global pooling or sequence tiling.

4. The multi-view dynamic fusion electrocardiogram diagnosis method based on graph embedding according to claim 1 is characterized in that: The following structure is used in S4.1 to implement the prediction function: Linear projection + activation function: Output layer (Softmax): Where C represents the number of diagnosis categories, and the Softmax function ensures that the prediction result is a probability distribution.

5. The multi-view dynamic fusion electrocardiogram diagnosis method based on graph embedding according to claim 4 is characterized in that: In S4.1, the diagnosis confidence distribution is obtained by combining the Bayesian classification layer with multiple forward reasonings; specifically, as follows: Each forward propagation samples the classifier weights and generates multiple probability distributions: {y (1) ,y (2) ,…y (T) }, T is the number of sampling times; The averaged result is the prediction result, and the entropy value represents the uncertainty:

6. The multi-view dynamic fusion electrocardiogram diagnosis method based on graph embedding according to claim 5 is characterized in that: In S4.2, classification accuracy, weighted macro-average F1 score, multi-category AUC, and diagnostic uncertainty distribution are used to monitor and evaluate training during the training process.

7. A multi-view dynamic fusion electrocardiogram diagnosis system based on graph embedding, characterized in that: include: The data acquisition and preprocessing module is used to collect standard 12-lead ECG data obtained by different instruments and equipment, and perform unified preprocessing on the collected raw data, including signal noise reduction, resampling, slicing and segmentation processing, and constructing the spatiotemporal graph structure data required for the graph neural network based on the spatial lead relationship; The multi-view feature encoding module is used to divide the 12-lead signal into six sub-views based on spatial and anatomical partitioning. Each sub-view is independently input into the corresponding convolutional neural network branch for feature extraction, and each sub-view outputs a fixed-dimensional view-level feature vector that retains the unique temporal frequency and spatial characteristics of each lead subset; The graph structure modeling module is used to construct graph structure data based on the nodes and the edge relationships between nodes. It uses a graph convolutional network or a graph attention network to aggregate node feature information, extract the complex spatiotemporal dependency features between leads, and generate a unified graph-level embedding feature vector through global pooling or sequence expansion. The multi-view fusion module combines the extracted image-level embedding features with the encoded features of each sub-view. Based on a structure-aware gating mechanism or weighting mechanism, it achieves dynamic and adaptive fusion of multi-view features. The fusion result can automatically adjust the contribution weight of each view according to the characteristics of the input sample, thereby optimizing the overall feature expression. The classification prediction output module is used to receive the fused feature vector, map it through the fully connected layer, and output the predicted probability distribution of each category through the Softmax activation function, supporting multi-category ECG diagnosis tasks.

Citation Information

Cited By

  • Atrial fibrillation early warning method and system based on multi-time scale trend energy modeling

    CN121313192A

  • Method and system for atrial fibrillation warning based on multi-time scale trend energy modeling

    CN121313192B

  • Electrocardiosignal anomaly classification method and device

    CN121465604A