Methods and systems for predicting adverse reactions to iodine contrast agents in cancer patients

CN121812172BActive Publication Date: 2026-05-26SICHUAN CANCER HOSPITAL
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SICHUAN CANCER HOSPITAL
Filing Date
2026-03-11
Publication Date
2026-05-26

Smart Images

  • Figure CN121812172B_ABST
    Figure CN121812172B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for predicting the risk of adverse reactions to iodine contrast agents in cancer patients, relating to the field of medical data processing and risk prediction technology. The key technical points are: the method includes constructing a multidimensional time-series dataset specific to cancer patients, data preprocessing and constructing a risk factor system specific to cancer patients, constructing a pharmacology-aware drug embedding layer, constructing a core module for multi-scale adaptive time-series feature extraction, coupling and modulating tumor pathological state with time-series risk, multi-feature fusion and risk prediction model training and validation, risk prediction and interpretable clinical decision support, and clinical iterative optimization of the model. By constructing a multidimensional dataset, the method dynamically captures the time-series patterns of different anti-tumor drugs within short, medium, and long risk periods, using the cancer patient's unique pathological state as a modulating factor to nonlinearly amplify or weaken the risk intensity of the corresponding time window, thereby improving the accuracy and clinical reliability of risk prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical data processing and risk prediction technology, specifically to a method and system for predicting the risk of adverse reactions to iodine contrast agents in cancer patients. Background Technology

[0002] Enhanced CT scans are an important diagnostic tool for tumors, used to assess treatment efficacy, and for follow-up examinations. These scans are performed via intravenous injection of iodine contrast agents. The large number of cancer patients exposed to iodine contrast agents and the prevalence of adverse reactions, some of which can be life-threatening, pose a significant safety concern. Studies suggest that patients with malignant tumors may have a higher risk of developing these reactions and different risk factors due to the characteristics of their disease. Some case reports indicate that cancer treatments influence the occurrence and severity of adverse reactions to iodine contrast agents. Accurately identifying and predicting the risk of adverse reactions to iodine contrast agents in patients with malignant tumors, and effectively preventing and managing them, remains a major challenge.

[0003] Currently, risk prediction methods for adverse reactions to iodine contrast agents are mainly divided into two categories: one is a scoring model based on traditional clinical characteristics, such as risk stratification based on static indicators like age, renal function, and allergy history; the other is a prediction model based on machine learning algorithms, which improves predictive efficacy by incorporating more clinical variables. However, existing methods simplify the medication records of cancer patients to static counts of medications taken or taken within a fixed time window, failing to fully consider the differences in the pharmacological mechanisms of different anti-tumor drugs and their dynamic temporal relationship with the injection time of iodine contrast agents.

[0004] Taking a non-small cell lung cancer patient receiving PD-1 inhibitor maintenance therapy as an example, this patient needs to undergo a contrast-enhanced CT scan for disease assessment. In clinical practice, doctors face the following dilemmas: On the one hand, immunotherapy drugs have a unique risk of delayed hypersensitivity reactions, with the risk peak usually occurring 5–10 days after administration, while the risk of acute kidney injury from platinum-based chemotherapy drugs is concentrated 1–3 days after administration. Existing risk analysis with a fixed time window cannot adaptively match the specific risk cycles of different drugs, resulting in low risk prediction sensitivity. On the other hand, cancer patients often have hypercoagulable states and immune dysfunction, such as elevated D-dimer and decreased lymphocytes. These pathological states significantly amplify the susceptibility to adverse reactions to iodine contrast agents. However, existing prediction models only linearly superimpose pathological indicators as independent risk factors, failing to reveal the nonlinear modulation effect of pathological states on the timing of drug administration risks, resulting in prediction results lacking pathophysiological basis and making it difficult to guide precise intervention. Summary of the Invention

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A method for predicting the risk of adverse reactions to iodine contrast agents in cancer patients includes the following steps:

[0007] Multidimensional clinical data of malignant tumor patients scheduled for enhanced CT scans were collected and standardized to obtain the raw dataset. The raw dataset was preprocessed to construct a patient-specific risk factor feature set, including static basic risk factors, tumor pathology-specific risk factors, and dynamic medication time-series risk factors. Through drug pharmacological attribute annotation and structuring, pharmacological knowledge enhancement and supervised fine-tuning were performed on the drug embedding features in the dynamic medication time-series risk factors to obtain a fine-tuned pharmacologically-aware drug embedding vector set. Based on the pharmacologically-aware drug embedding vector set, the medication time-series sequence was reconstructed. Risk features at different time scales were extracted through multi-scale parallel convolution and fused using drug category-guided scale gating. The system employs an attention mechanism to locate risk time windows, obtaining high-risk temporal feature vectors. Tumor pathological state features are extracted from tumor pathology-specific risk factors and coupled with the high-risk temporal feature vectors via a multiplication modulation mechanism to obtain a global temporal risk feature vector. This global temporal risk feature vector is then fused with static basic risk factors to construct and train a deep residual network risk prediction model, resulting in a trained prediction model. Patient data is input into the prediction model for risk inference, and interpretable risk attribution is performed by combining attention weight distribution and feature importance to generate personalized clinical decision recommendations. The prediction model and pharmacologically-aware drug embedding vector set are iteratively optimized based on clinical feedback data.

[0008] Furthermore, the multidimensional clinical data includes traditional clinical baseline characteristics, tumor-specific pathological characteristics, and fine-grained drug administration time-series characteristics. The drug administration time-series data collection window is from 30 days before the injection of iodine contrast agent to 7 days after the injection, covering the acute risk period, subacute risk period, and delayed risk period of tumor drugs. The standardized labeling uses the occurrence of adverse reactions within 72 hours after the injection of iodine contrast agent as the gold standard, and labels the data with binary classification tags and adverse reaction severity classification tags. Moreover, the collected multidimensional clinical data is first structured and integrated according to the patient's unique identifier before labeling is completed.

[0009] Furthermore, the preprocessing of the original dataset includes outlier detection and removal, missing value imputation, feature encoding, and normalization. For outlier detection, box plots are used for numerical features, and clinical logic verification is used for timestamp features. For missing value imputation, K-nearest neighbor imputation is used for numerical features, and mode imputation is used for categorical features. For feature encoding, one-hot encoding is used for binary features and low-cardinality multi-class features, and embedding encoding is used to map high-cardinality drug name features to drug-based embedding vectors. For normalization, minimum-maximum normalization is used for numerical features.

[0010] Furthermore, the drug pharmacological attributes include drug action mechanism classification, iodine contrast agent-related risk types, half-life classification, and anatomical therapeutic chemical classification system therapeutic classification; the pharmacological knowledge enhancement and supervised fine-tuning includes: encoding the drug pharmacological attributes one-hot and concatenating them with the basic drug embedding vector and performing L2 norm normalization to initialize the embedding vector, obtaining a pharmacologically aware drug embedding vector; using the occurrence of adverse reactions to iodine contrast agents as a supervision signal, backpropagation is performed through a single-layer fully connected neural network with binary cross-entropy loss as the optimization objective and stochastic gradient descent algorithm as the optimizer to update the parameters of the pharmacologically aware drug embedding vector.

[0011] Furthermore, the reconstructed medication time sequence includes: using the iodine contrast agent injection time as the time origin, sorting each patient's medication records chronologically, and concatenating the fine-tuned pharmacologically sensed drug embedding vector, the normalized dose value in the dynamic medication time sequence risk factor, and the normalized value of the time interval between medication and examination to form a time sequence feature vector for each medication event. This is then processed through sequence filling and truncation to obtain a fixed-length medication time sequence feature matrix. Multi-scale parallel convolution includes three sets of parallel one-dimensional temporal convolution kernels, corresponding to the short-cycle risk of platinum-based chemotherapy drugs, the medium-cycle risk of targeted drugs, and the long-cycle risk of immunotherapy drugs, respectively, outputting small-scale temporal feature maps and medium-scale temporal features. The graph and large-scale time series feature map; the drug category-guided scale-gated fusion includes: based on the core drug category features of immunotherapy drugs, platinum-based chemotherapy drugs and targeted drugs in the drug use time series, a three-dimensional normalized weight vector is generated through a single-layer fully connected neural network, and the small-scale time series feature map, the medium-scale time series feature map and the large-scale time series feature map are fused by channel dimension weighting to obtain the fused time series feature map; the attention mechanism generates normalized attention weights in the time dimension through additive attention and sums them by weighting the fused time series feature map to output a high-risk time series feature vector, and the normalized attention weights can be visualized as a risk time window curve and the continuous risk peak time points are marked.

[0012] Furthermore, the tumor pathological state features are generated based on coagulation function indicators, immune function indicators, and tumor stage through nonlinear mapping using a fully connected neural network; the coupling modulation with the high-risk time-series feature vector through the multiplication modulation mechanism includes: mapping the tumor pathological state features into a tumor pathological state feature vector with a numerical range of -1 to 1 using a fully connected neural network and a hyperbolic tangent activation function, then upscaling the fully connected network to a pathological modulation vector with the same dimension as the high-risk time-series feature vector, performing element-wise multiplication between the pathological modulation vector and the high-risk time-series feature vector, adding the result of the element-wise multiplication to the original high-risk time-series feature vector, and then performing dimensionality reduction through principal component analysis and L2 norm normalization to obtain the global time-series risk feature vector.

