CN115565636A - Drug recommendation model construction method, device, equipment and readable storage medium - Google Patents
Drug recommendation model construction method, device, equipment and readable storage medium Download PDFInfo
- Publication number
- CN115565636A CN115565636A CN202211347829.XA CN202211347829A CN115565636A CN 115565636 A CN115565636 A CN 115565636A CN 202211347829 A CN202211347829 A CN 202211347829A CN 115565636 A CN115565636 A CN 115565636A
- Authority
- CN
- China
- Prior art keywords
- patient
- medication
- drug
- weight
- distribution weight
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H20/00—ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance
- G16H20/10—ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance relating to drugs or medications, e.g. for ensuring correct administration to patients
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H50/00—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
- G16H50/70—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for mining of medical data, e.g. analysing previous cases of other patients
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H70/00—ICT specially adapted for the handling or processing of medical references
- G16H70/40—ICT specially adapted for the handling or processing of medical references relating to drugs, e.g. their side effects or intended usage
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Public Health (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Epidemiology (AREA)
- Primary Health Care (AREA)
- Data Mining & Analysis (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Medicinal Chemistry (AREA)
- Chemical & Material Sciences (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Biomedical Technology (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- Toxicology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Pathology (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Pharmacology & Pharmacy (AREA)
- Medical Treatment And Welfare Office Work (AREA)
Abstract
The invention provides a method, a device, equipment and a readable storage medium for constructing a drug recommendation model, which relate to the technical field of drug recommendation algorithms, and comprise the steps of obtaining a diagnosis record and an operation record to extract the representation of a patient; calculating a medication assignment weight based on the patient characterization; constructing an initial model, training the initial model by using the drug distribution weight, and updating the representation of the patient; recalculating the drug assignment weights based on the updated patient characterization, and repeatedly training the initial model with the drug assignment weights to obtain a drug recommendation model. The method is used for solving the technical problems that different weights cannot be distributed according to the importance of neighbor nodes to the current node and the patient group characteristics with high characterization similarity are ignored in the existing algorithm.
Description
Technical Field
The invention relates to the technical field of drug recommendation algorithms, in particular to a drug recommendation model construction method, device, equipment and readable storage medium.
Background
The drug recommendation algorithm refers to an algorithm for recommending a group of drug combinations for treating a diagnosed disease of a patient according to the health state of the patient. At present, in an existing drug recommendation algorithm, a Graph Convolution Network (GCN) is usually adopted to extract features of a drug node, but weights assigned by the GCN to different neighbors of the same node are completely the same, so that the GCN cannot assign different weights to the current node according to the importance of the neighbor nodes. Meanwhile, before a doctor prescribes a medicine for a current patient, the doctor uses the similarity between patients with similar health conditions to assist clinical analysis, but the existing method generally measures the similarity of health states among the patients only by calculating the characteristic similarity among the patients, and ignores the group characteristics of the patients with high characteristic similarity.
Disclosure of Invention
The invention aims to provide a method, a device, equipment and a readable storage medium for constructing a medicine recommendation model, so as to solve the problems. In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
in a first aspect, the present application provides a method for constructing a drug recommendation model, including:
obtaining a diagnostic record and a surgical record to extract patient characterization;
calculating a drug assignment weight based on the patient characterization;
constructing an initial model, training the initial model by using the drug distribution weight, and updating the representation of the patient;
recalculating the drug assignment weights based on the updated patient characterization, and repeatedly training the initial model with the drug assignment weights to obtain a drug recommendation model.
Further, the calculating of the drug assignment weight based on the patient characterization specifically includes:
constructing an EHR graph and a DDI graph, wherein the DDI comprises a promotion DDI and an antagonism DDI;
calculating to obtain a safe combined medication example according to the EHR graph and the DDI graph;
calculating the distribution weight of the medicine based on the similarity of the patient representation and the safe combined medication example to obtain a first distribution weight;
acquiring a patient representation of a historical doctor, and calculating an allocation weight of the medicine based on the similarity between the patient representation and the patient representation of the historical doctor to obtain a second allocation weight;
filtering the weight of antagonistic DDI in the second distribution weight to obtain a third distribution weight;
and calculating to obtain a fourth distribution weight by using the first distribution weight and the third distribution weight.
Further, still include:
calculating to obtain a plurality of drug distribution weights by using a hybrid expert system, wherein the hybrid expert system comprises a plurality of calculation channels, and each calculation channel obtains the same patient record and operation record and then calculates to obtain a fourth distribution weight;
and performing weighted fusion on the plurality of fourth distribution weights obtained by calculation of the plurality of calculation channels to obtain the final medicine distribution weight.
Further, the recalculating the medication allocation weights based on the updated patient characterization, and repeatedly training the initial model using the medication allocation weights to obtain a medication recommendation model specifically includes:
acquiring preset training times;
judging whether the training times of the model reach preset training times or not:
if not, continuing to calculate the drug distribution weight, and repeatedly training the model by using the drug distribution weight;
if yes, finishing training, and storing model parameters to obtain a trained medicine recommendation model.
In a second aspect, the present application further provides a drug recommendation model building apparatus, including:
an acquisition module: for obtaining diagnostic and surgical records to extract patient characterization;
a calculation module: for calculating a medication assignment weight based on the patient characterization;
a first training module: for constructing an initial model, training the initial model using the drug-assigned weights, and updating patient characteristics;
a second training module: for recalculating the medication allocation weights based on the updated patient characterization, and repeatedly training the initial model with the medication allocation weights to obtain a medication recommendation model.
Further, the calculation module specifically includes:
a construction unit: constructing an EHR graph and a DDI graph, wherein DDI comprises a facilitation DDI and an antagonism DDI;
a third calculation unit: calculating to obtain a safe combined medication example according to the EHR graph and the DDI graph;
a fourth calculation unit: calculating the distribution weight of the medicine based on the similarity of the patient representation and the safe combined medication example to obtain a first distribution weight;
a first acquisition unit: acquiring a patient representation of a historical doctor, and calculating an allocation weight of the medicine based on the similarity between the patient representation and the patient representation of the historical doctor to obtain a second allocation weight;
a fifth calculation unit: filtering the antagonistic DDI weight in the second distribution weight to obtain a third distribution weight;
a sixth calculation unit: and calculating to obtain a fourth distribution weight by using the first distribution weight and the third distribution weight.
Further, the calculation module further comprises:
a seventh calculation unit: calculating to obtain a plurality of medicine distribution weights by using a mixed expert system, wherein the mixed expert system comprises a plurality of calculation channels, and each calculation channel obtains the same patient record and operation record and then calculates to obtain a fourth distribution weight;
an eighth calculation unit: and performing weighted fusion on the plurality of fourth distribution weights obtained by calculation of the plurality of calculation channels to obtain the final medicine distribution weight.
Further, the second training module specifically includes:
a third acquisition unit: acquiring preset training times;
the judging unit is used for judging whether the training times of the model reach preset training times:
if not, continuing to calculate the drug distribution weight, and repeatedly training the model by using the drug distribution weight;
if yes, finishing training, and storing model parameters to obtain a trained medicine recommendation model.
In a third aspect, the present application further provides a drug recommendation model building apparatus, including:
a memory for storing a computer program;
a processor for implementing the steps of the medication recommendation model construction method when executing the computer program.
In a fourth aspect, the present application further provides a readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the above method for constructing a model based on drug recommendation.
The invention has the beneficial effects that:
the method overcomes the defect that a graph convolution network cannot distribute different weights to different neighbors of the same node by utilizing a multi-head graph attention mechanism, and distributes different weights to different neighbor drug nodes according to the importance of the neighbor drug nodes relative to the current drug node so as to capture the importance difference of different neighbor drugs in the combined drug combination. Secondly, in order to simulate the behavior of assisting clinical analysis by doctors by utilizing the similarity between patients with similar health conditions in real situations, the method and the system respectively perform k-means clustering operation based on the diagnosis characteristics and the operation characteristics obtained by GRU processing, and extract the common characteristics of the similar patients so as to further enhance the patient characteristics of the current patients. Finally, in order to learn the medication similarity and difference between the medication prescriptions prescribed by different doctors, a plurality of medication recommendation models are trained by using a mixed expert system, and the recommendation results of the medication recommendation models are weighted and combined by a gating module to obtain the final recommendation result, so that the accuracy of the recommendation models is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a first flowchart illustrating a method for constructing a drug recommendation model according to an embodiment of the present invention;
FIG. 2 is a second flowchart illustrating a method for constructing a medication recommendation model according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a drug recommendation model building apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a drug recommendation model construction device according to an embodiment of the present invention.
The labels in the figure are:
01. an acquisition module; 011. a reading unit; 012. a first calculation unit; 013. a second calculation unit; 014. a first splicing unit; 02. a calculation module; 021. a building unit; 022. a third calculation unit; 0221. a first learning unit; 0222. a second learning unit; 0223. a third learning unit; 023. a fourth calculation unit; 024. a first acquisition unit; 025. a fifth calculation unit; 026. a sixth calculation unit; 027. a seventh calculation unit; 028. an eighth calculation unit; 03. a first training module; 031. a second acquisition unit; 032. a first training unit; 033. a searching unit; 034. a second splicing unit; 04. a second training module; 041. a third acquisition unit; 042. a judgment unit;
800. a drug recommendation model construction device; 801. a processor; 802. a memory; 803. a multimedia component; 804. an I/O interface; 805. a communication component.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example 1:
the embodiment provides a method for constructing a medicine recommendation model.
Referring to fig. 1 and 2, the method is shown to include the following steps:
s1, obtaining a diagnosis record and a surgery record to extract the representation of a patient;
specifically, the step S1 includes:
s11, reading the diagnosis record and the operation record of the patient;
based on the patient history information stored in the electronic medical record, each patient can be represented as a multivariate time series:where N is an element of {1,2., N }, where N is the total number of patients,represents the visit record, T, generated by the nth patient at the time of the T visit (n) Representing the total number of visits by the nth patient.
The treatment record generated by each treatment of the patient mainly consists of three parts: v. of t =[d t ,p t ,m t ],d t Representing a diagnostic record, p t Represents the surgical record, m t Represents the medication record. Wherein d is t ∈{0,1} |D| ,p t ∈{0,1 |P| ,m t ∈{0,1} |M| Wherein D, P, M represents a diagnostic code set, an operative code set and a medication code set, respectively.
To differentiate the visit records of different patients, the visit record generated by the nth patient at the t visit is expressed asWherein A multi-hot vector, which is binary coded, represents the patient's diagnostic record, surgical record, and medication record, respectively.
S12, linearly embedding the diagnosis record and the operation record respectively to obtain a diagnosis record vector and an operation record vector:
in the formula (1), D t (n) Representing a diagnostic record vector, W d A linear embedded matrix representing the diagnostic record to be learned, in equation (2), P t (n) Represents the surgical record vector, W p A linear embedded matrix representing the surgical record to be learned.
S13, respectively extracting features of the diagnosis record vector and the operation record vector to obtain a diagnosis record feature vector and an operation record feature vector;
specifically, the diagnosis record vector and the operation record vector are respectively input into two independent GRUs for word embedding, feature extraction is carried out on the diagnosis record vector and the operation record vector after word embedding, and a diagnosis record feature vector and an operation record feature vector are respectively obtained:
in the formula (3), the reaction mixture is,representing diagnostic recordsThe feature vector, in equation (4),representing the surgical record feature vector.
S14, splicing the diagnosis record characteristic vector and the operation record characteristic vector to obtain the representation of the patient;
in this embodiment, a patient characterization is constructed for the first time, and the patient characterization is formed by splicing a diagnostic record feature vector and an operation record feature vector:
in the formula, q t (n) Representing patient characterization, f (-) is a single-layer fully connected network.
S2, calculating a medicine distribution weight based on the patient characteristics;
specifically, the step S2 includes:
s21, constructing an EHR graph and a DDI graph, wherein the DDI comprises promotion DDI and antagonism DDI;
specifically, the EHR graph is a graph formed by medication information of a patient in an electronic medical record, each node represents a drug, and the connection of several drug nodes indicates that the drugs are used in combination in the electronic medical record, that is, the drugs are used together by a doctor in reality to treat a disease of the patient.
In the DDI graph, each node also represents a Drug, and the nodes are connected to indicate that the drugs used together cause Drug-Drug Interaction (DDI), wherein DDI comprises promotion DDI and antagonism DDI, and promotion DDI indicates that the Drug combination enhances the therapeutic effect; antagonizing DDI means that the drug combination causes side effects.
Representing EHR as G e h r ={V ehr ,E ehr };
Denote DDI as G ddi ={V ddi ,E ddi };
Let the number of drug nodes be | M |, then have | V | ehr |=|V ddi |=|M|。
S22, calculating according to the EHR graph and the DDI graph to obtain a safe combined medication example;
specifically, the step S22 includes:
s221, a graph convolution neural network is respectively applied to the EHR graph and the DDI graph to learn the joint medication knowledge and the DDI knowledge, so that a node feature matrix of the EHR graph and a node feature matrix of the DDI graph are obtained, and the method specifically comprises the following calculation steps:
s2211. Calculating EHR graph G ehr Adjacent matrix A of ehr :
Constructing a bipartite graph A based on patient medication records in EHR graphs b Bipartite graph A b Is a drug on one side and a combination drug on the other side (i.e., if there is a combination between drug a and drug B, then there is a side between drug a on the left side and drug B on the right side), then EHR graph G ehr Adjacent matrix A of ehr Can be expressed as
S2212. Calculate adjacency matrix A of DDI graph ddi :
Extraction of drug pair information from the TWOSIDES dataset that leads to antagonism of DDI, i.e. adjacency matrix A when combination of class i and class j drugs leads to adverse drug interactions ddi [i,j]=1; otherwise A ddi [i,j]=0;
S2213, applying a two-layer GCN (graph convolution neural network) on the EHR graph and the DDI graph respectively to learn the embedding of the drug combination knowledge and the DDI knowledge to obtain the node feature matrixes of the EHR graph and the DDI graph:
in the formula (6), h ehr A node feature matrix representing an EHR graph,is represented by A ehr A degree matrix of (c);is represented by A ehr Normalizing the result; i is an identity matrix, W e1 、W e2 For the hidden weight parameter matrix, tanh () is an activation function, hyperbolic tangent (hyperbolic tank).
In the formula (7), h ddi A node characteristic matrix representing a DDI graph,is represented by A ddi The degree matrix of (c) is,is represented by A ddi Normalized result of (2), W d1 、W d2 Is a hidden weight parameter matrix.
S222, learning a node feature matrix of the EHR Graph and a node feature matrix of the DDI Graph by using a Graph Attention Network (GAT) to obtain a feature matrix corresponding to the EHR Graph and a feature matrix corresponding to the DDI Graph; the method specifically comprises the following steps:
s2221, initializing a node characteristic matrix, and expressing the node characteristic matrix in a characteristic vector set mode:
h={h 1 ,h 2 ,...,h |M| },h i ∈R F ; (8)
in the formula (8), h i The node characteristics of the i-th class of medicine respectively correspond to h ehr Or h ddi In the ith row, | M | represents the number of drug nodes, F is the characteristic dimension of the node, R F Represents h i Is F-dimensional.
S2222, each node aggregates the characteristics of the neighbor nodes to update the characteristics of the node, so that each layer of GAT outputs an updated node characteristic vector set:
wherein i, j and k all represent nodes, N i A set of neighbor nodes representing node i, σ (·) is a Sigmoid function, W is a weight matrix, and W is E.R F ×R F′ ,α ij Representing attention coefficients between different nodes, a representing a weight matrix between connection layers in a neural network, a T Representing a transposed matrix, | | represents a join operation.
S2223, a feature matrix M corresponding to the EHR graph is formed by all the nodes and feature vectors thereof e h r Feature matrix M corresponding to DDI map ddi Wherein M is ehr ∈R |M|*d 、M ddi ∈R |M|*d And | M | represents the total number of the medicine nodes, and d is the characteristic dimension of the medicine nodes.
S223, screening out a characteristic matrix of antagonistic DDI from the characteristic matrix corresponding to the EHR diagram to obtain a safe combined medication example:
M g =M ehr -λM ddi ; (10)
wherein λ is a weighted variable fused to different knowledge graphs for controlling the extent of screening out pairs of undesirable DDI drugs in EHR graphs, M g Is an example of safe combination drug.
S23, calculating the distribution weight of the medicine based on the similarity of the patient characterization and the safe combined medication example to obtain a first distribution weight;
in the formula (I), the compound is shown in the specification,a first of the assigned weights is represented by,a transposed matrix is represented that is,representing the patient characterization.
S24, obtaining the patient characteristics of the historical doctor, and calculating the distribution weight of the medicine based on the similarity between the patient characteristics and the patient characteristics of the historical doctor to obtain a second distribution weight;
specifically, the step S24 includes:
In the formula (I), the compound is shown in the specification,represents the patient characterization generated by the nth patient at the time of the T visit, T (n) Represents the total number of visits of the nth patient, and N is the total number of patients.
In the formula (I), the compound is shown in the specification,represents the medication record generated by the nth patient at the time of the t visit.
s244, calculating the patient characteristics of the current patientPatient characterization from historical visitsThe similarity between the two drugs is calculated, and then the corresponding drugs are assigned with weights, so that a second assigned weight is obtained:
in the formula (I), the compound is shown in the specification,a second assigned weight is indicated and,representing a transposed matrix.
S25, filtering the antagonistic DDI weight in the second distribution weight to obtain a third distribution weight, wherein the specific calculation formula is as follows:
in the formula (I), the compound is shown in the specification,representing the third allocation weight.
S26, calculating by using the first distribution weight and the third distribution weight to obtain a fourth distribution weight, wherein a specific calculation formula is as follows:
The step S2 further includes:
s27, calculating to obtain a plurality of medicine distribution weights by using a mixed expert system (MOE), wherein the mixed expert system comprises a plurality of calculation channels, and calculating to obtain a fourth distribution weight after each calculation channel obtains the same patient record and operation record;
in this embodiment, the hybrid expert system includes m computation channels, and then m fourth distribution weights can be obtained.
S28, weighting and fusing a plurality of fourth distribution weights obtained by calculation of the plurality of calculation channels to obtain a final medicine distribution weight;
specifically, the m fourth distribution weights are input into a gating module (a fusion mechanism used by the MoE for weighting and fusing the results output by the m experts), and the final drug distribution weight is obtained by calculation according to the following specific calculation formula:
in the formula (I), the compound is shown in the specification,representing the final drug dispensing weight;
g i representing the assigned weight of the ith expert.
S3, constructing an initial model, training the initial model by using the medicine distribution weight, and updating the representation of the patient;
specifically, the step S3 includes:
s31, acquiring a medicine distribution weight;
s32, training an initial model by using the medicine distribution weight, and obtaining updated diagnosis characteristics and operation characteristics;
and S33, inputting the updated diagnosis features and the updated operation features into a diagnosis feature clustering module and an operation feature clustering module respectively for k-means clustering, searching for clustering clusters corresponding to the diagnosis features and clustering clusters corresponding to the operation features, taking the clustering cluster centroids corresponding to the diagnosis features as common diagnosis features of similar patients, and taking the clustering cluster centroids corresponding to the operation features as common operation features of the similar patients.
S34, splicing the common diagnosis characterization of the similar patients, the common operation characterization of the similar patients and the updated diagnosis characteristic and operation characteristic to obtain an updated patient characterization, namely:
in the formula (I), the compound is shown in the specification,representing a common diagnostic characterization of similar patients,representing a co-operative characterization of similar patients.
In this embodiment, the patient characterization constructed in the first round in step S1 is only spliced from the diagnosis feature and the surgical feature, and the patient characterization constructed in step S33 (the second round and above) is spliced from the similar patient common diagnosis characterization, the similar patient common surgical characterization, the diagnosis feature and the surgical feature.
And S4, recalculating the drug distribution weight based on the updated patient representation, and repeatedly training the initial model by using the drug distribution weight to obtain a drug recommendation model.
Specifically, the step S4 includes:
s41, acquiring preset training times, preferably, making the preset training times be 50 times;
s42, judging whether the training times of the model reach preset training times:
if not, updating the representation of the patient, repeatedly calculating the drug distribution weight, and repeatedly training the model by using the drug distribution weight;
if yes, finishing training, and storing model parameters to obtain a trained medicine recommendation model.
Example 2:
as shown in fig. 3, the present embodiment provides a medication recommendation model building apparatus, including:
an acquisition module 01: for obtaining diagnostic and surgical records to extract patient characterization;
the calculation module 02: for calculating a medication assignment weight based on the patient characterization;
the first training module 03: for constructing an initial model, training the initial model using the drug-assigned weights, and updating patient characteristics;
the second training module 04: for recalculating the medication allocation weights based on the updated patient characterization, and repeatedly training the initial model with the medication allocation weights to obtain a medication recommendation model.
Based on the above embodiment, the obtaining module 01 specifically includes:
the reading unit 011: reading a patient's diagnostic record and surgical record;
the first calculation unit 012: respectively carrying out linear embedding on the diagnosis record and the operation record to obtain a diagnosis record vector and an operation record vector;
the second calculation unit 013: respectively extracting features of the diagnosis record vector and the operation record vector to obtain a diagnosis record feature vector and an operation record feature vector;
first splice unit 014: and splicing the diagnostic record characteristic vector and the operation record characteristic vector to obtain the patient characterization.
Based on the above embodiment, the calculating module 02 specifically includes:
construction unit 021: constructing an EHR graph and a DDI graph, wherein DDI comprises a facilitation DDI and an antagonism DDI;
third calculation unit 022: calculating to obtain a safe combined medication example according to the EHR graph and the DDI graph;
the fourth calculation unit 023: calculating the distribution weight of the medicine based on the similarity of the patient representation and the safe combined medication example to obtain a first distribution weight;
the first acquisition unit 024: acquiring a patient representation of a historical doctor, and calculating an allocation weight of the medicine based on the similarity between the patient representation and the patient representation of the historical doctor to obtain a second allocation weight;
the fifth calculation unit 025: filtering the antagonistic DDI weight in the second distribution weight to obtain a third distribution weight;
sixth calculation unit 026: and calculating to obtain a fourth distribution weight by using the first distribution weight and the third distribution weight.
Based on the above embodiment, the third computing unit 022 specifically includes:
first learning unit 0221: respectively applying a graph convolution neural network on the EHR graph and the DDI graph to learn the joint medication knowledge and the DDI knowledge to obtain a node characteristic matrix of the EHR graph and a node characteristic matrix of the DDI graph;
the second learning unit 0222: learning a node feature matrix of the EHR graph and a node feature matrix of the DDI graph by using a graph attention network to obtain a feature matrix corresponding to the EHR graph and a feature matrix corresponding to the DDI graph;
third learning unit 0223: and screening out the characteristic matrix of antagonistic DDI from the characteristic matrix corresponding to the EHR diagram to obtain the safe combined medication example.
Based on the above embodiment, the calculation module 02 further includes:
the seventh calculation unit 027: calculating to obtain a plurality of drug distribution weights by using a hybrid expert system, wherein the hybrid expert system comprises a plurality of calculation channels, and each calculation channel obtains the same patient record and operation record and then calculates to obtain a fourth distribution weight;
the eighth calculating unit 028: and performing weighted fusion on the plurality of fourth distribution weights obtained by calculation of the plurality of calculation channels to obtain the final medicine distribution weight.
Based on the above embodiment, the first training module 03 specifically includes:
the second acquisition unit 031: acquiring a drug distribution weight;
first training unit 032: training an initial model by using the drug distribution weight, and obtaining updated diagnosis characteristics and operation characteristics;
find units 033: inputting the updated diagnosis features and the updated operation features into a diagnosis feature clustering module and an operation feature clustering module respectively for clustering, searching clustering clusters corresponding to the diagnosis features and clustering clusters corresponding to the operation features, taking the clustering cluster centroids corresponding to the diagnosis features as common diagnosis features of similar patients, and taking the clustering cluster centroids corresponding to the operation features as common operation features of the similar patients;
the second splicing unit 034: and splicing the common diagnosis characteristics of the similar patients, the common operation characteristics of the similar patients and the updated diagnosis characteristics and operation characteristics to obtain updated patient characteristics.
Based on the above embodiment, the second training module 04 specifically includes:
third obtaining unit 041: acquiring preset training times;
a judging unit 042, judging whether the training times of the model reach the preset training times:
if not, continuing to calculate the drug distribution weight, and repeatedly training the model by using the drug distribution weight;
if yes, finishing training, and storing model parameters to obtain a trained medicine recommendation model.
It should be noted that, regarding the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated herein.
Example 3:
corresponding to the above method embodiment, the present embodiment further provides a medication recommendation model building device, and a medication recommendation model building device described below and a medication recommendation model building method described above may be referred to in correspondence.
Fig. 4 is a block diagram illustrating a medication recommendation model building apparatus 800 according to an exemplary embodiment. As shown in fig. 4, the medication recommendation model building apparatus 800 may include: a processor 801, a memory 802. The medication recommendation model building apparatus 800 may further include one or more of a multimedia component 803, an i/O interface 804, and a communication component 805.
The processor 801 is configured to control the overall operation of the medication recommendation model building apparatus 800, so as to complete all or part of the steps in the medication recommendation model building method. The memory 802 is used to store various types of data to support operation at the medication recommendation model building device 800, which may include, for example, instructions for any application or method operating on the medication recommendation model building device 800, as well as application-related data, such as contact data, transceived messages, pictures, audio, video, and so forth. The Memory 802 may be implemented by any type of volatile or non-volatile Memory device or 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 Memory, flash Memory, magnetic disk or optical disk. The multimedia components 803 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving an external audio signal. The received audio signal may further be stored in the memory 802 or transmitted through the communication component 805. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 804 provides an interface between the processor 801 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the medication recommendation model building device 800 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding Communication component 805 may include: wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the drug recommendation model building apparatus 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 for performing the drug recommendation model building methods described above.
In another exemplary embodiment, a computer readable storage medium including program instructions for implementing the steps of the above-described drug recommendation model construction method when executed by a processor is also provided. For example, the computer readable storage medium may be the above-described memory 802 comprising program instructions executable by the processor 801 of the medication recommendation model building apparatus 800 to perform the above-described medication recommendation model building method.
Example 4:
corresponding to the above method embodiment, a readable storage medium is also provided in this embodiment, and a readable storage medium described below and a method for constructing a medication recommendation model described above may be referred to correspondingly.
A readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the method for constructing a medication recommendation model according to the above-mentioned method embodiments.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A method for constructing a drug recommendation model is characterized by comprising the following steps:
obtaining a diagnostic record and a surgical record to extract patient characterization;
calculating a medication assignment weight based on the patient characterization;
constructing an initial model, training the initial model by using the drug distribution weight, and updating the representation of the patient;
recalculating the drug assignment weights based on the updated patient characterization, and repeatedly training the initial model with the drug assignment weights to obtain a drug recommendation model.
2. The method for constructing a medication recommendation model according to claim 1, wherein said calculating a medication assignment weight based on said patient characterization comprises:
constructing an EHR graph and a DDI graph, wherein DDI comprises a facilitation DDI and an antagonism DDI;
calculating to obtain a safe combined medication example according to the EHR graph and the DDI graph;
calculating the distribution weight of the medicine based on the similarity of the patient representation and the safe combined medication example to obtain a first distribution weight;
acquiring a patient representation of a historical doctor, and calculating an allocation weight of the medicine based on the similarity between the patient representation and the patient representation of the historical doctor to obtain a second allocation weight;
filtering the weight of antagonistic DDI in the second distribution weight to obtain a third distribution weight;
and calculating to obtain a fourth distribution weight by using the first distribution weight and the third distribution weight.
3. The method of constructing a medication recommendation model according to claim 2, further comprising:
calculating to obtain a plurality of drug distribution weights by using a hybrid expert system, wherein the hybrid expert system comprises a plurality of calculation channels, and each calculation channel obtains the same patient record and operation record and then calculates to obtain a fourth distribution weight;
and performing weighted fusion on the plurality of fourth distribution weights obtained by calculation of the plurality of calculation channels to obtain the final medicine distribution weight.
4. The method for constructing a medication recommendation model according to claim 1, wherein the recalculating the medication allocation weights based on the updated patient characterization, and repeatedly training the initial model using the medication allocation weights to obtain the medication recommendation model specifically comprises:
acquiring preset training times;
judging whether the training times of the model reach preset training times or not:
if not, continuing to calculate the drug distribution weight, and repeatedly training the model by using the drug distribution weight;
if yes, finishing training, and storing model parameters to obtain a trained medicine recommendation model.
5. A medication recommendation model building apparatus, comprising:
an acquisition module: for obtaining diagnostic and surgical records to extract patient characterization;
a calculation module: for calculating a medication assignment weight based on the patient characterization;
a first training module: for constructing an initial model, training the initial model using the drug-assigned weights, and updating patient characteristics;
a second training module: for recalculating the medication allocation weights based on the updated patient characterization, and repeatedly training the initial model with the medication allocation weights to obtain a medication recommendation model.
6. The medication recommendation model building device according to claim 5, wherein the calculation module specifically comprises:
a construction unit: constructing an EHR graph and a DDI graph, wherein the DDI comprises a promotion DDI and an antagonism DDI;
a third calculation unit: calculating to obtain a safe combined medication example according to the EHR graph and the DDI graph;
a fourth calculation unit: calculating the distribution weight of the medicine based on the similarity of the patient representation and the safe combined medication example to obtain a first distribution weight;
a first acquisition unit: acquiring a patient representation of a historical doctor, and calculating a distribution weight of a medicine based on the similarity between the patient representation and the patient representation of the historical doctor to obtain a second distribution weight;
a fifth calculation unit: filtering the weight of antagonistic DDI in the second distribution weight to obtain a third distribution weight;
a sixth calculation unit: and calculating to obtain a fourth distribution weight by using the first distribution weight and the third distribution weight.
7. The medication recommendation model building apparatus of claim 5, wherein said calculation module further comprises:
a seventh calculation unit: calculating to obtain a plurality of drug distribution weights by using a hybrid expert system, wherein the hybrid expert system comprises a plurality of calculation channels, and each calculation channel obtains the same patient record and operation record and then calculates to obtain a fourth distribution weight;
an eighth calculating unit: and performing weighted fusion on the plurality of fourth distribution weights obtained by calculation of the plurality of calculation channels to obtain the final medicine distribution weight.
8. The medication recommendation model building apparatus according to claim 5, wherein the second training module specifically comprises:
a third acquisition unit: acquiring preset training times;
the judging unit is used for judging whether the training times of the model reach preset training times:
if not, continuing to calculate the drug distribution weight, and repeatedly training the model by using the drug distribution weight;
if yes, finishing training, and storing model parameters to obtain a trained medicine recommendation model.
9. A medication recommendation model building apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method of constructing a medication recommendation model according to any one of claims 1 to 4 when executing the computer program.
10. A readable storage medium, characterized by: the readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the method for constructing a medication recommendation model according to any of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211347829.XA CN115565636A (en) | 2022-10-31 | 2022-10-31 | Drug recommendation model construction method, device, equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211347829.XA CN115565636A (en) | 2022-10-31 | 2022-10-31 | Drug recommendation model construction method, device, equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115565636A true CN115565636A (en) | 2023-01-03 |
Family
ID=84769047
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211347829.XA Pending CN115565636A (en) | 2022-10-31 | 2022-10-31 | Drug recommendation model construction method, device, equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115565636A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116153528A (en) * | 2023-04-20 | 2023-05-23 | 武汉纺织大学 | Drug recommendation method based on attention mechanism and global retrieval |
-
2022
- 2022-10-31 CN CN202211347829.XA patent/CN115565636A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116153528A (en) * | 2023-04-20 | 2023-05-23 | 武汉纺织大学 | Drug recommendation method based on attention mechanism and global retrieval |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Ravì et al. | Deep learning for health informatics | |
Pham et al. | Deepcare: A deep dynamic memory model for predictive medicine | |
CN112951362A (en) | Medicine recommendation method, device, equipment and storage medium | |
CN112652358A (en) | Drug recommendation system, computer equipment and storage medium for regulating and controlling disease target based on three-channel deep learning | |
CN114373550B (en) | Medicine IC50 deep learning model prediction method based on molecular structure and gene expression | |
US20200027565A1 (en) | A layered medical data computer architecture | |
CN114783603A (en) | Multi-source graph neural network fusion-based disease risk prediction method and system | |
CN115565636A (en) | Drug recommendation model construction method, device, equipment and readable storage medium | |
Paranjay et al. | A neural network aided real-time hospital recommendation system | |
Murad et al. | AI powered asthma prediction towards treatment formulation: An android app approach | |
Alwadi et al. | Applications of Artificial Intelligence in the Treatment of Behavioral and Mental Health Conditions | |
CN115631852B (en) | Certificate type recommendation method and device, electronic equipment and nonvolatile storage medium | |
KR102447046B1 (en) | Method, device and system for designing clinical trial protocol based on artificial intelligence | |
CN113314195B (en) | Staged dynamic drug administration matching system for chronic diseases | |
CN113488102A (en) | Medicine recommendation system, computer equipment and storage medium based on genetic algorithm integrated deep learning network | |
Budhraja et al. | Mosaic LSM: A liquid state machine approach for multimodal longitudinal data analysis | |
US20150356274A1 (en) | Methods and systems to create and apply models that screen patients for referral to a specialist for a medical therapy | |
CN116153528B (en) | Drug recommendation method based on attention mechanism and global retrieval | |
Gallegos Acosta et al. | Feature Selection in Electroencephalographic Signals Using a Multicriteria Decision Analysis Method | |
Smith et al. | Domain organisation emerges in cross-modal but not within-modal semantic feature integration | |
KR102505380B1 (en) | Method, device and system for providing service to present preemptive behavioral therapy and identify past anxiety inducing situation of user using artificial intelligence | |
KR102520383B1 (en) | Apparatus, method and system for managing and processing artificial intelligence-based hospital care and prescription information | |
KR102552867B1 (en) | User personality type analysis results using artificial intelligence model customized instrument, instructor, and practice song recommendation method, apparatus and system | |
CN114943314B (en) | ICD (interface control document) diagnosis code-based object partitioning method, storage medium and electronic medical record system | |
KR102593868B1 (en) | Methods and systems for providing nail and toenail care information and operating expert matching platform services |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |