A dynamic optimization method for drug inventory based on deep learning

Through deep learning technology, combining multi-source data and reinforcement learning, a drug inventory prediction model is established, which solves the problems of low inventory management accuracy and high cost in the existing technology, achieves more accurate inventory prediction and dynamic optimization, and reduces inventory costs .

CN118710194BActive Publication Date: 2025-01-07TIANJIN MINXIANG PHARM COLTLTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411199667.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2025-01-07
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

The existing drug inventory management system relies on internal sales data and ignores supply chain data and external environment data, resulting in limited accuracy of prediction models, unable to fully capture the time series characteristics of inventory changes and process unstructured data, resulting in prediction accuracy. Low and unable to dynamically adjust the inventory level, it is easy to cause inventory surplus or shortage, and there is a lack of effective mechanisms to optimize inventory management and replenishment strategies, resulting in high inventory costs.

Method used

Using a deep learning-based dynamic optimization method for drug inventory, we use recurrent neural networks and convolutional neural networks to establish inventory prediction models by collecting multi-source data, including drug sales records, supply chain data and external environment data, and dynamically adjusting them in combination with reinforcement learning technology. Inventory level, optimize replenishment strategy.

Benefits of technology

It improves the accuracy of inventory forecasting, enhances the robustness and generalization capabilities of the prediction model, and can dynamically adjust inventory based on various factors, reduces waste of excessive inventory, and reduces inventory costs.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The present invention relates to the field of information processing technology, and in particular to a method for dynamic optimization of drug inventory based on deep learning, comprising the following steps: step S1: collecting drug sales record data, drug supply chain data and external environment data; step S2: cleaning and standardizing the collected drug sales record data, drug supply chain data and external environment data; step S3: establishing an inventory forecasting model based on the cleaned and standardized drug sales record data, drug supply chain data and external environment data; step S4: using a recurrent neural network to capture the time series characteristics of inventory changes in the inventory forecasting model, and combining a convolutional neural network to analyze unstructured data. The present invention can more accurately reflect various factors affecting drug inventory changes through the collection of multi-source data, including drug sales record data, drug supply chain data and external environment data, thereby improving the accuracy of inventory forecasting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a drug inventory dynamic optimization method based on deep learning. Background Art

[0002] At present, drug sales forecasting and inventory management can estimate the cumulative sales volume of drugs in the future and store a certain amount of drugs to meet market demand, ensuring the stability of drug supply.

[0003] Current drug inventory management methods involve a variety of technologies and strategies aimed at ensuring the effective supply and reasonable storage of drugs. Common drug inventory management methods include: Inventory management system: The system is usually based on manual or semi-automated processes, relying on manual recording and tracking of drug in and out of the warehouse, and using spreadsheets or simple inventory software to manage inventory. Automatic replenishment system: By setting a minimum inventory level, when the inventory drops to this level, the system automatically triggers the reordering process to ensure that the drug is not out of stock. Integrated information system: Hospitals or pharmacies may use integrated information systems (such as hospital information systems or pharmacy management systems) to automate inventory management processes and realize information management of the entire process of drug procurement to sales.

[0004] However, existing drug inventory management systems often rely only on internal sales data, while ignoring the collection and integration of supply chain data and external environmental data, which limits the accuracy of the forecasting model. Traditional forecasting models (such as methods based on simple statistics) cannot fully capture the time series characteristics of inventory changes and process unstructured data, resulting in low forecasting accuracy. In addition, existing inventory management methods cannot dynamically adjust inventory levels according to market changes and external environmental factors, which can easily lead to excess or shortages of inventory. At the same time, there is a lack of effective mechanisms to optimize inventory management and replenishment strategies, resulting in high inventory costs.

[0005] Therefore, a deep learning-based dynamic optimization method for drug inventory is needed to solve the above problems. Summary of the invention

[0006] The present invention provides a method for dynamic optimization of drug inventory based on deep learning. The present invention promotes data interconnection and resource sharing through the collaboration and optimization mechanism between edge devices, and the intelligent allocation and scheduling of edge computing tasks based on deep reinforcement learning, and realizes the efficient integration and unified management of drug information.