[0013] Furthermore, the fusion of the global time-series risk feature vector with the static basic risk factor includes: extracting the static basic risk feature vector from the static basic risk factor through a two-layer fully connected neural network, concatenating it with the global time-series risk feature vector, and then performing batch normalization to obtain a standardized fused feature vector; the deep residual network risk prediction model adopts the ResNet18 architecture, containing four residual blocks, with the standardized fused feature vector as input, and the output layer having parallel binary and tri-class output branches to output the probability of adverse reactions to iodine contrast agents and the probability distributions of mild, moderate, and severe adverse reactions, respectively; the model training uses the Adam optimizer, optimizing the learning rate, dropout rate, and batch size through grid search.

[0014] Furthermore, the risk inference is divided into three risk levels—low, medium, and high—based on the probability of adverse reactions. The interpretable risk attribution includes: plotting a medication risk time window curve and marking the peak risk time point based on the attention weight distribution over time; quantifying the contribution of the SHAPley additive explanatory value to the risk prediction results and outputting a ranking of core risk features. The iterative optimization includes: collecting real-world feedback data during clinical application; establishing a clinical performance monitoring system to monitor the core indicators of the model in real time; when any core indicator decreases from the baseline by more than a threshold, merging the feedback data with the original training data and re-performing preprocessing; retraining the prediction model; supplementing pharmacological attributes for novel anti-tumor drugs; and updating the pharmacologically perceived drug embedding vector set.

[0015] A risk prediction system for adverse reactions to iodine contrast agents in cancer patients includes: a dataset construction module for collecting multidimensional clinical data from malignant tumor patients scheduled for enhanced CT scans and standardizing and labeling it to construct a structured raw dataset; a risk factor construction module for preprocessing the raw dataset to construct a cancer patient-specific risk factor feature set containing static basic risk factors, tumor pathology-specific risk factors, and dynamic medication time-series risk factors; a drug embedding module for enhancing and supervising the drug embedding features in the dynamic medication time-series risk factors through drug pharmacological attribute labeling and structuring to obtain a pharmacologically-aware drug embedding vector set; and a time-series feature extraction module for reconstructing the medication time-series sequence based on the pharmacologically-aware drug embedding vector set, extracting risk features at different time scales through multi-scale parallel convolution, and then extracting them by drug category. The system employs a scale-gated fusion and attention mechanism to locate risk time windows, obtaining high-risk temporal feature vectors. A risk coupling modulation module extracts tumor pathological state features from tumor pathology-specific risk factors and couples them with the high-risk temporal feature vectors via a multiplicative modulation mechanism to obtain a global temporal risk feature vector. A model training module fuses the global temporal risk feature vectors with the static basic risk factors to construct and train a deep residual network risk prediction model, resulting in a trained prediction model. A risk prediction and decision support module inputs patient data to the prediction model for risk inference, combines attention weight distribution and feature importance for interpretable risk attribution, and generates personalized clinical decision recommendations. A model optimization module iteratively optimizes the prediction model and pharmacologically-aware drug embedding vector set based on clinical feedback data.

[0016] Furthermore, the dataset construction module collects traditional clinical baseline features, tumor-specific pathological features, and fine-grained medication time-series features, and defines the time window for medication time-series data collection, outputting a structured raw dataset; the risk factor construction module performs outlier removal, missing value imputation, feature encoding, and normalization on the raw dataset, outputting a tumor patient-specific risk factor feature set, including static basic risk factors, tumor pathology-specific risk factors, and dynamic medication time-series risk factors; the drug embedding module receives the dynamic medication time-series risk factors, extracts the core pharmacological attributes of drugs from the pharmacology database, performs numerical conversion and splicing, fine-tunes the embedding vector using adverse reaction signals, and outputs a fine-tuned pharmacologically-aware drug embedding vector set; the time-series feature extraction module receives the dosage and medication-examination time interval features from the dynamic medication time-series risk factors, combines them with the pharmacologically-aware drug embedding vector set, reconstructs a fixed-length medication time-series sequence, and utilizes and The system employs a convolutional kernel to capture short-, medium-, and long-term medication risk patterns, generates weights based on drug categories for weighted fusion, and outputs a high-risk temporal feature vector through an attention mechanism. The risk coupling modulation module receives the high-risk temporal feature vector and tumor pathology-specific risk factors, generates a pathological state feature vector as modulation coefficients, performs element-wise multiplication and residual connection with the high-risk temporal feature vector, and outputs a global temporal risk feature vector. The model training module concatenates and fuses the global temporal risk feature vector with static basic risk factors, trains a deep residual network, and outputs a prediction model. The risk prediction and decision support module outputs risk probabilities based on the prediction model, visualizes risk time windows using attention weights, calculates feature contribution, and generates attribution reports and intervention recommendations. The model optimization module collects clinical feedback data and merges it with the original dataset. When the monitored indicators decrease beyond a threshold, a retraining process is triggered to update the prediction model and the pharmacologically-aware drug embedding vector set.

[0017] This invention provides a method and system for predicting the risk of adverse reactions to iodine contrast agents in cancer patients, which has the following beneficial effects:

[0018] This invention constructs a multidimensional dataset covering traditional clinical features, tumor pathological features, and medication timing features with the injection time of iodine contrast agent as the time origin. It then sequentially implements pharmacology-aware drug embedding, multi-scale adaptive temporal convolution, pathological state and temporal risk coupling modulation, and deep residual network fusion training to form an end-to-end method for predicting adverse reactions to iodine contrast agents in cancer patients. This method can dynamically capture the temporal patterns of different anti-tumor drugs within short, medium, and long risk periods. Simultaneously, it nonlinearly amplifies or weakens the risk intensity of corresponding time windows by using the unique pathological states of cancer patients, such as hypercoagulability and immune disorders, as modulation factors. This solves the problems of existing technologies being unable to adaptively match drug-specific risk time windows and unable to quantify the modulation effect of pathological states on medication timing risk, significantly improving the accuracy and clinical reliability of risk prediction.

[0019] This invention introduces a drug embedding mechanism enhanced with pharmacological knowledge at the level of drug use time-series feature processing. By encoding pharmacological attributes such as drug action mechanism, iodine contrast agent-related risk types, and half-life, and concatenating them with the basic embedding vector for initialization, and using adverse reaction occurrence as a supervision signal for fine-tuning, the drug embedding vector combines pharmacological prior knowledge with task-driven semantics, providing a high-quality input representation for subsequent multi-scale time-series modeling. It employs three sets of parallel one-dimensional convolutional networks with different kernels to accurately correspond to the specific risk time windows of platinum-based chemotherapy drugs, targeted drugs, and immunotherapy drugs in clinical practice. Based on drug category features, it dynamically fuses feature maps of different scales through a gating network, realizing adaptive risk cycle extraction of one scale for one type of drug, breaking through the technical limitations of traditional fixed time window analysis.

[0020] This invention integrates a visual risk time window curve generated by an attention mechanism with the feature importance ranking calculated by SHAP values ​​at the risk attribution and clinical decision-making levels. It outputs an interpretable attribution report for each patient, indicating when the risk is highest, which drug contributes the most, and which pathological indicators require key intervention. Based on this, it automatically generates personalized clinical decision-making suggestions such as adjusting examination timing, contrast agent selection, and prophylactic medication, forming a closed loop from risk prediction to proactive intervention. In particular, by constructing a multiplicative coupling modulation mechanism between pathological state and temporal risk, it overcomes the limitation of traditional models that can only perform linear feature superposition, achieving accurate modeling of the amplified drug risk effect of pathological state. By constructing a model iterative optimization system based on real-world feedback data, the model can continuously adapt to new anti-tumor drugs and evolving clinical practices, ensuring long-term stable predictive performance and providing reliable technical support for the precise and safe management of CT contrast-enhanced examinations for cancer patients. Attached Figure Description

[0021] Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention.

[0022] Figure 2 This is a system framework diagram of Embodiment 2 of the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0024] Example 1:

[0025] Please see Figure 1 This embodiment provides a method for predicting the risk of adverse reactions to iodine contrast agents in cancer patients, including steps 1 to 8.

[0026] Step 1: Construction of a multidimensional time-series dataset specifically for cancer patients: Collect multidimensional clinical data covering patients with malignant tumors who are scheduled to undergo enhanced CT examinations, including traditional clinical features, tumor pathological features, and medication time-series features, and construct a structured raw dataset for predicting the risk of adverse reactions to iodine contrast agents.

[0027] Step 1.1: Determine the scope of data collection and the research subjects.

