A method for early warning of drug-induced liver injury based on real-world data

By constructing individualized dynamic baselines and multi-scale risk characterization, the problems of missed diagnosis and bias in drug-induced liver injury in existing technologies have been solved, enabling early warning and accurate drug attribution for drug-induced liver injury, and improving medication safety.

CN122392966APending Publication Date: 2026-07-14THE FIRST PEOPLES HOSPITAL OF XIAOSHAN DISTRICT HANGZHOU (XIAOSHAN HOSPITAL AFFILIATED TO WENZHOU MEDICAL UNIVERSITY)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
THE FIRST PEOPLES HOSPITAL OF XIAOSHAN DISTRICT HANGZHOU (XIAOSHAN HOSPITAL AFFILIATED TO WENZHOU MEDICAL UNIVERSITY)
Filing Date
2026-05-06
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing technologies cannot adapt to the dynamic physiological fluctuations of individuals under changes in age, underlying liver disease, or metabolic status. They are prone to missing subclinical drug-induced liver injury, lack effective modeling of the causal relationship between drugs and liver injury, and most models are susceptible to selection bias and confounding bias in complex real-world medication scenarios, making it difficult to support accurate drug attribution.

Method used

We construct a personalized dynamic baseline by using historical liver function test data of target patients before medication, calculate standardized deviations, extract covariates and drug exposure characteristics, fit the residuals through a gradient boosting tree model, estimate the causal effect coefficient, and generate a multi-scale risk characterization by combining a time-series attention mechanism, and perform causal contribution scoring and comprehensive early warning scoring.

Benefits of technology

It enables precise identification of individualized liver function abnormalities, reduces false negatives and false positives, overcomes the limitations of traditional models, and can detect subclinical drug-induced liver injury at an early stage, improving the accuracy and safety of drug attribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122392966A_ABST
    Figure CN122392966A_ABST
Patent Text Reader

Abstract

The application discloses a drug-induced liver injury early warning method based on real world data, and relates to the field of medical information technology, comprising: constructing an individual dynamic baseline formed by historical liver function test data of a target patient before taking medicine; calculating a standardized deviation value of a current liver function index based on the individual dynamic baseline to obtain an individual abnormal signal; acquiring time sequence observation data containing multiple patient medication records and corresponding liver function test results, and extracting covariates, drug exposure and liver function response characteristics therefrom; fitting the confounding effect of the liver function index and the propensity of the drug exposure by using the covariates respectively, generating corresponding residuals, and estimating the individual causal effect coefficient of a specific drug on the liver function index based on the residuals; and calculating the causal contribution score of each drug on the individual abnormal signal according to the individual causal effect coefficient and the types and dosages of medicines taken by the current patient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical information technology, and in particular to an early warning method for drug-induced liver injury based on real-world data. Background Technology

[0002] Drug-induced liver injury (DILI) is a major challenge in clinical drug safety monitoring and a leading cause of new drug development failures and post-market withdrawals. In recent years, with the widespread accumulation of real-world data such as electronic health records, regional health information platforms, and medical insurance databases, big data-driven active DILI monitoring methods have gradually become a research hotspot. Existing technologies mainly rely on pre-set biochemical threshold rules or anomaly detection models based on population reference intervals. Some studies have attempted to introduce machine learning methods to classify and predict changes in liver enzymes.

[0003] Using a static, uniform range of normal liver function values ​​as a benchmark cannot adapt to the dynamic physiological fluctuations of individuals under changes in age, underlying liver disease, or metabolic status. It is easy to miss subclinical damage, lacks effective modeling of the causal relationship between drugs and liver damage, and most models only capture statistical associations. In complex real-world medication scenarios, they are easily affected by selection bias and confounding bias, making it difficult to support accurate drug attribution. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides an early warning method for drug-induced liver injury based on real-world data. This method is unable to adapt to the dynamic physiological fluctuations of individuals under different ages, underlying liver diseases, or metabolic states, is prone to missing subclinical injuries, lacks effective modeling of the causal relationship between drugs and liver injury, and most models only capture statistical associations. In complex real-world medication scenarios, these models are easily affected by selection bias and confounding bias, making it difficult to support accurate drug attribution.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides an early warning method for drug-induced liver injury based on real-world data, which includes constructing an individualized dynamic baseline formed by the historical liver function test data of the target patient before medication.