[0007] The technical solution adopted by the present invention to solve the above technical problems is: a dynamic optimization method for drug inventory based on deep learning, comprising the following steps:

[0008] Step S1: Collect drug sales record data, drug supply chain data and external environment data;

[0009] Step S2: Cleaning and standardizing the collected drug sales record data, drug supply chain data, and external environment data;

[0010] Step S3: establishing an inventory forecasting model based on the cleaned and standardized drug sales record data, drug supply chain data, and external environment data;

[0011] Step S4: using a recurrent neural network to capture the time series characteristics of inventory changes in the inventory forecasting model, and combining a convolutional neural network to analyze unstructured data, the unstructured data including drug image data and text report data;

[0012] Step S5: Dynamically optimize the drug inventory according to the inventory forecasting model.

[0013] Furthermore, collecting drug sales record data in step S1 includes:

[0014] Step S1-1: extracting historical sales data from the drug management system, including the sales date, sales quantity, and sales price information of each drug;

[0015] Step S1-2: Collect electronic order data from the online sales platform, including order date, drug type, quantity, and price information.

[0016] Furthermore, collecting drug supply chain data in step S1 includes:

[0017] Step S1-3: Connect with the supplier's information system to obtain drug purchase records, including purchase date, drug type, quantity, price, and expected delivery date information;

[0018] Step S1-4: extracting inventory data from the warehouse management system, including the entry date, entry quantity, exit date, exit quantity and current inventory information of each drug;

[0019] Step S1-5: Collect drug expiration date data, including the production date, expiration date, and expired drug disposal record information of each drug.

[0020] Furthermore, collecting external environment data in step S1 includes:

[0021] Step S1-6: Obtain historical and predicted weather data from the meteorological service platform, including temperature, humidity, and precipitation information;

[0022] Step S1-7: Collect disease outbreak data through public health departments, including disease name, outbreak time, and number of people affected.

[0023] Furthermore, the step S2 of cleaning and standardizing the collected drug sales record data, drug supply chain data and external environment data includes:

[0024] Step S2-1: Remove duplicate records;

[0025] Step S2-2: Correcting erroneous data including spelling errors and inconsistent formats;

[0026] Step S2-3: handle missing values ​​by interpolating or deleting records containing missing values;

[0027] Step S2-4: Verify data consistency;

[0028] Step S2-5: normalize the numerical data;

[0029] Step S2-6: Encoding the categorical data;

[0030] Step S2-7: Unify the date and time formats to ensure that all timestamps use a consistent format;

[0031] Step S2-8: Preprocess the text data, including word segmentation, stop word removal and stem extraction.

[0032] Furthermore, the external environment data in step S2 includes weather forecast data and disease outbreak data.

[0033] Furthermore, in step S3, establishing an inventory forecasting model based on the cleaned and standardized drug sales record data, drug supply chain data, and external environment data includes:

[0034] Step S3-1: feature engineering;

[0035] Step S3-1-1: extract seasonal factors and determine the seasonal pattern of drug demand by combining and analyzing historical sales data;

[0036] Step S3-1-2: Identify disease outbreak trends, extract the date, location, and scale of disease outbreaks through public health reports and news reports, and convert them into quantitative indicators;

[0037] Step S3-1-3: Analyze weather conditions, integrate weather service API, obtain past and forecasted weather data, and extract temperature, humidity, and precipitation weather parameters;

[0038] Step S3-2: model construction;

[0039] Step S3-2-1: Use a recurrent neural network or a long short-term memory network to capture the time series characteristics of inventory changes;

[0040] Step S3-2-2: Analyze unstructured data using convolutional neural network;

[0041] Step S3-2-3: Build a model using a deep learning framework and train the model using historical data;

[0042] Step S3-3: model training and verification;

[0043] Step S3-3-1: Divide the data set into a training set, a validation set, and a test set;

[0044] Step S3-3-2: define a loss function;

[0045] Step S3-3-3: Select the optimizer and set the learning rate to 0.001;

[0046] Step S3-3-4: Use the 5-fold cross validation method to validate the model;

[0047] Step S3-3-5: Adjust the model architecture and hyperparameters based on the model’s performance on the validation set.