[0028] The study subjects were defined as patients with malignant tumors who were scheduled to undergo enhanced CT examinations; the inclusion criteria were pathological diagnosis and complete CT examination and medication records; the exclusion criteria were patients with contraindications to the use of iodine contrast agents or a clinical data missing rate of more than 30%; the time window for collecting medication time-series data was defined as 30 days before the injection of iodine contrast agent to 7 days after the injection, covering the acute risk period, subacute risk period and delayed risk period of tumor drugs.

[0029] Step 1.2: Multidimensional clinical data collection.

[0030] Three types of core data were collected from the study subjects from the hospital information system, electronic medical record system, and pharmacy management system. All data were clinical data used for predicting the risk of adverse reactions to iodine contrast agents, as detailed below:

[0031] Traditional clinical baseline characteristics include patient age, sex, body mass index, renal function indicators, history of iodine contrast agent allergy, and underlying diseases. Renal function indicators include estimated glomerular filtration rate and serum creatinine value, and underlying diseases include hypertension and diabetes.

[0032] Tumor-specific pathological features include tumor type, pathological stage, tumor markers, coagulation function indicators and immune function indicators. Tumor markers include carcinoembryonic antigen and alpha-fetoprotein levels, coagulation function indicators include D-dimer and fibrinogen, and immune function indicators include lymphocyte count and the ratio of CD4+ cells to CD8+ cells.

[0033] Fine-grained drug administration timing characteristics include drug name, anatomical therapeutic chemoclassification system drug code, dosage, route of administration, precise administration timestamp, and iodine contrast agent injection timestamp.

[0034] Step 1.3: Structured Storage and Labeling of the Original Dataset: The collected multi-dimensional data is converted into structured tables based on patients, and the data is integrated and linked according to the patient's unique identifier. At the same time, the labeled data for predicting the risk of adverse reactions to iodine contrast agents are standardized and labeled. The occurrence of adverse reactions within 72 hours after the patient's injection of iodine contrast agent is used as the gold standard. Binary labels and adverse reaction severity labels are used. In the binary labels, 0 represents no adverse reaction and 1 represents an adverse reaction. In the adverse reaction severity labels, 1 represents mild, 2 represents moderate, and 3 represents severe. The determination of adverse reactions follows the clinical standards of the expert consensus on the diagnosis and treatment of adverse reactions to iodine contrast agents.

[0035] After the above processing, a structured raw dataset is obtained, with the data format being a comma-separated value file or a pac-a-file, containing feature columns, timestamp columns, and label columns.

[0036] Step 2: Data preprocessing and construction of a risk factor system specific to cancer patients: The original dataset is cleaned, transformed and standardized to construct a risk factor system specific to adverse reactions to iodine contrast agents in cancer patients, and to clarify the core input feature dimensions of the deep residual network risk prediction model.

[0037] Step 2.1: Data outlier detection and removal.

[0038] For numerical features, such as estimated glomerular filtration rate, D-dimer, and drug dosage, box plots are used for outlier detection to remove data that clearly does not conform to clinical logic. Specifically, the upper and lower quartiles of the feature are calculated, and the outlier threshold is determined as the lower quartile minus 1.5 times the interquartile range and the upper quartile plus 1.5 times the interquartile range. Data points exceeding this threshold are identified as outliers. After processing, an outlier labeling list is obtained, which includes the patient identifier, feature name, and specific value of the outlier. The outlier labeling list is used for manual review to ensure the rationality of data removal.

[0039] Based on the timestamp characteristics, a clinical logic verification method is used to verify the logical relationship between the administration time and the iodine contrast agent injection time, and to eliminate data with contradictory time logic. If the administration timestamp is later than the iodine contrast agent injection timestamp and the medication is marked as pre-examination medication, it is determined to be a contradictory time logic.

[0040] The processed output is a standardized original dataset without outliers.

[0041] Step 2.2: Clinically appropriate imputation of missing values: Perform classification imputation on missing values ​​in the dataset.

[0042] For a single clinical feature, such as a tumor marker, immune function indicator, or medication-related indicator, first calculate its missing data rate in all patient samples. Missing data rate = number of samples with no record or empty data for that feature ÷ total number of patient samples × 100%. For features with a missing data rate ≤ 30%, imputation is performed according to clinical rationality.

[0043] For missing numerical features, such as estimating glomerular filtration rate and lymphocyte count, the K-nearest neighbor imputation method is used, where K is set to 5. Specifically, the Euclidean distance between the missing sample and other samples on the known features is calculated, and the 5 samples that are closest to the missing sample on the known features are selected. The mean of these 5 samples on the missing features is taken as the imputation value.

[0044] For missing categorical features, such as allergy history and tumor type, the mode imputation method is used, which specifically selects the category with the highest frequency of occurrence in the categorical feature as the imputation value for the missing value.

[0045] For features with a missing rate > 30%, feature removal is performed without imputation to ensure data quality. The processed dataset is a complete structured dataset with no missing values.

[0046] Step 2.3: Feature encoding and normalization.

[0047] The non-numerical features in the dataset are encoded and transformed: non-numerical features are divided into binary features, multi-class features, and high-cardinality drug name features; for binary features and low-cardinality multi-class features, such as allergy history and tumor type, a one-hot encoding algorithm is used to convert each category into a binary vector, generating a sparse binary feature matrix; for high-cardinality drug name features, an embedding encoding algorithm is used to map drug names into 64-dimensional drug basic embedding vectors, generating a low-dimensional drug embedding matrix, which is optimized through random initialization and subsequent supervised learning.

[0048] Normalize numerical features: Use the minimum-maximum normalization algorithm to linearly map the feature value to the closed interval between 0 and 1. The normalized value is equal to the original value minus the minimum value of the feature and divided by the difference between the maximum and minimum values ​​of the feature.

[0049] After processing, a standardized feature dataset with encoding and normalization is obtained, eliminating the dimensional differences between different features and ensuring that all features are within the same numerical scale range.

[0050] Step 2.4: Construction of a risk factor system specifically for cancer patients.

[0051] Based on a standardized feature dataset, a specific risk factor system for adverse reactions to iodine contrast agents in cancer patients was integrated. This system serves as the core input feature set for the deep residual network risk prediction model and is divided into three main categories of risk factors:

[0052] Static baseline risk factors, including coded and normalized traditional clinical baseline characteristics such as age, estimated glomerular filtration rate, and history of allergies;

[0053] Tumor pathology-specific risk factors, including encoded and normalized tumor pathology features such as tumor stage, D-dimer, and lymphocyte count;

[0054] Dynamic medication time-series risk factors include drug embedding characteristics, normalized dose values, and medication-examination time interval characteristics. The medication-examination time interval characteristics are obtained by calculating the time difference between the administration time stamp and the iodine contrast agent injection time stamp, in days, and normalized to the range of 0 to 1.

[0055] After processing, a risk factor feature set specific to cancer patients is output, with the dimension being the number of samples multiplied by the total feature dimension, including all core features of both static and dynamic risk factors.

[0056] Step 3: Construction of a pharmacology-aware drug embedding layer: Pharmacological knowledge enhancement is performed on the drug embedding features in the dynamic medication time-series risk factors. Through drug pharmacological attribute annotation, embedding vector initialization and supervised fine-tuning, the drug embedding vector contains pharmacological attribute information, avoiding the clinical meaninglessness of simple random embedding.

[0057] Step 3.1: Labeling and structuring of drug pharmacological properties.

[0058] Core pharmacological attributes of oncology drugs are extracted and structurally labeled from publicly available pharmacology databases, such as drug bank databases, public chemistry databases, and anatomical therapeutic chemistry classification systems. Specifically, this includes four aspects:

[0059] Drug mechanisms of action can be classified as follows: immunosuppressive mechanisms, antimetabolism mechanisms, and antiangiogenic mechanisms.

[0060] Types of risks associated with iodine contrast agents, such as nephrotoxicity risk, enhanced allergic reaction risk, and coagulation abnormality risk;

[0061] Half-life is classified as follows: short half-life less than 24 hours, medium half-life 24 to 72 hours, and long half-life greater than 72 hours.

[0062] Anatomical and therapeutic chemical classification system for therapeutics.

[0063] The processed data yields a structured mapping table of drugs and their pharmacological attributes, which includes the drug name, a 64-dimensional basic embedding vector of the drug, and the structured mapping relationship of four pharmacological attributes.

[0064] Step 3.2: Initialization of Pharmacologically Aware Drug Embedding Vectors: The structured pharmacological attributes of the drug are converted into numerical feature vectors, which are then concatenated with the basic drug embedding vectors to achieve pharmacologically enhanced embedding vector initialization, avoiding the meaninglessness caused by random initialization. The details are as follows:

[0065] First, the four pharmacological attributes are converted into 16-dimensional numerical feature vectors through one-hot encoding. Then, the 16-dimensional numerical feature vectors are concatenated with the 64-dimensional drug basic embedding vector by channel dimension to obtain an 80-dimensional concatenated vector. Finally, the 80-dimensional vector is normalized by L2 norm to ensure that the vector magnitude is 1, thus obtaining the pharmacologically perceived drug embedding vector.

