Drug compatibility safety early warning information pushing processing method and system
By constructing drug feature vectors and aligning them with patients' physiological indicators to solve individualized risk coefficients, the causal relationship of drug interactions is identified. This solves the problem of insufficient consideration of individual differences in drug compatibility safety early warning in existing technologies, and realizes personalized risk assessment and efficient early warning information distribution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- THE FIRST MEDICAL CENT CHINESE PLA GENERAL HOSPITAL
- Filing Date
- 2026-03-13
- Publication Date
- 2026-06-12
AI Technical Summary
Existing technologies lack consideration for individual patient differences in drug compatibility safety early warning, and cannot effectively assess the potential chronic toxicity or complex causal chain reactions that may occur when multiple drugs are used in combination. This results in warning information that may be too broad and lacks effective assessment and prediction methods.
By collecting patients' medication records, constructing drug feature vectors and projecting them into a multimodal semantic space, aligning them with patients' physiological indicators to solve for individualized risk coefficients, identifying key interaction nodes in the risk association graph, performing causal inference modeling, calculating cumulative risk intensity, and generating personalized early warning information.
It enables personalized risk assessment of drug interactions, improves the accuracy of risk identification, reduces false alarms and false negatives, and can distribute early warning information in an orderly and efficient manner, ensuring that the highest risk and most urgent early warnings are given priority.
Smart Images