[0048] Furthermore, in step S3-3-4, the model is validated using a 5-fold cross validation method, including:

[0049] Step S3-3-4-1: randomly divide the cleaned and standardized data set into 5 equal parts, i.e. 5 folds;

[0050] Step S3-3-4-2: For each fold, use it as a validation set, and combine the remaining 4 folds as a training set;

[0051] Step S3-3-4-3: train the model using the training set data;

[0052] Step S3-3-4-4: Use the validation set data to evaluate the performance of the model and record the loss value of the model on the validation set;

[0053] Step S3-3-4-5: Repeat steps S3-3-4-2 to S3-3-4-4, making sure that each fold is used as a validation set once;

[0054] Step S3-3-4-6: Calculate the average loss value of the five validation results and use it as the overall validation performance indicator of the model.

[0055] Furthermore, in step S4, a recurrent neural network is used to capture the time series characteristics of inventory changes in the inventory forecasting model, and a convolutional neural network is combined to analyze unstructured data, where the unstructured data includes drug image data and text report data including:

[0056] Step S4-1: construct a recurrent neural network model;

[0057] Step S4-1-1: Select a recurrent neural network as the basic architecture of the model;

[0058] Step S4-1-2: define the input layer of the recurrent neural model to receive time series data, including historical drug inventory and sales data;

[0059] Step S4-1-3: Design the hidden layer and use RNN units to capture long-term dependencies in time series data;

[0060] Step S4-1-4: define the output layer to predict the future drug inventory or demand;

[0061] Step S4-2: Analyze unstructured data using a convolutional neural network model;

[0062] Step S4-2-1: Selecting a convolutional neural network model for processing unstructured data, including drug image data and text report data;

[0063] Step S4-2-2: Design an input layer to receive image or text data;

[0064] Step S4-2-3: Construct convolutional layers and pooling layers to extract features from image or text data;

[0065] Step S4-2-4: Add a fully connected layer to convert the extracted features into a representation vector that can be used for prediction;

[0066] Step S4-3: Combine the outputs of the recurrent neural network model and the convolutional neural network model using a fully connected layer;

[0067] Step S4-4: Define the final output layer for generating inventory forecast results.

[0068] Furthermore, the step S5 of dynamically optimizing the drug inventory according to the inventory forecasting model includes:

[0069] Step S5-1: define the state space;

[0070] Step S5-1-1: define state variables, including current drug inventory levels, order demand, forecasted demand, market prices, and seasonal factors, weather factors, and disease outbreak factors;

[0071] Step S5-1-2: Map the state variables to numerical vector representations, ensuring that each state variable is converted into numerical form;

[0072] Step S5-2: define the action space;

[0073] Step S5-2-1: define action variables, including replenishment quantity, promotion discount, and promotion duration;

[0074] Step S5-2-2: Determine the scope of the action space, including the minimum and maximum values ​​of the replenishment quantity and the range of the promotion discount;

[0075] Step S5-3: designing a reward function;

[0076] Step S5-3-1: define the objectives of the reward function, including profit maximization, out-of-stock rate minimization and inventory cost minimization;

[0077] Step S5-3-2: quantify the components of the reward function and calculate the reward value based on the drug sales volume, inventory level, and cost;

[0078] Step S5-4: construct a reinforcement learning model;

[0079] Step S5-4-1: Select a reinforcement learning algorithm;

[0080] Step S5-4-2: define the model architecture, including input layer, hidden layer and output layer;

[0081] Step S5-4-3: Initialize model parameters;

[0082] Step S5-4-4: configure hyperparameters for model training;

[0083] Step S5-5: training a reinforcement learning model;

[0084] Step S5-5-1: Initialize the model using historical data;

[0085] Step S5-5-2: Regularly evaluate the performance of the model and adjust the model parameters according to the evaluation results;

[0086] Step S5-6: Dynamic adjustment and strategy optimization;

[0087] Step S5-6-1: Dynamically adjust model predictions and strategies based on real-time data;

[0088] Step S5-6-2: Regularly evaluate the performance of the model and adjust the model parameters based on the evaluation results.

