Method for intelligent medicine warehouse-in and warehouse-out management based on big data of medicine use of patient

Through the combined model of drug inventory cloud server and DRL-DP, the drug timing characteristics are monitored in real time and an intelligent inlet and exit strategy is generated, which solves the problem of backlog and shortage of Chinese medicines in traditional drug management, and improves drug turnover and patient satisfaction.

CN120412941AInactive Publication Date: 2025-08-01HANG ZHOU XIN JIU YI LIAO KE JI YOU XIAN GONG SI
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510497751.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-08-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional drug inlet and exit management relies on manual experience and static inventory thresholds, resulting in drug backlog, expiration or shortage, and the inability to achieve accurate demand forecasting and inventory optimization, affecting drug turnover and patient satisfaction.

Method used

The drug use timing characteristics are monitored in real time through the drug inventory cloud server, and an intelligent prediction model is generated using the DRL-DP joint model, which identifies drug use characteristics and predicts replenishment suggestions, generates in-store and exit strategies and issues them to the warehouse manager terminal APP.

Benefits of technology

It has achieved intelligent supervision and dynamic replenishment of drugs throughout the life cycle, improved drug turnover efficiency and patient satisfaction, and reduced drug waste rate and inventory management costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120412941A_ABST
    Figure CN120412941A_ABST
Patent Text Reader

Abstract

The invention provides a method for intelligent medicine warehouse-in and warehouse-out management based on big data of medicine use of a patient, and the method comprises the steps: constructing an intelligent prediction model used for outputting a medicine replenishment period and a safety stock dynamic threshold value based on the big data of the medicine use of the patient, and deploying the intelligent prediction model on a medicine stock cloud server; monitoring medication time sequence characteristics of corresponding types of stored medicines in real time through the medicine inventory cloud server, inputting the medication time sequence characteristics into the intelligent prediction model, identifying the medication time sequence characteristics through the intelligent prediction model, and predicting replenishment suggestions of the corresponding types of medicines; and according to the replenishment suggestion, generating a warehouse-in and warehouse-out strategy of the corresponding type of medicine, and issuing the warehouse-in and warehouse-out strategy of the corresponding type of medicine to a terminal APP of a warehouse manager. According to the invention, inventory prediction can be carried out based on the medication time sequence characteristics of each medicine, intelligent supervision and dynamic replenishment of the whole life cycle of the medicine are realized in combination with a dynamic inventory optimization algorithm, and the turnover efficiency of hospital medicines and patient satisfaction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent medical devices, and particularly to a method and device for intelligent management of drug in and out of storage, an electronic device, and a computer-readable storage medium based on big data of patient medication. Background Art

[0002] Traditional drug in and out management relies on manual experience and static inventory thresholds, which easily leads to drug backlogs, expiration, or shortages. According to the statistics of a certain tertiary hospital, the proportion of drug waste caused by expiration reached 12.3% in 2024. Therefore, the existing system lacks in-depth mining of dynamic patient medication data and cannot achieve accurate demand prediction and inventory optimization.

[0003] In addition, the traditional drug in and out management method based on manual experience and static inventory thresholds for drug supervision does not have an optimized prediction for inventory replenishment, with low drug turnover and utilization rates, and even some situations where drugs are lacking and cannot be supplied in a timely manner. Therefore, the replenishment strategy is not flexible enough, causing patient dissatisfaction with the selection and waiting time of hospital drug outflows. Summary of the Invention

[0004] In order to solve the technical problems existing in the prior art, the present invention provides the following technical solutions:

[0005] On the one hand, a method for intelligent management of drug in and out of storage based on big data of patient medication is provided. This method is implemented by an electronic device and includes:

[0006] S1. Real-time monitoring of the medication time series characteristics of corresponding types of drugs in the inventory through a drug inventory cloud server;

[0007] S2. Identifying the medication time series characteristics of corresponding types of drugs and predicting replenishment suggestions for corresponding types of drugs through a preset intelligent prediction model;

[0008] S3. Generating in and out strategies for corresponding types of drugs according to the replenishment suggestions and sending the in and out strategies for corresponding types of drugs to the terminal APP of the warehouse management personnel.