Figure CN122201844A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical information technology, and in particular to a method and system for pushing and processing drug compatibility safety early warning information. Background Technology
[0002] In the field of clinical medication safety monitoring, existing technologies typically rely on static drug interaction knowledge bases for compatibility risk screening, matching patients' medication lists with predefined lists of contraindicated combinations or risk levels. Standardized alerts are generated when a known drug interaction is detected. These alerts are usually sent in conjunction with prescriptions or pharmacy dispensing, using real-time or batch processing to deliver text notifications to doctors' or pharmacists' workstations.
[0003] However, existing technologies still have problems such as a lack of consideration for individual patient differences, an inability to distinguish individual risks leading to overly broad warning information, and a focus only on immediate drug incompatibilities. They also lack effective assessment and prediction methods for the chronic toxicity or complex causal chain reactions that may occur when multiple drugs are used in combination. Summary of the Invention
[0004] This invention provides a method and system for pushing and processing drug compatibility safety early warning information, which can at least solve some of the problems existing in the prior art.
[0005] A first aspect of this invention provides a method for pushing and processing drug compatibility safety early warning information, comprising: Collect drug identification and medication time series data from patient medication records, segment the medication time series data into time windows to determine concurrent medication periods, extract the pharmacological classification attributes and metabolic pathway attributes corresponding to the drug identification and construct drug feature vectors, and determine preliminary risk markers based on the drug identifications within the concurrent medication periods and a pre-constructed action knowledge base; The drug feature vector is projected into a multimodal semantic space and aligned with pre-acquired patient physiological indicators to obtain an individualized risk coefficient. The preliminary risk label is corrected based on the individualized risk coefficient to obtain a corrected risk value. Anomaly detection is performed based on the corrected risk value to identify abnormal drug combinations and a risk association graph is constructed by combining the concurrent drug use period. Identify key interaction nodes in the risk association graph and determine the drug dependence chain by combining the metabolic pathway attributes. Perform causal inference modeling on the drug dependence chain to obtain a causal relationship graph. Solve the cumulative risk intensity and determine the risk level based on the causal relationship graph and the counterfactual inference algorithm. Determine the early warning time window based on the risk level and the concurrent drug use period. Based on the risk level and the warning time window, a warning message is generated, a push priority is calculated based on the warning time window and a push sequence is constructed, and the warning message is sent to the receiving object based on the push sequence.
[0006] In one alternative implementation, Drug identification and medication time-series data are collected from patient medication records. The medication time-series data is segmented into time windows to determine concurrent medication periods. Pharmacological classification attributes and metabolic pathway attributes corresponding to the drug identification are extracted, and a drug feature vector is constructed. Based on the drug identification within the concurrent medication periods and a pre-constructed action knowledge base, preliminary risk markers are determined, including: Drug identifiers and medication time series data are extracted from patient medication records. The medication time series data is divided into multiple time window segments by sliding window according to the time dimension. The time overlap of the drug identifiers in different time window segments is calculated. The concurrent medication period is identified based on the time overlap. The drug identifier combinations in the concurrent medication period are counted and a set of matching combinations is constructed. Based on the drug identifier query drug knowledge graph, the pharmacological classification attribute and the metabolic pathway attribute are extracted. The pharmacological classification attribute is mapped to a pre-constructed pharmacological semantic space to obtain a semantic embedding vector. The metabolic pathway attribute is subjected to path topology parsing and key metabolic nodes are extracted to construct a metabolic graph structure. The metabolic graph structure is subjected to graph convolution encoding to obtain a metabolic feature vector. The semantic embedding vector and the metabolic feature vector are concatenated and subjected to dimensionality reduction transformation to obtain a drug feature vector. The drug interactions corresponding to the combination set are retrieved from the pre-built action knowledge base. The severity of the drug interactions is classified and a time sensitivity coefficient is calculated in combination with the dosing interval during the concurrent dosing period. A preliminary risk label is obtained based on the severity classification and the time sensitivity coefficient and is associated with and stored with the corresponding drug label in the combination set.
[0007] In one alternative implementation, The drug feature vector is projected into a multimodal semantic space and aligned with pre-acquired patient physiological indicators to obtain an individualized risk coefficient. Based on the individualized risk coefficient, the preliminary risk label is corrected to obtain a corrected risk value, including: Sample data is extracted from a pre-built drug knowledge base and physiological indicator database and jointly encoded to obtain an embedding representation. A multimodal semantic space is constructed based on the embedding representation. The drug feature vector is projected onto the multimodal semantic space through linear transformation to obtain a drug semantic representation. Metabolic capacity features and pathological state features are extracted from pre-acquired patient physiological indicators and feature encoded to obtain a physiological semantic representation. The vector distance between the drug semantic representation and the physiological semantic representation in the multimodal semantic space is calculated and the semantic matching degree is obtained. Based on the semantic matching degree, the drug semantic representation and the physiological semantic representation are weighted and fused and iteratively optimized to obtain an aligned fusion representation. The aligned fusion representation is subjected to multi-level nonlinear transformation and solved to obtain the individualized risk coefficient. The risk modulation intensity is determined based on the numerical distribution of the individualized risk coefficient. Extract the basic risk value corresponding to each combination in the preliminary risk label, and adjust the basic risk value by weighting based on the risk adjustment intensity to obtain the candidate correction value. Perform threshold screening on the candidate correction value and identify high-risk combinations. Determine the candidate correction value corresponding to the high-risk combination as the corrected risk value and associate it with the corresponding combination.
[0008] In one alternative implementation, Based on the corrected risk value, anomaly detection and identification of abnormal drug combinations are performed, and a risk association diagram is constructed in conjunction with the concurrent medication periods, including: Kernel density estimation is performed on the modified risk value and a risk probability distribution surface is constructed. Low-density regions are identified in the risk probability distribution surface and the corresponding risk value boundaries are extracted to obtain an adaptive anomaly threshold. The Mahalanobis distance between the projection of the modified risk value and the risk probability distribution surface is calculated. Based on the Mahalanobis distance, abnormal combination is determined and the corresponding drug identifiers are extracted to construct an abnormal drug set. Extract the start and end times and dose change sequences of each drug identifier in the abnormal drug set from the concurrent drug use period. Perform time window sliding analysis on the start and end times of drug use and calculate the co-occurrence frequency of drug identifiers at different time granularities. Construct a spatiotemporal correlation tensor based on the co-occurrence frequency and the dose change sequence. Perform Tucker decomposition on the spatiotemporal correlation tensor to extract the core interaction pattern and reconstruct it into a time correlation matrix. Construct an initial correlation graph based on the time correlation matrix and the drug identifiers. The initial association graph is subjected to spectral clustering algorithm to identify risk communities and determine strong connection subgraphs. The importance weight of each edge in the strong connection subgraph is calculated based on graph attention mechanism and edge pruning is performed to obtain a simplified association graph. Causal topological inference is performed on the simplified association graph to identify risk causal chains and mark the risk propagation direction to obtain the risk association graph.
[0009] In one alternative implementation, Identifying key interaction nodes in the risk association graph and determining the drug dependence chain by combining the metabolic pathway attributes, and performing causal inference modeling on the drug dependence chain to obtain a causal relationship graph, including: The degree centrality and betweenness centrality of each node in the risk association graph are jointly calculated to obtain the node centrality vector. Candidate key nodes are selected based on the node centrality vector. The community contribution of the candidate key nodes is analyzed and the connectivity change after removing the candidate key nodes is calculated. Key interaction nodes are selected based on the connectivity change and the corresponding drug identifiers are extracted. Extract the metabolic enzyme information and metabolite information corresponding to the drug identifier from the metabolic pathway attributes. Construct an enzyme competition relationship matrix based on the metabolic enzyme information and identify drug combinations that share metabolic enzymes. Perform metabolic time series analysis on the drug combinations that share metabolic enzymes and calculate the metabolic dependence strength between drugs by combining the metabolite information to obtain a dependence strength matrix. Construct directed dependence edges between drugs based on the dependence strength matrix and form a drug dependence chain. The drug dependence chain is converted into a directed graph. Conditional independence tests are applied to the directed graph to identify direct and indirect causal relationships, and redundant edges are removed to obtain a preliminary causal graph. Markov equivalence class analysis is performed on the preliminary causal graph, and a unique causal graph is obtained by combining it with preset directional constraints. The causal strength of each directed edge is calculated based on the unique causal graph, and the causal action type is labeled. A causal relationship graph is constructed based on the causal action type and the causal strength.
[0010] In one alternative implementation, The cumulative risk intensity is obtained and the risk level is determined based on the causal relationship diagram and the counterfactual inference algorithm. The early warning window is then determined based on the risk level and the concurrent medication period, including: Extract the causal paths from the causal relationship graph and perform path risk accumulation calculation to obtain the path risk contribution value. Based on the path risk contribution value, solve for the initial accumulated risk value. Construct a counterfactual scenario and perform state propagation along the edge direction of the causal relationship graph under the counterfactual scenario to obtain the counterfactual state value. Based on the counterfactual state value and the preset original state value, analyze to obtain the counterfactual risk increment and combine with the initial accumulated risk value to solve for the accumulated risk intensity. Quantile statistical analysis is performed on the cumulative risk intensity to determine the risk distribution interval. A hierarchical identifier is assigned to each risk distribution interval. The cumulative risk intensity is matched with the risk distribution interval to obtain the matching result and the corresponding hierarchical identifier is extracted as the risk level. Based on the risk level, the early warning response coefficient is obtained by querying the preset response coefficient mapping relationship. Extract the time span corresponding to different drugs from the concurrent medication period, calculate the basic time-effect length based on the time span and the early warning response coefficient, obtain the time-effect adjustment factor from the preset time-effect adjustment mapping table according to the risk level, and calculate the corrected time-effect length in combination with the basic time-effect length, and determine the early warning time-effect window based on the corrected time-effect length and the current time point.
[0011] In one alternative implementation, Generating warning message content based on the risk level and the warning timeframe, calculating the push priority and constructing a push sequence based on the warning timeframe, and sending the warning message content to the receiving object based on the push sequence includes: Based on the risk level, a warning message template is selected from the preset message template library. The start and end time boundaries of the warning time window are extracted. The risk description text corresponding to the risk level and the start and end time boundaries are filled into the warning message template. The key causal path in the causal relationship graph is extracted and converted into medication risk description text. The medication risk description text is embedded into the details field of the warning message template to obtain the warning message content. The time urgency value is calculated based on the start and end time boundaries of the warning time window and the current time point. The risk weight coefficient is obtained by querying the preset level weight mapping table based on the risk level. The comprehensive priority score is calculated based on the time urgency value and the risk weight coefficient. All warnings to be pushed are sorted based on the comprehensive priority score to obtain a priority sorting list and determine the push order of each warning message content. The push order is associated with the corresponding warning message content to construct a push sequence. The warning message content is extracted sequentially from the push sequence according to the push order, and the corresponding patient identifier and medical staff identifier are queried to obtain the set of receiving object identifiers. Push channels are allocated according to the type of each receiving object identifier in the set of receiving object identifiers, and the warning message content is sent to the receiving terminal corresponding to the receiving object based on the push channel.
[0012] A second aspect of this invention provides a drug compatibility safety early warning information push and processing system, comprising: The data acquisition unit is used to collect drug identification and medication time series data from patient medication records, segment the medication time series data into time windows to determine concurrent medication periods, extract the pharmacological classification attributes and metabolic pathway attributes corresponding to the drug identification and construct a drug feature vector, and determine preliminary risk markers based on the drug identification within the concurrent medication periods and a pre-constructed action knowledge base. The risk correction unit is used to project the drug feature vector onto a multimodal semantic space and align it with pre-acquired patient physiological indicators to obtain an individualized risk coefficient. Based on the individualized risk coefficient, the initial risk label is corrected to obtain a corrected risk value. Based on the corrected risk value, abnormal detection is performed to identify abnormal combinations and a risk association graph is constructed in conjunction with the concurrent medication period. The causal inference unit is used to identify key interaction nodes in the risk association graph and determine the drug dependence chain by combining the metabolic pathway attributes, perform causal inference modeling on the drug dependence chain to obtain a causal relationship graph, solve for the cumulative risk intensity and determine the risk level based on the causal relationship graph and the counterfactual inference algorithm, and determine the early warning time window based on the risk level and the concurrent medication period. The early warning generation unit is used to generate early warning message content based on the risk level and the early warning time window, calculate the push priority and construct the push sequence based on the early warning time window, and send the early warning message content to the receiving object based on the push sequence.
[0013] A third aspect of the present invention provides an electronic device, comprising: A processor and a memory for storing processor-executable instructions, wherein the processor is configured to invoke instructions stored in the memory to perform the aforementioned method.
[0014] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0015] In this invention, by collecting drug identification and medication time-series data from patient medication records and determining concurrent medication periods based on time window segmentation, the time intervals for potential drug interactions can be accurately identified, providing an accurate temporal basis for subsequent analysis. Pharmacological classification and metabolic pathway attributes corresponding to drug identification are extracted to construct drug feature vectors. Combined with an action knowledge base, preliminary risk markers are determined, achieving preliminary risk screening based on inherent drug properties. This improves the coverage and basic accuracy of risk identification. Projecting the drug feature vectors into a multimodal semantic space and aligning them with patient physiological indicators to solve for individualized risk coefficients fully considers the impact of individual patient physiological differences on drug interaction risks. This technology enables risk assessment to transition from general judgment to personalized analysis. It corrects the initial risk labels based on individualized risk coefficients to obtain corrected risk values, significantly improving the accuracy of risk assessment and reducing false positives and false negatives. It identifies key interaction nodes in the risk association graph and determines drug dependence chains by combining metabolic pathway attributes. It deeply analyzes the intrinsic transmission pathways of multi-drug interactions. Based on the counterfactual inference algorithm, it solves the cumulative risk intensity and risk level, realizing the quantitative assessment of the causal mechanism of complex drug interactions. It can distinguish the severity of different risk levels. By calculating the push priority and constructing the push sequence, it realizes the orderly and efficient distribution of early warning information, ensuring that the highest risk and most urgent early warnings are handled first. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the drug compatibility safety early warning information push processing method according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating the drug risk timeliness calculation process of the drug compatibility safety early warning information push processing method according to an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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 skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0019] Figure 1 This is a flowchart illustrating the drug compatibility safety early warning information push processing method according to an embodiment of the present invention, as shown below. Figure 1As shown, the method includes: Collect drug identification and medication time series data from patient medication records, segment the medication time series data into time windows to determine concurrent medication periods, extract the pharmacological classification attributes and metabolic pathway attributes corresponding to the drug identification and construct drug feature vectors, and determine preliminary risk markers based on the drug identifications within the concurrent medication periods and a pre-constructed action knowledge base; The drug feature vector is projected into a multimodal semantic space and aligned with pre-acquired patient physiological indicators to obtain an individualized risk coefficient. The preliminary risk label is corrected based on the individualized risk coefficient to obtain a corrected risk value. Anomaly detection is performed based on the corrected risk value to identify abnormal drug combinations and a risk association graph is constructed by combining the concurrent drug use period. Identify key interaction nodes in the risk association graph and determine the drug dependence chain by combining the metabolic pathway attributes. Perform causal inference modeling on the drug dependence chain to obtain a causal relationship graph. Solve the cumulative risk intensity and determine the risk level based on the causal relationship graph and the counterfactual inference algorithm. Determine the early warning time window based on the risk level and the concurrent drug use period. Based on the risk level and the warning time window, a warning message is generated, a push priority is calculated based on the warning time window and a push sequence is constructed, and the warning message is sent to the receiving object based on the push sequence.
[0020] In one alternative implementation, Drug identification and medication time-series data are collected from patient medication records. The medication time-series data is segmented into time windows to determine concurrent medication periods. Pharmacological classification attributes and metabolic pathway attributes corresponding to the drug identification are extracted, and a drug feature vector is constructed. Based on the drug identification within the concurrent medication periods and a pre-constructed action knowledge base, preliminary risk markers are determined, including: Drug identifiers and medication time series data are extracted from patient medication records. The medication time series data is divided into multiple time window segments by sliding window according to the time dimension. The time overlap of the drug identifiers in different time window segments is calculated. The concurrent medication period is identified based on the time overlap. The drug identifier combinations in the concurrent medication period are counted and a set of matching combinations is constructed. Based on the drug identifier query drug knowledge graph, the pharmacological classification attribute and the metabolic pathway attribute are extracted. The pharmacological classification attribute is mapped to a pre-constructed pharmacological semantic space to obtain a semantic embedding vector. The metabolic pathway attribute is subjected to path topology parsing and key metabolic nodes are extracted to construct a metabolic graph structure. The metabolic graph structure is subjected to graph convolution encoding to obtain a metabolic feature vector. The semantic embedding vector and the metabolic feature vector are concatenated and subjected to dimensionality reduction transformation to obtain a drug feature vector. The drug interactions corresponding to the combination set are retrieved from the pre-built action knowledge base. The severity of the drug interactions is classified and a time sensitivity coefficient is calculated in combination with the dosing interval during the concurrent dosing period. A preliminary risk label is obtained based on the severity classification and the time sensitivity coefficient and is associated with and stored with the corresponding drug label in the combination set.
[0021] Patient medication records are collected from hospital information systems or electronic medical record systems, extracting drug identifiers and medication time-series data. Drug identifiers use internationally recognized ATC codes or generic drug names, and medication time-series data includes the dosing time, frequency, and duration of each drug. The medication time-series data is segmented using a sliding time window, with a window size ranging from 24 to 72 hours and a sliding step size ranging from 50% to 75% of the window size, generating multiple time window segments. For each time window segment, the existing drug identifiers are counted, and the temporal overlap of drug identifiers within different time window segments is calculated. The temporal overlap is calculated as follows: for any two drugs within a window segment, if their medication time periods overlap, the ratio of the intersection duration to the union duration of the two drug medication time periods is used as the temporal overlap of that drug pair. When the temporal overlap exceeds a preset threshold of 0.3, the corresponding time window segment is marked as a concurrent medication period. All drug identifiers existing simultaneously within the concurrent medication period are counted, and the drug identifiers are combined according to their frequency and chronological order to generate a set of compatible combinations.
[0022] Based on a pre-constructed drug knowledge graph queried using drug identifiers, pharmacological classification attributes and metabolic pathway attributes are obtained. Pharmacological classification attributes include the drug's therapeutic classification, target type, and pharmacodynamic mechanism. These attribute texts are mapped to a 512-dimensional pharmacological semantic space using a pre-trained medical semantic model, resulting in semantic embedding vectors. Metabolic pathway attributes include the metabolic enzyme systems involved in the drug, substrate competition relationships, and metabolite information. Topological parsing is performed on the metabolic pathway attributes, treating metabolic enzymes, substrates, and metabolites as nodes, and the biochemical reaction relationships between these nodes as edges, constructing a metabolic graph structure. Key metabolic nodes are identified within the metabolic graph structure, defined as nodes with a degree greater than 3 or nodes whose betweenness centrality is in the top 20%. A two-layer graph convolutional neural network is applied to encode the metabolic graph structure. The first layer uses 128 convolutional kernels, and the second layer uses 64 convolutional kernels, with the ReLU activation function, resulting in a 128-dimensional metabolic feature vector. The semantic embedding vector and metabolic feature vector are concatenated along the feature dimension to form a 640-dimensional combined vector, which is then reduced to 256 dimensions through principal component analysis to obtain the drug feature vector.
[0023] The interaction records for each drug combination in the drug combination set are retrieved from the drug interaction knowledge base. The knowledge base pre-integrates data from drug interaction databases, clinical compatibility guidelines, and adverse reaction reporting systems. Retrieved drug interactions are categorized into four levels based on clinical severity: no clinical significance, mild interaction, moderate interaction, and severe interaction, assigned values of 0.2, 0.4, 0.6, and 0.8, respectively. The actual dosing interval between the combined drugs during the concurrent dosing period is extracted, and a time sensitivity coefficient is calculated. The time sensitivity coefficient is calculated using an exponential decay function, with the formula being a function of the ratio of a negative time interval to a characteristic time constant (base of the natural constant). The characteristic time constant is determined based on the drug's half-life, typically set to 1.5 times the half-life of drugs with shorter half-lives. The severity classification value is multiplied by the time sensitivity coefficient to obtain a preliminary risk label value, ranging from 0 to 1. A mapping relationship is established between the preliminary risk label and the corresponding drug identifiers in the drug combination set, stored in an in-memory database as a hash table for subsequent rapid retrieval and correction.
[0024] In this embodiment, by dividing the drug identifiers and medication time sequence data in the patient's medication records into sliding time windows and calculating the time overlap of drug use within different time segments, accurate identification of actual concurrent medication periods is achieved. This can more accurately reflect medication scenarios where drug interactions may occur during actual treatment, improving the temporal accuracy and scenario reconstruction capability of concurrent medication identification. By querying the drug knowledge graph to extract pharmacological classification attributes and metabolic pathway attributes, and constructing pharmacological semantic embedding and metabolic graph structure features respectively, a multi-dimensional drug feature vector is formed through graph convolutional coding and feature fusion. This allows for unified modeling of the functional similarity and metabolic correlation between drugs, improving the completeness of drug feature expression and the ability to characterize correlations. By retrieving drug interactions corresponding to drug combinations from the action knowledge base and calculating the time sensitivity coefficient in combination with the medication interval within the concurrent medication period, the risk of drug interactions is graded and assessed. This ensures that risk marking not only reflects the potential harm of the drug combination itself, but also reflects the impact of different medication intervals on the degree of risk, improving the dynamism and refinement of risk assessment.
[0025] In one alternative implementation, The drug feature vector is projected into a multimodal semantic space and aligned with pre-acquired patient physiological indicators to obtain an individualized risk coefficient. Based on the individualized risk coefficient, the preliminary risk label is corrected to obtain a corrected risk value, including: Sample data is extracted from a pre-built drug knowledge base and physiological indicator database and jointly encoded to obtain an embedding representation. A multimodal semantic space is constructed based on the embedding representation. The drug feature vector is projected onto the multimodal semantic space through linear transformation to obtain a drug semantic representation. Metabolic capacity features and pathological state features are extracted from pre-acquired patient physiological indicators and feature encoded to obtain a physiological semantic representation. The vector distance between the drug semantic representation and the physiological semantic representation in the multimodal semantic space is calculated and the semantic matching degree is obtained. Based on the semantic matching degree, the drug semantic representation and the physiological semantic representation are weighted and fused and iteratively optimized to obtain an aligned fusion representation. The aligned fusion representation is subjected to multi-level nonlinear transformation and solved to obtain the individualized risk coefficient. The risk modulation intensity is determined based on the numerical distribution of the individualized risk coefficient. Extract the basic risk value corresponding to each combination in the preliminary risk label, and adjust the basic risk value by weighting based on the risk adjustment intensity to obtain the candidate correction value. Perform threshold screening on the candidate correction value and identify high-risk combinations. Determine the candidate correction value corresponding to the high-risk combination as the corrected risk value and associate it with the corresponding combination.
[0026] Sample data is extracted from a pre-built drug knowledge base and physiological indicator database. The drug knowledge base stores multidimensional attributes including drug molecular structure, target, and pharmacokinetic parameters, while the physiological indicator database covers patient characteristics such as liver and kidney function, age, weight, and basal metabolic rate. Joint encoding is performed on the extracted sample data, using a Transformer-based encoder to map drug attributes and physiological indicators to a unified 512-dimensional vector space, resulting in embedded representations. A multimodal semantic space is constructed based on these embedded representations. This space is trained using a contrastive learning method, allowing semantically similar drugs and physiological states to exhibit clustered distributions within the space.
[0027] The generated drug feature vectors are obtained and projected onto a multimodal semantic space using a linear transformation matrix. The dimension of the linear transformation matrix is set to be the product of the original dimension of the drug feature vectors and the dimension of the target semantic space. The transformation parameters are solved using the least squares method. The resulting projection yields a drug semantic representation that preserves the pharmacological properties of the drug while possessing a geometric structure aligned with physiological indicators.
[0028] Metabolic capacity features, including quantitative parameters such as liver enzyme activity indicators like alanine aminotransferase (ALT) concentration and glomerular filtration rate, are extracted from real-time physiological indicator data collected from the patient's electronic medical record system. Pathological state features are also extracted, encompassing chronic disease diagnostic codes and acute symptom descriptions. After normalization, the metabolic capacity features are input into a multilayer perceptron network. Pathological state features are standardized using a medical terminology dictionary and converted into vector form via word embedding technology. The two types of features are concatenated and processed through a feature encoding module to obtain a physiological semantic representation, the dimensionality of which is consistent with the drug semantic representation.
[0029] The Euclidean distance between the drug semantic representation and the physiological semantic representation in the multimodal semantic space is calculated. The distance value reflects the degree of fit between the drug's mechanism of action and the patient's physiological state. The distance value is converted into a semantic matching degree using a Gaussian kernel function. The matching degree value is limited to the range of 0 to 1, with the value closer to 1 indicating a higher degree of fit between the drug and the patient's physiological state.
[0030] The fusion weight coefficients are set based on semantic matching degree, and a weighted summation operation is performed on the drug semantic representation and the physiological semantic representation. Gradient descent algorithm is used for iterative optimization, with the optimization objective being to minimize the cross-entropy loss between the fused representation and the true risk label. After 15 rounds of iteration and adjustment, the loss function converges, yielding the aligned fused representation. The aligned fused representation simultaneously encodes drug interaction information and patient-specific differences.
[0031] The aforementioned aligned and fused representation is input into a three-layer fully connected neural network, with each layer having 256, 128, and 64 nodes respectively. The ReLU activation function is used to introduce nonlinear transformation capability. The last layer of the network outputs a single numerical value, which is normalized by the Sigmoid function and used as an individualized risk coefficient, ranging from 0 to 1. The risk moderating strength level is determined based on the numerical distribution of the individualized risk coefficient: a coefficient less than 0.3 corresponds to low moderating strength, 0.3 to 0.7 corresponds to medium moderating strength, and a coefficient greater than 0.7 corresponds to high moderating strength.
[0032] The baseline risk values corresponding to each drug interaction combination recorded in the preliminary risk labeling are extracted. These baseline risk values are derived from predefined drug interaction levels in the interaction knowledge base, ranging from 1 to 10. Weighting factors are determined based on the risk moderating strength: low moderating strength corresponds to a weighting factor of 0.8, medium moderating strength to 1.0, and high moderating strength to 1.3. The baseline risk values are multiplied by the weighting factors to obtain candidate correction values.
[0033] A threshold screening process is performed on candidate correction values, with a threshold of 7.5. Combinations with candidate correction values greater than or equal to the screening threshold are identified as high-risk combinations. The candidate correction values corresponding to these high-risk combinations are then designated as correction risk values, and a mapping between these correction risk values and the drug identifiers of the combinations is established in the data structure to complete the association labeling operation.
[0034] In this embodiment, by extracting sample data from the drug knowledge base and physiological indicator database and performing joint encoding, a unified multimodal semantic space is constructed. This enables drug-related information and patient physiological state information to be represented and compared on the same semantic scale, improving the semantic association ability and overall expression consistency between different types of medical data. By projecting drug feature vectors onto the multimodal semantic space and calculating the vector distance with the patient's physiological semantic representation, a quantitative analysis of the matching degree between drug characteristics and individual patient physiological conditions is achieved. This can more accurately reflect the adaptive differences of different patients to drug combinations under actual physiological conditions, improving the individualized accuracy of risk assessment. By weighted fusion and iterative optimization of drug semantic representation and physiological semantic representation to obtain aligned fusion representation, a more stable and consistent joint representation structure is formed between drug action characteristics and patient physiological characteristics. This can more fully characterize complex nonlinear risk influencing factors, improving the expressive power and adaptability of risk modeling.
[0035] In one alternative implementation, Based on the corrected risk value, anomaly detection and identification of abnormal drug combinations are performed, and a risk association diagram is constructed in conjunction with the concurrent medication periods, including: Kernel density estimation is performed on the modified risk value and a risk probability distribution surface is constructed. Low-density regions are identified in the risk probability distribution surface and the corresponding risk value boundaries are extracted to obtain an adaptive anomaly threshold. The Mahalanobis distance between the projection of the modified risk value and the risk probability distribution surface is calculated. Based on the Mahalanobis distance, abnormal combination is determined and the corresponding drug identifiers are extracted to construct an abnormal drug set. Extract the start and end times and dose change sequences of each drug identifier in the abnormal drug set from the concurrent drug use period. Perform time window sliding analysis on the start and end times of drug use and calculate the co-occurrence frequency of drug identifiers at different time granularities. Construct a spatiotemporal correlation tensor based on the co-occurrence frequency and the dose change sequence. Perform Tucker decomposition on the spatiotemporal correlation tensor to extract the core interaction pattern and reconstruct it into a time correlation matrix. Construct an initial correlation graph based on the time correlation matrix and the drug identifiers. The initial association graph is subjected to spectral clustering algorithm to identify risk communities and determine strong connection subgraphs. The importance weight of each edge in the strong connection subgraph is calculated based on graph attention mechanism and edge pruning is performed to obtain a simplified association graph. Causal topological inference is performed on the simplified association graph to identify risk causal chains and mark the risk propagation direction to obtain the risk association graph.
[0036] After obtaining the corrected risk values, a kernel density estimation method is used to nonparametrically model the distribution characteristics of these values. A Gaussian kernel function is selected as the kernel function, and the bandwidth parameter is automatically determined using the Silverman criterion. The distribution of all corrected risk values in the risk space is then smoothed to generate a continuous risk probability distribution surface. This surface reflects the probability density of different risk values; high-density regions represent common normal mating patterns, while low-density regions correspond to rare anomalous mating situations.
[0037] In the risk probability distribution surface, the boundaries of low-density regions are identified by setting a probability density threshold. This threshold can be set to 15% to 25% of the overall density mean to ensure the capture of statistically significant outliers. The risk value range corresponding to the low-density regions is extracted, and the lower bound of this range is used as an adaptive outlier threshold.
[0038] For each corrected risk value, the Mahalanobis distance between the projection point on the risk probability distribution surface and the center of the surface is calculated. The Mahalanobis distance, by introducing a covariance matrix to eliminate the influence of correlation between variables, accurately measures the degree to which the risk value deviates from the normal distribution. When the Mahalanobis distance exceeds the 95th percentile of the chi-square distribution, the risk value is identified as an abnormal drug combination, and the associated drug identifier is extracted and added to the abnormal drug set.
[0039] From the time-series records of concurrent medication periods, the complete start and end times and dose change sequences of each drug identifier within the abnormal drug set are extracted. The dose change sequence records the dosage values at each time point. Multiple time window lengths are set, including different granularities such as 1 hour, 6 hours, and 24 hours, and a sliding window technique is used to scan the start and end times of medication. Within each window, the co-occurrence of drug identifiers is statistically analyzed, calculating the frequency of any two drugs appearing simultaneously within the same time window. The co-occurrence frequency reflects the strength of the temporal correlation between the drugs.
[0040] A three-dimensional spatiotemporal correlation tensor is constructed by combining the co-occurrence frequency matrix and the dose change sequence. The three dimensions of the 3D spatiotemporal correlation tensor are drug identification, temporal granularity, and dose level, with tensor element values representing the correlation strength under specific conditions. Tucker decomposition is applied to the spatiotemporal correlation tensor, decomposing it into the product of a core tensor and three factor matrices. The core tensor extracts the core interaction patterns between different dimensions, and through reconstruction, it is projected back into the time-drug two-dimensional space to generate a temporal correlation matrix. The rows and columns of the temporal correlation matrix correspond to drug identification, and the matrix elements represent the time-weighted correlation strength between drugs.
[0041] An initial association graph is constructed based on the temporal association matrix, with drug identifiers as nodes and association strength as edge weights. A spectral clustering algorithm is applied to the initial association graph to identify densely connected risk communities by calculating the eigenvectors of the graph's Laplacian matrix. Within each community, a strongly connected subgraph is extracted, requiring that the shortest path between nodes in the subgraph does not exceed two hops.
[0042] A graph attention mechanism is introduced to calculate the importance weights of each edge in a strongly connected subgraph. These attention weights learn the contribution of each edge to risk propagation through trainable parameters. Edges with weights below a threshold are removed to perform edge pruning, resulting in a simplified association graph. A causal topological inference method based on conditional independence testing is applied to this simplified association graph to identify causal dependencies between drugs, determine the directionality of risk causal chains, and mark the directed edges of risk propagation in the graph to form a risk association graph.
[0043] In this embodiment, by estimating the kernel density of the modified risk value and constructing a risk probability distribution surface, low-density regions are identified in the overall risk distribution, and corresponding risk value boundaries are extracted to form an adaptive anomaly threshold. This allows the anomaly risk judgment to be dynamically adjusted according to the real data distribution, improving the adaptive capability and statistical reliability of anomaly risk identification. By calculating the Mahalanobis distance of the modified risk value in the risk probability distribution surface, abnormal matching combinations are identified. This allows anomaly detection to consider not only the magnitude of the risk value but also the overall distribution structure for multi-dimensional judgment, improving the accuracy of anomaly risk identification and reducing false positives. Furthermore, by performing multi-time-granular analysis on the start and end times and dose change sequences during concurrent medication periods... By employing degree-sliding analysis and constructing a spatiotemporal correlation tensor based on co-occurrence frequencies, the temporal synergistic relationships and dose variation characteristics between drugs can be uniformly modeled, improving the expressive power for complex drug use behavior patterns. Through Tucker decomposition of the spatiotemporal correlation tensor to extract core interaction patterns and reconstruct the temporal correlation matrix, high-dimensional drug use correlation information is effectively compressed and structurally expressed, improving the extraction efficiency and accuracy of key interaction relationships. By using spectral clustering to identify risk communities and determine strongly connected subgraphs in the initial correlation graph, and then combining graph attention mechanisms to evaluate the importance of edges and implement edge pruning, weak or noisy correlations can be effectively filtered out, making the risk correlation structure clearer and more stable.
[0044] In one alternative implementation, Identifying key interaction nodes in the risk association graph and determining the drug dependence chain by combining the metabolic pathway attributes, and performing causal inference modeling on the drug dependence chain to obtain a causal relationship graph, including: The degree centrality and betweenness centrality of each node in the risk association graph are jointly calculated to obtain the node centrality vector. Candidate key nodes are selected based on the node centrality vector. The community contribution of the candidate key nodes is analyzed and the connectivity change after removing the candidate key nodes is calculated. Key interaction nodes are selected based on the connectivity change and the corresponding drug identifiers are extracted. Extract the metabolic enzyme information and metabolite information corresponding to the drug identifier from the metabolic pathway attributes. Construct an enzyme competition relationship matrix based on the metabolic enzyme information and identify drug combinations that share metabolic enzymes. Perform metabolic time series analysis on the drug combinations that share metabolic enzymes and calculate the metabolic dependence strength between drugs by combining the metabolite information to obtain a dependence strength matrix. Construct directed dependence edges between drugs based on the dependence strength matrix and form a drug dependence chain. The drug dependence chain is converted into a directed graph. Conditional independence tests are applied to the directed graph to identify direct and indirect causal relationships, and redundant edges are removed to obtain a preliminary causal graph. Markov equivalence class analysis is performed on the preliminary causal graph, and a unique causal graph is obtained by combining it with preset directional constraints. The causal strength of each directed edge is calculated based on the unique causal graph, and the causal action type is labeled. A causal relationship graph is constructed based on the causal action type and the causal strength.
[0045] For a risk association graph, the degree centrality of each node is calculated by counting the number of edges directly connecting that node to other nodes in the graph. The degree centrality value reflects the density of connections within the local network. Simultaneously, the betweenness centrality of each node is calculated by traversing all pairs of nodes in the graph and finding the shortest paths between them, counting the frequency with which the current node appears as an intermediate node on these shortest paths. The betweenness centrality reflects the bridging role of the node in information transmission or influence propagation. After normalizing the degree centrality and betweenness centrality, a node centrality vector is formed. A threshold is set to select the top 30% of nodes with the highest centrality vector values as candidate key nodes.
[0046] For candidate key nodes, the role of each candidate key node in the community structure of the risk association graph is analyzed, and the modularity index is used to evaluate the contribution of each node to its community. A node removal operation is performed to delete the candidate key nodes from the graph, and the number of connected components and average path length of the remaining graph are recalculated. The change in connectivity is defined as the weighted sum of the difference in the number of connected components before and after removal and the growth rate of the average path length. Candidate key nodes whose change in connectivity exceeds a preset threshold are selected as key interaction nodes, and the drug identifiers corresponding to these key interaction nodes are extracted.
[0047] The metabolic enzyme types associated with each drug identifier are retrieved from the metabolic pathway attributes, including the cytochrome P450 enzyme family and glucuronyl transferase. An enzyme competition matrix is constructed, with rows and columns corresponding to drugs. Matrix elements record whether two drugs share the same metabolic enzyme type; when they share, the element value is 1. The matrix is traversed to identify drug combinations with an element value of 1, indicating potential metabolic enzyme competition. For drug combinations sharing metabolic enzymes, the temporal sequence of drug metabolism is analyzed based on concurrent drug administration information. The types of metabolites and their impact on subsequent drug metabolism are extracted from the metabolite information. The metabolic dependence strength between drugs is calculated, with the dependence strength value obtained by weighted summation of enzyme affinity difference, metabolite inhibition coefficient, and temporal overlap. The dependence strength of all drug pairs is filled into the dependence strength matrix. Based on the dependence strength matrix, directed dependence edges are constructed, with the direction of the directed edge pointing from the dependence relationship to the dependent drug, connecting all related drugs to form a drug dependence chain.
[0048] The drug dependence chain is represented as a directed graph structure, where nodes represent drugs and edges represent dependencies and directions. A conditional independence test is applied: for any three nodes forming a triple in the graph, the test checks whether the starting and ending nodes are conditionally independent given an intermediate node. If they are conditionally independent, the relationship between the two nodes is determined to be indirect causality. Redundant edges connecting them are removed, and paths through the intermediate node are retained, resulting in a preliminary causal graph. Markov equivalence class analysis is performed on the preliminary causal graph to identify a set of possible equivalent directed acyclic graphs (DAGs). Combining pre-defined directional constraints, including the temporal order of drug metabolism and known enzyme-induced inhibition mechanisms, a unique DAG satisfying these constraints is selected from the equivalence classes as the unique causal graph.
[0049] The causal strength of each directed edge in the unique causal graph is calculated, and the weights of the edges are quantified using a structural causal model. The path coefficients are obtained through regression analysis based on the causal strength values. The causal action type of each directed edge is labeled, including promoting, inhibiting, and regulating effects, determined based on metabolite information and enzyme competition. The causal action types are labeled and attached to the directed edges. Combined with the causal strength values, a final causal relationship graph is constructed, clearly showing the causal dependence paths, directions of action, and magnitudes of action between drugs.
[0050] In this embodiment, by jointly calculating the degree centrality and betweenness centrality of each node in the risk association graph and constructing a node centrality vector, candidate key nodes are identified based on a comprehensive consideration of the node's connectivity breadth and information transmission capability. The impact of key nodes on the overall network structure is assessed through community contribution analysis and the change in connectivity after node removal. This allows for more accurate location of interactive nodes that play a crucial role in the risk propagation process. By extracting the metabolic enzyme and metabolite information corresponding to the drugs and constructing an enzyme competition matrix, metabolic time-series analysis is performed on drug combinations sharing metabolic enzymes. Combined with metabolite information, the metabolic dependence strength between drugs is calculated, which can identify potential competitive and dependent relationships between drugs at the metabolic level. By constructing the drug dependence chain as a directed graph and using conditional independence tests to distinguish between direct and indirect causal relationships, and by combining Markov equivalence class analysis and directional constraints to solve the unique causal graph, redundant associations can be effectively eliminated and the direction of risk propagation can be clarified.
[0051] In one alternative implementation, The cumulative risk intensity is obtained and the risk level is determined based on the causal relationship diagram and the counterfactual inference algorithm. The early warning window is then determined based on the risk level and the concurrent medication period, including: Extract the causal paths from the causal relationship graph and perform path risk accumulation calculation to obtain the path risk contribution value. Based on the path risk contribution value, solve for the initial accumulated risk value. Construct a counterfactual scenario and perform state propagation along the edge direction of the causal relationship graph under the counterfactual scenario to obtain the counterfactual state value. Based on the counterfactual state value and the preset original state value, analyze to obtain the counterfactual risk increment and combine with the initial accumulated risk value to solve for the accumulated risk intensity. Quantile statistical analysis is performed on the cumulative risk intensity to determine the risk distribution interval. A hierarchical identifier is assigned to each risk distribution interval. The cumulative risk intensity is matched with the risk distribution interval to obtain the matching result and the corresponding hierarchical identifier is extracted as the risk level. Based on the risk level, the early warning response coefficient is obtained by querying the preset response coefficient mapping relationship. Extract the time span corresponding to different drugs from the concurrent medication period, calculate the basic time-effect length based on the time span and the early warning response coefficient, obtain the time-effect adjustment factor from the preset time-effect adjustment mapping table according to the risk level, and calculate the corrected time-effect length in combination with the basic time-effect length, and determine the early warning time-effect window based on the corrected time-effect length and the current time point.
[0052] The causal paths between drug nodes in the causal relationship graph are collected. Each causal path records the directed edge sequence from the starting drug node to the target drug node. Risk weight values carried by each edge are extracted along the path direction. The risk weight values of all edges in the path are weighted and summed through path risk accumulation calculation. The weighting coefficient is determined according to the edge's position in the path, with edges closer to the target node assigned higher weighting coefficients. The weighted sum of all causal paths is normalized to obtain the path risk contribution value of each path. The initial cumulative risk value is obtained by summing all path risk contribution values.
[0053] When constructing a counterfactual scenario, it is assumed that a specific drug was not used during the concurrent medication period. The node corresponding to this specific drug and its associated edges are removed from the causal relationship graph. State propagation is performed along the edges of the remaining causal relationship graph. During propagation, the node state value is obtained by multiplying and summing the state values of its predecessor nodes and the edge weights. The state value of each target node after propagation is recorded as the counterfactual state value. The preset original state value is the state value of each target node when the drug node was not removed. The difference between the counterfactual state value and the original state value is calculated, and the absolute value of the difference is taken as the counterfactual risk increment. The counterfactual risk increment is weighted and summed with the initial cumulative risk value. The weighting coefficient is determined according to the criticality of the removed drug in the metabolic pathway; the higher the criticality, the larger the weighting coefficient. The summation result is taken as the cumulative risk intensity.
[0054] The cumulative risk intensity in the collected historical patient data is statistically analyzed using quantiles, dividing the cumulative risk intensity into five risk distribution intervals: low risk, low-to-medium risk, medium-to-high risk, high risk, and very high risk, based on the 25th, 50th, 75th, and 90th percentiles. These five risk distribution intervals are assigned hierarchical labels 1, 2, 3, 4, and 5, respectively. The current patient's cumulative risk intensity is compared with the boundary values of the five risk distribution intervals to determine which interval the cumulative risk intensity falls into, and the corresponding hierarchical label is extracted as the risk level. The corresponding early warning response coefficient is then retrieved from a pre-configured response coefficient mapping relationship based on the risk level; higher risk levels correspond to larger early warning response coefficients.
[0055] Extract the start and end times of each drug during concurrent medication periods, and calculate the time difference between the end and start times as the current drug's time span. Select the minimum time span among all drug time spans within the concurrent medication period as the baseline span. Multiply the baseline span by the warning response coefficient to obtain the basic time-effectiveness length. Based on the risk level, query the corresponding time-effectiveness adjustment factor from a pre-configured time-effectiveness adjustment mapping table. Higher risk levels in the time-effectiveness adjustment mapping table correspond to smaller time-effectiveness adjustment factors, used to shorten the time-effectiveness length for faster warnings. Multiply the basic time-effectiveness length by the time-effectiveness adjustment factor to obtain the corrected time-effectiveness length. Obtain the current system time point, using the current time point as the starting point and the corrected time-effectiveness length as the time length, and determine the time interval extending the corrected time-effectiveness length from the current time point as the warning time-effectiveness window.
[0056] In this embodiment, by extracting causal paths from the causal relationship graph and performing path risk accumulation calculation, the initial cumulative risk value is obtained by comprehensively considering the contribution of each path to the overall risk. This allows risk assessment to expand from the local impact of a single drug combination to the overall propagation structure of multiple nodes and multiple paths, improving the overall ability to characterize complex risk propagation processes. By constructing counterfactual scenarios and propagating states along the propagation direction of the causal relationship graph, the risk increment is obtained by comparing the counterfactual state value with the original state value. This quantifies the impact of changes in specific drug factors on the overall risk, improving the causal explanation and sensitivity analysis capabilities of risk assessment, making risk intensity assessment more accurate and reliable. By performing quantile statistical analysis on the cumulative risk intensity and dividing the risk distribution intervals, hierarchical labels are assigned to different risk intervals, improving the adaptability of risk classification to changes in data distribution, making risk level classification more objective and stable. By mapping risk levels to preset response coefficients, the risk assessment results can be directly converted into executable early warning response strengths, improving the operability of risk assessment results in practical applications.
[0057] Figure 2This is a flowchart illustrating the drug risk timeliness calculation process of the drug compatibility safety early warning information push processing method according to an embodiment of the present invention.
[0058] In one alternative implementation, Generating warning message content based on the risk level and the warning timeframe, calculating the push priority and constructing a push sequence based on the warning timeframe, and sending the warning message content to the receiving object based on the push sequence includes: Based on the risk level, a warning message template is selected from the preset message template library. The start and end time boundaries of the warning time window are extracted. The risk description text corresponding to the risk level and the start and end time boundaries are filled into the warning message template. The key causal path in the causal relationship graph is extracted and converted into medication risk description text. The medication risk description text is embedded into the details field of the warning message template to obtain the warning message content. The time urgency value is calculated based on the start and end time boundaries of the warning time window and the current time point. The risk weight coefficient is obtained by querying the preset level weight mapping table based on the risk level. The comprehensive priority score is calculated based on the time urgency value and the risk weight coefficient. All warnings to be pushed are sorted based on the comprehensive priority score to obtain a priority sorting list and determine the push order of each warning message content. The push order is associated with the corresponding warning message content to construct a push sequence. The warning message content is extracted sequentially from the push sequence according to the push order, and the corresponding patient identifier and medical staff identifier are queried to obtain the set of receiving object identifiers. Push channels are allocated according to the type of each receiving object identifier in the set of receiving object identifiers, and the warning message content is sent to the receiving terminal corresponding to the receiving object based on the push channel.
[0059] When generating warning messages, a preset message template library stores warning message templates corresponding to different risk levels. Risk levels are divided into three tiers: high risk, medium risk, and low risk. The warning message template for high risk includes an identifier field for "Emergency Drug Incompatibility Risk Warning," a risk description text placeholder, a time boundary placeholder, and a details field placeholder. When extracting the start and end time boundaries of the warning timeframe, these boundaries include the earliest and latest possible times at which the risk could occur, accurate to the minute. When filling the warning message template with the risk description text corresponding to the risk level, the risk description text for high risk is "Serious drug interaction detected," and for medium risk it is "Potential drug incompatibility risk exists." When extracting key causal paths from the causal relationship graph, key causal paths refer to paths where the causal strength coefficient between nodes is greater than a set threshold of 0.75. The drug names, metabolic enzyme types, and interaction mechanisms involved in the key causal paths are organized in causal order to form a drug risk description text. The description text format is "Drug A causes an increase in the blood concentration of drug B by inhibiting CYP3A4 enzyme activity." This description text is then embedded into the details field of the warning message template.
[0060] When calculating the time urgency value, the time difference between the start time of the warning timeframe window and the current time is obtained, and the time difference is converted to hours. The time urgency value is calculated using the formula. Calculation, where This represents the time difference in hours, and U is the time urgency value. When querying the risk weight coefficient from the preset level weight mapping table, the weight coefficient for high risk is 1.0, for medium risk it is 0.6, and for low risk it is 0.3. The comprehensive priority score is calculated by multiplying the time urgency value by the risk weight coefficient. When sorting all pending alerts, they are arranged in descending order of comprehensive priority score to form a priority sorting list. If the comprehensive priority scores are the same, they are arranged in the order of alert generation time. When associating the push order with the corresponding alert message content, the push order is identified by a sequence number, starting from 1 and incrementing. A mapping relationship is established between the sequence number and the unique identifier of the alert message content and stored in the push sequence data structure.
[0061] When extracting warning message content sequentially from the push sequence, the unique identifier of each warning message content is read in ascending order of sequence number. The complete warning message content is then retrieved from the message content repository using this unique identifier. When querying the corresponding patient and healthcare worker identifiers, the patient identifier is extracted from the patient's medication record associated with the warning message content. The attending physician and responsible nurse identifiers for the current patient are retrieved from the medical information system. These patient, physician, and nurse identifiers are then combined into a set of recipient identifiers. When allocating push channels based on the type of recipient identifier, patient identifiers are assigned to the mobile application push channel, physician identifiers to the workstation message push channel and SMS push channel, and nurse identifiers to the nursing terminal push channel. When sending warning message content through the push channels, the mobile application push channel calls the message push service interface to push the warning message content to the patient's mobile application client; the workstation message push channel displays the warning message content in a pop-up notification area on the physician's workstation; the SMS push channel sends a summary of the warning message content to the physician's pre-registered mobile phone number; and the nursing terminal push channel displays a list of warning messages on the nurse's station display screen.
[0062] In this embodiment, by selecting the corresponding early warning message template from a preset message template library according to the risk level, and filling the template with the risk description text, the start and end time boundaries of the early warning time window, and the key causal path information in the causal relationship diagram, the generated early warning message not only includes the risk level and the early warning time range, but also provides a clear risk formation path and medication risk description. This provides medical staff with a clearer understanding of the risk source and mechanism of action, helping to improve the efficiency of clinical staff's understanding of risk early warning information and the sufficiency of decision-making basis. By calculating the time urgency value based on the early warning time window and combining it with the risk weight coefficient corresponding to the risk level to solve the comprehensive priority score, the severity of the risk and the urgency of the time can be comprehensively considered, so that high-risk and urgent early warning information is processed first, thereby improving the rationality of the early warning push mechanism and the efficiency of resource utilization. By assigning corresponding push channels to different objects according to the type of the receiving object identifier and sending early warning messages in sequence according to the priority sorting list, the early warning information can be accurately delivered to the corresponding patient and medical staff terminals, achieving more accurate and efficient information distribution and reducing information redundancy and delay.
[0063] A second aspect of this invention provides a drug compatibility safety early warning information push and processing system, comprising: The data acquisition unit is used to collect drug identification and medication time series data from patient medication records, segment the medication time series data into time windows to determine concurrent medication periods, extract the pharmacological classification attributes and metabolic pathway attributes corresponding to the drug identification and construct a drug feature vector, and determine preliminary risk markers based on the drug identification within the concurrent medication periods and a pre-constructed action knowledge base. The risk correction unit is used to project the drug feature vector onto a multimodal semantic space and align it with pre-acquired patient physiological indicators to obtain an individualized risk coefficient. Based on the individualized risk coefficient, the initial risk label is corrected to obtain a corrected risk value. Based on the corrected risk value, abnormal detection is performed to identify abnormal combinations and a risk association graph is constructed in conjunction with the concurrent medication period. The causal inference unit is used to identify key interaction nodes in the risk association graph and determine the drug dependence chain by combining the metabolic pathway attributes, perform causal inference modeling on the drug dependence chain to obtain a causal relationship graph, solve for the cumulative risk intensity and determine the risk level based on the causal relationship graph and the counterfactual inference algorithm, and determine the early warning time window based on the risk level and the concurrent medication period. The early warning generation unit is used to generate early warning message content based on the risk level and the early warning time window, calculate the push priority and construct the push sequence based on the early warning time window, and send the early warning message content to the receiving object based on the push sequence.
[0064] A third aspect of the present invention provides an electronic device, comprising: A processor and a memory for storing processor-executable instructions, wherein the processor is configured to invoke instructions stored in the memory to perform the aforementioned method.
[0065] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0066] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for pushing and processing drug compatibility safety early warning information, characterized in that, include: Collect drug identification and medication time series data from patient medication records, segment the medication time series data into time windows to determine concurrent medication periods, extract the pharmacological classification attributes and metabolic pathway attributes corresponding to the drug identification and construct drug feature vectors, and determine preliminary risk markers based on the drug identifications within the concurrent medication periods and a pre-constructed action knowledge base; The drug feature vector is projected into a multimodal semantic space and aligned with pre-acquired patient physiological indicators to obtain an individualized risk coefficient. The preliminary risk label is corrected based on the individualized risk coefficient to obtain a corrected risk value. Anomaly detection is performed based on the corrected risk value to identify abnormal drug combinations and a risk association graph is constructed by combining the concurrent drug use period. Identify key interaction nodes in the risk association graph and determine the drug dependence chain by combining the metabolic pathway attributes. Perform causal inference modeling on the drug dependence chain to obtain a causal relationship graph. Solve the cumulative risk intensity and determine the risk level based on the causal relationship graph and the counterfactual inference algorithm. Determine the early warning time window based on the risk level and the concurrent drug use period. Based on the risk level and the warning time window, a warning message is generated, a push priority is calculated based on the warning time window and a push sequence is constructed, and the warning message is sent to the receiving object based on the push sequence.
2. The method according to claim 1, characterized in that, Drug identification and medication time-series data are collected from patient medication records. The medication time-series data is segmented into time windows to determine concurrent medication periods. Pharmacological classification attributes and metabolic pathway attributes corresponding to the drug identification are extracted, and a drug feature vector is constructed. Based on the drug identification within the concurrent medication periods and a pre-constructed action knowledge base, preliminary risk markers are determined, including: Drug identifiers and medication time series data are extracted from patient medication records. The medication time series data is divided into multiple time window segments by sliding window according to the time dimension. The time overlap of the drug identifiers in different time window segments is calculated. The concurrent medication period is identified based on the time overlap. The drug identifier combinations in the concurrent medication period are counted and a set of matching combinations is constructed. Based on the drug identifier query drug knowledge graph, the pharmacological classification attribute and the metabolic pathway attribute are extracted. The pharmacological classification attribute is mapped to a pre-constructed pharmacological semantic space to obtain a semantic embedding vector. The metabolic pathway attribute is subjected to path topology parsing and key metabolic nodes are extracted to construct a metabolic graph structure. The metabolic graph structure is subjected to graph convolution encoding to obtain a metabolic feature vector. The semantic embedding vector and the metabolic feature vector are concatenated and subjected to dimensionality reduction transformation to obtain a drug feature vector. The drug interactions corresponding to the combination set are retrieved from the pre-built action knowledge base. The severity of the drug interactions is classified and a time sensitivity coefficient is calculated in combination with the dosing interval during the concurrent dosing period. A preliminary risk label is obtained based on the severity classification and the time sensitivity coefficient and is associated with and stored with the corresponding drug label in the combination set.
3. The method according to claim 1, characterized in that, The drug feature vector is projected into a multimodal semantic space and aligned with pre-acquired patient physiological indicators to obtain an individualized risk coefficient. Based on the individualized risk coefficient, the preliminary risk label is corrected to obtain a corrected risk value, including: Sample data is extracted from a pre-built drug knowledge base and physiological indicator database and jointly encoded to obtain an embedding representation. A multimodal semantic space is constructed based on the embedding representation. The drug feature vector is projected onto the multimodal semantic space through linear transformation to obtain a drug semantic representation. Metabolic capacity features and pathological state features are extracted from pre-acquired patient physiological indicators and feature encoded to obtain a physiological semantic representation. The vector distance between the drug semantic representation and the physiological semantic representation in the multimodal semantic space is calculated and the semantic matching degree is obtained. Based on the semantic matching degree, the drug semantic representation and the physiological semantic representation are weighted and fused and iteratively optimized to obtain an aligned fusion representation. The aligned fusion representation is subjected to multi-level nonlinear transformation and solved to obtain the individualized risk coefficient. The risk modulation intensity is determined based on the numerical distribution of the individualized risk coefficient. Extract the basic risk value corresponding to each combination in the preliminary risk label, and adjust the basic risk value by weighting based on the risk adjustment intensity to obtain the candidate correction value. Perform threshold screening on the candidate correction value and identify high-risk combinations. Determine the candidate correction value corresponding to the high-risk combination as the corrected risk value and associate it with the corresponding combination.
4. The method according to claim 1, characterized in that, Based on the corrected risk value, anomaly detection and identification of abnormal drug combinations are performed, and a risk association diagram is constructed in conjunction with the concurrent medication periods, including: Kernel density estimation is performed on the modified risk value and a risk probability distribution surface is constructed. Low-density regions are identified in the risk probability distribution surface and the corresponding risk value boundaries are extracted to obtain an adaptive anomaly threshold. The Mahalanobis distance between the projection of the modified risk value and the risk probability distribution surface is calculated. Based on the Mahalanobis distance, abnormal combination is determined and the corresponding drug identifiers are extracted to construct an abnormal drug set. Extract the start and end times and dose change sequences of each drug identifier in the abnormal drug set from the concurrent drug use period. Perform time window sliding analysis on the start and end times of drug use and calculate the co-occurrence frequency of drug identifiers at different time granularities. Construct a spatiotemporal correlation tensor based on the co-occurrence frequency and the dose change sequence. Perform Tucker decomposition on the spatiotemporal correlation tensor to extract the core interaction pattern and reconstruct it into a time correlation matrix. Construct an initial correlation graph based on the time correlation matrix and the drug identifiers. The initial association graph is subjected to spectral clustering algorithm to identify risk communities and determine strong connection subgraphs. The importance weight of each edge in the strong connection subgraph is calculated based on graph attention mechanism and edge pruning is performed to obtain a simplified association graph. Causal topological inference is performed on the simplified association graph to identify risk causal chains and mark the risk propagation direction to obtain the risk association graph.
5. The method according to claim 1, characterized in that, Identifying key interaction nodes in the risk association graph and determining the drug dependence chain by combining the metabolic pathway attributes, and performing causal inference modeling on the drug dependence chain to obtain a causal relationship graph, including: The degree centrality and betweenness centrality of each node in the risk association graph are jointly calculated to obtain the node centrality vector. Candidate key nodes are selected based on the node centrality vector. The community contribution of the candidate key nodes is analyzed and the connectivity change after removing the candidate key nodes is calculated. Key interaction nodes are selected based on the connectivity change and the corresponding drug identifiers are extracted. Extract the metabolic enzyme information and metabolite information corresponding to the drug identifier from the metabolic pathway attributes. Construct an enzyme competition relationship matrix based on the metabolic enzyme information and identify drug combinations that share metabolic enzymes. Perform metabolic time series analysis on the drug combinations that share metabolic enzymes and calculate the metabolic dependence strength between drugs by combining the metabolite information to obtain a dependence strength matrix. Construct directed dependence edges between drugs based on the dependence strength matrix and form a drug dependence chain. The drug dependence chain is converted into a directed graph. Conditional independence tests are applied to the directed graph to identify direct and indirect causal relationships, and redundant edges are removed to obtain a preliminary causal graph. Markov equivalence class analysis is performed on the preliminary causal graph, and a unique causal graph is obtained by combining it with preset directional constraints. The causal strength of each directed edge is calculated based on the unique causal graph, and the causal action type is labeled. A causal relationship graph is constructed based on the causal action type and the causal strength.
6. The method according to claim 1, characterized in that, The cumulative risk intensity is obtained and the risk level is determined based on the causal relationship diagram and the counterfactual inference algorithm. The early warning window is then determined based on the risk level and the concurrent medication period, including: Extract the causal paths from the causal relationship graph and perform path risk accumulation calculation to obtain the path risk contribution value. Based on the path risk contribution value, solve for the initial accumulated risk value. Construct a counterfactual scenario and perform state propagation along the edge direction of the causal relationship graph under the counterfactual scenario to obtain the counterfactual state value. Based on the counterfactual state value and the preset original state value, analyze to obtain the counterfactual risk increment and combine with the initial accumulated risk value to solve for the accumulated risk intensity. Quantile statistical analysis is performed on the cumulative risk intensity to determine the risk distribution interval. A hierarchical identifier is assigned to each risk distribution interval. The cumulative risk intensity is matched with the risk distribution interval to obtain the matching result and the corresponding hierarchical identifier is extracted as the risk level. Based on the risk level, the early warning response coefficient is obtained by querying the preset response coefficient mapping relationship. Extract the time span corresponding to different drugs from the concurrent medication period, calculate the basic time-effect length based on the time span and the early warning response coefficient, obtain the time-effect adjustment factor from the preset time-effect adjustment mapping table according to the risk level, and calculate the corrected time-effect length in combination with the basic time-effect length, and determine the early warning time-effect window based on the corrected time-effect length and the current time point.
7. The method according to claim 1, characterized in that, Generating warning message content based on the risk level and the warning timeframe, calculating the push priority and constructing a push sequence based on the warning timeframe, and sending the warning message content to the receiving object based on the push sequence includes: Based on the risk level, a warning message template is selected from the preset message template library. The start and end time boundaries of the warning time window are extracted. The risk description text corresponding to the risk level and the start and end time boundaries are filled into the warning message template. The key causal path in the causal relationship graph is extracted and converted into medication risk description text. The medication risk description text is embedded into the details field of the warning message template to obtain the warning message content. The time urgency value is calculated based on the start and end time boundaries of the warning time window and the current time point. The risk weight coefficient is obtained by querying the preset level weight mapping table based on the risk level. The comprehensive priority score is calculated based on the time urgency value and the risk weight coefficient. All warnings to be pushed are sorted based on the comprehensive priority score to obtain a priority sorting list and determine the push order of each warning message content. The push order is associated with the corresponding warning message content to construct a push sequence. The warning message content is extracted sequentially from the push sequence according to the push order, and the corresponding patient identifier and medical staff identifier are queried to obtain the set of receiving object identifiers. Push channels are allocated according to the type of each receiving object identifier in the set of receiving object identifiers, and the warning message content is sent to the receiving terminal corresponding to the receiving object based on the push channel.
8. A drug compatibility safety early warning information push and processing system, used to implement the method of any one of claims 1-7, characterized in that, include: The data acquisition unit is used to collect drug identification and medication time series data from patient medication records, segment the medication time series data into time windows to determine concurrent medication periods, extract the pharmacological classification attributes and metabolic pathway attributes corresponding to the drug identification and construct a drug feature vector, and determine preliminary risk markers based on the drug identification within the concurrent medication periods and a pre-constructed action knowledge base. The risk correction unit is used to project the drug feature vector onto a multimodal semantic space and align it with pre-acquired patient physiological indicators to obtain an individualized risk coefficient. Based on the individualized risk coefficient, the initial risk label is corrected to obtain a corrected risk value. Based on the corrected risk value, abnormal detection is performed to identify abnormal combinations and a risk association graph is constructed in conjunction with the concurrent medication period. The causal inference unit is used to identify key interaction nodes in the risk association graph and determine the drug dependence chain by combining the metabolic pathway attributes, perform causal inference modeling on the drug dependence chain to obtain a causal relationship graph, solve for the cumulative risk intensity and determine the risk level based on the causal relationship graph and the counterfactual inference algorithm, and determine the early warning time window based on the risk level and the concurrent medication period. The early warning generation unit is used to generate early warning message content based on the risk level and the early warning time window, calculate the push priority and construct the push sequence based on the early warning time window, and send the early warning message content to the receiving object based on the push sequence.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.