Western medicine drug combination recommendation method and system based on multi-source drug graph collaborative fusion and global case memory enhancement
By employing a multi-source drug graph synergistic fusion and global case memory enhancement approach, robust medication combination recommendations are generated, addressing the challenges of insufficient cross-patient evidence utilization and drug interaction risk control in existing technologies, and achieving more efficient and safer medication decision support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DALIAN UNIV
- Filing Date
- 2026-01-29
- Publication Date
- 2026-06-19
AI Technical Summary
Existing medication recommendation methods struggle to fully utilize cross-patient similarity evidence in longitudinal modeling, resulting in insufficient recommendation stability and generalization ability. Furthermore, the risk of drug interactions is difficult to control effectively, affecting the safety and reliability of the recommendations.
We employ a multi-source drug graph collaborative fusion and global case memory enhancement approach. We generate patient representations through multi-source event embedding and temporal dependency capture, and retrieve similar cases by combining attention mechanisms. We construct a unified coding framework for molecular graphs, molecular substructure graphs, and DDI interaction graphs, and use a residual fusion framework to balance the effectiveness and safety of recommendations.
It improves the stability and generalization ability of medication recommendations, reduces the probability of unsafe recommendations, enhances the accuracy and clinical safety of recommendations, and strengthens the robustness and interpretability of the model.
Smart Images

