A method, apparatus, electronic device, and storage medium for recommending a drug

By constructing heterogeneous medical graphs and semantic vectors, and utilizing graph convolutional neural networks and Transformer encoding, the problem of insufficient utilization of structured medical knowledge in existing drug recommendation methods is solved, thereby improving the recommendation ability for low-frequency drugs and the safety of drug combinations.

CN121281868BActive Publication Date: 2026-03-10SICHUAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing deep learning-based drug recommendation methods are insufficient in utilizing structured medical knowledge and struggle to capture relationships between complex information. This results in weak recommendation capabilities for low-frequency and new drugs, lagging drug safety control, and the potential for high-risk combinations.

Method used

Heterogeneous medical graphs and semantic vectors are constructed, and multi-message propagation is performed through graph convolutional neural networks. Combined with temporal Transformer encoding, knowledge memory vectors are generated, and adjacency matrices of drug interactions are introduced to control the safety of drug combinations.

Benefits of technology

It enhances the ability to recommend low-frequency and unseen drugs, improves the safety of drug combinations and the accuracy of recommendations, and effectively avoids the risk of adverse drug interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121281868B_ABST
    Figure CN121281868B_ABST
Patent Text Reader

Abstract

This application relates to the field of intelligent drug recommendation technology, and provides a drug recommendation method, device, electronic device, and storage medium, including: performing time-series encoding processing on the patient's current medical information to generate a semantic vector of the current medical information; determining knowledge memory vectors of various medical entities by performing multi-message propagation processing on a heterogeneous medical graph based on a graph convolutional neural network, and determining a knowledge vector of the current medical information based on the knowledge memory vector; determining fusion information based on the semantic vector and the knowledge vector; inputting the fusion information into a drug recommendation model, performing probability calculation processing on the fusion information for new drug use and probability calculation processing for historical drug retention, and determining a drug combination to recommend to the patient based on the determined probability of each drug being added, the probability of each historical drug being retained, and the adjacency matrix of drug interactions. This improves the safety of drug combinations and effectively enhances the accuracy of drug recommendations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent drug recommendation technology, and in particular to a drug recommendation method, apparatus, electronic device and storage medium. Background Technology

[0002] With the widespread adoption of Electronic Health Records (EHRs) in healthcare institutions, data-driven intelligent drug recommendation systems have become an important tool to assist physicians in developing rational medication regimens. The drug recommendation task aims to automatically generate prescription combinations that both conform to disease characteristics and ensure medication safety based on the patient's medical history, current diagnosis, and treatment information.

[0003] In existing technologies, many methods have utilized deep learning to assist physicians in drug recommendation. Its ability to capture relationships between complex information is well-suited for processing the rich information contained in EHR data, thereby assisting clinicians in making more accurate medication decisions. Despite these advantages, existing deep learning drug recommendation methods still have certain limitations: 1. Insufficient utilization of structured medical knowledge: Existing methods typically rely solely on sequence information in EHRs or simply introduce external DDI knowledge graphs. Pure sequence modeling methods struggle to capture such implicit clinical logic, resulting in weak recommendation capabilities for low-frequency and new drugs. 2. Coarse-grained historical drug reuse mechanisms: Most models compress historical information into a single patient vector or adopt a uniform replication strategy, easily leading to unreasonable continuation or omission of key drugs. 3. Lagging and insufficient drug safety control: Although some methods attempt to introduce Drug-Drug Interaction (DDI) knowledge, their safety constraints are mostly reflected in post-processing rules or hard penalty terms in the loss function, resulting in the possibility of high-risk combinations in the recommendation results. Therefore, how to model the continuation and addition behavior of drugs in a refined manner during the drug recommendation process, and how to proactively avoid the risk of adverse drug interactions during the generation stage, has become the core technical challenge facing current intelligent drug recommendation systems. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a drug recommendation method, device, electronic device and storage medium, which enables the model to understand the complex semantic relationships between medical entities from a global perspective by constructing a heterogeneous medical graph and semantic vectors, determine the continuation and addition behavior of drugs, enhance the recommendation ability for low-frequency drugs and unseen drugs, introduce an adjacency matrix of drug interactions to improve the safety of drug combinations, and effectively improve the accuracy of drug recommendation.

[0005] This application provides a drug recommendation method, which includes:

[0006] The current medical information in the patient's longitudinal electronic health record is processed by temporal Transformer encoding to generate a semantic vector of the patient's current medical information;

[0007] Based on graph convolutional neural networks, multi-message propagation processing is performed on a heterogeneous medical graph to determine the knowledge memory vectors of various medical entities, and the knowledge vector of the current medical information is determined based on the knowledge memory vectors; wherein, the heterogeneous medical graph is a multi-relationship medical heterogeneous graph of diagnostic entities, surgical entities, and drug entities;

[0008] The semantic vector and the knowledge vector are fused to determine the fused information;

[0009] The fused information is input into the drug recommendation model, and the probability of new drugs being used and the probability of historical drugs being retained are calculated. Based on the determined probability of each drug being added, the probability of each historical drug being retained, and the adjacency matrix of drug interactions, a drug combination recommended to the patient is determined. The drug recommendation model is obtained by iteratively training a deep learning network model.

[0010] In one possible implementation, the heterogeneous medical graph is constructed through the following steps:

[0011] Obtain a group electronic health record dataset; wherein the group electronic health record dataset contains the longitudinal electronic health records of multiple patients;

[0012] Multiple types of medical entities are extracted from the group's electronic health record dataset, and a node set is constructed based on the medical entities; wherein, the node set includes at least diagnostic information nodes, surgical information nodes, and drug information nodes;

[0013] Based on the co-occurrence relationships, temporal transition relationships, and drug interaction relationships among various types of medical entities, multiple different types of edges are established;

[0014] Based on the set of nodes and various types of edges, the heterogeneous medical graph is constructed.

[0015] In one possible implementation, the establishment of various types of edges based on co-occurrence relationships, temporal transition relationships, and drug interaction relationships among multiple types of medical entities includes:

[0016] If two medical entities appear simultaneously within a fixed time window, a co-occurrence relationship is determined between the two medical entities, and a co-occurrence edge between the two medical entities is constructed; wherein, the weight of the co-occurrence edge is determined based on the co-occurrence frequency;

[0017] If the frequency of transitions between the medical entities in adjacent medical records is determined, a temporal transition relationship is determined between the two medical entities, and a temporal edge between the two medical entities is constructed; wherein, the weight of the temporal edge is determined based on the transition frequency;

[0018] If the drug interaction relationship between the two medical entities is determined to be a risk relationship of known adverse interaction, a safety constraint edge is constructed between the two medical entities; wherein, a learnable inhibition coefficient is set on the safety constraint edge.

[0019] In one possible implementation, the process of calculating the probability of new drug use and the probability of historical drug use being retained in the fused information, based on determining the probability of new use of each drug, the probability of retention of each historical drug, and the adjacency matrix of drug interactions, determines a recommended drug combination for the patient, including:

[0020] The probability of each drug being added to the list of drugs is calculated in parallel based on the fused information from a pre-defined complete drug vocabulary.

[0021] Based on the fused information, the relevance and timeliness of historical drugs in the current medical information are determined, and the probability of each historical drug being retained and used is generated.

[0022] The probability fusion of the newly added use probability of the drug and the retention probability of the historical drug is performed based on the causal union formula, and the fused probability is regularized based on the adjacency matrix to determine the comprehensive recommendation confidence of each drug.

[0023] The final recommended drug combination to the patient is determined based on the overall recommendation confidence level.

[0024] In one possible implementation, the step of calculating the probability of each drug being added to the drug list in parallel based on the fused information on a pre-defined complete drug vocabulary includes:

[0025] For each drug to be queried in the complete drug vocabulary, a query vector is constructed, and the query vector is encoded based on a multi-head attention mechanism to determine the first query vector after encoding of the drug to be queried.

[0026] Each encoded first query vector is subjected to cross-attention processing with the diagnostic fusion information and surgical fusion information in the fusion information, and the information after cross-attention processing is added to determine the target information of the drug to be queried.

[0027] The target information of the drug to be queried is processed by a linear layer, and the new score of each drug to be queried is output, which is then converted into the probability of being added and used by the Sigmoid function.

[0028] In one possible implementation, determining the relevance and timeliness of historical medications in the current medical information based on fused information, and generating the probability of retaining each historical medication, includes:

[0029] The diagnostic fusion information and surgical fusion information in the fusion information are concatenated to determine the second query vector;

[0030] Obtain the embedding vectors of all historical medications prior to the current medical visit, and calculate the content similarity between the second query vector and the embedding vectors of each historical medication.

[0031] Based on the difference between the content similarity and the time decay penalty value of the historical drug, the probability of the historical drug being retained is determined; wherein, the time decay penalty value increases with the increase of the time distance between the consultation where the historical drug was located and the current consultation information.

[0032] In one possible implementation, the drug recommendation model is determined through the following steps:

[0033] Obtain the patient's sample medical information and historical medical records;

[0034] The sample medical information and the historical medical sequence are input into a deep learning network model to generate a comprehensive recommendation confidence score for each drug.

[0035] The drug recommendation model is generated by end-to-end training of a deep learning network model by minimizing the total loss function; wherein, the total loss function includes a binary cross-entropy loss term and an expected drug interaction regularization term, the expected drug interaction regularization term is used to predict the probability distribution, so as to actively suppress the simultaneous high-probability recommendation of drug combinations with known adverse interactions.

[0036] This application embodiment also provides a drug recommendation device, the drug recommendation device comprising:

[0037] The first encoding module is used to perform temporal Transformer encoding on the current medical information in the patient's longitudinal electronic health record to generate a semantic vector of the patient's current medical information.

[0038] The second encoding module is used to determine the knowledge memory vectors of various medical entities by performing multi-message propagation processing on a heterogeneous medical graph based on a graph convolutional neural network, and to determine the knowledge vector of the current medical information based on the knowledge memory vectors; wherein, the heterogeneous medical graph is a multi-relationship medical heterogeneous graph of diagnostic entities, surgical entities and drug entities;

[0039] The information fusion module is used to fuse the semantic vector and the knowledge vector to determine the fused information;

[0040] The drug combination determination module is used to input the fused information into the drug recommendation model, and to perform probability calculations on the fused information for the probability of new drugs being used and the probability calculations on the probability of historical drugs being retained. Based on the determined probability of each drug being added to the list, the probability of each historical drug being retained, and the adjacency matrix of drug interactions, the module determines the drug combination to be recommended to the patient. The drug recommendation model is obtained by iteratively training a deep learning network model.

[0041] This application also provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the drug recommendation method described above are performed.

[0042] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the drug recommendation method described above.

[0043] This application provides a drug recommendation method, apparatus, electronic device, and storage medium. The drug recommendation method includes: performing temporal Transformer encoding on the current medical information in a patient's longitudinal electronic health record to generate a semantic vector of the patient's current medical information; determining knowledge memory vectors of various medical entities by performing multi-message propagation processing on a heterogeneous medical graph based on a graph convolutional neural network, and determining a knowledge vector of the current medical information based on the knowledge memory vectors; wherein, the heterogeneous medical graph is a multi-relationship medical heterogeneous graph of diagnostic entities, surgical entities, and drug entities; fusing the semantic vectors and the knowledge vectors to determine fusion information; inputting the fusion information into a drug recommendation model, performing probability calculation processing on the fusion information for new drug use and probability calculation processing for historical drug retention, and determining a drug combination to recommend to the patient based on the determined probability of new use of each drug, probability of retention of each historical drug, and adjacency matrix of drug interactions; wherein, the drug recommendation model is obtained by iteratively training a deep learning network model. By constructing a heterogeneous medical graph and semantic vectors, the model can understand the complex semantic relationships between medical entities from a global perspective, determine the continuation and addition behavior of drugs, enhance the recommendation ability for low-frequency drugs and unseen drugs, introduce an adjacency matrix of drug interactions to improve the safety of drug combinations, and effectively improve the accuracy of drug recommendations.

