Prescription drug prediction model based on enhanced graph spatio-temporal convolution network

By enhancing the graph spatiotemporal convolutional network model, the problem of insufficient mining of the correlation of medical events in existing technologies is solved, and the effective capture of structural and temporal features is achieved, thereby improving the accuracy and efficiency of prescription drug prediction.

CN115910269BActive Publication Date: 2026-07-07ZHEJIANG UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIV OF SCI & TECH
Filing Date
2022-11-04
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing prescription drug prediction methods fail to fully explore the intrinsic correlations between medical events, neglecting structural and temporal characteristics, and are unable to effectively describe structural correlations and temporal continuity.

Method used

A model based on an enhanced graph spatiotemporal convolutional network is adopted, including modules for data preprocessing, medical entity embedding, spatial structure enhancement, temporal relationship progression, and cache structure enhancement. The model captures structural and temporal features by combining graph attention networks and dilated convolutions with residual networks, and uses a caching mechanism to improve accuracy.

Benefits of technology

It effectively captures the structural correlation and temporal continuity features of patient medical record data, improves the accuracy of prescription drug prediction, reduces the number of training parameters, reduces memory pressure, and enhances the model's recommendation ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115910269B_ABST
    Figure CN115910269B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of computer application, and discloses a prescription drug prediction model based on an enhanced graph space-time convolution network, which comprises a data preprocessing module, a medical entity embedding module, a space structure enhancement module, a time sequence relationship progressive module, a cache structure enhancement module and a model training and optimization module; the application can fully capture the structural correlation and time continuity features of patient medical record data; in terms of structural correlation, the application proposes to establish a global medical entity relationship graph, apply a graph attention neural network to learn target features, and effectively establish internal correlations between medical entities; meanwhile, the application applies an inflation convolution combined with a residual link to a time sequence part, improves the accuracy of training results on the premise of greatly reducing training parameters, and better captures time sequence features; on this basis, the application further uses a cache mechanism to further improve the recommendation accuracy of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer application technology, and in particular relates to a prescription drug prediction model based on an enhanced graph spatiotemporal convolutional network. Background Technology

[0002] With the continuous development of modern medicine, the volume of medical big data is growing at a rate that nearly doubles every two years. To ensure that the generation and updating speed of medical big data meets the real-time needs of modern healthcare, the mining and application of medical data has inevitably become a crucial research task in the field of biomedical big data. Among these, prescription drug prediction based on electronic medical records is an important application of deep learning and data mining technologies in the field of biomedical big data research. It can recommend medications to patients based on their historical changes in their condition, diagnostic process, and recommended medications, combined with their current diagnosis. This effectively assists doctors in formulating safe and effective prescriptions, further improving the synergy and safety of prescriptions. However, prescription drug prediction, due to its complex structural correlations and temporal continuity, remains a challenging task.

[0003] 1) Structural correlation

[0004] A patient's electronic medical record can be viewed as a collection of multiple medical processes. Each medical process can be seen as a collection of diagnoses, treatments, and medication recommendations. For each medical process, multiple complications may be diagnosed, multiple related surgeries performed, and multiple common medications used, all of which are interconnected. For example, regarding disease characteristics, peptic ulcers are often accompanied by gastric perforation, and chickenpox is frequently complicated by erysipelas. Regarding medication use, the combined use of statins and cardiovascular drugs is more helpful for the recovery of coronary heart disease, and so on. The medical entities in diagnosis, treatment, and prescription are not only closely related internally, but also exhibit a close structural correlation throughout the entire process.

[0005] 2) Temporal continuity

[0006] Electronic medical records (EMRs) are digital medical records stored on electronic devices that meticulously document a patient's condition and medical diagnoses over recent years. Therefore, they can be viewed as multiple consecutive medical processes, exhibiting temporal correlation. For example, a patient with chronic diseases like diabetes or heart disease may not experience significant changes in diagnosis and recommended medications; a diagnosis of chickenpox may be followed by complications such as erysipelas. Many related medical events may appear as temporal features in the patient's record.

[0007] There are many existing methods for prescription drug prediction, including K-means clustering, association rule methods, ontology languages, and expert systems. Some of these methods consider the similarity between diseases, while others consider the interaction between drugs, which improves the accuracy of the models to some extent. However, these methods do not fully explore the intrinsic correlation between medical events and neglect the extraction of temporal features. To better characterize structural and temporal features, GAMENet introduces Graph Convolutional Networks (GCNs) for structural modeling and uses Enhanced Memory Neural Networks (MANNs) to capture the temporal features of the data, achieving a breakthrough in the field of prescription drug prediction. G-Bert pre-trains on electronic medical records and obtains a tree diagram of medical entity classification concepts through Graph Convolutional Networks (GCNs), enhancing the learning of structural features. These methods capture some structural and temporal features to a certain extent, but they do not focus on the relationships between medical events in the dynamic environment of the entire medical process, and therefore cannot inherently describe structural correlation and temporal continuity. Summary of the Invention