[0089] The advantages of the present invention are: 1. The present invention can more accurately reflect the various factors affecting drug inventory changes through the collection of multi-source data, including drug sales record data, drug supply chain data and external environment data, thereby improving the accuracy of inventory forecasting.

[0090] 2. The present invention combines recurrent neural networks (RNNs) and convolutional neural networks (CNNs), which can not only capture long-term dependencies in time series data, but also effectively analyze unstructured data such as images and text reports, thereby enhancing the robustness and generalization ability of the prediction model.

[0091] 3. The present invention utilizes reinforcement learning technology to dynamically adjust inventory levels according to the prediction model, and can realize intelligent management of drug inventory while considering multiple factors, thereby reducing waste caused by excess inventory and reducing inventory costs by optimizing inventory management and replenishment strategies. DETAILED DESCRIPTION

[0092] The technical solution of the present invention is described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0093] Embodiment 1: The present invention provides a method for dynamic optimization of drug inventory based on deep learning, comprising the following steps:

[0094] Step S1: Collect drug sales record data, drug supply chain data and external environment data;

[0095] Furthermore, collecting drug sales record data in step S1 includes:

[0096] Step S1-1: extracting historical sales data from the drug management system, including the sales date, sales quantity, and sales price information of each drug;

[0097] Step S1-2: Collect electronic order data from the online sales platform, including order date, drug type, quantity, and price information.

[0098] The step S1 of collecting drug supply chain data includes:

[0099] Step S1-3: Connect with the supplier's information system to obtain drug purchase records, including purchase date, drug type, quantity, price, and expected delivery date information;

[0100] Step S1-4: extracting inventory data from the warehouse management system, including the entry date, entry quantity, exit date, exit quantity and current inventory information of each drug;

[0101] Step S1-5: Collect drug expiration date data, including the production date, expiration date, and expired drug disposal record information of each drug.

[0102] The collecting of external environment data in step S1 includes:

[0103] Step S1-6: Obtain historical and predicted weather data from the meteorological service platform, including temperature, humidity, and precipitation information;

[0104] Step S1-7: Collect disease outbreak data through public health departments, including disease name, outbreak time, and number of people affected.

[0105] Step S2: Cleaning and standardizing the collected drug sales record data, drug supply chain data, and external environment data;

[0106] The external environment data in step S2 includes weather forecast data and disease outbreak data. The collected drug sales record data, drug supply chain data and external environment data are cleaned and standardized, including:

[0107] Step S2-1: Remove duplicate records to ensure the uniqueness of each data entry;

[0108] Step S2-2: Correcting erroneous data including spelling errors and inconsistent formats;

[0109] Step S2-3: Process missing values ​​by interpolating or deleting records containing missing values ​​to ensure data integrity;

[0110] Step S2-4: Verify data consistency to ensure that there is no logical conflict between data;

[0111] Step S2-5: normalize the numerical data to ensure that data of different dimensions are on the same scale;

[0112] Step S2-6: Encoding the categorical data, including One-Hot Encoding or Label Encoding;

[0113] Step S2-7: Unify the date and time formats to ensure that all timestamps use a consistent format;

[0114] Step S2-8: Preprocess the text data, including word segmentation, stop word removal and stem extraction.

[0115] Step S3: Establishing an inventory forecasting model based on the cleaned and standardized drug sales record data, drug supply chain data and external environment data, specifically including:

[0116] Step S3-1: feature engineering;

[0117] Step S3-1-1: extract seasonal factors and determine the seasonal pattern of drug demand by combining and analyzing historical sales data;

[0118] Step S3-1-2: Identify disease outbreak trends, extract the date, location, and scale of disease outbreaks through public health reports and news reports, and convert them into quantitative indicators (such as the number of new cases);

[0119] Step S3-1-3: Analyze weather conditions, integrate weather service API, obtain past and forecasted weather data, and extract temperature, humidity, and precipitation weather parameters.

[0120] Step S3-2: model construction;

[0121] Step S3-2-1: Use a recurrent neural network or a long short-term memory network to capture the time series characteristics of inventory changes;

[0122] Step S3-2-2: Analyze unstructured data (such as images, text reports) in conjunction with convolutional neural networks;

