A drug sales trend analysis and prediction system based on big data

By monitoring the retention time of the logistics nodes of the drug supply chain and batch inventory turnover rate, dynamically identify the interruption type and establish an alternative demand migration model. Combining the spatiotemporal communication parameters and consumer behavior analysis, the real-time response problem of the existing drug supply chain prediction model when logistics stagnates or inventory shortage is solved, and accurate prediction of drug sales trends and optimization of inventory strategies are achieved.

CN120450765BActive Publication Date: 2025-09-02JILIN MUFENG PHARMACEUTICAL CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510950383.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-09-02
Estimated Expiration
2045-07-10

AI Technical Summary

Technical Problem

Existing pharmaceutical supply chain prediction models cannot effectively distinguish between real demand fluctuations and data distortion caused by supply chain constraints, resulting in inventory strategies failure or resource mismatch, and cannot respond in real time when logistics stagnates or inventory shortages.

Method used

By monitoring the retention time and batch inventory turnover rate of the logistics nodes in the drug supply chain, dynamically identify the interrupt type, establish an alternative demand migration model, and combine space-time communication parameters and consumer behavior analysis to generate accurate drug sales trend forecast results.

Benefits of technology

Real-time capture of dynamic changes in the supply chain is achieved, real-time and reliability of inventory strategies are improved, and real-time matching of real demand and compensation supply is accurately matched, and the supply and demand balance efficiency and resource utilization of effective-term sensitive drugs are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120450765B_ABST
    Figure CN120450765B_ABST
Patent Text Reader

Abstract

The present invention discloses a drug sales trend analysis and forecasting system based on big data, which specifically relates to the technical field of drug supply chain management and demand forecasting. The system is used to solve the problem of data distortion caused by the inability of existing forecasting models to distinguish between real demand fluctuations and supply chain constraints in supply chain disruption scenarios; by real-time collection of logistics node detention time and batch inventory turnover rate, the supply chain disruption type is dynamically identified and an alternative demand migration model is established; the logistics detention time and inventory turnover rate change rate are combined to generate space-time propagation parameters; the dynamic time distortion distance of consumers' explicit behavior trajectories and implicit behavior trajectories and the chaotic attractor fractal dimension offset are synchronously analyzed to generate trajectory deviation parameters; finally, the migration amount distribution, space-time propagation parameters and trajectory deviation parameters are integrated to generate sales trend forecast results including supply chain disruption compensation; thus, accurate mapping of supply chain dynamics and market demand is achieved, thereby improving the efficiency of drug supply and demand matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pharmaceutical supply chain management and demand forecasting, and more specifically, to a pharmaceutical sales trend analysis and forecasting system based on big data. Background Art

[0002] In the field of pharmaceutical sales forecasting, existing technologies typically construct forecasting models based on historical sales data, market activity information, and seasonal factors to achieve trend analysis of pharmaceutical demand and inventory management. These methods integrate multi-source data (such as sales records and price fluctuations) and apply statistical models or machine learning algorithms to provide forecast results with a certain degree of accuracy under normal market conditions. However, the pharmaceutical supply chain involves multiple links such as raw material procurement, production batches, and logistics and transportation. The dynamic changes in these links have a significant impact on the real-time and reliability of sales data.

[0003] Existing technologies have limitations in their ability to respond to the real-time status of the pharmaceutical supply chain and sudden disruptions. That is, when anomalies occur in the supply chain (such as logistics stagnation and inventory shortages), traditional forecasting models cannot effectively distinguish between real demand fluctuations and data distortion caused by supply chain constraints, causing the forecast results to deviate from the actual market situation, thereby causing inventory strategy failure or resource mismatch problems. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a drug sales trend analysis and forecasting system based on big data to solve the problems raised in the above-mentioned background technology.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A drug sales trend analysis and forecasting system based on big data, including the following modules:

[0007] Data collection module: Obtain the length of time spent at logistics nodes in the pharmaceutical supply chain and the batch inventory turnover rate of expiration-sensitive drugs;

[0008] Monitoring and identification module: Identifies the type of supply chain disruption based on a dynamic comparison of the duration of logistics node detention with a preset threshold interval;

[0009] Migration modeling module: Based on the correlation between interruption type and batch inventory turnover rate, it establishes an alternative demand migration model and outputs the migration distribution of expiration-sensitive drugs;

[0010] Compensation calculation module: Generates spatiotemporal propagation parameters for supply chain disruption compensation on demand for expiration-sensitive drugs based on the length of time spent at logistics nodes and the change rate of batch inventory turnover;

[0011] Behavior analysis module: acquires consumer behavior data and analyzes the degree of deviation of implicit behavior trajectories. The degree of deviation of implicit behavior trajectories is generated by correlating the dynamic time warp distance of the interactive behavior sequence with the chaotic attractor dimension offset;

[0012] Fusion prediction module: Fusion analysis is performed on the migration distribution, spatiotemporal propagation parameters, and degree of deviation of implicit behavior trajectories of expiration-sensitive drugs to generate drug sales trend prediction results that include compensation for supply chain disruptions.

[0013] In a preferred embodiment, obtaining the retention time of logistics nodes in the drug supply chain and the batch inventory turnover rate of expiration-sensitive drugs includes:

[0014] Collect the real-time positioning information of drug transport vehicles at logistics nodes, and extract the time interval of the transport vehicles staying at the preset logistics nodes as the length of stay at the logistics nodes;

[0015] Target drugs are screened based on the expiration-sensitive identification field in the drug attribute database. The incoming batch records and outgoing batch timestamps of the target drugs at the storage node are retrieved, and the inventory turnover period of adjacent batches is calculated as the batch inventory turnover rate.

[0016] Align the logistics node detention time and batch inventory turnover cycle to a unified data collection time window based on the time dimension.

[0017] In a preferred embodiment, based on the dynamic comparison results of the detention time of the logistics node and the preset threshold interval, the interruption type of the supply chain interruption event is identified, including:

[0018] Dynamically adjust the upper and lower boundary values ​​of the preset threshold range, and dynamically adjust the quantiles based on historical logistics data statistics and real-time logistics node operation efficiency parameters;

[0019] Classify abnormal events where the length of time spent at a logistics node exceeds a preset threshold, and combine this with the decrease in the batch inventory turnover rate at the corresponding logistics node to determine whether the disruption is a logistics stagnation disruption or an inventory shortage disruption.

[0020] Verify the judgment results of logistics stagnation type interruption and inventory shortage type interruption, and verify that it is achieved through the timestamp matching of the transportation tool scheduling records of the logistics node and the inventory replenishment records of the storage node.

[0021] In a preferred embodiment, based on the correlation between the interruption type and the batch inventory turnover rate, a replacement demand migration model is established and the migration amount distribution of expiration-sensitive drugs is output, including:

[0022] Establish alternative drug migration rules corresponding to logistics stagnation and inventory shortage disruptions. The alternative drug migration rules are generated based on the batch inventory turnover rate decline ratio associated with the disruption type and historical alternative drug selection records;

[0023] Construct a migration priority weight matrix for expiration-sensitive drugs. The migration priority weight matrix is ​​dynamically adjusted based on the inverse relationship between the remaining days of the drug's expiration date and the inventory consumption rate in the target area.

[0024] The migration rules and the migration priority weight matrix are integrated to generate the migration volume distribution, which includes the mapping relationship between the allocation quantity of expiration-sensitive drugs between regions and the time window.