[0008] The purpose of this invention is to provide a prescription drug prediction model based on an enhanced graph spatiotemporal convolutional network to solve the above-mentioned technical problems.

[0009] To address the aforementioned technical problems, the present invention provides a specific technical solution for a prescription drug prediction model based on an enhanced graph spatiotemporal convolutional network as follows:

[0010] A prescription drug prediction model based on an enhanced graph spatiotemporal convolutional network includes a data preprocessing module, a medical entity embedding module, a spatial structure enhancement module, a temporal relationship progression module, a cache structure enhancement module, and a model training and optimization module.

[0011] The data preprocessing module is used to perform structured processing on the patient's historical medical records, current medical status, and medication information to construct a corresponding structured representation of the electronic medical record;

[0012] The medical entity embedding module is used to embed medical entities into diagnostic data and surgical status data;

[0013] The spatial structure enhancement module is used to construct global structural correlation graph matrices for diagnostic events and surgical events, respectively.

[0014] The temporal relationship progression module uses dilated convolution combined with residual network to replace the traditional RNN model;

[0015] The cache structure enhancement module stores the patient's historical data in the cache in the form of key-value pairs, and compares and links the obtained representation vector and cache content through an attention-based similarity algorithm.

[0016] The training and optimization module of the model is used to train and optimize the prescription drug prediction model based on the augmented graph spatiotemporal convolutional network.

[0017] Furthermore, the data preprocessing module includes means for performing the following steps:

[0018] Acquire patients' electronic medical record data and perform structured processing;

[0019] The patient's electronic medical record data is represented as a collection of time-series data. Where N represents the total number of patients, T represents the maximum number of visits a patient can make, and for a given patient's t-th visit... This includes diagnostic data from the t-th visit. Surgical status data Recommended medication data After structuring, the specific medical event names have been standardized and converted into ICD-9 diagnostic codes, ICD-9 surgical codes, and ATC drug codes.

[0020] Furthermore, the medical entity embedding module includes means for performing the following steps:

[0021] For a patient's t-th visit Diagnostic data Surgical status data It consists of hundreds of one-hot codes, for Perform word embeddings separately to obtain the embedding matrix: in Let represent the number of diagnoses and surgeries at the t-th visit, respectively, and l represent the dimension of the embedding matrix. The embedding formula is as follows:

[0022]

[0023] Among them W *,e This represents the learnable weight matrix. This represents diagnostic data or surgical condition data, embedded through medical entities, and will input x t Convert to Furthermore, the space structure enhancement module includes means for performing the following steps:

[0024] Construct a medical event relationship graph to obtain the internal correlations of each medical event. Based on the Positive Point Mutual Information (PPMI) principle, construct diagnostic relationship graph matrices for a given patient's diagnostic data and surgical status data. Relationship matrix with surgical condition Where N d N pThis represents the total number of diagnostic events and the total number of surgical events in the entire dataset. The correlation between specific medical events i and j is calculated using the following formula:

[0025]

[0026] Where p(i,j) represents the probability that medical events i and j occur simultaneously, and p(i) and p(j) represent the probabilities that events i and j occur on their own.

[0027] A multi-head graph attention network is used to capture the structural features of medical events, so that each embedded medical vector representation can contain information from other related vectors, and the diagnostic relationship graph matrix G is generated. d Relationship matrix G with surgical condition p As a global weight matrix, for middle Each sub-event A graph transformation is performed using a multi-head attention mechanism to obtain a vector representation with richer structural information. The specific calculation formula is as follows:

[0028]

[0029] in, The vector representation of the sub-events after graph transformation. Depend on Linked together, K represents the number of multi-head attention points, K=3, σ represents a non-linear activation function, using the ReLU function, N i W represents other medical events that are related to event i. k ,b k This represents the learnable weight matrix and biases. Let α represent the weight coefficient of the k-th attention during the t-th visit, and α be the weight coefficient in the graph attention network. ij The calculation formula is as follows:

[0030]

[0031] in, In the context of a learnable feedforward neural network training vector, W represents the learnable weight matrix. This represents the feature vector corresponding to event *, and || represents the link operation;

[0032] Abandoning complex parameter retraining methods, this approach uses the constructed diagnostic relationship graph matrix and surgical condition relationship graph matrix as formula parameters to... The calculation simplifies to:

[0033]