Figure CN122245602A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent analysis of medical and health data and clinical decision support technology, specifically to a method and system for recommending Western medicine drug combinations based on multi-source drug graph collaborative fusion and global case memory enhancement. Background Technology
[0002] Clinical medication decision-making is a core aspect of healthcare services. Its scientific rigor and safety directly impact patient treatment outcomes and health rights. This decision-making process heavily relies on multi-dimensional information carried by electronic health records (EHRs), encompassing core data such as patient characteristics, previous diagnoses, examination results, past medication history, comorbidities, and treatment feedback. Especially in scenarios involving multiple visits, such as chronic disease management, the patient's disease progression exhibits significant temporal continuity and stages. Feedback on the efficacy, tolerability, and adverse reactions of previous medications continuously influences subsequent prescription adjustments. Therefore, intelligent medication recommendation systems designed for real-world clinical applications must not only output a reasonable drug set based on single visit information but also accurately capture the disease progression patterns and treatment response models along a longitudinal visit sequence. Simultaneously, they must rigorously consider drug interactions and safety constraints to provide clinical decision support systems with practical, verifiable, and risk-controlled auxiliary suggestions.
[0003] However, most existing medication recommendation methods have significant limitations and cannot meet the complex needs of clinical practice. In terms of longitudinal modeling, the distribution of patient visits in clinical data is uneven, with many patients having short disease durations, being referred, or having incomplete data records, resulting in short historical records or missing key fields. When relying solely on limited individual historical data for modeling, the models lack sufficient long-term clinical evidence, making them prone to overfitting to short-term noise, slow response to disease progression turning points, and unstable recommendation results for cold-start patients. Furthermore, many transferable common treatment patterns exist in clinical practice, such as similar diagnostic combinations and medication strategies corresponding to complication profiles. However, existing models lack mechanisms to actively retrieve and utilize cross-patient similar visit evidence at the dataset scale, failing to fully activate global knowledge and limiting the robustness and generalization ability of recommendations.
[0004] Regarding medication safety, drug interaction risks are a significant concern. Some drug combinations are contraindicated or require caution in specific populations or with comorbidities. Ignoring these risks can lead to serious adverse reactions. In existing technologies, molecular structural information and its derived pharmacological characterization are key carriers connecting drug mechanisms of action and safety. However, drug structural information is highly dimensional and diverse in form. Especially after introducing fine-grained evidence of molecular substructures, simple linear splicing or weak interaction methods are insufficient to characterize the conditional dependence between the overall molecule and key functional groups. This can easily lead to the dilution of core pharmacological evidence or the introduction of redundant noise, affecting the reliability and safety of recommendations. For example, Chinese patent application CN116864072A, entitled "A Medication Recommendation Method, Apparatus, Device, and Storage Medium Based on Supervised Learning," fails to fully consider the synergistic effects of molecular structure and substructures at the drug knowledge fusion level, resulting in insufficient precision in safety constraints.
[0005] Furthermore, clinical drug recommendations require the integration of diverse and heterogeneous evidence, including patient time-series representations, drug knowledge, and interaction constraints. Existing methods often employ one-time fusion or single-path aggregation strategies, which can easily lead to problems such as strong information overriding weak information, unstable gradient propagation, and over-reliance on specific information sources. This results in models being sensitive to data perturbations and exhibiting significant performance fluctuations when transferred across disease spectrums and healthcare institutions. In scenarios where both effectiveness and safety must be considered, the lack of robust multi-evidence fusion mechanisms makes it difficult for models to strike a balance between recommendation effectiveness and risk control, thus failing to meet actual clinical needs. Summary of the Invention
[0006] The purpose of this invention is to propose a method and system for recommending Western medicine drug combinations based on multi-source drug graph synergistic fusion and global case memory enhancement. This method improves the stability and generalization ability of recommendations while reducing the probability of unsafe recommendations caused by insufficient local history, noisy records, or drug interaction risks, thereby enhancing the interpretability and verifiability of clinical decision support.
[0007] According to a first aspect of the embodiments of this disclosure, a method for recommending Western medicine drug combinations based on multi-source drug map synergistic fusion and global case memory enhancement is provided, comprising the following steps: The temporal medical events of diagnosis, treatment and historical medication are structured and encoded. Through multi-source event embedding, temporal dependency capture and feature synergistic fusion, a patient representation that can comprehensively represent the patient's condition and treatment background is generated. Based on patient representation, similar cases across patients are retrieved from the entire medical record data. Prescription information of similar cases is weighted and aggregated through an attention mechanism to form a transferable prescription evidence score. A unified coding framework is constructed for molecular graphs, molecular substructure graphs, EHR co-formulation graphs, and DDI interaction graphs to mine drug structural features, clinical combination patterns, and safety constraints, respectively. Structural evidence and relational evidence are integrated through a synergistic fusion mechanism to form a multi-dimensional drug knowledge representation. A residual fusion framework is adopted to jointly decode the patient's corresponding diagnosis and treatment needs, the prescription evidence of the global case, and the drug knowledge encoded by multi-graph. By balancing the effectiveness of recommendations and the safety of medication through a multi-objective loss function and combining it with an inference threshold strategy, a final drug combination recommendation with controllable risk and close to clinical reality is generated.
[0008] In one embodiment, a patient representation capable of comprehensively characterizing the patient's condition and treatment background is generated, specifically as follows: Learnable embedding matrices are constructed for three types of events: diagnosis, treatment, and medication. The Multi-hot event vectors of each visit are summed and aggregated after index lookup and random deactivation to obtain the visit-level event embedding. Each medical visit event is embedded and concatenated into a sequence along the time dimension, and then input into a time encoder to extract the hidden state representations of diagnosis, treatment, and medication. Only the historical medication codes from the previous moment are retained and linearly mapped to form the historical medication representation available at the current moment; The time codes for diagnosis and treatment are concatenated along the feature dimension and mapped to obtain the patient representation through a feedforward network.
[0009] In one embodiment, the transferable prescription evidence score is generated as follows: Maintain two types of learnable memories: a historical medical record representation database and a historical prescription database. Continuously receive patient representations and update the memory content as the training process progresses. The current patient representation is concatenated with the historical medical record representation database and then input into a similarity network to obtain a similarity score, which is used to select a Top-K candidate medical record set. An attention aggregation mechanism is introduced into the Top-K candidate medical record set. The prescription vectors corresponding to the candidate medical records are weighted and aggregated by normalized weights to obtain a prescription evidence score based on global historical memory.
[0010] In one embodiment, the method of integrating structural evidence and relational evidence through a collaborative fusion mechanism is as follows: The molecular graph set obtained by parsing drug molecular structures using SMILES is input into a molecular graph neural network for message passing and aggregation to form a global molecular embedding. The molecular structure matching weight is calculated using the patient representation as the query. The "molecule-drug" association matrix is implicitly modeled through masked linear mapping to obtain the drug use score at the molecular structure level. Drug molecules are decomposed into substructures to obtain a set of substructure graphs. A substructure graph encoding network is used to learn substructure embeddings, and high-order interaction relationships between substructures are modeled through set self-attention. Patient representations are mapped to substructure weights and coupled with substructure enhancement embeddings to obtain substructure-level medication scores. Based on the adjacency matrix of the EHR co-prescription graph and the DDI interaction graph, a graph convolutional network is used to learn the drug relationship representation, and the two types of relationship representations are fused to form a relationship prior knowledge representation; the relationship prior score is obtained by using the patient representation as the query. Within a unified latent space, a cross-attention interaction is constructed using molecular scores as queries and substructure scores as keys to obtain gating correction terms for the judgment of global structure based on local evidence. Robust backtracking paths of the molecular structure backbone are preserved through residual connections, forming a molecular-substructure collaborative fusion score.
[0011] In one embodiment, the method for generating a final drug combination recommendation that is risk-controlled and clinically relevant is as follows: Using molecular structure score as the main baseline, relational prior score is introduced to explicitly consider medication safety, and the most similar medication record in the current patient's history is combined for matching enhancement to obtain the main comprehensive medication score. The prescription evidence score based on global historical memory and the molecular-substructure synergistic fusion score are used as two side gain, which are superimposed on the main comprehensive drug score in a residual manner through learnable weights to obtain the final drug combination recommendation vector, and the output score is nonlinearly rectified. A threshold is applied to the final recommendation vector to generate drug selection results; The drug use multi-label prediction objective and the multi-label interval constraint objective are jointly optimized, and an adverse interaction penalty term based on DDI adjacency relationship is introduced as a safety regularization.
[0012] In one embodiment, the molecular structure level drug delivery score is: in, This represents element-wise matrix multiplication. This represents the association weight of the substructure at the drug level. The relevance weights of drug molecular structure to patient representation are given. and It is a learnable embedding matrix. For molecular global embedding vectors, A collection of molecular diagrams. To the patient, A molecular-drug correlation matrix; Substructure hierarchy medication score: in, For substructure weights, Enhance the embedding of substructures, For the original embedding of the substructure graph, For standard self-attention mechanisms, , These are the query matrix, key matrix, and value matrix for input X, respectively. It is the Sigmoid activation function. Based on self-attention fusion, This represents a feedforward neural network.
[0013] In one embodiment, the main comprehensive medication score is: in, Score the drug use based on the molecular structure level. Prior scores for relations. This is the most similar medication record in the current patient's history; These are learnable weight parameters; Final medication combination recommendation vector for: in, For prescription evidence scores based on global historical memory, Scoring is given for the coordinated fusion of molecular and substructures; , These are learnable weight parameters.
[0014] According to a second aspect of the embodiments of this disclosure, a Western medicine drug combination recommendation system based on multi-source drug graph synergistic fusion and global case memory enhancement is provided, including: The patient representation generation module performs structured encoding of temporal medical events, including diagnosis, treatment, and historical medication. Through multi-source event embedding, temporal dependency capture, and feature synergistic fusion, it generates a patient representation that can comprehensively characterize the patient's condition and treatment background. The global case evidence aggregation module retrieves similar cases across patients from all medical record data based on patient representations. It then uses an attention mechanism to weighted aggregate prescription information from similar cases, forming a transferable prescription evidence score. The multi-graph drug knowledge coding module constructs a unified coding framework for molecular graphs, molecular substructure graphs, EHR co-prescription graphs, and DDI interaction graphs. It respectively mines drug structural features, clinical combination patterns, and safety constraint relationships. Through a collaborative fusion mechanism, it integrates structural evidence and relational evidence to form a multi-dimensional drug knowledge representation. The residual fusion and medication recommendation generation module adopts a residual fusion framework to jointly decode the patient's corresponding diagnosis and treatment needs, the prescription evidence of the global case, and the drug knowledge encoded by multiple graphs. It balances the effectiveness of recommendations and the safety of medication through a multi-objective loss function and combines an inference threshold strategy to generate a final drug combination recommendation that is risk-controllable and close to clinical practice.
[0015] According to a third aspect of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the memory, wherein the processor executes the program to implement the aforementioned method for recommending Western medicine drug combinations based on multi-source drug map synergistic fusion and global case memory enhancement.
[0016] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the aforementioned method for recommending Western medicine drug combinations based on multi-source drug graph synergistic fusion and global case memory enhancement.
[0017] The advantages of the above technical solutions adopted in this invention compared with the prior art are as follows: This invention addresses the temporal decision-making scenarios of real-world electronic health records (EHRs). For multi-source medical events such as diagnosis, treatment, and historical medication, it employs a separable embedding approach for structured encoding and learns evolutionary dependencies across visits through a temporal encoder. This generates a unified patient representation that directly drives subsequent knowledge alignment and medication prediction. Compared to traditional solutions that rely solely on single visit information or coarsely piece together multi-source events, this invention more comprehensively characterizes the temporal correlation between disease progression and medical behavior. In real-world clinical scenarios characterized by sparse medical records, noise interference, and information gaps, it significantly improves the stability of the patient representation and the model's generalization ability.
[0018] (2) This invention proposes a cross-patient "global historical memory retrieval-attention aggregation" experience transfer mechanism. By maintaining a learnable case representation database and prescription database, it achieves conditional retrieval of Top-K similar medical records based on the current patient representation, and uses an attention mechanism to weighted aggregate prescription information of similar cases to form a global historical score. Compared with schemes that rely solely on limited historical data of a single patient or simple statistical co-occurrence relationships, this invention can introduce group medical experience to supplement decision-making evidence when the patient's own history is insufficient, there are abnormal medical records, or the pathological combination is complex, effectively improving the coverage, robustness, and interpretability and traceability of medication recommendations.
[0019] (3) This invention constructs a multi-graph unified coding framework, incorporating molecular graphs, molecular substructure graphs, EHR co-prescription graphs, and DDI interaction graphs into the same decision-making process for collaborative modeling. Patient representations are used as queries to achieve cross-graph alignment and weighted fusion, enabling synergistic effects of drug structure evidence, clinical relationship evidence, and medication safety evidence within the drug space. Compared to schemes that utilize molecular structure information from only a single perspective or rely solely on EHR association graphs, this invention can simultaneously improve the accuracy of medication recommendations and the consistency of clinical safety, significantly reducing the output of "highly accurate but high-risk" drug combinations.
[0020] (4) This invention utilizes a collaborative interaction fusion mechanism of "global molecular evidence - local substructure evidence" to model the nonlinear complementary relationship between the two types of evidence using cross-attention within a unified latent space. It also designs a robust backoff path in the residual pathway to preserve the global structure judgment, allowing local chemical evidence to enhance the global structure matching result through conditional correction. Compared to fusion schemes that simply linearly add or weight multi-source scores, this invention avoids the loss of key information caused by strong signals masking weak signals, significantly improving the credibility of the recommendation score, model robustness, and out-of-distribution adaptability.
[0021] (5) This invention introduces relational priors and safety constraints in the comprehensive medication decoding stage, explicitly incorporating the EHR co-prescription pattern and the risk of adverse drug interactions (DDI) into the model optimization objective. Through a multi-objective joint training strategy, it achieves simultaneous improvement in recommendation effectiveness and medication safety, enabling the model to actively suppress the co-occurrence of high-risk drugs while increasing the overall recommendation hit rate. Compared to traditional solutions that rely solely on prediction loss and treat safety as a post-processing step or soft constraint, this invention can exert a sustainable inhibitory effect on high-risk drug combinations during the training phase, effectively reducing the probability of triggering potential adverse interactions and improving the controllability of clinical deployment. Attached Figure Description
[0022] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an undue limitation of this application.
[0023] Figure 1 This is a structural diagram of the ResGMS model for recommending Western medicine drug combinations in this invention; Figure 2 The graphs show the various indicators in the comparative experiments of this invention and the testing process of different models. Figure 3 This is a graph showing the changes in Jaccard's algorithm during the training process of different models in the comparative experiment of this invention; Figure 4 This is a heatmap showing the performance of the Top 50 channels in the drug predicted by the model of this invention. Figure 5 This is a visualization of a case analysis based on five historical medical records, as presented in the case analysis of this invention. (Detailed implementation details follow.) The present disclosure will be further described below with reference to the accompanying drawings and embodiments.
[0024] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0025] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0026] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and systems according to various embodiments of this disclosure. It should be noted that each block in a flowchart or block diagram may represent a module, segment, or portion of code, which may include one or more executable instructions for implementing the logical functions specified in the various embodiments. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutively represented blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, may be implemented using a dedicated hardware-based system that performs the specified functions or operations, or using a combination of dedicated hardware and computer instructions.
[0027] Example 1: This embodiment provides a method for recommending Western medicine drug combinations based on multi-source drug map synergistic fusion and global case memory enhancement, such as... Figure 1 As shown, it includes the following steps: S1. The temporal medical events of diagnosis, treatment and historical medication are structured and encoded. Through multi-source event embedding, temporal dependency capture and feature synergistic fusion, a patient representation that can comprehensively represent the patient's condition and treatment background is generated. Specifically, to effectively utilize the temporal medical information in electronic health records, this invention constructs learnable embedding matrices for diagnosis, treatment, and medication, respectively. , and In the first For each visit, three types of medical events are represented by multi-hot vectors. After index lookup and random deactivation, summation and aggregation are used to obtain the visit-level event embeddings: Subsequently, the events of each visit are embedded along a time dimension and concatenated into a sequence. This sequence is then input into a GRU time encoder to extract hidden vectors. , and : To avoid current label leakage, only historical medication codes will be retained. The historical drug use characteristics at the current moment are obtained through linear transformation mapping.
[0028] Furthermore, the patient representation is obtained by concatenating the time codes of diagnosis and treatment along the feature dimension. : Among them, it means Vector concatenation operation It is a feedforward neural network. It is a learnable embedding matrix.
[0029] S2. Based on patient representation, retrieve similar cases across patients from the entire medical record data, and use an attention mechanism to weighted aggregate the prescription information of similar cases to form a transferable prescription evidence score; S21, as Figure 1 As shown in B, two learnable memory bases are maintained: a historical medical record representation base and a... and historical prescription database In the initial state, the representation library is formed by expanding the representation of the first patient, and during the training process, the representation library is continuously updated as patient medical records are continuously input.
[0030] S22, compare the current patient vector with the historical medical record representation library. The data is stitched together using a learnable multilayer perceptron. Obtain the similarity score : Then select Similar medical records collection This enables cross-patient conditional retrieval.
[0031] S23, using an attention mechanism Aggregate candidate set Medical records in the records, and through Obtain weights Candidate medical record prescription vectors The prescription evidence score based on global historical memory is obtained by linearly summing the weights: S24, during training, only backpropagates gradients to the selected Top-K items, enabling the retrieval and aggregation modules to learn a collaborative strategy of "what to retrieve" and "how to contribute" within an end-to-end framework.
[0032] S3. Construct a unified coding framework for molecular graphs, molecular substructure graphs, EHR co-prescription graphs, and DDI interaction graphs to mine drug structural features, clinical combination patterns, and safety constraints, and integrate structural and relational evidence through a collaborative fusion mechanism to form a multi-dimensional drug knowledge representation. S31, each drug is represented by its unique molecular structure. In the raw data, the molecular structure is usually obtained by parsing SMILES encoding, and the molecular graph set is represented by a triplet of (molecular fingerprint index, molecular adjacency matrix, molecular size). .like Figure 1 As shown in Figure D, a molecular graph neural network (MPNN) is used to perform message passing and updating of the molecular graph. First, molecular fingerprints are embedded, then two layers of linear updates are performed, and finally, molecular-level vectors are aggregated according to molecular size. These vectors are then aligned to the drug space through a linear transformation to form a global molecular embedding vector. : In forward transmission, the patient's expression and Calculate the similarity and normalize it to obtain the relevance weight of drug molecular structure to patient representation. : Then, molecular structure matching of drugs is achieved, using a masked linear layer for implicit modeling of the molecule-drug correlation matrix. To obtain the correlation weight of molecular structure at the drug level. : Subsequently, the molecular structure is activated and converged at the drug level, forming local structural evidence. This evidence is consistent with... Matching strength is coupled element-wise to ultimately obtain drug fractions at the molecular structure level. : in, This represents element-wise matrix multiplication. and It is a learnable embedding matrix.
[0033] S32, using BRICS to decompose the chemical molecules of all drugs into chemical substructures, obtaining a set of substructure diagrams. Each row represents an embedding vector for a specific substructure; construct the drug-substructure association matrix. ;use This type of graph neural network encodes each substructure to obtain the substructure graph-level embedding. : A ensemble attention module is applied to model the higher-order interaction relationships between substructures, resulting in the embedding of substructures at the medication level. : in, Represents the standard self-attention mechanism. Normalization is represented. To ensure no information loss and prevent gradient vanishing during training, residual layers are used as connections. These are then correlated with patient representations to obtain medication scores at the substructure level. : in, This represents element-wise matrix multiplication. This represents the activation function. This represents a feedforward neural network.
[0034] S33 introduces prior knowledge graphs into the model, including EHR drug co-occurrence graphs and DDI adverse drug reaction graphs, given an adjacency matrix. This invention employs graph convolutional networks to model the interactions between drugs. For the input drug properties... Adjacency matrix of drug relationships , Able to output updated drug representation: , It is the identity matrix. yes The diagonal matrix. Then, the present invention is based on the adjacency matrix. and A two-layer GCN is used to model the relationships between drugs: in, and It is a learnable parameter matrix.
[0035] Finally, this invention integrates the relationship between two drugs. and To obtain the prior knowledge representation of the relation This method combines prior medical knowledge with patient representations to generate relational prior scores. .
[0036] in, These are learnable weight parameters.
[0037] S34. In a unified latent space, a cross-attention interaction is constructed using molecular scores as queries and substructure scores as keys to obtain gating correction terms for the judgment of global structure based on local evidence. The robust backtracking path of the molecular structure backbone is preserved through residual connections, thereby forming a molecular-substructure collaborative fusion score.
[0038] S4. A residual fusion framework is adopted to jointly decode the patient's corresponding diagnosis and treatment needs, the prescription evidence of the global case, and the drug knowledge encoded by multiple graphs. By balancing the effectiveness of recommendations and the safety of medication through a multi-objective loss function, and combined with an inference threshold strategy, a final drug combination recommendation with controllable risk and close to clinical reality is generated.
[0039] S41, in the main pathway, scores are based on molecular-level drug delivery. As a benchmark, select the most similar medication record from the current patient's medical history. Through learnable parameters Add them together, and then merge the prior scores of the relationship. Taking medication safety into account, the core medication score is then obtained. : S42, Lateral pathway information based on prescription evidence score using global historical memory. Score for synergistic fusion of molecular and substructure By fusing residual-based learnable weighted summaries with main path information, a drug combination recommendation is ultimately obtained. : S43 applies a threshold to the final recommendation vector to generate drug selection results, thereby outputting executable drug combination recommendations with unified rules.
[0040] S44 jointly optimizes the multi-label prediction objective and the multi-label interval constraint objective to improve ranking and discrimination capabilities. Simultaneously, it introduces an adverse interaction penalty term based on DDI adjacency relationships as a safety regularization, enabling the model to suppress the co-occurrence of high-risk drugs while improving effectiveness. In the drug advancement task, the ResGMS model is treated as a multi-label binary classification model, employing an end-to-end training approach. Multiple loss functions are introduced during training to predict each drug in the drug combination. The model uses binary cross-entropy loss, as follows: in, and Represent the target drug label and the output drug characterization vector, respectively. Each element. To optimize the model's prediction results, a multi-label loss is introduced. To ensure that the true label is one boundary value larger than other labels, as follows: In the formula, This represents the number of elements in the multi-hot encoded drug vector set. Furthermore, considering the prediction loss and adverse drug interactions, the adverse drug interaction loss is used as follows: in, Let be the adjacency matrix of adverse drug interactions, representing the adverse interaction relationship between drug i and drug j.
[0041] Finally, by weighted summation of the various loss terms, training of the multiple loss functions is achieved, and the total loss function is as follows: in, and This is a hyperparameter used to balance the prediction loss with the loss from adverse drug interactions.
[0042] The experimental verification of this invention is based on the publicly available datasets MIMIC-III and MIMIC-IV to ensure the reproducibility and universality of the experiments. To comprehensively verify the effectiveness and safety of the method under different technical approaches, multiple benchmark models, including LR, ECC, LEAP, RETAIN, DMNC, GAMENet, SafeDrug, COGNet, MoleRec, FFBDNet, RASNet, ACDNet, Tran-GAHNNet, and DPID, were selected as controls, covering mainstream technical directions such as instance learning, sequence modeling, memory enhancement, multi-graph knowledge fusion, and molecular structure modeling, forming a comprehensive performance comparison system.
[0043] The experiment adopted a joint evaluation index system, including three types of recommendation accuracy indicators: Jaccard similarity coefficient, average F1 score, and PRAUC, as well as the adverse drug interaction rate (DDIRate), a clinical safety risk indicator, to achieve a dual evaluation of the model's recommendation effectiveness and safety performance.
[0044] To further quantify the contribution of the core components, this invention designed three sets of ablation experiments: ResGMSw / oMulti-Graph: The multi-graph encoding module is removed, and joint encoding and alignment of molecular graphs, molecular substructure graphs, EHR co-prescription graphs and DDI interaction graphs are no longer performed. Only the basic mapping prediction based on patient representation is retained to verify the effect of multi-source external knowledge injection on recommendation performance. ResGMSw / oGlobal-Case: The global history memory module is removed. It no longer maintains cross-patient medical record representation and prescription memory libraries, and only relies on the longitudinal history of a single patient for prediction. It is used to verify the effect of global case retrieval and experience transfer on the model's robustness and coverage in sparse medical record scenarios. ResGMSw / oS-MFusion: Removes the collaborative fusion module of molecular structure score and molecular substructure score, and no longer performs cross-attention interaction and residual correction in a unified latent space. Instead, it uses a simple linear weighting or direct superposition method to verify the nonlinear collaborative mechanism of "global molecular evidence - local substructure evidence" on the benefit of recommendation accuracy and stability.
[0045] The results of the control experiment and the ablation experiment are shown in Tables 1, 2, 3 and 4, respectively.
[0046] Table 1 Table 2 Table 3 Table 4 The control experiments were used to visually compare the overall performance of the present invention with that of various benchmark models in terms of effectiveness and safety. The ablation experiments were used to quantify the specific contributions of three key components—multi-graph encoding, global historical memory, and molecular-substructure synergistic fusion—to the final performance improvement and risk mitigation. The experimental data fully demonstrate the effectiveness and superiority of the method proposed in this invention.
[0047] Furthermore, to further enhance the comprehensiveness and persuasiveness of model validation, Figure 2 , Figure 3 The performance change trends of the model of this invention and various benchmark models during the testing process and the evolution of the Jaccard index during the training process were recorded respectively, which intuitively presents the convergence stability and long-term performance of the model. Figure 4 The heatmap shows the top 50 channels of drug prediction by the model, clearly reflecting the model's ability to identify and recommend different categories of drugs. Figure 5 By visualizing the clinical case analysis based on five historical medical records, the model's medication recommendation effect in real diagnosis and treatment scenarios is presented in a concrete way, further demonstrating the significant advantages of the method of this invention in terms of recommendation accuracy, safety and clinical suitability.
[0048] Example 2: This embodiment provides a Western medicine drug combination recommendation system based on multi-source drug graph collaborative fusion and global case memory enhancement, including: The patient representation generation module performs structured encoding of temporal medical events, including diagnosis, treatment, and historical medication. Through multi-source event embedding, temporal dependency capture, and feature synergistic fusion, it generates a patient representation that can comprehensively characterize the patient's condition and treatment background. The global case evidence aggregation module retrieves similar cases across patients from all medical record data based on patient representations. It then uses an attention mechanism to weighted aggregate prescription information from similar cases, forming a transferable prescription evidence score. The multi-graph drug knowledge coding module constructs a unified coding framework for molecular graphs, molecular substructure graphs, EHR co-prescription graphs, and DDI interaction graphs. It respectively mines drug structural features, clinical combination patterns, and safety constraint relationships. Through a collaborative fusion mechanism, it integrates structural evidence and relational evidence to form a multi-dimensional drug knowledge representation. The residual fusion and medication recommendation generation module adopts a residual fusion framework to jointly decode the patient's corresponding diagnosis and treatment needs, the prescription evidence of the global case, and the drug knowledge encoded by multiple graphs. It balances the effectiveness of recommendations and the safety of medication through a multi-objective loss function and combines an inference threshold strategy to generate a final drug combination recommendation that is risk-controllable and close to clinical practice.
[0049] The above modules can be deployed on the same device or distributed devices; the division of modules is only a functional logic description and does not limit the specific physical boundaries or implementation order.
[0050] Example 3: An electronic device is provided for running the aforementioned "Western Medicine Drug Combination Recommendation Method Based on Multi-Source Drug Map Collaborative Fusion and Global Case Memory Enhancement". The electronic device includes: a processor, a memory, and optional communication interfaces / display devices / input devices, etc.; the memory stores a computer program that can run on the processor, and when the processor executes the program, it implements steps S1 to S4 of the method described in Embodiment 1, specifically including but not limited to: S1. The temporal medical events of diagnosis, treatment and historical medication are structured and encoded. Through multi-source event embedding, temporal dependency capture and feature synergistic fusion, a patient representation that can comprehensively represent the patient's condition and treatment background is generated. S2. Based on patient representation, retrieve similar cases across patients from the entire medical record data, and use an attention mechanism to weighted aggregate the prescription information of similar cases to form a transferable prescription evidence score; S3. Construct a unified coding framework for molecular graphs, molecular substructure graphs, EHR co-prescription graphs, and DDI interaction graphs to mine drug structural features, clinical combination patterns, and safety constraints, and integrate structural and relational evidence through a collaborative fusion mechanism to form a multi-dimensional drug knowledge representation. S4. A residual fusion framework is adopted to jointly decode the patient's corresponding diagnosis and treatment needs, the prescription evidence of the global case, and the drug knowledge encoded by multiple graphs. By balancing the effectiveness of recommendations and the safety of medication through a multi-objective loss function, and combined with an inference threshold strategy, a final drug combination recommendation with controllable risk and close to clinical reality is generated.
[0051] The electronic device hardware can be one of a server, personal computer, workstation, industrial controller, edge computing device, or mobile terminal; the processor can be a general-purpose CPU, GPU, NPU, FPGA, or a combination thereof; the memory can be RAM, ROM, flash memory, or disk array. The device can interact with local / remote data storage (acquiring observation data and outputting inversion results) through a communication interface. The above hardware configuration does not constitute a limitation of the present invention.
[0052] Example 4: A computer-readable storage medium storing a computer program, which, when run on a processor of an electronic device, causes the program to perform the method steps S1 to S4 described in Embodiment 1; the storage medium may be a disk, optical disk, flash memory, solid-state drive, read-only memory, random access memory, or any combination of the above media.
[0053] Application Example 1: Medication Combination Recommendation Scenarios in ICU Clinical Decision Support This invention can be applied to clinical medication decision support scenarios in intensive care units (ICUs), and the specific implementation process is as follows: Data collection: Collect multi-source electronic health record information generated during the patient's continuous medical visits, covering core data such as diagnostic conclusions, treatment measures, and historical medication regimens; Patient representation generation: According to the technical solution of step S1 of the present invention, the construction, embedding, aggregation and time encoding of multi-thermal event representation are completed to generate a unified patient representation that can comprehensively represent the patient's condition and treatment background at the current moment; Multi-graph knowledge encoding: Call the multi-graph encoding module in step S3 to incorporate drug molecular structure diagrams, molecular substructure diagrams, EHR drug co-prescription diagrams, and DDI drug interaction diagrams into a unified framework for representation learning and cross-graph alignment. Using patient representations as queries, drive the calculation of relevance scores for multi-source evidence. Global evidence supplementation: The global historical memory retrieval process in step S2 is executed to retrieve similar cases from the cross-patient case-prescription memory bank. The prescription evidence of similar cases is weighted and aggregated through an attention aggregation mechanism to form a global experience supplementation signal. Recommendation result generation: Following the technical solution in step S4, the multi-source scores are subjected to residual fusion and threshold screening to output the final recommended drug combination.
[0054] Compared to traditional recommendation methods that rely solely on local patient history data or a single knowledge graph, this embodiment can simultaneously consider "molecular mechanism evidence, group prescribing experience, and safety constraints," improving the accuracy of medication recommendations while effectively reducing the risk of adverse drug combinations. It is particularly suitable for real-world ICU clinical scenarios where medical record data is sparse and the diagnosis and treatment process is complex.
[0055] Application Example 2: Hospital Pharmacy Management and Medication Safety Review Scenarios This invention can be applied to medication safety review scenarios in hospital pharmacy departments or prescription review systems. Specific implementation methods are as follows: Safety Relationship Modeling: For the medication regimen to be reviewed, following the technical solution in step S3, construct and call the relationship representation of the DDI interaction diagram and the EHR co-prescription diagram to explicitly model the risk of adverse drug interactions and common clinical combination drug use patterns. Safety constraints are incorporated: During the reasoning process, the aforementioned safety relationships are used as key constraint evidence in the scoring calculation to ensure that medication recommendations fully consider clinical safety. Risk suppression training: Following the technical solution in step S4, a risk penalty optimization objective related to DDI is introduced, so that the model develops a tendency to suppress high-risk drug combinations during the training phase. Review result output: The model output stage prioritizes generating recommendation results that take into account both efficacy and safety, and can realize automated risk assessment, contraindication combination prompts, and alternative drug candidate generation for clinically recommended regimens or existing prescriptions.
[0056] This embodiment can significantly reduce the workload of manual prescription review, improve the consistency and traceability of prescription review, and provide efficient and reliable intelligent support for hospital pharmacy management.
[0057] Application Example 3: Scenario for Mining the Links Between Medical Research and Drug Mechanisms This invention can be applied to research scenarios on drug mechanisms and medication patterns in medical research institutions or data analysis centers. The specific implementation process is as follows: Drug structure evidence modeling: Utilizing the coding capabilities of molecular diagrams and molecular substructure diagrams in step S3, joint modeling is performed on the global molecular structure evidence and local substructure evidence of the drug. Chemical evidence fusion analysis: Through the M–S synergistic fusion mechanism in step S4, the nonlinear complementary relationship between the two types of chemical evidence is characterized, resulting in more interpretable drug characterization and patient-drug matching scores; Prescription pattern mining: Combining the global history memory module in step S2, we can mine prescription migration patterns under similar conditions of patients to provide data support for medication pattern research. Research support: It supports in-depth analysis of research questions such as "consistency of recommendations for similar cases", "substitutability of structurally similar drugs" and "structural factors of high-risk combinations", and can output intermediate information such as structural evidence contribution analysis, similar case search results and prescription evidence aggregation weights.
[0058] This embodiment can not only complete the task of recommending drug combinations, but also provide rich data support and technical support for pharmaceutical mechanism research, clinical pathway optimization and decision rule iteration.
[0059] The above description is merely an optional embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art can make various modifications, equivalent substitutions, or improvements to the input event type and encoding granularity, graph construction method, cross-graph alignment and fusion strategy, memory size and retrieval strategy, threshold selection method, loss weight and optimization objective, and evaluation index set, without departing from the spirit and principles of the present invention; all such modifications, equivalent substitutions, or improvements should be included within the scope of protection of the present invention. Although the claims in this application have been formulated for specific combinations of features, it should be understood that the scope of the present invention also includes any novel feature or any novel combination of features, whether explicit or implicit or any generalized thereof, disclosed herein, regardless of whether it relates to the same scheme in any of the currently claimed claims.
Claims
1. A method for recommending Western medicine drug combinations based on multi-source drug map synergistic fusion and global case memory enhancement, characterized in that, Includes the following steps: The temporal medical events of diagnosis, treatment and historical medication are structured and encoded. Through multi-source event embedding, temporal dependency capture and feature synergistic fusion, a patient representation that can comprehensively represent the patient's condition and treatment background is generated. Based on patient representation, similar cases across patients are retrieved from the entire medical record data. Prescription information of similar cases is weighted and aggregated through an attention mechanism to form a transferable prescription evidence score. A unified coding framework is constructed for molecular graphs, molecular substructure graphs, EHR co-formulation graphs, and DDI interaction graphs to mine drug structural features, clinical combination patterns, and safety constraints, respectively. Structural evidence and relational evidence are integrated through a synergistic fusion mechanism to form a multi-dimensional drug knowledge representation. A residual fusion framework is adopted to jointly decode the patient's corresponding diagnosis and treatment needs, the prescription evidence of the global case, and the drug knowledge encoded by multi-graph. By balancing the effectiveness of recommendations and the safety of medication through a multi-objective loss function and combining it with an inference threshold strategy, a final drug combination recommendation with controllable risk and close to clinical reality is generated.
2. The method for recommending Western medicine drug combinations based on multi-source drug map synergistic fusion and global case memory enhancement according to claim 1, characterized in that, Generate a patient representation that comprehensively characterizes the patient's condition and treatment background, specifically: Learnable embedding matrices are constructed for three types of events: diagnosis, treatment, and medication. The Multi-hot event vectors of each visit are summed and aggregated after index lookup and random deactivation to obtain the visit-level event embedding. Each medical visit event is embedded and concatenated into a sequence along the time dimension, and then input into a time encoder to extract the hidden state representations of diagnosis, treatment, and medication. Only the historical medication codes from the previous moment are retained and linearly mapped to form the historical medication representation available at the current moment; The time codes for diagnosis and treatment are concatenated along the feature dimension and mapped to obtain the patient representation through a feedforward network.
3. The method for recommending Western medicine drug combinations based on multi-source drug map synergistic fusion and global case memory enhancement according to claim 1, characterized in that, The scoring method for forming transferable prescription evidence is as follows: Maintain two types of learnable memories: a historical medical record representation database and a historical prescription database. Continuously receive patient representations and update the memory content as the training process progresses. The current patient representation is concatenated with the historical medical record representation database and then input into a similarity network to obtain a similarity score, which is used to select a Top-K candidate medical record set. An attention aggregation mechanism is introduced into the Top-K candidate medical record set. The prescription vectors corresponding to the candidate medical records are weighted and aggregated by normalized weights to obtain a prescription evidence score based on global historical memory.
4. The method for recommending Western medicine drug combinations based on multi-source drug map synergistic fusion and global case memory enhancement according to claim 1, characterized in that, The method of integrating structural and relational evidence through a collaborative fusion mechanism is as follows: The molecular graph set obtained by parsing drug molecular structures using SMILES is input into a molecular graph neural network for message passing and aggregation to form a global molecular embedding. The molecular structure matching weight is calculated using the patient representation as the query. The "molecule-drug" association matrix is implicitly modeled through masked linear mapping to obtain the drug use score at the molecular structure level. Drug molecules are decomposed into substructures to obtain a set of substructure graphs. A substructure graph encoding network is used to learn substructure embeddings, and high-order interaction relationships between substructures are modeled through set self-attention. Patient representations are mapped to substructure weights and coupled with substructure enhancement embeddings to obtain substructure-level medication scores. Based on the adjacency matrix of the EHR coprescription graph and the DDI interaction graph, a graph convolutional network is used to learn the drug relationship representation, and the two types of relationship representations are fused to form a relationship prior knowledge representation. The relationship prior score is obtained by using the patient representation as the query. Within a unified latent space, a cross-attention interaction is constructed using molecular scores as queries and substructure scores as keys to obtain gating correction terms for the judgment of global structure based on local evidence. Robust backtracking paths of the molecular structure backbone are preserved through residual connections, forming a molecular-substructure collaborative fusion score.
5. The method for recommending Western medicine drug combinations based on multi-source drug map synergistic fusion and global case memory enhancement according to claim 1, characterized in that, The method for generating final drug combination recommendations that are risk-controlled and closely aligned with clinical practice is as follows: Using molecular structure score as the main baseline, relational prior score is introduced to explicitly consider medication safety, and the most similar medication record in the current patient's history is combined for matching enhancement to obtain the main comprehensive medication score. The prescription evidence score based on global historical memory and the molecular-substructure synergistic fusion score are used as two side gain, which are superimposed on the main comprehensive drug score in a residual manner through learnable weights to obtain the final drug combination recommendation vector, and the output score is nonlinearly rectified. A threshold is applied to the final recommendation vector to generate drug selection results; The drug use multi-label prediction objective and the multi-label interval constraint objective are jointly optimized, and an adverse interaction penalty term based on DDI adjacency relationship is introduced as a safety regularization.
6. The method for recommending Western medicine drug combinations based on multi-source drug map synergistic fusion and global case memory enhancement according to claim 4, characterized in that, The molecular structure level of drug use is scored as follows: in, This represents element-wise matrix multiplication. This represents the association weight of the substructure at the drug level. The relevance weights of drug molecular structure to patient representation are given. and It is a learnable embedding matrix. For molecular global embedding vectors, A collection of molecular diagrams. To the patient, A molecular-drug correlation matrix; Substructure hierarchy medication score: in, For substructure weights, Enhance the embedding of substructures, For the original embedding of the substructure graph, For standard self-attention mechanisms, , These are the query matrix, key matrix, and value matrix for input X, respectively. It is the Sigmoid activation function. Based on self-attention fusion, This represents a feedforward neural network.
7. The method for recommending Western medicine drug combinations based on multi-source drug map synergistic fusion and global case memory enhancement according to claim 6, characterized in that, The overall medication score for the main trunk is as follows: in, Score the drug use based on the molecular structure level. Prior scores for relations. This is the most similar medication record in the current patient's history; These are learnable weight parameters; Final medication combination recommendation vector for: in, For prescription evidence scores based on global historical memory, Scoring is given for the coordinated fusion of molecular and substructures; , These are learnable weight parameters.
8. A Western medicine drug combination recommendation system based on multi-source drug graph collaborative fusion and global case memory enhancement, characterized in that, include: The patient representation generation module performs structured encoding of temporal medical events, including diagnosis, treatment, and historical medication. Through multi-source event embedding, temporal dependency capture, and feature synergistic fusion, it generates a patient representation that can comprehensively characterize the patient's condition and treatment background. The global case evidence aggregation module retrieves similar cases across patients from all medical record data based on patient representations. It then uses an attention mechanism to weighted aggregate prescription information from similar cases, forming a transferable prescription evidence score. The multi-graph drug knowledge coding module constructs a unified coding framework for molecular graphs, molecular substructure graphs, EHR co-prescription graphs, and DDI interaction graphs. It respectively mines drug structural features, clinical combination patterns, and safety constraint relationships. Through a collaborative fusion mechanism, it integrates structural evidence and relational evidence to form a multi-dimensional drug knowledge representation. The residual fusion and medication recommendation generation module adopts a residual fusion framework to jointly decode the patient's corresponding diagnosis and treatment needs, the prescription evidence of the global case, and the drug knowledge encoded by multiple graphs. It balances the effectiveness of recommendations and the safety of medication through a multi-objective loss function and combines an inference threshold strategy to generate a final drug combination recommendation that is risk-controllable and close to clinical practice.
9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and running thereon, characterized in that, When the processor executes the program, it implements the Western medicine drug combination recommendation method based on multi-source drug graph synergistic fusion and global case memory enhancement as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the Western medicine drug combination recommendation method based on multi-source drug graph synergistic fusion and global case memory enhancement as described in any one of claims 1-7.