Drug recommendation method and system based on multi-medical knowledge enhancement graph neural network

By using multiple medical knowledge-enhanced graph neural network in the drug recommendation system, more accurate drug representation is generated, and using patient similarity information and co-occurrence probability matrix, the problem of low accuracy of drug recommendation in the existing system is solved, achieving more efficient drug recommendation effects.

CN120164567APending Publication Date: 2025-06-17DALIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510235325.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

The existing drug recommendation system has insufficient physical representation and data utilization, resulting in poor accuracy of drug recommendations and inability to fully realize the potential of medical data.

Method used

A method based on multiple medical knowledge-enhanced graph neural network is adopted to generate more accurate drug representations through hierarchical encoding and molecular structure information, and drug recommendation is used to use drug-disease co-occurrence probability matrix and patient similarity information.

Benefits of technology

It significantly improves the accuracy of drug recommendations, alleviates the problems of inaccurate drug representation and insufficient data utilization, and improves the performance of the model in medical decision-making tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120164567A_ABST
    Figure CN120164567A_ABST
Patent Text Reader

Abstract

The invention discloses a drug recommendation method and system based on a multi-medical knowledge enhancement graph neural network, and relates to the technical field of medical health. Constructing a coding structure tree by using the hierarchical codes corresponding to the medical entities; a drug molecular structure diagram is constructed, and the two drug codes are combined to serve as final drug codes; mapping the patient diagnostics and medical procedures into corresponding codes, which are sent into a multi-head attention mechanism to obtain patient representations from both diagnostics and medical procedures, respectively; acquiring patient similarity information, wherein the patient similarity information comprises patient-drug similarity information and patient-patient similarity information; acquiring heuristic medicine information according to the co-occurrence probability matrix and the current diagnosis one-hot code of the patient; and performing drug recommendation based on the patient similarity information and the heuristic drug information. Potential relations between drugs and diseases and similar patient information are fully utilized, medical entity representation is enriched by fusing knowledge in all fields, and the drug recommendation accuracy is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical and health technologies, and particularly to a drug recommendation method and system based on a multi-medical knowledge enhanced graph neural network. Background Art

[0002] In recent years, with the advancement of medical informatization, a large amount of patient health data has been accumulated. Using deep learning technologies to mine the potential patterns in these medical data and provide auxiliary suggestions for doctors' clinical decisions has become one of the current research hotspots. Among them, drug recommendation technology can automatically extract complex features from patient health data and learn the associations between drugs and diseases from them. In this way, drug recommendation algorithms can provide personalized treatment suggestions for doctors, improve the treatment effect while reducing the incidence of adverse drug reactions, and accelerate the discovery and development of new drugs. This technology has broad application prospects in the fields of precision medicine and drug research and development.

[0003] However, due to the limitations of electronic medical record data and the complexity of drug recommendation tasks, previous studies have faced two major challenges: inaccurate entity representation and insufficient utilization of electronic medical record data.

[0004] Inaccurate entity representation: The electronic medical record data of patients contains sequences of various medical entities (such as diagnoses, surgeries, etc.). To provide effective drug recommendations, it is crucial to obtain accurate representations of patients from these medical sequences. However, many existing studies only obtain representations of medical entities through simple encoding layers, ignoring the inherent domain knowledge (such as hierarchical knowledge) in medical entities, which results in inaccurate patient representations (PR). In addition, drug representation is also an important aspect of the drug recommendation task. Many studies aim to enhance drug representation to improve the effectiveness of recommendation results. For example, Shang et al. [1] Constructed an electronic medical record graph and a drug-drug interaction (DDI) graph based on the co-occurrence relationship and adverse reactions of drugs in electronic medical record data, and used a graph convolutional neural network (GCN) to process these graphs to obtain enhanced drug representations. However, this method is limited by the sparsity of electronic medical record data and cannot intuitively reflect the functional characteristics of drugs. On the other hand, Yang et al. [2] Modeled the drug molecular graph structure from a microscopic perspective to obtain more accurate drug representations. However, converting molecules into graph structures inevitably leads to information loss because molecules with different functions may be mapped to similar graph structures.