[0044] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0045] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 A flowchart illustrating a drug recommendation method provided in this application embodiment;

[0047] Figure 2 This is one of the structural schematic diagrams of a drug recommendation device provided in the embodiments of this application;

[0048] Figure 3 This is a second schematic diagram of the structure of a drug recommendation device provided in an embodiment of this application;

[0049] Figure 4This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.

[0051] First, the applicable scenarios for this application will be introduced. This application can be applied to the field of intelligent drug recommendation technology.

[0052] Based on this, embodiments of this application provide a drug recommendation method. By constructing a heterogeneous medical graph and semantic vectors, the model can understand the complex semantic relationships between medical entities from a global perspective, determine the continuation and addition behavior of drugs, enhance the recommendation ability for low-frequency drugs and unseen drugs, introduce an adjacency matrix of drug interactions to improve the safety of drug combinations, and effectively improve the accuracy of drug recommendations.

[0053] Please see Figure 1 , Figure 1 This is a flowchart illustrating a drug recommendation method provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the drug recommendation method includes:

[0054] S101: Perform temporal Transformer encoding on the current medical information in the patient's longitudinal electronic health record to generate a semantic vector of the patient's current medical information.

[0055] In this step, for the first The information entered for the next medical visit Historical drugs Embedded representation is performed, and then processed by a Transformer encoder including positional encoding to form a patient-level semantic vector. Wherein, , These are diagnostic information and surgical information, respectively. This is a collection of diagnostic information for the patient. For surgical information collection, It is a collection of drug information.

[0056] Here, in order for the model to perceive the order relationship of medical visits, sine-cosine positional encoding of the access level is introduced. The positional encoding is assigned to each medical visit, thereby integrating temporal information into all medical entities of that visit.

[0057] It should be noted that the longitudinal electronic health record (EHR) of a patient consists of a series of clinical events (such as diagnoses, surgeries, medications) during multiple medical visits. Suppose there is a longitudinal EHR dataset of patients. Among them, the visit sequence of the -th patient is denoted as , where is the number of visits of this patient, and is the first visit information of patient . Suppose diagnoses, surgeries, and medications are respectively , and a medical visit is represented as a triple , where

[0058] are respectively the sets of diagnosis information, surgery information, and prescribed medications for the current visit.

[0059] In this step, a graph convolutional neural network is used to perform multi-message propagation processing on the heterogeneous medical graph to determine the knowledge memory vectors of various medical entities, and the knowledge vector of the current visit information is determined based on the knowledge memory.

[0060] Here, through the multi-relational message propagation mechanism of the Graph Convolutional Network (GCN), it is used to perform structured knowledge extraction on the pre-constructed heterogeneous medical graph and generate knowledge memory vectors for three types of medical entities: diagnoses, surgeries, and medications. The encoding of the knowledge memory vectors reflects prior medical knowledge such as co-occurrence patterns, temporal dependencies, and safety constraints between cross-type medical entities, and can be repeatedly invoked in subsequent drug recommendation tasks, significantly improving the model's understanding ability and generalization performance of clinical semantics.

[0061] Among them, it is defined that the type-specific initial features include obtaining type-aware knowledge vectors using multi-relational message passing:

[0062]

[0063]

[0064] Among them These represent the initial feature representations of nodes of each type (diagnosis, surgery, drug) after layer 0. An embedded representation of diagnostic information. This is an embedded representation of surgical information. This is an embedded representation of medication information. It is nonlinear; Normalized adjacency matrix for partitioning by relation and type The output type-specific knowledge memory vector is . , as well as The first Knowledge memory vectors for diagnostic entities, surgical entities, and drug entities at the lower level.

[0065] It should be noted that the multi-message propagation process involves performing multiple rounds of iterative message passing operations on the heterogeneous medical graph. A type-aware and relation-specific graph convolution function is used to aggregate information from neighboring nodes under different relations in each layer. For DDI relations, a learnable inhibition coefficient is introduced to adjust its influence in message propagation. This design allows the model to dynamically balance the conflict between "high-frequency co-occurrence" and "high-risk combinations" during training, avoiding the mislearning of drug pairs with serious adverse reactions as positive cooperative relationships. After multi-layer graph convolution, the final node representation is obtained. These nodes are then recorded as knowledge memory vectors for diagnosis, surgery, and drug entities, respectively, forming a knowledge lookup table.

[0066] In one possible implementation, the heterogeneous medical graph is constructed through the following steps:

[0067] (1): Obtain a group electronic health record dataset; wherein the group electronic health record dataset contains the longitudinal electronic health records of multiple patients;

[0068] (2): Extract various types of medical entities from the group electronic health record dataset, and construct a node set based on the medical entities; wherein the node set includes at least diagnostic information nodes, surgical information nodes and drug information nodes.

[0069] It should be noted that the node set , A set of nodes for diagnostic information. For the set of nodes of surgical information, This is a set of nodes for drug information.

[0070] (3): Based on the co-occurrence relationship, temporal transition relationship and drug interaction relationship among various types of medical entities, establish various types of edges.

[0071] Here, various types of edges are established based on the co-occurrence relationships, temporal transition relationships, and drug interaction relationships among multiple types of medical entities.

[0072] It should be noted that co-occurrence relationships are defined as follows: if two different or similar medical entities co-occur in the same medical record, an undirected edge is established. For example, "hypertension" (diagnosis) and "amlodipine" (medication) appear simultaneously in a single outpatient visit. The edge weight is calculated based on the normalized co-occurrence frequency. Temporal transition relationships are defined as follows: if a medical entity appears consecutively in two adjacent medical visits, or exhibits a typical continuation pattern (such as long-term medication for chronic diseases), a directed edge is established to reflect its temporal dependence. The edge weight is normalized based on the transition frequency. Drug interaction relationships are defined as follows: based on a pre-defined DDI knowledge base, directed edges are added for drug pairs with known adverse interactions, forming a safety constraint subgraph.