[0009] Preferably, S1. Real-time monitoring of the medication time series characteristics of corresponding types of drugs in the inventory through a drug inventory cloud server includes:

[0010] A number of intelligent lockers for storing various types of drugs are configured in the warehouse and communicate and control data with the drug inventory cloud server based on the Internet of Things; temperature and humidity sensors are deployed in the intelligent lockers. When corresponding types of drugs enter or leave the warehouse once, the temperature and humidity sensors feedback a temperature and humidity change signal to the drug inventory cloud server, and the drug inventory cloud server records and counts the in and out quantity X of corresponding types of drugs k, where k represents the type of drug;

[0011] Monitor and calculate the medication time series characteristics of corresponding types of drugs through a statistical model, including:

[0012] Average drug consumption

[0013]

[0014] Standard deviation:

[0015]

[0016] T is the recorded inventory date.

[0017] Preferably, the method for generating the intelligent prediction model includes:

[0018] Collect the medication big data of several different types of drugs from the cloud database of the drug inventory cloud server, including: the medication plans recorded in the electronic medical records, the pharmacy inbound and outbound records, and the inventory status;

[0019] Monitor and calculate the medication time series characteristics of each type of drug through a statistical model, and label the corresponding drug replenishment cycle and safety inventory dynamic threshold for the medication time series characteristics to obtain a training data set containing the medication time series characteristics of each type of drug;

[0020] Divide the training data set into a training set and a validation set;

[0021] Input the training set into a pre-constructed DRL-DP joint model. Through the deep reinforcement learning network DRL in the DRL-DP joint model, perform reinforcement learning on the medication time series characteristics of each type of drug. Through the dynamic programming network DP in the DRL-DP joint model, perform state transition planning learning on the state information of each type of drug to generate the initial intelligent prediction model; where the state transition equation is:

[0022] S t+1 = S t + Q in - Q out - Q expired ,

[0023] S t is the inventory of a certain type of drug at time t,

[0024] Q in is the replenishment quantity of a certain type of drug at time t,

[0025] Q out is the outbound quantity of a certain type of drug at time t,

[0026] Q expired is the expired quantity of a certain type of drug at time t;

[0027] Verify the prediction performance of the initial intelligent prediction model using the validation set:

[0028] If the verification passes, deploy and apply the intelligent prediction model to the drug inventory cloud server;

[0029] Otherwise, repeat the above steps and retrain.

[0030] On the other hand, a device for intelligent drug warehousing and outbound management based on big data of patient medication is provided. The device for intelligent drug warehousing and outbound management based on big data of patient medication is used to implement the method for intelligent drug warehousing and outbound management based on big data of patient medication as described above. The device includes:

[0031] A drug inventory cloud server, which is used to monitor the medication time series characteristics of the corresponding type of drug in the inventory in real time; and, through a preset intelligent prediction model, identify the medication time series characteristics of the corresponding type of drug and predict the replenishment suggestions for the corresponding type of drug; generate the inbound and outbound strategies for the corresponding type of drug according to the replenishment suggestions, and send the inbound and outbound strategies for the corresponding type of drug to the terminal APP of the warehouse keeper;

[0032] The terminal APP is used to receive and execute the inbound and outbound strategies for the corresponding type of drug, and after execution, feedback the execution result to the drug inventory cloud server;

[0033] The drug inventory cloud server is communicatively connected to the terminal APP.

[0034] On the other hand, an electronic device is provided. The electronic device includes: a processor; a memory, and a computer-readable instruction is stored on the memory. When the computer-readable instruction is executed by the processor, any one of the methods in the method for intelligent drug warehousing and outbound management based on big data of patient medication as described above is implemented.

[0035] On the other hand, a computer-readable storage medium is provided. At least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement any one of the methods in the method for intelligent drug warehousing and outbound management based on big data of patient medication as described above.

[0036] The beneficial effects brought by the technical solutions provided in the embodiments of the present invention at least include:

[0037] This method constructs an intelligent prediction model for outputting the replenishment cycle and dynamic threshold of safety stock based on the big data of patients' medication, and deploys it on the cloud server of drug inventory; the cloud server of drug inventory monitors the medication time series characteristics of the corresponding type of drugs in real time and inputs them into the intelligent prediction model, and the intelligent prediction model identifies the medication time series characteristics and predicts the replenishment suggestions for the corresponding type of drugs; according to the replenishment suggestions, the inbound and outbound strategies for the corresponding type of drugs are generated, and the inbound and outbound strategies for the corresponding type of drugs are sent to the terminal APP of the warehouse management personnel. It can perform inventory prediction based on the medication time series characteristics of each drug, and combine with the dynamic inventory optimization algorithm to realize the intelligent supervision and dynamic replenishment of the entire life cycle of drugs, and improve the turnover efficiency of hospital drugs and patient satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0039] Figure 1 It is a flowchart of a method for intelligent inbound and outbound management of drugs based on big data of patients' medication provided by an embodiment of the present invention;

[0040] Figure 2 It is a schematic diagram of the generation mechanism of an intelligent prediction model provided by an embodiment of the present invention;

[0041] Figure 3 It is a block diagram of a device for intelligent inbound and outbound management of drugs based on big data of patients' medication provided by an embodiment of the present invention;

[0042] Figure 4 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0043] The following describes the technical solutions in the present invention with reference to the drawings.

[0044] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "example" in the present invention should not be construed as more preferred or more advantageous than other embodiments or design solutions. Exactly speaking, the use of the word "example" is intended to present concepts in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one of the two.

[0045] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference is not emphasized, their intended meanings are the same. "Of", "corresponding", and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference is not emphasized, their intended meanings are the same.

[0046] In the embodiments of the present invention, sometimes a subscript such as W1 may be miswritten as a non-subscript form such as W1. When the difference is not emphasized, their intended meanings are the same.

[0047] To make the technical problems, technical solutions, and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.

[0048] The embodiments of the present invention provide a method for intelligent management of drug in and out of the warehouse based on big data of patient medication. This method can be implemented by an electronic device, which can be a terminal or a server. As Figure 1 shown in the flowchart of the method for intelligent management of drug in and out of the warehouse based on big data of patient medication, the processing flow of this method can include the following steps:

[0049] S1. Real-time monitor the medication time sequence characteristics of the corresponding type of drug in the inventory through the drug inventory cloud server;

[0050] S2. Identify the medication time sequence characteristics of the corresponding type of drug and predict the replenishment suggestion of the corresponding type of drug through a preset intelligent prediction model;

[0051] S3. Generate the in and out of the warehouse strategy for the corresponding type of drug according to the replenishment suggestion, and send the in and out of the warehouse strategy of the corresponding type of drug to the terminal APP of the warehouse management personnel.

[0052] This method realizes the intelligent supervision of the entire life cycle of drugs by constructing an intelligent prediction model based on medication time sequence characteristics and combining with a dynamic inventory optimization algorithm.

[0053] Combined with the attached Figure 2As shown in the figure, a general hospital's drug warehouse is equipped with a warehouse management server and management terminals (such as EDA terminal devices that can communicate with the server to view the inbound and outbound data of various types of drugs). This application uses a drug inventory cloud server (providing cloud computing and cloud storage, purchased by the hospital, which can share data with the existing hospital's doctor-patient management server, view the medical record files of each department, collect corresponding data, and the drug information used by each department). And there is also a terminal APP configured to provide a device for the warehouse management personnel to communicate and interact with the drug inventory cloud server. The application management solution between the existing hospital's warehouse management server and management terminals can be combined, which will not be elaborated here. Here, the cloud server is used alone for drug AI management, mainly to reduce the operating pressure, computing power cost, and load of the hospital's doctor-patient management server and avoid affecting the daily medical treatment work.

[0054] The implementation scheme of the present invention will be further described below.

[0055] Preferably, S1. Real-time monitor the medication time sequence characteristics of the corresponding type of drugs in the inventory through the drug inventory cloud server, including:

[0056] There are several intelligent lockers for storing various types of drugs in the warehouse, and data communication and control are carried out with the drug inventory cloud server based on the Internet of Things; temperature and humidity sensors are deployed in the intelligent lockers. When the corresponding type of drugs is in and out of the warehouse once, the temperature and humidity sensors feed back a temperature and humidity change signal to the drug inventory cloud server, and the drug inventory cloud server records and counts the inbound and outbound volume X of the corresponding type of drugs. k , where k represents the drug type;