[0005] Insufficient utilization of electronic medical record data: To improve the performance of models in various medical decision-making tasks, many studies have attempted to incorporate the available medical knowledge in electronic medical records into the models. This knowledge can be divided into prior knowledge and patient similarity knowledge. Regarding prior knowledge, it can be extracted from the original electronic medical record data through special constraint rules and applied to various medical prediction tasks. For example, Gao et al. [3] obtained prior drug information for each diagnosis by analyzing the co-occurrence relationships of various medical entities in electronic medical record data and used it to improve the accuracy of drug recommendations. This method demonstrated the effectiveness of prior drug information in drug recommendation tasks, but it ignored the combined effect of different diagnoses when selecting prior drugs. In addition, when making complex clinical decisions, doctors often refer to the past cases of similar patients. Based on this practice, patient similarity information has been widely applied in the healthcare field. For example, Jia et al. [4] proposed a new diagnosis prediction framework based on patient similarity. In the field of drug recommendation, Shang et al. [5] regarded the patient's historical health characteristics and prescription information as prior knowledge and used a memory-augmented neural network for storage. Subsequently, they calculated the weights of historical prescriptions by computing the similarity between the patient's current health status and historical health status. However, as Figure 1 shown, these methods are limited by the long-tail phenomenon commonly existing in electronic medical record data, that is, most patients do not have sufficient historical medical visit data for reference, resulting in low utilization of patient similarity information.

[0006] [1] Shang, J., Ma, T., Xiao, C., Sun, J.: Pre-training of graph augmented transformers for medication recommendation. Preprint at https: / / arxiv.org / abs / 1906.00346 (2019).

[0007] [2] Yang, C., Xiao, C., Ma, F., Glass, L., Sun, J.: Safe drug: Dual molecular graph encoders for recommending effective and safe drug combinations. In: Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI 21, pp. 3735 - 3741 (2021)

[0008] [3]Gao, C., Yin, S., Wang, H., Wang, Z., Du, Z., Li, X.: Medical-knowledge-based graph neural network for medication combination prediction. IEEE Trans. Neural Networks Learn. Syst. (2023)

[0009] [4]Jia, Z., Zeng, X., Duan, H., Lu, X., Li, H.: A patient-similarity-based model for diagnostic prediction. Int. J. Med. Inf. 135, 104073 (2020)

[0010] [5]Shang, J., Xiao, C., Ma, T., Li, H., Sun, J.: Gamenet: Graph augmented memory networks for recommending medication combination. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol. 33, pp. 1126-1133 (2019)

[0011] In summary, the disadvantages of the existing technologies are as follows: (1) Patient data consists of sequences of various medical entities (such as diagnoses, surgeries, etc.). Learning accurate medical entity representations from these medical sequences is the basis for providing effective drug recommendations. However, many existing methods only use simple encoding layers during the entity encoding process, ignoring the domain knowledge inherent in medical entities, such as hierarchical knowledge and drug molecular structure knowledge. This simplified representation method results in inaccurate representations of medical entities, thus affecting the effectiveness of drug recommendations. (2) On the one hand, many existing studies fail to fully utilize the potential connections between drugs and diseases contained in a large amount of medical data, resulting in the under-exploitation of the potential value of the data. On the other hand, the electronic medical records of similar patients have important reference value when making drug recommendations for patients, but many methods ignore the utilization of this part of information. These two points both lead to poor accuracy of the existing drug recommendation systems and the inability to fully exploit the potential of medical data. Summary of the Invention

[0012] The object of the present invention is to provide a drug recommendation method and system based on a multi - medical - knowledge - enhanced graph neural network, which makes full use of the potential relationship between drugs and diseases, and information on similar patients, enriches the representation of medical entities by integrating knowledge in various fields, and further improves the accuracy of drug recommendation.

[0013] According to the first aspect of the embodiments of the present disclosure, a drug recommendation method based on a multi - medical - knowledge - enhanced graph neural network is provided, including the following steps:

[0014] Construct an encoding structure tree using the hierarchical encoding corresponding to each medical entity; the drugs are based on the ATC encoding, and the diagnoses and medical procedures are based on the ICD encoding, and then the encodings of each medical entity are obtained through a two - layer message passing mechanism on the encoding structure tree, including the drug entity encoding O m , the medical procedure entity encoding E p and the diagnosis entity encoding E d ;