[0073] In one possible implementation, the establishment of various types of edges based on co-occurrence relationships, temporal transition relationships, and drug interaction relationships among multiple types of medical entities includes:

[0074] A: If two medical entities appear simultaneously within a fixed time window, a co-occurrence relationship is determined between the two medical entities, and a co-occurrence edge between the two medical entities is constructed; wherein, the weight of the co-occurrence edge is determined based on the co-occurrence frequency.

[0075] Here, co-occurrence edges represent the co-occurrence of medical entities across different types or within the same type. D P ),( D M),( P M ),( D D ),( P P ),( M M) If two medical entities co-occur within the same consultation or fixed window, an undirected edge is established, and the edge weight is calculated from the normalized co-occurrence frequency. D For diagnostic information entities, P As a surgical information entity, M It is a drug information entity.

[0076] B: If the frequency of transitions between the medical entities in adjacent medical records is determined, then a temporal transition relationship is determined between the two medical entities, and a temporal edge between the two medical entities is constructed; wherein, the weight of the temporal edge is determined based on the frequency of transitions.

[0077] Here, the temporal edge represents the transfer between adjacent medical visits. By normalizing edge weights according to transition frequency, directed edges are constructed, reflecting their temporal dependencies. Edge weights are row-normalized based on transition frequency. Number of medical visits.

[0078] C: If the drug interaction relationship between the two medical entities is determined to be a known adverse interaction risk relationship, a safety constraint edge is constructed between the two medical entities; wherein, a learnable inhibition coefficient is set on the safety constraint edge.

[0079] Here, directed edges are added to drug pairs with known adverse interactions, forming a safety constraint subgraph. For example, if the drug information entity... If adverse drug interactions exist, then construct... To avoid learning the dangerous co-prescriptions as a "positive correlation," a learnable inhibition coefficient is introduced into the DDI relationship: In actual dissemination Participate in message passing, Risk relationship of adverse interactions This represents the DDI suppression coefficient. , Drug entity information The matrix of directed edges between them.

[0080] (4): Based on the set of nodes and various types of edges, the heterogeneous medical graph is constructed.

[0081] In this application, a heterogeneous medical graph covering three types of entities—diagnosis, surgery, and drugs—was constructed, explicitly integrating various types of structured knowledge, such as co-occurrence relationships, temporal dependencies, and drug interactions (DDIs), from the EHR data. By introducing a gating mechanism, adaptive fusion of the external knowledge graph and patient sequence representations is achieved, effectively avoiding noise interference and semantic shift problems caused by traditional splicing fusion. This design enables the model to fully utilize potential clinical prior knowledge, significantly enhancing its understanding of rational drug use patterns in complex conditions, especially demonstrating stronger generalization ability in low-frequency drug and rare combination scenarios.

[0082] S103: The semantic vector and the knowledge vector are fused to determine the fused information.

[0083] In this step, the semantic vector is adaptively fused with the knowledge vectors of the corresponding diagnostic and surgical entities retrieved from the knowledge memory vector through a gating mechanism to obtain fused information.

[0084] Here, adaptive fusion is performed using the following formula:

[0085]

[0086] in, In order to integrate information, For gating weights, This is a semantic vector representing the patient's current number of medical visits. This is the knowledge vector for the retrieved corresponding diagnosis and surgical entities.

[0087] S104: Input the fusion information into the drug recommendation model, and perform probability calculation processing on the fusion information for new drugs to be used and probability calculation processing for historical drugs to be retained. Based on the determination of the probability of each drug being added to the use, the probability of each historical drug being retained, and the adjacency matrix of drug interactions, determine the drug combination to be recommended to the patient.

[0088] In this step, the fused information is input into the drug recommendation model. The probability of new drugs being used and the probability of historical drugs being retained are calculated separately. Based on the probability of each drug being added, the probability of each historical drug being retained, and the adjacency matrix of drug interactions, the drug combination recommended to the patient is determined.

[0089] It should be noted that the adjacency matrix of drug interactions directly affects the regularization term of the predicted probability. ,in Indicates drug and There is an interaction.

[0090] Here, the drug recommendation model is obtained by iteratively training a deep learning network model.

[0091] In one possible implementation, the process of calculating the probability of new drug use and the probability of historical drug use being retained in the fused information, based on determining the probability of new use of each drug, the probability of retention of each historical drug, and the adjacency matrix of drug interactions, determines a recommended drug combination for the patient, including:

[0092] a: Calculate the probability of each drug being added to the list of drugs in parallel using the fused information on a pre-defined complete drug vocabulary.

[0093] Here, the probability of each drug being added to the database is calculated in parallel based on the fusion information on a pre-defined complete drug vocabulary, identifying new drugs that are not present in the patient's history but are currently clinically relevant.

[0094] In one possible implementation, the step of calculating the probability of each drug being added to the drug list in parallel based on the fused information on a pre-defined complete drug vocabulary includes:

[0095] (1): Construct a query vector for each drug to be queried in the complete drug vocabulary, encode the query vector based on the multi-head attention mechanism, and determine the first query vector after encoding the drug to be queried.

[0096] Here, the first query vector after encoding is determined by the following formula:

[0097]

[0098] in For the drug to be searched in the complete drug glossary The query vector, It is the basic embedding layer. It is the memorization of drug knowledge obtained from heterogeneous medical diagrams. For vector dimensions.

[0099] Here, in order to model the intrinsic dependencies between drug tags (such as combination therapy patterns), we first perform drug queries. Applying multi-head self-attention ( After obtaining the code of the drug to be queried, the first query vector is obtained. :

[0100]

[0101] (2): Perform cross-attention processing on each encoded first query vector and the diagnostic fusion information and surgical fusion information in the fusion information respectively, and add the information after cross-attention processing to determine the target information of the drug to be queried.

[0102] Here, a dual-cross attention mechanism is used to represent the drug after self-attention encoding. Diagnostic fusion information from the fusion information respectively Information fusion with surgery Cross-attention calculation is performed, and the outputs of the two attentions are added together to obtain the target information of the drug to be queried.

[0103] (3): The target information of the drug to be queried is processed by a linear layer, and the new score of each drug to be queried is output and converted into the probability of being added and used by the Sigmoid function.

[0104] Here, a linear layer is used to map to the vocabulary dimension to obtain the new addition score of all drugs to be queried, and then the Sigmoid function is used to convert it into the probability of being added and used.

[0105] b: Based on the fused information, determine the relevance and timeliness of historical drugs in the current medical information, and generate the probability of each historical drug being retained and used.

[0106] Here, the relevance and timeliness of historical drugs in the current medical information are determined based on the fused information, the probability of each historical drug being retained is generated, and the decision on whether to retain a certain historical drug is made by assessing the continuity of historical drug use.

[0107] In one possible implementation, determining the relevance and timeliness of historical medications in the current medical information based on fused information, and generating the probability of retaining each historical medication, includes:

[0108] I: The diagnostic fusion information and surgical fusion information in the fusion information are concatenated to determine the second query vector.

[0109] Here, the diagnostic fusion information and surgical fusion information are concatenated to obtain the second query vector. :

[0110]

[0111] in and These are respectively based on diagnostic fusion information and surgical fusion information from the current number of procedures. For vector dimensions.

[0112] II: Obtain the embedding vectors of all historical drugs prior to the current medical visit information, and calculate the content similarity between the second query vector and the embedding vectors of each historical drug.

[0113] Here, will Flatten all previously visited drug sequences and obtain their corresponding embedding vectors, then use the second query vector... The content similarity is obtained by linearly projecting the embedding vector of the historical drug onto the same dimension, and then calculating the scaled dot product attention score with the embedding vector of the historical drug.

[0114] III: Based on the difference between the content similarity and the time decay penalty value of the historical drug, the probability of the historical drug being retained and used is determined; wherein, the time decay penalty value increases with the increase of the time distance between the consultation where the historical drug was located and the current consultation information.

[0115] Here, the probability of retaining and using a historical drug is determined based on the difference between content similarity and the time decay penalty value of the historical drug.

[0116] It should be noted that the importance of a medication changes over time. To model this time-sensitivity, a time decay penalty is introduced. The strength of the penalty is proportional to the time distance between the medication and the current medical visit: , It is a drug Historical medical records This is the current medical record index. It is a learnable, greater than zero decay rate. The greater the time distance, the heavier the penalty. For drugs k The time decay penalty value.

[0117] In this application, addressing the lack of collaborative modeling between historical drug reuse and new drug introduction in existing methods, this invention designs a dual-path prediction architecture: the inheritance module combines content similarity and time decay mechanisms to dynamically evaluate the relevance and timeliness of historical drug use, prioritizing the retention of recent and semantically matching continuous medications; the extension module employs a non-autoregressive parallel decoding approach to discover potential new drugs from the entire drug space based on the current medical context. The two branches are fused in the probability domain through a causal union approach, ensuring the stability of the treatment plan while enhancing the responsiveness to changes in the patient's condition, more realistically simulating the doctor's "continuation + adjustment" clinical decision-making logic.

[0118] c: Based on the causal union formula, the probability of the drug being added to the list and the probability of the historical drug being retained are fused, and the fused probabilities are regularized based on the adjacency matrix to determine the comprehensive recommendation confidence of each drug; the final drug combination recommended to the patient is determined based on the comprehensive recommendation confidence.

[0119] Here, the probability of a drug being added to the system and the probability of a historical drug being retained to the system are fused according to the causal union formula, and the fused probabilities are regularized according to the adjacency matrix to determine the comprehensive recommendation confidence of each drug; the drugs corresponding to the comprehensive recommendation confidence of the drugs with a comprehensive recommendation confidence greater than a preset threshold are determined as the final drug combination recommended to the patient.

[0120] It should be noted that traditional fusion methods, such as directly adding probability values, may lead to conflicts between the two modules (e.g., one module strongly recommends adding, while the other strongly recommends not adding). To avoid this, the fusion operation is placed in the probability domain and uses the logic of causal union. Specifically, a drug is ultimately recommended for reasons such as "being newly generated" or "being retained from history." Assuming that the two decision processes of "generation" and "retention" are conditionally independent given the current clinical context, the final recommendation probability can be expressed as:

[0121]

[0122] in It is a drug The probability of being newly added and used, while For drugs The probability of retaining and using the drug. This formula intuitively expresses the fusion idea that "as long as there is at least one path that considers the drug effective, the probability of recommending the drug will eventually increase," and solves the problem that the probability will not exceed 1.

[0123] In one possible implementation, the drug recommendation model is determined through the following steps:

[0124] i: Obtain the patient's sample medical information and historical medical information sequence; input the sample medical information and historical medical information sequence into a deep learning network model to generate a comprehensive recommendation confidence score for each drug.

[0125] Here, the process for processing the confidence level of the comprehensive recommendation is the same as that described above, and will not be repeated here.

[0126] ii: The drug recommendation model is generated by end-to-end training of the deep learning network model by minimizing the total loss function; wherein the total loss function includes a binary cross-entropy loss term and a desired drug interaction regularization term, and the desired drug interaction regularization term is used to predict the probability distribution in order to actively suppress the simultaneous high-probability recommendation of drug combinations with known adverse interactions.

[0127] Here, the expected drug interaction regularization term is... for:

[0128]

[0129] in, For drugs i The overall recommendation confidence level For drugs With drugs The adjacency matrix between them.

[0130] Among them, the binary cross-entropy loss term This represents the loss value between the recommended drug and the actual drug. Total Loss Function for:

[0131]

[0132] Here, β is a hyperparameter used to balance the importance of recommendation accuracy and DDI risk control.

[0133] This application proposes a regularization method based on expected drug interaction (DDI), which directly applies soft constraints to the predicted probability distribution during the training phase, penalizing high-risk drug combinations while preserving the probability of recommendations prioritizing efficacy. Compared to traditional post-processing penalties or hard filtering strategies, this mechanism can proactively avoid adverse drug interactions in end-to-end learning, significantly reducing the incidence of DDI in recommended prescriptions while avoiding excessive sacrifice of recommendation accuracy. Experiments show that this strategy achieves a superior safety-accuracy tradeoff performance compared to mainstream safety-aware models on the MIMIC-III / IV dataset.

[0134] In this application, an integrated design of "knowledge enhancement + dual-path collaboration + intrinsic security" is used to construct an intelligent drug recommendation system that is closer to real clinical practice. This not only improves the accuracy and security of the recommendation results, but also provides a new technical path for the in-depth mining of electronic health records and the development of knowledge-driven medical AI, which has important clinical application prospects and promotion value.

[0135] This application provides a drug recommendation method, which includes: performing temporal Transformer encoding on the current medical information in a patient's longitudinal electronic health record to generate a semantic vector of the patient's current medical information; determining knowledge memory vectors of various medical entities by performing multi-message propagation processing on a heterogeneous medical graph based on a graph convolutional neural network, and determining a knowledge vector of the current medical information based on the knowledge memory vectors; wherein, the heterogeneous medical graph is a multi-relationship medical heterogeneous graph of diagnostic entities, surgical entities, and drug entities; fusing the semantic vector and the knowledge vector to determine fusion information; inputting the fusion information into a drug recommendation model, performing probability calculation processing on the fusion information for new drug use and probability calculation processing for historical drug retention, and determining a drug combination to recommend to the patient based on the determined probability of each drug being added, the probability of each historical drug being retained, and the adjacency matrix of drug interactions; wherein, the drug recommendation model is obtained by iteratively training a deep learning network model. By constructing a heterogeneous medical graph and semantic vectors, the model can understand the complex semantic relationships between medical entities from a global perspective, determine the continuation and addition behavior of drugs, enhance the recommendation ability for low-frequency drugs and unseen drugs, introduce an adjacency matrix of drug interactions to improve the safety of drug combinations, and effectively improve the accuracy of drug recommendations.

[0136] Please see Figure 2 , Figure 3 , Figure 2 This is one of the structural schematic diagrams of a drug recommendation device provided in the embodiments of this application; Figure 3 This is a second schematic diagram of a drug recommendation device provided in an embodiment of this application. Figure 2 As shown, the drug recommendation device 200 includes:

[0137] The first encoding module 210 is used to perform temporal Transformer encoding processing on the current medical information in the patient's longitudinal electronic health record to generate a semantic vector of the patient's current medical information.

[0138] The second encoding module 220 is used to determine the knowledge memory vectors of various medical entities by performing multi-message propagation processing on a heterogeneous medical graph based on a graph convolutional neural network, and to determine the knowledge vector of the current medical information based on the knowledge memory vectors; wherein, the heterogeneous medical graph is a multi-relationship medical heterogeneous graph of diagnostic entities, surgical entities and drug entities;

[0139] The information fusion module 230 is used to fuse the semantic vector and the knowledge vector to determine the fused information;

[0140] The drug combination determination module 240 is used to input the fusion information into the drug recommendation model, and to perform probability calculation processing on the fusion information for the use of new drugs and the retention of historical drugs. Based on the determination of the probability of each drug being added, the probability of each historical drug being retained, and the adjacency matrix of drug interactions, the drug combination recommended to the patient is determined; wherein, the drug recommendation model is obtained by iteratively training a deep learning network model.

[0141] Furthermore, such as Figure 3 As shown, the drug recommendation device 200 also includes a heterogeneous medical graph construction module 250, which constructs the heterogeneous medical graph through the following steps:

[0142] Obtain a group electronic health record dataset; wherein the group electronic health record dataset contains the longitudinal electronic health records of multiple patients;

[0143] Multiple types of medical entities are extracted from the group's electronic health record dataset, and a node set is constructed based on the medical entities; wherein, the node set includes at least diagnostic information nodes, surgical information nodes, and drug information nodes;

[0144] Based on the co-occurrence relationships, temporal transition relationships, and drug interaction relationships among various types of medical entities, multiple different types of edges are established;

[0145] Based on the set of nodes and various types of edges, the heterogeneous medical graph is constructed.

[0146] Furthermore, the heterogeneous medical graph construction module 250 is used to establish various types of edges based on the co-occurrence relationships, temporal transition relationships, and drug interaction relationships among multiple types of medical entities, including:

[0147] If two medical entities appear simultaneously within a fixed time window, a co-occurrence relationship is determined between the two medical entities, and a co-occurrence edge between the two medical entities is constructed; wherein, the weight of the co-occurrence edge is determined based on the co-occurrence frequency;

[0148] If the frequency of transitions between the medical entities in adjacent medical records is determined, a temporal transition relationship is determined between the two medical entities, and a temporal edge between the two medical entities is constructed; wherein, the weight of the temporal edge is determined based on the transition frequency;

[0149] If the drug interaction relationship between the two medical entities is determined to be a risk relationship of known adverse interaction, a safety constraint edge is constructed between the two medical entities; wherein, a learnable inhibition coefficient is set on the safety constraint edge.

[0150] Furthermore, the drug combination determination module 240 is used to perform probability calculations on the fused information for both the probability of new drugs being used and the probability of historical drugs being retained. Based on the determined probability of each drug being added to the list, the probability of each historical drug being retained, and the adjacency matrix of drug interactions, a drug combination recommended to the patient is determined.

[0151] The probability of each drug being added to the list of drugs is calculated in parallel based on the fused information from a pre-defined complete drug vocabulary.

[0152] Based on the fused information, the relevance and timeliness of historical drugs in the current medical information are determined, and the probability of each historical drug being retained and used is generated.

[0153] The probability fusion of the newly added use probability of the drug and the retention probability of the historical drug is performed based on the causal union formula, and the fused probability is regularized based on the adjacency matrix to determine the comprehensive recommendation confidence of each drug.

[0154] The final recommended drug combination to the patient is determined based on the overall recommendation confidence level.

[0155] Furthermore, the drug combination determination module 240 is used to calculate the probability of each drug being added to the fusion information in parallel on a preset complete drug vocabulary:

[0156] For each drug to be queried in the complete drug vocabulary, a query vector is constructed, and the query vector is encoded based on a multi-head attention mechanism to determine the first query vector after encoding of the drug to be queried.

[0157] Each encoded first query vector is subjected to cross-attention processing with the diagnostic fusion information and surgical fusion information in the fusion information, and the information after cross-attention processing is added to determine the target information of the drug to be queried.

[0158] The target information of the drug to be queried is processed by a linear layer, and the new score of each drug to be queried is output, which is then converted into the probability of being added and used by the Sigmoid function.

[0159] Furthermore, the drug combination determination module 240 is used to determine the relevance and timeliness of historical drugs in the current medical information based on the fusion information, and to generate the probability of retaining and using each historical drug:

[0160] The diagnostic fusion information and surgical fusion information in the fusion information are concatenated to determine the second query vector;

[0161] Obtain the embedding vectors of all historical medications prior to the current medical visit, and calculate the content similarity between the second query vector and the embedding vectors of each historical medication.

[0162] Based on the difference between the content similarity and the time decay penalty value of the historical drug, the probability of the historical drug being retained is determined; wherein, the time decay penalty value increases with the increase of the time distance between the consultation where the historical drug was located and the current consultation information.

[0163] Furthermore, such as Figure 3 As shown, the drug recommendation device 200 also includes a model training module 260, which determines the drug recommendation model through the following steps:

[0164] Obtain the patient's sample medical information and historical medical records;

[0165] The sample medical information and the historical medical sequence are input into a deep learning network model to generate a comprehensive recommendation confidence score for each drug.

[0166] The drug recommendation model is generated by end-to-end training of a deep learning network model by minimizing the total loss function; wherein, the total loss function includes a binary cross-entropy loss term and an expected drug interaction regularization term, the expected drug interaction regularization term is used to predict the probability distribution, so as to actively suppress the simultaneous high-probability recommendation of drug combinations with known adverse interactions.

[0167] This application provides a drug recommendation device, comprising: a first encoding module for performing temporal Transformer encoding on current medical information in a patient's longitudinal electronic health record to generate a semantic vector of the patient's current medical information; a second encoding module for performing multi-message propagation processing on a heterogeneous medical graph based on a graph convolutional neural network to determine knowledge memory vectors of various medical entities, and determining a knowledge vector of the current medical information based on the knowledge memory vectors; wherein the heterogeneous medical graph is a multi-relationship medical heterogeneous graph of diagnostic entities, surgical entities, and drug entities; an information fusion module for fusing the semantic vectors and the knowledge vectors to determine fused information; and a drug combination determination module for inputting the fused information into a drug recommendation model, performing probability calculations on the fused information for the probability of new drugs being used and the probability calculations on the probability of historical drugs being retained, and determining a drug combination to recommend to the patient based on the determined probability of each drug being added, the probability of each historical drug being retained, and the adjacency matrix of drug interactions; wherein the drug recommendation model is obtained by iteratively training a deep learning network model. By constructing a heterogeneous medical graph and semantic vectors, the model can understand the complex semantic relationships between medical entities from a global perspective, determine the continuation and addition behavior of drugs, enhance the recommendation ability for low-frequency drugs and unseen drugs, introduce an adjacency matrix of drug interactions to improve the safety of drug combinations, and effectively improve the accuracy of drug recommendations.

[0168] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 400 includes a processor 410, a memory 420, and a bus 430.

[0169] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, they can perform the operations described above. Figure 1 The specific implementation of the drug recommendation method in the illustrated method embodiment can be found in the method embodiment, and will not be repeated here.

[0170] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figure 1 The steps of the drug recommendation method in the illustrated method embodiment can be found in the method embodiment for specific implementation, and will not be repeated here.

[0171] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0172] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

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