[0066] After processing, a pharmacologically-aware drug embedding initialization matrix is ​​obtained, with the dimension being the number of drug types multiplied by 80. Each drug corresponds to an 80-dimensional pharmacologically-aware drug embedding vector.

[0067] Step 3.3: Supervised fine-tuning of drug embedding vectors: Using the occurrence of adverse reactions to iodine contrast agents as a supervisory signal, the drug embedding vectors for pharmacological perception are fine-tuned and optimized to make the embedding vectors more in line with the needs of risk prediction tasks, rather than general pharmacological attribute representations.

[0068] A single-layer fully connected neural network is constructed. The inputs are the pharmacologically sensed drug embedding vector, the normalized value of the dosage, and the time interval between medication and examination. The output layer uses a sigmoid activation function to generate the probability of adverse reactions. The loss function is binary classification cross-entropy loss. The optimizer uses the stochastic gradient descent algorithm with a learning rate of 0.01. The specific parameters to be optimized are the weight matrix and bias vector of the single-layer fully connected neural network. The pharmacologically sensed drug embedding vector parameters are updated through backpropagation algorithm, and the fine-tuned drug embedding vector is output.

[0069] After processing, a fine-tuned set of pharmacologically perceived drug embedding vectors is obtained. The dimension is still the number of drug types multiplied by 80, but the vector distribution has been optimized and adjusted according to the iodine contrast agent adverse reaction risk prediction task.

[0070] Step 4: Construction of the core module for multi-scale adaptive temporal feature extraction: For dynamic medication time-series risk factors, a pharmacology-inspired multi-scale adaptive temporal convolutional network is constructed to overcome the limitations of fixed time windows in existing technologies, realize the adaptive extraction of specific risk time windows for different drug categories, capture short-cycle, medium-cycle, and long-cycle medication risk patterns, and output high-dimensional temporal risk feature vectors.

[0071] Step 4.1: Reconstruction and vectorization of the medication time sequence: Taking the injection time of iodine contrast agent as the time origin, the medication records for each patient's iodine contrast agent adverse reaction risk prediction are sorted from early to late according to the administration time, and reconstructed into an ordered medication time sequence.

[0072] The fine-tuned pharmacologically sensed drug embedding vector, normalized dosage value, and time interval between medication and examination are concatenated to form a temporal feature vector for each medication event, with a dimension of 82. Ultimately, each patient corresponds to a variable-length medication time sequence matrix.

[0073] Using a sequence padding and truncation algorithm, variable-length time series sequences are unified into fixed-length sequences. The fixed length is the 95th percentile of the length of all patient sequences, denoted as L. Sequences shorter than L are padded with zero vectors at the end, and sequences longer than L are truncated at the front end to obtain fixed-length time series sequences.

[0074] After processing, a fixed-length medication time sequence feature matrix is ​​obtained, with dimensions of sample number × L × 82.

[0075] Step 4.2: Feature extraction of multi-scale parallel convolutional layers: For the three types of specific risk time windows of tumor drugs, namely the short-cycle risk of 1 to 3 days for platinum-based chemotherapy drugs, the medium-cycle risk of 3 to 7 days for targeted drugs, and the long-cycle risk of 7 to 21 days for immunotherapy drugs, three sets of parallel one-dimensional temporal convolutional kernels are designed to capture drug use risk patterns at different time scales, thereby realizing the parallel extraction of multi-scale risk features.

[0076] A one-dimensional temporal convolutional neural network algorithm was used, with three sets of convolutional kernel parameters designed according to the clinical risk time window. All three sets of kernel parameters employed linear rectified unit activation functions, batch normalization layers, and max pooling layers.

[0077] Small-scale convolutional kernels correspond to short-cycle risks. Convolutional kernel = 3, stride = 1, number of convolutional kernels = 64, pooling kernel = 2.

[0078] The mesoscale convolution kernel corresponds to the mesocycle risk, with 7 convolution kernels, 1 stride, 128 convolution kernels, and 2 pooling kernels.

[0079] Large-scale convolutional kernels correspond to long-term risks. Convolutional kernel = 14, stride = 1, number of convolutional kernels = 256, pooling kernel = 2.

[0080] The three sets of one-dimensional convolutional neural networks output small-scale, medium-scale, and large-scale temporal feature maps, respectively, with dimensions of sample number × L / 2 × 64, sample number × L / 2 × 128, and sample number × L / 2 × 256, respectively. After pooling, the temporal dimension of the feature map is compressed, retaining the core risk features while reducing the amount of computation.

[0081] Step 4.3: Drug Category-Guided Scale-Gated Fusion: Based on the pharmacological properties of drugs, a scale-gated mechanism is designed to dynamically assign weight coefficients to the feature maps of the three scales, realizing the mapping from drug category to adaptive scale activation. For example, immunotherapy drugs automatically activate large-scale convolution channels, and platinum-based chemotherapy drugs automatically activate small-scale convolution channels, avoiding the loss of risk features caused by a one-size-fits-all scale fusion.

[0082] First, the core drug category features of each medication time series are extracted. For example, the presence of immunotherapy drugs is marked as 1, and others as 0, which is encoded as a 10-dimensional drug category feature vector. Then, the drug category feature vector is input into a single-layer fully connected neural network, which outputs a three-dimensional weight vector containing small-scale weights, medium-scale weights, and large-scale weights. After processing with a sigmoid activation function, it is ensured that each weight value is in the closed interval between 0 and 1 and the weight sum is 1. Finally, the weight vector is weighted with the feature maps of the three scales in the channel dimension, and the weighted features are then concatenated and fused in the channel dimension.

[0083] After processing, we obtain: a three-dimensional normalized scale weight vector output by a fully connected neural network, with each sample corresponding to a set of exclusive weights, and an adaptive scale fusion temporal feature map obtained after weighted fusion, with dimensions of sample number × L / 2 × 448.

[0084] Step 4.4: Differentiable Time Window Localization and High-Risk Feature Enhancement: By designing an additive attention mechanism, attention weights are allocated to the adaptive scale fusion temporal feature map in the time dimension to achieve differentiable risk time window localization, outputting continuous risk peak time points instead of manually preset discrete time intervals, while enhancing the feature contribution of high-risk time points.

[0085] First, the adaptive scale-fused temporal feature map is input into a single-layer fully connected neural network to obtain an attention score vector with a dimension of L / 2×1, representing the contribution of each time point to the prediction of adverse reaction risk of iodine contrast agent. Then, the attention weights are obtained through the Softmax activation function to ensure that the weights of all time points sum to 1. The higher the weight, the greater the risk at that time point. Finally, the attention weights and the feature map are weighted and summed in the time dimension to obtain a high-risk temporal feature vector with a fixed dimension of sample number × 448.

[0086] After processing, we obtain: the attention weight distribution in the time dimension and the high-risk time-series feature vector. The dimension of the attention weight distribution in the time dimension is the number of samples multiplied by ×L / 2×1, which can be visualized as a patient-specific risk time window curve to output the risk peak time point. For example, the risk peak of PD-1 inhibitors is located on day 6.3 after administration.

[0087] Step 5: Coupling and Modulation of Tumor Pathological State and Temporal Risk: Construct a coupling and modulation layer for pathological state and temporal risk to simulate the nonlinear modulation effect of the pathophysiological state of hypercoagulable state and immune dysfunction in tumor patients on the temporal risk of medication. For example, hypercoagulable state will amplify the short-term nephrotoxicity risk of platinum-based chemotherapy drugs, realize the deep coupling of pathological features and temporal features, and output the global temporal risk feature vector.

[0088] Step 5.1: Extraction and quantification of tumor pathological features: Extract core pathological features from the tumor pathological specific risk factors in Step 2, including coagulation function indicators, immune function indicators and tumor stage, as coupled pathological modulation factors, such as D-dimer, fibrinogen and lymphocyte count. Normalize and vectorize these features again to form a pathological feature vector.

[0089] Using a fully connected neural network and a hyperbolic tangent activation function, pathological-specific risk factors are input into a single-layer fully connected neural network, which outputs a 64-dimensional tumor pathological state feature vector. The vector's value ranges from -1 to 1, with negative values ​​indicating a pathological state close to normal and positive values ​​indicating an abnormal pathological state. For example, the higher the D-dimer level, the larger the vector value.

[0090] After processing, a 64-dimensional tumor pathological state feature vector is obtained, with the dimension being the number of samples × 64.

[0091] Step 5.2: Construction of the pathological and temporal risk coupling modulation layer: Through the multiplicative modulation mechanism, the tumor pathological state feature vector is used as the modulation coefficient and multiplied element-wise with the high-risk temporal feature vector to realize the nonlinear modulation of the pathological state on the temporal risk. When the pathological state is abnormal, the temporal risk of the corresponding time scale is amplified, and when the pathological state is normal, the temporal risk is weakened.

