Western medicine intelligent inventory optimization and automatic replenishment decision-making method and system
By assessing the drug health index in real time and constructing a replenishment decision matrix, the problem of inaccurate replenishment strategies in traditional Western medicine inventory management is solved, realizing intelligent inventory optimization and automatic replenishment, and improving the response speed and security of inventory management.
Patent Information
- Application Number
- CN202511455737.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2025-12-26
AI Technical Summary
Traditional Western medicine inventory management lacks real-time quantification of inventory quality status, making it difficult to respond to changes in external information. This leads to inaccurate replenishment strategies, which can easily result in near-expiration stockpiles or shortages, failing to meet the needs of medication security and cost control in complex supply environments.
By collecting real-time drug inventory information and environmental data, assessing the drug health index, constructing a replenishment decision matrix, conducting automatic auditing and abnormal operation identification, and updating parameters in conjunction with external information, the system realizes inventory area division and replenishment trigger rules, generating intelligent inventory optimization decisions.
It has improved the real-time response speed of drug inventory, enhanced the rationality of configuration and the level of safety control, and provided a complete intelligent inventory management decision support system.
Smart Images

Figure CN121212975A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pharmaceutical inventory management technology, and more specifically, to a method and system for intelligent inventory optimization and automatic replenishment decision-making for Western medicines. Background Technology
[0002] Western medicine refers to drugs produced based on modern medical theories through methods such as chemical synthesis, natural extraction, or biotechnology. With the improvement of pharmaceutical logistics and supply chain levels, medical institutions and pharmaceutical companies have generally achieved digital management of information such as inventory status, inbound and outbound records, and procurement plans, providing a data foundation for inventory optimization and automatic replenishment.
[0003] However, in traditional pharmaceutical inventory management, replenishment strategies are mainly derived from inventory thresholds and historical demand, lacking real-time quantification of inventory quality status (such as shelf-life adequacy and availability degradation due to environmental deviations). Furthermore, it fails to translate external information (such as escalating epidemics, supplier on-time delivery rates, and daily market sales fluctuations) into actionable parameter updates. Therefore, even slight deviations in storage conditions or short-term market disturbances can easily cause replenishment plans to become disconnected from actual demand, potentially leading to premature replenishment resulting in near-expiration stockpiles or delayed replenishment causing shortages, thus creating medical risks. Moreover, traditional inventory management techniques struggle to capture real-time external information to dynamically optimize and adjust replenishment strategies. In the event of an epidemic, a rapid surge in the number of patients, and a corresponding increase in demand for related Western medicines, or unforeseen circumstances such as key suppliers being unable to provide timely medication, traditional inventory management techniques cannot accurately capture and respond to external shocks. This can easily lead to supply delays, insufficient supply, and increased frequency of emergency procurement, making it difficult to reliably meet the inventory management goals of ensuring medication availability and controlling costs.
[0004] In view of this, the present invention proposes a method and system for intelligent inventory optimization and automatic replenishment decision-making of Western medicine to solve the above problems. Summary of the Invention
[0005] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution:
[0006] S1. Collect drug inventory information, environmental data and historical inventory consumption data in real time, and comprehensively evaluate the inventory health of drugs based on the inventory information and environmental data to obtain the health index of each drug.
[0007] S2. Construct a replenishment decision matrix based on the health index of medicines and historical inventory consumption data;
[0008] S3. Perform automatic auditing and abnormal operation identification on inbound, outbound and transfer operations in inventory management to obtain operation audit results;
[0009] S4. Based on the drug health index classification and environmental storage requirements, allocate drugs to matching storage areas, calculate liquidity indicators and classify liquidity levels, and allocate locations within the matched storage areas according to the liquidity levels to obtain the storage area division results.
[0010] S5. Based on the inventory area division results, configure replenishment trigger rules for the divided inventory areas. If the replenishment trigger rules are met, a replenishment request is generated and fed back to the replenishment decision matrix. Based on the replenishment decision matrix after the feedback, an inventory management plan is obtained.
[0011] S6. Obtain external information and update the parameters of the replenishment decision matrix based on the feedback information to obtain the updated replenishment decision matrix; integrate the operation audit results, inventory area division results and inventory management plan into the updated replenishment decision matrix to obtain the target inventory optimization decision.
[0012] Furthermore, this invention provides a smart inventory optimization and automatic replenishment decision-making system for Western medicine:
[0013] The inventory health assessment module is used to collect real-time inventory information, environmental data, and historical inventory consumption data of medicines. It comprehensively assesses the inventory health of medicines based on the inventory information and environmental data, and obtains a health index for each medicine.
[0014] The replenishment decision module is used to construct a replenishment decision matrix based on the health index of medicines and historical inventory consumption data;
[0015] The operation audit module is used to automatically audit and identify abnormal operations in inventory management, including inbound, outbound and transfer operations, and to obtain operation audit results.
[0016] The region division module is used to allocate drugs to matching storage regions based on drug health index grading and environmental storage requirements, calculate liquidity indicators and classify liquidity levels, and allocate locations within the matched storage regions according to liquidity levels to obtain the storage region division results.
[0017] The strategy configuration module is used to configure replenishment trigger rules for the divided inventory areas based on the inventory area division results. If the replenishment trigger rules are met, a replenishment request is generated and fed back to the replenishment decision matrix. An inventory management plan is obtained based on the fed-back replenishment decision matrix.
[0018] The integration and analysis module is used to acquire external information and update the parameters of the replenishment decision matrix based on the feedback from the external information to obtain the updated replenishment decision matrix. The operation audit results, inventory area division results and inventory management plan are integrated into the updated replenishment decision matrix to obtain the target inventory optimization decision.
[0019] The technical effects and advantages of the intelligent inventory optimization and automatic replenishment decision-making method and system for Western medicine of this invention are as follows:
[0020] This invention quantifies the environmental adaptability, inventory quality score, and future consumption of pharmaceuticals by real-time collection of inventory information, environmental parameters, and historical inventory consumption data. It generates an inventory health index and, combined with predictive replenishment, produces a replenishment decision matrix reflecting replenishment timing, quantity, and priority. Furthermore, it introduces rule detection and event unit analysis mechanisms to address abnormal inbound / outbound operations and transfer behaviors, enabling automatic correction of replenishment strategies and dynamic early warning of operational risks. Based on the health level and liquidity indicators of pharmaceuticals, it divides inventory areas and constructs an inventory management scheme. By introducing external information and combining it with internal inventory data for joint analysis, it optimizes replenishment strategies, forming a real-time updated target inventory optimization decision. This achieves inventory data perception, pharmaceutical status modeling, and strategy linkage, improving the response speed, allocation rationality, and safety control level of pharmaceutical inventory. It provides a complete and reliable technical support for intelligent inventory management in complex pharmaceutical supply environments. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the intelligent inventory optimization and automatic replenishment decision-making method for Western medicines of the present invention;
[0022] Figure 2 This is a schematic diagram of the intelligent inventory optimization and automatic replenishment decision system for Western medicines of the present invention. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] Example 1
[0025] Please see Figure 1 As shown in this embodiment, a method for intelligent inventory optimization and automatic replenishment decision-making of Western medicine includes:
[0026] S1. Collect drug inventory information, environmental data and historical inventory consumption data in real time, and comprehensively evaluate the inventory health of drugs based on the inventory information and environmental data to obtain the health index of each drug.
[0027] The health index is an indicator used to quantify the current health status of drug inventory. Drug inventory information includes key details such as batch number, quantity received, production date, expiration date, pre-set replenishment cycle for each drug, and recommended environmental storage requirements. This information is obtained through system entry during drug receipt management. Environmental data includes environmental parameters (such as temperature, humidity, and light) during the drug's storage period, acquired in real-time through deployed sensors. If missing environmental data occurs during collection, the previous valid value can be used to fill in the gaps. Historical inventory consumption data records drug outbound records in time-series format, including the time, quantity, and frequency of each outbound transaction, as well as actual consumption and historical consumption rates in different seasons and time periods. This historical inventory consumption data provides a detailed and traceable record of drug consumption (e.g., total consumption of a drug is X boxes, with one batch consuming Y boxes and another batch consuming Z boxes), and is stored as a time-series document after data collection, facilitating subsequent retrieval and analysis of historical and real-time data.
[0028] The specific steps for assessing the inventory health of pharmaceuticals and obtaining a health index for each pharmaceutical product by combining inventory information and environmental data are as follows:
[0029] By combining the environmental data of the drug with the environmental storage requirements in the inventory information, an environmental adaptability score is calculated;
[0030] The environmental data for pharmaceuticals consists of real-time collected environmental data, including real-time temperature, humidity, and light intensity, which are then compiled into an environmental parameter set. At the same time, the recommended temperature, humidity, and other environmental factors for production and storage are recorded in the inventory information for all types of medicines, i.e., the environmental storage requirements for medicines. The real-time environmental data of the medicine is compared with the environmental storage requirements in the inventory information, and the standardized deviation of environmental parameters such as temperature, humidity, and light is calculated. The standardized deviation of each environmental parameter refers to the difference between each environmental parameter in the collected environmental parameter set and the environmental parameters in the environmental storage requirements. This difference is then used to calculate the percentage of the parameters that are suitable for the desired environment. Taking temperature as an example, the recommended temperature for the medicine can be set as follows: The current measured temperature is Then the standardized deviation of temperature Defined as Similarly, the standardized deviations of other environmental parameters such as humidity and light intensity are denoted as follows: and The standardized deviation of each environmental parameter obtained therefrom At the same time, a set of sensitivity weights is preset for each type of drug. These represent the drug's sensitivity to environmental parameters such as temperature, humidity, and light. The sensitivity weights are typically obtained by normalizing the sensitivity coefficients from the product information leaflet or a database, and satisfy the following conditions: Then the environmental adaptability score of the drug. The calculation formula is: ;in, The standardized deviation of each environmental parameter, Sensitivity weights for each environmental parameter. The scaling factor is set to prevent negative numbers; Score environmental adaptability and normalize it to The closer the value is to 1, the more suitable the current environment is for the storage of the drug. To avoid excessive deviation in the environmental adaptability score, the lower limit of the score can be fixed at 0 when the standardized deviation exceeds a set percentage (e.g., 15%), to prevent a single environmental malfunction from causing an excessively low score. The environmental adaptability score will be used as the first input variable for calculating the drug health index, characterizing the suitability of the current storage environment for the drug.
[0031] Based on the drug batch, inventory quantity, production date and expiration date in the inventory information, an inventory quality score is calculated.
[0032] Different batches of medicines exhibit quality variations in inventory due to differences in production dates and expiration dates. Failure to consider these variations weighted at the outset can lead to inventory imbalances, affecting the accuracy of replenishment decisions and expiration warnings. This paper addresses this by treating all batches of medicines in inventory as independent evaluation objects, and then weighting and integrating the expiration dates of each batch with its proportion in the total inventory to generate a quantitative indicator reflecting the overall quality of the inventory—the inventory quality score. This involves retrieving all batch numbers, production dates, expiration dates, and inventory quantities of the target medicine, and defining the batch number as... The validity period is (Unit: days), inventory level is Then batch weight This indicates its proportion in the total inventory, expressed as... Inventory scoring function based on expiration date. The inventory scoring function can be linear or piecewise. In this embodiment, a piecewise function is used as an example. The piecewise scoring rules are as follows: a batch score of 0.2 is given when the expiration date is less than 30 days, a batch score of 0.5 is given when the expiration date is between 30 and 90 days, and a batch score of 1 is given when the expiration date is greater than 90 days. The batch score is determined based on the requirements of the Good Supply Practice (GSP) for pharmaceutical products. When some batches of drugs lack expiration date information or have expired, the score for that batch is directly assigned to 0, and it is recorded as an abnormal batch.
[0033] The scores and batch weights of each batch of similar drugs obtained through the scoring rules. Multiply and sum to obtain the overall inventory quality score for the same type of drugs. and uniformly normalize the output to A value closer to 1 indicates that the inventory of this type of medicine is sufficient to meet daily inbound and outbound needs, requiring no additional replenishment. The inventory quality score will serve as the second input variable in calculating the medicine health index, reflecting whether the current inventory of this type of medicine is in a healthy state.
[0034] Based on historical inventory consumption data, time series analysis is used to predict the future consumption of medicines within their shelf life.
[0035] To assess whether the inventory of medicines can be reasonably consumed within its expiration date, the expected usage over a future period is estimated based on historical inventory consumption data, i.e., future consumption. The historical inventory consumption data records medicine outbound records; a daily outbound quantity sequence is constructed based on these records, denoted as . ,in This represents the outbound quantity on day i. Based on the outbound quantity and frequency of the medicines, resampling and data cleaning are performed to exclude data points that cannot be used as a reference for stable consumption, such as records during periods of zero inventory or large-scale one-time transfers, resulting in a preprocessed daily outbound quantity sequence. Based on this preprocessed daily outbound quantity sequence, time series analysis methods are introduced for fitting and prediction. Commonly used methods include, but are not limited to, weighted moving average, exponential smoothing (such as SES, Holt-Winters), or seasonal ARIMA algorithms, which can be selected according to the periodicity and stability of the medicine usage scenario.
[0036] Specifically, the shelf life of a drug batch can be set to T days, and the weighted average daily consumption R (unit: boxes / day) over the past M days can be calculated. The calculation method for R is as follows: ;in, Let be the quantity shipped out on day i. This represents the daily consumption weight for day i. The weight can be set based on the relevance of recent data; by default, the more recent the data, the higher the weight. The parameter for the statistical window length (e.g., 7 days, 14 days, 30 days, etc.) can be dynamically set according to the drug type. In application, The time window can be dynamically set based on changes in the historical consumption rate of a drug. For example, if the average consumption rate of a drug changes by more than 20% in a week compared to the previous week, a longer time window (such as 30 days) can be selected to smooth the flow; for drugs whose average consumption rate changes by less than 20% compared to the previous week, a shorter time window (such as 7 days) can be used to improve the response speed.
[0037] Based on the above weighted average daily consumption Without considering external influences, calculate the expiration date of this batch of drugs. The future consumption within the day can be expressed as ,in For future consumption, This is the weighted average daily consumption. Valid until expiration. This is determined by real-time inventory data. By comparing the ratios, a preliminary assessment can be made as to whether there is a risk of overstocking or shortage. For example, when Furthermore, a significant discrepancy indicates that the batch of medicines is nearing its expiration date but insufficient consumption, requiring early warning; when the predicted value is much higher than the inventory level, it indicates a risk of supply shortage in the short term. Future consumption It will be used as the third input variable in the subsequent health index calculation to determine whether the current inventory can be effectively digested within the validity period.
[0038] The health of a drug's inventory is assessed by combining environmental adaptability score, inventory quality score, and future consumption, resulting in a health index for each drug.
[0039] For various types of drugs, a health index is generated by multidimensionally fusing the environmental adaptability score, inventory quality score, and future consumption from the aforementioned steps to quantify the overall health level of the current drug inventory. In this embodiment, a multidimensional mapping function is constructed using nonlinear weighted combination or machine learning methods. ,in This represents the output health index. To facilitate consistent measurement across different types of drugs, the output needs to be normalized to a continuous range of 0–100. A higher value indicates a greater likelihood that the drug will maintain its efficacy and be consumed rationally under the current inventory conditions, signifying a healthier inventory status. Standardized ranges are set for the three input factors, and the health index is calculated by using a piecewise function to score each dimension. The formula for calculating the health index can be expressed as:
[0040] ;
[0041] in, For health index, Score the environmental adaptability. Rate the quality of inventory. For the expected future consumption, These are weighting coefficients used to adjust the relative importance of each factor. Weights can be obtained through statistical fitting or automatically optimized through training. During parameter training, the weights of different parameters can be set according to existing drug regulations, such as setting... It is 0.4. It is 0.3. The resulting health index is 0.3. This data will be used in subsequent key steps such as inventory tier management, regional division, and replenishment priority determination. To enhance dynamic adaptability, the health assessment method also supports adjusting the weight values of the three input parameters. For example, when environmental factors deviate from the expected range, the weights can be temporarily increased. Weighting is used to reflect priorities for storage safety; or to increase the weighting of drugs as they approach their expiration date or during periods of high-frequency use. The proportion, etc. Through multi-dimensional comprehensive evaluation, the storage status of medicines is assigned a continuous and quantitative health index evaluation label.
[0042] S2. Construct a replenishment decision matrix based on the health index of medicines and historical inventory consumption data;
[0043] The daily consumption of different medicines is calculated using the moving average method based on historical inventory consumption data, and the average consumption rate of each medicine is obtained.
[0044] Before making replenishment strategy decisions, it is necessary to calculate the average daily outbound volume within a certain time window, eliminating the impact of abnormal business days to restore normal outbound behavior. This step introduces the moving average method to smooth historical inventory consumption data, eliminating short-term fluctuations and obtaining an average consumption rate that better reflects actual demand. The average consumption rate is obtained based on historical inventory consumption data of pharmaceuticals. First, preliminary statistics are performed based on historical inventory consumption data to obtain the time series of consumption in each time period. Then, the time series is preprocessed to obtain preprocessed data. The preprocessing process includes: resampling the obtained raw data, including outbound quantity and outbound time, at a daily granularity, and removing abnormal data caused by special circumstances such as system maintenance, special holidays, or one-time transfers to avoid disturbing the subsequent modeling results.
[0045] Based on the preprocessed data, an appropriate sliding time window is selected, such as 7 days, 14 days, or 30 days, and the Simple Moving Average (SMA) method is used to calculate a continuously smooth inventory consumption curve. Assume the drug's past... The daily storage volume of the day was respectively Then, the total sliding movement value within the sliding time window can be expressed as: ;in, This represents the total sliding movement value within the sliding time window. The number of days up to that day. The sliding time window size represents the number of days used for smoothing. For the past Daily outbound volume. This method can effectively remove periodic random noise and improve the robustness of the forecasting phase.
[0046] To accommodate the varying consumption patterns of different drugs, the sliding window size can be automatically adjusted based on the increase or decrease in the historical consumption rate over a week, as shown in the historical inventory consumption data. For drugs with a historical consumption rate change exceeding 20% over a week, a longer window, such as 30 days, is used to enhance stability; for drugs with a change below 20%, a shorter window, such as 7 days, can be used to improve responsiveness. When dealing with seasonal drugs, a weighted moving average (WMA) or an exponentially weighted moving average (EWMA) can be overlaid on the moving average method to more sensitively respond to changes in the latest data points. The resulting sliding moving average value is then used... Divide by the set sliding time window The average consumption rate of each drug was obtained. This data is usually expressed in the form of the number of single items shipped out per unit time (e.g., daily consumption rate of 12 boxes / day), which can accurately reflect the current normal demand for medicines.
[0047] Based on the average consumption rate and health index of medicines, regression analysis is used to predict the future replenishment demand of medicines, and the demand forecast results are obtained.
[0048] This step, based on the composite relationship between the average consumption rate of medicines and the health index, uses regression analysis to output the cumulative demand over the future time interval. The prediction time window can be set to... The cumulative demand during that period will be calculated and output daily. The formula for calculating cumulative demand can be expressed as:
[0049] ;
[0050] in, To calculate the cumulative demand, For health index, This represents the average consumption rate. , , and These are the regression coefficients, obtained through training with historical data. (·) is the tangent function. As an interactive term, it can capture the non-linear modulation effect of the health index on the average consumption rate, enhancing the expressive power of regression analysis. When the health index is low, even if the historical average consumption rate is high, the regression analysis method will compress and adjust its consumption potential; when the drug has a high health index and future expected market demand growth, the forecast value can be appropriately increased to control inventory in advance. Cumulative demand. In subsequent steps, this will be combined with the replenishment decision matrix to determine the specific replenishment quantity, timing, and priority. This demand forecasting process effectively avoids the misjudgments of traditional replenishment based on static inventory thresholds, achieving dynamic, data-driven, and accurate demand generation.
[0051] By combining the average consumption rate of medicines, demand forecast results and health index, the timing, quantity and priority of medicine replenishment are predicted, and a replenishment decision matrix is constructed.
[0052] After completing the quantitative forecast of replenishment volume for a future period, it is necessary to further integrate and process various forecast variables to output replenishment timing, replenishment volume, and replenishment priority. This step comprehensively considers multiple indicators such as the average consumption rate of medicines, future replenishment volume, and health index to construct a replenishment decision matrix, thereby realizing intelligent decision generation for replenishment timing, replenishment volume, and replenishment priority.
[0053] The replenishment decision matrix to be constructed It includes three key output variables: replenishment timing. Replenishment quantity Replenishment priority These variables are influenced by multiple factors and exhibit a certain degree of coupling, making them difficult to accurately model using general rule-driven methods. Therefore, supervised learning can achieve the goal of multi-variable collaborative prediction. Algorithmically, random forests, gradient boosting trees, or deep neural networks can be chosen as the learning framework; no specific limitations are specified here. A training dataset is constructed, with data corresponding to the historical consumption and replenishment response records of a specific batch of medicines. Input features include the average consumption rate. Health Index Cumulative demand Current inventory Validity period The target output is the replenishment timing. Replenishment quantity Replenishment priority .
[0054] In practical applications, the first step is to clean and standardize the input data, removing missing or outlier values. The second step is to use cross-validation to tune the hyperparameters and determine the optimal combination. The third step is to use a loss function (such as mean squared error, MSE) to evaluate prediction accuracy and use feature importance analysis to select the most suitable variables and optimize their interpretability. The fourth step is to deploy the system as an online prediction architecture after the parameters have stabilized, supporting the generation of real-time replenishment strategies for any batch of drugs. After training, the input data for any target drug is processed and outputs three decision variables in real time: replenishment timing, replenishment quantity, and replenishment priority. Among these, replenishment timing... It is usually expressed as the optimal number of replenishment days from the current date, and can be used to schedule replenishment plans and replenishment quantities. Indicates the quantity of medicines replenished in a single transaction, and the replenishment priority. It is a relative scoring index used to rank the replenishment order among multiple drugs. A replenishment priority score is calculated for each drug, and then the drug is labeled accordingly based on the replenishment priority score. In this embodiment, it can be set to three priority labels: priority, normal, or low, which is determined by the replenishment priority score threshold range set simultaneously.
[0055] S3. Perform automatic auditing and abnormal operation identification on inbound, outbound and transfer operations in inventory management to obtain operation audit results;
[0056] A preset set of exception rules is used to identify abnormal inbound and outbound operations in inventory management and obtain abnormal inbound and outbound records.
[0057] To ensure the accuracy of inventory data and the compliance of inbound and outbound operations, this step introduces a rule-driven anomaly detection algorithm to analyze inbound and outbound operations in pharmaceutical inventory in real time. This identifies potential violations, errors, or high-risk behaviors, generating structured inbound and outbound anomaly records. During implementation, multiple sets of anomaly rules covering various common violation scenarios are established. These rule sets are derived by combining and improving historical statistics, pharmaceutical inventory management systems, and numerous existing risk cases. For example, commonly used anomaly rules may include: single outbound quantity exceeding the prescribed upper limit; abnormally high outbound frequency within a unit of time; continuous outbound of the same drug within a short period without corresponding replenishment in inventory; outbound operations occurring outside normal working hours; repeated outbound operations on the same batch of drugs; and mismatch between outbound drugs and inventory status (e.g., incorrectly discarded or expired inventory drugs).
[0058] When a new inbound / outbound operation occurs, it is automatically matched against a preset set of exception rules to determine if the operation triggers any exception rule. If a match is found, a corresponding inbound / outbound exception record is generated, recording the time of the exception, the exception type, the batch of drugs involved, and other relevant information. This step enables real-time capture and recording of abnormal inbound / outbound behaviors, generating corresponding exception records with identification information.
[0059] Real-time monitoring of inventory transfer operations; use event unit analysis technology to identify abnormal behaviors in inventory transfers and obtain transfer anomaly records.
[0060] Besides inbound and outbound operations, the transfer of pharmaceutical inventory between different storage areas also carries the risk of abuse, misuse, or misoperation. Since inventory transfer operations typically involve multiple stages and areas, simple rules alone are insufficient to comprehensively capture anomalies. Therefore, this step introduces event unit analysis technology to continuously model and monitor inventory transfer activities in real time, identifying potential transfer anomalies and recording their detailed processes.
[0061] Real-time monitoring of inventory transfer operations involves structured decomposition of these operations, representing each operation as an event unit with temporal, spatial, and behavioral attributes. Key fields within this event unit include transfer time, original inventory location, target inventory location, drug number and batch number, and transfer quantity. This structured representation allows for the breakdown of complex transfer processes into standardized event unit descriptions.
[0062] To identify abnormal transfers, this embodiment employs an event unit identification method combining state transition diagrams and transfer paths. First, inventory transfer operations are structurally decomposed, representing each operation as an event unit including transfer time, original inventory location, target inventory location, drug batch, and quantity. Second, a state transition diagram and transfer path for a legitimate transfer process are defined. For example, a standard transfer process includes multiple stages such as application, approval, execution, and confirmation of warehousing. For high-risk drugs requiring special storage conditions, including biological products (such as vaccines and blood products), temperature-sensitive drugs (storage temperature requirement of 2-8℃), and controlled drugs (anesthetics and psychotropic drugs), multi-level approval is required, and cross-regional transfers are restricted. For event matching and anomaly identification, event units are matched in real-time with the state transition diagram and transfer path to identify abnormal transfer operations such as high-frequency round-trip transfers, transfers with missing approvals, and transfers with abnormal paths. For example, a batch of drugs may be frequently transferred between two inventory areas within the same time period, or transferred across regions to a monitored inventory area without approval records. For the identified abnormal transfer operations, the frequency of abnormality, path deviation and number of historical repeated abnormalities are recorded, and a structured transfer abnormality item is generated, and a transfer abnormality record is generated.
[0063] During the event unit analysis process, a sliding time window mechanism can be used to dynamically analyze statistical indicators such as the frequency of allocation behavior, the change value of adjacent allocation quantities, and the degree of operation overlap within a certain time interval. At the same time, graph analysis techniques (such as edge weight calculation and node degree centrality) can be introduced to identify abnormal concentration points or repeated edges in the allocation path, thereby discovering whether medicines in certain areas are frequently allocated.
[0064] Based on the abnormal records of inbound and outbound goods and the abnormal records of transfer, assess the risk level of the abnormal operation and generate corresponding level labels, and output the operation audit results with level classification.
[0065] A unified database of abnormal events is established, categorizing and integrating identified inbound / outbound and transfer anomaly records according to time sequence, batch number, and drug type. Each abnormal event is treated as a risk unit, with core fields including event type, trigger rule number, involved drug batch, time of occurrence, operator, operating area, and quantity involved. A unified data structure aggregates different types of abnormal information.
[0066] A multi-dimensional feature matrix is constructed for all abnormal events, from which the following features are extracted: abnormality frequency (number of abnormalities in the same batch within one month), abnormality type distribution (abnormality severity level, set according to the Good Supply Practice (GSP) standard for pharmaceutical products), and historical behavior comparison (the degree of deviation of the current abnormality from the historical average). These features serve as inputs to drive the calculation of the risk scoring function. The risk scoring function can employ linear weighting or decision tree algorithms to synthesize the features and generate an audit risk score corresponding to each abnormal record. In this embodiment, risk scoring is used. The scores are then mapped to corresponding risk level labels.
[0067] In this embodiment, the risk level of operational anomalies can be divided into three levels: low risk, medium risk, and high risk. To classify anomalies, a first anomaly threshold and a second anomaly threshold are preset, with the second threshold set to be greater than the first. The risk level is then determined based on the audit risk score. If the audit risk score is less than the first abnormal threshold, it is defined as a low-risk level, indicating that the abnormality is occasional, the severity of the abnormality is small, and no risky behavior has been observed in the past. If the audit risk score is greater than the first abnormal threshold but less than the second abnormal threshold, it is defined as a medium-risk level, in which case the frequency of abnormality increases and there is a certain deviation between theoretical operation and actual operation. If the audit risk score is greater than the second abnormal threshold, it is defined as a high-risk level, in which case there are situations such as most operations not meeting expectations, repeated errors in the past, and violations related to highly sensitive drugs.
[0068] For each risk level, a detailed label is attached, clearly indicating the anomaly number obtained based on the frequency of the anomaly, the severity level of the anomaly, the degree of deviation of the anomaly from the historical average, and the recommended handling method. Finally, all risk scoring results and label content are uniformly written into the operation audit results table. The operation audit results table is summarized by drug batch and the anomaly events are displayed in a tiered manner according to risk level, thus forming an operation audit result with a graded classification, which becomes an important reference dimension for subsequent operations such as inventory area division and replenishment priority determination.
[0069] S4. Based on the drug health index classification and environmental storage requirements, allocate drugs to matching storage areas, calculate liquidity indicators and classify liquidity levels, and allocate locations within the matched storage areas according to the liquidity levels to obtain the storage area division results.
[0070] Based on the health index of the drugs, a clustering algorithm is used to classify the drugs into three health levels: high health level drugs, medium health level drugs, and low health level drugs.
[0071] Based on the health index of pharmaceuticals, an unsupervised clustering algorithm was used to classify the pharmaceutical health index dataset, dividing each pharmaceutical into different levels according to its overall status, thus constructing a health grading system. The health index used... For numerical continuous variables, a one-dimensional feature vector set is constructed using them as the sole input feature. Clustering is then performed on the samples. The K-means clustering algorithm is used, with a set number of clusters. These represent three categories: high health, medium health, and low health.
[0072] During the clustering process, the centroid position is iteratively optimized (including initial centroid selection, Euclidean distance calculation, and intra-cluster squared difference optimization). Finally, three stable cluster centers are obtained as centroids. The clustering classification is determined based on the Euclidean distance between the health index of each drug and the centroid, thereby marking all stocked drugs into three categories: high health, medium health, and low health, forming a clear hierarchical distribution.
[0073] Clustering algorithms support adaptive adjustments to classification boundaries based on historical inventory consumption data. For example, they can recalculate the position of cluster centroids based on periodically updated data, or use hierarchical clustering to recalibrate the categories of marginal drugs to ensure reasonable classification. The health grading system constructed through this step can effectively improve the ability to perceive the structure of inventory drugs, realize differentiated management layout based on differences in drug status, and provide clear boundary conditions for subsequent automatic decision-making through well-structured classification labels.
[0074] Based on the storage area, the drugs are allocated to matching storage areas according to their environmental storage requirements and health status, establishing a correspondence between drugs and storage areas;
[0075] Based on the environmental storage requirements in the inventory information, and using common temperature and humidity as core environmental parameters, a drug environmental requirement mapping table is constructed, listing the required environmental parameter ranges for each drug. Then, the health level label determined in the previous step is combined with the drug environmental requirement mapping table to form a binary attribute pair of drug environmental requirement + health level. This serves as a key basis for the regional allocation of medicines.
[0076] The entire storage area is divided into conditional capability zones. This involves calculating and quantifying the environmental control capabilities of each sub-zone based on the parameter control capabilities of existing environmental control equipment, actual compliance frequency, equipment response delay time, and historical equipment startup records. This establishes a correlation between environmental storage requirements and the area's environmental control capabilities. The inventory of pharmaceuticals is then allocated according to this correlation. The process of regional allocation of pharmaceuticals includes: pharmaceuticals with high health status, which are less sensitive to changes in environmental parameters and can tolerate slight environmental deviations, are prioritized for allocation to standard zones with relatively relaxed environmental conditions; pharmaceuticals with medium health status require a more stable environment and are matched to temperature-controlled zones with controllable temperature and humidity; pharmaceuticals with low health status or high environmental sensitivity must be placed in precisely controlled zones or special areas with isolation buffers.
[0077] To ensure sustainable control requirements after zoning, multiple environmental monitoring devices are deployed within each zone to periodically sample and record key indicators such as temperature and humidity. The distribution of these monitoring points is dynamically adjusted based on the zone area, ventilation conditions, and drug density to meet sampling accuracy and frequency requirements. Real-time monitoring data can be uploaded to the inventory database for subsequent dynamic correction of health indices or to trigger environmental anomaly alarm mechanisms. For example, if a zone is designated as a refrigerated precision control zone, its target temperature is... In this area, three temperature probes and two humidity sensors are installed, monitoring every 10 minutes. If two consecutive measurements exceed the threshold, it is recorded as a local deviation event. Such events not only affect the updating of the drug health index for that area but also adjust the area's environmental control capabilities, indicating whether temporary adjustments to the drug layout are necessary. Through area mapping and monitoring configuration, various drugs can obtain optimal storage locations at the physical level, while providing an environmental feedback loop for the health index. This allows the entire inventory environment to evolve from a static layout to a dynamic self-regulating mechanism, significantly improving the stability and precision of inventory management.
[0078] The liquidity index of the drug is calculated, and the drugs are divided into high-liquidity drugs and low-liquidity drugs in the matched inventory area according to a predetermined liquidity threshold, and the inventory area division results are obtained.
[0079] Utilizing previously collected historical inventory consumption data, this study focuses on two aspects: the quantity and frequency of drug outbound shipments, to provide quantitative indicators of drug liquidity. A time window parameter is introduced for each drug. (For example, 30 days), statistics on its performance in Cumulative number of outbound shipments within a day This measures the frequency of demand. Simultaneously, changes in outbound volume can be considered, and these factors can be combined using linear weighting or piecewise functions to form a liquidity indicator. The function can be a linear weighted function or a piecewise function. After constructing the liquidity index, each drug is prioritized based on its location. Liquidity level intervals are defined according to the ranking, with drugs ranking above 50% defined as high liquidity and those ranking equal to or below 50% defined as low liquidity. Then, considering the layout characteristics of the inventory areas (such as distance from entrances / exits, number of handling nodes, etc.), drugs of each liquidity level are matched to corresponding inventory areas to obtain the inventory area division results. High-liquidity drugs (such as emergency medications) are preferentially allocated to easily accessible areas close to the main inbound / outbound aisles or in front of the shelves; low-liquidity drugs (such as reserve antitoxin serum and long-term reserve chronic disease medications) are allocated to more remote inventory areas far from transportation routes, such as the rear storage area or high-level storage locations, thus achieving path optimization and resource allocation balance.
[0080] S5. Based on the inventory area division results, configure replenishment trigger rules for the divided inventory areas. If the replenishment trigger rules are met, a replenishment request is generated and fed back to the replenishment decision matrix. Based on the replenishment decision matrix after the feedback, an inventory management plan is obtained.
[0081] Based on the inventory health level and environmental data of different inventory areas, set management strategies for each inventory area, including data collection frequency, inventory counting frequency and inventory warning threshold;
[0082] After completing the division of inventory areas and drug distribution, to achieve differentiated and granular automated management and control in subsequent operations, corresponding regional management strategies need to be formulated based on the health level of drugs in each area and their corresponding environmental parameters. Priority is given to statistically analyzing the distribution of drug health levels within each inventory area. Combined with the stability indicators of environmental control conditions, key parameters, including data collection frequency, inventory counting frequency, and inventory warning thresholds, are defined for different level areas. The data collection frequency is set according to the health level of drugs within the area. For areas storing low-healthy drugs, high-frequency data collection is set, such as once every 5 minutes, to promptly capture environmental and inventory changes. For areas storing medium-healthy drugs, the data collection frequency is set to once every 10 minutes. For areas storing high-healthy drugs, the frequency can be appropriately reduced to once every 15 minutes. The inventory counting frequency is set according to the stability and perishability of drugs within the area. Areas storing low-healthy drugs are counted weekly; areas storing medium-healthy drugs are counted every two weeks; and areas storing high-healthy drugs are counted monthly. Automated inventory management can be achieved through RFID scanning, sensor counting, and other methods, with timely reporting and correction of anomalies. Inventory warning thresholds are set as upper and lower limits for inventory-related indicators in each region, including environmental parameter warning thresholds for factors such as temperature, humidity, and vibration amplitude, as well as inventory depletion and stockout warning thresholds. The corresponding environmental parameter warning thresholds are adjusted based on the deviation of the standardized environmental parameters obtained for the drugs within the region. For example, in areas sensitive to temperature changes, the upper and lower limits of the temperature environmental parameter warning threshold can be reduced, triggering an alarm whenever a real-time monitored environmental parameter exceeds the upper or lower limit of the environmental parameter warning threshold.
[0083] The health index is set to be lower than the preset health threshold, or the operation audit results show a high risk level, which is set as the replenishment trigger rule. When the replenishment trigger rule is met, a replenishment request is generated and fed back to the replenishment decision matrix to obtain the replenishment decision matrix after feedback.
[0084] Set health threshold The health threshold is configured differently based on the drug category, purpose, and inventory management strategy. Generally, higher health thresholds can be set for drugs with short shelf lives and rapid efficacy decline (e.g., ...). For drugs with high stability and low inspection frequency, the adjustment can be appropriately reduced (e.g., ...). ). Continuously monitor the health index of each batch of drugs, and once the current health index... satisfy If a drug's health risk is close to the lower limit of its usability, the system will initiate a judgment process. Simultaneously, the system will monitor the risk level labels in the operation audit results. If a drug has multiple abnormal records during allocation, warehousing, or other operations, and its cumulative risk level reaches the preset limit (e.g., a high-risk level label appears three or more times), then the batch of drugs will trigger a replenishment review mechanism. This mechanism is primarily used to avoid unexpected inventory shortages caused by operational abnormalities.
[0085] When any trigger condition is met, a replenishment request is immediately generated, including: the trigger reason (health level below the threshold or number of operational risk levels exceeding the set limit), the updated replenishment timing, replenishment quantity, and replenishment priority. The replenishment timing can be updated based on the current replenishment availability for that drug. Based on the decline in the health index, the ideal restocking time is calculated to be several days from now, and the restocking time for this medicine is reset accordingly. ;in The sensitivity factor is 5 by default, meaning that for every 5 points the health level drops, replenishment is brought forward by 1 day. Based on replenishment requests, existing replenishment opportunities are advanced to meet urgent replenishment tasks, resulting in updated replenishment opportunities. The replenishment quantity is calculated by combining the future cumulative demand for the drug with the current inventory level; when replenishment is triggered, the newly calculated replenishment quantity is applied. Insert the replenishment decision matrix, where This is the gap amplification factor (triggered when the health index falls below the health threshold). =1, when operational risk is triggered =1.2), indicating the updated replenishment quantity. The original replenishment quantity Plus Cumulative demand Subtract the current inventory level from the replenishment quantity. For example, if a batch of medicine is expected to require 2000 boxes in the next 7 days, and the current inventory is 1000 boxes, and the replenishment quantity is 1000 boxes, then the updated replenishment quantity will be adjusted to 2000 boxes or 2200 boxes depending on the reason for the replenishment request. If both occur, they will be added together to adjust to 3200 boxes to make up for the shortfall in the next week and leave a surplus. Replenishment Priority This reflects the relative priority order for replenishing various medicines when the quantity received is limited. The replenishment decision matrix comprehensively considers factors such as the risk level of the replenishment request, the urgency of the medicine, and historical replenishment response delays. For example, medicines with a health index close to the critical point and in a high-flow area have high risk and urgency, and will be given a high-priority label and ranked at the top of the replenishment scheduling; while medicines with a reasonable health index and stable consumption are marked as ordinary priority and can be processed during regular replenishment. Specifically, if the operation audit results show more than three high-risk instances, the medicine will be directly adjusted to the highest level; if less than three high-risk instances or if there is a gap between the health index and the health threshold, the medicine will be adjusted to the highest level. In case 20, the original replenishment priority will be adjusted up one level; otherwise, the previously obtained replenishment priority will continue.
[0086] After data updates, the updated replenishment timing, quantity, and priority are fed back into the replenishment decision matrix, thereby achieving predictive correction and iterative parameter updates, forming a closed-loop optimization path for the replenishment strategy. The feedback process uses a standardized data structure, including drug codes, replenishment priority labels (preferred, normal, low), and expiration date fields, ensuring that subsequent replenishment requests can be reasonably sorted and deduplicated. For example, if a batch of drugs experiences a health index drop from 80 to below 50 over three consecutive days of monitoring, and the audit anomaly results indicate two instances of misplacement and one abnormal inventory record, it will be identified as a dual risk trigger (health + operation). In this case, due to the dual trigger, two corrections will be performed simultaneously, resulting in the replenishment quantity, timing, and priority in the replenishment decision matrix after the first correction.
[0087] Based on the replenishment decision matrix after feedback, the inspection frequency and replenishment mode are configured for each inventory area, and the corresponding inventory management plan for each inventory area is generated.
[0088] Based on the replenishment quantity, timing, and priority of each drug in the first revised replenishment decision matrix, the required inspection frequency for its respective inventory area is automatically determined. Inspection frequency refers to the frequency of re-checking operations such as data collection, indicator recalculation, and alert updates for currently stocked drugs. The inspection frequency primarily depends on two indicators: the coefficient of variation of the drug health index and consumption stability. The coefficient of variation of the health index can be measured by the rate of decline in the health index over a period of time (e.g., comparing the absolute value of the difference between the health index at the beginning and end of the week). A larger difference indicates a faster deterioration in inventory status, requiring more frequent checks to determine if inventory counts should be increased. Consumption stability can be measured by calculating the standard deviation of the average consumption rate of drugs. Drugs with a large standard deviation indicate large daily variables in consumption statistics and future uncertainty, requiring shorter intervals between inventory counts to mitigate risk. Combining these two indicators, an inspection frequency is determined for each drug, ensuring timely replenishment of drugs in that area by increasing the frequency of inventory counts.
[0089] The replenishment model can be configured by combining drug type, replenishment conditions, inventory limits, and strategy settings. Various replenishment models can be configured, including fixed-quantity periodic replenishment, threshold-triggered replenishment, and prediction-driven dynamic replenishment. The replenishment model serves as a replenishment decision-making tool for the entire inventory area. When there are no emergency-related emergency drugs in the inventory, the pre-set replenishment model will be used. However, for inventory areas containing emergency drugs, to respond promptly to urgent medical situations, it is necessary to monitor the consumption of these drugs in real time. These drugs are usually concentrated in high-flow inventory areas, and replenishment must be completed promptly according to real-time replenishment priority and quantity, which is generally not suitable for periodic replenishment. Common replenishment models include: fixed-period fixed-quantity replenishment (a fixed quantity is replenished weekly), threshold-triggered replenishment (immediate replenishment when inventory falls below a certain percentage, such as 30%), and prediction-driven dynamic replenishment. The system can automatically match the most suitable replenishment model based on the trigger source (such as health trigger or anomaly trigger), drug inventory, and replenishment quantity information recorded in the replenishment decision matrix for each replenishment request. For example, for emergency medicines with irregular average consumption rates, an on-demand replenishment + real-time verification mechanism can be adopted to avoid excessive stockpiling; for chronic disease management medicines with high prediction accuracy and clear replenishment plans, a prediction-driven cycle replenishment model can be adopted to improve overall operational efficiency.
[0090] The system outputs inventory management plans for each inventory region based on inventory division, including the inspection frequency, replenishment mode, replenishment quantity, and replenishment priority for different inventory regions. For example, for a type of antibiotic with moderate consumption but rapidly declining health, its region will be assigned a medium-frequency + priority response configuration, using a threshold-driven replenishment mode, performing a status scan every three days, and triggering immediate action once the inventory falls below the predicted lower limit; while a type of slow-acting hypoglycemic drug with high health can be classified as a low-frequency + delayed response configuration, replenishing only when the monthly forecast value deviates significantly.
[0091] S6. Obtain external information and update the parameters of the replenishment decision matrix based on the feedback information to obtain the updated replenishment decision matrix; integrate the operation audit results, inventory area division results and inventory management plan into the updated replenishment decision matrix to obtain the target inventory optimization decision.
[0092] Obtain external information and combine it with preset probability scoring rules to predict the probability distribution of demand for each drug in the future time period;
[0093] This step utilizes external information as predictive variables to construct a probabilistic assessment of future drug demand, thereby endowing replenishment decisions with forward-looking and flexible response capabilities. By connecting to channels such as market demand interfaces, supplier logistics platforms, and sales forecasting platforms, it continuously acquires drug sales volume and the growth rate of infections for various infectious diseases, using this as the external information continuously acquired by the database. Since external information is collected daily, this embodiment uses external information other than that of the current day as historical external information. If there are data interruptions in the continuously acquired external information, the mean of the historical external information is used for filling. Information is extracted from both historical and real-time external information, including daily changes in drug market sales, average shortage duration, detection rate of infectious diseases, and on-time delivery rate of major suppliers. The extracted indicators are then characterized and normalized to form a consistent variable vector set.
[0094] The variable vector set is cleaned to obtain a cleaned variable vector set. Using this cleaned variable vector set as input, historical external information is used as the prior probability basis according to Bayes' theorem. This involves statistically analyzing the frequency of occurrence of different demand ranges (e.g., 50 boxes, 100 boxes, etc.) under the condition of a variable vector set corresponding to historical external information. It also includes calculating the cumulative demand over the projected future period. Variable vector set of external information under certain conditions The probability density distribution is kernel-density estimated or Gaussian smoothed to obtain the likelihood function under each possible demand interval condition. Kernel density estimation or Gaussian smoothing is used to reflect the characteristic distribution changes of external variables under different cumulative demand levels, providing support for posterior inference. By combining the likelihood function with prior probability and normalizing over all demand intervals, the posterior predicted demand distribution for each drug is obtained. , posterior predicted demand distribution As a probability distribution for demand forecasting, the Bayesian inference method can be conditionally independent Naive Bayes, adjusting the structure based on the correlation between different variables. The demand forecasting probability distribution can be continuous (e.g., providing a probability density function within a confidence level, where the confidence level is set according to the drug type: 95% for emergency drugs, 90% for standard drugs, and 85% for slow-moving drugs) or a discrete event probability. For example, it can output the probability of a drug being in short supply in the next 14 days as 0.78 and the probability of exceeding the historical maximum consumption in the next 30 days as 0.53, thus driving a risk warning mechanism. One possible implementation of the demand probability distribution function formula can be expressed as:
[0095] ;
[0096] in, This represents the cumulative demand over the projected future period. A set of variable vectors representing external information after data cleaning; A set of variable vectors after cleaning historical external information; The posterior prediction of demand distribution for cumulative drug demand; This is the likelihood function under the cumulative demand condition, used to characterize the distribution of external variables under different demand levels; This is the prior distribution function of cumulative demand under historical external information; Let be a normalization constant, so that the integral of the posterior probability distribution is 1.
[0097] This Bayesian inference method not only possesses dynamic update capabilities but also continuously refines the prediction boundary under sustained data input, enhancing its uncertainty management capabilities. For example, in the early stages of an influenza outbreak, the initial predicted demand rises to 60%. When a rapid increase in cases is detected in community hospitals or other medical institutions at various levels, the predicted probability can be adjusted upwards to over 90%, reflected as a priority replenishment level in the replenishment decision matrix. By transforming the variable vector set from external information into decision dimensions identifiable by the inference method, it is possible to combine internal inventory data with external information to output the probability distribution of drug demand, providing data support and a probabilistic foundation for subsequent inventory optimization.
[0098] By combining real-time acquired current inventory data with demand forecast probability distribution, the number of days of inventory available, replenishment risk index and inventory demand are calculated, and the inventory assessment result is obtained. The inventory management plan and inventory assessment result are used as internal inventory data.
[0099] After obtaining the probability distribution of external demand forecasts, it needs to be integrated and analyzed with the real-time drug inventory data to assess whether the current inventory status can support future demand. This step constructs a complete inventory assessment result through three key indicators: inventory availability days, replenishment risk index, and inventory demand. The current inventory level of each drug is extracted from the inventory management database. The inventory level, after batch consolidation, expiration date adjustment, and in-transit warehousing factor adjustment, yields the available inventory value. This is then combined with the expected consumption value output from the demand forecast distribution for this drug. The formula for calculating the number of days of inventory available can be expressed as: ;in, This refers to the number of days the inventory is available, i.e., the maximum time that the existing inventory can support. This represents the current inventory of the medicine. This represents the expected consumption value. The number of days of inventory availability visually reflects the correlation between current inventory and demand. If the number of days of inventory availability is less than the typical replenishment cycle for pharmaceuticals... Therefore, it is preliminarily determined that there is a risk of needing to replenish the drug.
[0100] Based on this, a replenishment risk index is constructed. The replenishment risk index is calculated by weighting multiple factors, such as linear combinations or sigmoid mappings, including predicted consumption variance, health index decline slope, frequency of environmental anomaly triggers, and risk scores from recent anomaly audit records. This data is obtained through statistical analysis of real-time current inventory data. From this data, the real-time health index of various medicines can be easily obtained. The health index decline slope is then calculated based on a time-series decline curve. The predicted consumption variance is obtained similarly. Other necessary data, such as the frequency of environmental anomaly triggers, is obtained directly from records. After synthesizing and normalizing the data, the range is obtained as follows: The replenishment risk index indicates a higher probability of future stockouts, necessitating a higher replenishment priority. For example, if a drug's health degradation rate has accelerated rapidly over the past three days, and its inventory has less than five days' worth of supplies remaining, while a surge in demand is predicted, then its corresponding replenishment risk index is... The value will be assessed as being in the high-risk range. Furthermore, the inventory demand will be calculated based on the confidence level set in the demand distribution (e.g., the maximum inventory demand at a 90% confidence level), deducting the current inventory level, and combining this with a safety stock strategy to output a reference value for replenishment demand. This value will serve as a crucial foundational data item when constructing replenishment requests. The calculation results will be uniformly packaged into inventory assessment results, including indicators such as the number of days available for each drug, risk index, and projected demand gap. A correlation identifier will be established to link with drug batches, health index, environmental history, and other data to ensure accurate positioning and conditional referencing when dynamically adjusting replenishment strategies.
[0101] The replenishment decision matrix is updated by dynamically adjusting the replenishment timing, replenishment quantity, and replenishment priority in the replenishment decision matrix based on external information and internal inventory data.
[0102] Using the inventory management plan and inventory assessment results as key inputs, and in conjunction with external information, the replenishment decision matrix is further optimized and adjusted in real time regarding replenishment timing, replenishment quantity, and replenishment priority. The inventory assessment results obtained from the previous stage include the number of days of inventory availability. Replenishment risk index Inventory demand Internal inventory data, used as the current point in time, together with replenishment trigger rules, early warning thresholds, and inventory counting frequency set in the inventory management plan, constitute the internal inventory dataset. Simultaneously, real-time acquired external information is characterized into a variable vector set, and a demand forecast probability distribution is generated through Bayesian inference. During data fusion, a weighted dynamic scoring mechanism is introduced, and multi-dimensional indicators from the variable vector set characterized by external information are used to further adjust replenishment timing, quantity, and priority. Small changes in daily drug market sales indicate stable drug usage; increases or decreases indicate an increase or decrease in the number of patients with the corresponding disease, affecting replenishment quantity. An increase in the number of patients also indicates increased future demand, requiring earlier replenishment. The average shortage duration and the detection rate of prevalent diseases have similar impacts on replenishment quantity and inventory priority. The on-time delivery rate of major suppliers indicates insufficient stock of a certain type of drug; in this case, to meet demand, the quantity of similar drugs will be increased to satisfy market demand.
[0103] First, based on the multi-dimensional indicators of external information, a weighted calculation is performed and normalized to a range of 0 to 1 to obtain the external influence factor. For replenishment timing, it can be set ;in This is the adjustment coefficient, with a default value of 0.1. When the value is greater than 0.2, it is set to 0.3. For replenishment quantities, updates are based on the Bayesian posterior distribution, according to... In the formula To update the replenishment quantity again, The replenishment quantity is the same as the quantity obtained from the first correction mentioned above. and This is the demand elasticity coefficient, which can be set according to whether it is for emergency medications or regular medications. The predetermined safety stock is used to ensure the quantity of emergency replenishment medicines in the inventory. For the dynamic setting of replenishment priority, the replenishment priority score is adjusted by comprehensively referring to factors such as health index and operational risk level. Then, the priority score is placed into the corresponding level classification, and replenishment priority labels are regenerated and output.
[0104] This dynamic decision-making process is not a one-time judgment, but rather a continuous evaluation through a rolling time window mechanism. This means that all indicators are recalculated daily within the drug inspection frequency period, ensuring that internal replenishment behavior paths are automatically adjusted even when the external environment changes. For example, if a batch of oral antipyretics was assessed as having normal replenishment priority and unchanged replenishment quantity 36 hours ago, but the related disease consultation rate increases within 12 hours, its replenishment priority is automatically adjusted to high, the replenishment quantity is increased by 30%, and a fast-track replenishment process is initiated. By accurately integrating changes in the external environment with the internal inventory status, the replenishment strategy is endowed with high adaptability and self-learning capabilities, making the replenishment decision matrix a key component of dynamically responsive and intelligently scheduled inventory decisions.
[0105] By integrating the operational audit results, inventory zoning results, and inventory management plan into the updated replenishment decision matrix, the target inventory optimization decision is obtained.
[0106] After dynamically adjusting replenishment timing, quantity, and priority, to ensure the controllability and rationality of replenishment operations, operational audit results, inventory zoning results, and inventory management plans are incorporated into the replenishment decision matrix revision process. Operational audit results provide information identifying abnormal behaviors in inventory management (e.g., incorrect inbound / outbound operations, operational delays, illegal transfers). This information reveals potential interference or process control risks in the execution of replenishment strategies. When generating the final target inventory optimization decision, the replenishment decision matrix is checked for conflicts or areas requiring coordination with the operational audit results. For example, if a certain type of drug has frequently experienced transfer errors or deviations in historical transfer operations, the replenishment decision matrix will strengthen the control of the replenishment process for that drug, requiring additional approval steps for replenishment or restricting its replenishment to reduce operational risks.
[0107] The inventory zoning results record the distribution of various drugs in the physical space of the warehouse, along with the health index and health index level labels of the drug areas. For example, drugs with high health and high mobility are stored in the main aisle area, where temperature and humidity requirements are relatively relaxed but outbound efficiency is high, while drugs with low health are confined to the edge isolation area with strict environmental control. In this embodiment, the labels on the inventory areas are used as one of the boundary conditions for optimizing the replenishment decision matrix. This verifies whether each replenishment plan in the replenishment decision matrix matches the actual inventory storage layout, avoiding inconsistencies between the inventory management plan and the layout. For example, if the replenishment decision matrix generates an immediate replenishment order for a drug and places it at the front end of a high-frequency outbound aisle, but the drug is classified as a low-health drug requiring precise temperature control based on the zoning, then this strategy will be adjusted to replenish the drug in the cold chain precision control area with stricter environmental control, along with additional temperature monitoring requirements. Furthermore, some inspection frequencies and warning thresholds defined in the inventory management plan are also recorded in the replenishment decision matrix as necessary condition checks when performing replenishment, ensuring that the replenishment operation does not violate the inventory management plan for that area.
[0108] After multiple rounds of correction and integration of internal inventory data and external information, all parameters in the original replenishment decision matrix have been optimized and updated. At this point, the decision entries for all confirmed drugs are compiled and output, forming a structured target inventory optimization decision. Each record in the target inventory optimization decision includes fields such as drug identifier, inventory region, replenishment timing, replenishment quantity, and replenishment priority, along with the source of the decision (e.g., indicated by factors such as decreased health, increased inventory demand, or operational risks). This source identification improves the interpretability and traceability of the decision. For example, one record might be: Drug X (batch M), current replenishment priority: priority, recommended replenishment before a specific date, replenishment quantity: K boxes, with a note explaining the reason for its high replenishment priority (e.g., a surge in external demand and low inventory health). When the replenishment decisions for all inventory drugs are summarized, this decision table will cover the current inventory status assessment, replenishment mode, and replenishment priority of all drugs, serving as the final output of the intelligent inventory management solution.
[0109] This invention quantifies the environmental adaptability, inventory quality score, and future consumption of pharmaceuticals by real-time collection of inventory information, environmental parameters, and historical inventory consumption data. It generates an inventory health index and, combined with predictive replenishment, produces a replenishment decision matrix reflecting replenishment timing, quantity, and priority. Furthermore, it introduces rule detection and event unit analysis mechanisms to address abnormal inbound / outbound operations and transfer behaviors, enabling automatic correction of replenishment strategies and dynamic early warning of operational risks. Based on the health level and liquidity indicators of pharmaceuticals, it divides inventory areas and constructs an inventory management scheme. By introducing external information and combining it with internal inventory data for joint analysis, it optimizes replenishment strategies, forming a real-time updated target inventory optimization decision. This achieves inventory data perception, pharmaceutical status modeling, and strategy linkage, improving the response speed, allocation rationality, and safety control level of pharmaceutical inventory. It provides a complete and reliable technical support for intelligent inventory management in complex pharmaceutical supply environments.
[0110] Example 2
[0111] Please see Figure 2 As shown, parts not described in detail in this embodiment are described in Embodiment 1. A smart inventory optimization and automatic replenishment decision-making system for Western medicine is provided, including:
[0112] The inventory health assessment module is used to collect real-time inventory information, environmental data, and historical inventory consumption data of medicines. It comprehensively assesses the inventory health of medicines based on the inventory information and environmental data, and obtains a health index for each medicine.
[0113] The replenishment decision module is used to construct a replenishment decision matrix based on the health index of medicines and historical inventory consumption data;
[0114] The operation audit module is used to automatically audit and identify abnormal operations in inventory management, including inbound, outbound and transfer operations, and to obtain operation audit results.
[0115] The region division module is used to allocate drugs to matching storage regions based on drug health index grading and environmental storage requirements, calculate liquidity indicators and classify liquidity levels, and allocate locations within the matched storage regions according to liquidity levels to obtain the storage region division results.
[0116] The strategy configuration module is used to configure replenishment trigger rules for the divided inventory areas based on the inventory area division results. If the replenishment trigger rules are met, a replenishment request is generated and fed back to the replenishment decision matrix. An inventory management plan is obtained based on the fed-back replenishment decision matrix.
[0117] The integration and analysis module is used to acquire external information and update the parameters of the replenishment decision matrix based on the feedback, resulting in an updated replenishment decision matrix. The operation audit results, inventory area division results, and inventory management plan are integrated into the updated replenishment decision matrix to obtain the target inventory optimization decision.
[0118] The modules are connected via wired and / or wireless means to enable data transmission between them.
[0119] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0120] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0121] In the description of this invention, it should be understood that the terms "first," "second," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0122] In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0123] In the description of this invention, "several" means one or more, and "a large number" means two or more.
[0124] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0125] All formulas in this manual are dimensionless and calculated numerically. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.
[0126] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A western medicine intelligent inventory optimization and automatic replenishment decision method, characterized in that, The method comprises the following steps: S1, real-time collection of inventory information, environmental data and historical inventory consumption data of the medicine, comprehensive evaluation of the inventory health degree of the medicine based on the inventory information and the environmental data, and obtaining of the health degree index of each medicine; S2, construction of a replenishment decision matrix based on the health degree index of the medicine and the historical inventory consumption data; S3, automatic auditing and abnormal operation identification of the in-out and allocation operations in the inventory management, and obtaining of the operation auditing result; S4, distribution of the medicine to a matched inventory area based on the health degree index grading and the environmental storage requirement of the medicine, calculation of the liquidity index and division of the liquidity level, and position distribution in the matched inventory area according to the liquidity level, and obtaining of the inventory area division result; S5, configuration of a replenishment triggering rule for the divided inventory area according to the inventory area division result, generation of a replenishment request and feedback to the replenishment decision matrix if the replenishment triggering rule is met, and obtaining of the inventory management scheme based on the feedback replenishment decision matrix; S6, acquisition of external information, parameter updating of the feedback replenishment decision matrix in combination with the external information, obtaining of the updated replenishment decision matrix, and integration of the operation auditing result, the inventory area division result and the inventory management scheme into the updated replenishment decision matrix to obtain the target inventory optimization decision.
2. The method according to claim 1, wherein, The calculation method of the health degree index comprises: combination of the environmental data of the medicine with the environmental storage requirement in the inventory information to obtain an environmental adaptability score; calculation of an inventory quality score based on the medicine batch, the inventory quantity, the production date and the validity period in the inventory information; prediction of the future consumption of the medicine within the shelf life by using time series analysis based on the historical inventory consumption data; comprehensive evaluation of the inventory health degree of the medicine based on the environmental adaptability score, the inventory quality score and the future consumption to obtain the health degree index of each medicine.
3. The method of claim 1, wherein the method further comprises: The construction method of the replenishment decision matrix comprises: calculation of the daily consumption of different medicines by using the moving average method based on the historical inventory consumption data to obtain the average consumption rate of each medicine; prediction of the future replenishment demand of the medicine by using the regression analysis method based on the average consumption rate and the health degree index of the medicine to obtain the demand prediction result; prediction of the replenishment time, the replenishment quantity and the replenishment priority of the medicine based on the average consumption rate, the demand prediction result and the health degree index of the medicine, and construction of the replenishment decision matrix.
4. The method of claim 1, wherein the method further comprises: The acquisition method of the operation auditing result comprises: presetting an abnormal rule set, identifying the abnormal in-out operation in the inventory management based on the preset abnormal rule set to obtain in-out abnormal records; real-time monitoring of the inventory allocation operation, identifying the abnormal behavior in the inventory allocation to obtain allocation abnormal records; evaluation of the risk level of the operation abnormality and generation of the corresponding level label based on the in-out abnormal records and the allocation abnormal records, and output of the operation auditing result with the level classification.
5. The method of claim 4, wherein the method further comprises: The identification of the abnormal allocation behavior comprises: The inventory allocation operation is structured and decomposed, each allocation operation is represented as an event unit including allocation time, original inventory location, target inventory location, drug batch and quantity; the state transition diagram and allocation path of the legal allocation process are defined, the event unit is matched with the state transition diagram and state transition path in real time, and the abnormal allocation operation of state loss, process loss or path abnormality in the allocation process is identified; for the identified abnormal allocation operation, the abnormal frequency, path deviation and historical repeated abnormal number are recorded, the structured allocation abnormal item is generated, and the allocation abnormal record is generated.
6. The method of claim 1, wherein the method further comprises: The inventory area division result is obtained, including: According to the health index of the medicine, the clustering algorithm is used to divide the medicine into three health levels of high health medicine, medium health medicine and low health medicine; According to the environmental storage requirements and health level of the medicine, the medicine is distributed to the matched inventory area to establish the corresponding relationship between the medicine and the inventory area; The liquidity index of the medicine is calculated, and the medicine is divided into high liquidity medicine and low liquidity medicine in the matched inventory area according to the predetermined liquidity threshold, and the inventory area division result is obtained.
7. The method of claim 1, wherein the method further comprises: determining a number of times a drug is dispensed from the smart inventory; and updating the smart inventory based on the number of times the drug is dispensed from the smart inventory. The acquisition method of the inventory management scheme includes: The health index lower than the preset health threshold or the high risk level in the operation audit result is set as the replenishment trigger rule, the replenishment request is generated when the replenishment trigger rule is met, and the replenishment request is fed back to the replenishment decision matrix to obtain the feedback replenishment decision matrix, the replenishment request includes the updated replenishment time, replenishment quantity and replenishment priority; based on the feedback replenishment decision matrix and the inventory area division result, the regional management strategy is configured for each inventory area to obtain the inventory management scheme of each inventory area, the inventory management scheme of each inventory area includes data acquisition frequency, inspection frequency, inventory warning threshold and replenishment mode.
8. The method of claim 1, wherein the method further comprises: determining a number of times a drug is dispensed from the smart inventory; and updating the smart inventory based on the number of times the drug is dispensed from the smart inventory. The acquisition method of the target inventory optimization decision includes: acquiring external information, and combining the preset probability scoring rule to predict the demand probability distribution of each medicine in the future time period; The current inventory data obtained in real time is combined with the demand prediction probability distribution to calculate the inventory available days, replenishment risk index and inventory demand quantity, obtain the inventory evaluation result, and take the inventory management scheme and the inventory evaluation result as internal inventory data; Based on the external information and the internal inventory data, the replenishment time, replenishment quantity and replenishment priority in the feedback replenishment decision matrix are dynamically adjusted to obtain the updated replenishment decision matrix; The operation audit result, inventory area division result and inventory management scheme are integrated into the updated replenishment decision matrix to obtain the target inventory optimization decision.
9. The method according to claim 8, wherein, The calculation method of the demand prediction probability distribution of the medicine includes: The external information except for the current day is taken as historical external information; the historical external information and the real-time acquired external information are subjected to information extraction to obtain external indexes; the external indexes include a daily drug market sales change amount, an average out-of-stock duration, a popular disease detection rate, and a main supplier delivery on-time rate; the extracted indexes are subjected to feature processing to obtain a variable vector set; the variable vector set is subjected to data cleaning to obtain a cleaned variable vector set; the cleaned variable vector set is taken as an input, the historical external information is taken as a prior probability basis based on a Bayesian formula, and the real-time acquired external information is combined to perform posterior inference to calculate future demands of each drug, to obtain a posterior predictive demand distribution of each drug in a future preset period; and the posterior predictive demand distribution is taken as a demand prediction probability distribution of the corresponding drug.
10. A western medicine intelligent inventory optimization and automatic replenishment decision system, characterized in that, A western medicine intelligent inventory optimization and automatic replenishment decision-making method for realizing any one of claims 1-9, comprising: An inventory health assessment module for real-time acquisition of drug inventory information, environmental data, and historical inventory consumption data, comprehensive inventory information and environmental data to assess the inventory health of the drug, and to obtain a health index of each drug; A replenishment decision-making module for constructing a replenishment decision-making matrix based on the health index of the drug and the historical inventory consumption data; An operation audit module for automatic auditing and abnormal operation identification of the in-out and allocation operations in inventory management, to obtain operation audit results; A region division module for allocating the drug to a matched inventory region based on the drug health index classification and environmental storage requirements, calculating a liquidity index and dividing a liquidity level, and allocating positions in the matched inventory region according to the liquidity level to obtain inventory region division results; A strategy configuration module for configuring a replenishment trigger rule for the divided inventory region according to the inventory region division results, generating a replenishment request and feeding back to the replenishment decision-making matrix if the replenishment trigger rule is met, and obtaining an inventory management scheme based on the feedback replenishment decision-making matrix; An integrated analysis module for acquiring external information, updating parameters of the feedback replenishment decision-making matrix in combination with the external information, obtaining an updated replenishment decision-making matrix, and integrating the operation audit results, the inventory region division results, and the inventory management scheme to the updated replenishment decision-making matrix to obtain a target inventory optimization decision.
Citation Information
Cited By
Needle receiving and supplementing management system based on artificial intelligence multi-authority grading
CN121481187A
Prescription information intelligent management platform for hospital pharmacy
CN121662321A