[0057] Monitor and calculate the medication time sequence characteristics of the corresponding type of drugs through a statistical model, including:

[0058] Average drug consumption

[0059]

[0060] Standard deviation of:

[0061]

[0062] T is the recorded inventory date.

[0063] Here, it is necessary to collect the medication big data of the corresponding type of drugs and calculate the medication time sequence characteristics for model analysis and prediction. The steps are as follows:

[0064] 1. Hardware deployment and data collection

[0065] Intelligent locker configuration:

[0066] Each cabinet is partitioned by drug type (such as normal temperature, refrigeration, and light-proof areas), and high-precision temperature and humidity sensors (with an accuracy of ±0.5°C for temperature and ±3%RH for humidity) are embedded in the cabinet.

[0067] Each layer of the shelf is equipped with an RFID reader / writer (UHF band, reading distance ≥ 1.5m), which automatically scans the drug labels (including drug ID, batch number, and expiration date).

[0068] Internet of Things communication module:

[0069] It uses the LoRaWAN protocol to achieve low-power wide-area network communication, reports environmental data every 5 minutes, and triggers signal upload in real time when drugs are in and out of the warehouse.

[0070] 2. Software architecture and data processing

[0071] Cloud server function module:

[0072] Real-time monitoring module: Dynamically displays the temperature and humidity curves of each cabinet, and triggers an audible and visual alarm when abnormal (such as when the temperature > 8°C or the humidity > 70% for 10 minutes).

[0073] Inventory statistics module: Automatically updates the inventory status based on RFID scan data and generates a heat map of drug in and out volume (by daily / weekly / monthly granularity).

[0074] Expiration warning module: Based on the expiration date field (in the YYYY-MM-DD format), pushes a list of drugs approaching their expiration dates to the administrator's terminal 90 days in advance.

[0075] Data storage:

[0076] It uses a time series database (InfluxDB) to store temperature and humidity signals, and a relational database (MySQL) to store drug attributes and operation logs.

[0077] 3. Process design

[0078] Inbound process:

[0079] Scan the drug label, verify the batch number and expiration date. If the expiration date < 180 days, reject the inbound and give a prompt;

[0080] Allocate the shelf location, record the timestamp, drug ID, and quantity in the database, and synchronously update the appropriate temperature and humidity thresholds;

[0081] The cloud server generates an inbound voucher (including a QR code) for subsequent traceability.

[0082] Outbound process:

[0083] The system recommends the batch number of drugs to be shipped out according to the "First In, First Out (FIFO)" principle;

[0084] After the medicine is taken as confirmed by RFID, the inventory is automatically deducted and an outbound record (including the operator ID and the medicine-taking time) is generated.

[0085] Environmental anomaly handling:

[0086] If the temperature and humidity exceed the standard, the cloud server automatically activates the backup refrigeration / dehumidification equipment and notifies the administrator to review the quality of the medicine.

[0087] 4. Technical advantages

[0088] 1). Efficiency improvement

[0089] Automated recording: The linkage between RFID and sensors reduces manual entry, and the time taken for inventory checks is reduced from 2 hours per time to 10 minutes per time;

[0090] Dynamic scheduling: Optimize the replenishment strategy based on the heat map of inbound and outbound volume, and the inventory turnover rate is increased by more than 35%.

[0091] 2). Quality control

[0092] Real-time environmental monitoring: The temperature and humidity data are synchronized every 5 minutes to ensure that the medicine storage conditions meet the requirements of the Chinese Pharmacopoeia (for example, insulin needs to be stored at a constant temperature of 2-8°C);

[0093] Accurate management of expiration dates: Through the expiration date warning module, the expired loss rate is reduced from 8% to 1.2%.

[0094] 3). Resource conservation

[0095] Energy consumption optimization: The intelligent cabinet has zoned temperature control, and the refrigeration in the cold storage area is only activated when there is medicine, reducing the comprehensive energy consumption by 40%;

[0096] Reduction of labor costs: The need for inspection personnel is reduced by 50%, and the error rate is reduced from 5% to 0.3%.

[0097] Through the above monitoring method, the emergency medicine-taking response time is shortened from 15 minutes to 2 minutes (through rapid positioning by RFID).

