A drug recommendation model construction method, device and equipment and readable storage medium

By constructing EHR and DDI graphs and utilizing graph attention mechanisms and hybrid expert systems, the problem of uneven weight distribution in drug recommendation algorithms was solved, improving the accuracy and reliability of drug recommendation models. It also simulated the similarity assistance of doctors' clinical analysis, thereby enhancing the reliability of recommendation results.

CN115565636BActive Publication Date: 2026-07-03UNIV OF ELECTRONICS SCI & TECH OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNIV OF ELECTRONICS SCI & TECH OF CHINA
Filing Date
2022-10-31
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In existing drug recommendation algorithms, graph convolutional networks cannot assign different weights to different neighbors of the same node and ignore the characteristics of patient groups with high representational similarity, resulting in low recommendation accuracy.

Method used

By constructing EHR and DDI graphs, different weights are assigned to neighboring drug nodes using graph attention mechanism. Multiple drug recommendation models are trained through a hybrid expert system, and weighted combinations are performed by combining patient representation and similarity analysis to improve recommendation accuracy.

Benefits of technology

It improves the accuracy of the drug recommendation model, simulates the clinical analysis conducted by doctors based on the similarity between patients with similar health conditions, and enhances the reliability of the recommendation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115565636B_ABST
    Figure CN115565636B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, and readable storage medium for constructing a drug recommendation model, relating to the field of drug recommendation algorithm technology. The method includes acquiring diagnostic and surgical records to extract patient representations; calculating drug allocation weights based on the patient representations; constructing an initial model, training the initial model using the drug allocation weights, and updating the patient representations; recalculating the drug allocation weights based on the updated patient representations, and repeatedly training the initial model using the updated drug allocation weights to obtain a drug recommendation model. This invention addresses the technical problems of existing algorithms that cannot assign different weights based on the importance of neighboring nodes to the current node and ignore patient group characteristics with high representation similarity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of drug recommendation algorithm technology, and more specifically, to a method, apparatus, device, and readable storage medium for constructing a drug recommendation model. Background Technology

[0002] Drug recommendation algorithms refer to algorithms that recommend a set of drug combinations to treat a patient's diagnosed disease based on the patient's health status. Current drug recommendation algorithms typically use Graph Convolutional Networks (GCNs) to extract features from drug nodes. However, GCNs assign identical weights to different neighbors of the same node, preventing them from allocating different weights based on the importance of neighboring nodes to the current node. Furthermore, before prescribing medication, doctors utilize the similarity between patients with similar health conditions to aid clinical analysis. However, existing methods often only measure the similarity of patients' health status by calculating representational similarity, ignoring the characteristics of patient groups with high representational similarity. Summary of the Invention

[0003] The purpose of this invention is to provide a method, apparatus, device, and readable storage medium for constructing a drug recommendation model, thereby improving the aforementioned problems. To achieve the above objective, the technical solution adopted by this invention is as follows:

[0004] Firstly, this application provides a method for constructing a drug recommendation model, including:

[0005] Obtain diagnostic and surgical records to extract patient characteristics;

[0006] Calculate drug allocation weights based on the patient characteristics;

[0007] An initial model is constructed, trained using the drug allocation weights, and the patient representation is updated.

[0008] The drug allocation weights are recalculated based on the updated patient representations, and the initial model is repeatedly trained using these drug allocation weights to obtain a drug recommendation model.

[0009] Furthermore, the calculation of drug allocation weights based on the patient characteristics specifically includes:

[0010] Construct an EHR diagram and a DDI diagram, where DDI includes promoting DDI and antagonistic DDI;

[0011] Examples of safe combination drug use were calculated based on the EHR and DDI diagrams.

[0012] The allocation weight of the drug is calculated based on the similarity between the patient characteristics and the safe combination drug use examples to obtain the first allocation weight;

[0013] Obtain patient representations of historical patients, and calculate drug allocation weights based on the similarity between the patient representations and the patient representations of historical patients to obtain a second allocation weight.

[0014] The weights of the antagonistic DDI in the second allocation weights are filtered out to obtain the third allocation weights;

[0015] The fourth allocation weight is calculated using the first and third allocation weights.