[0092] First, the 64-dimensional tumor pathological state feature vector is upscaled to 448 dimensions using a fully connected neural network, matching the dimension of the high-risk temporal feature vector, resulting in an upscaled pathological modulation vector. Then, element-wise multiplication is performed between the upscaled pathological modulation vector and the high-risk temporal feature vector, amplifying temporal risk when pathologically abnormal and weakening risk when normal, yielding a pathologically modulated temporal feature vector that reflects the modulating effect of pathological state on temporal risk. Finally, a residual connection is added, summing the original high-risk temporal feature vector with the modulated temporal feature vector to avoid the gradient vanishing problem in deep network training, resulting in a residual modulated temporal feature vector with a dimension of sample size × 448.

[0093] Step 5.3: Generation of global temporal feature vector after coupling modulation: Perform feature dimensionality reduction and standardization on the residual modulation temporal feature vector to obtain a low-dimensional and highly discriminative global temporal risk feature vector, thereby reducing the input dimension of the deep residual network risk prediction model and reducing the computational complexity and overfitting risk of the model.

[0094] Principal component analysis (PCA) was used to reduce the dimensionality of the residual modulation time-series feature vector from 448 dimensions to 128 dimensions, retaining more than 95% of the feature variance information. Then, the dimensionality-reduced feature vector was normalized using the L2 norm to ensure that the vector magnitude was 1. The result was a 128-dimensional coupled modulation global time-series risk feature vector with a dimension of the number of samples × 128.

[0095] Step 6: Multi-feature fusion and risk prediction model training and validation: Cross-feature fusion of global temporal risk features and static basic risk factors of tumor patients is carried out to construct a deep residual network risk prediction model. Model training, hyperparameter optimization and performance validation are completed to obtain a deep residual network risk prediction model that is finally trained and meets the performance standards and can be used clinically.

[0096] Step 6.1: Vectorization of static baseline risk features: Extract the encoded and normalized traditional clinical baseline features from the static baseline risk factors in Step 2, and perform feature extraction and dimension unification through a fully connected neural network to obtain a static feature vector that matches the dimension of the global time-series risk features.

[0097] A two-layer fully connected neural network is used, with each layer containing a linear rectified unit activation function and a batch normalization layer. The input is a static basic risk factor, and the output is a 128-dimensional static basic risk feature vector. After processing, a 128-dimensional static basic risk feature vector is obtained, with the dimension being the number of samples × 128.

[0098] Step 6.2: Cross-feature splicing, fusion and standardization: The global time-series risk feature vector and the static basic risk feature vector are spliced ​​along the channel dimension to achieve deep fusion of time-series and static features. Then, standardization is performed to ensure the consistency of the distribution of the fused features.

[0099] First, a feature concatenation operation is performed, concatenating the 128-dimensional global time-series risk feature vector with the 128-dimensional static basic risk feature vector in the channel dimension to obtain a 256-dimensional fused feature vector. Then, the fused feature vector is batch normalized to eliminate distribution differences caused by different feature sources. After processing, a 256-dimensional standardized fused feature vector is obtained, with the dimension being the number of samples × 256.

[0100] Step 6.3: Building the structure of the deep residual risk prediction model: Based on the standardized fusion feature vector, a deep residual network risk prediction model is built. The model structure supports binary classification prediction and multi-class classification prediction.

[0101] The deep residual network risk prediction model adopts the ResNet18 architecture, which includes an input layer, a feature extraction layer, four residual blocks, a global average pooling layer, and an output layer. The input layer receives a 256-dimensional fused feature vector, and the feature extraction layer is a fully connected neural network that maps the 256 dimensions to 512 dimensions. Each residual block contains...

[0102] It contains two fully connected neural networks and residual connections to extract deep nonlinear features. A global average pooling layer maps the features to 256 dimensions. The output layer includes a binary classification output branch and a multi-class output branch. The binary classification output branch is a single-layer fully connected neural network with a sigmoid activation function, which outputs the probability of adverse reactions to iodine contrast agents. The multi-class output branch is a single-layer fully connected neural network with a softmax activation function, which outputs the probability distribution of mild, moderate and severe adverse reactions to iodine contrast agents.

[0103] After processing, the complete network structure of the deep residual network risk prediction model is obtained, which can be implemented using the PyTorch or TensorFlow deep learning framework.

[0104] Step 6.4: Model Training and Hyperparameter Optimization: The dataset consisting of standardized fused feature vectors, i.e., the standardized fused feature dataset, is divided into training, validation, and test sets in a 7:1:2 ratio. Supervised training is performed on the deep residual network risk prediction model, and hyperparameter optimization is performed through the validation set to ensure the model's generalization ability and avoid overfitting.

[0105] A deep residual network risk prediction model was trained using the Adam optimizer, with an initial learning rate of 0.001 and a weight decay factor of 10. -5The loss function uses the binary cross-entropy loss function for binary classification tasks and the multi-class cross-entropy loss function for multi-class classification tasks. Regularization employs the Dropout algorithm with an initial Dropout rate of 0.3, combined with L2 regularization to prevent overfitting. Hyperparameter optimization uses a grid search algorithm to optimize key hyperparameters such as the learning rate, Dropout rate, and batch size of the deep residual network risk prediction model. The processed results include the loss and accuracy curves during model training, the optimal hyperparameter combination, and the model parameter file during training.

[0106] Step 6.5: Model Performance Validation and Evaluation: Input the test set into the trained deep residual network risk prediction model to validate the model performance. Use clinically applicable evaluation metrics instead of simply the accuracy rate to ensure the clinical applicability of the model.

[0107] The evaluation metrics for the deep residual network risk prediction model are calculated. The core evaluation metrics include binary, multi-class, and clinical metrics. Binary metrics include the area under the receiver operating characteristic (ROC) curve, sensitivity, specificity, precision, and F1 score. Multi-class metrics include the ROC curve area under the multi-class ROC curve, confusion matrix, and Kappa coefficient. Clinical metrics include the high-risk patient identification rate, with a identification sensitivity ≥85% as the clinical qualification standard.

[0108] After processing, a performance evaluation report of the deep residual network risk prediction model is obtained, including the numerical values, graphs, and confusion matrix of all indicators. The final output is a trained and qualified deep residual network risk prediction model, which is saved as a model file, such as dot pth or dot h5 format, and can be directly used for clinical inference.

[0109] It should be noted that there are many types of clinical prediction models for common diseases. In order to determine which model is more suitable for the early prediction of the risk of adverse reactions to iodine contrast agents in cancer patients, multi-model comparison and validation can be carried out, and three types of comparative models can be constructed for systematic evaluation:

[0110] Traditional statistical model: A multivariate logistic regression model is constructed based on static basic risk factors and tumor pathology-specific risk factors. Medication information is simplified to whether a binary variable was used within 7 days before the examination.

[0111] Conventional machine learning model: Based on the random forest algorithm, the input features include statistical summary features of static basic risk factors, tumor pathology-specific risk factors and dynamic drug use time-series risk factors, such as the number of drug types and total dosage, but do not retain the original time-series structure;

[0112] The deep residual network model of this invention consists of a complete input global temporal risk feature vector and a static basic risk feature vector.

[0113] Under the same 7:1:2 sample partitioning strategy, the performance of the three models was compared on the test set. The core evaluation indicators included the area under the receiver operating characteristic (ROC) curve, the sensitivity of high-risk patient identification, and the calibration accuracy. The results showed that the Logistic regression model, unable to handle time-series data, had a sensitivity of only 58.3% for identifying the delayed onset risk of immunotherapy drugs; the Random Forest model, although incorporating medication statistics, lost its temporal structure, resulting in a sensitivity of 72.1% for identifying short-term risks of platinum-based chemotherapy drugs; the deep residual network model of this invention, through multi-scale temporal feature extraction and pathological-temporal coupling modulation, achieved a high-risk patient identification sensitivity of 89.6%, and its calibration curve closely approximated the ideal diagonal, demonstrating its significant methodological advantages in predicting the risk of adverse reactions to iodine contrast agents in cancer patients, making it the preferred prediction tool in clinical practice.

[0114] Step 7: Risk Prediction and Interpretable Clinical Decision Support: Input the data of the tumor patients to be predicted into the trained and qualified deep residual network risk prediction model to predict the risk of adverse reactions to iodine contrast agents in tumor patients. At the same time, based on the time dimension attention weight distribution in Step 4 and the feature importance of the deep residual network risk prediction model, output interpretable risk attribution results, and combine them with clinical guidelines to generate personalized clinical decision recommendations, thus realizing a closed loop from risk prediction to clinical intervention.

[0115] Step 7.1: Standardized preprocessing of patient data to be predicted: For the tumor patients to be predicted, their traditional clinical features, tumor pathological features, and medication timing features are collected and processed according to the process of Steps 1 to 3, including data collection, cleaning, imputation, encoding, normalization, and drug embedding, to obtain the standardized fusion feature vector of the patients to be predicted.

[0116] Step 7.2: Model Inference and Risk Score Generation: Input the standardized fusion feature vector of the patient to be predicted into the trained and qualified deep residual network risk prediction model, execute the model forward inference algorithm to obtain the risk probability of adverse reactions to iodine contrast agent, classify the risk level according to the clinical threshold, and output the adverse reaction risk score.