[0098] This solution realizes the intelligent and refined management of medicine storage through the deep integration of Internet of Things and data analysis technologies, and can build an efficient logistics system for the supervision of medicine inbound and outbound.

[0099] Such as Figure 2 shown, preferably, the method for generating the intelligent prediction model includes:

[0100] Collect the big data on medicine use of several different types of medicines from the cloud database of the medicine inventory cloud server, including: the medicine use plans recorded in the electronic medical records, the inbound and outbound records of the pharmacy, and the inventory status;

[0101] Monitor and calculate the medication time - series characteristics of each type of drug through a statistical model, and label the corresponding drug replenishment cycle and dynamic safety - stock threshold for the medication time - series characteristics to obtain a training data set containing the medication time - series characteristics of each type of drug;

[0102] Divide the training data set into a training set and a validation set;

[0103] Input the training set into a pre - constructed DRL - DP joint model. Through the deep reinforcement learning network DRL in the DRL - DP joint model, perform reinforcement learning on the medication time - series characteristics of each type of drug. Through the dynamic programming network DP in the DRL - DP joint model, perform state - transfer planning learning on the state information of each type of drug to generate the initial intelligent prediction model; where the state - transfer equation is:

[0104] S t+1 =S t +Q in -Q out -Q expired ,

[0105] S t is the inventory of a certain type of drug at time t,

[0106] Q in is the replenishment quantity of a certain type of drug at time t,

[0107] Q out is the outbound quantity of a certain type of drug at time t,

[0108] Q expired is the expired quantity of a certain type of drug at time t;

[0109] Use the validation set to verify the prediction performance of the initial intelligent prediction model:

[0110] If the verification passes, then deploy and apply the intelligent prediction model to the drug inventory cloud server;

[0111] Otherwise, repeat the above steps for retraining.

[0112] Here, use the DRL - DP joint model to train the prediction model.

[0113] First, it is necessary to collect the training dataset and construct features by combining the above-mentioned formula algorithm for the medication time series characteristics. Through the shared cloud database, communicate with the HIS system in the doctor-patient management server for data sharing. The data can be stored in a MySQL relational database: store drug attributes (ID, batch number, expiration date), inbound and outbound records (timestamp, quantity, operator ID), and the medication plan associated with the electronic medical record (diagnosis code, medication frequency, dosage). For the information reporting of the intelligent storage locker in the warehouse, interact with Internet of Things devices (RFID, sensors) through the RESTful API to synchronize the changes in drug status every second. The InfluxDB time series database: records the real-time temperature and humidity sensor data (sampling frequency: once every 5 minutes).

[0114] Secondly, design the architecture of the DRL-DP joint model:

[0115] (1) Input module:

[0116] Feature encoder: Map the medication time series characteristics (mean, standard deviation) to a 64-dimensional vector and perform normalization processing (Min-Max Scaling).

[0117] (2) DRL module:

[0118] Policy network (Actor):

[0119] Structure: 3-layer bidirectional LSTM (64 units) + fully connected layer (Softmax activation)

[0120] Input: Current inventory status (St), time series characteristics ( σt), disease-drug association weight (determined by warehouse experience);

[0121] Output: Probability distribution of replenishment actions (discrete action space: replenish / not replenish; continuous action space: replenishment quantity Q in );

[0122] Reward function:

[0123]

[0124] Value network (Critic):

[0125] Structure: 3-layer LSTM (64 units) + fully connected network (ReLU activation, 64 nodes);

[0126] Input: State vector + action vector;

[0127] Output: State-action value score Q(s,a)Q(s,a);

[0128] (3) DP module:

[0129] State Transition Engine: Based on the Markov Decision Process (MDP), define the state transition equation:

[0130] S t+1 = S t + Q in - Q out - Q expired ,

[0131] S t is the inventory of a certain type of drug at time t,

[0132] Q in is the replenishment quantity of a certain type of drug at time t,

[0133] Q out is the outbound quantity of a certain type of drug at time t,

[0134] Q expired is the expired quantity of a certain type of drug at time t.

[0135] (4) Output Layer

[0136] Policy Executor: Integrate the DRL action decision and the DP optimization path to generate dynamic replenishment instructions (drug ID, quantity, priority).