[0034] Among them, G *,t (i,*) represents the correlation between event i and event * in the relationship graph matrix at the t-th visit. The relationship graph matrix at a specific time is simplified from the global weight matrix, and the specific calculation method is as follows:

[0035]

[0036] By modeling structural correlations, we obtained more comprehensive diagnostic and surgical representations, which we then embedded into the medical entities. Transform into Furthermore, the timing relationship progression module includes means for performing the following steps:

[0037] Perform time continuity modeling; analyze patient medical record data separately. The diagnosis indicates and surgery Perform time-series modeling; the specific input to the model is... The output is after dilated convolution and residual connection. For the dilated convolution process, the number of filters is set to 7, and the initial dilation coefficient is set to 1. As the number of convolutions increases, the dilation coefficient doubles until the last layer, where the dilation coefficient reaches 64. After 7 progressive learning iterations, effective historical features are learned. Finally, the output result Q is obtained through the residual connection layer. * The specific calculation formula is as follows:

[0038]

[0039] in, Represents the residual mapping to be learned. This represents the hidden layer result obtained after dilated convolution, specifically it can be represented as: Among them, F * The specific formula for calculating (t) is as follows:

[0040]

[0041] Where d represents the dilation coefficient, k represents the number of filtering iterations, and f(*) represents the filtering function during the dilation convolution process; by modeling the temporal continuity, a diagnostic representation containing rich historical information is obtained. and surgery The space structure enhancement module obtained Convert to Furthermore, the cache structure enhancement module includes means for performing the following steps:

[0042] Link diagnostic data and surgical status data to generate a joint representation vector:

[0043]

[0044] Where f(*) represents the transformation function, which serves as the diagnostic representation obtained through structural dependency modeling and temporal continuity modeling in the fully linked layer. and surgery Perform a linking operation to obtain the specific representation vector;

[0045] Based on the obtained q t and recommended medication indications The historical cache of the t-th visit is represented using key-value pairs:

[0046]

[0047] Where, when t=1, M t If empty, t′∈(1,t-1) represents the history of medical visits before the t-th visit, using As a key vector matrix The historical cache of the t-th medical visit is represented by a value vector matrix.

[0048] Based on the representation vector q of the t-th visit t and its historical cache M t Based on the similarity between them, an attention strategy is applied to obtain the second activation vector, and the specific calculation method is as follows:

[0049]

[0050] For the representation vector q t and the vector to be activated o t Perform linking and activation operations to obtain a recommended drug set.

[0051]

[0052] Where σ represents the activation function, and the activation function uses the ReLU function.

[0053] Furthermore, the training and optimization module of the model includes means for performing the following steps:

[0054] The binary entropy loss function and the multi-label marginal loss function are combined as the loss function for this model:

[0055]

[0056]

[0057]

[0058] Where T represents the patient's maximum number of visits, |c m | indicates the total number of medications used by the patient. These represent the recommended medication set and the actual medication set for the *th medical visit, respectively. This represents the total number of drugs in the entire dataset. This represents the relationship between drug i in the recommended drug set for the t-th visit and drug j in the total data set, where α represents the weighting coefficient and is set to 0.8.

[0059] Adam is used as the optimizer to minimize the loss function and obtain the global optimum.

[0060] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the steps performed by the above-described device.

[0061] The present invention also discloses a computing device, including a memory and a processor, wherein the processor includes a data preprocessing module, a medical entity embedding module, a spatial structure enhancement module, a temporal relationship progression module, a cache structure enhancement module, and a model training and optimization module.

[0062] The prescription drug prediction model based on an enhanced graph spatiotemporal convolutional network of the present invention has the following advantages: The present invention can fully capture the structural correlation and temporal continuity features of patient medical record data. Regarding structural correlation, the present invention proposes to establish a global medical entity relationship graph and apply a graph attention neural network to learn target features, effectively establishing the internal correlations between various medical entities. Simultaneously, the present invention applies dilated convolution combined with residual connections to the temporal part, improving the accuracy of training results while significantly reducing training parameters and better capturing temporal features. Furthermore, the present invention uses a caching mechanism to further improve the recommendation accuracy of the model. Attached Figure Description

[0063] Figure 1 This is a structural diagram of the prescription drug prediction model based on enhanced graph spatiotemporal convolutional network of the present invention.

[0064] Figure 2 This is a framework diagram of the timing relationship progression module of the present invention.

[0065] Figure 3 This is a performance comparison chart of the prescription drug prediction model based on enhanced graph spatiotemporal convolutional networks and its variants according to the present invention. Detailed Implementation

[0066] To better understand the purpose, structure, and function of this invention, a prescription drug prediction model based on an enhanced graph spatiotemporal convolutional network will be described in further detail below with reference to the accompanying drawings.