[0016] Furthermore, it also includes:

[0017] Multiple drug allocation weights are calculated using a hybrid expert system, which includes multiple calculation channels. Each calculation channel obtains the same patient records and surgical records and then calculates a fourth allocation weight.

[0018] The final drug allocation weight is obtained by weighting and fusing the multiple fourth allocation weights calculated by the multiple calculation channels.

[0019] Furthermore, the step of recalculating drug allocation weights based on the updated patient representation and repeatedly training the initial model using these drug allocation weights to obtain a drug recommendation model specifically includes:

[0020] Get the preset number of training iterations;

[0021] Determine whether the model has reached the preset number of training iterations:

[0022] If not, continue calculating the drug allocation weights and repeatedly train the model using the drug allocation weights.

[0023] If so, end the training, save the model parameters, and obtain the trained drug recommendation model.

[0024] Secondly, this application also provides a drug recommendation model construction apparatus, comprising:

[0025] Acquisition module: Used to acquire diagnostic and surgical records to extract patient characteristics;

[0026] Calculation module: used to calculate drug allocation weights based on the patient characteristics;

[0027] First training module: used to build an initial model, train the initial model using the drug allocation weights, and update patient representations;

[0028] The second training module is used to recalculate drug allocation weights based on the updated patient representations, and to repeatedly train the initial model using the drug allocation weights to obtain a drug recommendation model.

[0029] Furthermore, the computing module specifically includes:

[0030] Building blocks: Construct EHR diagrams and DDI diagrams, where DDI includes promoting DDI and antagonistic DDI;

[0031] The third calculation unit calculates safe combination drug use examples based on the EHR diagram and DDI diagram;

[0032] Fourth calculation unit: Calculates the allocation weight of the drug based on the similarity between the patient characteristics and the safe combination drug use examples, and obtains the first allocation weight;

[0033] First acquisition unit: Acquires patient representations of historical patients, calculates drug allocation weights based on the similarity between the patient representations and the patient representations of historical patients, and obtains second allocation weights;

[0034] Fifth calculation unit: Filter the weights of antagonistic DDI in the second allocation weights to obtain the third allocation weights;

[0035] The sixth calculation unit calculates the fourth allocation weight using the first and third allocation weights.

[0036] Furthermore, the computing module also includes:

[0037] The seventh calculation unit: uses a hybrid expert system to calculate multiple drug allocation weights. The hybrid expert system includes multiple calculation channels. Each calculation channel obtains the same patient records and surgical records and then calculates the fourth allocation weight.

[0038] The eighth calculation unit: performs weighted fusion of the multiple fourth allocation weights calculated by the multiple calculation channels to obtain the final drug allocation weight.

[0039] Furthermore, the second training module specifically includes:

[0040] Third acquisition unit: Acquire the preset number of training iterations;

[0041] Judgment Unit: Determines whether the training iterations of the model have reached the preset number of training iterations.

[0042] If not, continue calculating the drug allocation weights and repeatedly train the model using the drug allocation weights.

[0043] If so, end the training, save the model parameters, and obtain the trained drug recommendation model.

[0044] Thirdly, this application also provides a drug recommendation model construction device, comprising:

[0045] Memory, used to store computer programs;

[0046] A processor is used to implement the steps of the drug recommendation model construction method when executing the computer program.

[0047] Fourthly, this application also provides a readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described drug recommendation model construction method.

[0048] The beneficial effects of this invention are as follows:

[0049] This invention first utilizes a multi-head graph attention mechanism to overcome the limitation of graph convolutional networks in assigning different weights to different neighbors of the same node. Based on the importance of neighboring drug nodes relative to the current drug node, different weights are assigned to different neighboring drug nodes to capture the differences in importance among neighboring drugs in a combination therapy. Second, to mimic the behavior of doctors using the similarity between patients with similar health conditions to assist in clinical analysis, this invention performs k-means clustering on diagnostic and surgical features obtained through GRU processing to extract common features of similar patients, further enhancing the patient representation of the current patient. Finally, to learn the similarities and differences in medication prescriptions issued by different doctors, a hybrid expert system is used to train multiple drug recommendation models. A gating module is then used to weight and combine the recommendation results of each model to obtain the final recommendation result, improving the accuracy of the recommendation model.