[0137] Warning Interface: When the inventory deviation from the predicted value > 15% or the expiration date < 30 days, push an alarm to the administrator terminal (terminal APP).

[0138] Finally, the model training steps:

[0139] (1). Data Preprocessing

[0140] Data Cleaning: Eliminate invalid records (such as entries with missing expiration dates or negative quantities), and fill in missing values (mean imputation).

[0141] Feature Engineering:

[0142] Sliding Window Statistics: Calculate the average drug consumption and the standard deviation σt over T = 7 days.

[0143] Disease-Drug Association Matrix: Calculate the co-occurrence weight of disease diagnosis codes and drugs based on TF-IDF.

[0144] Dataset Partitioning: Partition by time series (80% training set, 20% validation set) to prevent data leakage.

[0145] (2). Model Initialization

[0146] DRL parameters: The weights of the LSTM hidden layer are initialized using Xavier, the learning rate α = 0.001, and the discount factor γ = 0.99.

[0147] DP parameters: Read the database and write parameters such as the inventory of various types of drugs (here, several types of drugs can be selected by the administrator for supervision).

[0148] (3) Joint training process

[0149] Phase 1: DRL exploration

[0150] Input the current state S t , and the policy network generates a replenishment action a t .

[0151] Execute the action and observe the reward R t (Refer to the previous R) and the next state S t+1 .

[0152] Store the experience tuple (S t , a t , R t , S t+1 ) into the experience replay pool (capacity = 10,000).

[0153] Sample a batch of data (batch = 64) from the replay pool every 100 steps, and update the parameters of the policy network and the value network (Adam optimizer).

[0154] Phase 2: DP optimization

[0155] Based on the current DRL policy, the DP module calculates the optimal inventory for the next T = 7 (refer to the previous S t+1 formula).

[0156] (4) Model verification and deployment

[0157] Verification metrics:

[0158] Mean Absolute Error (MAE): The deviation between the predicted demand and the actual consumption;

[0159] Expired loss rate: The proportion of expired drugs in the validation set;

[0160] Policy stability: Pass if the continuous 10 - time verification shows MAE < 5% and the expired loss rate < 3%.

[0161] Deployment process: Package the model through Docker containerization and integrate it into the microservice architecture of the drug inventory cloud server.

[0162] The following provides test data:

[0163] The inbound and outbound records of diabetes drugs (such as insulin and metformin) in a certain Class-III hospital from January 2023 to June 2024, with a total of 45,000 data records. The comparison of effects is shown in the following table:

[0164]

[0165] (5) The supervision principle of this model:

[0166] Collect the drug status through Internet of Things devices (temperature and humidity sensors) and update it to the cloud database every second; Prediction-optimization closed-loop: The DRL-DP model performs rolling predictions every 6 hours, generates replenishment suggestions and triggers the automatic procurement process.

[0167] The dynamic decision-making of DRL: Capture the time-series dependence of drug usage requirements through LSTM, and use the reward function RR to balance the inventory holding and shortage risks to achieve an adaptive replenishment strategy.

[0168] The global optimization of DP: Based on the state transition equation and cost function, ensure that the inventory path is optimal in the long term and avoid the local optimal trap of DRL.

[0169] Collaboration mechanism: DRL provides real-time decision-making flexibility, and DP injects domain knowledge constraints to form an "exploration-correction" closed-loop.

[0170] (6) Technical advantages

[0171] High-precision prediction: MAE < 5%, significantly better than traditional ARIMA models (MAE ≈ 15%) and single DRL models (MAE ≈ 8%).

[0172] Dynamic adaptability: Support sudden demand fluctuations (such as epidemic outbreaks), and the model retraining cycle only takes 2 hours (traditional methods take 1 week).

[0173] Figure 3 It is a block diagram of a device for intelligent drug inbound and outbound management based on big data of patient medication use shown according to an exemplary embodiment. This device is used for the method of intelligent drug inbound and outbound management based on big data of patient medication use. Refer to Figure 3 , this device includes a drug inventory cloud server 310 and a terminal APP 320.

[0174] Among them:

[0175] On the other hand, a device for intelligent drug inbound and outbound management based on big data of patient medication use is provided. The device for intelligent drug inbound and outbound management based on big data of patient medication use is used to implement the above-mentioned method of intelligent drug inbound and outbound management based on big data of patient medication use. The device includes:

[0176] The drug inventory cloud server 310 is used to monitor the time series characteristics of the corresponding types of drugs in inventory in real time; and, using a preset intelligent prediction model, identify the time series characteristics of the corresponding types of drugs and predict replenishment recommendations for the corresponding types of drugs; generate entry and exit strategies for the corresponding types of drugs based on the replenishment recommendations, and distribute the entry and exit strategies for the corresponding types of drugs to the terminal app of the warehouse manager;

[0177] The terminal APP 320 is used to receive and execute the entry and exit strategies for the corresponding types of drugs, and after execution, feedback the execution results to the drug inventory cloud server;

[0178] The drug inventory cloud server is in communication with the terminal APP.

[0179] Please understand device interaction in conjunction with the above methods.

[0180] Figure 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention, such as Figure 4 As shown, the electronic device may include the above Figure 3 The device shown is for intelligently managing the entry and exit of medicines based on patient medication big data. Optionally, the electronic device 410 may include a first processor 2001.

[0181] Optionally, the electronic device 410 may further include a memory 2002 and a transceiver 2003 .

[0182] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.

[0183] The following combination Figure 4 The components of the electronic device 410 are described in detail.

[0184] The first processor 2001 is the control center of the electronic device 410 and can be a single processor or a collective term for multiple processing elements. For example, the first processor 2001 can be one or more central processing units (CPUs), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSPs) or one or more field programmable gate arrays (FPGAs).

[0185] Optionally, the first processor 2001 can execute various functions of the electronic device 410 by running or executing software programs stored in the memory 2002 and calling data stored in the memory 2002.

[0186] In a specific implementation, as an example, the first processor 2001 may include one or more CPUs, such as Figure 4 CPU0 and CPU1 shown in

[0187] In a specific implementation, as an example, the electronic device 410 may also include multiple processors, such as Figure 4 the first processor 2001 and the second processor 2004 shown in

[0188] Herein, the memory 2002 is used to store software programs for implementing the solution of the present invention and is controlled by the first processor 2001 for execution. The specific implementation manner may refer to the above method embodiments and will not be elaborated herein.

[0189] Optionally, the memory 2002 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic storage media such as magnetic disk storage, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001 or may exist independently and be coupled to the first processor 2001 through an interface circuit ( Figure 4 not shown in

[0190] The transceiver 2003 is used to communicate with network devices or with terminal devices.

[0191] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 4 not shown separately). Among them, the receiver is used to implement the receiving function, and the transmitter is used to implement the transmitting function.

[0192] Optionally, the transceiver 2003 may be integrated with the first processor 2001, or may exist independently, and is coupled to the first processor 2001 through the interface circuit ( Figure 4 not shown) of the electronic device 410. The embodiments of the present invention do not make specific limitations on this.

[0193] It should be noted that Figure 4 the structure of the electronic device 410 shown does not constitute a limitation on the router. The actual knowledge structure recognition device may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.

[0194] In addition, the technical effects of the electronic device 410 can refer to the technical effects of the method for intelligent drug warehousing and outbound management based on big data of patient medication described in the above method embodiments, and will not be elaborated here.

[0195] It should be understood that the first processor 2001 in the embodiments of the present invention may be a central processing unit (CPU), and this processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or this processor may also be any conventional processor, etc.

[0196] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0197] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware, or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more collections of available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, or magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0198] It should be understood that the term "and / or" in this document is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Here, A and B can be singular or plural. Additionally, the character " / " in this document generally represents an "or" relationship between the associated objects before and after, but it may also represent an "and / or" relationship, which can be specifically understood by referring to the context.

[0199] In the present invention, "at least one" means one or more, and "a plurality" means two or more. "At least one of the following" or its similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or multiple.

[0200] It should be understood that in various embodiments of the present invention, the magnitudes of the sequence numbers of the above processes do not imply the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0201] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0202] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the devices, apparatuses, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0203] In several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0204] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0205] In addition, the functional units in various embodiments of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.