[0174] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0175] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0176] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for recommending drugs, characterized in that, The drug recommendation method comprises: performing time series Transformer coding processing on current visit information in a longitudinal electronic health record of a patient to generate a semantic vector of the current visit information of the patient; determining a knowledge memory vector of each medical entity through multi-message propagation processing on a heterogeneous medical graph based on a graph convolutional neural network, and determining a knowledge vector of the current visit information based on the knowledge memory vector; wherein the heterogeneous medical graph is a multi-relation medical heterogeneous graph of diagnosis entities, surgery entities and drug entities; fusing the semantic vector and the knowledge vector to determine fusion information; inputting the fusion information into a drug recommendation model to perform probability calculation processing on the fusion information for new drugs being used and for historical drugs being retained for use, respectively, determining a drug combination recommended to the patient based on the probability of each drug being newly added for use, the probability of each historical drug being retained for use, and an adjacency matrix of drug interactions, comprising: parallelly calculating the probability of each drug being newly added for use on a preset complete drug vocabulary based on the fusion information; determining the relevance and timeliness of historical drugs in the current visit information based on the fusion information to generate the probability of each historical drug being retained for use; performing probability fusion processing on the probability of each drug being newly added for use and the probability of each historical drug being retained for use based on a cause set formula, and performing regularization processing on the fused probability based on the adjacency matrix to determine a comprehensive recommendation confidence of each drug; determining a drug combination ultimately recommended to the patient according to the comprehensive recommendation confidence; wherein the drug recommendation model is obtained by iteratively training a deep learning network model; determining the relevance and timeliness of historical drugs in the current visit information based on the fusion information to generate the probability of each historical drug being retained for use, comprising: splicing diagnosis fusion information and surgery fusion information in the fusion information to determine a second query vector; obtaining embedding vectors of all historical drugs before the current visit information, and calculating content similarity between the second query vector and the embedding vectors of the historical drugs; determining the probability of each historical drug being retained for use based on the difference between the content similarity and a time decay penalty value of the historical drug; wherein the time decay penalty value increases with the increase of the time distance between the visit of the historical drug and the current visit information.