[0015] Construct a drug molecular structure graph, and then obtain the molecular structure encoding M of the drug through a neighbor aggregation strategy m , and combine the two drug encodings as the final drug encoding E m ;

[0016] Map the patient's diagnosis and medical procedures into corresponding encodings, and send these encodings into a multi - head attention mechanism to obtain the patient representation from the two aspects of diagnosis and medical procedures respectively, and splice them together as the final patient representation;

[0017] Obtain patient similarity information, which includes patient - drug similarity information and patient - patient similarity information;

[0018] Obtain heuristic drug information according to the co - occurrence probability matrix and the one - hot encoding of the patient's current diagnosis;

[0019] Perform drug recommendation based on patient similarity information and heuristic drug information.

[0020] In one embodiment, the final drug encoding E m is:

[0021] E m =O m +μM m

[0022] where μ is a learnable parameter.

[0023] In one embodiment, mapping the patient's diagnosis and medical procedures into corresponding encodings specifically includes:

[0024]

[0025] where d (j) and p (j) are one - hot encodings of the patient's corresponding diagnosis and medical procedure entities;

[0026] The final patient representation is:

[0027]

[0028] where Q (t) represents the finally obtained patient representation, and Liner represents a linear layer.

[0029] In one embodiment, the patient - drug similarity information is obtained as follows:

[0030]

[0031] sim pd (q (t) , Q (t) ) = softmax(E m , Q (t) )

[0032] where represents the patient - drug similarity information, sim pd represents the function for calculating the similarity between the patient representation Q (t) and the drug representation E m .

[0033] In one embodiment, when obtaining patient - patient similarity information: First, construct a dynamic database and store the patient representation and the corresponding drug information in it in the form of key - value pairs. Then, obtain the similarity between the target patient representation and the representations of other patients in the database, and based on this, obtain weights to retrieve the corresponding drug information as the patient - patient similarity information, which is divided into and two parts; represents the similarity information between the target patient and its historical visiting patients:

[0034]

[0035] while represents the similarity information between the target patient and other patients; First, select the set of patients U i who are in the same age group as the target patient, and obtain the health record similarity between patients through the following formula:

[0036]

[0037] From the set of patients U iSelect the N patients with the highest health record similarity from [[]] to form the final set V of similar patients i , based on the set V i Obtain the similarity information between patients:

[0038]

[0039] Among them represents the similarity information between patients.

[0040] In one embodiment, the way to obtain heuristic drug information is:

[0041] The co-occurrence relationship between drugs and diagnoses constitutes a diagnosis-drug co-occurrence probability matrix A m , each row in the co-occurrence probability matrix represents a drug, and each column represents a diagnosis; each element a ij is:

[0042]

[0043] Among them, f ij represents the co-occurrence frequency of drug i and diagnosis j, and f j represents the total occurrence frequency of drug i;

[0044] Multiply the co-occurrence probability matrix by the one-hot encoding of the patient's current diagnosis to obtain the possibility tensor of all drugs becoming heuristic drugs, and set a hyperparameter threshold θ to select the final set M of heuristic drugs i :

[0045]

[0046] Then map the set of heuristic drugs to an encoded vector through a learnable parameter matrix, that is, heuristic drug information

[0047]

[0048] Among them, is the heuristic drug information, M i is the set of heuristic drugs, and W m is the learnable encoding matrix.

[0049] In one embodiment, the drug recommendation method is as follows:

[0050]

[0051] According to the second aspect of the embodiments of the present disclosure, a drug recommendation system based on a multi-medical knowledge enhanced graph neural network is provided, including:

[0052] An entity representation module constructs a coding structure tree using the hierarchical codes corresponding to each medical entity; its drugs are based on ATC codes, medical procedures are based on ICD codes, and then the codes of each medical entity are obtained on the coding structure tree, including the drug entity code O m , the medical procedure entity code E p and the diagnosis entity code E d ;

[0053] A drug coding module constructs a drug molecular structure diagram, and then obtains the molecular structure code M of the drug through a neighbor aggregation strategy m , and combines the two drug codes as the final drug code E m ;

[0054] A patient representation module maps the patient's diagnosis and medical procedures into corresponding codes, which are sent into a multi-head attention mechanism to obtain the patient representation from the two aspects of diagnosis and medical procedures respectively, and splice them together as the final patient representation;

