A Deep Learning-Based Intelligent Drug Management and Predictive Analysis Method
By combining ETL processes, knowledge graphs, and hybrid neural networks with the Apriori algorithm and dual-mode anomaly detection, the problem of cross-system fusion and trend prediction of drug data is solved, realizing intelligent management and predictive analysis of drug use behavior, and possessing efficient and interpretable drug combination identification and anomaly detection capabilities.
Patent Information
- Application Number
- CN202511113727.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-08-11
AI Technical Summary
Existing technologies suffer from several drawbacks in drug use, including a lack of unified standards for cross-institutional and cross-system data, difficulty in achieving multi-source data fusion and unified standardization, challenges in accurately judging trends and identifying complex relationships in drug use behavior, slow response and lack of real-time support in identifying abnormal drug use behavior, and a lack of interpretability in the models.
By employing ETL data alignment processes, drug knowledge graph construction, LSTM-GRU hybrid neural network modeling, Apriori combined mining algorithm and dual-mode anomaly detection mechanism, we achieve semantic unification of multi-source drug data, joint modeling of periodic trends and spatial features, and combine Isolation Forest and autoencoder for anomaly detection to generate feature attribution results.
It achieves efficient fusion and trend prediction of drug usage data, supports drug combination identification and anomaly detection, has millisecond-level response capability, and provides interpretable decision support.
Smart Images