[0123] Step S3-2-3: Build a model using a deep learning framework such as TensorFlow or PyTorch and train the model with historical data.

[0124] Step S3-3: model training and verification;

[0125] Step S3-3-1: Divide the data set into a training set, a validation set, and a test set;

[0126] Step S3-3-2: define a loss function, such as mean square error (MSE);

[0127] Step S3-3-3: Select an optimizer (such as Adam) and set the learning rate to 0.001;

[0128] Step S3-3-4: Use the 5-fold cross validation method to validate the model, specifically including:

[0129] Step S3-3-4-1: randomly divide the cleaned and standardized data set into 5 equal parts, i.e. 5 folds;

[0130] Step S3-3-4-2: For each fold, use it as a validation set, and combine the remaining 4 folds as a training set;

[0131] Step S3-3-4-3: train the model using the training set data;

[0132] Step S3-3-4-4: Use the validation set data to evaluate the performance of the model and record the loss value of the model on the validation set;

[0133] Step S3-3-4-5: Repeat steps S3-3-4-2 to S3-3-4-4, making sure that each fold is used as a validation set once;

[0134] Step S3-3-4-6: Calculate the average loss value of the five validation results and use it as the overall validation performance indicator of the model.

[0135] Step S3-3-5: Adjust the model architecture and hyperparameters based on the model’s performance on the validation set.

[0136] Step S4: Use a recurrent neural network to capture the time series characteristics of inventory changes in the inventory forecasting model, and combine it with a convolutional neural network to analyze unstructured data, specifically including:

[0137] Step S4-1: construct a recurrent neural network model;

[0138] Step S4-1-1: Select a recurrent neural network as the basic architecture of the model;

[0139] Step S4-1-2: define the input layer of the recurrent neural model to receive time series data, including historical drug inventory and sales data;

[0140] Step S4-1-3: Design the hidden layer and use RNN units to capture long-term dependencies in time series data;

[0141] Step S4-1-4: Define the output layer to predict future drug inventory or demand.

[0142] Step S4-2: Analyze unstructured data using a convolutional neural network model;

[0143] Step S4-2-1: Select a convolutional neural network model to process unstructured data, including drug image data and text report data; specifically, the drug image data includes:

[0144] Barcode / QR code scanning: By scanning the barcode or QR code on the drug packaging, you can quickly obtain basic information about the drug, such as batch number, production date, and expiration date. Batches of drugs in stock can be tracked based on the barcode or QR code, helping to ensure that the drug does not expire and become ineffective.

[0145] Drug appearance inspection: Through drug image analysis, drugs can be automatically identified and classified, such as distinguishing different batches of the same drug, or detecting whether there are signs of physical damage or deterioration. Once physically damaged or deteriorated drugs are detected, they can be quickly removed from inventory to avoid ineffective occupation of space.

[0146] The text report data includes:

[0147] Doctors’ prescriptions: Analyzing the prescriptions written by doctors can help predict the demand for certain drugs. For example, if a certain drug is frequently prescribed to patients, its demand will increase.

[0148] Patient feedback: Patients’ medication experience and feedback can reveal the effectiveness or side effects of a drug, thus influencing its future demand.

[0149] Step S4-2-2: Design an input layer to receive image or text data;

[0150] Step S4-2-3: Construct convolutional layers and pooling layers to extract features from image or text data;

[0151] Step S4-2-4: Add a fully connected layer to convert the extracted features into a representation vector that can be used for prediction.

[0152] Step S4-3: Combine the outputs of the recurrent neural network model and the convolutional neural network model using a fully connected layer.

[0153] Step S4-4: Define the final output layer for generating inventory forecast results.

[0154] Step S5: Dynamically optimize the drug inventory according to the inventory forecasting model, specifically including:

[0155] Step S5-1: define the state space;

[0156] Step S5-1-1: define state variables, including current drug inventory levels, order demand, forecasted demand, market prices, and seasonal factors, weather factors, and disease outbreak factors;

[0157] Step S5-1-2: Map the state variables to numerical vector representations, ensuring that each state variable is converted into numerical form for easy processing by the reinforcement learning algorithm.

[0158] Step S5-2: define the action space;