[0025] In a preferred embodiment, the spatiotemporal propagation parameters for supply chain disruption events to compensate for the demand for expiration-sensitive drugs are generated based on the length of time spent at logistics nodes and the change rate of batch inventory turnover, including:

[0026] The duration of logistics node detention is decomposed into continuous detention and sudden detention according to the interruption type, and the time attenuation gradient of continuous detention and the spatial diffusion radius of sudden detention are extracted;

[0027] Based on the historical data of batch inventory turnover rate changes, the lag impact step length of the current disruption event on adjacent logistics nodes is calculated. The lag impact step length is determined by the peak offset of the cross-correlation of the inventory turnover rate change series.

[0028] Based on the topological level of logistics nodes and the strength of supply and demand dependence, the propagation attenuation rate of disruption events in the supply chain network is calculated. The propagation attenuation rate is inversely proportional to the square root of the node hierarchy depth and linearly correlated with the strength of supply and demand dependence.

[0029] The temporal attenuation gradient is multiplied by the spatial diffusion radius, and then multiplied by the ratio of the hysteresis impact step length to the attenuation rate to generate the spatiotemporal propagation parameters that characterize the intensity of cross-regional demand compensation.

[0030] In a preferred embodiment, the time attenuation gradient is the exponential decreasing coefficient of the detention time on the demand suppression effect, and the spatial diffusion radius is the product of the number of logistics nodes covered by the interruption impact and the path length.

[0031] In a preferred embodiment, obtaining consumer behavior data and analyzing the degree of deviation of the implicit behavior trajectory, the degree of deviation of the implicit behavior trajectory is generated by correlating the dynamic time warp distance of the interactive behavior sequence with the chaotic attractor dimension offset, including:

[0032] Extract the consumer's interactive behavior sequence within a preset time window, including explicit behavior trajectories and implicit behavior trajectories;

[0033] The explicit behavior trajectory and the implicit behavior trajectory are aligned in the time dimension, and the morphological difference between the two types of trajectories is calculated by dynamic time warping distance. The dynamic time warping distance aligns the local time offset of the explicit behavior trajectory and the implicit behavior trajectory by finding the minimum path cost;

[0034] Construct a chaotic attractor of the implicit behavior trajectory, map the interactive behavior sequence into a high-dimensional phase space point set through phase space reconstruction technology, and calculate the fractal dimension offset of the attractor. The fractal dimension offset is the absolute value of the difference between the attractor dimension during the shortage period and the attractor dimension during the historical normal period.

[0035] The morphological difference and fractal dimension offset are normalized and fused to generate a trajectory deviation parameter that represents the degree of deviation of consumers' implicit behavioral trajectory.

[0036] In a preferred embodiment, the explicit behavior trajectory includes drug search, price comparison, and add-to-cart operation sequences, and the implicit behavior trajectory includes page dwell time, click hot zone distribution, and return browsing behavior sequences.

[0037] In a preferred embodiment, the migration distribution, spatiotemporal propagation parameters, and degree of latent behavior trajectory deviation of expiration-sensitive drugs are integrated and analyzed to generate drug sales trend prediction results that include supply chain disruption compensation, including:

[0038] The time window of the migration volume distribution is matched with the time decay gradient of the spatiotemporal propagation parameter to generate the spatiotemporal consistency coefficient of the inventory turnover rate fluctuation among regions.

[0039] The degree of deviation of implicit behavior trajectories was correlated with the spatial diffusion radius of spatiotemporal propagation parameters, and the geographical coupling between the behavior suppression effect and inventory shortage was calculated using the Pearson correlation coefficient.

[0040] A nonlinear regression model is constructed for the distribution of migration volume, spatiotemporal propagation parameters, and the degree of deviation of implicit behavior trajectories. The model trains the weight matrix by mapping the actual sales recovery rate in historical disruption events with the three types of parameters.

[0041] The drug sales trend forecast results are generated based on the spatiotemporal consistency coefficient, geographic coupling degree and the output value of the nonlinear regression model.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] 1. By real-time monitoring of the length of logistics node detention and batch inventory turnover rate in the pharmaceutical supply chain, the interruption type of supply chain disruption events (such as logistics stagnation or inventory shortage) is dynamically identified, and an alternative demand migration model is constructed to accurately quantify the migration distribution of expiration-sensitive drugs. By introducing spatiotemporal propagation parameters and combining the logistics detention time and inventory turnover rate change rate of supply chain disruption events, the spatiotemporal propagation path and intensity of demand compensation are dynamically calculated, effectively distinguishing between real market demand fluctuations and data distortion caused by supply chain disruptions. Compared with traditional static forecasting models, this model can capture the impact of dynamic changes in the supply chain on drug sales in real time, avoid forecasting bias caused by logistics delays or inventory shortages, and thus improve the real-time and reliability of inventory strategies.

[0044] 2. By analyzing the dynamic time-warping distance between consumers' explicit behavior trajectories (such as searching and price comparison) and implicit behavior trajectories (such as page dwelling and returning to browse), combined with the chaotic attractor fractal dimension offset, a trajectory deviation parameter is generated to characterize the degree of implicit demand suppression of consumers. This method can sensitively reflect the potential impact of supply chain disruptions on consumer behavior, such as the repeated browsing behavior of consumers due to suppressed demand during out-of-stock periods. By integrating migration volume distribution, spatiotemporal propagation parameters, and behavioral trajectory deviation parameters, a cross-dimensional correlation analysis between supply chain disruption events and changes in consumer demand is achieved. This enables the sales trend forecasting model to dynamically adjust inventory allocation strategies, accurately matching real demand with compensatory supply, and ultimately improving the supply and demand balance efficiency and resource utilization of expiration-sensitive drugs. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 This is a schematic diagram of the structure of a drug sales trend analysis and prediction system based on big data of the present invention;

[0046] Figure 2 This is a flow chart of the present invention for analyzing the degree of deviation of implicit behavior trajectory. DETAILED DESCRIPTION

[0047] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0048] Example: Figure 1 The present invention provides a schematic diagram of the structure of a drug sales trend analysis and forecasting system based on big data, which includes the following modules:

[0049] Data collection module: Obtain the length of time spent at logistics nodes in the pharmaceutical supply chain and the batch inventory turnover rate of expiration-sensitive drugs;

[0050] Monitoring and identification module: Identifies the type of supply chain disruption based on a dynamic comparison of the duration of logistics node detention with a preset threshold interval;

[0051] Migration modeling module: Based on the correlation between interruption type and batch inventory turnover rate, it establishes an alternative demand migration model and outputs the migration distribution of expiration-sensitive drugs;

[0052] Compensation calculation module: Generates spatiotemporal propagation parameters for supply chain disruption compensation on demand for expiration-sensitive drugs based on the length of time spent at logistics nodes and the change rate of batch inventory turnover;

[0053] Behavior analysis module: acquires consumer behavior data and analyzes the degree of deviation of implicit behavior trajectories. The degree of deviation of implicit behavior trajectories is generated by correlating the dynamic time warp distance of the interactive behavior sequence with the chaotic attractor dimension offset;

[0054] Fusion prediction module: Fusion analysis is performed on the migration distribution, spatiotemporal propagation parameters, and degree of deviation of implicit behavior trajectories of expiration-sensitive drugs to generate drug sales trend prediction results that include compensation for supply chain disruptions.

[0055] Obtain the length of time spent at logistics nodes in the pharmaceutical supply chain and the batch inventory turnover rate of expiration-sensitive drugs. The specific implementation is as follows:

[0056] Collect real-time positioning information of drug transport vehicles at logistics nodes, specifically including: obtaining precise timestamps of transport vehicles entering and leaving logistics nodes through IoT positioning devices deployed at logistics nodes (including but not limited to GPS trackers, RFID readers, and Bluetooth beacons). Logistics nodes include three types of physical nodes: regional distribution centers, cross-border transit stations, and hospital pharmacy warehouses. Calculate the time interval of the transport vehicle's stay at the preset logistics node based on the timestamp. The portion of the stay time that exceeds the preset standard operating time of the logistics node is defined as the logistics node detention time. The preset standard operating time of the logistics node is determined based on the percentile of historical logistics data statistics. For example, the 95th percentile of the operating time data of the same logistics node in the past year is taken as the threshold. When the logistics node is a regional distribution center, its standard operating time is set based on the average time consumption of the drug loading and unloading, sorting, and quality inspection processes. Specifically, collect the residence time data of all transport vehicles at the regional distribution center in the past year, and calculate its 95th percentile as the standard operating time threshold.

[0057] Target drugs are screened based on the expiration date sensitive identification field in the drug attribute database. The drug attribute database is a relational database that includes drug generic name, pharmacological classification, storage conditions, expiration date, and manufacturer fields. The expiration date sensitive identification field is generated based on the combined determination of storage conditions and expiration date. The specific rules are: if the drug storage conditions include cold chain requirements (such as storage at 2-8°C), or the expiration date is less than or equal to 6 months, it is marked as an expiration date sensitive drug; the data sources of the drug attribute database include drug registration information, public data of the drug regulatory department, and internal drug files of the enterprise, and are updated synchronously through regular data interfaces with the drug regulatory department; the target drug’s incoming batch records and outgoing timestamps at the storage node are retrieved through the enterprise resource planning system. The incoming batch records include the drug batch number, the outgoing batch number, and the outgoing batch number. The inventory turnover cycle of each batch is calculated as follows: the inventory number, entry time, storage location number, batch quantity, and the exit timestamp is the actual time when the drug is issued from the storage node, which is recorded by the automatic scanning equipment of the warehouse management system; the method for calculating the inventory turnover cycle of adjacent batches is: the time difference between the exit timestamp of the same batch number drug and the entry timestamp of the next batch of drugs is divided by the number of drugs in the batch, and the inventory turnover cycle of the unit drug is obtained as the batch inventory turnover rate. For example, the entry time of a batch of drug A is January 1, 2023, the exit time is January 15, 2023, and the batch quantity is 1,000 boxes. The inventory turnover cycle is 14 days / 1,000 boxes = 0.014 days / box; if there is no entry record of the next batch for a batch (such as the drug is delisted or discontinued), the calculation of this batch is skipped.

[0058] The logistics node detention time and batch inventory turnover cycle are aligned to a unified data collection time window along the time dimension. Specifically, this includes extracting the time point of the logistics event corresponding to the logistics node detention time and the inventory record time corresponding to the batch inventory turnover cycle. For data with inconsistent time window lengths, timestamp matching or linear interpolation is used to align the two types of data to a unified time granularity. The unified time granularity is set according to the minimum response cycle of the supply chain disruption event. For example, when the minimum response cycle is 1 hour, the time granularity is 1 hour. The specific method of timestamp matching is as follows: if the error between the timestamp of the logistics node detention time and the timestamp of the batch inventory turnover cycle is within 50% of the time granularity (for example, the error range of the 1-hour time granularity is 30 minutes), they are considered to be data from the same time window. The specific method of linear interpolation is as follows: for the logistics node detention time or batch inventory turnover cycle data with missing time windows, the arithmetic mean of the data from adjacent time windows is used to fill in the gaps. The aligned logistics node detention time and batch inventory turnover cycle form time series data for subsequent monitoring and identification of supply chain disruption events.

[0059] Based on the dynamic comparison results of the detention time of the logistics node and the preset threshold interval, the interruption type of the supply chain interruption event is identified. The specific implementation is as follows:

[0060] Dynamically adjust the upper and lower boundaries of the preset threshold interval, as well as the quantiles based on historical logistics data statistics and real-time logistics node operation efficiency parameters. This includes: collecting detention time data for the same logistics node over the past three years, dividing the time windows into monthly windows, calculating the 95th percentile value for each window, and using the moving average of the monthly quantile values ​​as the initial upper boundary of the preset threshold interval. Real-time logistics node operation efficiency parameters include hourly drug processing volume and equipment availability. The hourly drug processing volume is calculated using the weighing sensors and timestamp records in the warehouse management system, and the equipment availability is calculated by collecting equipment operation status logs from IoT sensors to calculate the proportion of idle time. The initial upper boundary of the preset threshold interval and the real-time operation efficiency parameters are dynamically weighted and integrated. The dynamic weighting is adjusted based on the fluctuation coefficient of the operation efficiency parameter, which is the ratio of the standard deviation to the mean of the operation efficiency parameter. For example, when the fluctuation coefficient of the equipment availability is greater than 0.2, the weight of the operation efficiency parameter is increased to 0.7; otherwise, it retains the default weight of 0.5. The lower boundary of the preset threshold interval is set to 50% of the initial upper boundary. For example, if the initial upper boundary is 4 hours, the lower boundary is 2 hours.

[0061] Classify the abnormal events where the detention time of the logistics node exceeds the preset threshold interval, and combine the batch inventory turnover rate decrease ratio of the corresponding logistics node to determine the interruption type as logistics stagnation interruption or inventory shortage interruption. Specifically, when the detention time of the logistics node exceeds the upper boundary of the preset threshold interval and the batch inventory turnover rate decrease ratio of the corresponding logistics node is greater than or equal to 30%, it is determined to be a logistics stagnation interruption. The calculation method of the batch inventory turnover rate decrease ratio is: take the difference between the inventory turnover rate in the current statistical period and the average inventory turnover rate of the past three months, divide it by the historical average and convert it into a percentage. For example, the inventory turnover rate of the current period is 0.01 days / box. The historical average is 0.015 days / box, so the decline rate is (0.015-0.01) / 0.015×100%=33.3%. When the detention time at the logistics node exceeds the lower boundary of the preset threshold range but does not reach the upper boundary and the batch inventory turnover rate decreases by less than 30%, it is determined to be an inventory shortage type interruption. At this time, it is necessary to further verify it with the inventory warning water level data of the storage node. The inventory warning water level data is the minimum inventory threshold set according to the historical sales peak. For example, the inventory warning water level of a certain drug is 500 boxes. If the current inventory is lower than this value and the batch inventory turnover rate decreases by less than 30%, it is confirmed to be an inventory shortage type interruption.

[0062] Verify the results of determining logistics stagnation and inventory shortage disruptions by matching the timestamps of the transportation tool scheduling records at the logistics node with the inventory replenishment records at the warehousing node. This verification process includes: retrieving the transportation tool scheduling records from the logistics management system and extracting the timestamp difference between the planned arrival time and the actual arrival time within the abnormal event time window, where the length of the time window is consistent with the time granularity of the preset threshold interval; simultaneously retrieving the inventory replenishment records from the warehousing management system and extracting the timestamp difference between the planned replenishment time and the actual replenishment time within the same time window; calculating the ratio of the timestamp difference between the transportation tool scheduling record and the timestamp difference between the inventory replenishment record. If the ratio exceeds 20% of the upper boundary of the preset threshold interval and the differences are in the same direction, a logistics stagnation disruption is confirmed. For example, if the transportation tool is delayed for 2 hours and the replenishment is delayed for 0.4 hours (a ratio of 5), the verification passes if the ratio exceeds the threshold of 20% (i.e., 4 hours × 20% = 0.8 hours). If only the timestamp difference of the inventory replenishment record exceeds the threshold and the batch inventory turnover rate decreases by less than 30%, an inventory shortage disruption is confirmed.