[0008] Based on the individualized dynamic baseline, the standardized deviation of the current liver function indicators is calculated to obtain individualized abnormal signals;

[0009] We acquired time-series observational data containing medication records and corresponding liver function test results for multiple patients, and extracted covariates, drug exposure, and liver function response characteristics from the data.

[0010] The confounding effects of liver function indicators and the propensity for drug exposure were fitted using covariates, and the corresponding residuals were generated. Based on the residuals, the individualized causal effect coefficients of specific drugs on liver function indicators were estimated.

[0011] Based on the individualized causal effect coefficient and the current type and dosage of medication used by the patient, calculate the causal contribution score of each drug to the individualized abnormal signal;

[0012] Collect multi-source real-world data, extract short-term fluctuation characteristics and long-term trend characteristics, and generate multi-scale DILI risk representations by fusing them through a time-series attention mechanism.

[0013] The causal contribution score is weighted and fused with the multi-scale DILI risk characterization to obtain a comprehensive early warning score.

[0014] As a preferred embodiment of the drug-induced liver injury early warning method based on real-world data described in this invention, the specific steps for constructing an individualized dynamic baseline based on the target patient's historical liver function test data before medication are as follows:

[0015] Extract liver function test sequences from the target patient’s electronic health record for at least 180 days prior to the first use of the monitored drug. The test sequences include alanine aminotransferase (ALT), aspartate aminotransferase (AST), and total bilirubin (TBil).

[0016] Using a 90-day time window and sliding forward every 30 days, the median of the measured values ​​of each indicator within each window is taken to form a series of representative baseline values ​​at discrete time points, thus constituting an individualized baseline trajectory that reflects the long-term trend of changes in the patient's liver function.

[0017] For the current warning time, the baseline value corresponding to the time is determined by linear interpolation and used as an individualized dynamic baseline.

[0018] As a preferred embodiment of the early warning method for drug-induced liver injury based on real-world data according to the present invention, the specific steps for calculating the standardized deviation value of the current liver function indicators based on the individualized dynamic baseline to obtain the individualized abnormal signal are as follows:

[0019] Obtain the measured value of a certain liver function indicator at the current moment. and at the same time, the individualized dynamic baseline value ;

[0020] Simultaneously, the historical standard deviation of the patient's in-term indicators within the time window used to construct baseline was calculated. , used to measure the amplitude of individual physiological fluctuations;

[0021] Substitute the three factors into the following formula to calculate the standardized deviation. The expression is:

[0022] ;

[0023] in, This is the standardized deviation value. These are the current measured values ​​of liver function indicators. For individualized dynamic baseline values, The historical standard deviation of the indicator during the baseline period. To prevent smoothing constants with denominators of zero.

[0024] As a preferred embodiment of the drug-induced liver injury early warning method based on real-world data described in this invention, the steps of using covariates to fit the confounding effects of liver function indicators and the propensity for drug exposure, generating corresponding residuals, and estimating the individualized causal effect coefficient of a specific drug on liver function indicators based on the residuals are as follows:

[0025] Collect longitudinal real-world data from no fewer than 10,000 patients from hospital information systems or medical insurance databases to construct an observational sample set, where each sample contains a covariate vector. Drug exposure variables Liver function response variables ;

[0026] The function is fitted using a gradient boosting tree model. Calculate liver function residuals To eliminate the confounding effects of covariates on liver function;

[0027] Fitting functions using the same model structure Calculate drug exposure residuals To correct selection bias;

[0028] Based on the residual pairs of all samples Estimate the individualized causal effect coefficient of the drug. The expression is:

[0029] ;

[0030] in, This is the individualized causal effect coefficient. For drug exposure residuals, For liver function response residuals, This represents the summation over all observed samples. This is a regularization parameter used to improve numerical stability.

[0031] As a preferred embodiment of the early warning method for drug-induced liver injury based on real-world data described in this invention, the specific steps for calculating the causal contribution score of each drug to the individualized abnormal signal based on the individualized causal effect coefficient and the current type and dosage of medication used by the patient are as follows:

[0032] Obtain a list of all medications currently being used by the patient and their daily dosages;