2. The drug recommendation method according to claim 1, characterized by, The heterogeneous medical graph is constructed through the following steps: obtain a population electronic health record dataset; wherein the population electronic health record dataset contains longitudinal electronic health records of multiple patients; extract multiple types of medical entities from the population electronic health record dataset, and construct a node set based on the medical entities; wherein the node set at least includes diagnosis information nodes, surgery information nodes and drug information nodes; establish multiple different types of edges based on co-occurrence relationships, time series transfer relationships and drug interaction relationships between multiple types of medical entities; construct the heterogeneous medical graph based on the node set and multiple different types of edges.

3. The drug recommendation method according to claim 2, characterized by, The multiple types of edges are established based on co-occurrence relationships, time sequence transfer relationships and drug interaction relationships between multiple types of medical entities, including: If two medical entities appear simultaneously within a fixed time window, it is determined that there is a co-occurrence relationship between the two medical entities, and a co-occurrence edge between the two medical entities is constructed; wherein the weight of the co-occurrence edge is determined based on the co-occurrence frequency; If it is determined that the transfer frequency between the medical entities in the adjacent medical information appears, it is determined that there is a time sequence transfer relationship between the two medical entities, and a time sequence edge between the two medical entities is constructed; wherein the weight of the time sequence edge is determined based on the transfer frequency; If it is determined that the drug interaction relationship between the two medical entities is a known adverse interaction risk relationship, a safety constraint edge between the two medical entities is constructed; wherein a learnable inhibition coefficient is set on the safety constraint edge.