[0063] Based on the correlation between the interruption type and the batch inventory turnover rate, a replacement demand migration model is established and the migration distribution of expiration-sensitive drugs is output. The specific implementation is as follows:

[0064] Establish alternative drug migration rules corresponding to logistics stagnation type interruptions and inventory shortage type interruptions. The migration rules are generated based on the batch inventory turnover rate decline ratio associated with the interruption type and the historical alternative drug selection records. Specifically, for logistics stagnation type interruptions, extract the historical alternative drug selection records of the area where the interruption event occurred. The historical alternative drug selection records are derived from the company's internal drug substitution relationship database, which contains the generic name of the drug, the generic name of the alternative drug, the substitution ratio and the effective time range fields. The generic name of the alternative drug is generated by matching the pharmacological equivalence evaluation with the clinical medication guidelines. The pharmacological equivalence evaluation is quantitatively scored based on the matching degree of the drug's active ingredient, dosage form and indication. For example, the active ingredient of a certain antihypertensive drug is A, and the alternative drug must contain the same active ingredient and have the same dosage form.

[0065] The replacement ratio is adjusted according to the decline rate of batch inventory turnover rate. The adjustment rule is: when the decline rate of batch inventory turnover rate is greater than or equal to 30%, the replacement ratio is increased to 1.5 times the historical average; when the decline rate is less than 30% but greater than or equal to 10%, the replacement ratio is increased to 1.2 times the historical average. For example, if the historical replacement ratio of a certain drug is 20%, when the batch inventory turnover rate decreases by 35%, the replacement ratio is adjusted to 30%. If the decline rate is 25%, it is adjusted to 24%. For inventory shortage interruptions, the cross-regional substitution records of the target drug are extracted. The cross-regional substitution records contain the generic name, allocation quantity and allocation time of the drugs transferred between regions. Combined with the current inventory warning water level data, a list of alternative drugs is generated. The inventory warning water level data is the minimum inventory threshold calculated based on the average sales volume and safety stock coefficient of the past three months.

[0066] The method for setting the safety stock coefficient is: based on historical demand volatility and supply cycle stability, the standard deviation of weekly sales in the past year is calculated to measure the degree of demand fluctuation, and the safety coefficient is determined according to the statistical distribution parameters corresponding to the preset service level target value. For example, the safety coefficient under the standard normal distribution corresponding to a 95% service level is 1.65; combined with the difference between the actual number of days of the supplier's delivery cycle and the benchmark cycle, the supply cycle days are converted into weekly dimensions and stability calibration is performed, and the impact of cycle fluctuations on inventory demand is adjusted through square root operations; when calculating the safety stock, the safety coefficient, weekly sales standard deviation and the calibrated supply cycle multiple are multiplied to generate the basic safety stock, and then divided by the average weekly sales to eliminate scale differences to obtain a standardized safety stock coefficient.

[0067] Construct a migration priority weight matrix for expiration-sensitive drugs. The weight matrix is ​​dynamically adjusted based on the inverse proportional relationship between the remaining days of the drug's expiration date and the inventory consumption rate in the target area. Specifically, the remaining days of the expiration date are calculated using the production date and expiration date in the drug batch information. The production date and expiration date are extracted from the barcode scanning record of the drug packaging. The barcode scanning record is collected in real time by the scanning equipment of the warehouse management system. For example, the barcode scanning record of a batch of drugs shows that the production date is January 1, 2023 and the expiration date is January 1, 2024. The current date is December 1, 2023, and the remaining days of the expiration date are 31 days. The inventory consumption rate in the target area is the current area's over the past week. Average daily sales are calculated by counting the outbound delivery timestamps and quantities in sales records. The statistical method is to filter all outbound delivery records for the target region over the past seven days, excluding returns and abnormal order data, and then calculate the total sales volume divided by 7. For example, if the total sales volume for the past week was 80 boxes, the average daily sales volume is 80 / 7, which is approximately 11.43 boxes per day. The weight matrix is ​​calculated by dividing the remaining days before expiration by the inventory consumption rate, and then multiplying it by a normalization coefficient. The normalization coefficient is the inverse of the sum of the weights. For example, if the weights of three drugs are 3.1, 2.5, and 4.0, respectively, the total weight is 9.6. The normalization coefficient is 1 / 9.6, which is approximately 0.104. The normalized weight matrix is ​​[0.322, 0.260, 0.416], ensuring that the row vectors sum to 1. The weight matrix is ​​updated hourly, triggered by a change in the inventory consumption rate exceeding 10% or a decrease in the remaining days before expiration by one day.

[0068] The migration rules are integrated with the migration priority weight matrix to generate a migration volume distribution. The migration volume distribution includes the mapping relationship between the allocation quantity of expiration-sensitive drugs between each region and the time window. Specifically, the following steps are performed: matching the drug entries in the migration priority weight matrix according to the generic names of the drugs in the alternative drug list, and multiplying the substitution ratio by the weight value to obtain the migration priority score. For example, if the substitution ratio of a drug is 30% and the weight value is 0.322, the migration priority score is 0.3×0.322=0.0966; sorting from high to low by score, and selecting drugs with priority scores greater than the preset threshold to generate the allocation quantity. The preset threshold is dynamically adjusted based on the historical migration success rate, which is calculated by counting the actual completion rate of allocation tasks in the past month. The adjustment rule is: when the historical migration success rate is lower than 80%, the threshold is lowered by 10%; when the success rate is higher than 90%, the threshold is increased by 5%. For example, if the original threshold is 0.1, it will remain unchanged when the success rate is 85%.

[0069] The allocation quantity is allocated proportionally based on the target area's inventory gap and the migration priority score. The allocation formula is: Allocation quantity = Target area inventory gap × (Migration priority score / Total score). For example, if the target area's inventory gap is 100 boxes, the migration priority score is 0.0966, and the total score is 0.5, then the allocation quantity is 100 × (0.0966 / 0.5) = 19.32 boxes, rounded up to 19 boxes. The mapping relationship between the time window is set according to the logistics node detention time and the target area's inventory warning level. The setting rule is: if the logistics detention time is less than 2 hours and the inventory warning level is below 50%, the time window is set to complete the allocation within 24 hours; if the logistics detention time is greater than or equal to 2 hours or the inventory warning level is above 50%, the time window is extended to 48 hours, and the early warning mechanism is triggered at the same time, which notifies the regional manager via SMS and email.

[0070] Based on the length of time spent at logistics nodes and the change rate of batch inventory turnover, the spatiotemporal propagation parameters for supply chain disruption events to compensate for the demand for expiration-sensitive drugs are generated. The specific implementation is as follows:

[0071] The detention time of logistics nodes is decomposed into continuous detention and sudden detention according to the interruption type, and the time attenuation gradient of continuous detention and the spatial diffusion radius of sudden detention are extracted. Specifically, continuous detention is defined as a detention event in which the detention time exceeds the preset threshold range due to transportation vehicle failure or route control. The preset threshold range is obtained through historical logistics data statistics. For example, the 95th percentile value of the detention time data of the same logistics node in the past year is the upper threshold limit, and the 50th percentile value is the lower threshold limit; the time attenuation gradient is obtained by fitting the exponential relationship curve between the detention time and demand suppression in historical interruption events. The demand suppression is the difference between actual sales and predicted sales. The predicted sales are calculated using the seasonal autoregressive moving average model.

[0072] The fitting method of the exponential relationship curve is: collect the continuous detention event data of the same logistics node in the past three years, take the detention time as the independent variable and the demand suppression as the dependent variable, and use the nonlinear least squares method to fit the exponential relationship curve in the form of " " is an exponential function, where Indicates the amount of suppressed demand, To suppress the base of demand, is the time decay gradient, is the duration of supply chain disruption; for example, the fitting result of a logistics node is A=120, k=0.12, then the time attenuation gradient is 0.12; sudden detention is defined as a detention event caused by natural disasters or sudden epidemics, and its spatial diffusion radius is the product of the number of logistics nodes directly affected by the interruption event and the average path length between nodes. The number of affected logistics nodes is determined by traversing the adjacency matrix of the supply chain topology network, and the average path length between nodes is obtained through the path planning interface in the geographic information system. For example, a sudden detention event affects 3 logistics nodes, and the average path length between nodes is 50 kilometers, then the spatial diffusion radius is 3×50=150 kilometers.

[0073] Based on the historical data of batch inventory turnover rate change rate, the step length of the lag effect of the current interruption event on the adjacent logistics nodes is calculated, specifically including: obtaining the batch inventory turnover rate change rate data corresponding to all interruption events in the past two years. The batch inventory turnover rate change rate is the percentage of the inventory turnover rate difference between the current statistical period and the previous statistical period. The inventory turnover rate is calculated as the time difference between the outbound timestamp and the inbound timestamp divided by the number of batches; the cross-correlation analysis is performed on the inventory turnover rate change rate series of the logistics node where the current interruption event is located and its adjacent nodes. The cross-correlation analysis is performed by sliding time. The method is implemented using the time window method. The specific steps are as follows: align the inventory turnover rate change rate series of the two nodes in time, use 7 days as the sliding window step, calculate the Pearson correlation coefficient of the two series in the window, traverse all possible time offsets (-14 days to +14 days), and record the time offset when the correlation coefficient reaches the maximum value as the lag effect step. For example, if the interruption event of node A causes the inventory turnover rate change rate of node B to have a maximum correlation coefficient of -0.85 when it is lag 5 days, then the lag effect step is 5 days. If there are multiple peaks, take the time offset corresponding to the peak with the largest absolute value.

[0074] Based on the topological level and supply and demand dependence intensity of the logistics nodes, the propagation attenuation rate of the interruption event in the supply chain network is calculated. Specifically, the topological level is determined according to the position depth of the logistics node in the supply chain network. The supply chain network is a directed graph structure, and the nodes include three types: manufacturers, regional distribution centers, and hospital pharmacy warehouses. Manufacturers are defined as level depth 1, regional distribution centers as level depth 2, and hospital pharmacy warehouses as level depth 3; the supply and demand dependence intensity is calculated by counting the percentage of the number of drugs purchased by the target node from the node where the interruption occurred in the past year to its total purchase volume. For example, the number of drugs purchased by node B from node A where the interruption occurred is 700 boxes, and the total purchase volume is 1,000 boxes, so the supply and demand dependence intensity is 70%.

[0075] The formula for calculating the propagation attenuation rate is: ;in, represents the propagation attenuation rate, is the topological level depth of the logistics node, For the intensity of supply and demand dependence, is the calibration factor.

[0076] The calibration coefficient is obtained through regression analysis of historical interruption event data. The specific method is: 100 interruption events in the past five years are selected, their measured values ​​of attenuation rates are recorded, and the calibration coefficient is determined to be 0.18 through multivariate linear regression.

[0077] The time attenuation gradient is multiplied by the spatial diffusion radius, and then multiplied by the ratio of the hysteresis impact step size to the attenuation rate to generate the spatiotemporal propagation parameters that characterize the intensity of cross-regional demand compensation. Specifically, the product of the time attenuation gradient and the spatial diffusion radius reflects the impact range of the interruption event in the spatiotemporal dimension. For example, if the time attenuation gradient is 0.12 and the spatial diffusion radius is 150 kilometers, the product is 0.12×150=18 kilometers per day. -1 The ratio of the lag impact step size to the decay rate reflects the efficiency of interruption propagation. The higher the efficiency, the more urgent the compensation demand. For example, if the lag impact step size is 5 days and the decay rate is 0.833, the ratio is 5 / 0.833≈6.0. The final spatiotemporal propagation parameter is 18×6.0=108. The parameter is used to quantify the regional scope and intensity of compensation. The larger the value, the more urgent the compensation demand. When the parameter exceeds the preset threshold, a cross-regional allocation warning is triggered. The preset threshold is dynamically adjusted according to the historical compensation success rate. For example, when the historical success rate is lower than 80%, the threshold is lowered to 100.

[0078] Figure 2 The present invention provides a flowchart for analyzing the degree of deviation of implicit behavior trajectories. Consumer behavior data is obtained and the degree of deviation of implicit behavior trajectories is analyzed. The degree of deviation of implicit behavior trajectories is generated by associating the dynamic time warp distance of the interactive behavior sequence with the chaotic attractor dimension offset. The specific implementation is as follows:

[0079] Extract the consumer's interactive behavior sequence within a preset time window, including explicit and implicit behavior trajectories. The explicit behavior trajectory includes drug search, price comparison, and add-to-cart operation sequences. The specific implementation method is to extract the consumer's search keyword input records on the drug detail page from the web log database, generate a search sequence by timestamp, and the search sequence is a time-sorted string array. Each element contains the search timestamp and keyword content. For example, the timestamp is 2023-08-01 10:00:00 and the keyword is "antihypertensive drug A". The number of price comparisons for different drugs in the same session is counted from the price comparison function interface call records to generate a price comparison frequency sequence. The price comparison frequency sequence is an integer array counted by time window. Each element represents the number of price comparison operations in the current time window. For example, the time window is 1 hour and the number of price comparisons is 5. The time interval between two adjacent add-to-cart operations is extracted from the shopping cart operation log to generate an add-to-cart time interval sequence. The add-to-cart time interval sequence is a floating-point array. Each element represents the time difference between two add-to-cart operations in seconds. For example, the add-to-cart interval is 300 seconds and 480 seconds. The implicit behavior trajectory includes the page dwell time, click hot zone distribution, and return browsing behavior sequence within the same session. The specific implementation method is to use page embedding data to count the total length of time consumers stay on the drug list page, recorded in seconds. The total dwell time is the time difference from the completion of page loading to the jump or closing of the page. For example, the dwell time is 120 seconds. The page coordinates of each click are extracted from the click event log. The page is divided into three functional areas according to the page layout: price comparison area, drug image area, and detail button area. The number of clicks in each area is counted to generate hot zone distribution data. Hot zone distribution data is a key-value pair set containing area name and click count. For example, the number of clicks in the price comparison area is 10, the number of clicks in the drug image area is 3, and the number of clicks in the detail button area is 8. The browser history is parsed to obtain the number of operations and corresponding timestamps of consumers returning from the drug details page to the list page, and a return browsing behavior sequence is generated. The return browsing behavior sequence is a Boolean array sorted by timestamp. Each element indicates whether there is a return operation at the current timestamp. For example, the timestamp 2023-08-0110:05:00 corresponds to a return operation mark of true.