[0033] Divide the daily dose of each drug by the recommended daily dose as defined by the World Health Organization. To obtain a standardized dose;

[0034] Call the individualized causal effect coefficient corresponding to the drug;

[0035] The standardized dose is multiplied by the causal effect coefficient to obtain the causal contribution score of the drug to liver function abnormalities.

[0036] The total causal contribution score is obtained by algebraically summing the causal contribution scores of all drugs in use.

[0037] As a preferred embodiment of the drug-induced liver injury early warning method based on real-world data described in this invention, the steps of collecting multi-source real-world data, extracting short-term fluctuation features and long-term trend features, and fusing them through a time-series attention mechanism to generate a multi-scale DILI risk characterization are as follows:

[0038] Simultaneously collect time-series laboratory test data and unstructured text records from electronic medical records of target patients;

[0039] The first-order difference between adjacent time points is calculated for laboratory data to serve as a short-term fluctuation characteristic reflecting acute changes.

[0040] The clinical BERT model, which was fine-tuned for electronic medical record text, was encoded into symptom semantic vectors, and the mean was taken within a 7-day sliding window as a long-term trend feature reflecting chronic progression.

[0041] The short-term fluctuation feature vector and the long-term trend feature vector are concatenated along the feature dimension to form a joint input vector. ;

[0042] Will Input a lightweight temporal attention module and compute a multi-scale DILI risk representation as output. The expression is:

[0043] ;

[0044] in, For multi-scale DILI risk characterization, This is the concatenated joint input vector. , , These are the query key-value projection matrices, For the projection dimension, It is a normalized exponential function.

[0045] As a preferred embodiment of the drug-induced liver injury early warning method based on real-world data described in this invention, the step of weightedly fusing the causal contribution score with the multi-scale DILI risk characterization to obtain a comprehensive warning score includes the following steps:

[0046] Obtain the total causal contribution score Multi-scale DILI risk characterization ;

[0047] right Perform min-max normalization to map it to the closed interval [0,1], denoted as ;

[0048] A nonlinear fusion mechanism is designed to enable high causal evidence to trigger early warnings even under low temporal risk, while high temporal risk can amplify medium causal signals.

[0049] A comprehensive early warning score is calculated through a mechanism.

[0050] As a preferred embodiment of the early warning method for drug-induced liver injury based on real-world data described in this invention, the following steps are taken: The design of a nonlinear fusion mechanism to calculate the final comprehensive warning score involves the following steps:

[0051] Calling the total causal contribution score and normalized multi-scale DILI risk characterization ;

[0052] A sigmoid gating function is introduced to modulate the gain effect of time-series risk on causal scoring, and a logarithmic term is added to enhance the robustness of the causal signal.

[0053] Calculate the comprehensive early warning score The expression is:

[0054] ;

[0055] in, For comprehensive early warning scoring, Score the total causal contribution. For the normalized multi-scale DILI risk characterization, To control the adjustment coefficient for risk sensitivity, Compensation coefficients are used to enhance the robustness of strong causal signals.

[0056] In a second aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the method for early warning of drug-induced liver injury based on real-world data as described in the first aspect of the present invention.

[0057] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the method for early warning of drug-induced liver injury based on real-world data as described in the first aspect of the present invention.

[0058] The beneficial effects of this invention are as follows: By constructing an individualized dynamic baseline based on the historical liver function test data of the target patient before medication, it achieves a precise characterization of the physiological fluctuation pattern of each patient's liver function. It abandons the traditional "one-size-fits-all" judgment standard that relies on a fixed population reference interval, thereby reducing false negatives or false positives caused by baseline deviation in special populations such as the elderly, obese, or with fatty liver. By calculating the standardized deviation value of the current liver function index based on the baseline, it obtains individualized abnormal signals, transforms the absolute test value into the relative degree of deviation from its own normal state, and introduces the standard deviation of historical fluctuations for normalization. This allows even small changes in liver enzymes that are still within the normal range but have deviated from the individual's homeostasis to be effectively identified. It breaks through the limitation of existing systems that only respond to events exceeding the threshold, and achieves early detection of subclinical or occult drug-induced liver injury. Attached Figure Description

[0059] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0060] Figure 1 This is a flowchart of an early warning method for drug-induced liver injury based on real-world data. Detailed Implementation