[0117] The binary classification reasoning outputs the probability of adverse reactions, with the probability value located in a closed interval between 0 and 1. Clinical thresholds are set: probability < 0.2 is low risk, 0.2 ≤ probability ≤ 0.5 is medium risk, and probability > 0.5 is high risk. The multi-class classification reasoning outputs the probability distribution of mild, moderate, and severe adverse reactions.

[0118] The final output is a patient-specific iodine contrast agent adverse reaction risk score and risk level.

[0119] Step 7.3: Explainable Risk Attribution Analysis: Based on the time-dimensional attention weight distribution and the SHAPley additive explanatory value of the deep residual network risk prediction model in Step 4, a two-dimensional risk attribution analysis is conducted to identify the core factors leading to high patient risk and enhance clinicians' trust in the model.

[0120] The attention weighting visualization algorithm is used to plot the time window curve of the patient's medication risk, and the peak risk time point is marked, such as day 6.3 after PD-1 inhibitor administration and high-risk drug categories. The SHAP value calculation algorithm is used to calculate the SHAP value of each feature, quantify the contribution of the feature to the risk prediction result, and output the ranking of core risk features, such as high D-dimer, PD-1 inhibitor use and low estimated glomerular filtration rate as the top three core risks.

[0121] The processed data yields an interpretable risk attribution report, which includes a risk time window curve, core risk drugs, ranking of core risk characteristics, and a risk attribution visualization for clinicians to view intuitively.

[0122] Step 7.4: Generation of Personalized Clinical Decision Recommendations: Combining risk level and interpretability of risk attribution reports, and following the clinical application guidelines for iodine contrast agents, generate personalized clinical intervention recommendations for patients to be predicted, ensuring the clinical operability of the recommendations. The recommendations are categorized as follows:

[0123] The timing of examinations may be adjusted; for example, high-risk patients are advised to postpone CT scans until 14 days after immunotherapy administration.

[0124] Contrast agent selection, such as using a hypotonic iodine contrast agent;

[0125] Preventive medication, such as preoperative administration of glucocorticoids;

[0126] Discontinue or change medication, such as suspending platinum-based chemotherapy drugs and waiting for kidney function to recover before conducting further examinations.

[0127] After processing, a personalized clinical decision-making report for predicting adverse reactions to iodine contrast agents is obtained for each patient, including risk level, core risk factors, and specific intervention recommendations. This result is directly provided to clinicians to guide decisions on the use of iodine contrast agents in CT contrast-enhanced examinations, enabling proactive risk control.

[0128] Step 8: Clinical Iterative Optimization of the Model: Based on the clinical application feedback data of the deep residual network risk prediction model, the model is continuously iteratively optimized, the dataset is updated and the model is retrained to improve the model's generalization ability under different tumor subtypes and novel anti-tumor drugs, such as antibody-drug conjugates, and to ensure the long-term clinical applicability of the model.

[0129] Step 8.1: Standardized Collection of Clinical Feedback Data: During the clinical application of the deep residual network risk prediction model, real-world feedback data is collected, including the actual occurrence of adverse reactions in patients to be predicted, intervention measures by clinicians, and medication records and risk data of novel anti-tumor drugs. All data is collected in a standardized manner according to the standards of Step 1 to ensure consistency with the original dataset. After processing, the clinical application feedback dataset of the deep residual network risk prediction model is obtained, which includes feature data, actual labels, intervention measures, and novel drug data.

[0130] Step 8.2: Update and re-preprocess the original dataset: Merge the clinical feedback dataset with the original training dataset to obtain the updated extended dataset, and perform re-preprocessing according to all the preprocessing procedures in Step 2, namely cleaning, imputation, encoding and normalization, to ensure data standardization; after processing, the updated standardized extended feature dataset is obtained, which includes real-world feedback data and novel drug data.

[0131] Step 8.3: Model Retraining and Version Iteration: Input the updated extended feature dataset into the original model structure of the deep residual network risk prediction model, and retrain the deep residual network risk prediction model according to the process of steps 3 to 6 to optimize the model parameters. At the same time, for novel anti-tumor drugs, supplement their pharmacological properties and update the drug basic embedding vector and pharmacologically aware drug embedding vector set to ensure that the model can adapt to the risk prediction of novel drugs. After processing, the iteratively optimized deep residual network risk prediction model is obtained, that is, the new version model, as well as the model version update report, which includes the dataset update status, model performance improvement indicators, and novel drug adaptation status.

[0132] The specific parameters to be optimized include: the parameters of the pharmacologically aware drug embedding vector set fine-tuned in step 3, the parameters of the multi-scale convolutional kernel weights and gated fully connected layers in step 4, the fully connected weights of the pathological state coupling modulation layer in step 5, and all layer parameters of the deep residual network risk prediction model in step 6.

[0133] Step 8.4: Continuous monitoring of the model's clinical performance: Establish a clinical performance monitoring system for the deep residual network risk prediction model, and monitor the model's core indicators such as prediction accuracy, sensitivity, and specificity in real time. When any indicator decreases by ≥10% from the baseline, the model retraining process is triggered to ensure that the model's clinical performance is always at a qualified level. After processing, a model clinical performance monitoring report is obtained and generated periodically, including the trend of indicator changes and whether retraining has been triggered. This result guides the iterative optimization rhythm of the model to ensure the long-term effectiveness of the model. When retraining is triggered, the process will return to step 8.2 to restart the dataset update, re-preprocessing, and model retraining process.

[0134] Taking a non-small cell lung cancer patient undergoing contrast-enhanced CT examination as an example, this invention first constructs a fine-grained time-series dataset covering 30 days before to 7 days after iodine contrast agent injection, using the occurrence of adverse reactions within 72 hours as the gold standard for annotation, thus laying the data foundation for risk prediction specific to cancer patients. Then, through anomaly removal, imputation, encoding, and normalization, a specific risk factor system is constructed, including static basic risk factors, tumor pathology-specific risk factors, and dynamic time-series risk factors. Based on this, the invention uniquely encodes pharmacological attributes such as drug action mechanism, iodine contrast agent-related risk types, and half-life, concatenates them with the basic embedding vector for initialization, and uses the occurrence of adverse reactions as a supervisory signal for task-driven micro-management. The algorithm obtains pharmacologically-aware drug embedding vectors that combine pharmacological prior knowledge with risk prediction semantics, fundamentally solving the problem of lack of clinical interpretability in purely data-driven embeddings. Subsequently, the convolutional kernel sizes of 3, 7, and 14 are precisely bound to the clinically specific risk cycles of platinum-based chemotherapy drugs (1-3 days), targeted drugs (3-7 days), and immunotherapy drugs (7-21 days). Three sets of parallel one-dimensional convolutional networks are used to capture multi-scale risk features, and gating weights are dynamically generated based on drug category features to achieve adaptive scale fusion. This allows the model to automatically match a risk time window of a drug class at a certain scale without grid search. Combined with the additive attention mechanism, continuous risk peak time points such as day 6.3 after PD-1 inhibitor administration are output, improving the risk localization accuracy from discrete intervals to continuous time points.

[0135] Furthermore, tumor pathological state feature vectors are extracted from coagulation and immune function indicators such as D-dimer and lymphocyte count. These vectors are then used as nonlinear modulation coefficients and multiplied element-wise with high-risk temporal feature vectors via a multiplicative modulation mechanism. Residual connections are introduced to preserve the original temporal information, accurately simulating the amplification effect of hypercoagulable states on the short-term nephrotoxicity risk of platinum-based chemotherapy drugs. This overcomes the limitations of traditional models that merely treat pathological indicators as linear factors, deeply coupling risk prediction with the unique pathophysiological interaction mechanisms of cancer patients. Finally, the global temporal risk features and static baseline risk features are fused to train a deep residual network. An interpretable risk attribution report is generated by combining attention weight distribution and SHAP value, and the attention weight distribution is integrated with the SHAP value. Peak values ​​are directly translated into personalized clinical decision-making instructions, such as recommending that CT scans be postponed until 14 days after immunotherapy administration, forming a complete closed loop from risk prediction and explainable attribution to proactive intervention. At the same time, the model is continuously iterated through real-world clinical feedback data, which can quickly supplement pharmacological properties and update embedding vectors for novel anti-tumor drugs such as antibody-drug conjugates. When the core indicators decrease by more than 10%, retraining is automatically triggered. This systematically solves two major problems: the inability of fixed time windows to adapt to drug-specific risk cycles and the prediction distortion caused by the linear superposition of pathological states and temporal risks. It provides a technical solution with significant clinical advancements and industrial application value for the precise and safe management of enhanced CT scans for cancer patients.

[0136] Example 2:

[0137] Based on Example 1, this example also provides a risk prediction system for adverse reactions to iodine contrast agents in cancer patients, including: a dataset construction module, used to collect multidimensional clinical data of malignant tumor patients who are to undergo CT contrast-enhanced examination and perform standardized annotation to construct a structured raw dataset;