[0080] The explicit behavior trajectory and the implicit behavior trajectory are aligned in the time dimension, and the morphological difference between the two types of trajectories is calculated by the dynamic time warp distance. The specific implementation method is to align the purchase time interval sequence of the explicit behavior trajectory with the page stay time sequence of the implicit behavior trajectory according to the millisecond timestamp. The calculation process of the dynamic time warp distance includes the following steps: constructing a cumulative distance matrix, the rows of the cumulative distance matrix correspond to the explicit trajectory nodes, and the columns correspond to the implicit trajectory nodes. The matrix elements are the Euclidean distances between the explicit trajectory nodes and the implicit trajectory nodes. The Euclidean distance is determined by calculating the absolute difference between the two node values. For example, if the explicit trajectory node value is 300 seconds and the implicit trajectory node value is 120 seconds, then the Euclidean distance is |300-120|=180. The dynamic planning path search is performed by iterating All possible paths in the cumulative distance matrix are traced back. The path extension direction is limited to moving right, downward, or to the lower right diagonal. The cumulative distance of each step is the Euclidean distance of the current node plus the minimum cumulative distance of the previous step. For example, if the minimum cumulative distance of the previous step is 100 and the Euclidean distance of the current node is 180, then the current cumulative distance is 100+180=280. The optimal path is extracted by backtracking the cumulative distance matrix to select the path with the minimum cumulative distance from the upper left starting point to the lower right end point. The morphological difference is calculated by dividing the cumulative distance of the optimal path by the average of the explicit trajectory length and the implicit trajectory length. For example, if the explicit trajectory length is 10, the implicit trajectory length is 12, the average is 11, and the optimal path cumulative distance is 253, then the morphological difference is 253 / 11≈23.

[0081] Construct a chaotic attractor of the implicit behavior trajectory, and map the interactive behavior sequence into a high-dimensional phase space point set through phase space reconstruction technology. The specific implementation method is to use the mutual information method to determine the delay time. The mutual information method calculates the dependency between the implicit behavior sequence and its delayed version sequence, and selects the delay time when the mutual information value first reaches the local minimum as the optimal value. For example, the delay time is 5. The false neighbor method is used to determine the embedding dimension. The false neighbor method gradually increases the embedding dimension and detects the proportion of false neighbor points in the high-dimensional space. It stops when the proportion of false neighbors is less than 5%. For example, the embedding dimension is 3. The phase space point set is generated by sliding the implicit behavior sequence into a window according to the delay time 5 and the embedding dimension 3. The data points in each window are combined into coordinate points in the three-dimensional space. For example, the implicit behavior sequence is [10 ,15,20,25,30,35,40], the mapped phase space point sets are (10,15,20), (15,20,25), (20,25,30), the fractal dimension is calculated using the correlation dimension algorithm, which counts the number of phase space point pairs distributed within different distance radii, and calculates the slope of the linear relationship between the distance radius and the number of point pairs in the double logarithmic coordinate system. For example, when the distance radius r=5, the number of point pairs is 1000, and when r=10, the number of point pairs is 3000, then the slope is approximately 0.778. The fractal dimension offset is generated by calculating the absolute value of the difference between the fractal dimension of the out-of-stock period attractor and the fractal dimension of the historical normal period. For example, the fractal dimension of the out-of-stock period is 2.5, and that of the historical normal period is 1.8, then the fractal dimension offset is |2.5-1.8|=0.7.

[0082] The morphological difference and the fractal dimension offset are normalized and integrated to generate a trajectory deviation parameter that characterizes the degree of deviation of the consumer's implicit behavior trajectory. The specific implementation method is data normalization. The morphological difference is divided by the historical maximum morphological difference. The historical maximum morphological difference is determined by counting the maximum morphological difference of all interruption events in the past year. For example, if the historical maximum morphological difference is 50 and the current morphological difference is 23, the normalized value is 23 / 50=0.46. The fractal dimension offset is divided by the historical maximum fractal dimension offset. The historical maximum fractal dimension offset is determined by counting the maximum fractal dimension offset of all interruption events in the past year. For example, if the historical maximum fractal dimension offset is 1.5 and the current fractal dimension offset is 23 / 50=0.46. The value is 0.7, then the standardized value is 0.7 / 1.5≈0.47. The weight distribution is determined by linear regression analysis. The linear regression analysis takes the trajectory deviation parameter of the historical interruption event as the independent variable and the sales recovery rate after the corresponding demand compensation as the dependent variable. The morphological difference weight and the fractal dimension offset weight are obtained by fitting. For example, the regression coefficient shows that the morphological difference weight is 0.6 and the fractal dimension offset weight is 0.4. The parameter fusion calculates the trajectory deviation parameter through the weighted summation formula. For example, the trajectory deviation parameter = 0.6×0.46+0.4×0.47≈0.276+0.188=0.464. The trajectory deviation parameter is used to trigger the demand compensation decision. When the parameter exceeds the threshold of 0.4, a cross-regional drug allocation instruction is generated.

[0083] By aligning explicit behavior trajectories (drug search, add-to-cart) with implicit behavior trajectories (page dwell, click hot spots) through dynamic time warping distance, the deviation problem caused by the asynchrony between consumers' explicit operations and implicit demands on the time scale is solved; further, a chaotic attractor of the implicit behavior trajectory is constructed and the fractal dimension offset is calculated, and nonlinear dynamic characteristics are used to capture the potential pattern mutations of consumer behavior during the out-of-stock period (such as repeated return to browse reflecting suppressed demand), overcoming the defect of existing technologies that rely on static statistical indicators (such as click-through rate) and cannot quantify changes in behavioral dynamics; finally, the trajectory deviation parameter is generated by normalizing the fusion of morphological difference and fractal offset to achieve cross-scale quantification of the degree of behavioral deviation. Compared with existing technologies, it can identify the implicit suppressive effect of supply chain disruptions on consumer demand earlier, provide accurate time series warnings for dynamic inventory compensation (such as triggering allocation when the trajectory deviation parameter exceeds the threshold of 0.5), and improve the supply and demand matching efficiency of expiration-sensitive drugs.

[0084] The migration distribution, spatiotemporal propagation parameters, and degree of deviation of hidden behavior trajectories of expiration-sensitive drugs are integrated and analyzed to generate drug sales trend forecasts that include supply chain disruption compensation. The specific implementation is as follows:

[0085] The migration distribution, spatiotemporal propagation parameters, and degree of deviation of implicit behavior trajectories of expiration-sensitive drugs are integrated and analyzed to generate drug sales trend forecasts that include supply chain disruption compensation. This includes matching the time window of the migration distribution with the time attenuation gradient of the spatiotemporal propagation parameters to generate the spatiotemporal consistency coefficient of inter-regional inventory turnover fluctuations. The specific implementation method is as follows: the time window of the migration distribution is calculated by extracting the difference between the task creation timestamp and the completion timestamp from the transfer work order record of the enterprise resource planning system. The time window unit is hours. For example, the creation time of a transfer task is 2023-08-01 08:00:00, and the completion time is 2023-08-03 08:00:00, the time window is 48 hours, and the time attenuation gradient of the spatiotemporal propagation parameter is determined by the slope of the exponential fitting curve of the logistics node detention time and the demand suppression effect. The slope of the exponential fitting curve is obtained by fitting the historical interruption event data using the nonlinear least squares method. For example, the time attenuation gradient is 0.1. The spatiotemporal consistency coefficient is generated by multiplying the time window by the time attenuation gradient. For example, the time window of 48 hours is multiplied by the time attenuation gradient of 0.1 to obtain a spatiotemporal consistency coefficient of 4.8. The spatiotemporal consistency coefficient is used to quantify the synchronization of inventory turnover fluctuations in the spatiotemporal dimension. The higher the coefficient value, the more matched the spatiotemporal propagation speed of the supply chain disruption is with the inventory migration efficiency.