[0061] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0062] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0063] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0064] Reference Figure 1 This is one embodiment of the present invention, which provides an early warning method for drug-induced liver injury based on real-world data, comprising the following steps:

[0065] S1. Construct an individualized dynamic baseline based on the target patient's pre-medication liver function test data.

[0066] Furthermore, liver function test sequences were extracted from the target patient's electronic health record for at least 180 days prior to the first use of the monitored drug. These test sequences included alanine aminotransferase (ALT), aspartate aminotransferase (AST), and total bilirubin (TBil).

[0067] Using a 90-day time window and sliding forward every 30 days, the median of the measured values ​​of each indicator within each window is taken to form a series of representative baseline values ​​at discrete time points, thus constituting an individualized baseline trajectory that reflects the long-term trend of changes in the patient's liver function.

[0068] For the current warning time, the baseline value corresponding to the time is determined by linear interpolation and used as an individualized dynamic baseline.

[0069] It should be noted that the individualized dynamic baseline fully considers the patient's own physiological fluctuations, age changes and the impact of chronic underlying liver disease, avoiding false negatives or false positives caused by the traditional population reference interval in elderly, obese or fatty liver patients, and improving the individual adaptability and early sensitivity of abnormal signal detection.

[0070] S2. Calculate the standardized deviation of the current liver function indicators based on the individualized dynamic baseline to obtain the individualized abnormal signal.

[0071] Furthermore, obtain the measured value of a certain liver function indicator at the current moment. and at the same time, the individualized dynamic baseline value ;

[0072] Simultaneously, the historical standard deviation of the patient's in-term indicators within the time window used to construct baseline was calculated. , used to measure the amplitude of individual physiological fluctuations;

[0073] Substitute the three factors into the following formula to calculate the standardized deviation. The expression is:

[0074] ;

[0075] in, This is the standardized deviation value. These are the current measured values ​​of liver function indicators. For individualized dynamic baseline values, The historical standard deviation of the indicator during the baseline period. To prevent smoothing constants with denominators of zero.

[0076] It should be noted that by introducing the standard deviation of individual historical fluctuations for standardization, even small but clinically significant increases in liver enzymes can be effectively captured, thereby enabling early identification of occult or subclinical DILI and making up for the major shortcomings of existing monitoring systems that rely solely on absolute thresholds.

[0077] S3. Obtain time-series observational data containing medication records of multiple patients and corresponding liver function test results, and extract covariates, drug exposure, and liver function response characteristics from the data.

[0078] Furthermore, the time-series observation data comes from the hospital's electronic medical record system, regional health information platform, or medical insurance claims database, with a time span of no less than 12 months, covering at least 10,000 patients who received systemic drug treatment;

[0079] Covariates include demographic characteristics, history of underlying liver disease, comorbidities, concomitant medications, baseline laboratory values, and pre-medication liver enzyme fluctuations.

[0080] Drug exposure characteristics include the start and end times of target drug administration, daily dose, cumulative dose, and whether it is used in combination with other known hepatotoxic drugs;

[0081] Liver function response characteristics are expressed as changes in liver function tests within 1 to 30 days after medication, specifically the absolute increase or relative rate of change of alanine aminotransferase (ALT), aspartate aminotransferase (AST), or total bilirubin (TBil) relative to the baseline before medication.

[0082] All features are structured and aligned according to patient-medication event pairs to ensure that covariates occur before drug exposure and liver function responses occur after drug exposure in each observation record, forming a longitudinal observation sample set with a clear temporal causal structure.

[0083] It should be noted that the structured time series sample set provides a high-quality, time-inverted real-world evidence basis for subsequent causal inference, effectively avoiding the exposure-outcome time series disorder problem commonly found in retrospective data, and improving the reliability and extrapolation ability of causal effect estimation.

[0084] S4. Use covariates to fit the confounding effects of liver function indicators and the propensity for drug exposure, generate corresponding residuals, and estimate the individualized causal effect coefficients of specific drugs on liver function indicators based on the residuals.

[0085] Furthermore, longitudinal real-world data from no fewer than 10,000 patients are collected from hospital information systems or medical insurance databases to construct an observational sample set, where each sample contains a covariate vector. Drug exposure variables Liver function response variables ;