[0067] To fully consider the structural correlations and temporal continuity among patient data, this invention proposes an enhanced graph spatiotemporal convolutional network as a model for drug recommendation. For learning structural correlations, we first pre-train on electronic medical records to construct structural correlation graphs for diagnosis and surgery, respectively. Each medical procedure is treated as a graph structure with internal structural correlations. Based on a graph attention network, the pre-trained correlation graphs are used as weight parameters to fully capture structural features. For learning temporal continuity, we use dilated convolution combined with residuals instead of traditional RNN networks. Compared to RNN networks and their variants, the use of dilated convolutions improves the model's training speed and significantly reduces the number of training parameters. The residual network addresses the issues of gradient discretization and network degradation, further optimizing temporal processing. Finally, we add a caching mechanism to store patients' historical representations in key-value pairs and improve the model's accuracy through an attention-based similarity algorithm.

[0068] like Figure 1 As shown, a prescription drug prediction model based on an enhanced graph spatiotemporal convolutional network according to the present invention includes:

[0069] The data preprocessing module is used to perform structured processing on the patient's historical medical records, current medical status, and medication information to construct a corresponding structured representation of the electronic medical record;

[0070] The medical entity embedding module is used to represent diagnostic and surgical data using medical entity embeddings. Electronic medical records use one-hot encoding as a structured representation, which has a high dimensionality, hindering model training. Therefore, to improve model training efficiency, we use embedding representations.

[0071] The spatial structure enhancement module is used to construct global structural correlation graph matrices for diagnostic and surgical events respectively. The diagnostic and surgical processes are trained separately, treating each segment of the medical procedure as a graph structure with internal structural correlations. Through the constructed global structural correlation graph matrices, spatial structural features are fully captured based on a graph attention mechanism.

[0072] The temporal progression module uses dilated convolutions combined with residual networks instead of traditional RNN models. Compared to RNN models and their variants, the use of dilated convolutions improves the training speed and significantly reduces the number of training parameters. The use of residual models prevents the negative effects of excessively long sequences and too many training layers.

[0073] The cache structure enhancement module stores patients' historical data in the cache in the form of key-value pairs. It further improves the accuracy of prescription drug prediction by comparing and linking the obtained representation vector with the cache content through an attention-based similarity algorithm.

[0074] The model training and optimization module is used to train and optimize a prescription drug prediction model based on an augmented graph spatiotemporal convolutional network.

[0075] Specifically,

[0076] The data preprocessing module includes means for performing the following steps:

[0077] Patient electronic medical record data can be represented as a collection of time-series data. Where N represents the total number of patients, and T represents the maximum number of visits a patient can make. To avoid confusion and ambiguity, we omit the superscript and describe only individual patients. For a patient's t-th visit... This includes diagnostic data from the t-th visit. Surgical status data Recommended medication data After structuring, we have standardized the specific medical event names and converted them into ICD-9 diagnostic codes, ICD-9 surgical codes, and ATC drug codes.

[0078] The medical entity embedding module includes means for performing the following steps:

[0079] For a patient's t-th visit Diagnostic data Surgical status data It consists of hundreds of one-hot codes. To improve the training efficiency of the model, we need to embed them into a representation. We... Perform word embeddings separately to obtain the embedding matrix: in Let represent the number of diagnoses and surgeries at the t-th visit, and l represent the dimension of the embedding matrix. The embedding formula is as follows:

[0080]

[0081] Among them W α,e This represents the learnable weight matrix. This represents diagnostic data or surgical condition data. After embedding into medical entities, we will input x. t It has been converted to

[0082] The space structure enhancement module includes means for performing the following steps:

[0083] A medical event relationship graph was constructed to obtain the internal correlations of each medical event. Based on the Positive Point Mutual Information Modeling (PPMI) principle, diagnostic relationship graph matrices were constructed for the diagnostic data and surgical status data of a given patient. Relationship matrix with surgical condition Where N d N p This represents the total number of diagnostic events and the total number of surgical events in the entire dataset. The correlation between a specific medical event i and event j is calculated using the following formula:

[0084]

[0085] Where p(i,j) represents the probability that medical events i and j occur simultaneously, and p(i) and p(j) represent the probabilities of events i and j occurring on their own.

[0086] We use a multi-head graph attention network to capture the structural features of medical events, enabling each embedded medical vector representation to include information from other related vectors, thus obtaining a more comprehensive vector representation. We will use the diagnostic relationship graph matrix G... d Relationship matrix G with surgical condition p As a global weight matrix, for middle Each sub-event We perform a graph transformation on it using a multi-head attention mechanism to obtain a vector representation with richer structural information. The specific calculation formula is as follows:

[0087]