[0086] The degree of deviation of the implicit behavior trajectory is correlated with the spatial diffusion radius of the spatiotemporal propagation parameter, and the geographical coupling degree between the behavioral suppression effect and inventory shortage is calculated using the Pearson correlation coefficient. The specific implementation method is as follows: the degree of deviation of the implicit behavior trajectory is the trajectory deviation parameter, and the trajectory deviation parameter is obtained by normalizing and fusion of the morphological difference and fractal dimension offset of the implicit behavior trajectory. The normalization fusion method is to divide the morphological difference by the historical maximum morphological difference, and the fractal dimension offset by the historical maximum fractal dimension offset, and then add them according to the preset weights. For example, the standardized value of the morphological difference is 0.46, the standardized value of the fractal dimension offset is 0.58, the weights are 0.6 and 0.4, and the trajectory deviation parameter = 0.6×0.46+0.4×0.58≈0.508.

[0087] The spatial diffusion radius of the spatiotemporal propagation parameter is calculated by multiplying the number of logistics nodes affected by the disruption event by the average path length between the nodes in the supply chain topology network database. For example, if the number of affected logistics nodes is 3 and the average path length is 50 kilometers, the spatial diffusion radius = 3×50 = 150 kilometers. The geographic coupling is determined by calculating the Pearson correlation coefficient between the trajectory deviation parameter and the spatial diffusion radius. The calculation steps of the Pearson correlation coefficient are as follows: collect the trajectory deviation parameter values ​​and the corresponding spatial diffusion radius in historical disruption events, standardize them into a data set with a mean of 0 and a standard deviation of 1, and calculate the ratio of the covariance to the standard deviation. For example, if the covariance is 120, the standard deviation of the trajectory deviation parameter is 15, and the standard deviation of the spatial diffusion radius is 20, then the geographic coupling = 120 / (15×20) = 0.4. The geographic coupling is used to measure the degree of geographical overlap between the consumer behavior suppression effect and the inventory shortage area.

[0088] A nonlinear regression model of migration volume distribution, spatiotemporal propagation parameters, and degree of deviation of latent behavior trajectories is constructed. The specific implementation method is as follows: the time window of migration volume distribution, the time attenuation gradient and spatial diffusion radius of spatiotemporal propagation parameters, and the degree of deviation of latent behavior trajectories are used as input variables, and the actual sales recovery rate is used as the output variable. The actual sales recovery rate is calculated by the ratio of actual sales volume to predicted sales volume in the target area after the interruption event. For example, if the actual sales volume is 400 boxes and the predicted sales volume is 500 boxes, the sales recovery rate = 400 / 500 = 80%. The nonlinear regression model adopts the polynomial regression method, and the model expression is sales recovery rate = weight 1 × time window + weight 2 × time attenuation gradient + weight 3 × spatial diffusion radius + weight 4 × trajectory deviation parameter + The weight is 5× the square term of the time window, and weights 1 to 5 are optimized by the gradient descent method. The learning rate of the gradient descent method is set to 0.01, the maximum number of iterations is 1000, the loss function is the mean square error, and the training termination condition is that the loss function value is less than 0.001. The initial value of the weight is randomly generated by the normal distribution. For example, the initial value of weight 1 is 0.3, and the initial value of weight 2 is -0.2. After training, the weights are updated to weight 1=0.28 and weight 2=-0.18. The average absolute error between the sales recovery rate prediction value and the actual value output by the model is 3%. The model is trained with a historical interruption event dataset, which contains the time window, time attenuation gradient, spatial diffusion radius, trajectory deviation parameter and actual sales recovery rate of 100 interruption events.

[0089] Drug sales trend forecasts are generated based on the spatiotemporal consistency coefficient, geographic coupling, and the output of the nonlinear regression model. The specific implementation method is as follows: the spatiotemporal consistency coefficient and geographic coupling are calculated using the regional priority score formula. The regional priority score formula is: spatiotemporal consistency coefficient × 0.6 + geographic coupling × 0.4. The weights 0.6 and 0.4 are determined through regression analysis of historical allocation task priority data. The regression analysis uses the negative correlation between allocation task response time and regional priority score as the optimization target. For example, in historical data, a priority score of 4.0 corresponds to a response time of 12 hours, and a score of 3.0 corresponds to 18 hours. The regression results show that weights 0.6 and 0.4 minimize the response time error. The regional priority score is multiplied by the sales recovery rate output by the nonlinear regression model to generate the average daily sales forecast for each region for the next week. For example, if the priority score is 4.8 × sales recovery rate 85% = 4.08, the average daily sales forecast = baseline sales volume of 500 boxes × 4.08 / 5 = 326 boxes.

[0090] The inventory alert level is set based on the ratio of the average daily sales forecast to the dynamic safety stock, which is generated through statistical analysis. The dynamic safety stock is calculated based on the volatility of historical sales data. Specifically, the standard deviation of weekly sales over the past year is used to measure demand fluctuations. This is combined with the statistical distribution parameters corresponding to the preset service level targets (e.g., the normal distribution parameter for a 95% service level is 1.65). Stability is calibrated based on the supplier's actual delivery cycle. The supply cycle is converted to a multiple of the benchmark cycle and then adjusted for supply fluctuations using a square root operation. The calculation is performed by multiplying the statistical distribution parameters, the weekly sales standard deviation, and the calibrated supply cycle multiple to obtain the base safety stock level. This is then normalized by the weekly average sales to generate the dynamic safety stock coefficient. For example, for a drug with a weekly sales standard deviation of 50 boxes and a supply cycle of 7 days, the statistical distribution parameter is 1.65. After calibration, the cycle multiplier is the square root of the calculated value, resulting in a dynamic safety stock of approximately 218 boxes. The inventory alert level is determined by the ratio of the daily average sales forecast of 326 boxes to the dynamic safety stock of 1.5. This level is categorized into three levels: ≥1.5 is normal, indicating sufficient inventory without requiring transfers; 1.0 to 1.5 is a warning level, requiring monitoring of inventory consumption trends; and below 1.0 is an emergency level, triggering a cross-regional transfer mechanism. Supply cycle data is obtained in real time from the supplier's delivery cycle database, and the statistical distribution parameter is preset based on the company's service level strategy.

[0091] The calculations involved in the embodiments are all dimensionless numerical calculations, and the preset parameters and thresholds in the calculations are set by those skilled in the art according to actual conditions.

[0092] It should be noted that the present invention can be deployed on the device itself to implement embedded applications, and can also be run on a PC or other terminal with a user interface, thereby meeting various hardware environments and usage requirements.

[0093] The above embodiments can be implemented in whole or in part via software, hardware, firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions or computer programs. When loaded or executed on a computer, the processes or functions described in the embodiments of this application are fully or partially performed. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired means (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server or data center that contains a collection of one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, tapes), optical media (e.g., DVDs), or semiconductor media. The semiconductor media can be a solid-state drive.