[0159] Step S5-2-1: define action variables, including replenishment quantity, promotion discount, and promotion duration;

[0160] Step S5-2-2: Determine the scope of the action space, including the minimum and maximum values ​​of the replenishment quantity and the range of the promotion discount;

[0161] Step S5-3: designing a reward function;

[0162] Step S5-3-1: define the objectives of the reward function, including profit maximization, out-of-stock rate minimization and inventory cost minimization;

[0163] Step S5-3-2: Quantify the components of the reward function and calculate the reward value based on drug sales volume, inventory level, and cost.

[0164] Step S5-4: construct a reinforcement learning model;

[0165] Step S5-4-1: Select a reinforcement learning algorithm (the present invention adopts a deep Q network learning algorithm);

[0166] Step S5-4-2: define the model architecture, including input layer, hidden layer and output layer;

[0167] Step S5-4-3: Initialize model parameters, such as weights and bias terms;

[0168] Step S5-4-4: Configure hyperparameters for model training.

[0169] Step S5-5: training a reinforcement learning model;

[0170] Step S5-5-1: Initialize the model using historical data;

[0171] Step S5-5-2: Regularly evaluate the performance of the model and adjust the model parameters according to the evaluation results;

[0172] Step S5-6: Dynamic adjustment and strategy optimization;

[0173] Step S5-6-1: Dynamically adjust model predictions and strategies based on real-time data;

[0174] Step S5-6-2: Regularly evaluate the performance of the model and adjust the model parameters based on the evaluation results.

[0175] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A drug inventory dynamic optimization method based on deep learning, characterized in that: The following steps are involved: Step S1: collecting drug sales record data, drug supply chain data and external environment data, the external environment data including weather forecast data and disease outbreak data; Step S2: Cleaning and standardizing the collected drug sales record data, drug supply chain data, and external environment data; Step S3: establishing an inventory forecasting model based on the cleaned and standardized drug sales record data, drug supply chain data, and external environment data; Step S4: using a recurrent neural network to capture the time series characteristics of inventory changes in the inventory forecasting model, and combining a convolutional neural network to analyze unstructured data, the unstructured data including drug image data and text report data; Step S5: dynamically optimizing the drug inventory according to the inventory forecasting model; The step S3 comprises: Step S3-1: feature engineering; Step S3-2: model construction; Step S3-3: model training and verification; The step S3-1 comprises: Step S3-1-1: extract seasonal factors and determine the seasonal pattern of drug demand by combining and analyzing historical sales data; Step S3-1-2: Identify disease outbreak trends, extract the date, location, and scale of disease outbreaks through public health reports and news reports, and convert them into quantitative indicators; Step S3-1-3: Analyze weather conditions, integrate weather service API, obtain past and forecasted weather data, and extract temperature, humidity, and precipitation weather parameters; The step S3-2 comprises: Step S3-2-1: Use a recurrent neural network or a long short-term memory network to capture the time series characteristics of inventory changes; Step S3-2-2: Analyze unstructured data using convolutional neural networks, where the unstructured data includes images and text reports; Step S3-2-3: Build a model using a deep learning framework and train the model using historical data; The step S4 comprises: Step S4-1: construct a recurrent neural network model; Step S4-2: Analyze unstructured data using a convolutional neural network model; Step S4-3: Combine the outputs of the recurrent neural network model and the convolutional neural network model using a fully connected layer; Step S4-4: define the final output layer for generating inventory forecast results; The step S4-1 comprises: Step S4-1-1: Select a recurrent neural network as the basic architecture of the model; Step S4-1-2: define the input layer of the recurrent neural model to receive time series data, including historical drug inventory and sales data; Step S4-1-3: Design the hidden layer and use RNN units to capture long-term dependencies in time series data; Step S4-1-4: define the output layer to predict the future drug inventory or demand; The step S4-2 comprises: Step S4-2-1: Select a convolutional neural network model to process unstructured data, including drug image data and text report data; specifically, the drug image data includes drug appearance inspection: through drug image analysis, automatically identify and classify drugs, distinguish different batches of the same drug, and detect whether there are signs of physical damage or deterioration; the text report data includes doctor prescriptions and patient feedback; Step S4-2-2: Design an input layer to receive image or text data; Step S4-2-3: Construct convolutional layers and pooling layers to extract features from image or text data; Step S4-2-4: Add a fully connected layer to convert the extracted features into a representation vector that can be used for prediction; The step S5 comprises: Step S5-1: define the state space; Step S5-2: define the action space; Step S5-3: designing a reward function; Step S5-4: construct a reinforcement learning model; Step S5-5: training a reinforcement learning model; The step S5-1 comprises: Step S5-1-1: define state variables, including current drug inventory levels, order demand, forecasted demand, market prices, and seasonal factors, weather factors, and disease outbreak factors; The step S5-2 comprises: Step S5-2-1: define action variables, including replenishment quantity, promotion discount, and promotion duration; The step S5-3 comprises: Step S5-3-1: Define the objectives of the reward function, including profit maximization, out-of-stock rate minimization and inventory cost minimization.

