Artificial intelligence-based electrocardio abnormal data analysis method and system
By employing a deep learning method based on a causal inference framework and a decoupled representation learning model, the physiological baseline and drug effects in electrocardiogram (ECG) signals are decoupled to generate counterfactual ECG signals. This solves the problem of attributing ECG abnormalities in patients with multiple medications, achieves accurate quantification of the effects of a single drug, and improves the safety and accuracy of clinical medication.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies make it difficult to accurately attribute the independent dynamic effects of a single drug to the electrocardiogram signals of patients on multiple medications, resulting in insufficient precision in clinical medication adjustments. This may lead to unnecessary drug discontinuation or failure to intervene in high-risk drugs in a timely manner.
A deep learning approach based on a causal inference framework and a decoupled representation learning model is employed. By training electrocardiogram (ECG) signals through a variational autoencoder (β-VAE), physiological baseline and drug effects are decoupled to generate counterfactual ECG signals to quantify the effects of a single drug.
It enables precise and dynamic quantitative attribution of the effects of a single drug on multi-factor superimposed electrocardiogram signals, providing a reliable basis for clinical decision-making, supporting personalized medication management, and improving medication safety.
Smart Images

Figure CN120918671B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to biomedical signal processing and artificial intelligence technology, and more specifically, to an artificial intelligence-based method and system for analyzing abnormal electrocardiogram data. Background Technology
[0002] In clinical practice, patients, especially those in intensive care or with multiple chronic diseases, often require simultaneous multiple drug treatments. Many of these drugs have potential cardiotoxicity and may cause abnormal changes in electrocardiogram (ECG) parameters, such as QT interval prolongation. The QT interval refers to the time interval from the onset of the Q wave to the end of the T wave on an ECG, and is a key indicator reflecting the total duration of ventricular depolarization and repolarization. Excessive QT interval prolongation is a key risk factor for torsades de Pointes (TdP), a serious ventricular arrhythmia that can lead to sudden cardiac death.
[0003] When clinicians detect abnormalities in parameters such as the QT interval through electrocardiogram (ECG) monitoring, they face a complex technical challenge: determining which drug(s) caused the change. A patient's real-time ECG signal is the result of the superposition of multiple factors. These factors include not only the patient's own pathophysiological state and electrolyte level fluctuations, but also the independent effects of various medications in use and their potential interactions.
[0004] Current techniques typically rely on known drug risk lists and clinicians' expertise to determine the cause of electrocardiographic abnormalities. However, in real-world clinical scenarios involving dynamic changes and multiple contributing factors, this approach struggles to accurately attribute responsibility. This is particularly true when patients are simultaneously taking multiple medications that carry a risk of QT prolongation, making it extremely difficult to identify and quantify the independent impact of any single drug. This ambiguity in attribution constitutes a technical challenge in pharmacovigilance, limiting the precision of personalized medication adjustments in clinical practice and potentially leading to unnecessary drug discontinuation or failure to intervene promptly with truly high-risk medications.
[0005] Therefore, existing technologies are deficient in separating and quantifying the independent dynamic effects of a single specific drug from complex continuous electrocardiogram signals, and there is an urgent need for an effective method to solve the above-mentioned technical problems. Summary of the Invention
[0006] The technical problem to be solved by this invention is to provide a new method and system for analyzing abnormal electrocardiogram (ECG) data based on artificial intelligence, so as to solve the technical difficulty that existing technologies cannot effectively attribute abnormal ECG parameters in patients taking multiple medications.
[0007] To address the aforementioned technical problems, this invention provides an artificial intelligence-based method for analyzing abnormal electrocardiogram (ECG) data. This method, based on a causal inference framework and a decoupled representation learning model, is used to quantify the independent dynamic effects of specific drugs on ECG parameters from continuous ECG signals that contain a mixture of multiple influencing factors.
[0008] The method includes the following steps:
[0009] Step 1: Obtain training data containing a time series of electrocardiogram (ECG) signals and medication records synchronized with the ECG time series. The medication records contain information on drug type, dosage, and administration time.
[0010] Step 2: Based on the training data, train a deep learning model. This model is configured to decouple the input ECG signal time series into multiple independent latent space feature vectors. A subset of these feature vectors represents the patient's physiological baseline unaffected by medication, while other different feature vectors are associated with the effects of specific medications in use. Furthermore, the latent space feature vectors may also include dimensions representing other clinically relevant physiological states of the patient (such as electrolyte levels) to achieve decoupling from the influence of non-drug factors.
[0011] Preferably, the deep learning model is a variational autoencoder architecture, such as a β-variational autoencoder (β-VAE). The training process of this model aims to optimize a loss function, which includes at least:
[0012] a) Reconstruction loss, used to ensure the model decoder can accurately reconstruct the original ECG signal from the latent space feature vectors; and
[0013] b) Decoupling loss, used to make the feature vectors representing different causes (physiological baseline, drug A effect, drug B effect, etc.) in the latent space independent of each other.
[0014] Preferably, training the deep learning model further includes the following steps:
[0015] Step 2-1: For each drug in use in each training sample, generate a time-varying sequence of drug effect intensity based on its administration time, dosage, and a pre-defined pharmacokinetic (PK) or pharmacodynamic (PD) model.
[0016] Step 2-2: When optimizing the loss function, the decoupling loss is dynamically weighted. Specifically, for a latent space feature vector characterizing the effect of a specific drug, the weight of its decoupling loss term is proportional to the sequence value of the drug's effect intensity at the corresponding time point.
[0017] Preferably, when the medication record involves the simultaneous use of multiple drugs, the latent space is further configured to include one or more interaction feature subspaces, each of which is associated with the interaction effect of a specific set of drug combinations. Accordingly, the training process of the deep learning model further includes: when a specific drug combination appears in the training data, using an additional loss term to prompt the model to encode the portion of the electrocardiogram signal that cannot be explained by the linear summation of individual drug effects into the corresponding interaction feature subspace.
[0018] Step 3: Obtain a patient's real-time electrocardiogram (ECG) signal, and use the encoder of the trained deep learning model to encode the real-time ECG signal to obtain a true latent space feature vector that contains the effects of all medications in use.
[0019] Step 4: For a target drug, intervene in the dimension of the real latent space feature vector that corresponds to the effect of the target drug to generate a counterfactual latent space feature vector.
[0020] This step is crucial for achieving causal inference by intervening in the latent space to simulate the expected state of the patient if the target drug were not used.
[0021] In one specific implementation, the intervention operation involves setting the value of the dimension corresponding to the effect of the target drug in the real latent space feature vector to the baseline value representing the absence of the drug effect. In practice, this can be set to zero. This is because during the training phase, the model has learned that when a certain drug is absent, the activation value of its corresponding latent space dimension should approach zero (or the mean of the prior distribution). After the intervention, a new latent space vector is obtained, called the counterfactual latent space feature vector z_counterfactual. For example, if z_real = [z_1, ..., z_4, z_5, z_6, z_7, z_8, z_9, z_10], where dimensions 5, 6, and 7 correspond to drug A, then the z_counterfactual after the intervention = [z_1, ..., z_4, 0, 0, 0, z_8, z_9, z_10].
[0022] In another preferred embodiment, to generate more clinically meaningful and faithful counterfactual ECG signals, this invention also proposes a more refined and personalized intervention method. In the model training phase of step two, this method utilizes training data from all "medication-free periods" for each patient to construct a personalized baseline manifold (M_baseline,i) (i.e., "patient i's baseline manifold") in the latent space for that patient i. This manifold captures the natural fluctuation range and pattern of the patient's physiological baseline ECG characteristics in the absence of drug interference. Therefore, during intervention, the dimension in the true latent space feature vector corresponding to the effect of the target drug can be replaced with a value obtained by sampling or projecting from the patient's personalized physiological baseline state latent space manifold. In this way, the generated counterfactual state not only eliminates the influence of the target drug but also ensures that this unaffected state is rooted in the patient's own dynamically changing physiological baseline, thereby improving the accuracy of the counterfactual ECG signal.
[0023] Step 5: Input the counterfactual latent space feature vector into the decoder of the deep learning model to generate a counterfactual electrocardiogram signal, which represents the expected electrocardiogram state assuming the patient has not taken the target analysis drug.
[0024] The counterfactual latent space vector z_counterfactual generated in the previous step is input into the decoder part of the trained deep learning model. The decoder performs one forward propagation and outputs an electrocardiogram signal waveform, denoted as hat_x_counterfactual.
[0025] Since information related to the target drug A has been removed from the feature vector input to the decoder, the generated hat_x_counterfactual is what the model predicts the ECG signal should look like if the patient had not taken drug A, under the same physiological baseline and while taking drug B. This is the "counterfactual" ECG signal.
[0026] Step Six: Compare one or more key ECG parameters in the real-time ECG signal with the counterfactual ECG signal. The difference between the two is the quantitative result of the independent dynamic effect of the target analytical drug on the patient's ECG parameters. Preferably, the key ECG parameter is the QT interval.
[0027] Another aspect of the present invention provides an artificial intelligence-based electrocardiogram abnormality data analysis device, the device comprising:
[0028] One or more processors;
[0029] And a memory storing instructions executable by the one or more processors, which, when executed, cause the one or more processors to perform the method described in any of the preceding embodiments.
[0030] Another aspect of the present invention provides an artificial intelligence-based electrocardiogram abnormality data analysis system, comprising:
[0031] The data acquisition module is used to acquire the patient's continuous electrocardiogram signals and medication information;
[0032] The data preprocessing module is used to denoise and extract features from the acquired signals;
[0033] The core analysis module contains a deep learning model trained according to the method described in this invention, which is used to perform decoupled representation and counterfactual analysis of electrocardiogram signals to quantify the independent dynamic effects of specific drugs.
[0034] And a results display module, used to visually present the attribution analysis results to users on the display terminal.
[0035] This invention constructs a model combining causal inference and decoupled representation learning. It can separate signals representing physiological baselines and different drug effects from complex, multi-factor-laden electrocardiogram (ECG) signals at the feature level. By generating counterfactual ECG signals for comparison, it achieves precise, dynamic, and quantitative attribution of the cardiotoxic effects of a single specific drug. This provides clinicians with reliable decision-making support, contributing to safer personalized medication management and demonstrating significant clinical application value. Attached Figure Description
[0036] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0037] Figure 1 This is a flowchart illustrating an artificial intelligence-based method for analyzing abnormal electrocardiogram data, as provided in an embodiment of the present invention.
[0038] Figure 2 This is a schematic diagram of the β-variational autoencoder (β-VAE) model architecture used in the embodiments of the present invention.
[0039] Figure 3 This is a schematic diagram of a preferred functional module of an artificial intelligence-based electrocardiogram abnormality data analysis system provided in an embodiment of the present invention.
[0040] Figure 4This is a schematic diagram of the attribution analysis of the effect of amiodarone on the QT interval in an embodiment of the present invention, showing the comparison between the true electrocardiogram signal and the counterfactual electrocardiogram signal.
[0041] Figure 5 This is a schematic diagram of the comprehensive analysis interface of an artificial intelligence-based electrocardiogram abnormality data analysis system in clinical application, according to one embodiment of the present invention. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0043] Example 1
[0044] This embodiment provides an artificial intelligence-based method for analyzing electrocardiogram (ECG) abnormality data. This method aims to address the technical problem in existing technologies where it is difficult to accurately attribute the causes of ECG abnormalities in patients using multiple medications. (Refer to...) Figure 1 The method flow of this invention includes the following steps:
[0045] Step 1: Obtain training data containing a time series of electrocardiogram (ECG) signals and medication records synchronized with the ECG time series. The medication records contain information on drug type, dosage, and administration time.
[0046] In this step, it is necessary to build a high-quality training dataset, which will form the basis for subsequent model training.
[0047] Preferably, this step specifically includes the following sub-steps:
[0048] Step S101: Collect continuous ECG signals from the patient's hospital information system (HIS), intensive care unit (ICU) monitoring system, or wearable ECG monitoring device. The ECG signals can be single-lead or multi-lead ECG waveform data, and the acquisition frequency is, for example, 500Hz to ensure signal fidelity.
[0049] Step S102: Obtain medication records synchronized with the ECG signal acquisition time period from the electronic medical record (EMR) or prescription system. These records need to be accurate to the specific dosing time, drug name (e.g., amiodarone, sotalol, etc.), and dosage.
[0050] Step S103: Preprocess the acquired raw electrocardiogram (ECG) signals. The preprocessing steps may include:
[0051] a) Noise filtering: Use, for example, bandpass filters (e.g., 0.5Hz-40Hz) to remove baseline drift and high-frequency noise.
[0052] b) R-wave detection and heartbeat segmentation: The peak value of the R-wave in the QRS complex is detected using algorithms such as Pan-Tompkins. Using the R-wave as a reference point, a fixed-length heartbeat segment is extracted, such as 300 sampling points before and after the R-wave, to form a heartbeat time series.
[0053] c) Key parameter extraction: Calculate key ECG parameters for each heartbeat, especially the QT interval. The calculation of the QT interval can be automated and manually verified to ensure accuracy.
[0054] Step S104: Time-align the preprocessed ECG signal time series with the medication records to form a one-to-one corresponding training sample. Each sample contains a segment of ECG signal and information on all medications the patient was using before that time point.
[0055] For example, a training sample could be a 10-second segment of an electrocardiogram (ECG) signal, along with an associated label indicating that the patient was taking medication A (100 mg) and medication B (50 mg) during that time period.
[0056] Step 2: Based on the training data, train a deep learning model. This model is configured to decouple the input ECG signal time series into multiple independent latent space feature vectors. A subset of these feature vectors represents the patient's physiological baseline unaffected by medication, while other different feature vectors are associated with the effects of specific medications in use. Furthermore, the latent space feature vectors may also include dimensions representing other clinically relevant physiological states of the patient (such as electrolyte levels) to achieve decoupling from the influence of non-drug factors.
[0057] This step is the core of the method of the present invention, which achieves decoupling of signal origin through model training.
[0058] Preferably, the deep learning model is a variational autoencoder (β-VAE) architecture. (Refer to...) Figure 2 The model mainly consists of two parts: an encoder and a decoder.
[0059] The encoder receives the preprocessed electrocardiogram (ECG) signal x as input and maps it to a low-dimensional latent space through a series of convolutional and fully connected layers. The dimensions of this latent space are predefined. For example, considering the patient's physiological baseline and two potentially influencing drugs (drug A and drug B), the latent space can be divided into three subspaces, corresponding to Z_baseline, Z_drugA, and Z_drugB, respectively. Furthermore, to accommodate more complex clinical scenarios, the latent space can be further expanded to include characterization subspaces for non-drug factors, such as a subspace Z_electrolytes to characterize changes in electrolyte levels, such as serum potassium concentration.
[0060] To address more complex clinical scenarios, this invention further structures the latent space by introducing an interaction subspace. For example, when considering the interaction between drug A and drug B, the latent space is divided as: Z = [Z_baseline, Z_drugA, Z_drugB, Z_interaction_AB].
[0061] Here, Z_interaction_AB is a subspace specifically used to represent the interaction effect between drugs A and B. The model's training loss function is correspondingly augmented with an interaction regularization term. This term is only computed if the medication records of the input samples indicate that drugs A and B are both online simultaneously. The goal is that the signal x_additive reconstructed by the decoder using [Z_baseline, Z_drugA, Z_drugB, 0] (i.e., the interaction subspace is set to zero) should approximate a linear superposition of single drug effects. The difference between the true reconstructed signal x_real and x_additive should be primarily encoded by Z_interaction_AB.
[0062] During the analysis phase, this allows for richer counterfactual inferences: 1. Quantifying the independent effect of drug A: intervening in Z_drugA and Z_interaction_AB. 2. Quantifying the independent effect of drug B: intervening in Z_drugB and Z_interaction_AB. 3. Quantifying the interaction effect of A and B: intervening only in Z_interaction_AB and comparing the differences in ECG signals before and after the intervention. This enables the system to accurately analyze the additional cardiotoxicity caused by nonlinear interactions between drugs, providing unprecedentedly refined evidence for clinical adjustments to combination therapy regimens.
[0063] The goal of an encoder is to learn a probability distribution q(z|x), typically a Gaussian distribution, where z is a feature vector in the latent space.
[0064] The decoder receives the feature vector z in the latent space as input and attempts to reconstruct the original electrocardiogram signal hat_x through a series of deconvolutional layers and fully connected layers.
[0065] The training process of the model aims to optimize a loss function, which includes at least:
[0066] a) Reconstruction Loss: This loss ensures that the model decoder can accurately reconstruct the original ECG signal from the latent space feature vectors. It typically uses Mean Squared Error (MSE) to calculate the difference between the input signal x and the reconstructed signal hat_x. The goal is to ensure that the latent variable z contains all the information needed to reconstruct the signal.
[0067] b) Disentanglement Loss, used to make the feature vectors representing different causes (physiological baseline, drug A effect, drug B effect, etc.) in the latent space independent of each other. In β-VAE, this is achieved by multiplying the KL divergence term of the traditional VAE by a coefficient greater than 1, β. The KL divergence term measures the distance between the distribution q(z|x) learned by the encoder and the standard normal distribution p(z). By increasing the β weight, the model is motivated to learn a factorized latent space representation, where each latent variable dimension corresponds to an independent change factor in the data generation process. For example, by controlling drug labels in the training data, the model can learn to encode ECG change patterns related to drug A into the Z_drugA subspace, and changes related to drug B into the Z_drugB subspace.
[0068] A key innovation of this invention lies in the fact that the application of the decoupling loss is not uniform, but dynamically weighted. Specifically, for the subspace Z_drugA in the latent space associated with a specific drug (e.g., drug A), its corresponding KL divergence loss term L_KL,drugA is modulated by a time-varying weighting coefficient omega_A(t). The total decoupling loss becomes:
[0069] L_Disentanglement = beta × (sum of all drug i [omega_i(t) × L_KL, drug_i] + L_KL, baseline)
[0070] The weighting coefficient omega_i(t) represents the expected effect intensity of drug i at time point t. This intensity sequence can be generated in various ways:
[0071] a) Based on PK model: Using a standard single-compartment or multi-compartment pharmacokinetic model, the simulated concentration curve C(t) of the drug in the blood is calculated based on the dosing records (dose, time), and omega_i(t) is made proportional to C(t).
[0072] b) Based on a simplified surrogate function: When precise PK parameters are not available, a simplified surrogate function can be used, such as an exponentially decaying function starting from the dosing time point, to simulate the weakening of the drug effect over time.
[0073] In this way, when the model processes an ECG signal segment, if the drug effect intensity omega_i(t) at that time point is high, the model is subjected to a strong negative constraint, forcing it to primarily encode the observed ECG changes into the latent space dimension corresponding to that drug. Conversely, if the drug effect intensity is low, the model has greater freedom to attribute signal changes to baseline or other factors. This PK-PD informed dynamic weighted training mechanism makes the decoupled representation learned by the model more accurate and more consistent with the actual effects of drugs in the human body.
[0074] The goal of training is to minimize the total loss function L = L_reconstruction + βL_KL, and to continuously update the model's weight parameters through backpropagation and gradient descent algorithms (such as the Adam optimizer) until the model converges.
[0075] Step 3: Obtain a patient's real-time electrocardiogram (ECG) signal, and use the encoder of the trained deep learning model to encode the real-time ECG signal to obtain a true latent space feature vector that contains the effects of all medications in use.
[0076] Once the model is trained, it can be used for real-time clinical analysis.
[0077] First, real-time electrocardiogram (ECG) signals from the patients to be analyzed are acquired and preprocessed in the same way as during the training phase.
[0078] Then, the preprocessed real-time ECG signal is input into the encoder part of the pre-trained deep learning model. The encoder performs a forward propagation calculation and outputs a latent space feature vector, denoted as z_real. This z_real contains the ECG features of the patient's current physiological state and the combined effects of all medications in use (e.g., drug A and drug B).
[0079] For example, z_real might be a vector with 10 dimensions, where the first 4 dimensions represent the physiological baseline, the middle 3 dimensions represent the effect of drug A, and the last 3 dimensions represent the effect of drug B.
[0080] Step 4: For a target drug, intervene in the dimension of the real latent space feature vector that corresponds to the effect of the target drug to generate a counterfactual latent space feature vector.
[0081] This step is crucial for achieving causal inference by intervening in the latent space to simulate the scenario of "if this drug had not been used".
[0082] In one specific implementation, the intervention operation involves setting the value of the dimension corresponding to the effect of the target drug in the real latent space feature vector to the baseline value representing the absence of the drug effect. In practice, this can be set to zero. This is because during the training phase, the model has learned that when a certain drug is absent, the activation value of its corresponding latent space dimension should approach zero (or the mean of the prior distribution). After the intervention, a new latent space vector is obtained, called the counterfactual latent space feature vector z_counterfactual. For example, if z_real = [z_1, ..., z_4, z_5, z_6, z_7, z_8, z_9, z_10], where dimensions 5, 6, and 7 correspond to drug A, then the z_counterfactual after the intervention = [z_1, ..., z_4, 0, 0, 0, z_8, z_9, z_10].
[0083] In another preferred embodiment, to generate more clinically meaningful and faithful counterfactual ECG signals, this invention also proposes a more refined and personalized intervention method. In the model training phase of step two, this method utilizes training data from all "medication-free periods" for each patient to construct a personalized baseline manifold in the latent space for that patient i, denoted as (M_baseline,i). This manifold captures the natural fluctuation range and pattern of the patient's physiological baseline ECG characteristics in the absence of drug interference. Therefore, during intervention, the dimension in the true latent space feature vector corresponding to the effect of the target drug can be replaced with a value obtained by upsampling or projecting from the patient's personalized physiological baseline state latent space manifold (M_baseline,i). In this way, the generated counterfactual state not only eliminates the influence of the target drug but also ensures that this "unaffected" state is rooted in the patient's own dynamically changing physiological baseline, thereby improving the accuracy of the counterfactual ECG signal.
[0084] Step 5: Input the counterfactual latent space feature vector into the decoder of the deep learning model to generate a counterfactual electrocardiogram signal, which represents the expected electrocardiogram state assuming the patient has not taken the target analysis drug.
[0085] The counterfactual latent space vector z_counterfactual generated in the previous step is input into the decoder part of the trained deep learning model. The decoder performs one forward propagation and outputs an electrocardiogram signal waveform, denoted as hat_x_counterfactual.
[0086] Since information related to the target drug A has been removed from the feature vector input to the decoder, the generated hat_x_counterfactual is what the model predicts the ECG signal should look like if the patient had not taken drug A, under the same physiological baseline and while taking drug B. This is the counterfactual ECG signal.
[0087] Step Six: Compare one or more key ECG parameters in the real-time ECG signal with the counterfactual ECG signal. The difference between the two is the quantitative result of the independent dynamic effect of the target analytical drug on the patient's ECG parameters.
[0088] This step completes the final quantitative attribution.
[0089] First, key ECG parameters are calculated for the real real-time ECG signal x_real (or its reconstructed version hat_x_real) and the generated counterfactual ECG signal hat_x_counterfactual, respectively.
[0090] Preferably, the key ECG parameter is the QT interval. We calculate the real QT interval (QT_real) and the counterfactual QT interval (QT_counterfactual).
[0091] The difference between the two, Delta_QT = QT_real - QT_counterfactual, is the QT interval prolongation value quantified by this method that is independently caused by the target analytical drug A.
[0092] Reference Figure 4 In a specific amiodarone attribution analysis scenario, the real-time electrocardiogram signal after the patient takes amiodarone ( Figure 4 The upper part shows an abnormally prolonged QTc interval of 510 ms. Using the method of this invention, a counterfactual ECG signal assuming the patient did not take amiodarone can be generated. Figure 4 The lower half of the spectrum corresponds to a QTc interval of 440 ms. Therefore, amiodarone independently caused a 70 ms (510 ms - 440 ms) QTc interval prolongation in this patient. This process visually demonstrates that the present invention can accurately quantify the independent dynamic effects of a single drug on electrocardiographic parameters. (Refer to...) Figure 5 The quantitative results and attribution analysis described in this invention can be integrated into a comprehensive analysis interface, for example... Figure 5 The AI-powered drug effect attribution analysis module shown provides doctors with intuitive and quantitative decision support.
[0093] Example 2
[0094] In another aspect, the present invention provides an artificial intelligence-based electrocardiogram abnormality data analysis device, which is used to perform the method described in any of the above embodiments.
[0095] This system can be a general-purpose computer device or a specialized medical analysis device, and its core components include:
[0096] One or more processors: serving as the computing core of the system, responsible for executing program instructions.
[0097] And a memory for storing program instructions and data. The memory stores instructions executable by the one or more processors, which, when executed, cause the one or more processors to perform the method described in the first embodiment.
[0098] Preferably, refer to Figure 3 The AI-based ECG abnormality data analysis system can be logically divided into the following functional modules:
[0099] Data acquisition module: responsible for interfaceing with external medical devices (such as electrocardiogram monitors and HIS systems) to acquire the patient's continuous electrocardiogram signals and medication information.
[0100] Data preprocessing module: Responsible for denoising, heartbeat segmentation, and feature extraction of the acquired raw signals to prepare for core analysis.
[0101] The core analysis module contains a deep learning model (such as a β-VAE model) trained according to the method described in this invention. This module receives preprocessed data, performs decoupled representation (encoding) of electrocardiogram signals, construction of counterfactual latent space (intervention), and generation of counterfactual signals (decoding), ultimately quantifying the independent dynamic effects of a specific drug.
[0102] Results Display Module: Responsible for visually presenting the quantitative attribution results output by the core analysis module to users (such as clinicians) in a user-friendly manner (such as charts and values) on display terminals (such as computer screens and mobile app interfaces).
[0103] Reference Figure 5This results display module integrates complex analysis results into a professional, comprehensive analysis interface. This interface integrates multiple functional areas, including: a patient information panel, a main monitoring area containing real-time ECG waveforms and QTc parameters, a multi-parameter vital signs panel, an AI-powered drug effect attribution analysis module, and a risk alert bar at the bottom. In a specific application scenario, such as... Figure 5 As shown, the interface displays the patient's ECG waveform and abnormally prolonged QTc parameters (e.g., 510 ms) in real time. Simultaneously, its core "AI Drug Effect Attribution Analysis" module clearly quantifies the contribution of each factor: a bar chart visually shows that the independent effect of amiodarone is +59 ms, while the independent effect of erythromycin is +11 ms. This module further calculates and displays the counterfactual result: if the target drug amiodarone had not been taken, the patient's QTc would be 451 ms, thus returning to a safe range. The alert bar at the bottom automatically triggers high-risk alerts based on these analysis results. This integrated display method provides clinicians with comprehensive, intuitive, and actionable decision-making support.
[0104] To further illustrate the practical application effects of the technical solution of this invention, the following description is provided in conjunction with a specific clinical scenario.
[0105] Case 1: Differentiating the additive effects of amiodarone and erythromycin
[0106] The patient, a 68-year-old male, was admitted to the hospital due to severe community-acquired pneumonia and a history of atrial fibrillation. Upon admission, he received anti-infective treatment (erythromycin) and heart rate control treatment (amiodarone). Several days later, electrocardiographic monitoring showed an abnormally prolonged QTc interval, raising clinical concerns about the risk of torsades de pointes. The challenge at this point was that both amiodarone and erythromycin have the potential risk of QT interval prolongation, making it difficult to determine which drug was the primary cause or whether there was a significant synergistic effect between the two.
[0107] Reference Figure 5 The analysis system of this invention integrates complex analytical results into a professional user interface. The main monitoring area displays the patient's ECG waveform and abnormally prolonged QTc parameters (e.g., 510 ms) in real time. The core "AI Drug Effect Attribution Analysis" module clearly quantifies the contribution of each factor: a bar graph visually shows that the independent effect of amiodarone is +59 ms, while the independent effect of erythromycin is +11 ms. This module further calculates and displays the counterfactual result, namely, that if the target drug amiodarone had not been taken, the patient's QTc would be 451 ms, thus returning to the safe range. The alert bar at the bottom automatically triggers high-risk alerts based on these analytical results.
[0108] The quantitative results clearly demonstrate that although both drugs carry the risk of QTc prolongation, in this patient, amiodarone was the primary cause of the significant QTc prolongation. Based on this precise attribution, the clinician made a precise decision: to continue using both drugs under close monitoring, but with a focus on the potential risks of amiodarone and to consider adjusting its dosage when appropriate. This decision controlled the risk of sudden cardiac death while ensuring continuity of infection treatment, demonstrating that the method of this invention can provide objective and quantitative decision-making basis for clinical medication adjustments in complex drug interaction scenarios.
[0109] This case fully demonstrates the advantages of the technical solution of the present invention: as shown in the reference... Figure 4 The counterfactual ECG signal generation technique shown achieves precise separation of single drug effects; through, as referenced... Figure 5 The multimodal attribution analysis interface shown enables quantitative comparison and visualization of multiple influencing factors. This combination of technologies effectively solves the technical challenge of traditional methods failing to accurately distinguish the independent contributions of each drug in patients using multiple medications.
[0110] Case 2: Differentiating between drug effects and electrolyte imbalance
[0111] The patient, a 72-year-old female, suffers from chronic heart failure and renal insufficiency and has been on long-term diuretic treatment (such as furosemide). She was recently hospitalized for schizophrenia and began treatment with the antipsychotic drug ziprasidone. Ziprasidone is known to have the potential risk of prolonging the QT interval.
[0112] One week after starting ziprasidone, the patient's electrocardiogram (ECG) alarm showed a QTc prolongation of 490 ms. At this point, clinicians faced a differential diagnostic challenge: was the QTc prolongation caused by the new ziprasidone, or was it due to exacerbated hypokalemia (a common electrolyte disturbance that can itself lead to QTc prolongation) resulting from long-term diuretic use? Incorrectly attributing the cause to ziprasidone and discontinuing the medication could worsen the patient's psychiatric symptoms.
[0113] In training, the β-VAE model used in this invention incorporates other clinical variables, such as serum potassium concentration, as independent factors in the latent space, in addition to the drug label. The model's latent space is designed to decouple the effects of physiological baseline, drug effect, and key physiological parameters (such as electrolyte levels) separately.
[0114] a) Data Acquisition and Encoding: The system acquires the patient's electrocardiogram (ECG) signals, medication records, and the latest complete blood count (CBC) results (serum potassium concentration was 3.1 mmol / L, below the normal range). The encoder generates a real latent space vector z_real containing all factors.
[0115] b) Counterfactual Analysis 1 (Simulated Discontinuation of Ziprasidone): Intervention was performed on the dimension in z_real corresponding to ziprasidone to generate a counterfactual ECG signal. The calculated counterfactual QTc was 485ms.
[0116] c) Counterfactual Analysis II (Simulated Correction of Hypokalemia): The dimension in z_real corresponding to serum potassium level was intervened and set as a benchmark representing normal serum potassium level (e.g., 4.0 mmol / L), generating a counterfactual ECG signal. The calculated counterfactual QTc was 455 ms.
[0117] The system analysis results are as follows:
[0118] Real QTc: 490ms
[0119] Independent effect of ziprasidone: 490ms - 485ms = 5ms.
[0120] Independent effect of hypokalemia: 490ms - 455ms = 35ms.
[0121] The system interface of this invention (its design can be referred to) Figure 5 This approach can handle mixed scenarios involving both drug and non-drug factors equally effectively. In such applications, the "AI Drug Effect Attribution Analysis" module can be configured to simultaneously decouple the effects of drug effects from physiological parameters (such as serum potassium levels). This module clearly quantifies the independent effects of ziprasidone (e.g., +5ms) and hypokalemia (e.g., +35ms), allowing clinicians to readily identify the primary causes of the problem. This comprehensive and visual analysis provides clinicians with a complete and intuitive multi-factor attribution result, making complex clinical decision-making processes clear and understandable.
[0122] The analysis results of this invention demonstrate that the patient's current QTc prolongation was primarily caused by hypokalemia, while the effect of the novel drug ziprasidone was minimal. Accordingly, the clinician's treatment plan was adjusted to continue ziprasidone treatment for schizophrenia, while immediately administering intravenous potassium supplementation to correct electrolyte imbalances. After potassium supplementation, the patient's QTc rapidly returned to the safe range of 460 ms. This case fully demonstrates that this invention can identify causes within a broader, multi-factor clinical framework, distinguishing drug side effects from the patient's intrinsic pathophysiological changes, thus achieving a higher level of clinical decision support.
[0123] This case further verifies the performance of the technical solution of the present invention: as shown in the reference... Figure 5The integrated analytical interface shown not only quantifies drug effects but also incorporates physiological factors such as electrolyte imbalances into the analytical framework, achieving precise decoupling of multiple influencing factors in complex clinical scenarios. This technology enables clinicians to avoid inappropriate discontinuation of medication due to misjudgment of side effects, ensuring the continuity and safety of patient treatment.
[0124] Those skilled in the art should note that the above embodiments are merely for clearly illustrating one or more preferred implementations of the present invention and are not intended to limit the scope of the invention. Any person skilled in the art can make modifications and refinements without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention shall be determined by the scope defined in the appended claims.
Claims
1. An artificial intelligence-based electrocardio abnormal data analysis method, characterized in that, The method comprises the following steps: obtaining training data comprising a time series of electrocardiogram signals and medication records synchronized with the time series of electrocardiogram signals; training a deep learning model based on the training data, the model being configured to decouple an input time series of electrocardiogram signals into a plurality of mutually independent latent space feature vectors, wherein a portion of the feature vectors represent the patient's physiological baseline unaffected by medication, and other different feature vectors are respectively associated with the effects of specific drugs in use; obtaining a real-time electrocardiogram signal of a patient, and using the encoder of the trained deep learning model to encode the real-time electrocardiogram signal to obtain a real latent space feature vector comprising the effects of all drugs in use; for a target analysis drug, intervening in the dimensions of the real latent space feature vector corresponding to the effects of the target analysis drug to generate an counterfactual latent space feature vector; inputting the counterfactual latent space feature vector into the decoder of the deep learning model to generate a counterfactual electrocardiogram signal representing the expected electrocardiogram state of the patient assuming that the patient does not take the target analysis drug; comparing one or more key electrocardiogram parameters in the real-time electrocardiogram signal and the counterfactual electrocardiogram signal, and taking the difference between the two as the quantitative result of the independent dynamic effect of the target analysis drug on the patient's electrocardiogram parameters.
2. The method of claim 1, wherein, The deep learning model is a variational autoencoder architecture, which comprises an encoder composed of a series of convolutional layers and fully connected layers, and a decoder composed of a series of deconvolutional layers and fully connected layers.
3. The method of claim 2, wherein, The variational autoencoder architecture is a beta-variational autoencoder, and the training process aims to optimize a loss function, which comprises: a reconstruction loss for calculating the mean square error between the input signal and the reconstructed signal; and a decoupling loss achieved by multiplying a coefficient β greater than 1 in front of the Kullback-Leibler divergence term.
4. The method of claim 1, wherein, Before training the deep learning model, the method further comprises a pre-processing step for the time series of electrocardiogram signals, which comprises: using a band-pass filter of 0.5 Hz to 40 Hz to filter out noise from the electrocardiogram signal; and detecting R-wave peaks using the Pan-Tompkins algorithm and segmenting heartbeats based on the R-wave peaks.
5. The method of claim 1, wherein, The step of obtaining training data comprising a time series of electrocardiogram signals and medication records synchronized with the time series of electrocardiogram signals comprises: collecting continuous electrocardiogram signals of patients from a hospital information system or a critical care unit monitoring system; and obtaining medication records synchronized with the electrocardiogram signal collection period from an electronic medical record or a medical order system.
6. The method of claim 1, wherein, The latent space is pre-divided into a plurality of subspaces corresponding to the patient's physiological baseline, the effects of specific drugs in use, and changes in the patient's electrolyte levels.
7. The method of claim 1, wherein, The intervention is to set the value of the dimension of the real latent space feature vector corresponding to the effects of the target analysis drug to zero.
8. The method of claim 1, wherein, The key electrocardiogram parameter is the corrected QT interval. 9.An electrocardio abnormal data analysis device based on artificial intelligence, characterized in that, comprise: one or more processors; and a memory having instructions stored thereon that are executable by the one or more processors, the instructions, when executed, causing the one or more processors to perform the method of any one of claims 1-8.
10. An artificial intelligence-based electrocardio abnormal data analysis system, characterized in that, The system logically comprises: a data acquisition module interfaced with electrocardiograph and hospital information system for acquiring continuous electrocardiogram signals and synchronous medication information of a patient; a data preprocessing module for performing denoising, beat segmentation based on R-wave detection and key electrocardiogram parameter extraction on the acquired signals; a core analysis module internally deploying a deep learning model trained according to the method of claim 2 or 3 for performing encoding of electrocardiogram signals, intervention on latent space feature vectors and decoding generation of counterfactual electrocardiogram signals; and a result display module for visually presenting the quantification results to users in the form of charts or numerical values on a display terminal.
Citation Information
Patent Citations
Smart hardware security engine using biometric features and hardware-specific features
US20200349247A1
Method and system for predicting a type of a cardiac disease
WO2024080928A1