[0050] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing embodiments of the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0051] To more clearly illustrate the technical solutions of the embodiments of the present invention, 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 the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 This is a schematic diagram of the drug recommendation model construction method described in this embodiment of the invention. Figure 1 ;

[0053] Figure 2 This is a schematic diagram of the drug recommendation model construction method described in this embodiment of the invention. Figure 2 ;

[0054] Figure 3 This is a schematic diagram of the structure of the drug recommendation model construction device described in this embodiment of the invention;

[0055] Figure 4 This is a schematic diagram of the structure of the drug recommendation model construction device described in this embodiment of the invention.

[0056] Marked in the image:

[0057] 01. Acquisition Module; 011. Reading Unit; 012. First Calculation Unit; 013. Second Calculation Unit; 014. First Assembly Unit; 02. Calculation Module; 021. Construction Unit; 022. Third Calculation Unit; 0221. First Learning Unit; 0222. Second Learning Unit; 0223. Third Learning Unit; 023. Fourth Calculation Unit; 024. First Acquisition Unit; 025. Fifth Calculation Unit; 026. Sixth Calculation Unit; 027. Seventh Calculation Unit; 028. Eighth Calculation Unit; 03. First Training Module; 031. Second Acquisition Unit; 032. First Training Unit; 033. Search Unit; 034. Second Assembly Unit; 04. Second Training Module; 041. Third Acquisition Unit; 042. Judgment Unit;

[0058] 800. Drug recommendation model construction device; 801. Processor; 802. Memory; 803. Multimedia component; 804. I / O interface; 805. Communication component. Detailed Implementation

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

[0060] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0061] Example 1:

[0062] This embodiment provides a method for constructing a drug recommendation model.

[0063] See Figure 1 , Figure 2 The figure shows the steps involved in this method:

[0064] S1. Obtain diagnostic and surgical records to extract patient characteristics;

[0065] Specifically, step S1 includes:

[0066] S11. Read the patient's diagnostic and surgical records;

[0067] Based on the patient medical history information stored in electronic medical records, each patient can be represented as a multivariate time series: Where n∈{1,2,...,N}, and N is the total number of patients. T represents the medical record of the nth patient during the tth visit. (n) This represents the total number of visits by the nth patient.

[0068] The patient's medical record for each visit mainly consists of three parts: v t =[d t ,p t ,m t ], d t Represents diagnostic records, p t Represents surgical records, m t Representative medication records. Among them, d t ∈{0,1} |D| p t ∈{0,1 |P| m t ∈{0,1} |M| Where D, P, and M represent the diagnostic code set, surgical code set, and medication code set, respectively.

[0069] To differentiate the medical records of different patients, the medical record of the nth patient during the tth visit is represented as follows: in These are binary-encoded multi-hot vectors, representing the patient's diagnostic records, surgical records, and medication records, respectively.

[0070] In this embodiment, the patient's diagnostic records are obtained. and surgical records

[0071] S12. Perform linear embedding on the diagnostic record and the surgical record respectively to obtain the diagnostic record vector and the surgical record vector:

[0072]

[0073]

[0074] In equation (1), D t (n) W represents the diagnostic record vector. d P represents the linear embedding matrix of the diagnostic records to be learned, in equation (2). t (n) W represents the surgical record vector. p This represents the linear embedding matrix of the surgical records that need to be studied.

[0075] S13. Perform feature extraction on the diagnostic record vector and the surgical record vector respectively to obtain the diagnostic record feature vector and the surgical record feature vector;

[0076] Specifically, the diagnostic record vector and surgical record vector are input into two separate GRUs for word embedding. Feature extraction is then performed on the word-embedded diagnostic record vector and surgical record vector to obtain the diagnostic record feature vector and surgical record feature vector, respectively.

[0077]

[0078]

[0079] In equation (3), In equation (4), the feature vector of the diagnostic record is represented. This represents the feature vector of the surgical record.

[0080] S14. Concatenate the diagnostic record feature vector and the surgical record feature vector to obtain a patient characterization;

[0081] This embodiment is the first to construct a patient representation, which is composed of diagnostic record feature vectors and surgical record feature vectors:

[0082]

[0083] In the formula, q t (n) denoted as patient representation, f(·) is a single-layer fully connected network.

[0084] S2. Calculate drug allocation weights based on the patient characteristics;

[0085] Specifically, step S2 includes:

[0086] S21. Construct an EHR diagram and a DDI diagram, where DDI includes promoting DDI and antagonistic DDI;

[0087] Specifically, the EHR diagram is a graph composed of the patient's medication information in the electronic medical record. Each node represents a drug, and when several drug nodes are connected together, it means that these drugs are used in combination in the electronic medical record, that is, these drugs are used together by doctors in reality to treat the patient's disease.

[0088] In the DDI diagram, each node represents a drug, and connecting these nodes indicates that using these drugs together will lead to a drug-drug interaction (DDI). DDI includes promoting DDI and antagonistic DDI. Promoting DDI means that the combination of drugs will enhance the therapeutic effect; antagonistic DDI means that the combination of drugs will lead to side effects.

[0089] Represent the EHR diagram as G e h r ={V ehr E ehr};

[0090] The DDI diagram is represented as G. ddi ={V ddi E ddi};

[0091] Let the number of drug nodes be |M|, then we have |V ehr |=|V ddi |=|M|.

[0092] S22. Calculate safe combination drug use examples based on the EHR diagram and DDI diagram;

[0093] Specifically, step S22 includes:

[0094] S221. Apply graph convolutional neural networks to the EHR graph and DDI graph respectively to learn combined drug use knowledge and DDI knowledge, and obtain the node feature matrix of the EHR graph and the node feature matrix of the DDI graph. The specific calculation steps include the following:

[0095] S2211. Calculate EHR plot G ehr Adjacency matrix A ehr :

[0096] Construct a bipartite graph A based on the patient medication records in the EHR graph. b Bipart A b If one side represents a drug and the other side represents a combination of drugs (i.e., if drug A and drug B are used in combination, then there is an edge between drug A on the left and drug B on the right), then the EHR diagram G...ehr Adjacency matrix A ehr It can be represented as

[0097] S2212. Calculate the adjacency matrix A of the DDI graph. ddi :

[0098] Extract drug pair information leading to antagonistic drug interactions from the TWOSIDES dataset, i.e., when the combined use of drug class i and drug class j results in adverse drug interactions, the adjacency matrix A is determined. ddi [i,j] = 1; otherwise A ddi [i,j] = 0;

[0099] S2213. Apply a two-layer GCN (Graph Convolutional Neural Network) to the EHR and DDI graphs respectively to learn the embeddings of combined drug use knowledge and DDI knowledge, and obtain the node feature matrices of the EHR and DDI graphs:

[0100]

[0101] In equation (6), h ehr The node feature matrix of the EHR graph. A represents ehr The degree matrix; A represents ehr Normalization result; I is the identity matrix, W e1 W e2 Let be the hidden weight parameter matrix, and tanh() be the activation function, i.e., the hyperbolic tangent.

[0102]

[0103] In equation (7), h ddi The node feature matrix of the DDI graph. A represents ddi degree matrix, A represents ddi The normalization result, W d1 W d2 This is the hidden weight parameter matrix.

[0104] S222. Utilize a Graph Attention Network (GAT) to learn the node feature matrices of the EHR graph and the DDI graph, thereby obtaining the feature matrices corresponding to the EHR graph and the DDI graph; specifically, this includes the following steps:

[0105] S2221. Initialize the node feature matrix, representing the node feature matrix as a set of feature vectors:

[0106] h = {h1, h2, ..., h} |M|},h i ∈R F (8)

[0107] In equation (8), h i The node features of the i-th drug class are respectively h ehr or h ddi In the i-th row, |M| represents the number of drug nodes, F is the feature dimension of the nodes, and R is the number of drug nodes. F h i The feature dimension is F-dimensional.

[0108] S2222. Each node aggregates the features of its neighbors to update its own node features; therefore, each layer of GAT outputs an updated set of node feature vectors.

[0109]