[0086] The function is fitted using a gradient boosting tree model. Calculate liver function residuals To eliminate the confounding effects of covariates on liver function;

[0087] Fitting functions using the same model structure Calculate drug exposure residuals To correct selection bias;

[0088] Based on the residual pairs of all samples Estimate the individualized causal effect coefficient of the drug. The expression is:

[0089] ;

[0090] in, This is the individualized causal effect coefficient. For drug exposure residuals, For liver function response residuals, This represents the summation over all observed samples. This is a regularization parameter used to improve numerical stability.

[0091] It should be noted that the double residual causal estimation method effectively decouples the influence of confounding factors on liver function, and for the first time realizes a quantitative assessment of the causal intensity of drug hepatotoxicity in a real-world scenario, overcoming the fundamental limitation of traditional correlation analysis being susceptible to confounding bias.

[0092] S5. Calculate the causal contribution score of each drug to the individualized abnormal signal based on the individualized causal effect coefficient and the current type and dosage of medication used by the patient.

[0093] Furthermore, obtain a list of all medications currently being used by the patient and their daily dosages;

[0094] Divide the daily dose of each drug by the recommended daily dose as defined by the World Health Organization. To obtain a standardized dose;

[0095] Call the individualized causal effect coefficient corresponding to the drug;

[0096] The standardized dose is multiplied by the causal effect coefficient to obtain the causal contribution score of the drug to liver function abnormalities.

[0097] The total causal contribution score is obtained by algebraically summing the causal contribution scores of all drugs in use.

[0098] It should be noted that the scoring mechanism transforms abstract causal effects into actionable clinical decision-making criteria, enabling doctors to intuitively determine "which drug is most likely to cause current liver damage," thereby accurately guiding the discontinuation or switching of medication, avoiding the blind discontinuation of effective treatment drugs, and improving medication safety and treatment continuity.

[0099] S6. Collect multi-source real-world data, extract short-term fluctuation characteristics and long-term trend characteristics, and generate multi-scale DILI risk representations through time-series attention mechanism.

[0100] Furthermore, the laboratory test time-series data of the target patients and the unstructured text records in the electronic medical records are collected simultaneously.

[0101] The first-order difference between adjacent time points is calculated for laboratory data to serve as a short-term fluctuation characteristic reflecting acute changes.

[0102] The clinical BERT model, which was fine-tuned for electronic medical record text, was encoded into symptom semantic vectors, and the mean was taken within a 7-day sliding window as a long-term trend feature reflecting chronic progression.

[0103] The short-term fluctuation feature vector and the long-term trend feature vector are concatenated along the feature dimension to form a joint input vector. ;

[0104] Will Input a lightweight temporal attention module and compute a multi-scale DILI risk representation as output. The expression is:

[0105] ;

[0106] in, For multi-scale DILI risk characterization, This is the concatenated joint input vector. , , These are the query key-value projection matrices, For the projection dimension, It is a normalized exponential function.

[0107] It should be noted that the multi-scale fusion mechanism can adaptively identify different DILI phenotypes—capturing cholestatic damage that slowly rises over several weeks induced by anti-tuberculosis drugs, and also providing early warning of fulminant liver enzyme spikes within 48 hours caused by antibiotics, significantly expanding the applicability and robustness of the early warning system.

[0108] S7. The causal contribution score is weighted and fused with the multi-scale DILI risk characterization to obtain a comprehensive early warning score.

[0109] Furthermore, obtain the total causal contribution score. Multi-scale DILI risk characterization ;

[0110] right Perform min-max normalization to map it to the closed interval [0,1], denoted as ;

[0111] A nonlinear fusion mechanism is designed to enable high causal evidence to trigger early warnings even under low temporal risk, while high temporal risk can amplify medium causal signals.

[0112] A comprehensive early warning score is calculated through a mechanism.

[0113] Calling the total causal contribution score and normalized multi-scale DILI risk characterization ;

[0114] A sigmoid gating function is introduced to modulate the gain effect of time-series risk on causal scoring, and a logarithmic term is added to enhance the robustness of the causal signal.

[0115] Calculate the comprehensive early warning score The expression is:

[0116] ;

[0117] in, For comprehensive early warning scoring, Score the total causal contribution. For the normalized multi-scale DILI risk characterization, To control the adjustment coefficient for risk sensitivity, Compensation coefficients are used to enhance the robustness of strong causal signals.

[0118] It should be noted that the nonlinear fusion formula creatively balances the two dimensions of "causal credibility" and "temporal sensitivity": when the causal evidence is strong, an early warning can still be triggered even if the symptoms are atypical;

[0119] When the timing risk is high, intermediate causal signals can be amplified to avoid missing warnings.

[0120] The mechanism outperforms simple weighted averages, achieving synergistic optimization of high specificity and high sensitivity.

[0121] This embodiment also provides a computer device applicable to the early warning method for drug-induced liver injury based on real-world data, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the early warning method for drug-induced liver injury based on real-world data as proposed in the above embodiment.

[0122] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0123] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the method for early warning of drug-induced liver injury based on real-world data as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0124] In summary, this invention achieves a precise characterization of the physiological fluctuations in liver function for each patient by constructing an individualized dynamic baseline based on the target patient's historical liver function test data before medication. It abandons the traditional "one-size-fits-all" judgment criteria that rely on fixed population reference intervals, thereby reducing false negatives or false positives caused by baseline deviations in special populations such as the elderly, obese individuals, or those with fatty liver. By calculating the standardized deviation value of current liver function indicators based on the baseline to obtain individualized abnormal signals, it transforms absolute test values ​​into relative deviations from the individual's normal state and introduces historical fluctuation standard deviations for normalization. This allows for the effective identification of even minor changes in liver enzymes that deviate from the individual's homeostasis, even if they remain within the normal range. This overcomes the limitation of existing systems that only respond to events exceeding thresholds, enabling early detection of subclinical or occult drug-induced liver injury.

[0125] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for early warning of drug-induced liver injury based on real-world data, characterized in that: This includes constructing an individualized dynamic baseline based on the target patient's historical liver function test data before medication; Based on the individualized dynamic baseline, the standardized deviation of the current liver function indicators is calculated to obtain individualized abnormal signals; We acquired time-series observational data containing medication records and corresponding liver function test results for multiple patients, and extracted covariates, drug exposure, and liver function response characteristics from the data. The confounding effects of liver function indicators and the propensity for drug exposure were fitted using covariates, and the corresponding residuals were generated. Based on the residuals, the individualized causal effect coefficients of specific drugs on liver function indicators were estimated. Based on the individualized causal effect coefficient and the current type and dosage of medication used by the patient, calculate the causal contribution score of each drug to the individualized abnormal signal; Collect multi-source real-world data, extract short-term fluctuation characteristics and long-term trend characteristics, and generate multi-scale DILI risk representations by fusing them through a time-series attention mechanism. The causal contribution score is weighted and fused with the multi-scale DILI risk characterization to obtain a comprehensive early warning score.

2. The method for early warning of drug-induced liver injury based on real-world data as described in claim 1, characterized in that: The specific steps for constructing an individualized dynamic baseline based on the target patient's pre-medication liver function test data are as follows: Extract liver function test sequences from the target patient’s electronic health record for at least 180 days prior to the first use of the monitored drug. The test sequences include alanine aminotransferase (ALT), aspartate aminotransferase (AST), and total bilirubin (TBil). Using a 90-day time window and sliding forward every 30 days, the median of the measured values ​​of each indicator within each window is taken to form a series of representative baseline values ​​at discrete time points, thus constituting an individualized baseline trajectory that reflects the long-term trend of changes in the patient's liver function. For the current warning time, the baseline value corresponding to the time is determined by linear interpolation and used as an individualized dynamic baseline.

3. The method for early warning of drug-induced liver injury based on real-world data as described in claim 2, characterized in that: The standardized deviation of the current liver function indicators is calculated based on the individualized dynamic baseline to obtain the individualized abnormal signal. The specific steps are as follows: Obtain the measured value of a certain liver function indicator at the current moment. and at the same time, the individualized dynamic baseline value ; Simultaneously, the historical standard deviation of the patient's in-term indicators within the time window used to construct baseline was calculated. , used to measure the amplitude of individual physiological fluctuations; Substitute the three factors into the following formula to calculate the standardized deviation. The expression is: ; in, This is the standardized deviation value. These are the current measured values ​​of liver function indicators. For individualized dynamic baseline values, The historical standard deviation of the indicator during the baseline period. To prevent smoothing constants with a denominator of zero.