[0055] A patient similarity module obtains patient similarity information, which includes patient-drug similarity information and patient-patient similarity information;

[0056] A heuristic drug information module obtains heuristic drug information according to the co-occurrence probability matrix and the one-hot encoding of the patient's current diagnosis;

[0057] A recommendation module makes drug recommendations based on patient similarity information and heuristic drug information.

[0058] According to the third aspect of the embodiments of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program running on the memory. When the processor executes the program, it implements the drug recommendation method based on a multi-medical knowledge enhanced graph neural network described above.

[0059] According to the fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, it implements the drug recommendation method based on a multi-medical knowledge enhanced graph neural network described above.

[0060] The above technical solutions adopted by the present invention, compared with the prior art, have the following advantages: (1) The present invention integrates the hierarchical coding information and molecular structure information of drugs, and generates a drug representation that can more accurately reflect the functional characteristics of drugs. This method effectively alleviates the problem of the decline in the model recommendation performance caused by inaccurate drug representation in traditional methods, thereby significantly improving the accuracy of drug recommendation.

[0061] (2) The present invention constructs a drug-disease co-occurrence probability matrix, and then multiplies this co-occurrence probability matrix with the patient's diagnosis set to comprehensively consider the combined influence of different diseases on the heuristic drugs, thereby obtaining patient-specific heuristic drug information.

[0062] (3) The present invention proposes patient similarity information, which simultaneously considers the similarity information between the patient's own historical records and that with other patients. By introducing the similarity information between patients, it makes up for the deficiency of patients with fewer medical records in terms of similarity information, and effectively alleviates the problems faced in the real medical decision-making process due to insufficient patient historical medical data. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] The accompanying drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation to this application.

[0064] Figure 1 It is a schematic diagram of the number of patients and the number of medical visits in the background art;

[0065] Figure 2 It is a schematic diagram of problem definition in the embodiment;

[0066] Figure 3 It is a framework diagram of a drug recommendation system based on a multi-medical knowledge enhanced graph neural network. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0067] The present disclosure will be further described below in conjunction with the accompanying drawings and embodiments.

[0068] It should be noted that the following detailed description is illustrative and is 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 those of ordinary skill in the technical field to which this application belongs.

[0069] It should be noted that the terms used herein are only for describing the specific embodiments and are not intended to limit the exemplary embodiments according to this application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, 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.

[0070] Note that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functions, and operations of possible implementations of methods and systems according to various embodiments of the present disclosure. It should be noted that each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code may include one or more executable instructions for implementing the logical functions specified in the respective 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 marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. Similarly, it should be noted that each block in the flowchart and / or block diagram, as well as the combinations of blocks in the flowchart and / or block diagram, may be implemented using a dedicated hardware-based system for performing the specified functions or operations, or may be implemented using a combination of dedicated hardware and computer instructions.

[0071] As Figure 2 shown, given the historical health record information of a patient, including the diagnosis, medical procedure information from time 0 to t, and prescription information from time 0 to t - 1, the present invention combines some external information, such as the adverse interaction relationships between drugs, etc., to make a prescription recommendation at time t. It is essentially a multi-label classification task, and the multi-label output C m is required to contain fewer adverse drug reactions while being as similar as possible to the true prescription value.

[0072] Specifically, given the electronic health record (EHR) data of a patient, denoted as where i ∈ {1, 2, …, N}, N is the total number of patients, and T i is the total number of visits of patient i. Each visit of the patient can be composed of a triple where and correspond to the diagnosis, medical procedure, and drug information of the patient's visit respectively. Based on all the data of the patient from time 1 to t - 1 the diagnosis and medical procedure data at time t predict the drugs at time t such that the prediction result is as effective and safe as possible.

[0073] Embodiment 1:

[0074] This embodiment provides a drug recommendation method based on a multi-medical knowledge enhanced graph neural network, including the following steps:

[0075] Step 1: Construct a coding structure tree using the hierarchical codes corresponding to each medical entity; the drugs are based on the ATC code, the medical procedures are based on the ICD code, and then the codes of each medical entity are obtained through a two-layer message passing mechanism on the coding structure tree, including the drug entity code O m , the medical procedure entity code E p and the diagnosis entity code E d ;