[0094] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0095] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0096] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, and may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.

[0097] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0098] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0099] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

[0100] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A drug sales trend analysis and forecasting system based on big data, characterized by: Includes the following modules: Data collection module: Obtain the length of time spent at logistics nodes in the pharmaceutical supply chain and the batch inventory turnover rate of expiration-sensitive drugs; Monitoring and identification module: Identifies the type of supply chain disruption based on a dynamic comparison of the duration of logistics node detention with a preset threshold interval; Migration Modeling Module: Based on the relationship between interruption type and batch inventory turnover rate, it establishes an alternative demand migration model and outputs the migration distribution of expiration-sensitive drugs, including: Establish alternative drug migration rules corresponding to logistics stagnation and inventory shortage disruptions. The alternative drug migration rules are generated based on the batch inventory turnover rate decline ratio associated with the disruption type and historical alternative drug selection records; Construct a migration priority weight matrix for expiration-sensitive drugs. The migration priority weight matrix is ​​dynamically adjusted based on the inverse relationship between the remaining days of the drug's expiration date and the inventory consumption rate in the target area. The migration rules and the migration priority weight matrix are integrated to generate the migration volume distribution, which includes the mapping relationship between the allocation quantity of expiration-sensitive drugs between regions and the time window. Compensation calculation module: Generates spatiotemporal propagation parameters for supply chain disruption compensation on expiration-sensitive drug demand based on the length of time spent at logistics nodes and the change rate of batch inventory turnover, including: The duration of logistics node detention is decomposed into continuous detention and sudden detention according to the interruption type, and the time attenuation gradient of continuous detention and the spatial diffusion radius of sudden detention are extracted; Based on the historical data of batch inventory turnover rate changes, the lag impact step length of the current disruption event on adjacent logistics nodes is calculated. The lag impact step length is determined by the peak offset of the cross-correlation of the inventory turnover rate change series. Based on the topological level of logistics nodes and the strength of supply and demand dependence, the propagation attenuation rate of disruption events in the supply chain network is calculated. The propagation attenuation rate is inversely proportional to the square root of the node hierarchy depth and linearly correlated with the strength of supply and demand dependence. Multiply the temporal attenuation gradient by the spatial diffusion radius, and then multiply by the ratio of the hysteresis impact step length to the attenuation rate to generate the spatiotemporal propagation parameter that characterizes the intensity of cross-regional demand compensation; The time attenuation gradient is the exponential decreasing coefficient of the effect of detention time on demand suppression, and the spatial diffusion radius is the product of the number of logistics nodes covered by the interruption impact and the path length; Behavior analysis module: acquires consumer behavior data and analyzes the degree of deviation of implicit behavior trajectories. The degree of deviation of implicit behavior trajectories is generated by correlating the dynamic time warp distance of the interactive behavior sequence with the chaotic attractor dimension offset; Fusion prediction module: Fusion analysis is performed on the migration distribution, spatiotemporal propagation parameters, and degree of deviation of implicit behavior trajectories of expiration-sensitive drugs to generate drug sales trend prediction results that include compensation for supply chain disruptions.

2. The drug sales trend analysis and forecasting system based on big data according to claim 1, characterized in that: Obtain the length of time spent at logistics nodes in the pharmaceutical supply chain and the batch inventory turnover rate of expiration-sensitive drugs, including: Collect the real-time positioning information of drug transport vehicles at logistics nodes, and extract the time interval of the transport vehicles staying at the preset logistics nodes as the length of stay at the logistics nodes; Target drugs are screened based on the expiration-sensitive identification field in the drug attribute database. The incoming batch records and outgoing batch timestamps of the target drugs at the storage node are retrieved, and the inventory turnover period of adjacent batches is calculated as the batch inventory turnover rate. Align the logistics node detention time and batch inventory turnover cycle to a unified data collection time window based on the time dimension.

3. The drug sales trend analysis and forecasting system based on big data according to claim 1, characterized in that: Based on the dynamic comparison results of the detention time of logistics nodes and the preset threshold interval, the interruption type of the supply chain disruption event is identified, including: Dynamically adjust the upper and lower boundary values ​​of the preset threshold range, and dynamically adjust the quantiles based on historical logistics data statistics and real-time logistics node operation efficiency parameters; Classify abnormal events where the length of time spent at a logistics node exceeds a preset threshold, and combine this with the decrease in the batch inventory turnover rate at the corresponding logistics node to determine whether the disruption is a logistics stagnation disruption or an inventory shortage disruption. Verify the judgment results of logistics stagnation type interruption and inventory shortage type interruption, and verify that it is achieved through the timestamp matching of the transportation tool scheduling records of the logistics node and the inventory replenishment records of the storage node.

4. The drug sales trend analysis and forecasting system based on big data according to claim 1, characterized in that: Obtain consumer behavior data and analyze the degree of deviation of implicit behavior trajectories. The degree of deviation of implicit behavior trajectories is generated by correlating the dynamic time warp distance of the interactive behavior sequence with the chaotic attractor dimension offset, including: Extract the consumer's interactive behavior sequence within a preset time window, including explicit behavior trajectories and implicit behavior trajectories; The explicit behavior trajectory and the implicit behavior trajectory are aligned in the time dimension, and the morphological difference between the two types of trajectories is calculated by dynamic time warping distance. The dynamic time warping distance aligns the local time offset of the explicit behavior trajectory and the implicit behavior trajectory by finding the minimum path cost; Construct a chaotic attractor of the implicit behavior trajectory, map the interactive behavior sequence into a high-dimensional phase space point set through phase space reconstruction technology, and calculate the fractal dimension offset of the attractor. The fractal dimension offset is the absolute value of the difference between the attractor dimension during the shortage period and the attractor dimension during the historical normal period. The morphological difference and fractal dimension offset are normalized and fused to generate a trajectory deviation parameter that represents the degree of deviation of consumers' implicit behavioral trajectory.

5. The drug sales trend analysis and forecasting system based on big data according to claim 4, characterized in that: The explicit behavior trajectory includes drug search, price comparison, and add-to-cart operation sequences, while the implicit behavior trajectory includes page dwell time, click hot zone distribution, and return browsing behavior sequence.

6. The drug sales trend analysis and forecasting system based on big data according to claim 1, characterized in that: The migration distribution, spatiotemporal propagation parameters, and degree of deviation of latent behavior trajectories of expiration-sensitive drugs are integrated and analyzed to generate drug sales trend forecasts that include supply chain disruption compensation, including: The time window of the migration volume distribution is matched with the time decay gradient of the spatiotemporal propagation parameter to generate the spatiotemporal consistency coefficient of the inventory turnover rate fluctuation among regions. The degree of deviation of implicit behavior trajectories was correlated with the spatial diffusion radius of spatiotemporal propagation parameters, and the geographical coupling between the behavior suppression effect and inventory shortage was calculated using the Pearson correlation coefficient. A nonlinear regression model is constructed for the distribution of migration volume, spatiotemporal propagation parameters, and the degree of deviation of implicit behavior trajectories. The model trains the weight matrix by mapping the actual sales recovery rate in historical disruption events with the three types of parameters. The drug sales trend forecast results are generated based on the spatiotemporal consistency coefficient, geographic coupling degree and the output value of the nonlinear regression model.

Citation Information

Patent Citations

  • Intelligent medicine inventory management and optimization system

    CN119130332A

  • System and method for inventory management

    US20170068973A1