[0110] Where i, j, and k all represent nodes, and N i Let represent the set of neighboring nodes of node i, σ(·) be the sigmoid function, and W be the weight matrix, where W∈R F ×R F′ α ij The expression represents the attention coefficients between different nodes, and 'a' represents the weight matrix connecting layers in the neural network. T represents the transpose of a matrix, and || represents the concatenation operation.

[0111] S2223. The feature matrix M corresponding to the EHR graph is composed of all nodes and their eigenvectors. e h r The feature matrix M corresponding to the DDI diagram ddi , of which M ehr ∈R |M|*d M ddi ∈R |M|*d , where |M| represents the total number of drug nodes, and d is the feature dimension of the drug nodes.

[0112] S223. By filtering out the feature matrix of antagonistic DDIs from the feature matrix corresponding to the EHR diagram, examples of safe combination therapy are obtained:

[0113] M g =M ehr -λM ddi (10)

[0114] In the formula, λ is a weighted variable that integrates different knowledge graphs, used to control the degree of screening for adverse DDI drug pairs in the EHR graph, and M gExamples of safe combination therapy.

[0115] S23. Calculate the allocation weight of the drug based on the similarity between the patient characteristics and the safe combination drug use examples to obtain the first allocation weight;

[0116]

[0117] In the formula, Indicates the first allocation weight. Represents the transpose matrix. This indicates the patient's condition.

[0118] S24. Obtain the patient representation of historical patients, and calculate the drug allocation weight based on the similarity between the patient representation and the patient representation of historical patients to obtain the second allocation weight;

[0119] Specifically, step S24 includes:

[0120] S241. Obtain patient characterization of patients with a history of medical visits

[0121]

[0122] In the formula, T represents the patient profile of the nth patient at the tth visit. (n) This represents the total number of visits for the nth patient, where N is the total number of patients.

[0123] S242. Obtain medication records of past patients.

[0124]

[0125] In the formula, This represents the medication record of the nth patient during their tth visit.

[0126] S243. The above and stated Stored in a collection, we get:

[0127]

[0128] S244. Calculate the patient characterization of the currently visiting patient. Patient characteristics compared with historical patients The similarity between them is then used to assign weights to the corresponding drugs, resulting in a second weighting:

[0129]

[0130] In the formula, This indicates the second allocation weight. This represents the transpose of the matrix.

[0131] S25. Filter the weights of antagonistic DDI in the second allocation weights to obtain the third allocation weights. The specific calculation formula is as follows:

[0132]

[0133] In the formula, This indicates the third allocation weight.

[0134] S26. The fourth allocation weight is calculated using the first and third allocation weights, and the specific calculation formula is as follows:

[0135]

[0136] In the formula, σ() is the Sigmoid function. The fourth weight is assigned.

[0137] Step S2 further includes:

[0138] S27. Multiple drug allocation weights are calculated using a hybrid expert system (MOE), wherein the hybrid expert system includes multiple calculation channels, and each calculation channel obtains the same patient records and surgical records to calculate a fourth allocation weight;

[0139] In this embodiment, if the hybrid expert system includes m calculation channels, then m fourth allocation weights can be obtained.

[0140] S28. The multiple fourth allocation weights calculated by the multiple calculation channels are weighted and fused to obtain the final drug allocation weight;

[0141] Specifically, the m fourth allocation weights are input into the gating module (a fusion mechanism used by MoE to weight and fuse the results of the m expert outputs) to calculate the final drug allocation weights. The specific calculation formula is as follows:

[0142]

[0143] In the formula, This indicates the final drug allocation weight;

[0144] x represents the input patient characteristic, namely:

[0145] f i (x) represents the medication combination predicted by the i-th expert, i.e.:

[0146] g iThis represents the weight assigned to the i-th expert.

[0147] S3. Construct an initial model, train the initial model using the drug allocation weights, and update the patient representation;

[0148] Specifically, step S3 includes:

[0149] S31. Obtain drug allocation weights;

[0150] S32. Train the initial model using the drug allocation weights, and obtain the updated diagnostic features and surgical features;

[0151] S33. Input the updated diagnostic features and surgical features into the diagnostic feature clustering module and the surgical feature clustering module respectively to perform k-means clustering, find the clusters corresponding to the diagnostic features and the clusters corresponding to the surgical features, and use the centroid of the cluster corresponding to the diagnostic features as the common diagnostic representation of similar patients, and use the centroid of the cluster corresponding to the surgical features as the common surgical representation of similar patients.

[0152] S34. The updated patient representation is obtained by splicing together common diagnostic representations of similar patients, common surgical representations of similar patients, and updated diagnostic and surgical features, namely:

[0153]

[0154] In the formula, This indicates common diagnostic characteristics in similar patients. This indicates common surgical characteristics in similar patients.

[0155] In this embodiment, the patient representation constructed in the first round of step S1 is only composed of diagnostic features and surgical features, while the patient representation constructed in step S33 (the second round and above) is composed of common diagnostic representations of similar patients, common surgical representations of similar patients, diagnostic features and surgical features.

[0156] S4. Recalculate the drug allocation weights based on the updated patient representation, and repeatedly train the initial model using the drug allocation weights to obtain the drug recommendation model.

[0157] Specifically, step S4 includes:

[0158] S41. Obtain the preset number of training iterations. Preferably, the preset number of training iterations is 50.

[0159] S42. Determine whether the training iterations of the model have reached the preset number of training iterations:

[0160] If not, update the patient characteristics, recalculate the drug allocation weights, and retrain the model using the drug allocation weights.

[0161] If so, end the training, save the model parameters, and obtain the trained drug recommendation model.

[0162] Example 2:

[0163] like Figure 3 As shown, this embodiment provides a drug recommendation model construction device, the device comprising:

[0164] Acquisition Module 01: Used to acquire diagnostic and surgical records in order to extract patient characteristics;

[0165] Calculation module 02: used to calculate drug allocation weights based on the patient characteristics;

[0166] First training module 03: used to build an initial model, train the initial model using the drug allocation weights, and update patient representations;

[0167] Second training module 04: used to recalculate drug allocation weights based on the updated patient representation, and repeatedly train the initial model using the drug allocation weights to obtain a drug recommendation model.

[0168] Based on the above embodiments, the acquisition module 01 specifically includes:

[0169] Reading Unit 011: Reads the patient's diagnostic records and surgical records;

[0170] First computing unit 012: Performs linear embedding on the diagnostic record and the surgical record respectively to obtain a diagnostic record vector and a surgical record vector;

[0171] Second calculation unit 013: Performs feature extraction on the diagnostic record vector and the surgical record vector respectively to obtain diagnostic record feature vector and surgical record feature vector;

[0172] First splicing unit 014: splices the diagnostic record feature vector and the surgical record feature vector to obtain the patient characterization.

[0173] Based on the above embodiments, the calculation module 02 specifically includes:

[0174] Building Unit 021: Construct the EHR diagram and DDI diagram, where DDI includes promoting DDI and antagonistic DDI;

[0175] Third calculation unit 022: Calculates safe combination drug use examples based on the EHR diagram and DDI diagram;

[0176] Fourth calculation unit 023: Calculates the allocation weight of the drug based on the similarity between the patient characterization and the safe combination drug use example, and obtains the first allocation weight;

[0177] First acquisition unit 024: Acquires patient representations of historical patients, calculates drug allocation weights based on the similarity between the patient representations and the patient representations of historical patients, and obtains a second allocation weight;

[0178] Fifth calculation unit 025: Filters the weights of antagonistic DDI in the second allocation weights to obtain the third allocation weights;

[0179] Sixth Calculation Unit 026: Calculate the fourth allocation weight using the first allocation weight and the third allocation weight.

[0180] Based on the above embodiments, the third computing unit 022 specifically includes:

[0181] First learning unit 0221: Apply graph convolutional neural networks to the EHR graph and DDI graph respectively to learn combined drug knowledge and DDI knowledge, and obtain the node feature matrix of the EHR graph and the node feature matrix of the DDI graph.

[0182] Second learning unit 0222: Use graph attention network to learn the node feature matrix of EHR graph and the node feature matrix of DDI graph, so as to obtain the feature matrix corresponding to EHR graph and DDI graph.

[0183] Learning Unit 3 0223: In the feature matrix corresponding to the EHR diagram, the feature matrix of antagonistic DDI is screened out to obtain examples of safe combination drug use.