2. The method for dynamic optimization of drug inventory based on deep learning according to claim 1, characterized in that: The step S1 of collecting drug sales record data includes: Step S1-1: extracting historical sales data from the drug management system, including the sales date, sales quantity, and sales price information of each drug; Step S1-2: Collect electronic order data from the online sales platform, including order date, drug type, quantity, and price information.

3. The method for dynamic optimization of drug inventory based on deep learning according to claim 1, characterized in that: The step S1 of collecting drug supply chain data includes: Step S1-3: Connect with the supplier's information system to obtain drug purchase records, including purchase date, drug type, quantity, price, and expected delivery date information; Step S1-4: extracting inventory data from the warehouse management system, including the entry date, entry quantity, exit date, exit quantity and current inventory information of each drug; Step S1-5: Collect drug expiration date data, including the production date, expiration date, and expired drug disposal record information of each drug.

4. The method for dynamic optimization of drug inventory based on deep learning according to claim 1, characterized in that: The collecting of external environment data in step S1 includes: Step S1-6: Obtain historical and predicted weather data from the meteorological service platform, including temperature, humidity, and precipitation information; Step S1-7: Collect disease outbreak data through public health departments, including disease name, outbreak time, and number of people affected.

5. The method for dynamic optimization of drug inventory based on deep learning according to claim 1, characterized in that: The step S2 includes cleaning and standardizing the collected drug sales record data, drug supply chain data and external environment data: Step S2-1: Remove duplicate records; Step S2-2: Correcting erroneous data including spelling errors and inconsistent formats; Step S2-3: handle missing values ​​by interpolating or deleting records containing missing values; Step S2-4: Verify data consistency; Step S2-5: normalize the numerical data; Step S2-6: Encoding the categorical data; Step S2-7: Unify the date and time formats to ensure that all timestamps use a consistent format; Step S2-8: Preprocess the text data, including word segmentation, stop word removal and stem extraction.

6. A method for dynamic optimization of drug inventory based on deep learning according to claim 5, characterized in that: The external environment data in step S2 includes weather forecast data and disease outbreak data.

7. The method for dynamic optimization of drug inventory based on deep learning according to claim 1, characterized in that: The step S3 includes establishing an inventory forecasting model based on the cleaned and standardized drug sales record data, drug supply chain data and external environment data: Step S3-1: feature engineering; Step S3-1-1: extract seasonal factors and determine the seasonal pattern of drug demand by combining and analyzing historical sales data; Step S3-1-2: Identify disease outbreak trends, extract the date, location, and scale of disease outbreaks through public health reports and news reports, and convert them into quantitative indicators; Step S3-1-3: Analyze weather conditions, integrate weather service API, obtain past and forecasted weather data, and extract temperature, humidity, and precipitation weather parameters; Step S3-2: model construction; Step S3-2-1: Use a recurrent neural network or a long short-term memory network to capture the time series characteristics of inventory changes; Step S3-2-2: Analyze unstructured data using convolutional neural network; Step S3-2-3: Build a model using a deep learning framework and train the model using historical data; Step S3-3: model training and verification; Step S3-3-1: Divide the data set into a training set, a validation set, and a test set; Step S3-3-2: define a loss function; Step S3-3-3: Select the optimizer and set the learning rate to 0.001; Step S3-3-4: Use the 5-fold cross validation method to validate the model; Step S3-3-5: Adjust the model architecture and hyperparameters based on the model’s performance on the validation set.