[0076] Step 2: To further enrich the information contained in the drug code, construct a drug molecular structure diagram, and then obtain the molecular structure code M of the drug through the neighbor aggregation strategy m , and combine the two drug codes as the final drug code E m ;

[0077] E m =O m +μM m

[0078] where μ is a learnable parameter;

[0079] Step 3: Map the patient's diagnosis and medical procedures into the corresponding codes:

[0080]

[0081] where E d and E p are the diagnosis and medical procedure entity codes obtained in Step 1 respectively, d (j) and p (j) are the one-hot codes of the patient's corresponding diagnosis and medical procedure entities.

[0082] This code is sent into the multi-head attention mechanism to obtain the patient representation from the two aspects of diagnosis and medical procedure respectively, and they are concatenated as the final patient representation; the process is as follows:

[0083]

[0084] where Q (t) represents the finally obtained patient representation, and Liner represents a linear layer.

[0085] Step 4: Obtain the patient similarity information, which includes patient-drug similarity information and patient-patient similarity information;

[0086] The patient-drug similarity information can be obtained in the following way:

[0087]

[0088] sim pd (Q(t) , E m ) = Softmax(E m , Q (t) )

[0089] where represents patient - drug similarity information, and sim pd represents the function for calculating the similarity between patient representation Q (t) and drug representation E m .

[0090] The method for obtaining patient - patient similarity information is as follows: First, construct a dynamic database and store the patient representation and the corresponding drug information in it in the form of key - value pairs. Then, obtain the similarity between the target patient representation and the representations of other patients in the database, and based on this, obtain weights to retrieve the corresponding drug information as patient - patient similarity information. According to whether the representations of other patients come from the target patient's historical visits or the visits of other patients, the patient - patient similarity information can be divided into and two parts. refers to the similarity information between the target patient and its historical visiting patients:

[0091]

[0092]

[0093] while represents the similarity information between the target patient and other patients. First, select a set of patients that are valuable for reference to the target patient. The selection process mainly considers two factors: age and health record similarity. According to age, select the set of patients U i in the same age group as the patient. Further, the health record similarity between patients is obtained through the following formula:

[0094]

[0095] where S i,j represents the record similarity between patient i and patient j; represents a special Jaccard function for calculating the record similarity between set A and set B; α is a hyperparameter used to measure the weight between diagnostic similarity and medical procedure similarity; d * and p * represent the diagnostic and medical procedure sets of patient *, respectively;

[0096] Select the N patients with the highest health record similarity from the patient set U i to form the final set of similar patients V i . Then, for the set V iThe patients in

[0097]

[0098] Among them represents the similarity information among patients, represents the set of drugs in the k-th visit record of patient j;

[0099] Step 5: Obtain heuristic drug information based on the co-occurrence probability matrix and the one-hot encoding of the patient's current diagnosis;

[0100] As Figure 3 shown, a diagnosis-drug co-occurrence probability matrix A is constructed according to the co-occurrence relationship between drugs and diagnoses m , each row in this co-occurrence probability matrix represents a drug, and each column represents a diagnosis. Each element a ij is:

[0101]

[0102] where f ij represents the co-occurrence frequency of drug i and diagnosis j, and f j represents the total occurrence frequency of drug i.

[0103] Then, multiply the co-occurrence probability matrix by the one-hot encoding of the patient's current diagnosis through the following formula to obtain the possibility tensor of all drugs becoming heuristic drugs, and set a hyperparameter threshold θ to select the final heuristic drug set M i .

[0104]

[0105] Then map the heuristic drug set to a coding vector through a learnable parameter matrix, that is, heuristic drug information

[0106]

[0107] Among them, is the heuristic drug information, M i is the heuristic drug set, and W m is the learnable coding matrix.

[0108] Step 6: Perform drug recommendation based on patient similarity information and heuristic drug information:

[0109]

[0110] Preferably, in order to ensure accuracy while having fewer adverse drug reactions, a hybrid loss function is adopted. It includes the binary cross-entropy loss commonly used in drug recommendation tasks and the multi-label margin loss

[0111]

[0112] The DDI loss calculation process is as follows

[0113]

[0114] where D ij represents the adverse drug reaction adjacency matrix;

[0115] The three loss functions are combined in the following way.

