A method and system for monitoring and managing pharmaceutical inventory
By deploying multi-source sensors and combining advanced artificial intelligence technology, the problems of incomplete data monitoring and low failure period prediction accuracy in traditional pharmaceutical inventory management systems have been solved, and intelligent monitoring and management of pharmaceutical inventory has been realized, which has significantly improved the efficiency and safety of inventory management.
Patent Information
- Application Number
- CN202510330489.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-03-20
AI Technical Summary
Traditional pharmaceutical inventory management systems cannot monitor the pharmaceutical status and storage environment parameters in real time, making it difficult to identify potential risks in a timely manner, and the failure period prediction accuracy is low, making it unable to adapt to the different needs of different warehouses.
Deploy multi-source sensors to monitor the drug inventory status in real time, combine graph neural network, reinforcement learning and federated learning technology to build a dynamic inventory status map, adaptive inventory allocation model, failure period distributed prediction model and a dynamic risk coefficient evaluation system for digital twins.
It realizes all-round real-time monitoring of the inventory status of the drug, improves inventory management efficiency and safety, enhances the accuracy and adaptability of failure period prediction, and ensures immediate response and effective control of high-risk storage units.
Smart Images

Figure CN119851903B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and particularly to a method and system for monitoring and managing pharmaceutical inventory. Background Art
[0002] With the rapid development of the pharmaceutical industry, the complexity of pharmaceutical inventory management has been increasing day by day. Traditional inventory management systems mainly rely on manual records and regular physical inventories. This method is not only inefficient but also prone to errors, resulting in frequent problems such as expired drugs or substandard storage conditions. In recent years, with the development of Internet of Things technology and artificial intelligence, more and more enterprises have begun to try to use sensor networks and data analysis technology to improve inventory management. However, most of the existing solutions are limited to single functions, such as only monitoring temperature and humidity or only focusing on changes in inventory quantity, lacking the ability to comprehensively analyze multi-source data and intelligent decision-making support.
[0003] The existing technology has significant deficiencies in dealing with pharmaceutical inventory management and expiration date prediction. On the one hand, traditional inventory management systems cannot monitor the specific status of pharmaceuticals and their storage environment parameters in real time, making it difficult to detect potential risks in a timely manner. On the other hand, existing expiration date prediction methods usually perform simple regression analysis based on historical data, failing to fully utilize the advantages of advanced algorithms such as federated learning, resulting in low prediction accuracy and difficulty in adapting to the different demand differences between warehouses. The present invention realizes the comprehensive monitoring and intelligent management of pharmaceutical inventory status by deploying multi-source sensors and combining advanced technologies such as graph neural networks, reinforcement learning, and federated learning, significantly improving the efficiency and safety of inventory management. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a method for monitoring and managing pharmaceutical inventory to solve the problems of incomplete data monitoring and low expiration date prediction accuracy in traditional pharmaceutical inventory management systems.
[0006] To solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a method for monitoring and managing pharmaceutical inventory, which includes,
[0008] Deploying multi-source sensors to monitor the status of pharmaceutical inventory in real time, analyzing it, and extracting key features;
[0009] Performing real-time fusion analysis on the extracted key features to generate a dynamic inventory status mapping diagram;
[0010] Based on the dynamic inventory status mapping diagram, construct an adaptive inventory allocation model driven by reinforcement learning, obtain the optimal inventory allocation and scheduling strategy, and update the inventory status;
[0011] According to the updated inventory status, construct a distributed expiration date prediction model based on federated learning, generate the expiration date prediction results, and perform collaborative optimization across warehouses;
[0012] Based on the expiration date prediction results, construct a digital twin-based dynamic risk coefficient evaluation system to obtain the risk coefficient evaluation results.
[0013] As a preferred solution of the monitoring and management method for the pharmaceutical inventory described in the present invention, wherein: deploy multi-source sensors to continuously monitor the status of the pharmaceutical inventory and perform analysis, and extract key features, including the following steps,
[0014] Determine the positions of the sensor nodes according to the warehouse layout and the pharmaceutical storage areas;
[0015] Collect the pharmaceutical inventory quantity, storage environment parameters, physical properties, and expiration date through the deployed sensors;
[0016] Perform denoising processing, normalization processing, and timestamp marking on the pharmaceutical inventory quantity, storage environment parameters, physical properties, and expiration date;
[0017] Directly obtain the quantity and location information of each pharmaceutical from the processed pharmaceutical inventory quantity;
[0018] Detect the color change, odor concentration, and morphological change of the physical properties of the pharmaceutical;
[0019] Use RFID tag technology to automatically read the production date and batch number of each batch of pharmaceuticals.
[0020] As a preferred solution of the monitoring and management method for the pharmaceutical inventory described in the present invention, wherein: perform real-time fusion analysis on the extracted key features to generate a dynamic inventory status mapping diagram, including the following steps,
[0021] Use a graph neural network to construct an association model to identify the association relationships among the quantity of pharmaceuticals, storage environment parameters, and physical properties of pharmaceuticals;
[0022] Define nodes as each pharmaceutical and its related attributes, and edges represent the potential relationships between different attributes;
[0023] Based on the defined nodes and edges, construct a graph structure;
[0024] Select a GNN variant for processing heterogeneous graph data, use the constructed graph structure as the input, and update the node embedding vectors;
[0025] Determine the position coordinates of each storage unit according to the actual layout of the warehouse.
[0026] Associate the updated embedding vector of each node with its corresponding position coordinates to generate a dynamic inventory status mapping diagram for each type of medicine.
[0027] As a preferred solution of the method for monitoring and managing the medicine inventory described in the present invention, wherein: based on the dynamic inventory status mapping diagram, construct an adaptive inventory allocation model driven by reinforcement learning, and obtaining the optimal inventory allocation and scheduling strategy and updating the inventory status includes the following steps,
[0028] Select the deep Q model as the reinforcement learning algorithm;
[0029] Based on the quantity of each type of medicine, the remaining validity period of the medicine, the physical properties of the medicine, and the storage environment parameters in the dynamic inventory status mapping diagram, define the state vector;
[0030] Define the action vector according to the inventory adjustment decision of each type of medicine;
[0031] Set the reward function to minimize inventory waste, maximize the demand satisfaction rate, and reduce risks;
[0032] Collect historical sales data, market demand fluctuations, and information on the upstream and downstream of the supply chain;
[0033] Define the simulation scenario according to the collected historical sales data, market demand fluctuations, and information on the upstream and downstream of the supply chain;
[0034] Run the deep Q model in each scenario to explore the environment and execute actions;
[0035] For the result of each action execution, record the state vector, action vector, reward function, and new state vector to form an experience tuple;
[0036] Use the experience replay pool to store the experience tuples and regularly draw samples from them for training;
[0037] Based on the trained deep Q model, perform priority scoring on the expiration date, storage environment parameters, and physical properties of the medicine;
[0038] For high-priority medicines, generate transfer instructions, send the transfer instructions to the automated equipment, and execute the transfer operation;
[0039] For medium-priority medicines, perform inventory optimization operations, adjust the storage location, and optimize the storage environment;
[0040] For low-priority medicines, perform regular inventory management, conduct regular inspections, and record the inventory status;
[0041] After the scheduling execution is completed, update the inventory status.
[0042] As a preferred solution of the monitoring and management method for the inventory of the medicaments described in the present invention, wherein: based on the updated inventory status and expiration date status, a distributed prediction model for expiration dates based on federated learning is constructed, and the steps for generating the expiration date prediction results and performing collaborative optimization across warehouses are as follows,
[0043] Deploy a long short-term memory network locally in each warehouse as the prediction model;
[0044] Use the updated inventory status as the input feature and input it into the prediction model for training;
[0045] Adopt an aggregation algorithm as the federated learning framework, perform weighted averaging on the parameters of the trained LSTM model to form a global prediction model;
[0046] Send the global prediction model parameters to each warehouse, replace the local LSTM model parameters, and use the updated global prediction model to predict the expiration date of each medicament;
[0047] When the global prediction model predicts that the expiration date of the medicaments in a certain warehouse is approaching and the inventory is insufficient, trigger a cross-warehouse collaborative optimization instruction;
[0048] Screen candidate warehouses according to the global inventory status;
[0049] Sort the candidate warehouses based on a dynamic priority scoring system, and the one with the highest total score is used as the target warehouse;
[0050] When multiple candidate warehouses have the same highest score, select the target warehouse for transfer according to the principle of distance priority;
[0051] Set a safety threshold for the inventory quantity. When there is only one candidate warehouse and its inventory quantity is lower than the safety threshold after transfer, automatically calculate the maximum transferable quantity and generate a partial transfer instruction;
[0052] Send the transfer instruction to the automated equipment for execution, and synchronously update the inventory status of the source warehouse, target warehouse, and the global prediction model;
[0053] If the transfer fails, trigger the supply chain collaborative response process to generate a procurement application and a production scheduling instruction.
[0054] As a preferred solution of the monitoring and management method for the inventory of the medicaments described in the present invention, wherein: based on the expiration date prediction results, a dynamic evaluation system for the risk coefficient of digital twins is constructed, and the steps for calculating the risk coefficient of each storage unit are as follows,
[0055] Select a digital twin platform, create a digital twin instance, and configure computing resources and storage resources;
[0056] Use a 3D modeling tool to construct the physical layout of a warehouse including storage units, shelves, aisles, and equipment, and import the modeling results into the digital twin platform to generate a digital twin model of the virtual warehouse;
[0057] Associate the real-time monitored pharmaceutical inventory status from multi-source sensors with the storage units in the digital twin model of the virtual warehouse, and update the environmental parameters and physical properties of the pharmaceuticals in the digital twin model of the virtual warehouse in real time;
[0058] Define the static and dynamic properties of the digital twin model, and construct a simulation scenario in the digital twin platform, set the simulation parameters, and simulate the risks under different conditions;
[0059] Based on the simulation results, calculate the risk coefficient of each storage unit 。
[0060] As a preferred solution of the monitoring and management method for the pharmaceutical inventory described in the present invention, wherein: based on the calculated risk coefficient of each storage unit, perform risk level division, and the risk coefficient evaluation result includes the following steps,
[0061] According to the physical properties of the pharmaceuticals and the storage environment parameters, set as the high-risk threshold, as the warning threshold;
[0062] When > , mark it as a high-risk state, generate a first-level response measure, issue a first audio-visual alarm, automatically stop adding pharmaceuticals to the high-risk storage unit, and notify the warehouse management staff for manual inspection and handling;
[0063] When < ≤ , mark it as a warning state, generate a second-level response measure, issue a second audio-visual alarm, automatically stop adding pharmaceuticals to the warning storage unit, and increase the inspection frequency of this storage unit;
[0064] When ≤ , mark it as a safe state, continuously monitor the environmental parameters and pharmaceutical status of the storage unit, and inspect this storage unit according to the standard inspection plan.
[0065] In a second aspect, the present invention provides a monitoring and management system for pharmaceutical inventory, including,
[0066] A sensing network module that deploys multi-source sensors to monitor the status of the pharmaceutical inventory in real time, analyze it, and extract key features;
[0067] A status mapping module that performs real-time fusion analysis on the extracted key features to generate a dynamic inventory status mapping diagram for each type of medicine;
[0068] An adaptive allocation module that constructs an adaptive inventory allocation model driven by reinforcement learning based on the dynamic inventory status mapping diagram, obtains the optimal inventory allocation and scheduling strategy, and updates the inventory status;
[0069] An expiration date prediction module that constructs a distributed expiration date prediction model based on federated learning according to the updated inventory status and expiration date status, generates an expiration date prediction result, and performs collaborative optimization across warehouses;
[0070] A risk assessment module that constructs a dynamic risk coefficient assessment system of digital twin based on the expiration date prediction result to obtain a risk coefficient assessment result.
[0071] In a third aspect, the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and: when the computer program is executed by the processor, any step of the monitoring and management method of medicine inventory as described in the first aspect of the present invention is implemented.
[0072] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and: when the computer program is executed by the processor, any step of the monitoring and management method of medicine inventory as described in the first aspect of the present invention is implemented.
[0073] The beneficial effects of the present invention are as follows: By deploying multi-source sensors, the all-round real-time monitoring of the medicine inventory status is realized, effectively solving the problem of lagging risk identification caused by incomplete information collection in the traditional system; Using a graph neural network to perform fusion analysis on the extracted key feature information to generate a dynamic inventory status mapping diagram, providing accurate data support for subsequent inventory allocation; An adaptive inventory allocation model driven by reinforcement learning can formulate an optimal scheduling strategy according to the actual inventory situation, maximizing the satisfaction of market demand while reducing inventory waste; The distributed expiration date prediction model based on federated learning improves the accuracy and adaptability of expiration date prediction, while the dynamic risk coefficient assessment system of digital twin ensures the immediate response and effective control of high-risk storage units, greatly improving the safety and efficiency of medicine inventory management as a whole. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for description in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0075] Figure 1 It is a flowchart of the monitoring and management method for the medicine inventory in Embodiment 1.
[0076] Figure 2 It is a module diagram of the monitoring and management system for the medicine inventory in Embodiment 1. Detailed implementation manners
[0077] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will make a detailed description of the specific implementation manners of the present invention in conjunction with the accompanying drawings of the specification.
[0078] Many specific details are set forth in the following description to facilitate a thorough understanding of the present invention. However, the present invention may be implemented in other ways different from those described herein. Those skilled in the art can make similar generalizations without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0079] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation manner of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that excludes other embodiments.
[0080] Embodiment 1, referring to Figure 1 and Figure 2 , is the first embodiment of the present invention. This embodiment provides a monitoring and management method for medicine inventory, including the following steps:
[0081] S1. Deploy multi-source sensors to monitor the status of the medicine inventory in real time, analyze it, and extract key feature information.
[0082] S1.1. Determine the positions of the sensor nodes according to the warehouse layout and the division of the medicine storage areas.
[0083] Specifically, the temperature and humidity sensors are evenly distributed at different heights and areas in the warehouse to avoid local environmental deviations. The gas sensors are close to the storage areas of volatile medicines. The optical sensors are installed near the medicine packaging production line or the shelves to facilitate capturing the appearance features of the medicines.
[0084] S1.2. Collect the medicine inventory quantity, storage environment parameters, physical properties, and expiration dates through the deployed sensors; perform denoising processing, normalization processing, and timestamp marking on the status of the medicine inventory; directly obtain the quantity and position information of each medicine from the processed medicine inventory quantity; measure the temperature, humidity, gas components, and light conditions in the storage environment; detect the color change, odor concentration, and morphological change of the physical properties of the medicines; for the expiration date, use RFID tag technology to automatically read the production date and batch number of each batch of medicines.
[0085] Specifically, denoising is to remove data fluctuations caused by device noise, normalization is to convert data from different sources to a unified dimension for subsequent analysis, and timestamp marking is to add accurate time information to each record.
[0086] S2. Conduct real-time fusion analysis on the extracted key feature information to generate a dynamic inventory status mapping diagram for each type of medicine, including the following steps.
[0087] Use a graph neural network to construct an association model to identify the association relationships among the quantity of medicine, storage environment parameters, and physical properties of the medicine; define nodes as each type of medicine and its related attributes (including but not limited to quantity, location, batch information, production date, etc.), and edges represent the potential relationships between different attributes (such as the influence of temperature on color change, the influence of humidity on odor concentration, etc.); based on the defined nodes and edges, construct a graph structure; select a GNN variant for processing heterogeneous graph data, use the constructed graph structure as input, and update the node embedding vectors; according to the actual layout of the warehouse, determine the position coordinates of each storage unit; associate the updated node embedding vector of each node with its corresponding position coordinates to generate a dynamic inventory status mapping diagram for each type of medicine.
[0088] Specifically, the formation of the dynamic inventory status mapping diagram is based on the node embedding vectors output by the GNN model, combined with the warehouse layout information, to construct a three-dimensional space coordinate system, and use a three-dimensional graphics library (such as Three.js or Unity3D) to convert these vectors into a visual three-dimensional model. For each medicine, its position in the three-dimensional space is determined by its actual storage location, and attributes such as color and size are dynamically adjusted according to its current status (such as temperature, humidity, remaining expiration date, etc.). Add interactive functions to the three-dimensional view to allow users to click on any medicine to view detailed information, including but not limited to medicine name, quantity, latest test result, predicted expiration date, etc.
[0089] It should be noted that through the key feature information extracted by real-time fusion analysis, managers can quickly understand the inventory situation and make responses. The dynamic inventory status mapping diagram provides a visualization tool for warehouse management, helps optimize the use of storage space and logistics scheduling, and timely monitors the physical properties and expiration dates of medicines, which can effectively prevent quality problems caused by improper storage.
[0090] S3. Based on the dynamic inventory status mapping diagram of each type of medicine, construct an adaptive inventory allocation model driven by reinforcement learning to obtain the optimal inventory allocation and scheduling strategy and update the inventory status, including the following steps.
[0091] Select a deep Q - model that can handle continuous action spaces as the reinforcement learning algorithm; define a state vector based on the quantity of each medicine, the remaining shelf - life of the medicine, the physical properties of the medicine, and the storage environment parameters in the dynamic inventory status mapping graph; define an action vector according to the inventory adjustment decision of each medicine; design a reward function to minimize inventory waste, maximize the demand satisfaction rate, and reduce risks; collect historical sales data, market demand fluctuations, and information on the upstream and downstream of the supply chain; define simulation scenarios based on the collected data; run the deep Q - model in each scenario to explore the environment and execute actions; for each action execution result, record the state vector, action vector, reward function, and new state vector to form an experience tuple; use an experience replay pool to store experience tuples and regularly sample from it for training; based on the trained deep Q - model, perform priority scoring on the remaining time to expiration, storage environment parameters, and physical properties of the medicine; for high - priority medicines, generate transfer instructions, send the transfer instructions to automated equipment, and execute the transfer operation; for medium - priority medicines, perform inventory optimization operations, adjust the storage location, and optimize the storage environment; for low - priority medicines, perform regular inventory management, conduct regular inspections, and record the inventory status; after the scheduling execution is completed, update the inventory status.
[0092] Further, the simulation scenarios are defined as follows:
[0093] Emergency transfer of medicines with approaching expiration dates: Simulate the transfer of medicines with a remaining shelf - life of less than 7 days; Isolate the storage of high - risk medicines: Simulate the isolation operation of medicines with a high - risk level of storage environment parameters; Demand fluctuation scenarios: Simulate situations where the market demand suddenly increases or decreases.
[0094] Specifically, the priority scoring includes the evaluation of the remaining time to expiration, the evaluation of storage environment parameters, and the evaluation of the physical properties of the medicine, as follows:
[0095] For each medicine, calculate the remaining number of days to expiration, set a remaining shelf - life threshold (such as 30 days, 60 days, etc.), classify and score the medicines approaching expiration. For example, medicines with a remaining shelf - life of less than 30 days receive a high - priority score.
[0096] Monitor key environmental indicators such as temperature, humidity, and gas composition in the storage area. For areas or medicines that do not meet the ideal storage conditions, give corresponding priority scores according to the degree of deviation. For example, medicines with a temperature exceeding the appropriate range by more than 5 degrees receive a higher priority score.
[0097] Consider factors such as color change, odor concentration, and morphological change of the medicine. Any change indicating that the quality of the medicine may be damaged will result in a higher priority score.
[0098] Based on the remaining time to expiration, storage environment parameter evaluation, and pharmaceutical physical property evaluation, a comprehensive priority score is calculated using weighted summation.
[0099] It should be noted that the automated process reduces the need for manual operations, improves processing speed and accuracy, promptly identifies and addresses potential issues, such as pharmaceuticals approaching their expiration dates or stored under poor conditions, effectively reduces quality and safety risks, rationally allocates limited warehouse space and resources, maximizes the utilization of existing facilities, and reduces costs.
[0100] S4. Based on the updated inventory status and expiration date status, construct a distributed expiration date prediction model based on federated learning, generate expiration date prediction results, and perform cross-warehouse collaborative optimization.
[0101] S4.1. Locally deploy a long short-term memory network as the prediction model in each warehouse.
[0102] Furthermore, LSTM is selected because it can effectively handle time series data, which is particularly important for predicting expiration dates. Each warehouse should adjust the architecture of the LSTM model (such as the number of layers, number of units, etc.) according to its own inventory characteristics and historical data to achieve the best prediction effect.
[0103] S4.2. Use local inventory data and storage environment parameters as input features and input them into the prediction model to predict the expiration date of each pharmaceutical.
[0104] Specifically, the input features are a feature set constructed based on the characteristics of the pharmaceuticals (such as type, production date, batch number, etc.), inventory status (quantity, location, etc.), and storage conditions (temperature and humidity change trends, etc.).
[0105] S4.3. Adopt an aggregation algorithm as the federated learning framework to perform weighted averaging on the LSTM model parameters to form a global prediction model.
[0106] Furthermore, the aggregation algorithm is selected as the basis for federated learning because it is simple and effective. The aggregation algorithm protects data privacy by synchronizing model weights among multiple participants instead of directly exchanging raw data.
[0107] S4.4. Distribute the global prediction model parameters to each warehouse, replace the local LSTM model parameters, and use the updated global prediction model to predict the expiration date of each pharmaceutical.
[0108] Furthermore, the purpose of replacing the local LSTM model parameters is to ensure the security and integrity of the transmission process. After receiving the global prediction model, each warehouse can choose to fine-tune the global prediction model using some local data to improve its accuracy in a specific environment.
[0109] S4.5. When the global prediction model predicts that the expiration date of the pharmaceuticals in a certain warehouse is approaching and the inventory is insufficient, a cross-warehouse collaborative optimization instruction is triggered; candidate warehouses are screened according to the global inventory status; the candidate warehouses are sorted based on a dynamic priority scoring system, and the one with the highest total score is selected as the target warehouse; when multiple candidate warehouses have the same highest score, the target warehouse for allocation is selected according to the principle of distance priority; a safety threshold for inventory quantity is set. When there is only one candidate warehouse and its inventory quantity is lower than the safety threshold after allocation, the maximum allocable quantity is automatically calculated and a partial allocation instruction is generated; the allocation instruction is sent to the automated equipment for execution, and the inventory status of the source warehouse and the target warehouse and the global prediction model are updated synchronously; if the allocation fails, a supply chain collaborative response process is triggered to generate a procurement application and a production scheduling instruction.
[0110] Further explanation, the triggering conditions for the cross-warehouse collaborative optimization instruction include high-risk warnings, sudden demands, and abnormal storage environments, etc.
[0111] High-risk warning means that the remaining time of the expiration date of the pharmaceuticals ≤ 7 days and the inventory quantity < the safety inventory quantity; sudden demand means that the market demand surges, resulting in the inventory quantity dropping sharply to the critical value; abnormal storage environment means that the detected environmental parameters of the storage unit exceed the safety range, and the pharmaceuticals need to be transferred urgently.
[0112] The screening of candidate warehouses includes excluding warehouses with unqualified storage environments (such as the risk of accelerated expiration date), filtering warehouses with inventory quantity < the minimum allocable quantity, and preferentially selecting warehouses with the same storage qualifications for pharmaceuticals.
[0113] The dynamic priority scoring is based on the allocation of weight factors and the setting of scoring rules. For example, inventory sufficiency rate (30%), transportation cost (20%), storage stability (25%), historical collaborative efficiency (15%), response timeliness (10%). The total score of the candidate warehouses is calculated by weighting according to the weight factors, and the one with the highest total score is selected as the preferred target warehouse.
[0114] If multiple warehouses meet the allocation conditions and there are inventory conflicts, an emergency level classification is carried out, divided into first-level emergency and second-level emergency.
[0115] Among them, first-level emergency (such as the expiration date of life-saving drugs ≤ 3 days) is to forcefully allocate to the nearest warehouse preferentially, ignoring the inventory quantity difference; second-level emergency (such as the expiration date of ordinary drugs ≤ 14 days) is to select the optimal warehouse according to the scoring ranking.
[0116] When there is an inventory conflict, before the allocation instruction is sent, the target warehouse automatically reserves the storage space corresponding to the allocable quantity to avoid repeated scheduling failures; if the reservation fails (such as being occupied by other tasks during the reservation period), a secondary priority re-ranking is triggered.
[0117] When there is only one candidate warehouse and its inventory level < safety threshold after transfer, implement the linkage strategy of partial transfer mechanism and supply chain collaborative response;
[0118] The specific operation of the partial transfer mechanism is as follows:
[0119] Calculate the maximum transferable quantity = min(target warehouse remaining capacity - safety threshold, requested transfer quantity);
[0120] If the transferable quantity ≥ 50% of the requested quantity, perform partial transfer and update the safety threshold;
[0121] If the transferable quantity < 50%, abandon this transfer and convert it into generating a purchase application.
[0122] Supply chain collaboration means automatically triggering supplier alerts, pushing electronic purchase orders (including pharmaceutical specifications, quantities, and urgency levels), and simultaneously notifying the production department to adjust the production schedule and prioritize the production of shortage pharmaceuticals.
[0123] S4.6. After the transfer is completed, update the inventory status of the source warehouse and the target warehouse in real time.
[0124] S5. Based on the expiration date prediction results, construct a digital twin-based dynamic risk assessment system for calculating the risk coefficient of each storage unit, including the following steps:
[0125] Select a digital twin platform, create a digital twin instance, and configure computing resources and storage resources; use 3D modeling tools to construct the physical layout of the warehouse including storage units, shelves, aisles, and equipment, and import the modeling results into the digital twin platform to generate a digital twin model of the virtual warehouse; associate the real-time monitored pharmaceutical inventory status from multi-source sensors with the storage units in the digital twin model of the virtual warehouse, and update the environmental parameters and physical properties of the pharmaceuticals in the digital twin model of the virtual warehouse in real time; define the static and dynamic attributes of the digital twin model, and construct a simulation scenario in the digital twin platform, set the simulation parameters, and simulate the risks under different conditions; based on the simulation results, calculate the risk coefficient of each storage unit. .
[0126] Furthermore, the static attributes include location, size, capacity, and structural characteristics, etc.
[0127] Among them, the location refers to the fixed coordinate positions of each storage unit, shelf, aisle, and equipment in the warehouse, which is the basis for establishing the digital twin model to ensure the consistency between the virtual environment and the actual warehouse layout. The size and capacity define the maximum capacity limit of each storage unit, including the quantity and types of pharmaceuticals that can be accommodated, which helps optimize inventory management and prevent overloading. Structural characteristics such as shelf materials and strength are crucial for evaluating the safety and stability of storage units.
[0128] Dynamic properties include state changes, environmental parameters, and physical property changes.
[0129] State changes include changes in the quantity of pharmaceuticals, storage time, approaching expiration date, etc. By updating these data in real time, the inventory status can be understood in a timely manner. Environmental parameters refer to temperature, humidity, light conditions, etc. These factors directly affect the quality and safety of pharmaceuticals, and it is necessary to set up a sensor network for continuous monitoring and feedback the data to the digital twin model. Physical property changes refer to color changes, odor concentration, morphological changes, etc., which are important indicators of the quality change of pharmaceuticals.
[0130] Simulation settings refer to the analysis of the impact of extreme weather conditions (such as high temperature / low temperature simulation, flood / rainstorm simulation, and strong wind / typhoon simulation), evacuation route planning in emergency situations (such as fire escape routes, earthquake emergency responses, and chemical leakage handling), and adjusting relevant parameters to test the system's ability to respond to emergencies (such as, in the case of a sudden power outage, checking whether the backup power supply can be quickly switched to ensure the normal operation of important equipment, creating multiple hypothetical scenarios, such as a surge in demand during the peak sales period of holidays, shortages of raw materials due to supply chain disruptions, etc., to test the flexibility and adaptability of the supply chain management system).
[0131] Based on the simulation results, calculating the risk coefficient of each storage unit includes the following steps.
[0132] Extract extreme weather, emergency event, and supply chain stress data from the simulation results; calculate the static property risk score, dynamic property risk score, and simulation result score based on the extracted data; perform weighted aggregation of the calculated scores to obtain the risk coefficient of each storage unit.
[0133] S6. Based on the risk coefficient of each storage unit calculated, performing risk level classification to obtain the risk coefficient evaluation result includes the following steps.
[0134] According to the physical properties of the pharmaceuticals and the storage environment parameters, set as the high-risk threshold, as the warning threshold; when > , mark it as a high-risk state, generate a first-level response measure, issue a first audio-visual alarm, automatically stop adding pharmaceuticals to the high-risk storage unit, and notify the warehouse management staff for manual inspection and handling; when < ≤ , mark it as a warning state, generate a second-level response measure, issue a second audio-visual alarm, automatically stop adding pharmaceuticals to the warning storage unit, and increase the inspection frequency of this storage unit; when ≤ When it is in a safe state, continuously monitor the environmental parameters and the status of the pharmaceutical agents of the storage unit, and inspect the storage unit according to the standard inspection plan.
[0135] It should be noted that the dynamic risk coefficient assessment system based on digital twin technology can not only reflect the current situation in real time, but also predict future risks. Combining Internet of Things (IoT) technology and artificial intelligence algorithms, it realizes intelligent risk warning, making management more flexible and efficient. Different from the traditional single response mode, this solution provides a complete set of hierarchical response strategies, with corresponding processing procedures from minor warnings to emergency shutdowns, having strong adaptability and wide coverage.
[0136] This embodiment also provides a monitoring and management system for pharmaceutical inventory, including:
[0137] A perception network module that deploys multi-source sensors to continuously monitor the status of the pharmaceutical inventory and analyze it, extracting key features;
[0138] A status mapping module that performs real-time fusion analysis on the extracted key features to generate a dynamic inventory status mapping diagram;
[0139] An adaptive allocation module that, based on the dynamic inventory status mapping diagram, constructs an adaptive inventory allocation model driven by reinforcement learning, obtains the optimal inventory allocation and scheduling strategy, and updates the inventory status;
[0140] An expiration date prediction module that, according to the updated inventory status and expiration date status, constructs a distributed expiration date prediction model based on federated learning, generates an expiration date prediction result, and performs collaborative optimization across warehouses;
[0141] A risk assessment module that, based on the expiration date prediction result, constructs a dynamic risk coefficient assessment system of digital twin to obtain a risk coefficient assessment result.
[0142] This embodiment also provides a computer device applicable to the monitoring and management method of pharmaceutical inventory, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the monitoring and management method of pharmaceutical inventory as proposed in the above embodiment.
[0143] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or may be a button, a trackball, or a touchpad provided on the housing of the computer device, or may also be an external keyboard, a touchpad, or a mouse, etc.
[0144] This embodiment also provides a storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the method for monitoring and managing the pharmaceutical inventory as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (Static Random Access Memory, abbreviated as SRAM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), an erasable programmable read-only memory (Erasable Programmable Read Only Memory, abbreviated as EPROM), a programmable read-only memory (Programmable Red-Only Memory, abbreviated as PROM), a read-only memory (Read-Only Memory, abbreviated as ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk.
[0145] In summary, the present invention realizes the all-round real-time monitoring of the inventory status of pharmaceuticals by deploying multi-source sensors, effectively solving the problem of lagging risk identification caused by incomplete information collection in traditional systems; uses graph neural networks to fuse and analyze the extracted key feature information to generate a dynamic inventory status mapping diagram, providing accurate data support for subsequent inventory allocation; adopts an adaptive inventory allocation model driven by reinforcement learning, which can formulate an optimal scheduling strategy according to the actual inventory situation, maximizing market demand while reducing inventory waste; the distributed expiration date prediction model based on federated learning improves the accuracy and adaptability of expiration date prediction, and the dynamic risk coefficient evaluation system of digital twins ensures instant response and effective control of high-risk storage units, greatly enhancing the safety and efficiency of pharmaceutical inventory management as a whole.
[0146] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A method for monitoring and managing pharmaceutical inventory, characterized in that: include, Deploy multi-source sensors to monitor the status of drug inventory in real time and analyze and extract key features; Perform real-time fusion analysis on the extracted key features to generate a dynamic inventory status map; Based on the dynamic inventory status map, a reinforcement learning-driven adaptive inventory allocation model is constructed to obtain the optimal inventory allocation and scheduling strategy and update the inventory status. The following steps are included: Select the deep Q model as the reinforcement learning algorithm, define the state vector and action vector, and set the reward function; Collect historical sales data, market demand fluctuations, and upstream and downstream information of the supply chain, define simulation scenarios, run deep Q models, explore the environment, and perform actions; For each action execution result, the state vector, action vector, reward function and new state vector are recorded to form an experience tuple, and samples are regularly extracted from it for training; Based on the trained deep Q model, priority scores are given to the expiration date, storage environment parameters, and physical properties of the agent; For high-priority drugs, transfer instructions are generated and sent to the automated equipment to execute the transfer operation. For medium-priority drugs, inventory optimization operations are performed to adjust the storage location and optimize the storage environment. For low-priority drugs, routine inventory management is performed, with regular inspections and recording of inventory status. After the scheduling is completed, the inventory status is updated, a distributed prediction model for expiration dates based on federated learning is built, expiration date prediction results are generated, and cross-warehouse collaborative optimization is performed. The following steps are included: Deploy a long short-term memory network as a prediction model locally in each warehouse; The updated inventory status is used as the input feature and input into the prediction model for training. The trained LSTM model parameters are weighted averaged to form a global prediction model. The global prediction model parameters are sent to each warehouse to replace the local LSTM model parameters, and the updated global prediction model is used to predict the expiration date of each drug. When the global prediction model predicts that the expiration date of a medicine in a certain warehouse is approaching and the inventory is insufficient, a cross-warehouse collaborative optimization instruction is triggered; Filter candidate warehouses based on global inventory status; The candidate warehouses are ranked based on a dynamic priority scoring system, and the warehouse with the highest total score is selected as the target warehouse; When multiple candidate warehouses are tied for the highest score, the target warehouse will be selected for transfer based on the distance priority principle; Set the inventory safety threshold. When there is only one candidate warehouse and its inventory after transfer is lower than the safety threshold, the maximum transferable quantity is automatically calculated and a partial transfer instruction is generated. The instruction is sent to the automated equipment for execution, and the inventory status of the source warehouse and the target warehouse and the global forecast model are updated simultaneously. If the transfer fails, the supply chain collaborative response process is triggered to generate purchase requisitions and production scheduling instructions; Based on the failure period prediction results, a dynamic assessment system for the hazard factor of the digital twin is constructed to obtain the hazard factor assessment results.
2. The method for monitoring and managing drug inventory according to claim 1, characterized in that: Deploy multi-source sensors to monitor the status of drug inventory in real time, analyze it, and extract key features The following steps are included: Determine the location of sensor nodes based on warehouse layout and drug storage areas; The deployed sensors collect drug inventory, storage environment parameters, physical characteristics and expiration dates; De-noising, normalizing and time-stamping of drug inventory, storage environment parameters, physical properties and expiration dates; Obtaining quantity and location information of each medicine from the processed medicine inventory; Detection of color changes, odor concentration, and morphological changes in the physical properties of pharmaceuticals; Use RFID tag technology to automatically read the production date and batch number of each batch of medicine.
3. The method for monitoring and managing drug inventory according to claim 2, characterized in that: The real-time fusion analysis of the extracted key features to generate a dynamic inventory status map includes the following steps: Use graph neural networks to build association models to identify the relationship between the quantity of medicines, storage environment parameters, and physical properties of medicines; Define nodes as each drug and its related attributes, and edges represent potential relationships between different attributes; Build a graph structure based on defined nodes and edges; Select the GNN variant that processes heterogeneous graph data, take the constructed graph structure as input, and update the node embedding vector; Determine the location coordinates of each storage unit based on the actual layout of the warehouse; The updated embedding vector of each node is associated with its corresponding position coordinate to generate a dynamic inventory status map of each medicine.
4. The method for monitoring and managing drug inventory according to claim 3, characterized in that: Based on the failure period prediction results, a dynamic evaluation system for the risk factor of digital twins is constructed. The calculation of the risk factor of each storage unit includes the following steps: Select a digital twin platform, create a digital twin instance, and configure computing and storage resources; Use 3D modeling tools to build the physical layout of the warehouse including storage units, shelves, aisles, and equipment, and import the modeling results into the digital twin platform to generate a digital twin model of the virtual warehouse; Associating the inventory of medicines monitored in real time by multi-source sensors with the storage units in the digital twin model of the virtual warehouse, and updating the environmental parameters and physical properties of medicines in the digital twin model of the virtual warehouse in real time; Define the static and dynamic properties of the digital twin model, build simulation scenarios in the digital twin platform, set simulation parameters, and simulate risks under different conditions; Based on the simulation results, calculate the risk factor of each storage unit .
5. The method for monitoring and managing drug inventory according to claim 4, characterized in that: Based on the calculated risk factor of each storage unit, the risk level is divided, and the risk factor assessment result includes the following steps: According to the physical characteristics of the medicine and the storage environment parameters, set is a high risk threshold. is the warning threshold; when > When a high-risk storage unit is detected, it is marked as a high-risk state, a first-level response measure is generated, a No. 1 sound and light alarm is issued, the addition of reagents to the high-risk storage unit is automatically stopped, and the warehouse management personnel are notified to conduct manual inspection and processing; when < ≤ When the alarm is reached, it is marked as an alarm state, a secondary response measure is generated, a second sound and light alarm is sounded, the addition of medicine to the alarm storage unit is automatically stopped, and the inspection frequency of the storage unit is increased; when ≤ When the storage unit is in a safe state, it is marked as safe, the environmental parameters and drug status of the storage unit are continuously monitored, and the storage unit is inspected according to the standard inspection plan.
6. A monitoring and management system for drug inventory, based on the monitoring and management method for drug inventory according to any one of claims 1 to 5, characterized in that: include, The perception network module deploys multi-source sensors to monitor the status of drug inventory in real time and analyze and extract key features; The status mapping module performs real-time fusion analysis on the extracted key features and generates a dynamic inventory status map; The adaptive allocation module builds a reinforcement learning-driven adaptive inventory allocation model based on the dynamic inventory status map, obtains the optimal inventory allocation and scheduling strategy, and updates the inventory status; The expiration date prediction module builds a distributed expiration date prediction model based on federated learning according to the updated inventory status and expiration date status, generates expiration date prediction results, and performs collaborative optimization across warehouses. The hazard assessment module builds a dynamic hazard factor assessment system for the digital twin based on the failure period prediction results to obtain the hazard factor assessment results.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for monitoring and managing medicine inventory according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for monitoring and managing medicine inventory according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Intelligent medicine warehousing system based on digital twinning and management method
CN118469447A
Drug inventory dynamic optimization method based on deep learning
CN118710194A
Personalized federal learning-based drug purchase quantity prediction method
CN119541788A
Distributed computing resource smart evolution method and system based on digital twinning
CN119597493A