[0088] in, The vector representation of the sub-events after graph transformation. Depend on The links are linked together. K represents the number of multi-head attention points; in this invention, K = 3. σ represents a non-linear activation function; in this invention, the ReLU function is used. N i Indicates other medical events that are related to event i. k ,b k This represents the learnable weight matrix and bias. Let α represent the weight coefficient of the k-th attention during the t-th visit. Generally, the weight coefficient α in a graph attention network... ij The calculation formula is as follows:

[0089]

[0090] in, In the context of a learnable feedforward neural network training vector, W represents the learnable weight matrix. This represents the feature vector corresponding to event *, and || represents the link operation.

[0091] We abandoned complex parameter retraining methods and used the constructed diagnostic relationship graph matrix and surgical condition relationship graph matrix as formula parameters. The calculation simplifies to:

[0092]

[0093] Among them, G *,t (i,*) represents the correlation between event i and event * in the relationship graph matrix at the t-th visit. The relationship graph matrix at a specific time is simplified from the global weight matrix, and the specific calculation method is as follows:

[0094]

[0095] By modeling structural correlations, we obtained more comprehensive diagnostic and surgical representations. We embedded medical entities to obtain... Transformed into

[0096] like Figure 2 As shown, the timing relationship progression module includes means for performing the following steps:

[0097] Temporal continuity modeling: In terms of form, we separately analyze patient medical record data. The diagnosis indicates and surgery Perform time-series modeling. The specific input to the model is... The output is after dilated convolution and residual connection. The application of dilated convolution takes into account the length of patient medical record data. In the modeled electronic medical record dataset, the maximum number of patient visits is 29. Simple convolutional networks can only handle sequence tasks with relatively short sequence lengths, posing a challenge when applied to long sequences. Therefore, we consider using a method combining dilated convolution with residual networks. For the dilated convolution process, we set the number of filters to 7 and the initial dilation coefficient to 1. As the number of convolutions increases, the dilation coefficient doubles until the last layer, where the dilation coefficient reaches 64. After 7 progressive learning iterations, effective historical features are learned. Finally, the output Q is obtained through a residual connection layer. * The specific calculation formula is as follows:

[0098]

[0099] in, Represents the residual mapping to be learned. This represents the hidden layer result obtained after dilated convolution, specifically it can be represented as: Among them, F * The specific formula for calculating (t) is as follows:

[0100]

[0101] Where d represents the dilation coefficient, k represents the number of filtering iterations, and f(*) represents the filtering function in the dilation convolution process. By modeling the temporal continuity, we obtain a diagnostic representation containing rich historical information from a longitudinal perspective. and surgery From a horizontal perspective, we obtain the spatial structure enhancement module Converted to

[0102] The cache structure enhancement module includes means for performing the following steps:

[0103] Cache enhancement and activation yield a recommended medication list: Diagnostic and surgical data are linked to generate a joint representation vector.

[0104]

[0105] Where f(*) represents the transformation function, which serves as the diagnostic representation obtained through structural dependency modeling and temporal continuity modeling in the fully linked layer. and surgery Perform a linking operation to obtain the specific representation vector.

[0106] Based on the obtained q t and recommended medication indications We represent the historical cache of the t-th visit using key-value pairs:

[0107]

[0108] Where, when t=1, M t Empty. t′∈(1,t-1) represents the history of medical visits before the t-th visit. For convenience, we use... As a key vector matrix The historical cache of the t-th visit is represented by a value vector matrix.

[0109] Based on the representation vector q of the t-th visit t and its historical cache M t Based on the similarity between them, we apply an attention strategy to obtain the second activation vector, which is calculated as follows:

[0110]

[0111] For the representation vector q t and the vector to be activated o t Perform linking and activation operations to obtain a recommended drug set.

[0112]

[0113] Where σ represents the activation function, and here we use the ReLU function.

[0114] The model training and optimization module includes apparatus for performing the following steps:

[0115] The prescription drug prediction problem requires us to obtain a set of recommended drugs. As close as possible to real drug sets t This allows us to view it as a multi-label prediction problem. Based on this, we combine the binary entropy loss function and the multi-label marginal loss function as the loss function for this model.

[0116]

[0117]

[0118]

[0119] Where T represents the patient's maximum number of visits, |c m | indicates the total number of medications used by the patient. These represent the recommended medication set and the actual medication set for the *th medical visit, respectively. This represents the total number of drugs in the entire dataset. This represents the relationship between drug i in the recommended drug set during the t-th visit and drug j in the total data set. α represents the weighting coefficient, which we set to 0.8 here.

[0120] A large amount of sample data and training parameters can complicate the variation of the loss function. To further improve the stability of the model, we use Adam as the optimizer to minimize the loss function. It can adaptively adjust the learning rate and simultaneously optimize and influence the training parameters of each module, fully capturing spatial and temporal feature information, thereby obtaining the global optimum.