[0138] The risk factor construction module is used to preprocess the original dataset and construct a feature set of risk factors specific to cancer patients, which includes static basic risk factors, tumor pathology-specific risk factors, and dynamic medication time-series risk factors.

[0139] The drug embedding module is used to enhance pharmacological knowledge and perform supervised fine-tuning of drug embedding features in dynamic medication time-series risk factors by labeling and structuring drug pharmacological attributes, and to obtain a pharmacologically-aware drug embedding vector set.

[0140] The temporal feature extraction module is used to reconstruct the medication time sequence based on the pharmacologically aware drug embedding vector set. It extracts risk features at different time scales through multi-scale parallel convolution, locates the risk time window through scale gating fusion guided by drug category and attention mechanism, and obtains high-risk temporal feature vectors.

[0141] The risk coupling modulation module is used to extract tumor pathological state features from tumor pathology-specific risk factors, and couple and modulate them with the high-risk temporal feature vector through a multiplication modulation mechanism to obtain a global temporal risk feature vector.

[0142] The model training module is used to fuse the global time-series risk feature vector with the static basic risk factor to construct and train the deep residual network risk prediction model, thereby obtaining the trained prediction model.

[0143] The risk prediction and decision support module is used to input patient data to be predicted into the prediction model for risk inference, combine attention weight distribution and feature importance to perform interpretable risk attribution, and generate personalized clinical decision suggestions.

[0144] The model optimization module is used to iteratively optimize the prediction model and the pharmacologically sensed drug embedding vector set based on clinical feedback data.

[0145] Furthermore, the dataset construction module collects traditional clinical baseline features, tumor-specific pathological features, and fine-grained medication time-series features, and defines the time window for collecting medication time-series data, outputting a structured raw dataset;

[0146] The risk factor construction module performs outlier removal, missing value imputation, feature encoding and normalization on the original dataset, and outputs a risk factor feature set specific to cancer patients, including static basic risk factors, tumor pathology-specific risk factors and dynamic medication time-series risk factors.

[0147] The drug embedding module receives dynamic medication time-series risk factors, extracts the core pharmacological attributes of drugs from the pharmacology database and performs numerical conversion and splicing, fine-tunes the embedding vector using adverse reaction occurrence signals, and outputs the fine-tuned pharmacologically perceived drug embedding vector set.

[0148] The temporal feature extraction module receives the dosage and time interval features between medication and examination from the dynamic medication temporal risk factor. It combines the pharmacologically sensed drug embedding vector set to reconstruct a fixed-length medication temporal sequence. It uses parallel convolutional kernels to capture short, medium and long-term medication risk patterns, generates weights based on drug categories for weighted fusion, and outputs a high-risk temporal feature vector through an attention mechanism.

[0149] The risk coupling modulation module receives high-risk time-series feature vectors and tumor pathology-specific risk factors, generates pathological state feature vectors as modulation coefficients, performs element-wise multiplication and residual connection with high-risk time-series feature vectors, and outputs global time-series risk feature vectors.

[0150] The model training module concatenates and fuses the global time-series risk feature vector with the static basic risk factors to train a deep residual network and output a prediction model.

[0151] The risk prediction and decision support module outputs risk probabilities based on the prediction model, visualizes risk time windows using attention weights and calculates feature contribution, and generates attribution reports and intervention recommendations.

[0152] The model optimization module collects clinical feedback data and merges it with the original dataset. When the monitoring indicators decrease, a retraining process is triggered to update the prediction model and the pharmacologically sensed drug embedding vector set.

[0153] Working Principle: The dataset construction module collects multidimensional clinical data from patients with malignant tumors scheduled for enhanced CT scans and performs standardized annotation, outputting a structured raw dataset to the risk factor construction module. The risk factor construction module performs outlier removal, missing value imputation, feature encoding, and normalization on the raw dataset, constructing a dedicated risk factor feature set containing static basic risk factors, tumor pathology-specific risk factors, and dynamic medication time-series risk factors. The dynamic medication time-series risk factors are then transmitted to the drug embedding module, while the static basic risk factors and tumor pathology-specific risk factors are transmitted to the model training module and risk coupling modulation module, respectively. The drug embedding module extracts four pharmacological attributes based on a pharmacological database, including drug action mechanism classification and iodine contrast agent-related risk types. After initialization by concatenating these attributes with the basic drug embedding vector, fine-tuning is performed using adverse reaction occurrence as a monitoring signal. The resulting pharmacologically-aware drug embedding vector set is output to the time-series feature extraction module. The time-series feature extraction module receives the pharmacologically-aware drug embedding vector set, normalized dosage values, and medication and examination time interval features, reconstructing a fixed-length medication time-series sequence. The system extracts short, medium, and long-term risk features using three sets of parallel convolutional kernels. After weighted fusion via a drug category-guided scale-gating mechanism, it locates the risk time window through an attention mechanism and outputs a high-risk temporal feature vector to the risk coupling modulation module. The risk coupling modulation module receives the high-risk temporal feature vector and coagulation and immune function indicators from tumor pathology-specific risk factors, generates a pathological state feature vector as modulation coefficients, performs element-wise multiplication, and introduces residual connections to output a global temporal risk feature vector to the model training module. The model training module concatenates and fuses the global temporal risk feature vector with static basic risk factors to train a deep residual network to obtain a prediction model, which is then transmitted to the risk prediction and decision support module. The risk prediction and decision support module receives patient data to be predicted and the prediction model, and outputs a risk score, a visualized risk time window curve, and personalized clinical decision suggestions. The model optimization module collects clinical feedback data, and when performance monitoring indicators decline, it triggers a dataset update and model retraining process, synchronously updating the pharmacologically-aware drug embedding vector set and prediction model parameters to form a closed-loop optimization system.

[0154] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0155] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0156] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for predicting the risk of adverse reactions to iodine contrast agents in cancer patients, characterized by: Includes the following steps: Multidimensional clinical data of patients with malignant tumors who are scheduled to undergo enhanced CT examination were collected and standardized to obtain the raw dataset; The original dataset was preprocessed to construct a cancer patient-specific risk factor feature set containing static basic risk factors, tumor pathology-specific risk factors, and dynamic medication time-series risk factors. By annotating and structuring drug pharmacological attributes, the drug embedding features in dynamic medication time-series risk factors are enhanced with pharmacological knowledge and subjected to supervised fine-tuning to obtain a fine-tuned set of pharmacologically-aware drug embedding vectors. Based on pharmacology-aware drug embedding vector sets, the drug use time sequence is reconstructed. Risk features at different time scales are extracted through multi-scale parallel convolution. Risk time windows are located through drug category-guided scale gating fusion and attention mechanism to obtain high-risk time sequence feature vectors. Tumor pathological state features are extracted from tumor pathology-specific risk factors and coupled with high-risk temporal feature vectors through a multiplication modulation mechanism to obtain a global temporal risk feature vector. The tumor pathological state features are generated based on coagulation function indicators, immune function indicators, and tumor stage through nonlinear mapping of a fully connected neural network. The coupling modulation via multiplication modulation mechanism with high-risk time-series feature vectors includes: mapping tumor pathological state features to a tumor pathological state feature vector with a numerical range of -1 to 1 using a fully connected neural network and a hyperbolic tangent activation function; then upscaling the fully connected network to a pathological modulation vector with the same dimension as the high-risk time-series feature vector; performing element-wise multiplication between the pathological modulation vector and the high-risk time-series feature vector; adding the result of the element-wise multiplication to the original high-risk time-series feature vector; then performing dimensionality reduction via principal component analysis and L2 norm normalization to obtain a global time-series risk feature vector. By fusing the global time-series risk feature vector with static basic risk factors, a deep residual network risk prediction model is constructed and trained to obtain the trained prediction model. The patient data to be predicted is input into the prediction model for risk inference, and interpretable risk attribution is performed by combining attention weight distribution and feature importance to generate personalized clinical decision-making suggestions. The prediction model and the pharmacologically-aware drug embedding vector set are iteratively optimized based on clinical feedback data.

2. The method for predicting the risk of adverse reactions to iodine contrast agents in cancer patients according to claim 1, characterized in that: The multidimensional clinical data includes traditional clinical baseline characteristics, tumor-specific pathological characteristics, and fine-grained drug administration time-series characteristics. The time window for collecting drug administration time-series data is from 30 days before the injection of iodine contrast agent to 7 days after the injection, covering the acute risk period, subacute risk period, and delayed risk period of tumor drugs. The standardized labeling uses the occurrence of adverse reactions within 72 hours after iodine contrast agent injection as the gold standard, and labels the adverse reactions with binary classification labels and adverse reaction severity classification labels. The collected multidimensional clinical data is first structured and integrated according to the patient's unique identifier before labeling.

3. The method for predicting the risk of adverse reactions to iodine contrast agents in cancer patients according to claim 1, characterized in that: The preprocessing of the original dataset includes outlier detection and removal, missing value imputation, feature encoding, and normalization. In outlier detection, box plots are used for numerical features, and clinical logic verification is used for timestamp features. In missing value imputation, K-nearest neighbor imputation is used for numerical features, and mode imputation is used for categorical features. Features with a missing data rate greater than 30% are removed without imputation. In feature encoding, one-hot encoding is used for binary classification features and low cardinality multi-class features, while embedding encoding is used for high cardinality drug name features, which are mapped to drug basic embedding vectors; for normalization processing, minimum-maximum normalization is used for numerical features.

4. The method for predicting the risk of adverse reactions to iodine contrast agents in cancer patients according to claim 3, characterized in that: The drug pharmacological properties include classification of drug action mechanism, types of risks associated with iodine contrast agents, classification of half-life, and therapeutic classification of the anatomical therapeutic chemoclassification system. The pharmacological knowledge enhancement and supervised fine-tuning includes: encoding the drug's pharmacological attributes one-hot and concatenating them with the drug's basic embedding vector, then normalizing them using the L2 norm to initialize the embedding vector and obtain the pharmacologically-aware drug embedding vector. Using the occurrence of adverse reactions to iodine contrast agents as a supervisory signal, the parameters of the pharmacologically-aware drug embedding vector are updated through backpropagation using a single-layer fully connected neural network with binary cross-entropy loss as the optimization objective and stochastic gradient descent algorithm as the optimizer.

5. The method for predicting the risk of adverse reactions to iodine contrast agents in cancer patients according to claim 1, characterized in that: The reconstructed medication time sequence includes: taking the iodine contrast agent injection time as the time origin, sorting the medication records of each patient in chronological order, and concatenating the fine-tuned pharmacologically sensed drug embedding vector, the normalized value of the dosage in the dynamic medication time sequence risk factor, and the normalized value of the time interval between medication and examination to form the time sequence feature vector of each medication event. After sequence filling and truncation, a fixed-length medication time sequence feature matrix is ​​obtained, and the fixed length is taken as the 95th percentile of the sequence length of all patients. Multi-scale parallel convolution includes three sets of parallel one-dimensional temporal convolution kernels, corresponding to the short-cycle risk of platinum-based chemotherapy drugs, the medium-cycle risk of targeted drugs, and the long-cycle risk of immunotherapy drugs, respectively, and outputs small-scale temporal feature maps, medium-scale temporal feature maps, and large-scale temporal feature maps. The drug category-guided scale-gated fusion includes: based on the core drug category features of immunotherapy drugs, platinum-based chemotherapy drugs, and targeted drugs in the drug use time sequence, a three-dimensional normalized weight vector is generated through a single-layer fully connected neural network, and the small-scale time sequence feature map, the medium-scale time sequence feature map, and the large-scale time sequence feature map are fused by channel dimension weighting to obtain the fused time sequence feature map; The attention mechanism generates normalized attention weights in the time dimension through additive attention and sums them on the fused temporal feature map to output a high-risk temporal feature vector. The normalized attention weights are visualized as risk time window curves and the peak time points of continuous risks are marked.

6. The method for predicting the risk of adverse reactions to iodine contrast agents in cancer patients according to claim 1, characterized in that: The process of fusing the global time-series risk feature vector with the static basic risk factor includes: extracting the static basic risk feature vector from the static basic risk factor through a two-layer fully connected neural network, concatenating it with the global time-series risk feature vector, and then performing batch normalization processing to obtain a standardized fused feature vector; The deep residual network risk prediction model adopts the ResNet18 architecture, which contains four residual blocks. The input is a standardized fusion feature vector. The output layer is set with parallel binary and tri-class output branches to output the probability of adverse reactions to iodine contrast agents and the probability distribution of mild, moderate and severe adverse reactions, respectively. The model training divides the standardized fusion feature vector dataset into training, validation and test sets in a ratio of 7:1:

2. The Adam optimizer is used to optimize the learning rate, dropout rate and batch size through grid search.

7. The method for predicting the risk of adverse reactions to iodine contrast agents in cancer patients according to claim 1, characterized in that: The risk reasoning is divided into three risk levels: low, medium, and high, based on the probability of adverse reactions occurring. The interpretable risk attribution includes: plotting a medication risk time window curve and marking the peak risk time point based on the attention weight distribution in the time dimension; combining the contribution of the SHAPley additive explanatory value to the risk prediction results and outputting the ranking of core risk features. The iterative optimization includes: collecting real-world feedback data during clinical application, establishing a clinical performance monitoring system to monitor the core indicators of the model in real time, and when any core indicator drops below the baseline by more than a threshold, merging the feedback data with the original training data and re-performing preprocessing, retraining the prediction model, supplementing pharmacological properties for novel anti-tumor drugs and updating the pharmacologically-aware drug embedding vector set.

8. A risk prediction system for adverse reactions to iodine contrast agents in cancer patients, characterized by: include: The dataset construction module is used to collect multidimensional clinical data of malignant tumor patients who are scheduled to undergo enhanced CT examinations and to standardize and annotate the data to construct a structured raw dataset. The risk factor construction module is used to preprocess the original dataset and construct a feature set of risk factors specific to cancer patients, which includes static basic risk factors, tumor pathology-specific risk factors, and dynamic medication time-series risk factors. The drug embedding module is used to enhance pharmacological knowledge and perform supervised fine-tuning of drug embedding features in dynamic medication time-series risk factors by labeling and structuring drug pharmacological attributes, and to obtain a pharmacologically-aware drug embedding vector set. The temporal feature extraction module is used to reconstruct the medication time sequence based on the pharmacologically aware drug embedding vector set. It extracts risk features at different time scales through multi-scale parallel convolution, locates the risk time window through scale gating fusion guided by drug category and attention mechanism, and obtains high-risk temporal feature vectors. The risk coupling modulation module is used to extract tumor pathological state features from tumor pathology-specific risk factors, and couple and modulate them with high-risk temporal feature vectors through a multiplicative modulation mechanism to obtain a global temporal risk feature vector; the tumor pathological state features are generated based on coagulation function indicators, immune function indicators and tumor stage through nonlinear mapping of a fully connected neural network. The coupling modulation via multiplication modulation mechanism with high-risk time-series feature vectors includes: mapping tumor pathological state features to a tumor pathological state feature vector with a numerical range of -1 to 1 using a fully connected neural network and a hyperbolic tangent activation function; then upscaling the fully connected network to a pathological modulation vector with the same dimension as the high-risk time-series feature vector; performing element-wise multiplication between the pathological modulation vector and the high-risk time-series feature vector; adding the result of the element-wise multiplication to the original high-risk time-series feature vector; then performing dimensionality reduction via principal component analysis and L2 norm normalization to obtain a global time-series risk feature vector. The model training module is used to fuse the global time-series risk feature vector with the static basic risk factor to construct and train the deep residual network risk prediction model, thereby obtaining the trained prediction model. The risk prediction and decision support module is used to input patient data to be predicted into the prediction model for risk inference, combine attention weight distribution and feature importance to perform interpretable risk attribution, and generate personalized clinical decision suggestions. The model optimization module is used to iteratively optimize the prediction model and the pharmacologically sensed drug embedding vector set based on clinical feedback data.

9. The risk prediction system for adverse reactions to iodine contrast agents in cancer patients according to claim 8, characterized in that: The dataset construction module collects traditional clinical baseline features, tumor-specific pathological features, and fine-grained medication time-series features, defines the time window for medication time-series data collection, and outputs a structured raw dataset. The risk factor construction module performs outlier removal, missing value imputation, feature encoding and normalization on the original dataset, and outputs a risk factor feature set specific to cancer patients, including static basic risk factors, tumor pathology-specific risk factors and dynamic medication time-series risk factors. The drug embedding module receives dynamic medication time-series risk factors, extracts the core pharmacological attributes of drugs from the pharmacology database and performs numerical conversion and splicing, fine-tunes the embedding vector using adverse reaction occurrence signals, and outputs the fine-tuned pharmacologically perceived drug embedding vector set. The temporal feature extraction module receives the dosage and time interval features between medication and examination from the dynamic medication temporal risk factor. It combines the pharmacologically sensed drug embedding vector set to reconstruct a fixed-length medication temporal sequence. It uses parallel convolutional kernels to capture short, medium and long-term medication risk patterns, generates weights based on drug categories for weighted fusion, and outputs a high-risk temporal feature vector through an attention mechanism. The risk coupling modulation module receives high-risk time-series feature vectors and tumor pathology-specific risk factors, generates pathological state feature vectors as modulation coefficients, performs element-wise multiplication and residual connection with high-risk time-series feature vectors, and outputs global time-series risk feature vectors. The model training module concatenates and fuses the global time-series risk feature vector with the static basic risk factors to train a deep residual network and output a prediction model. The risk prediction and decision support module outputs risk probabilities based on the prediction model, visualizes risk time windows using attention weights and calculates feature contribution, and generates attribution reports and intervention recommendations. The model optimization module collects clinical feedback data and merges it with the original dataset. When the monitored indicators drop below the threshold, a retraining process is triggered to update the prediction model and the pharmacologically sensed drug embedding vector set.