[0184] Based on the above embodiments, the calculation module 02 further includes:

[0185] Seventh Calculation Unit 027: Multiple drug allocation weights are calculated using a hybrid expert system. The hybrid expert system includes multiple calculation channels. Each calculation channel obtains the same patient records and surgical records and then calculates the fourth allocation weight.

[0186] Eighth Calculation Unit 028: Weighted fusion of multiple fourth allocation weights calculated by the multiple calculation channels to obtain the final drug allocation weight.

[0187] Based on the above embodiments, the first training module 03 specifically includes:

[0188] Second acquisition unit 031: Acquire drug allocation weights;

[0189] First training unit 032: Train the initial model using the drug allocation weights and obtain updated diagnostic and surgical features;

[0190] Searching Unit 033: The updated diagnostic features and surgical features are respectively input into the diagnostic feature clustering module and the surgical feature clustering module for clustering, to find the clusters corresponding to the diagnostic features and the clusters corresponding to the surgical features, and the centroid of the clusters corresponding to the diagnostic features is used as a common diagnostic feature of similar patients, and the centroid of the clusters corresponding to the surgical features is used as a common surgical feature of similar patients.

[0191] Second splicing unit 034: The updated patient representation is obtained by splicing together the common diagnostic representation of similar patients, the common surgical representation of similar patients, and the updated diagnostic and surgical features.

[0192] Based on the above embodiments, the second training module 04 specifically includes:

[0193] Third Acquisition Unit 041: Acquire the preset number of training iterations;

[0194] Judgment Unit 042: Determines whether the training iterations of the model have reached the preset number of training iterations.

[0195] If not, continue calculating the drug allocation weights and repeatedly train the model using the drug allocation weights.

[0196] If so, end the training, save the model parameters, and obtain the trained drug recommendation model.

[0197] It should be noted that the specific manner in which each module performs its operation in the apparatus described in the above embodiments has been described in detail in the embodiments of the method, and will not be elaborated here.

[0198] Example 3:

[0199] Corresponding to the above method embodiments, this embodiment also provides a drug recommendation model construction device. The drug recommendation model construction device described below and the drug recommendation model construction method described above can be referred to each other.

[0200] Figure 4 This is a block diagram illustrating a drug recommendation model construction device 800 according to an exemplary embodiment. Figure 4 As shown, the drug recommendation model construction device 800 may include a processor 801 and a memory 802. The drug recommendation model construction device 800 may also include one or more of a multimedia component 803, an I / O interface 804, and a communication component 805.

[0201] The processor 801 controls the overall operation of the drug recommendation model construction device 800 to complete all or part of the steps in the drug recommendation model construction method described above. The memory 802 stores various types of data to support the operation of the drug recommendation model construction device 800. This data may include, for example, instructions for any application or method operating on the drug recommendation model construction device 800, and application-related data such as contact data, sent and received messages, images, audio, video, etc. The memory 802 can be implemented using any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 802 or transmitted via the communication component 805. The audio component also includes at least one speaker for outputting audio signals. I / O interface 804 provides an interface between processor 801 and other interface modules, such as a keyboard, mouse, and buttons. These buttons can be virtual or physical. Communication component 805 is used for wired or wireless communication between the drug recommendation model building device 800 and other devices. Wireless communication includes Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination thereof. Therefore, the corresponding communication component 805 may include a Wi-Fi module, a Bluetooth module, and an NFC module.

[0202] In an exemplary embodiment, the drug recommendation model building device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the drug recommendation model building method described above.

[0203] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the drug recommendation model construction method described above. For example, the computer-readable storage medium may be the memory 802 including the program instructions described above, which may be executed by the processor 801 of the drug recommendation model construction device 800 to complete the drug recommendation model construction method described above.

[0204] Example 4:

[0205] Corresponding to the above method embodiments, this embodiment also provides a readable storage medium. The readable storage medium described below can be referred to in conjunction with the drug recommendation model construction method described above.

[0206] A readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the drug recommendation model construction method described in the above method embodiments.

[0207] The readable storage medium can specifically be a USB flash drive, external hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or any other readable storage medium capable of storing program code.