4. The method for early warning of drug-induced liver injury based on real-world data as described in claim 3, characterized in that: The steps involve using covariates to fit the confounding effects of liver function indicators and the propensity for drug exposure, generating corresponding residuals, and estimating the individualized causal effect coefficient of a specific drug on liver function indicators based on the residuals. Collect longitudinal real-world data from no fewer than 10,000 patients from hospital information systems or medical insurance databases to construct an observational sample set, where each sample contains a covariate vector. Drug exposure variables Liver function response variables ; The function is fitted using a gradient boosting tree model. Calculate liver function residuals To eliminate the confounding effects of covariates on liver function; Fitting functions using the same model structure Calculate drug exposure residuals To correct selection bias; Based on the residual pairs of all samples Estimate the individualized causal effect coefficient of the drug. The expression is: ; in, This is the individualized causal effect coefficient. For drug exposure residuals, For liver function response residuals, This represents the summation over all observed samples. This is a regularization parameter used to improve numerical stability.

5. The method for early warning of drug-induced liver injury based on real-world data as described in claim 4, characterized in that: The specific steps for calculating the causal contribution score of each drug to the individualized abnormal signal based on the individualized causal effect coefficient and the current type and dosage of medication used by the patient are as follows: Obtain a list of all medications currently being used by the patient and their daily dosages; Divide the daily dose of each drug by the recommended daily dose as defined by the World Health Organization. To obtain a standardized dose; Call the individualized causal effect coefficient corresponding to the drug; The standardized dose is multiplied by the causal effect coefficient to obtain the causal contribution score of the drug to liver function abnormalities. The total causal contribution score is obtained by algebraically summing the causal contribution scores of all drugs in use.

6. The method for early warning of drug-induced liver injury based on real-world data as described in claim 5, characterized in that: The process involves collecting multi-source real-world data, extracting short-term fluctuation features and long-term trend features, and fusing them through a time-series attention mechanism to generate a multi-scale DILI risk representation. The specific steps are as follows: Simultaneously collect time-series laboratory test data and unstructured text records from electronic medical records of target patients; The first-order difference between adjacent time points is calculated for laboratory data to serve as a short-term fluctuation characteristic reflecting acute changes. The clinical BERT model, which was fine-tuned for electronic medical record text, was encoded into symptom semantic vectors, and the mean was taken within a 7-day sliding window as a long-term trend feature reflecting chronic progression. The short-term fluctuation feature vector and the long-term trend feature vector are concatenated along the feature dimension to form a joint input vector. ; Will Input a lightweight temporal attention module and compute a multi-scale DILI risk representation as output. The expression is: ; in, For multi-scale DILI risk characterization, This is the concatenated joint input vector. , , These are the query key-value projection matrices, For the projection dimension, It is a normalized exponential function.

7. The method for early warning of drug-induced liver injury based on real-world data as described in claim 6, characterized in that: The specific steps for weighted fusion of the causal contribution score and the multi-scale DILI risk representation to obtain a comprehensive early warning score are as follows: Obtain the total causal contribution score Multi-scale DILI risk characterization ; right Perform min-max normalization to map it to the closed interval [0,1], denoted as ; A nonlinear fusion mechanism is designed to enable high causal evidence to trigger early warnings even under low temporal risk, while high temporal risk can amplify medium causal signals. A comprehensive early warning score is calculated through a mechanism.

8. The method for early warning of drug-induced liver injury based on real-world data as described in claim 7, characterized in that: The specific steps of the aforementioned nonlinear fusion mechanism are as follows: Calling the total causal contribution score and normalized multi-scale DILI risk characterization ; A sigmoid gating function is introduced to modulate the gain effect of time-series risk on causal scoring, and a logarithmic term is added to enhance the robustness of the causal signal. Calculate the comprehensive early warning score The expression is: ; in, For comprehensive early warning scoring, Score the total causal contribution. For the normalized multi-scale DILI risk characterization, To control the adjustment coefficient for risk sensitivity, Compensation coefficients are used to enhance the robustness of strong causal signals.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the method for early warning of drug-induced liver injury based on real-world data as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the method for early warning of drug-induced liver injury based on real-world data as described in any one of claims 1 to 8.