[0116]

[0117] where ρ and Ф represent the current DDI rate and the target DDI rate that the model is expected to achieve, respectively, and β and τ are introduced hyperparameters.

[0118] By integrating a variety of medical knowledge, the present invention significantly improves the effectiveness of the drug recommendation task; from a practical level, the recommendation results can provide a strong reference basis for doctors when prescribing drugs, thus promoting the process of artificial intelligence-assisted medical decision-making, which has important practical significance for improving the medical level and reducing the incidence of medical accidents. From the perspective of theoretical research, the proposed patient similarity information and heuristic drug information not only enrich the theoretical research in the field of drug recommendation, but also provide a valuable reference direction for subsequent researchers.

[0119] Example Two:

[0120] This example provides a drug recommendation system based on a multi-medical knowledge enhanced graph neural network, including:

[0121] An entity representation module that constructs a coding structure tree using the hierarchical encoding corresponding to each medical entity; its drugs are based on the ATC coding, and the diagnoses and medical procedures are based on the ICD coding, and then the codes of each medical entity are obtained on the coding structure tree, including the drug entity code O m , the medical procedure entity code E p and the diagnosis entity code E d ;

[0122] A drug coding module that constructs a drug molecular structure diagram, and then obtains the molecular structure code M of the drug through the neighbor aggregation strategy m , and combines the two drug codes as the final drug code E m ;

[0123] Patient representation module, which maps patient diagnoses and medical procedures into corresponding codes, and these codes are fed into the multi-head attention mechanism to obtain patient representations from the two aspects of diagnosis and medical procedures respectively, and they are concatenated as the final patient representation;

[0124] Patient similarity module, which obtains patient similarity information, including patient-drug similarity information and patient-patient similarity information;

[0125] Heuristic drug information module, which obtains heuristic drug information according to the co-occurrence probability matrix and the one-hot encoding of the patient's current diagnosis;

[0126] Recommendation module, which makes drug recommendations based on patient similarity information and heuristic drug information.

[0127] The present invention proposes a learning model developed based on the pytorch deep learning architecture, and uses the publicly available MIMIC-III dataset for training to obtain the optimal model parameters. The statistical information of the training data is shown in the table. Subsequently, the model can be deployed to the hospital information system, and the trained model parameters can be loaded to give prescription suggestions after the patient is admitted to the hospital.

[0128] Table 1: Data statistical information

[0129]

[0130]

[0131] The specific training and testing process includes:

[0132] Step 1: Build the MKDR network structure using the pytorch framework of the deep learning library in Python;

[0133] Step 2: Build the basic MKDR network structure, determine the basic parameters such as the batch_size of the data in the network, the maximum number of iterations epoch, and the number of attention heads, and input the preprocessed datasets into the MKDR network.

[0134] Step 3: Obtain the codes of various medical entities through the entity representation module, including diagnosis, medical procedure, and drug codes.

[0135] Step 4: Learn patient representations and patient similarity information through the patient similarity module.

[0136] Step 5: Obtain the corresponding heuristic drug information of the patient in the heuristic drug information module.

[0137] Step 6: Make drug recommendations by integrating the patient information obtained in Steps 3-5;

[0138] Step 7: After each epoch iteration, calculate the loss function according to the following formula and perform backpropagation to update the model parameters

[0139]

[0140] Step 8: Execute the algorithm until the maximum number of iterations is reached, and output and store the optimal network parameter results.

[0141] Step 9: Input the optimal network parameters into the MKDR network to generate the optimal network structure for drug recommendation.

[0142] To verify the effectiveness of the model, we conducted a large number of experiments on the MIMIC-III public dataset and used Jaccard, F1-score, and PRAUC as evaluation metrics. The experimental results are shown in the table.

[0143] Table 2: Model performance

[0144]

[0145] The recommendation effect of the model can also be more intuitively demonstrated through case studies. Table 3 shows the drug recommendation results of 3 patients randomly selected from the dataset and made by the model. The diagnoses are shown in ICD-9 codes and the drugs are shown in ATC codes in the table.

[0146] Table 3 Case analysis

[0147]

[0148]

[0149] Example 3:

[0150] An electronic device, including a memory, a processor, and a computer program running on the memory, wherein when the processor executes the program, it implements the above-mentioned drug recommendation method based on a multi-medical knowledge enhanced graph neural network, including:

[0151] Construct an encoding structure tree using the hierarchical encodings corresponding to each medical entity; the drugs are based on ATC codes, and the diagnoses and medical procedures are based on ICD codes, and then obtain the encodings of each medical entity on the encoding structure tree, including the drug entity encoding O m , the medical procedure entity encoding E p and the diagnosis entity encoding E d ;

[0152] Construct a drug molecular structure diagram, and then obtain the molecular structure encoding M of the drug through the neighbor aggregation strategy m , and combine the two drug encodings as the final drug encoding E m ;

[0153] Map the patient diagnosis and medical procedures to corresponding codes, and send the codes into the multi-head attention mechanism to obtain patient representations from the two aspects of diagnosis and medical procedures respectively, and concatenate them as the final patient representation;

[0154] Obtain patient similarity information, which includes patient-drug similarity information and patient-patient similarity information;

[0155] Obtain heuristic drug information according to the co-occurrence probability matrix and the one-hot encoding of the patient's current diagnosis;

[0156] Perform drug recommendation based on patient similarity information and heuristic drug information.

[0157] Example 4:

[0158] A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the above-mentioned drug recommendation method based on a multi-medical knowledge enhanced graph neural network, including:

[0159] Use the hierarchical codes corresponding to each medical entity to construct a coding structure tree; its drugs are based on the ATC code, and the diagnosis and medical procedures are based on the ICD code, and then obtain the codes of each medical entity on the coding structure tree, including the drug entity code O m The medical procedure entity code E p And the diagnosis entity code E d ;

[0160] Construct a drug molecular structure diagram, and then obtain the molecular structure code M of the drug through the neighbor aggregation strategy m Combine the two drug codes as the final drug code E m ;

[0161] Map the patient diagnosis and medical procedures to corresponding codes, and send the codes into the multi-head attention mechanism to obtain patient representations from the two aspects of diagnosis and medical procedures respectively, and concatenate them as the final patient representation;

[0162] Obtain patient similarity information, which includes patient-drug similarity information and patient-patient similarity information;

[0163] Obtain heuristic drug information according to the co-occurrence probability matrix and the one-hot encoding of the patient's current diagnosis;

[0164] Perform drug recommendation based on patient similarity information and heuristic drug information.

[0165] Those skilled in the art should understand that the above-mentioned modules or steps of the present disclosure can be implemented by a general-purpose computer device. Optionally, they can be implemented by program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module for implementation. The present disclosure is not limited to any specific combination of hardware and software.

[0166] The above are only the preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

[0167] Although the specific implementation manners of the present disclosure have been described above in conjunction with the accompanying drawings, they do not limit the protection scope of the present disclosure. Those skilled in the art should understand that, based on the technical solutions of the present disclosure, various modifications or deformations that can be made by those skilled in the art without creative efforts are still within the protection scope of the present disclosure.

Claims

1. A drug recommendation method based on multiple medical knowledge enhanced graph neural network, characterized in that: The following steps are involved: Construct a coding structure tree using the hierarchical codes corresponding to each medical entity; Drugs are coded based on ATC, diagnoses and medical procedures are coded based on ICD, and then the codes of each medical entity are obtained on the coding structure tree, including the drug entity code O m , Medical Procedure Entity Code E p and diagnostic entity code E d ; Construct a drug molecular structure graph, and then obtain the drug molecular structure code M through the neighbor aggregation strategy m , combine the two drug codes as the final drug code E m ; Mapping patient diagnoses and medical procedures into corresponding codes, which are fed into a multi-head attention mechanism to obtain patient representations from both the diagnosis and medical procedure aspects, and concatenating them as the final patient representation; obtaining patient similarity information, including patient-drug similarity information and patient-patient similarity information; Obtain heuristic drug information based on the co-occurrence probability matrix and the one-hot encoding of the patient's current diagnosis; Make drug recommendations based on patient similarity information and heuristic drug information.

2. According to claim 1, a drug recommendation method based on multiple medical knowledge enhanced graph neural network is characterized in that: The final drug code E m for: E m =O m +μM m Among them, μ is a learnable parameter.

3. According to claim 1, a drug recommendation method based on multiple medical knowledge enhanced graph neural network is characterized in that: Map patient diagnoses and medical procedures to corresponding codes, specifically: where d (j) and p (j) One-hot coding of the diagnosis and medical procedure entities corresponding to the patient; The final patient representation is: Where Q (t) Represents the final patient representation, and Liner represents a linear layer.

4. According to claim 1, a drug recommendation method based on multiple medical knowledge enhanced graph neural network is characterized in that: The patient-drug similarity information Obtained by: Yes pd (Q (t) ,AND m )=Softmax(E m ,Q (t) ) in Represents patient-drug similarity information, sim pd Represents the patient Q (t) and drug expression E m Similarity function.

5. According to claim 1, a drug recommendation method based on multiple medical knowledge enhanced graph neural network is characterized in that: When obtaining patient-patient similarity information: first build a dynamic database to store patient representations and corresponding drug information in the form of key-value pairs, then obtain the similarity between the target patient representation and other patient representations in the database, and based on this, obtain the weight to extract the corresponding drug information as patient-patient similarity information, which is divided into and Two parts; Represents the similarity information between the target patient and his / her historical patients: and Represents the similarity information between the target patient and other patients; first select the patient set U in the same age group as the target patient i , the similarity of health records between patients is obtained by the following formula: Where S i,j represents the record similarity between patient i and patient j; represents the special Jaccard function used to calculate the similarity between records in set A and set B; α is a hyperparameter used to weigh the difference between diagnosis similarity and medical procedure similarity; d * and p * represents the set of diagnoses and medical procedures of the patient*, respectively; From patient collection U i Select N patients with the highest similarity in health records to form the final similar patient set V i , based on the set V i Get similar information between patients: in Represents similar information between patients, represents the set of drugs for patient j’s k-th visit record.

6. According to claim 1, a drug recommendation method based on multiple medical knowledge enhanced graph neural network is characterized in that: The way to obtain heuristic drug information is: The co-occurrence relationship between drugs and diagnoses constitutes the diagnosis-drug co-occurrence probability matrix A m , each row in the co-occurrence probability matrix represents a drug, and each column represents a diagnosis; each a ij for: Among them, f ij represents the co-occurrence frequency of drug i and diagnosis j, f j represents the total occurrence frequency of drug i; Multiply the co-occurrence probability matrix with the one-hot encoding of the patient's current diagnosis to obtain the probability tensor of all drugs becoming heuristic drugs, and set a hyperparameter threshold θ to select the final heuristic drug set M i : Then, the heuristic drug set is mapped into an encoding vector through a learnable parameter matrix, i.e., the heuristic drug information in, For heuristic drug information, W m is a learnable encoding matrix.

7. According to claim 1, a drug recommendation method based on multiple medical knowledge enhanced graph neural network is characterized in that: The drug recommendations are as follows:

8. A drug recommendation system based on multiple medical knowledge enhanced graph neural network, characterized in that: include: The entity representation module constructs a coding structure tree using the hierarchical codes corresponding to each medical entity; Drugs are coded based on ATC, diagnoses and medical procedures are coded based on ICD, and then the codes of each medical entity are obtained on the coding structure tree, including the drug entity code O m , Medical Procedure Entity Code E p and diagnostic entity code E d ; The drug coding module constructs the drug molecular structure diagram and then obtains the drug molecular structure code M through the neighbor aggregation strategy. m , combine the two drug codes as the final drug code E m ; The patient representation module maps the patient diagnosis and medical procedures into corresponding codes, which are fed into the multi-head attention mechanism to obtain the patient representation from the two aspects of diagnosis and medical procedures respectively, and then concatenate them as the final patient representation; A patient similarity module, which obtains patient similarity information, including patient-drug similarity information and patient-patient similarity information; The heuristic drug information module obtains heuristic drug information based on the co-occurrence probability matrix and the one-hot encoding of the patient's current diagnosis; The recommendation module makes drug recommendations based on patient similarity information and heuristic drug information.

9. An electronic device comprising a memory, a processor and a computer program stored and running on the memory, characterized in that: When the processor executes the program, the drug recommendation method based on multiple medical knowledge enhanced graph neural network is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a drug recommendation method based on a graph neural network enhanced with multiple medical knowledge is implemented.