[0121] Experimental procedure:

[0122] In this experiment, we used the open-source dataset MIMIC-III (Medical Information Mart for Intensive Care III). MIMIC-III is a large, single-center database containing admission data for over 50,000 cases admitted to the intensive care units of large tertiary hospitals between 2001 and 2012, as well as data for 7,870 newborns admitted between 2001 and 2008. The data includes vital signs, medications, medical orders, surgical codes, diagnostic codes, and imaging reports. To standardize the data format and improve the usability of the dataset, we formatted it. The dataset content was transformed into a time-series list of easily trainable diagnostic codes, surgical condition codes, and medication codes. Furthermore, the NDC codes for recommended medications were converted to ATC codes according to medical guidelines, and the diagnostic codes and surgical condition codes were integrated using ICD-9 encoding.

[0123] To measure the accuracy of the experimental results, we used Jaccard Similarity Score (Jaccard), Average F1 (F1), and Precision Recall AUC (PRAUC) as scoring functions.

[0124] Comparative experiments were conducted with six currently effective methods. Leap, a method that establishes a mapping between medical entities and tensors and combines this with a recurrent neural network to model the dependencies between tensors, uses an attention mechanism to predict future event changes. RETAIN provides continuous drug combination prediction by building a two-layer attention-based recurrent neural network, fully considering the influence of various factors in the longitudinal temporal dimension. DMNC enhances the learning of temporal relationships between medical entities by building a memory-enhancing network, further improving the accuracy of drug combination recommendations. GAMENet builds drug combination recommendation graphs and drug interaction graphs to strengthen the connections in the structure of medical entities and further applies a memory-enhancing network to temporal relationship modeling for drug combination recommendations. G-Bert uses the BERT method to preprocess the relationships between medical entities in electronic medical records and combines a graph neural network to construct an ontology relationship tree in the medical field for drug combination recommendations.

[0125] Table 1 Model Comparison Experiment

[0126] Methods Jaccard PR-AUC F1 Avg # of Med # of parameters Leap 0.3844 0.5501 0.5410 14.42 436,884 RETAIN 0.4168 0.6620 0.5781 16.68 289,490 DMNC 0.4343 0.6856 0.5934 20.00 527,979 GAMENet 0.4489 0.6911 0.6053 13.89 452,434 G-Bert 0.4511 0.6989 0.6121 16.11 2,411,138 A-GSTCN 0.4689 0.7113 0.6307 15.34 43,178

[0127] Table 1 lists the performance of several baseline methods and A-GSTCN on the MIMIC-III dataset for joint drug recommendations. Experiments show that A-GSTCN achieves the best results among all methods. As can be seen from the table, this experimental method outperforms the previous best method (G-Bert) by 1.78%, 1.24%, and 1.86% in Jaccard, PR-AUC, and F1 scores, respectively. Compared to the average number of prescription drug predictions of 15.02, the average number of recommendations for A-GSTCN is 15.34, which is closer to the true value. This is a significant improvement in multi-label classification tasks. The most prominent feature of this method is the application of convolutional networks to temporal processing, which reduces the number of training parameters to 43178, an order of magnitude less than previous methods, effectively reducing memory and model training pressure.

[0128] To further demonstrate the effectiveness of the spatial structure enhancement module, the timing progression module, and the memory enhancement storage module, we compared the A-GSTCN method with other variants. The comparison results are as follows: Figure 3 As shown in the figure. Among them, A-GSTCN represents the experimental method, A-GSTCN(w / o GAT) means that the spatial structure enhancement module is removed from the experiment, GAT+GRU means that the timing progression module is replaced with GRU for training, and A-GSTCN(w / o ME) means that the memory enhancement storage module is removed from the training.

[0129] By comparing the performance of A-GSTCN and A-GSTCN (w / o GAT), we found that removing the spatial structure enhancement module significantly reduced the performance of each metric. This indicates that the structural correlation between medical entities has a significant impact on the experimental results, and considering only temporal features is far from sufficient for drug collaborative recommendation tasks.

[0130] Through comparative experiments with A-GSTCN and GAT+GRU, we demonstrate the feasibility of using convolutional networks to replace traditional recurrent neural networks for processing temporal data. However, this is conditional: causal convolution must be unidirectional, making it a strictly time-constrained model. When these conditions are met, using convolutional networks to process temporal information not only ensures performance to a certain extent but also reduces the number of training parameters and memory pressure.

[0131] By comparing the model with and without the memory enhancement module, we can conclude that the use of the memory enhancement module effectively improves the model's grasp of timing information and further improves the accuracy of the entire model.