4. The drug recommendation method according to claim 1, characterized by, The newly added use probability of each drug is calculated in parallel on the preset complete drug vocabulary based on the fusion information, including: Each query drug on the complete drug vocabulary is queried to construct a query vector, and the query vector is encoded based on a multi-head attention mechanism to determine an encoded first query vector of the query drug; Each encoded first query vector is cross-attention processed with diagnosis fusion information and surgery fusion information in the fusion information, and the cross-attention processed information is added to determine target information of the query drug; The target information of the query drug is processed by a linear layer to output a newly added score of each query drug, which is converted into a newly added use probability by a Sigmoid function.

5. The drug recommendation method of claim 1, wherein, The drug recommendation model is determined by the following steps: Obtain sample medical information and historical medical sequences of a patient; Input the sample medical information and the historical medical sequences into a deep learning network model to generate a sample comprehensive recommendation confidence of each drug recommended; The deep learning network model is trained end-to-end by minimizing a total loss function to generate the drug recommendation model; wherein the total loss function includes a binary cross-entropy loss term and an expected drug interaction regularization term, and the expected drug interaction regularization term is used to predict a probability distribution to actively suppress the simultaneous high probability recommendation of drug combinations with known adverse interactions.

6. A drug recommendation apparatus characterized by comprising: The drug recommendation device includes: A first encoding module for performing time sequence Transformer encoding processing on current medical information in a longitudinal electronic health record of a patient to generate a semantic vector of the current medical information of the patient; A second encoding module for determining a knowledge memory vector of each type of medical entity based on multi-message propagation processing on a heterogeneous medical graph by a graph convolutional neural network, and determining a knowledge vector of the current medical information based on the knowledge memory vector; wherein the heterogeneous medical graph is a multi-relation medical heterogeneous graph of diagnosis entities, surgery entities and drug entities; An information fusion module for fusing the semantic vector and the knowledge vector to determine fusion information; The drug combination determination module is configured to input the fusion information into a drug recommendation model, perform a new drug usage probability calculation process and a historical drug usage probability calculation process on the fusion information respectively, and determine a drug combination recommended to the patient based on a newly added usage probability of each drug, a retained usage probability of each historical drug, and an adjacency matrix of drug interactions, and specifically configured to: parallelly calculate the newly added usage probability of each drug on a preset complete drug vocabulary based on the fusion information; determine the relevance and timeliness of the historical drugs in the current consultation information based on the fusion information, and generate the retained usage probability of each historical drug; perform a probability fusion process on the newly added usage probability of the drug and the retained usage probability of the historical drug based on a cause set formula, and perform a regularization process on the fused probability based on the adjacency matrix, to determine a comprehensive recommendation confidence of each drug; determine a final drug combination recommended to the patient according to the comprehensive recommendation confidence; wherein the drug recommendation model is obtained by iteratively training a deep learning network model; When the drug combination determination module is configured to determine the relevance and timeliness of the historical drugs in the current consultation information based on the fusion information, and generate the retained usage probability of each historical drug, the drug combination determination module is specifically configured to: splice the diagnosis fusion information and the surgery fusion information in the fusion information to determine a second query vector; obtain an embedding vector of all historical drugs before the current consultation information, and calculate a content similarity between the second query vector and the embedding vector of each historical drug; determine the retained usage probability of the historical drug based on a difference between the content similarity and a time decay penalty value of the historical drug; wherein the time decay penalty value increases with an increase in a time distance between the consultation of the historical drug and the current consultation information.

7. An electronic device, comprising: comprise: a processor, a memory, and a bus, the memory storing machine-readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, the machine-readable instructions are executed by the processor to perform the steps of the drug recommendation method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium, and the computer program is executed by the processor to perform the steps of the drug recommendation method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Patient information collection and medical record construction system and method based on multiple rounds of dialogues

    CN120998388A

  • Clinical feature fused graph contrast learning drug recommendation method and system

    CN121011305A