Figure CN120636851B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of medical information processing and artificial intelligence technology, and in particular to a method for intelligent drug management and predictive analysis based on deep learning. Background Technology
[0002] With the development of hospital information systems, data from drug usage is gradually being managed electronically, providing fundamental data support for hospital drug analysis, prediction, and supervision. However, most medical institutions currently employ data processing solutions that are limited to their own internal systems, lacking unified standards across institutions and systems. Data from different systems exhibit significant differences in structure, format, naming, and semantics, making it difficult to establish unified standards in areas such as multi-source data fusion, standardized processing, and time alignment. This impacts the comprehensive modeling and analysis of subsequent drug usage behavior.
[0003] In terms of drug trend analysis, existing methods mostly rely on simple time series prediction models or historical mean extrapolation. The model capabilities are limited, making it difficult to effectively identify the periodic patterns and spatial hierarchical differences in drug use. Especially in the context of complex clinical drug use, the frequency and intensity of drug use are affected by a variety of factors such as department type, disease distribution, and seasonal changes. It is difficult to obtain accurate trend judgments by relying on single-dimensional modeling alone.
[0004] For mining combined drug use behavior, traditional methods often use static rules or frequent itemset mining algorithms, which are suitable for small-scale, low-dimensional scenarios. However, in real-world environments, drug combination behavior changes constantly with clinical strategies, patient groups, and medication habits. Traditional methods cannot dynamically update rules and are difficult to capture complex potential relationships.
[0005] In terms of identifying abnormal medication use behavior, most current systems use static methods such as threshold setting and rule matching for judgment. These methods rely on human experience to set rules and are slow to react when faced with new behavioral patterns or slowly evolving violation trends. At the same time, abnormal identification models generally lack support for real-time data streams and cannot achieve millisecond-level identification feedback during the drug dispensing process. In addition, when processing abnormal identification results, most systems do not introduce a graded response strategy, making it difficult to achieve differentiated processing for different risk levels.
[0006] Most current drug behavior prediction and identification models are deep learning "black box" structures, lacking clear reasoning paths and feature attribution mechanisms. For clinicians and regulators, it is impossible to determine the source and basis of the model's conclusions, which not only affects the credibility of the results but also hinders subsequent traceability and intervention decisions.
[0007] Therefore, how to provide a deep learning-based intelligent drug management and predictive analysis method is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0008] One objective of this invention is to propose a deep learning-based intelligent drug management and predictive analysis method. This invention fully integrates ETL data alignment process, drug knowledge graph construction, LSTM-GRU hybrid neural network modeling, Apriori combinatorial mining algorithm and dual-mode anomaly detection mechanism. It describes in detail the semantic unification of multi-source drug data, joint modeling of periodic trends and spatial features, high-frequency drug combination identification, residual anomaly detection and feature attribution process, and has the advantages of comprehensive data fusion, accurate trend prediction, flexible combination identification, efficient anomaly judgment and strong decision interpretability.
[0009] A method for intelligent drug management and predictive analysis based on deep learning according to an embodiment of the present invention includes the following steps:
[0010] S1. Collect data, perform standardization and semantic normalization processing, and generate unified drug data;
[0011] S2. Construct an ETL process based on unified drug data, set dynamic weights corresponding to time granularity, complete multi-source data alignment, and generate time series input;
[0012] S3. Construct a drug knowledge graph based on unified drug data, establish semantic mapping relationships between drugs and departments and diseases, and generate the knowledge graph;
[0013] S4. Based on time series input and knowledge graph, extract periodic changes and spatial differences to generate representation sequences, and introduce residual attention mechanism to perform trend decomposition, outputting trend prediction results and residual sequences;
[0014] S5. Analyze unified drug data within a time window, use the Apriori algorithm to identify high-frequency drug combinations, and generate drug combination rules;
[0015] S6. Input the residual sequence into the anomaly detection module composed of Isolation Forest and autoencoder to generate anomaly score and anomaly identification result;
[0016] S7. Integrate trend prediction results, drug combination rules, and anomaly scores, and input them into the explanatory model to generate feature attribution results;
[0017] S8 outputs trend prediction results, drug combination rules, anomaly identification results, and feature attribution results.
[0018] Optionally, the data includes drug prescription records, institution identification, department information, timestamps, and drug attributes.
[0019] Optionally, S2 specifically includes:
[0020] S21. Construct an ETL process to perform field mapping and structure transformation on the unified drug data, and extract drug identifiers, institution identifiers, department information, timestamps and drug attributes;
[0021] S22. Set the time granularity set, including daily granularity, weekly granularity and monthly granularity, and label the corresponding time granularity type of the data record;
[0022] S23. Set dynamic weights for each time granularity type, and perform resampling processing on the data records according to the time granularity type to complete time alignment;
[0023] S24. The time-aligned data records are weighted and merged according to the time index to generate a time series input.
[0024] Optionally, S3 specifically includes:
[0025] S31. Extract three types of entities based on unified drug data, including drug entities, department entities, and disease entities;
[0026] S32. Extract co-occurrence information between entities from unified drug data, construct mapping relationships between drugs and departments, and between drugs and diseases, and form a set of triples;
[0027] S33. Represent the set of triples as a structure of the form (h,r,t), where h is the head entity, r is the relation type, and t is the tail entity;
[0028] S34. Use the graph structure initialization method to construct a graph database, import the triple set into the graph database to generate a drug knowledge graph;
[0029] S35. Calculate the degree, path length and adjacent entity type of each node based on the graph structure, and encode the structural information into a sparse connection matrix;
[0030] S36. Output the sparse connection matrix as a knowledge graph.
[0031] Optionally, S4 specifically includes:
[0032] S41. Perform normalization processing on the time series input, encode it into a time feature sequence, perform structural embedding on the entities and relations in the drug knowledge graph, and generate knowledge graph vectors;
[0033] S42. Input the time feature sequence into the LSTM-GRU hybrid neural network. First, extract the state representation across time steps through the long short-term memory network, and then extract the time-dependent features through the gated recurrent unit to generate long-term and short-term representations. At the same time, construct a spatial distribution map of the department information and disease information in the unified drug data, and generate a spatial vector representation based on the graph structure.
[0034] S43. Concatenate the long-term representation, short-term representation, spatial vector representation, and knowledge graph vector to generate a representation sequence;
[0035] S44. Perform attention computation on the represented sequence, and let the query vector at time step t be... The key vector is The key vector dimension is Given a time series with a total of T steps, calculate the attention weights. :
[0036] ;
[0037] in, The query vector at time step t is generated by combining temporal features, spatial vectors, and knowledge graph vectors contained in the sequence. Let be the key vector at time step t. Where T is the dimension of the key vector, and T is the total number of steps in the time series. represents the vector dot product, exp represents the exponential function, and the denominator is the weighting factor normalized over all time steps;
[0038] S45. Based on the attention weight decomposition representation sequence, extract the trend component representing the periodic change trend and the residual component representing the short-term disturbance, and output the trend prediction result and the residual sequence.
[0039] Optionally, S5 specifically includes:
[0040] S51. Set a sliding time window, extract drug prescription records within the same time window from unified drug data, and construct a drug transaction set. The drug transaction set includes the timestamp, department identifier and drug code set corresponding to each record.
[0041] S52. Input the drug transaction set into the frequent itemset mining algorithm, use the Apriori algorithm to identify frequent drug combinations issued simultaneously within the same time window, and generate candidate itemsets;
[0042] S53. Perform frequency statistics and association rule extraction on the candidate set, and filter the drug combination rules that meet the threshold requirements in terms of support and confidence. Each drug combination rule consists of the set of antecedent drug codes and the consequent drug codes.
[0043] S54. Add a time tag, institution identifier, and department identifier to each drug combination rule to form a set of drug combination rules with attribute identifiers, and output the set of drug combination rules.
[0044] Optionally, S6 specifically includes:
[0045] S61. Construct an anomaly detection module, which includes a dual-path structure consisting of Isolation Forest and autoencoder, and integrates a static rule matching unit. The static rule matching unit is used to detect whether there are records in the unified drug data that violate medical insurance restrictions, dosage specifications, and drug indication scope. Isolation Forest and autoencoder respectively handle behavioral structure changes and dynamic pattern anomalies in the residual sequence.
[0046] S62. The residual sequence is input to the anomaly detection module using a sliding window method. Within each time window, the Isolation Forest outputs the first anomaly score, and the autoencoder outputs the second anomaly score based on the reconstruction error.
[0047] S63, Define the fusion score:
[0048] ;
[0049] Where A(t) represents the fusion anomaly score at time step t. This represents the output score of the Isolation Forest model at time step t. This represents the output score of the autoencoder at time step t. Indicates from time step Time to step Historical average rating This represents the historical score at time step i, and W represents the width of the sliding window. , , , which is a non-negative weighting coefficient, representing the weighting coefficient of the first rating, the second rating, and the historical rating;
[0050] S64. Compare the fusion anomaly score with the preset threshold, classify the risk level, and output the anomaly identification result.
[0051] Optionally, S7 specifically includes:
[0052] S71. Concatenate the trend prediction results, drug combination rules and anomaly scores to construct a feature vector sequence. Each feature vector contains a trend component, a frequent drug combination label, an anomaly score value and a timestamp.
[0053] S72. Construct an explanatory model based on the SHAP method, using the feature vector sequence as input, to simulate the response output of the deep model and generate the marginal contribution value of each input feature to the output result.
[0054] S73, Define feature importance score:
[0055] ;
[0056] in, Let F represent the importance score of feature i, F represent the set of all input features, and S represent the subset that does not contain feature i. This represents the output prediction value generated by the model when the input subset S is used. This means that the predicted values generated by the model are interpreted after adding feature i to the subset. Indicates the number of features in the subset. Indicates the number of all features. This indicates removing feature i from the entire feature set;
[0057] S74. Sort all input features in descending order according to the feature importance score, form feature attribution results and output them.
[0058] The beneficial effects of this invention are:
[0059] This invention proposes a deep learning-based intelligent drug management and predictive analysis method, achieving a systematic improvement in drug usage data processing, trend analysis, behavior recognition, and risk assessment. Traditional methods often rely on static rules and single data sources, making it difficult to adapt to the complexity and dynamic changes in drug prescribing behavior in real clinical scenarios. This invention constructs a complete processing flow covering data collection, cleaning, semantic unification, and time alignment. Combining an ETL mechanism and a dynamic time weighting strategy, it efficiently integrates data from different sources and in different formats under a unified structure, solving the data fragmentation problem in existing technologies.
[0060] In the modeling phase, this invention introduces knowledge graph technology to systematically represent the semantic relationships between drugs, departments, and diseases. Through structural embedding, the graph information is converted into vector representations suitable for neural network processing. Subsequently, a dual-channel neural network integrating LSTM and GRU structures simultaneously models the temporal periodicity and spatial distribution characteristics of drug prescribing behavior, achieving separate modeling of long-term trends and short-term fluctuations. Based on an attention mechanism, the responses to feature changes at different time steps are weighted, effectively extracting potential trends and residual components, providing a solid foundation for subsequent risk identification and analysis.
[0061] In terms of risk identification, this invention establishes an anomaly detection architecture combining Isolation Forest and autoencoder, supporting both static rule-based constraint identification and dynamic behavioral anomaly analysis. It utilizes a sliding time window for real-time scoring and supports millisecond-level response for drug prescribing behavior. Furthermore, it identifies common drug combination patterns using the Apriori algorithm and combines this with the feature attribution results output by the interpretive model, enabling the model's predictions to possess good interpretability and traceability. Attached Figure Description
[0062] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0063] Figure 1 This is a flowchart of a deep learning-based intelligent drug management and predictive analysis method proposed in this invention;
[0064] Figure 2 This is a diagram of the LSTM-GRU hybrid neural network modeling structure for a deep learning-based intelligent drug management and predictive analysis method proposed in this invention.
[0065] Figure 3 This is a structural diagram of the anomaly detection module in a deep learning-based intelligent drug management and predictive analysis method proposed in this invention. Detailed Implementation
[0066] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0067] refer to Figure 1-3 A deep learning-based intelligent drug management and predictive analysis method includes the following steps:
[0068] S1. Collect data, perform standardization and semantic normalization processing, and generate unified drug data;
[0069] S2. Construct an ETL process based on unified drug data, set dynamic weights corresponding to time granularity, complete multi-source data alignment, and generate time series input;
[0070] S3. Construct a drug knowledge graph based on unified drug data, establish semantic mapping relationships between drugs and departments and diseases, and generate the knowledge graph;
[0071] S4. Based on time series input and knowledge graph, extract periodic changes and spatial differences to generate representation sequences, and introduce residual attention mechanism to perform trend decomposition, outputting trend prediction results and residual sequences;
[0072] S5. Analyze unified drug data within a time window, use the Apriori algorithm to identify high-frequency drug combinations, and generate drug combination rules;
[0073] S6. Input the residual sequence into the anomaly detection module composed of Isolation Forest and autoencoder to generate anomaly score and anomaly identification result;
[0074] S7. Integrate trend prediction results, drug combination rules, and anomaly scores, and input them into the explanatory model to generate feature attribution results;
[0075] S8 outputs trend prediction results, drug combination rules, anomaly identification results, and feature attribution results.
[0076] This invention standardizes and unifies drug management data through deep learning methods, integrating ETL process construction, knowledge graph modeling, cycle trend prediction, drug combination analysis, anomaly detection and attribution analysis to establish a structured, dynamic and intelligent drug management framework. It can effectively adapt to the heterogeneity of multiple data sources and spatiotemporal complexity faced in clinical applications, and provide intelligent analysis support for the entire drug use process.
[0077] In this embodiment, the data includes drug prescription records, institution identification, department information, timestamps, and drug attributes.
[0078] This invention provides a stable foundation for data modeling by clearly defining the data structure collected, including drug prescription records, institution identifiers, department information, timestamps, and drug attributes. While ensuring data integrity, it effectively improves the feature coverage and semantic expression capabilities in drug management tasks, and can fully support the data requirements of subsequent trend modeling and anomaly identification processes.
[0079] In this embodiment, S2 specifically includes:
[0080] S21. Construct an ETL process to perform field mapping and structure transformation on the unified drug data, and extract drug identifiers, institution identifiers, department information, timestamps and drug attributes;
[0081] S22. Set the time granularity set, including daily granularity, weekly granularity and monthly granularity, and label the corresponding time granularity type of the data record;
[0082] S23. Set dynamic weights for each time granularity type, and perform resampling processing on the data records according to the time granularity type to complete time alignment;
[0083] S24. The time-aligned data records are weighted and merged according to the time index to generate a time series input.
[0084] This invention constructs an ETL process for multi-source drug data and proposes a data alignment method based on dynamic weighting at the time granularity, achieving unified fusion of drug data at different time frequencies. This method not only improves the temporal consistency of data input but also lays a solid foundation for subsequent trend analysis and periodic modeling, demonstrating stronger adaptability and expressiveness in time series analysis scenarios.
[0085] In this embodiment, S3 specifically includes:
[0086] S31. Extract three types of entities based on unified drug data, including drug entities, department entities, and disease entities;
[0087] S32. Extract co-occurrence information between entities from unified drug data, construct mapping relationships between drugs and departments, and between drugs and diseases, and form a set of triples;
[0088] S33. Represent the set of triples as a structure of the form (h,r,t), where h is the head entity, r is the relation type, and t is the tail entity;
[0089] S34. Use the graph structure initialization method to construct a graph database, import the triple set into the graph database to generate a drug knowledge graph;
[0090] S35. Calculate the degree, path length and adjacent entity type of each node based on the graph structure, and encode the structural information into a sparse connection matrix;
[0091] S36. Output the sparse connection matrix as a knowledge graph.
[0092] This invention constructs a knowledge graph containing entities such as drugs, departments, and diseases, generates a graph database using entity co-occurrence relationships, and further extracts structural information to form a sparse connection matrix, thus achieving structured modeling of drug semantic information. This graph can supplement the missing cross-relationships in traditional drug data, effectively enhancing the model's ability to understand contextual semantics in subsequent modeling.
[0093] In this embodiment, S4 specifically includes:
[0094] S41. Perform normalization processing on the time series input, encode it into a time feature sequence, perform structural embedding on the entities and relations in the drug knowledge graph, and generate knowledge graph vectors;
[0095] S42. Input the time feature sequence into the LSTM-GRU hybrid neural network. First, extract the state representation across time steps through the long short-term memory network, and then extract the time-dependent features through the gated recurrent unit to generate long-term and short-term representations. At the same time, construct a spatial distribution map of the department information and disease information in the unified drug data, and generate a spatial vector representation based on the graph structure.
[0096] S43. Concatenate the long-term representation, short-term representation, spatial vector representation, and knowledge graph vector to generate a representation sequence;
[0097] S44. Perform attention computation on the represented sequence, and let the query vector at time step t be... The key vector is The key vector dimension is Given a time series with a total of T steps, calculate the attention weights. :
[0098] ;
[0099] in, The query vector at time step t is generated by combining temporal features, spatial vectors, and knowledge graph vectors contained in the sequence. Let be the key vector at time step t. Where T is the dimension of the key vector, and T is the total number of steps in the time series. represents the vector dot product, exp represents the exponential function, and the denominator is the weighting factor normalized over all time steps;
[0100] S45. Based on the attention weight decomposition representation sequence, extract the trend component representing the periodic change trend and the residual component representing the short-term disturbance, and output the trend prediction result and the residual sequence.
[0101] This invention constructs a dual-channel LSTM-GRU hybrid neural network to model temporal feature sequences, while integrating knowledge graph vectors and spatial distribution representations. An attention mechanism is used to complete periodic trend decomposition and residual extraction, achieving trend prediction in a joint spatiotemporal dimension. This strategy improves the predictive model's responsiveness to complex periodicity and local perturbations, better reflecting the spatiotemporal behavioral characteristics of real drug use.
[0102] In this embodiment, S5 specifically includes:
[0103] S51. Set a sliding time window, extract drug prescription records within the same time window from unified drug data, and construct a drug transaction set. The drug transaction set includes the timestamp, department identifier and drug code set corresponding to each record.
[0104] S52. Input the drug transaction set into the frequent itemset mining algorithm, use the Apriori algorithm to identify frequent drug combinations issued simultaneously within the same time window, and generate candidate itemsets;
[0105] S53. Perform frequency statistics and association rule extraction on the candidate set, and filter the drug combination rules that meet the threshold requirements in terms of support and confidence. Each drug combination rule consists of the set of antecedent drug codes and the consequent drug codes.
[0106] S54. Add a time tag, institution identifier, and department identifier to each drug combination rule to form a set of drug combination rules with attribute identifiers, and output the set of drug combination rules.
[0107] This invention utilizes the Apriori algorithm to mine high-frequency drug combinations within a sliding time window and adds contextual labels such as time, institution, and department to the combination rules, thereby extracting stable and reliable medication patterns from large-scale historical prescription behavior. This method can be used to analyze typical combination usage patterns, providing a basis for recommending drug combination use and monitoring prescription behavior.
[0108] In this embodiment, S6 specifically includes:
[0109] S61. Construct an anomaly detection module, which includes a dual-path structure consisting of Isolation Forest and autoencoder, and integrates a static rule matching unit. The static rule matching unit is used to detect whether there are records in the unified drug data that violate medical insurance restrictions, dosage specifications, and drug indication scope. Isolation Forest and autoencoder respectively handle behavioral structure changes and dynamic pattern anomalies in the residual sequence.
[0110] S62. The residual sequence is input to the anomaly detection module using a sliding window method. Within each time window, the Isolation Forest outputs the first anomaly score, and the autoencoder outputs the second anomaly score based on the reconstruction error.
[0111] S63, Define the fusion score:
[0112] ;
[0113] Where A(t) represents the fusion anomaly score at time step t. This represents the output score of the Isolation Forest model at time step t. This represents the output score of the autoencoder at time step t. Indicates from time step Time to step Historical average rating This represents the historical score at time step i, and W represents the width of the sliding window. , , , which is a non-negative weighting coefficient, representing the weighting coefficient of the first rating, the second rating, and the historical rating;
[0114] S64. Compare the fusion anomaly score with the preset threshold, classify the risk level, and output the anomaly identification result.
[0115] This invention constructs a dual-path anomaly detection module, integrating Isolation Forest and autoencoder models, and combining static rules and behavioral sequences to define a multi-factor fusion scoring mechanism, effectively improving the accuracy of anomaly identification in the drug prescribing process. This mechanism also supports 200ms-level response calculations, providing feasible support for real-time monitoring and risk warning of drug use.
[0116] In this embodiment, S7 specifically includes:
[0117] S71. Concatenate the trend prediction results, drug combination rules and anomaly scores to construct a feature vector sequence. Each feature vector contains a trend component, a frequent drug combination label, an anomaly score value and a timestamp.
[0118] S72. Construct an explanatory model based on the SHAP method, using the feature vector sequence as input, to simulate the response output of the deep model and generate the marginal contribution value of each input feature to the output result.
[0119] S73, Define feature importance score:
[0120] ;
[0121] in, Let F represent the importance score of feature i, F represent the set of all input features, and S represent the subset that does not contain feature i. This represents the output prediction value generated by the model when the input subset S is used. This means that the predicted values generated by the model are interpreted after adding feature i to the subset. Indicates the number of features in the subset. Indicates the total number of features. This indicates removing feature i from the entire feature set;
[0122] S74. Sort all input features in descending order according to the feature importance score, form feature attribution results and output them.
[0123] This invention constructs an explanatory model based on the SHAP method, concatenating trend prediction results, drug combination rules, and anomaly scores into a unified vector. It then extracts the marginal contribution value of each type of input feature to the model's prediction results, generating a feature attribution ranking. This explanatory mechanism clearly reveals the model's decision-making basis, helping clinical pharmacists or medical personnel understand the prediction rationale and enhancing the system's interpretability and reliability.
[0124] Example 1:
[0125] To verify the feasibility of this invention in practice, it was applied to the information system of a tertiary general hospital to conduct real-world testing. This hospital has a large outpatient and inpatient volume, and a high frequency and variety of drug prescriptions, making it suitable as a verification environment for a drug intelligent management and predictive analysis system.
[0126] During testing, the research team accessed nearly three months of prescription data from the hospital, totaling over 280,000 records, covering 108 clinical departments, 1,342 drug varieties, and 231 disease categories. Through the data access module, the system performed standardization and semantic normalization on the raw data, completing the consistent transformation of fields such as drug name, unit, dosage, and timestamp, forming unified drug data. Subsequently, using a constructed ETL process, historical records were aligned into time-series input according to a set time granularity. Simultaneously, based on the relationships between drugs, departments, and diseases, the system constructed a drug knowledge graph, extracting structural embedding representations for subsequent trend modeling and abnormal behavior identification.
[0127] In the predictive analysis phase, the system employs an LSTM-GRU hybrid neural network model to extract the long-term trend and short-term fluctuations of the time series, and integrates the semantic representation of the knowledge graph to generate a fused feature sequence. The sequence is then decomposed using an attention mechanism to extract the trend component and residual component, which serve as the trend prediction result and anomaly input source, respectively. For anomaly detection, the system integrates Isolation Forest and an autoencoder to construct a dual-mode architecture, scoring each residual sequence and combining the model output for anomaly classification and labeling.
[0128] To evaluate the system's recognition performance under different anomaly categories, a manually labeled reference sample set was collected in the experiment, and the recognition rates of the traditional rule system and the proposed system were compared. The results are shown in Table 1.
[0129] Table 1 Comparison of Abnormal Medication Use Identification Rates
[0130] ;
[0131] As shown in Table 1, the recognition rate of this system for the three common drug anomalies is significantly higher than that of traditional methods, especially in drug conflict detection, which shows the most significant improvement. This indicates that the model has a stronger ability to identify complex drug combination relationships.
[0132] Regarding system operating efficiency, high-concurrency simulation tests were also conducted. Key performance indicators (KPIs) of the traditional rule-based system and this system in terms of processing speed, real-time alert capabilities, and response mechanisms were statistically analyzed using system logs, as shown in Table 2.
[0133] Table 2 Comparison of System Processing Efficiency and Response Capability
[0134] ;
[0135] As shown in Table 2, this system has a significant advantage in processing efficiency. Even with a standard server configuration, it can maintain millisecond-level scoring speeds and support high-throughput real-time analysis requirements. Furthermore, by setting threshold levels, the system processes drug-related behaviors at different risk levels separately, achieving a coordinated approach involving system recording, push notifications, and manual intervention.
[0136] This embodiment verifies the practicality and effectiveness of the present invention in a real clinical environment. The system can not only significantly improve the accuracy of identifying abnormal drug behavior, but also has excellent real-time analysis capabilities and efficient processing capabilities, providing reliable technical support for the refined management of drugs in modern hospitals.
[0137] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for intelligent drug management and predictive analysis based on deep learning, characterized in that, Includes the following steps: S1. Collect data, perform standardization and semantic normalization processing, and generate unified drug data; S2. Construct an ETL process based on unified drug data, set dynamic weights corresponding to time granularity, complete multi-source data alignment, and generate time series input; S3. Construct a drug knowledge graph based on unified drug data, establish semantic mapping relationships between drugs and departments and diseases, and generate the knowledge graph; S4. Based on time series input and knowledge graph, extract periodic changes and spatial differences to generate representation sequences, and introduce residual attention mechanism to perform trend decomposition, outputting trend prediction results and residual sequences; S5. Analyze unified drug data within a time window, use the Apriori algorithm to identify high-frequency drug combinations, and generate drug combination rules; S6. Input the residual sequence into the anomaly detection module composed of Isolation Forest and autoencoder to generate anomaly score and anomaly identification result; S7. Integrate trend prediction results, drug combination rules, and anomaly scores, and input them into the explanatory model to generate feature attribution results; S8. Output trend prediction results, drug combination rules, anomaly identification results, and feature attribution results; S4 specifically includes: S41. Perform normalization processing on the time series input, encode it into a time feature sequence, perform structural embedding on the entities and relations in the drug knowledge graph, and generate knowledge graph vectors; S42. Input the time feature sequence into the LSTM-GRU hybrid neural network. First, extract the state representation across time steps through the long short-term memory network, and then extract the time-dependent features through the gated recurrent unit to generate long-term and short-term representations. At the same time, construct a spatial distribution map of the department information and disease information in the unified drug data, and generate a spatial vector representation based on the graph structure. S43. Concatenate the long-term representation, short-term representation, spatial vector representation, and knowledge graph vector to generate a representation sequence; S44. Perform attention computation on the represented sequence, assuming a time step. The query vector is The key vector is The key vector dimension is The total number of steps in the time series is Calculate attention weights : ; in, For time step The query vector is generated by combining temporal features, spatial vectors, and knowledge graph vectors representing the sequence. For time step The key vector, The dimension of the key vector. This represents the total number of steps in the time series. Represents the vector dot product. This represents an exponential function, with the denominator being the weighting factor normalized across all time steps; S45. Based on the attention weight decomposition representation sequence, extract the trend component representing the periodic change trend and the residual component representing the short-term disturbance, and output the trend prediction result and the residual sequence. S6 specifically includes: S61. Construct an anomaly detection module, which includes a dual-path structure consisting of Isolation Forest and autoencoder, and integrates a static rule matching unit. The static rule matching unit is used to detect whether there are records in the unified drug data that violate medical insurance restrictions, dosage specifications, and drug indication scope. Isolation Forest and autoencoder respectively handle behavioral structure changes and dynamic pattern anomalies in the residual sequence. S62. The residual sequence is input to the anomaly detection module using a sliding window method. Within each time window, IsolationForest outputs the first anomaly score, and the autoencoder outputs the second anomaly score based on the reconstruction error. S63, Define the fusion score: ; in, Indicates time step Fusion anomaly score, This indicates that the Isolation Forest model is at time step The output score, Indicates the autoencoder at time step The output score, Indicates from time step Time to step Historical average rating Indicates time step Historical ratings Indicates the width of the sliding window. , , , which is a non-negative weighting coefficient, representing the weighting coefficient of the first rating, the second rating, and the historical rating; S64. Compare the fusion anomaly score with the preset threshold, classify the risk level, and output the anomaly identification result.
2. The method for intelligent drug management and predictive analysis based on deep learning according to claim 1, characterized in that, The data includes drug prescription records, institution identification, department information, timestamps, and drug attributes.
3. The method for intelligent drug management and predictive analysis based on deep learning according to claim 1, characterized in that, S2 specifically includes: S21. Construct an ETL process to perform field mapping and structure transformation on the unified drug data, and extract drug identifiers, institution identifiers, department information, timestamps and drug attributes; S22. Set the time granularity set, including daily granularity, weekly granularity and monthly granularity, and label the corresponding time granularity type of the data record; S23. Set dynamic weights for each time granularity type, and perform resampling processing on the data records according to the time granularity type to complete time alignment; S24. The time-aligned data records are weighted and merged according to the time index to generate a time series input.
4. The method for intelligent drug management and predictive analysis based on deep learning according to claim 1, characterized in that, S3 specifically includes: S31. Extract three types of entities based on unified drug data, including drug entities, department entities, and disease entities; S32. Extract co-occurrence information between entities from unified drug data, construct mapping relationships between drugs and departments, and between drugs and diseases, and form a set of triples; S33. Represent the set of triples in the form of: The structure, in which, For the head entity, For relation types, It is a tail entity; S34. Use the graph structure initialization method to construct a graph database, import the triple set into the graph database to generate a drug knowledge graph; S35. Calculate the degree, path length and adjacent entity type of each node based on the graph structure, and encode the structural information into a sparse connection matrix; S36. Output the sparse connection matrix as a knowledge graph.
5. The method for intelligent drug management and predictive analysis based on deep learning according to claim 1, characterized in that, S5 specifically includes: S51. Set a sliding time window, extract drug prescription records within the same time window from unified drug data, and construct a drug transaction set. The drug transaction set includes the timestamp, department identifier and drug code set corresponding to each record. S52. Input the drug transaction set into the frequent itemset mining algorithm, use the Apriori algorithm to identify frequent drug combinations issued simultaneously within the same time window, and generate candidate itemsets; S53. Perform frequency statistics and association rule extraction on the candidate set, and filter the drug combination rules that meet the threshold requirements in terms of support and confidence. Each drug combination rule consists of the set of antecedent drug codes and the consequent drug codes. S54. Add a time tag, institution identifier, and department identifier to each drug combination rule to form a set of drug combination rules with attribute identifiers, and output the set of drug combination rules.
6. The method for intelligent drug management and predictive analysis based on deep learning according to claim 1, characterized in that, Specifically, S7 includes: S71. Concatenate the trend prediction results, drug combination rules and anomaly scores to construct a feature vector sequence. Each feature vector contains a trend component, a frequent drug combination label, an anomaly score value and a timestamp. S72. Construct an explanatory model based on the SHAP method, using the feature vector sequence as input, to simulate the response output of the deep model and generate the marginal contribution value of each input feature to the output result. S73, Define feature importance score: ; in, Representation of features Importance rating Represents the set of all input features. Indicates that it does not contain features a subset of Indicates a subset of the input Explain the output predictions generated by the model. Indicates features After adding it to the subset, the predicted values generated by the model are explained. Indicates the number of features in the subset. Indicates the number of all features. This indicates removing features from the entire feature set. ; S74. Sort all input features in descending order according to the feature importance score, form feature attribution results and output them.
Citation Information
Patent Citations
Adverse drug reaction trace management method and system
CN118280602A
Data collection and drug safety signal mining methods and agents for PMS
CN119786078A