[0206] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0207] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A method for intelligent management of drug inbound and outbound based on big data of patient medication, characterized in that, The method includes: S1. Real-time monitoring of the medication timing characteristics of corresponding types of drugs in the inventory through a drug inventory cloud server; S2. Identifying the medication timing characteristics of corresponding types of drugs and predicting replenishment suggestions for corresponding types of drugs through a preset intelligent prediction model; S3. Generating inbound and outbound strategies for corresponding types of drugs according to the replenishment suggestions, and sending the inbound and outbound strategies for corresponding types of drugs to the terminal APP of the warehouse keeper.

2. The method for intelligent drug warehousing and outbound management based on big data of patient medication according to claim 1, wherein S1. Real-time monitoring of the medication timing characteristics of corresponding types of drugs in the inventory through a drug inventory cloud server, including: There are several intelligent lockers for storing various types of drugs in the warehouse, and data communication and control are carried out with the drug inventory cloud server based on the Internet of Things; temperature and humidity sensors are deployed in the intelligent lockers. When a drug of a corresponding type enters or exits the warehouse once, the temperature and humidity sensors feed back a temperature and humidity change signal to the drug inventory cloud server, and the drug inventory cloud server records and counts the in-and-out quantity x of the drug of the corresponding type k , where k represents the drug type; Monitoring and calculating the medication timing characteristics of corresponding types of drugs through a statistical model, including: Average drug consumption Standard deviation of: T is the recorded inventory date.

3. The method for intelligent drug warehousing management based on big data of patient medication according to claim 2, characterized in that, The generation method of the intelligent prediction model includes: Collecting medication big data of several different types of drugs from the cloud database of the drug inventory cloud server, including: medication plans recorded in electronic medical records, pharmacy inbound and outbound records, and inventory status; Monitoring and calculating the medication timing characteristics of each type of drug through a statistical model, and marking the corresponding drug replenishment cycle and dynamic safety stock threshold for the medication timing characteristics to obtain a training data set containing the medication timing characteristics of each type of drug; Dividing the training data set into a training set and a validation set; Inputting the training set into a pre-constructed DRL-DP joint model, performing reinforcement learning on the medication timing characteristics of each type of drug through the deep reinforcement learning network DRL in the DRL-DP joint model, and performing state transition planning learning on the state information of each type of drug through the dynamic programming network DP in the DRL-DP joint model to generate the initial intelligent prediction model; where the state transition equation is: S t+1 = S t + Q in - Q out - Q expired , S t is the inventory of a certain type of drug at time t, Q in is the replenishment quantity of a certain type of drug at time t, Q out is the outbound quantity of a certain type of drug at time t Q expired is the expired quantity of a certain type of drug at time t; Verifying the prediction performance of the initial intelligent prediction model using the validation set: If the verification is passed, then deploying and applying the intelligent prediction model to the drug inventory cloud server; Otherwise, repeat the above steps for retraining.

4. An apparatus for intelligent management of drug inbound and outbound based on big data of patient medication, the apparatus for intelligent management of drug inbound and outbound based on big data of patient medication is used to implement the method for intelligent management of drug inbound and outbound based on big data of patient medication according to any one of claims 1-3, characterized in that, The device includes: A drug inventory cloud server for real-time monitoring of the medication timing characteristics of corresponding types of drugs in the inventory; and identifying the medication timing characteristics of corresponding types of drugs and predicting replenishment suggestions for corresponding types of drugs through a preset intelligent prediction model; generating inbound and outbound strategies for corresponding types of drugs according to the replenishment suggestions, and sending the inbound and outbound strategies for corresponding types of drugs to the terminal APP of the warehouse keeper; A terminal APP for receiving and executing the inbound and outbound strategies of corresponding types of drugs, and after execution, feeding back the execution result to the drug inventory cloud server; The drug inventory cloud server is communicatively connected to the terminal APP.

5. An electronic device, characterized in that, The electronic device includes: A processor; A memory, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 3 is implemented.

6. A computer-readable storage medium, characterized in that, Program code is stored in the computer-readable storage medium, and the program code can be called by the processor to execute the method according to any one of claims 1 to 3.

Citation Information

Cited By

  • Medicine warehouse management method and device, terminal equipment and storage medium

    CN121096558A