[0208] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0209] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for constructing a drug recommendation model, characterized in that, include: Obtain diagnostic and surgical records to extract patient characteristics; Calculating drug allocation weights based on the patient characteristics includes: Construct an EHR diagram and a DDI diagram, where DDI includes promoting DDI and antagonistic DDI; Examples of safe combination drug use were calculated based on the EHR and DDI diagrams. The allocation weight of the drugs is calculated based on the similarity between the patient characteristics and the safe combination drug use examples, resulting in a first allocation weight; Obtain patient representations of historical patients, and calculate drug allocation weights based on the similarity between these patient representations and those of historical patients to obtain a second allocation weight. The weights of the antagonistic DDI in the second allocation weights are filtered to obtain the third allocation weights; The fourth allocation weight is calculated using the first and third allocation weights; An initial model is constructed, trained using the drug allocation weights, and the patient representation is updated. The drug allocation weights are recalculated based on the updated patient representations, and the initial model is repeatedly trained using these drug allocation weights to obtain a drug recommendation model.

2. The method for constructing a drug recommendation model according to claim 1, characterized in that... It also includes: Multiple drug allocation weights are calculated using a hybrid expert system, which includes multiple calculation channels. Each calculation channel obtains the same patient records and surgical records and then calculates a fourth allocation weight. The final drug allocation weight is obtained by weighting and fusing the multiple fourth allocation weights calculated by the multiple calculation channels.

3. The method for constructing a drug recommendation model according to claim 1, characterized in that... The step of recalculating drug allocation weights based on the updated patient representation and repeatedly training the initial model using these drug allocation weights to obtain a drug recommendation model specifically includes: Get the preset number of training iterations; Determine whether the model has reached the preset number of training iterations: If not, continue calculating the drug allocation weights and repeatedly train the model using the drug allocation weights. If so, end the training, save the model parameters, and obtain the trained drug recommendation model.

4. A drug recommendation model construction device, characterized in that, include: Acquisition module: Used to acquire diagnostic and surgical records to extract patient characteristics; Calculation module: used to calculate drug allocation weights based on the patient characteristics, including: Building blocks: Construct EHR diagrams and DDI diagrams, where DDI includes promoting DDI and antagonistic DDI; The third calculation unit calculates safe combination drug use examples based on the EHR and DDI diagrams. Fourth calculation unit: Calculates the allocation weight of the drugs based on the similarity between the patient characteristics and the safe combination drug use examples, to obtain the first allocation weight; First acquisition unit: Acquires patient representations of historical patients, calculates drug allocation weights based on the similarity between the patient representations and the patient representations of historical patients, and obtains second allocation weights; Fifth calculation unit: Filters the weights of antagonistic DDI in the second allocation weights to obtain the third allocation weights; Sixth calculation unit: Calculate the fourth allocation weight using the first and third allocation weights; First training module: used to build an initial model, train the initial model using the drug allocation weights, and update patient representations; The second training module is used to recalculate drug allocation weights based on the updated patient representations, and to repeatedly train the initial model using the drug allocation weights to obtain a drug recommendation model.

5. The drug recommendation model construction device according to claim 4, characterized in that, The computing module also includes: The seventh calculation unit: uses a hybrid expert system to calculate multiple drug allocation weights. The hybrid expert system includes multiple calculation channels. Each calculation channel obtains the same patient records and surgical records and then calculates the fourth allocation weight. The eighth calculation unit: performs weighted fusion of the multiple fourth allocation weights calculated by the multiple calculation channels to obtain the final drug allocation weight.

6. The drug recommendation model construction apparatus according to claim 5, characterized in that, The second training module specifically includes: Third acquisition unit: Acquire the preset number of training iterations; Judgment Unit: Determines whether the training iterations of the model have reached the preset number of training iterations. If not, continue calculating the drug allocation weights and repeatedly train the model using the drug allocation weights. If so, end the training, save the model parameters, and obtain the trained drug recommendation model.

7. A drug recommendation model construction device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the drug recommendation model construction method as described in any one of claims 1 to 3 when executing the computer program.

8. A readable storage medium, characterized in that: The readable storage medium stores a computer program that, when executed by a processor, implements the steps of the drug recommendation model construction method as described in any one of claims 1 to 3.