8. The method for dynamic optimization of drug inventory based on deep learning according to claim 7, characterized in that: The step S3-3-4 uses a 5-fold cross validation method to validate the model, including: Step S3-3-4-1: randomly divide the cleaned and standardized data set into 5 equal parts, i.e. 5 folds; Step S3-3-4-2: For each fold, use it as a validation set, and combine the remaining 4 folds as a training set; Step S3-3-4-3: train the model using the training set data; Step S3-3-4-4: Use the validation set data to evaluate the performance of the model and record the loss value of the model on the validation set; Step S3-3-4-5: Repeat steps S3-3-4-2 to S3-3-4-4, making sure that each fold is used as a validation set once; Step S3-3-4-6: Calculate the average loss value of the five validation results and use it as the overall validation performance indicator of the model.

9. The method for dynamic optimization of drug inventory based on deep learning according to claim 1, characterized in that: In step S4, a recurrent neural network is used to capture the time series characteristics of inventory changes in the inventory forecasting model, and a convolutional neural network is combined to analyze unstructured data. The unstructured data includes drug image data and text report data including: Step S4-1: construct a recurrent neural network model; Step S4-1-1: Select a recurrent neural network as the basic architecture of the model; Step S4-1-2: define the input layer of the recurrent neural model to receive time series data, including historical drug inventory and sales data; Step S4-1-3: Design the hidden layer and use RNN units to capture long-term dependencies in time series data; Step S4-1-4: define the output layer to predict the future drug inventory or demand; Step S4-2: Analyze unstructured data using a convolutional neural network model; Step S4-2-1: Selecting a convolutional neural network model for processing unstructured data, including drug image data and text report data; Step S4-2-2: Design an input layer to receive image or text data; Step S4-2-3: Construct convolutional layers and pooling layers to extract features from image or text data; Step S4-2-4: Add a fully connected layer to convert the extracted features into a representation vector that can be used for prediction; Step S4-3: Combine the outputs of the recurrent neural network model and the convolutional neural network model using a fully connected layer; Step S4-4: Define the final output layer for generating inventory forecast results.

10. The method for dynamic optimization of drug inventory based on deep learning according to claim 1, characterized in that: The step S5 of dynamically optimizing the drug inventory according to the inventory forecasting model includes: Step S5-1: define the state space; Step S5-1-1: define state variables, including current drug inventory levels, order demand, forecasted demand, market prices, and seasonal factors, weather factors, and disease outbreak factors; Step S5-1-2: Map the state variables to numerical vector representations, ensuring that each state variable is converted into numerical form; Step S5-2: define the action space; Step S5-2-1: define action variables, including replenishment quantity, promotion discount, and promotion duration; Step S5-2-2: Determine the scope of the action space, including the minimum and maximum values ​​of the replenishment quantity and the range of the promotion discount; Step S5-3: designing a reward function; Step S5-3-1: define the objectives of the reward function, including profit maximization, out-of-stock rate minimization and inventory cost minimization; Step S5-3-2: quantify the components of the reward function and calculate the reward value based on the drug sales volume, inventory level, and cost; Step S5-4: construct a reinforcement learning model; Step S5-4-1: Select a reinforcement learning algorithm; Step S5-4-2: define the model architecture, including input layer, hidden layer and output layer; Step S5-4-3: Initialize model parameters; Step S5-4-4: configure hyperparameters for model training; Step S5-5: training a reinforcement learning model; Step S5-5-1: Initialize the model using historical data; Step S5-5-2: Regularly evaluate the performance of the model and adjust the model parameters according to the evaluation results; Step S5-6: Dynamic adjustment and strategy optimization; Step S5-6-1: Dynamically adjust model predictions and strategies based on real-time data; Step S5-6-2: Regularly evaluate the performance of the model and adjust the model parameters based on the evaluation results.

Citation Information

Patent Citations

  • Hospital medicine purchase plan prediction method and system based on LSTM

    CN113888090A

  • Live broadcast industry intelligent inventory management system

    CN118134380A