[0132] Table 2 Comparison of Specific Cases for the Model

[0133]

[0134] To further validate the efficiency of A-GSTCN in drug synergistic recommendation, we randomly selected a patient's medical records from the MIMIC-III dataset as a case study. We compared A-GSTCN's predictions of specific prescription drugs for this patient with those of all baseline methods to demonstrate the performance of A-GSTCN. Specific statistics are shown in Table 2. The patient had a total of 5 medical visits, and we list the synergistic drug recommendations for the last two visits in the table. It can be seen that the patient's fourth visit resulted in a diagnosis of stage III hypertension with cerebral artery stenosis, and the actual drug set used 10 drugs. The final visit added tuberculosis to the diagnosis, and the actual drug set used 16 drugs. The NDC codes of the specific drugs used are listed in the Ground Truth column. Overall, A-GSTCN performed best in both prescription drug prediction stages. In the fourth recommendation stage, it correctly recommended 8 drugs, incorrectly recommended 2 drugs, and missed 2 drugs, achieving a recommendation performance comparable to G-Bert. In the fifth recommendation stage, it correctly recommended 14 drugs, incorrectly recommended 3 drugs, and missed 1 drug, demonstrating the best performance among all methods. In both recommendation phases, all baseline methods missed 'C01C' and 'B05C', while A-GSTCN leveraged its model advantage to provide patients with the correct medication.

[0135] Therefore, this invention offers the following advantages: it can fully capture the structural correlation and temporal continuity features of patient medical record data. Regarding structural correlation, this invention proposes establishing a global medical entity relationship graph and applying a graph attention neural network to learn target features, effectively establishing the internal correlations between various medical entities. Simultaneously, this invention applies dilated convolution combined with residual connections to the temporal part, significantly reducing training parameters while improving the accuracy of training results and better capturing temporal features. Furthermore, we use a caching mechanism to further improve the model's recommendation accuracy.

[0136] It is understood that the present invention has been described through some embodiments, and those skilled in the art will recognize that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present invention.

Claims

1. A prescription drug prediction model based on an enhanced graph spatiotemporal convolutional network, characterized in that, It includes a data preprocessing module, a medical entity embedding module, a spatial structure enhancement module, a temporal relationship progression module, a cache structure enhancement module, and a model training and optimization module; The data preprocessing module is used to perform structured processing on the patient's historical medical records, current medical status, and medication information to construct a corresponding structured representation of the electronic medical record; The medical entity embedding module is used to embed medical entities into diagnostic data and surgical status data; The medical entity embedding module is used to perform the following steps: For a patient's t-th visit Diagnostic data Surgical status data It consists of hundreds of one-hot codes. This indicates recommended medication data, for Perform word embeddings separately to obtain the embedding matrix: , , in , They represent the first The number of diagnoses and surgeries performed during each visit The dimension of the embedding matrix is ​​represented by the embedding formula as follows: (1) in This represents the learnable weight matrix. This represents diagnostic data or surgical condition data, which, after being embedded in a medical entity, will be input. Convert to ; The spatial structure enhancement module is used to construct global structural correlation graph matrices for diagnostic events and surgical events, respectively. The temporal relationship progression module uses dilated convolution combined with residual network to replace the traditional RNN model; The cache structure enhancement module stores the patient's historical data in the cache in the form of key-value pairs, and compares and links the obtained representation vector and cache content through an attention-based similarity algorithm. The training and optimization module of the model is used to train and optimize the prescription drug prediction model based on the augmented graph spatiotemporal convolutional network.

2. The prescription drug prediction model based on enhanced graph spatiotemporal convolutional networks according to claim 1, characterized in that, The data preprocessing module is used to perform the following steps: Acquire patients' electronic medical record data and perform structured processing; The patient's electronic medical record data is represented as a collection of time-series data. ,in, Represents the total number of patients. This represents the maximum number of visits a patient can make, specifically the t-th visit for a given patient. This includes the first Diagnostic data at the next visit Surgical status data Recommended medication data After structuring, the specific medical event names have been standardized and converted into ICD-9 diagnostic codes, ICD-9 surgical codes, and ATC drug codes.

3. The prescription drug prediction model based on enhanced graph spatiotemporal convolutional networks according to claim 1, characterized in that, The space structure enhancement module is used to perform the following steps: Construct a medical event relationship graph to obtain the internal correlations of each medical event. Based on the Positive Point Mutual Information (PPMI) principle, construct diagnostic relationship graph matrices for a given patient's diagnostic data and surgical status data. Relationship matrix with surgical condition ,in This represents the total number of diagnostic events and surgical events in the entire dataset, for a specific medical event. and events The correlation is calculated using the following formula: (2) in, Indicates a medical event and events The probability of them happening simultaneously , Indicates an event ,event The probability of it occurring itself; Multi-head graph attention networks are used to capture the structural features of medical events, enabling each embedded medical vector representation to include information from other related vectors, thus forming a diagnostic relationship graph matrix. Relationship matrix with surgical condition As a global weight matrix, for middle Each sub-event A multi-head attention mechanism is used to perform graph transformation on it, resulting in a vector representation with richer structural information. The specific calculation formula is as follows: (3) in, The vector representation of the sub-events after graph transformation. Depend on Linked together Indicates the number of multiple attentions. , To represent a non-linear activation function, use function, Indicates and Other medical events that are related to this event, This represents the learnable weight matrix and biases. Indicates the first The first visit to the doctor Weight coefficients for individual attention, weight coefficients in a graph attention network. The calculation formula is as follows: (4) in, In representing the training vectors of a learnable feedforward neural network This represents the learnable weight matrix. Indicates an event The corresponding feature vector, Indicates a link operation; Abandoning complex parameter retraining methods, this approach uses the constructed diagnostic relationship graph matrix and surgical condition relationship graph matrix as formula parameters to... The calculation simplifies to: (5) in, This represents the events in the relational graph matrix at the t-th visit. and events The correlation between the parameters is such that the relationship graph matrix at specific moments is simplified from the global weight matrix, and the specific calculation method is as follows: (6) By modeling structural correlations, we obtained more comprehensive diagnostic and surgical representations, which we then embedded into the medical entities. Transform into .

4. The prescription drug prediction model based on enhanced graph spatiotemporal convolutional networks according to claim 1, characterized in that, The time-series relationship progression module is used to perform the following steps: Perform time continuity modeling; analyze patient medical record data separately. The diagnosis indicates and surgery Perform time-series modeling; the specific input to the model is... The output is the result after dilated convolution and residual connection. For the dilated convolution process, the number of filters is set to 7, and the initial dilation coefficient is set to 1. As the number of convolutions increases, the dilation coefficient doubles until the last layer, where the dilation coefficient reaches 64. After 7 progressive learning iterations, effective historical features are learned. Finally, the output result is obtained through the residual connection layer. The specific calculation formula is as follows: (7) in, Represents the residual mapping to be learned. This represents the hidden layer result obtained after dilated convolution, specifically it can be represented as: ,in, The specific calculation formula is as follows: (8) in, Indicates the coefficient of thermal expansion. Indicates the number of filters. This represents the filtering function during the dilated convolution process; By modeling the temporal continuity, a diagnostic representation containing rich historical information is obtained. and surgery The space structure enhancement module obtained Convert to .

5. The prescription drug prediction model based on enhanced graph spatiotemporal convolutional networks according to claim 1, characterized in that, The cache structure enhancement module is used to perform the following steps: Link diagnostic data and surgical status data to generate a joint representation vector: (9) in, The transformation function, as a fully linked layer, represents the diagnostic representation obtained through structural dependency modeling and temporal continuity modeling. and surgery Perform a linking operation to obtain the specific representation vector; Based on the obtained and recommended medication data Use key-value pairs to access the first The history of each medical visit is represented by a cache: (10) Among them, when hour, Empty Indicates the first Previous medical history before this visit, using As a key vector matrix As the value vector matrix, it represents the first... Historical cache of previous medical visits; Based on the The representation vector of each medical visit and its historical cache Based on the similarity between them, an attention strategy is applied to obtain the second activation vector, and the specific calculation method is as follows: (11) For the representation vector and the vector to be activated Perform linking and activation operations to obtain a recommended drug set. : (12) in, This represents the activation function, which uses... function.

6. The prescription drug prediction model based on enhanced graph spatiotemporal convolutional networks according to claim 1, characterized in that, The training and optimization module of the model is used to perform the following steps: The binary entropy loss function and the multi-label marginal loss function are combined as the loss function for this model: (13) (14) (15) in, This indicates the patient's maximum number of medical visits. This indicates the total number of medications used by the patient. , They represent the first Recommended medications and actual medications from the first visit. This represents the total number of drugs in the entire dataset. This represents the relationship between drug i in the recommended drug set during the t-th visit and drug j in the total data set. Indicates the weighting coefficient. Set to 0.8; Adam is used as the optimizer to minimize the loss function and obtain the global optimum.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed in a computer, it causes the computer to perform the steps of the prescription drug prediction model based on an enhanced graph spatiotemporal convolutional network as described in any one of claims 1-6.

8. A computing device, comprising a memory and a processor, characterized in that, The processor includes the prescription drug prediction model based on an enhanced graph spatiotemporal convolutional network as described in any one of claims 1-6.