An inventory optimization system and method based on multi-source data
By using a multi-source data-driven inventory optimization system, and leveraging LSTM neural networks and optimization algorithms to optimize warehouse layout and replenishment strategies, the system solves the problems of low resource utilization and long lead times in traditional inventory management, achieving scientific inventory management and efficient inventory turnover.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 江苏虫洞电商科技有限公司
- Filing Date
- 2025-04-23
- Publication Date
- 2026-06-19
AI Technical Summary
Traditional inventory management methods cannot effectively handle complex market data and dynamically changing market demands, resulting in low warehouse resource utilization, excessive product storage time, increased costs and risks, and a lack of scientific basis for replenishment quantity and timing, which is easily affected by subjective factors.
An inventory optimization system based on multi-source data is adopted. It uses LSTM neural network to predict future market demand, combines genetic algorithm and dynamic programming algorithm to optimize warehouse layout and replenishment strategy, uses moving average method to predict sales volume, and adjusts replenishment time and frequency according to logistics data to formulate a scientific inventory utilization plan.
It enables the rational use of warehouse resources, shortens the storage time of products in the warehouse, improves the efficiency and flexibility of inventory management, increases inventory turnover, and reduces inventory costs and risks.
Smart Images

Figure CN120387774B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of inventory optimization technology, specifically an inventory optimization system and method based on multi-source data. Background Technology
[0002] As a key link between production and sales, the efficiency of inventory management directly affects a company's operating costs and market competitiveness. Rapid changes in market demand, accelerated product updates, and increasing customer demands for service quality all drive companies to seek more scientific and efficient inventory management methods.
[0003] Traditional forecasting methods, such as simple time series analysis or empirical forecasting, cannot effectively handle complex market data and dynamically changing market demands. Regarding warehouse resource consumption, existing technologies lack comprehensive and systematic optimization methods. In terms of space resources, warehouse layouts often lack scientific planning, leading to low space utilization. Regarding time resources, excessively long product storage times increase inventory costs and the risk of goods damage. Current inventory management often lacks scientific basis for determining replenishment quantities and times, making it susceptible to subjective factors. Summary of the Invention
[0004] The purpose of this invention is to provide an inventory optimization system and method based on multi-source data to solve the problems raised in the prior art.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] In a first aspect, the present invention provides an inventory optimization method based on multi-source data, comprising the following steps:
[0007] Acquire production and sales data, merge them to obtain multi-source data, use the multi-source data to train an LSTM neural network, and predict future market demand.
[0008] Based on future market demand, objective functions and constraints are set for spatial resource consumption and time resource consumption, respectively. The corresponding objective functions are solved to calculate the minimum warehouse resource consumption.
[0009] The moving average method is used to process historical sales data to predict future sales volume of warehouse products; the future sales volume is combined with the current inventory and the amount in transit to calculate the replenishment quantity.
[0010] Obtain logistics data, determine replenishment time based on logistics transportation time, and adjust replenishment quantity according to transportation capacity; based on replenishment time and replenishment quantity, use dynamic programming algorithm to obtain the optimal delivery frequency, match the optimal delivery frequency with inventory, and obtain inventory utilization plan.
[0011] In conjunction with the first aspect, in the first implementation of the first aspect of this application, the step of acquiring production data and sales data, fusing them to obtain multi-source data, and using the multi-source data to train an LSTM neural network to predict future market demand includes:
[0012] Acquire production and sales data, using product ID as the association field to ensure that the production and sales data are aligned in time. Create a data table in a relational database to merge the production and sales data to obtain multi-source data.
[0013] Set up the input, hidden, and output layers of the LSTM neural network, determine the parameters of the LSTM neural network, arrange the multi-source data in chronological order, and divide it into training, validation, and test sets according to the proportions to construct a data sequence; perform forward and backward propagation to evaluate and adjust the LSTM neural network; users input product production and sales data into the trained LSTM neural network to obtain predicted future market demand, specifically capacity constraints, supply chain constraints, and order fulfillment rates.
[0014] In conjunction with the first aspect, in the second implementation of the first aspect of this application, the step of setting objective functions and constraints based on future market demand in terms of spatial resource consumption and time resource consumption, solving the corresponding objective functions, and calculating the minimum warehouse resource consumption includes:
[0015] The warehouse resource consumption includes space resource consumption and time resource consumption. In terms of space resource consumption, while meeting future market demand, the space occupied by products in the warehouse is reduced. An optimization layout algorithm is used to optimize the warehouse layout based on the space occupied by the products and the sales speed, thereby reducing space resource consumption. In terms of time resource consumption, based on future market demand and sales data, a time optimization algorithm is used to schedule procurement time, determine the optimal procurement time, and reduce the storage time of products in the warehouse.
[0016] Based on the optimized warehouse layout, the space resource consumption index is obtained by calculating the utilization rate of the total warehouse volume; the product storage time corresponding to the optimal procurement time point is converted into a time length index to obtain a time resource consumption index; based on the space resource consumption index and the time resource consumption index, the minimum warehouse resource consumption is obtained by weighted summation.
[0017] In conjunction with the first aspect, in the third implementation of the first aspect of this application, the use of an optimized layout algorithm to optimize the warehouse layout based on the product's occupied space and sales speed, thereby reducing space resource consumption, includes:
[0018] To obtain the product's occupied space and sales speed, an optimization layout algorithm is used to select a genetic algorithm. The objective function of the genetic algorithm is to reduce space resource consumption. The constraints of the genetic algorithm include product correlation constraints, storage condition constraints, and aisle and handling equipment constraints. Among them, product correlation constraints mean that products with correlation are placed in adjacent positions to reduce picking paths and time. Storage condition constraints mean that products have the same storage condition requirements. For products with the same storage condition requirements, they are arranged in the same storage area. Aisle and handling equipment constraints mean that the space reserved for the setting of aisles in the warehouse and the operating space of handling equipment are reserved.
[0019] In the genetic algorithm, the initial population size is determined, and the maximum number of iterations, crossover probability, and mutation probability are set. The warehouse is divided into several storage regions, each corresponding to a gene locus on a chromosome, with the gene locus value representing the product number stored in that region. During the iteration process, new layout schemes are generated through crossover and mutation operations, and the new schemes are decoded to obtain the actual warehouse layout. Based on the objective function and constraints of the genetic algorithm, a fitness value is calculated for each layout scheme, reflecting the degree to which the layout scheme reduces space resource consumption. New populations are continuously generated through selection, crossover, and mutation operations. The optimal layout scheme generated by the genetic algorithm is evaluated, adjusted, and optimized, and the optimal layout scheme is implemented.
[0020] In conjunction with the first aspect, in the fourth implementation of the first aspect of this application, the step of scheduling procurement time based on future market demand and sales data using a time optimization algorithm to determine the optimal procurement time and reduce product inventory storage time includes:
[0021] The time optimization algorithm selected is dynamic programming. Based on the procurement timeframe and the time distribution of future market demand, the procurement time is divided into several stages. The state of each stage is defined, including current inventory quantity, remaining production capacity, and remaining supplier supply capacity. The decision variable for each stage is determined, specifically the procurement quantity. A state transition equation is established based on production, supply, and sales conditions. An objective function is constructed with the goal of minimizing product storage time, and the sum of the products of inventory quantity and product storage time for each stage is calculated. The constraints of the dynamic programming algorithm include market demand constraints, production capacity constraints, supply capacity constraints, and inventory non-negativity constraints.
[0022] The initial state is determined, including the initial inventory quantity, the company's initial production capacity, and the supplier's initial supply capacity. The objective function value for the initial stage is set to 0. Starting from the first stage, based on the state transition equation, objective function, and constraints, the next stage state and objective function value corresponding to different purchase quantities in the current state are calculated. The purchase quantity that minimizes the objective function value is selected as the optimal decision for the current stage, and the state of the next stage is taken as the new current state, thus entering the calculation for the next stage. After completing the calculation for all stages, the optimal purchase time point from the initial stage to the final stage is obtained through a backtracking process. Starting from the optimal purchase time point of the final stage, based on the state transition equation and decision records, the process is gradually backtracked to the initial stage to determine the optimal purchase time point and purchase quantity for each stage.
[0023] In conjunction with the first aspect, in the fifth implementation of the first aspect of this application, the step of using the moving average method to process historical sales data and predict future sales volume of warehouse products includes:
[0024] The moving average period is determined and matched with the seasonal cycle of the product; the moving average period is n, and the moving average is calculated sequentially for historical sales data from 1 to n months; the moving average is extrapolated to predict the sales volume for the (n+1)th month; as time goes on, the predicted future sales volume is compared with the actual sales data; the prediction error is calculated using the mean absolute error to measure the degree of deviation between the predicted value and the actual value, and the moving average period is adjusted when the degree of deviation exceeds a set threshold.
[0025] In conjunction with the first aspect, in the sixth implementation of the first aspect of this application, the step of calculating the replenishment quantity by combining future sales volume with existing inventory and in-transit quantity includes:
[0026] The first formula for calculating replenishment quantity is RQ=FS-CI-ITQ, where RQ is the replenishment quantity, FS is the future sales quantity, CI is the current inventory quantity, and ITQ is the quantity in transit. For products whose historical sales data fluctuations exceed a set threshold, a safety stock TQ is introduced, and the second formula for calculating replenishment quantity is used, which is: RQ=FS-CI-ITQ-TQ.
[0027] In conjunction with the first aspect, in the seventh implementation of the first aspect of this application, the step of obtaining logistics data, determining the replenishment time based on the logistics transportation time, and adjusting the replenishment quantity based on the transportation capacity includes:
[0028] Establish data sharing interfaces with logistics providers to extract the average transportation time for various products from the supplier's shipping location to the warehouse; obtain the transportation capacity of different transportation vehicles from logistics providers, including the maximum single transportation volume and transportation frequency per unit time;
[0029] The replenishment time is determined based on the logistics and transportation time, and a replenishment time model is established, as shown in the following formula: Where RT is the replenishment time in days, ADFS is the future average daily sales volume (calculated by dividing the future sales volume FS by the number of days in the current month), LTT is the logistics and transportation time, and SLT is the safety lead time, representing the extra time reserved by the user. When there is a delay in logistics and transportation, the replenishment time is adjusted accordingly based on the actual delay. When the sales speed increases or decreases, the estimated time to sell off the current inventory and the amount in transit are recalculated, and the replenishment time is adjusted accordingly.
[0030] By comparing the calculated replenishment quantity with the logistics provider's transportation capacity, the replenishment quantity is split when it exceeds the maximum single transport capacity of the transportation vehicle.
[0031] In conjunction with the first aspect, in the eighth implementation of the first aspect of this application, the step of obtaining the optimal delivery frequency using a dynamic programming algorithm based on replenishment time and replenishment quantity, and matching the optimal delivery frequency with inventory to obtain an inventory utilization plan, includes:
[0032] Based on replenishment time, the inventory management cycle is divided into several stages. State variables for each stage are defined, including current inventory level, remaining replenishment quantity, and number of completed deliveries. The decision variable for each stage is determined as delivery frequency, specifically deciding whether to perform a delivery and the number of deliveries in that stage. A state transition equation is established based on inventory changes, replenishment operations, and the delivery process. An objective function is constructed to minimize inventory backlog and stockout risks. The initial state is determined, specifically the inventory, remaining replenishment quantity, and number of deliveries for the first stage. Boundary conditions are set for each stage, specifically an upper and lower limit for the delivery frequency. The upper limit is determined based on transportation capacity, and the lower limit is determined based on the need to ensure normal inventory turnover.
[0033] Starting from the first stage, based on the state transition equation, objective function, and boundary conditions, calculate the next stage state and objective function value corresponding to different delivery frequency decisions in the current state; select the delivery frequency that minimizes the objective function value as the optimal decision for the current stage, take the state of the next stage as the new current state, and proceed to the next stage calculation; after completing the calculation of all stages, obtain the optimal delivery frequency from the initial stage to the final stage through a backtracking process.
[0034] Establish a correlation model between optimal delivery frequency and inventory, coordinate inventory and delivery time points, and thus obtain an inventory utilization plan.
[0035] Secondly, the present invention provides an inventory optimization system based on multi-source data, comprising:
[0036] The data acquisition and forecasting module includes a data acquisition unit and a demand forecasting unit. The data acquisition unit acquires production data and sales data and merges them to obtain multi-source data. The demand forecasting unit uses the multi-source data to train an LSTM neural network to predict future market demand.
[0037] The objective solution module includes an initial setting unit and an optimization algorithm solution unit. The initial setting unit sets objective functions and constraints based on future market demand in terms of spatial resource consumption and time resource consumption, respectively. The optimization algorithm solution unit solves the corresponding objective functions and calculates the minimum warehouse resource consumption.
[0038] The replenishment quantity calculation module includes a moving average processing unit and a replenishment quantity calculation unit. The moving average processing unit uses the moving average method to process historical sales data and predict the future sales volume of warehouse products. The replenishment quantity calculation unit combines the future sales volume with the current inventory and the quantity in transit to calculate the replenishment quantity.
[0039] The inventory planning module includes a replenishment quantity adjustment unit, a dynamic programming solution unit, and an inventory planning unit. The replenishment quantity adjustment unit acquires logistics data, determines the replenishment time based on logistics transportation time, and adjusts the replenishment quantity according to transportation capacity. The dynamic programming solution unit uses a dynamic programming algorithm to obtain the optimal delivery frequency based on the replenishment time and replenishment quantity. The inventory planning unit matches the optimal delivery frequency with the inventory to obtain the inventory usage plan.
[0040] Compared with the prior art, the beneficial effects of the present invention are:
[0041] 1. Based on future market demand, this invention sets objective functions and constraints from two aspects: spatial resource consumption and time resource consumption, and solves them using optimization algorithms; it can achieve the rational utilization of warehouse space resources and effectively shorten the storage time of products in the warehouse while meeting market demand.
[0042] 2. This invention uses the moving average method to process historical sales data, accurately predict future sales volume, and scientifically calculates replenishment quantity by combining existing inventory and in-transit quantity; it determines replenishment time based on logistics transportation time, adjusts replenishment quantity according to transportation capacity, and uses dynamic programming algorithm to obtain the optimal delivery frequency; it enables close coordination between replenishment and delivery, improving the efficiency and flexibility of inventory management.
[0043] 3. This invention matches the optimal delivery frequency with inventory to formulate a reasonable inventory utilization plan; by optimizing inventory layout, formulating scientific inventory utilization strategies, and monitoring inventory levels in real time, it can effectively improve inventory turnover rate. Attached Figure Description
[0044] Figure 1This is a schematic diagram illustrating the steps of an inventory optimization method based on multi-source data according to the present invention;
[0045] Figure 2 This is a system architecture diagram of an inventory optimization system based on multi-source data according to the present invention. Detailed Implementation
[0046] 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.
[0047] like Figure 1 The present invention provides an inventory optimization method based on multi-source data, comprising the following steps: (The diagram illustrates the steps outlined in the original text.)
[0048] Step S100: Acquire production data and sales data, fuse them to obtain multi-source data, use the multi-source data to train an LSTM neural network, and predict future market demand;
[0049] Specifically, production and sales data are acquired, with product ID as the association field to ensure that the production and sales data are aligned in time. Data tables are created in a relational database to merge the production and sales data, resulting in multi-source data.
[0050] Set up the input, hidden, and output layers of the LSTM neural network, determine the parameters of the LSTM neural network, arrange the multi-source data in chronological order, and divide it into training, validation, and test sets according to the proportions to construct a data sequence; perform forward and backward propagation to evaluate and adjust the LSTM neural network; users input product production and sales data into the trained LSTM neural network to obtain predicted future market demand, specifically capacity constraints, supply chain constraints, and order fulfillment rates.
[0051] In one specific embodiment, the number of input layer nodes in the LSTM neural network is determined based on the dimensions of production and sales data. Production data includes three dimensions: production quantity, production batch, and production time; sales data includes three dimensions: sales quantity, sales channel, and customer type. Therefore, the number of input layer nodes is set to 6. Two hidden layers are set, with 50 neurons in each hidden layer. The ReLU activation function is chosen for the hidden layers. The number of output layer nodes is set to 3, corresponding to capacity constraints, supply chain constraints, and order fulfillment rate, respectively. The linear activation function is chosen for the output layers. The learning rate is set to 0.001, the number of iterations is set to 1000, and the mean squared error (MSE) loss function is chosen. The 12 multi-source data points are arranged in chronological order and divided into training, validation, and test sets at a ratio of 70%, 15%, and 15%, respectively. That is, the training set contains 8 data points, and the validation and test sets each contain 2 data points. The production and sales data from each data point are combined to form a data sequence, which is used as the input to the LSTM neural network. The training data is input into the LSTM neural network via forward propagation. After computation by the hidden layers, the predicted result is output. This predicted result is compared with actual capacity constraints, supply chain constraints, and order fulfillment rates, and the mean squared error is calculated as the loss value. Then, through backpropagation, the parameters of the neural network are adjusted based on the loss value to continuously optimize the model. During training, the model is evaluated using a validation set, and the change in the loss value on the validation set is observed. When the loss value on the validation set no longer decreases, the model is considered to have converged, and training stops.
[0052] Two data points from the test set are input into the trained LSTM neural network. For example, one test data point corresponds to the following production data: production quantity 12,000 units, 3 production batches, production dates March 1-10, March 15-20, and March 25-31; and sales data: sales quantity 10,000 units, with 6,000 units sold online through e-commerce platforms, 4,500 units purchased by individual consumers, 1,500 units purchased by enterprise customers, and 4,000 units sold offline through physical stores, with 3,500 units purchased by individual consumers and 500 units purchased by enterprise customers. The LSTM neural network calculates and predicts future market demand. The predicted production capacity limit is 13,000 units (representing the maximum quantity the company can theoretically produce in the next phase), the supply chain constraint is a potential one-week delay in raw material supply (affecting production progress), and the order fulfillment rate is 85% (representing the percentage of orders expected to be fulfilled under current production and sales conditions). Comparison with actual results shows that the predictions are quite close to the actual situation, validating the effectiveness of the LSTM neural network in predicting future market demand.
[0053] Step S200: Based on future market demand, set objective functions and constraints for spatial resource consumption and time resource consumption respectively, solve the corresponding objective functions, and calculate the minimum warehouse resource consumption.
[0054] Specifically, the warehouse resource consumption includes space resource consumption and time resource consumption. In terms of space resource consumption, while meeting future market demand, the space occupied by products in the warehouse is reduced. An optimization layout algorithm is used to optimize the warehouse layout based on the space occupied by the products and the sales speed, thereby reducing space resource consumption. In terms of time resource consumption, based on future market demand and sales data, a time optimization algorithm is used to schedule procurement time, determine the optimal procurement time, and reduce the storage time of products in the warehouse.
[0055] Based on the optimized warehouse layout, the space resource consumption index is obtained by calculating the utilization rate of the total warehouse volume; the product storage time corresponding to the optimal procurement time point is converted into a time length index to obtain a time resource consumption index; based on the space resource consumption index and the time resource consumption index, the minimum warehouse resource consumption is obtained by weighted summation.
[0056] Furthermore, to obtain the product's occupied space and sales speed, the optimization layout algorithm is used to select a genetic algorithm. The objective function of the genetic algorithm is to reduce space resource consumption. The constraints of the genetic algorithm include product correlation constraints, storage condition constraints, and aisle and handling equipment constraints. Among them, the product correlation constraint means that products with correlation are placed in adjacent positions to reduce picking paths and time. The storage condition constraint means the storage condition requirements of the products. For products with the same storage condition requirements, they are arranged in the same storage area. The aisle and handling equipment constraint means reserving space for the setting of aisles in the warehouse and the operation space of handling equipment.
[0057] In the genetic algorithm, the initial population size is determined, and the maximum number of iterations, crossover probability, and mutation probability are set. The warehouse is divided into several storage regions, each corresponding to a gene locus on a chromosome, with the gene locus value representing the product number stored in that region. During the iteration process, new layout schemes are generated through crossover and mutation operations, and the new schemes are decoded to obtain the actual warehouse layout. Based on the objective function and constraints of the genetic algorithm, a fitness value is calculated for each layout scheme, reflecting the degree to which the layout scheme reduces space resource consumption. New populations are continuously generated through selection, crossover, and mutation operations. The optimal layout scheme generated by the genetic algorithm is evaluated, adjusted, and optimized, and the optimal layout scheme is implemented.
[0058] Furthermore, the time optimization algorithm selects dynamic programming, which divides the procurement time into several stages based on the procurement time range and the time distribution of future market demand; defines the state of each stage, including the current inventory quantity, remaining production capacity, and remaining supplier supply capacity; determines the decision variable for each stage, specifically the procurement quantity; establishes a state transition equation based on production, supply, and sales; constructs an objective function with the goal of minimizing product storage time, and calculates the sum of the products of inventory quantity and product storage time for each stage; the constraints of the dynamic programming algorithm include market demand constraints, production capacity constraints, supply capacity constraints, and inventory non-negativity constraints.
[0059] The initial state is determined, including the initial inventory quantity, the company's initial production capacity, and the supplier's initial supply capacity. The objective function value for the initial stage is set to 0. Starting from the first stage, based on the state transition equation, objective function, and constraints, the next stage state and objective function value corresponding to different purchase quantities in the current state are calculated. The purchase quantity that minimizes the objective function value is selected as the optimal decision for the current stage, and the state of the next stage is taken as the new current state, thus entering the calculation for the next stage. After completing the calculation for all stages, the optimal purchase time point from the initial stage to the final stage is obtained through a backtracking process. Starting from the optimal purchase time point of the final stage, based on the state transition equation and decision records, the process is gradually backtracked to the initial stage to determine the optimal purchase time point and purchase quantity for each stage.
[0060] In one specific embodiment, a genetic algorithm is configured with the following settings: initial population size: 50 layout schemes, i.e., 50 chromosomes; maximum number of iterations: 200; crossover probability: 0.8; mutation probability: 0.05. Product relevance constraints: Model A and its matching phone case are known to be related and must be placed in adjacent positions. Storage constraints: Models A, B, and C are all ordinary electronic products with the same storage conditions and can be arranged in the same storage area. Aisle and handling equipment constraints: the aisle width within the warehouse must be 2 meters, and the operating space for handling equipment in each storage area must be at least 10 square meters.
[0061] Each storage area corresponds to a gene locus on a chromosome, with the gene locus value representing the product number stored in that area. For example, the chromosome [1,2,0,1,2,3,0,3,2,1] indicates that areas 1, 4, and 10 store model A, areas 2, 5, and 9 store model B, areas 3 and 7 are empty, and areas 6 and 8 store model C. Calculate the overall warehouse volume utilization rate for each layout scheme. For example, in a certain layout scheme, model A occupies 3 areas, totaling 3 × 250 × 0.05 = 37.5 cubic meters; model B occupies 3 areas, totaling 3 × 250 × 0.06 = 45 cubic meters; and model C occupies 2 areas, totaling 2 × 250 × 0.08 = 40 cubic meters, for a total space of 37.5 + 45 + 40 = 122.5 cubic meters. Therefore, the overall warehouse volume utilization rate for this scheme is 122.5 ÷ 2500 = 4.9%. The fitness value is related to the total warehouse volume utilization rate. The higher the utilization rate, the greater the fitness value (for ease of calculation, here the fitness value = total warehouse volume utilization rate × 100). The fitness value of this scheme is 4.9.
[0062] Using a roulette wheel selection algorithm, chromosomes with high fitness are chosen for the next generation. For example, if the total fitness value is 200 and a chromosome has a fitness value of 5, its probability of being selected is 5 ÷ 200 = 2.5%. The selected chromosomes undergo crossover and mutation operations to generate new layout schemes. After 200 iterations, the optimal layout scheme is obtained. The optimal layout scheme is [1,1,2,2,3,3,1,2,3,0], at which point the total warehouse volume utilization rate is 6%, a significant improvement compared to the initial scheme. After implementing this scheme, space resource consumption is reduced, and picking routes are optimized due to product relevance constraints.
[0063] A dynamic programming algorithm is used to divide the next 6 months into 6 phases. The state of each phase includes the current inventory quantity (I), remaining production capacity (P), and remaining supplier supply capacity (S). For example, the initial state of the first phase is (500, 1000, 800). The decision variable is the purchase quantity (Q) for each phase.
[0064] Market demand constraint: The inventory quantity plus the production quantity and the procurement quantity at each stage must meet market demand, i.e., I + P + Q ≥ market demand. Production capacity constraint: The production quantity cannot exceed the firm's remaining production capacity, i.e., production quantity ≤ P. The procurement quantity cannot exceed the supplier's remaining supply capacity, i.e., Q ≤ S. The inventory quantity cannot be negative, i.e., I ≥ 0.
[0065] The inventory quantity for the next stage is I' = I + P + Q - market demand; the remaining production capacity for the next stage is P' = P - production quantity; the remaining supplier supply capacity for the next stage is S' = SQ. For example, in the first stage, if the purchase quantity Q = 300 units, the production quantity is 800 units (not exceeding production capacity), and the market demand is 1200 units, then the inventory quantity for the next stage is I' = 500 + 800 + 300 - 1200 = 400 units, the remaining production capacity is P' = 1000 - 800 = 200 units, and the remaining supplier supply capacity is S' = 800 - 300 = 500 units.
[0066] The objective is to minimize product inventory time, which is directly proportional to the inventory quantity. For example, if the inventory quantity in the first stage is 500 units and the inventory time is one month, then the contribution of the objective function value in this stage is 500 × 1 = 500. The objective function value is calculated for each stage, and the purchase quantity that minimizes the objective function value is selected as the optimal decision for the current stage. After completing the calculations for all six stages, the optimal purchase time and quantity from the initial stage to the final stage are obtained through backtracking. The backtracking results show that 300 units, 200 units, and 300 units are purchased in months 1, 3, and 5 respectively, at which point the total product inventory time is minimized.
[0067] Based on the optimized warehouse layout, the total warehouse volume utilization rate is 6%, and the space resource consumption index is set to 1-6%=94% (the smaller the index value, the lower the space resource consumption). The total product storage time obtained through dynamic programming is 1500 months (each mobile phone stored for one month is counted as one month). The time resource consumption index is set to 1500÷(6×1200+500)≈0.2 (total demand is the projected demand for 6 months plus initial inventory; the smaller the index value, the lower the time resource consumption). The weight of the space resource consumption index is 0.6, and the weight of the time resource consumption index is 0.4. Therefore, the minimum warehouse resource consumption = 0.6×94%+0.4×0.2=0.644. By continuously adjusting the weights and optimizing the algorithm parameters, the minimum warehouse resource consumption can be further reduced.
[0068] Step S300: Use the moving average method to process historical sales data and predict future sales volume of warehouse products; combine future sales volume with current inventory and in-transit quantity to calculate replenishment quantity;
[0069] Specifically, the moving average period is determined and matched with the product's seasonal cycle; the moving average period is n, and the moving average is calculated sequentially for historical sales data from 1 to n months; the moving average is extrapolated to predict the sales volume for the (n+1)th month; as time progresses, the predicted future sales volume is compared with the actual sales data; the mean absolute error is used to calculate the prediction error, measuring the degree of deviation between the predicted value and the actual value; when the degree of deviation exceeds a set threshold, the moving average period is adjusted.
[0070] Furthermore, the first formula for calculating the replenishment quantity is RQ=FS-CI-ITQ, where RQ is the replenishment quantity, FS is the future sales quantity, CI is the current inventory quantity, and ITQ is the quantity in transit. For products whose historical sales data fluctuations exceed a set threshold, a safety stock TQ is introduced, and the second formula for calculating the replenishment quantity is used, specifically: RQ=FS-CI-ITQ-TQ.
[0071] In one specific embodiment, for models A and B, due to their seasonal characteristics, the moving average period n is set to 3 months to match the seasonal cycle. For model C, because its sales are stable, the moving average period n is set to 6 months. The moving average is then calculated and future sales volume is predicted.
[0072] The actual sales data for the 13th month are as follows: Model A: 1800 units, Model B: 1400 units, Model C: 980 units. The Mean Absolute Error (MAE) is calculated as follows: Model A: |1833.33-1800|=33.33 units, Model B: |1433.33-1400|=33.33 units, Model C: |951.67-980|=28.33 units. The deviation threshold is set at 50 units. Since the prediction errors for Models A, B, and C do not exceed the threshold, the current moving average period will not be adjusted. If the prediction error in subsequent months exceeds the threshold, for example, if the predicted sales volume for Model A in the 14th month is 1900 units, and the actual sales volume is 1800 units, the error is |1900-1800|=100 units > 50 units. In this case, the moving average period will be shortened, such as adjusting the moving average period for Model A from 3 months to 2 months, and the moving average and predicted sales volume will be recalculated.
[0073] Current moment:
[0074] Model A: Current inventory CI = 300 units, in-transit ITQ = 200 units;
[0075] Model B: Current inventory CI = 250 units, in-transit ITQ = 150 units;
[0076] Model C: Current inventory CI = 180 units, in-transit ITQ = 120 units.
[0077] If the historical sales data of Model A fluctuates beyond a set threshold (for example, the sales data fluctuation exceeds 20% in a certain number of months), a safety stock of TQ = 100 units is introduced. At this time, the replenishment quantity of Model A is calculated using the second formula: RQ = 1833.33 - 300 - 200 - 100 = 1233.33 ≈ 1233 units.
[0078] Step S400: Obtain logistics data, determine replenishment time based on logistics transportation time, and adjust replenishment quantity according to transportation capacity; based on replenishment time and replenishment quantity, use dynamic programming algorithm to obtain the optimal delivery frequency, match the optimal delivery frequency with inventory, and obtain inventory utilization plan.
[0079] Specifically, establish data sharing interfaces with logistics providers to extract the average transportation time for various products from the supplier's shipping location to the warehouse; obtain the transportation capacity of different transportation vehicles from the logistics providers, including the maximum single transportation volume and the transportation frequency per unit time;
[0080] The replenishment time is determined based on the logistics and transportation time, and a replenishment time model is established, as shown in the following formula: Where RT is the replenishment time in days, ADFS is the future average daily sales volume (calculated by dividing the future sales volume FS by the number of days in the current month), LTT is the logistics and transportation time, and SLT is the safety lead time, representing the extra time reserved by the user. When there is a delay in logistics and transportation, the replenishment time is adjusted accordingly based on the actual delay. When the sales speed increases or decreases, the estimated time to sell off the current inventory and the amount in transit are recalculated, and the replenishment time is adjusted accordingly.
[0081] By comparing the calculated replenishment quantity with the logistics provider's transportation capacity, the replenishment quantity is split when it exceeds the maximum single transport capacity of the transportation vehicle.
[0082] Furthermore, based on replenishment time, the inventory management cycle is divided into several stages, defining state variables for each stage, including current inventory level, remaining replenishment quantity, and number of completed deliveries; the decision variable for each stage is determined as delivery frequency, specifically deciding whether to perform a delivery in this stage and the number of deliveries; a state transition equation is established based on inventory changes, replenishment operations, and the delivery process; an objective function is constructed with the goal of minimizing inventory backlog and stockout risks; the initial state is determined, specifically the inventory, remaining replenishment quantity, and number of deliveries in the first stage; boundary conditions are set for each stage, specifically the upper and lower limits of the delivery frequency, with the upper limit determined based on transportation capacity and the lower limit determined based on the need to ensure normal inventory turnover.
[0083] Starting from the first stage, based on the state transition equation, objective function, and boundary conditions, calculate the next stage state and objective function value corresponding to different delivery frequency decisions in the current state; select the delivery frequency that minimizes the objective function value as the optimal decision for the current stage, take the state of the next stage as the new current state, and proceed to the next stage calculation; after completing the calculation of all stages, obtain the optimal delivery frequency from the initial stage to the final stage through a backtracking process.
[0084] Establish a correlation model between optimal delivery frequency and inventory, coordinate inventory and delivery time points, and thus obtain an inventory utilization plan.
[0085] In one specific embodiment, the replenishment quantity is adjusted according to transportation capacity. For example, for model A: the calculated replenishment quantity RQ is 1333 units (rounded down from the previous 1333.33 units). The maximum transport capacity of a single truck is 300 units. 1333 ÷ 300 = 4 remainder 133, so the replenishment quantity is split into 5 transports. The first 4 transports each carry 300 units, and the last transport carries 133 units.
[0086] The optimal delivery frequency is determined using a dynamic programming algorithm. Taking model A as an example, the inventory management cycle is 30 days, divided into 15 stages based on a 2-day replenishment time. The state variables for each stage are: Current inventory level I: e.g., in stage 1, I = 300 units (initial inventory quantity). Remaining replenishment quantity R: in stage 1, R = 1333 units (calculated replenishment quantity). Number of completed deliveries D: in stage 1, D = 0. The decision variable is delivery frequency x: its value ranges from 0 (no delivery), 1 (one delivery), 2 (two deliveries), etc. Boundary conditions: Upper limit of delivery frequency: the truck can transport twice a day, and the upper limit of delivery frequency within 2 days is 4 times. Considering practical operation, it is set to 3 times. Lower limit of delivery frequency: to ensure normal inventory turnover, it is set to 1 time.
[0087] State transition equation: Next stage inventory level I' = I + (x × 300) - (ADFS × 2) (300 units delivered each time, where 2 represents the stage duration of 2 days); Remaining replenishment quantity R' = R - (x × 300); Number of completed deliveries D' = D + x. Objective function: To minimize inventory backlog and stockout risks, let the inventory backlog cost coefficient be w1 = 0.6 and the stockout cost coefficient be w2 = 0.8. The objective function Z = w1 × max(0, I') + w2 × max(0, R') (where the max function is used to determine the cost of inventory backlog or stockout). Starting from the first stage, calculate the next stage state and objective function value corresponding to different delivery frequencies x. Select the delivery frequency that minimizes the objective function value as the optimal decision for the current stage and proceed to the next stage calculation. After 15 stages of calculation and backtracking, the optimal delivery frequency from the initial stage to the final stage is 3 deliveries every 2 days.
[0088] For Model A, deliveries are made three times every two days, with approximately 300 units delivered each time. The warehouse prepares the space and manpower to receive the goods one day in advance. For example, a storage area capable of holding 300 phones is arranged on the first day, and loading and unloading personnel are deployed. Due to the high delivery frequency of Model A, a First-In, First-Out (FIFO) inventory management strategy is employed to ensure that the phones that enter the warehouse first are sold first, reducing the risk of inventory backlog.
[0089] like Figure 2 The system structure diagram of an inventory optimization system based on multi-source data according to the present invention is shown. The present invention provides an inventory optimization system based on multi-source data, comprising:
[0090] The data acquisition and forecasting module includes a data acquisition unit and a demand forecasting unit. The data acquisition unit acquires production data and sales data and merges them to obtain multi-source data. The demand forecasting unit uses the multi-source data to train an LSTM neural network to predict future market demand.
[0091] The objective solution module includes an initial setting unit and an optimization algorithm solution unit. The initial setting unit sets objective functions and constraints based on future market demand in terms of spatial resource consumption and time resource consumption, respectively. The optimization algorithm solution unit solves the corresponding objective functions and calculates the minimum warehouse resource consumption.
[0092] The replenishment quantity calculation module includes a moving average processing unit and a replenishment quantity calculation unit. The moving average processing unit uses the moving average method to process historical sales data and predict the future sales volume of warehouse products. The replenishment quantity calculation unit combines the future sales volume with the current inventory and the quantity in transit to calculate the replenishment quantity.
[0093] The inventory planning module includes a replenishment quantity adjustment unit, a dynamic programming solution unit, and an inventory planning unit. The replenishment quantity adjustment unit acquires logistics data, determines the replenishment time based on logistics transportation time, and adjusts the replenishment quantity according to transportation capacity. The dynamic programming solution unit uses a dynamic programming algorithm to obtain the optimal delivery frequency based on the replenishment time and replenishment quantity. The inventory planning unit matches the optimal delivery frequency with the inventory to obtain the inventory usage plan.
[0094] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A method for inventory optimization based on multi-source data, characterized in that, Includes the following steps: Acquire production and sales data, merge them to obtain multi-source data, use the multi-source data to train an LSTM neural network, and predict future market demand. Based on future market demand, objective functions and constraints are set for spatial resource consumption and time resource consumption, respectively. The corresponding objective functions are solved to calculate the minimum warehouse resource consumption. The warehouse resource consumption includes space resource consumption and time resource consumption. In terms of space resource consumption, while meeting future market demand, the space occupied by products in the warehouse is reduced. An optimization layout algorithm is used to optimize the warehouse layout based on the space occupied by the products and the sales speed, thereby reducing space resource consumption. In terms of time resource consumption, based on future market demand and sales data, a time optimization algorithm is used to schedule procurement time, determine the optimal procurement time, and reduce the storage time of products in the warehouse. Based on the optimized warehouse layout, the space resource consumption index is obtained by calculating the utilization rate of the total warehouse volume; the product storage time corresponding to the optimal procurement time point is converted into a time length index to obtain a time resource consumption index; based on the space resource consumption index and the time resource consumption index, the minimum warehouse resource consumption is obtained by weighted summation. The aforementioned optimization layout algorithm optimizes the warehouse layout based on the product's space requirements and sales speed, reducing space resource consumption. This includes: To obtain the product's occupied space and sales speed, an optimization layout algorithm is used to select a genetic algorithm. The objective function of the genetic algorithm is to reduce space resource consumption. The constraints of the genetic algorithm include product correlation constraints, storage condition constraints, and aisle and handling equipment constraints. Among them, product correlation constraints mean that products with correlation are placed in adjacent positions to reduce picking paths and time. Storage condition constraints mean that products have the same storage condition requirements. For products with the same storage condition requirements, they are arranged in the same storage area. Aisle and handling equipment constraints mean that the space reserved for the setting of aisles in the warehouse and the operating space of handling equipment are reserved. In the genetic algorithm, the initial population size is determined, and the maximum number of iterations, crossover probability, and mutation probability are set. The warehouse is divided into several storage regions, each corresponding to a gene locus on a chromosome, with the gene locus value representing the product number stored in that region. During the iteration process, new layout schemes are generated through crossover and mutation operations, and the new schemes are decoded to obtain the actual warehouse layout. Based on the objective function and constraints of the genetic algorithm, a fitness value is calculated for each layout scheme, reflecting the degree to which the layout scheme reduces space resource consumption. New populations are continuously generated through selection, crossover, and mutation operations. The optimal layout scheme generated by the genetic algorithm is evaluated, adjusted, and optimized, and then the optimal layout scheme is implemented. The moving average method is used to process historical sales data to predict future sales volume of warehouse products; the future sales volume is combined with the current inventory and the amount in transit to calculate the replenishment quantity. Obtain logistics data, determine replenishment time based on logistics transportation time, and adjust replenishment quantity according to transportation capacity; based on replenishment time and replenishment quantity, use dynamic programming algorithm to obtain the optimal delivery frequency, match the optimal delivery frequency with inventory, and obtain inventory utilization plan.
2. The method of claim 1, wherein, The process of acquiring production and sales data, fusing them to obtain multi-source data, and using this multi-source data to train an LSTM neural network to predict future market demand includes: Acquire production and sales data, using product ID as the association field to ensure that the production and sales data are aligned in time. Create a data table in a relational database to merge the production and sales data to obtain multi-source data. Set up the input, hidden, and output layers of the LSTM neural network, determine the parameters of the LSTM neural network, arrange the multi-source data in chronological order, and divide it into training, validation, and test sets according to the proportions to construct a data sequence; perform forward and backward propagation to evaluate and adjust the LSTM neural network; users input product production and sales data into the trained LSTM neural network to obtain predicted future market demand, specifically capacity constraints, supply chain constraints, and order fulfillment rates. 3.The method of claim 1, wherein, The process of scheduling procurement based on future market demand and sales data using a time optimization algorithm to determine the optimal procurement time and reduce product inventory storage time includes: The time optimization algorithm selected is dynamic programming. Based on the procurement timeframe and the time distribution of future market demand, the procurement time is divided into several stages. The state of each stage is defined, including current inventory quantity, remaining production capacity, and remaining supplier supply capacity. The decision variable for each stage is determined, specifically the procurement quantity. A state transition equation is established based on production, supply, and sales conditions. An objective function is constructed with the goal of minimizing product storage time, and the sum of the products of inventory quantity and product storage time for each stage is calculated. The constraints of the dynamic programming algorithm include market demand constraints, production capacity constraints, supply capacity constraints, and inventory non-negativity constraints. The initial state is determined, including the initial inventory quantity, the company's initial production capacity, and the supplier's initial supply capacity. The objective function value for the initial stage is set to 0. Starting from the first stage, based on the state transition equation, objective function, and constraints, the next stage state and objective function value corresponding to different purchase quantities in the current state are calculated. The purchase quantity that minimizes the objective function value is selected as the optimal decision for the current stage, and the state of the next stage is taken as the new current state, thus entering the calculation for the next stage. After completing the calculation for all stages, the optimal purchase time point from the initial stage to the final stage is obtained through a backtracking process. Starting from the optimal purchase time point of the final stage, based on the state transition equation and decision records, the process is gradually backtracked to the initial stage to determine the optimal purchase time point and purchase quantity for each stage.
4. The method of claim 1, wherein, The method of using moving averages to process historical sales data and predict future sales volume of warehouse products includes: The moving average period is determined and matched with the seasonal cycle of the product; the moving average period is n, and the moving average is calculated sequentially for historical sales data from 1 to n months; the moving average is extrapolated to predict the sales volume for the (n+1)th month; as time goes on, the predicted future sales volume is compared with the actual sales data; the prediction error is calculated using the mean absolute error to measure the degree of deviation between the predicted value and the actual value, and the moving average period is adjusted when the degree of deviation exceeds a set threshold.
5. The method of claim 1, wherein, The calculation of replenishment quantity by combining future sales volume with current inventory and in-transit quantity includes: The first formula for calculating replenishment quantity is RQ=FS-CI-ITQ, where RQ is the replenishment quantity, FS is the future sales quantity, CI is the current inventory quantity, and ITQ is the quantity in transit. For products whose historical sales data fluctuations exceed a set threshold, a safety stock TQ is introduced, and the second formula for calculating replenishment quantity is used, which is: RQ=FS-CI-ITQ-TQ.
6. The method of claim 5, wherein, The process of acquiring logistics data, determining replenishment time based on logistics transportation time, and adjusting replenishment quantity based on transportation capacity includes: Establish data sharing interfaces with logistics providers to extract the average transportation time for various products from the supplier's shipping location to the warehouse; obtain the transportation capacity of different transportation vehicles from logistics providers, including the maximum single transportation volume and transportation frequency per unit time; The replenishment time is determined based on the logistics and transportation time, and a replenishment time model is established, as shown in the following formula: Where RT is the replenishment time in days, ADFS is the future average daily sales volume (calculated by dividing the future sales volume FS by the number of days in the current month), LTT is the logistics and transportation time, and SLT is the safety lead time, representing the extra time reserved by the user. When there is a delay in logistics and transportation, the replenishment time is adjusted accordingly based on the actual delay. When the sales speed increases or decreases, the estimated time to sell off the current inventory and the amount in transit are recalculated, and the replenishment time is adjusted accordingly. By comparing the calculated replenishment quantity with the logistics provider's transportation capacity, the replenishment quantity is split when it exceeds the maximum single transport capacity of the transportation vehicle.
7. The inventory optimization method based on multi-source data according to claim 1, characterized in that, The optimal delivery frequency is obtained using a dynamic programming algorithm based on replenishment time and quantity. This optimal delivery frequency is then matched with inventory to obtain an inventory utilization plan, including: Based on replenishment time, the inventory management cycle is divided into several stages. State variables for each stage are defined, including current inventory level, remaining replenishment quantity, and number of completed deliveries. The decision variable for each stage is determined as delivery frequency, specifically deciding whether to perform a delivery and the number of deliveries in that stage. A state transition equation is established based on inventory changes, replenishment operations, and the delivery process. An objective function is constructed to minimize inventory backlog and stockout risks. The initial state is determined, specifically the inventory, remaining replenishment quantity, and number of deliveries for the first stage. Boundary conditions are set for each stage, specifically an upper and lower limit for the delivery frequency. The upper limit is determined based on transportation capacity, and the lower limit is determined based on the need to ensure normal inventory turnover. Starting from the first stage, based on the state transition equation, objective function, and boundary conditions, calculate the next stage state and objective function value corresponding to different delivery frequency decisions in the current state; select the delivery frequency that minimizes the objective function value as the optimal decision for the current stage, take the state of the next stage as the new current state, and proceed to the next stage calculation; after completing the calculation of all stages, obtain the optimal delivery frequency from the initial stage to the final stage through a backtracking process. Establish a correlation model between optimal delivery frequency and inventory, coordinate inventory and delivery time points, and thus obtain an inventory utilization plan.
8. An inventory optimization system based on multi-source data, using the inventory optimization method based on multi-source data according to any one of claims 1-7, characterized in that, include: The data acquisition and forecasting module includes a data acquisition unit and a demand forecasting unit. The data acquisition unit acquires production data and sales data and merges them to obtain multi-source data. The demand forecasting unit uses the multi-source data to train an LSTM neural network to predict future market demand. The objective solution module includes an initial setting unit and an optimization algorithm solution unit. The initial setting unit sets objective functions and constraints based on future market demand in terms of spatial resource consumption and time resource consumption, respectively. The optimization algorithm solution unit solves the corresponding objective functions and calculates the minimum warehouse resource consumption. The warehouse resource consumption includes space resource consumption and time resource consumption. In terms of space resource consumption, while meeting future market demand, the space occupied by products in the warehouse is reduced. An optimization layout algorithm is used to optimize the warehouse layout based on the space occupied by the products and the sales speed, thereby reducing space resource consumption. In terms of time resource consumption, based on future market demand and sales data, a time optimization algorithm is used to schedule procurement time, determine the optimal procurement time, and reduce the storage time of products in the warehouse. Based on the optimized warehouse layout, the space resource consumption index is obtained by calculating the utilization rate of the total warehouse volume; the product storage time corresponding to the optimal procurement time point is converted into a time length index to obtain a time resource consumption index; based on the space resource consumption index and the time resource consumption index, the minimum warehouse resource consumption is obtained by weighted summation. The aforementioned optimization layout algorithm optimizes the warehouse layout based on the product's space requirements and sales speed, reducing space resource consumption. This includes: To obtain the product's occupied space and sales speed, an optimization layout algorithm is used to select a genetic algorithm. The objective function of the genetic algorithm is to reduce space resource consumption. The constraints of the genetic algorithm include product correlation constraints, storage condition constraints, and aisle and handling equipment constraints. Among them, product correlation constraints mean that products with correlation are placed in adjacent positions to reduce picking paths and time. Storage condition constraints mean that products have the same storage condition requirements. For products with the same storage condition requirements, they are arranged in the same storage area. Aisle and handling equipment constraints mean that the space reserved for the setting of aisles in the warehouse and the operating space of handling equipment are reserved. In the genetic algorithm, the initial population size is determined, and the maximum number of iterations, crossover probability, and mutation probability are set. The warehouse is divided into several storage regions, each corresponding to a gene locus on a chromosome, with the gene locus value representing the product number stored in that region. During the iteration process, new layout schemes are generated through crossover and mutation operations, and the new schemes are decoded to obtain the actual warehouse layout. Based on the objective function and constraints of the genetic algorithm, a fitness value is calculated for each layout scheme, reflecting the degree to which the layout scheme reduces space resource consumption. New populations are continuously generated through selection, crossover, and mutation operations. The optimal layout scheme generated by the genetic algorithm is evaluated, adjusted, and optimized, and then the optimal layout scheme is implemented. The replenishment quantity calculation module includes a moving average processing unit and a replenishment quantity calculation unit. The moving average processing unit uses the moving average method to process historical sales data and predict the future sales volume of warehouse products. The replenishment quantity calculation unit combines the future sales volume with the current inventory and the quantity in transit to calculate the replenishment quantity. The inventory planning module includes a replenishment quantity adjustment unit, a dynamic programming solution unit, and an inventory planning unit. The replenishment quantity adjustment unit acquires logistics data, determines the replenishment time based on logistics transportation time, and adjusts the replenishment quantity according to transportation capacity. The dynamic programming solution unit uses a dynamic programming algorithm to obtain the optimal delivery frequency based on the replenishment time and replenishment quantity. The inventory planning unit matches the optimal delivery frequency with the inventory to obtain the inventory usage plan.