Regional inventory balancing method and system based on rules
By constructing a directed graph and conducting iterative optimization cycles, the problem of arbitrary inventory allocation in e-commerce warehousing and logistics is solved, the global optimal inventory balance is achieved, and the efficiency and economic benefits of the e-commerce warehousing and logistics system are improved.
Patent Information
- Application Number
- CN202510923368.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-09-19
AI Technical Summary
The lack of clear and executable quantitative calculation models in existing technologies leads to the arbitrariness and limitations of inventory allocation decisions in e-commerce warehousing and logistics systems, making it difficult to generate a globally optimal allocation plan and effectively balance inventory resources within the region.
By obtaining the current inventory of each warehouse, determining overstock, out-of-stock, and balanced warehouses based on sales forecast distribution, constructing a directed graph and performing iterative optimization cycles, we ensure that the cost of transferring goods is lower than the profit of the goods, dynamically find the lowest-cost supply source, and generate a globally optimal transfer plan.
It has achieved a transformation from qualitative to quantitative, enhanced the feasibility and scientific nature of the inventory transfer plan, avoided loss-making inventory transfers, improved capital turnover efficiency and corporate operating profits, and optimized regional inventory balance.
Smart Images

Figure CN120672264A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to e-commerce warehouse management, and more specifically, to a rule-based regional inventory balancing method and system thereof. Background Art
[0002] In modern e-commerce warehousing and logistics systems, companies typically deploy multiple distributed warehouses within a core region to improve delivery efficiency and enhance user experience. These warehouses stock their inventory based on historical sales data and market forecasts. However, inventory allocation is a core challenge. Precise inventory management requires striking a delicate balance between avoiding lost sales opportunities due to insufficient inventory and preventing the storage costs and capital backlogs caused by excess inventory. In actual operations, inventory levels at various warehouses can easily deviate from ideal levels due to factors such as occasional demand fluctuations, unexpected impacts of marketing campaigns, and delayed upstream replenishment. This can lead to product overstocking in some warehouses and the risk of stockouts in other geographically close warehouses. When customer orders cannot be fulfilled by the nearest warehouse, the need arises to transfer goods between warehouses. Therefore, developing an efficient stock transfer strategy to dynamically transfer excess inventory within a region to in-demand stocking points, thereby restoring regional inventory resources, is crucial for improving overall supply chain service quality and capital efficiency.
[0003] To address this issue, existing approaches to regional inventory balancing exist. These solutions typically propose macro-level guiding principles, such as qualitatively considering the inventory status of nearby warehouses and potential transportation costs when making transfers. However, these existing solutions often remain at the theoretical level, lacking a clear, executable quantitative calculation model and specific implementation path. Decision-makers often rely on manual experience and on-the-spot judgment when formulating transfer plans, making it difficult to ensure that each transfer achieves the optimal solution in terms of cost and efficiency. The lack of precise mathematical models to define warehouse "overstock" and "outstock" states, as well as to quantify the specific overstock and outstock quantities, leads to a significant degree of subjective arbitrariness in the timing and quantity of transfers. More importantly, when faced with complex transfer networks consisting of multiple overstocked and outstocked warehouses, these qualitative approaches are unable to perform global optimization and generate a globally optimal solution that comprehensively considers all potential transfer paths, costs, and profits. Consequently, their feasibility and optimization effectiveness are significantly limited.
[0004] Therefore, an optimized regional inventory balancing solution is urgently needed. Summary of the Invention
[0005] In order to overcome the limitations of the prior art, according to one aspect of the present application, a rule-based regional inventory balancing method is provided, which includes:
[0006] Get the current actual inventory of each warehouse;
[0007] Based on the predicted sales distribution of each warehouse in the next cycle, the status of each warehouse is determined to obtain a set of overstocked warehouses, a set of out-of-stock warehouses, and a set of balanced warehouses;
[0008] Constructing a directed warehouse graph based on the set of overstocked warehouses, the set of out-of-stock warehouses, and the set of balanced warehouses; and
[0009] Based on the distance between each warehouse, the transportation cost calculation factor and the unit profit of the target product, the warehouse directed graph is iteratively optimized in a loop until no new and better transfer plan for the task can be found to obtain the final optimized transfer plan.
[0010] Compared with the existing technology, the rule-based regional inventory balancing method and system provided by this application are intended to overcome the arbitrariness and limitations of allocation decisions in the existing technology. By establishing a set of quantitative inventory status assessment standards and a cost-optimal allocation generation mechanism, a quantitative calculation method is realized that can automatically generate specific, executable and economically efficient inter-warehouse transfer plans.
[0011] Specifically, first of all, we abandon the fuzzy judgment of the warehouse inventory level based on manual experience, and instead introduce a statistical model based on the historical sales forecast distribution. Through scientific calculations, the current inventory status of each warehouse is accurately classified, clearly defining which warehouses are overstocked and which are out of stock, and quantitatively calculating the specific surplus or gap, thereby providing an objective and reliable basis for the initiation of transfers. On this basis, the present invention innovatively abstracts all warehouses into a dynamic directed graph network model, in which warehouses with overstock serve as source nodes and warehouses with out of stock serve as demand nodes. The most critical step is that the present invention constructs an iterative optimization cycle mechanism guided by profitability. This mechanism first ensures that the transportation cost of any potential transfer must be lower than the profit of the goods; then, among all feasible transfer paths, through continuous iterative comparison and replacement, it dynamically searches for and locks in the lowest-cost supply source for each out-of-stock warehouse, until the transfer network in the entire region reaches a convergence state that can no longer be optimized, thereby outputting the final global optimal transfer list.
[0012] By adopting the above technical solution, the present invention can achieve significant beneficial technical effects.
[0013] First, it achieved a shift from qualitative description to quantitative calculation, providing clear and reproducible operational instructions for regional inventory balance, significantly enhancing the feasibility of the plan and the scientific nature of decision-making.
[0014] Secondly, by introducing a profitability check based on commodity profits, it ensures that all generated transfers are economically sound and feasible, fundamentally avoiding the operational risk of making unprofitable transfers to meet orders. More importantly, its core iterative optimization algorithm effectively avoids the local optimality trap of traditional methods that only consider nearby transfers. Instead, it examines all possible "supply-demand" combinations from a global network perspective, ensuring that the final transfer solution is the lowest-cost, most efficient global solution based on comprehensive considerations.
[0015] Ultimately, the present invention can effectively activate redundant inventory in the region, improve capital turnover efficiency, reduce the risk of order loss due to out-of-stock, and maximize the overall operating profit of the enterprise. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above and other purposes, features, and advantages of the present application will become more apparent through a more detailed description of the embodiments of the present application in conjunction with the accompanying drawings. The accompanying drawings are intended to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the drawings, the same reference numerals generally represent the same components or steps.
[0017] Figure 1 Flowchart of a rule-based regional inventory balancing method according to an embodiment of the present application.
[0018] Figure 2 This is a flowchart for determining the status of each warehouse in a rule-based regional inventory balancing method according to an embodiment of the present application. DETAILED DESCRIPTION
[0019] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. While the drawings illustrate certain embodiments of the present disclosure, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0020] Therefore, in response to the technical defects disclosed in the background technology, this application proposes a rule-based regional inventory balancing method and system. Figure 1 Flowchart of a rule-based regional inventory balancing method according to an embodiment of the present application. Figure 2 This is a flowchart for determining the status of each warehouse in a rule-based regional inventory balancing method according to an embodiment of the present application.
[0021] like Figure 1As shown, the rule-based regional inventory balancing method according to the embodiment of the present application includes: S1, obtaining the current actual inventory of each warehouse; S2, based on the sales forecast distribution of each warehouse in the next cycle, determining the status of each warehouse to obtain a set of multi-stock warehouses, a set of out-of-stock warehouses and a set of balanced warehouses; S3, constructing a warehouse directed graph based on the set of multi-stock warehouses, the set of out-of-stock warehouses and the set of balanced warehouses; and, S4, based on the distance between each warehouse, the transportation cost calculation factor and the unit profit of the target product, iteratively optimizing the warehouse directed graph until no new and better transfer plan for the task can be found to obtain the final optimized transfer plan.
[0022] In step S1, the current actual inventory level of each warehouse is obtained. It should be understood that obtaining the current actual inventory level of each warehouse is the starting step and data cornerstone of the entire process. This step forms the objective factual basis for all subsequent analysis, judgment, and optimization decisions. It aims to provide an accurate, real-time snapshot of the regional inventory for the entire balancing algorithm. This ensures that subsequent judgments on warehouse status, whether overstock, out-of-stock, or balanced, are based on real and valid physical inventory data, thereby avoiding the failure of the entire allocation plan due to data source errors or lags.
[0023] In this step, each warehouse refers to a predefined set of physical warehouses or logistics centers that belong to the same management system, are located in a specific geographical area, and have potential transfer relationships with each other. In an information system, each warehouse is usually managed by a unique identifier, forming a node set for inventory balancing operations. The current actual inventory level is a crucial concept. In the method of this embodiment, it can be represented by the symbol S i Represents the inventory value of a certain warehouse i. This value specifically refers to the number of goods physically present in each warehouse and available for sale or transfer at the specific time point when the transfer analysis is performed. It represents the available inventory, which means that the unavailable inventory, such as inventory locked by customer orders but not yet shipped, inventory undergoing internal quality inspection, inventory marked as defective or damaged, and inventory in transit that has been stored but the process has not yet been completed, must be excluded from the total inventory of the warehouse management system (WMS). Only in this way can the S provided for subsequent calculations be guaranteed. i It is true and reliable.
[0024] During the specific implementation process, the central inventory control system initiates a data query request to the underlying warehouse management system WMS or enterprise resource planning ERP system based on the preset warehouse list. This request is usually implemented through an application programming interface API call, and the request message will contain the product identification SKU code for the inventory to be queried and a list of identifiers of the target warehouse. Then, the WMS or ERP system that receives the request will perform the corresponding database query operation to accurately extract the current actual available inventory of each warehouse that meets the conditions. Subsequently, the system encapsulates these query results into a standard data format, such as JSON or XML, and sends them back to the main system of this embodiment through an API response. Finally, after receiving the response, the main system parses the returned data message, extracts each warehouse ID and its corresponding current actual inventory value, and loads this data into the memory or temporary database. At this point, the system has obtained the defined k warehouses W1, W2, W3, ..., W k The current inventory of S1, S2, S3, ..., S k , and is ready in a structured form and can be directly called by subsequent steps.
[0025] In step S2, based on the predicted sales distribution of each warehouse in the next cycle, the status of each warehouse is determined to obtain a set of warehouses with excess inventory, a set of warehouses with out-of-stock inventory, and a set of warehouses with balanced inventory. That is, after successfully obtaining the current actual inventory of all relevant warehouses, based on the predicted sales distribution of each warehouse in the next cycle, the status of each warehouse is determined to obtain a set of warehouses with excess inventory, a set of warehouses with out-of-stock inventory, and a set of warehouses with balanced inventory. This step converts static, isolated inventory figures into dynamic status labels with business guidance significance. It aims to scientifically and objectively answer the key question of whether the current inventory is too much, too little, or just right by introducing statistical models, thereby providing accurate and quantitative classification inputs for the subsequent construction of allocation relationships and the start of optimization algorithms. It is the core logical bridge connecting raw data with optimization decisions.
[0026] It is worth mentioning that in the technical solution of this application, a future cycle refers to a specific time span for performing inventory balancing operations, such as the next week or the next month. This cycle determines the granularity of sales data statistics and the frequency of scheduling. The sales forecast distribution is a statistical model that describes the possibility of commodity sales within the cycle. It is not an isolated forecast value, but contains a set of key parameters. In a preferred implementation, the distribution is set to a normal distribution, and its characteristics are defined by two core indicators: one is the expected sales volume μ and the other is the expected sales volume μ. i , represents the average sales volume that the i-th warehouse is most likely to achieve in the future period; the other is the sales standard deviation σ i, which quantifies the volatility or uncertainty of sales. Furthermore, the target service level is a business indicator set by business managers, such as 95%, which represents the probability that the company will be able to meet customer demand within the next cycle. In this method, this business goal is converted into a specific statistical value, namely, the safety stock factor z. The value of this factor z directly corresponds to the target service level. In a preferred embodiment of this embodiment, when the target service level is set to 95%, the safety stock factor z corresponding to the one-sided test is 1.645.
[0027] In the specific implementation process, we first conduct statistical analysis on the historical sales data of the target product in each warehouse to obtain the sales forecast distribution of each in the next cycle. Specifically, the system extracts the weekly sales data of each warehouse in the past several cycles (for example, the past 52 weeks) and calculates the average of these historical data to obtain the expected sales volume μ. i , then calculate the degree of dispersion of these data relative to the mean and get the sales standard deviation σ i This process transforms historical sales behavior into a mathematical model with predictive capabilities. Subsequently, the method obtains the target service level set by the user and determines the safety stock factor z accordingly. This then leads to the most critical sub-step of determining the status.
[0028] In this judgment process, two upper and lower thresholds are constructed. Specifically, the system constructs a multi-stock warehouse judgment threshold, which is calculated as the expected sales volume plus the product of the safety stock coefficient and the sales volume standard deviation, which is mathematically expressed as (μ i +z·σ i ); At the same time, the system also builds a threshold for determining out-of-stock warehouses, which is calculated as the expected sales minus the product of the safety stock coefficient and the sales standard deviation, mathematically expressed as (μ i -z·σ i After the two judgment thresholds are constructed, the system will calculate the current actual inventory S of the i-th warehouse obtained in the previous step. i Compare with these two thresholds.
[0029] The judgment logic is as follows: If S i Greater than the threshold for determining a multi-goods warehouse, that is, S i >μ i +z·σ i , then the i-th warehouse is determined to be a multi-goods warehouse; if S i Less than the out-of-stock warehouse judgment threshold, that is, S i <μ i -z·σ i , then the i-th warehouse is determined to be a stock-out warehouse; if S iIf the threshold for determining a warehouse with insufficient inventory is between that for determining a warehouse with excessive inventory, the i-th warehouse is determined to be a balanced warehouse. This method can also further quantify the degree of surplus and shortage: for a warehouse with excessive inventory, the number of excess items is S i -(μ i +z·σ i ); For the out-of-stock warehouse, the number of out-of-stock items is (μ i -z·σ i )-S i ,.
[0030] Finally, by executing this process for all warehouses, the method outputs three distinct sets: a set containing all warehouses that are judged to be in overstock and their overstock quantities, a set containing all warehouses that are judged to be out of stock and their outstock quantities, and a set containing all balanced warehouses.
[0031] That is, if Figure 2 As shown, in an embodiment of the present application, based on the sales forecast distribution of each warehouse in the next cycle, the state of each warehouse is determined to obtain a set of overstocked warehouses, a set of out-of-stock warehouses, and a set of balanced warehouses, including: S10, obtaining the historical sales data of the target product in each warehouse; S20, performing statistical analysis on the historical sales data of the target product in each warehouse to obtain the sales forecast distribution of each warehouse in the next cycle, the sales forecast distribution of each warehouse in the next cycle is a normal distribution, and its expected sales volume is μ i , the standard deviation of sales volume is σ i ; S30, obtain the target service level set by the user, and determine the safety stock coefficient based on the target service level; and, S40, based on the safety stock coefficient, expected sales volume and sales volume standard deviation, determine the status of each warehouse to obtain a set of overstocked warehouses, a set of out-of-stock warehouses and a set of balanced warehouses.
[0032] Furthermore, the process of determining the status of each warehouse based on the target service level, the safety stock coefficient, the expected sales volume and the sales volume standard deviation to obtain a set of multi-stock warehouses, a set of out-of-stock warehouses and a set of balanced warehouses includes: extracting the current actual inventory of the i-th warehouse; constructing a multi-stock warehouse determination threshold based on the safety stock coefficient, the expected sales volume and the sales volume standard deviation, wherein the multi-stock warehouse determination threshold is the expected sales volume plus the product of the safety stock coefficient and the sales volume standard deviation; constructing an out-of-stock warehouse determination threshold based on the safety stock coefficient, the expected sales volume and the sales volume standard deviation, wherein the out-of-stock warehouse determination threshold is the expected sales volume minus the product of the safety stock coefficient and the sales volume standard deviation; if the current actual inventory of the i-th warehouse is greater than the multi-stock warehouse determination threshold, then the i-th warehouse is determined to be a multi-stock warehouse; if the current actual inventory of the i-th warehouse is less than the out-of-stock warehouse determination threshold, then the i-th warehouse is determined to be an out-of-stock warehouse; and if the current actual inventory of the i-th warehouse is between the out-of-stock warehouse determination threshold and the multi-stock warehouse determination threshold, then the i-th warehouse is determined to be a balanced warehouse.
[0033] In a specific application example, the company sets a service level of 95%, corresponding to a safety stock factor z = 1.645. By analyzing historical data, the weekly sales distribution forecast for the "Smart Speaker Pro" by warehouse is as follows: Shanghai Warehouse (SH01) μ = 500, σ = 15; Hangzhou Warehouse (HZ01) μ = 150, σ = 20; Nanjing Warehouse (NJ01) μ = 800, σ = 50. For Shanghai Warehouse (SH01): the overstock threshold = 500 + 1.645 * 15 ≈ 524.7; the out-of-stock threshold = 500 - 1.645 * 15 ≈ 475.3. Its current inventory I = 520. Since 475.3 ≤ 520 ≤ 524.7, the Shanghai warehouse is considered a balanced warehouse. For the Hangzhou warehouse (HZ01): the overstock determination threshold = 150 + 1.645 * 20 = 182.9; the out-of-stock determination threshold = 150 - 1.645 * 20 = 117.1. Its current inventory I = 85. Since 85 < 117.1, the Hangzhou warehouse is determined to be an out-of-stock warehouse. Its specific out-of-stock quantity is 117.1 - 85 = 32.1, which is rounded to 32 pieces. For the Nanjing warehouse (NJ01): the overstock determination threshold = 800 + 1.645 * 50 = 882.25; the out-of-stock determination threshold = 800 - 1.645 * 50 = 717.75. Its current inventory I = 1100. Since 1100 > 882.25, the Nanjing warehouse is determined to be an overstock warehouse. Its specific overstock quantity is 1100 - 882.25 = 217.75, which is rounded to 217 pieces. After this step, the final output is: the set of warehouses with excess goods {(NJ01, 217 pieces)}, the set of warehouses with out-of-stock goods {(HZ01, 32 pieces)}, and the set of balanced warehouses {SH01}.
[0034] In step S3, a directed warehouse graph is constructed based on the set of warehouses with multiple goods, the set of warehouses with out-of-stock goods, and the set of warehouses with balanced goods. That is, after the inventory status of all warehouses in the region is accurately classified and quantified, a directed warehouse graph is constructed based on the set of warehouses with multiple goods, the set of warehouses with out-of-stock goods, and the set of warehouses with balanced goods. This step aims to transform the independent warehouse status classification data obtained in the previous step into a structured, systematic data model with potential associations. This transformation is crucial because it elevates the inventory balancing problem from a simple list management task to a network flow or path planning problem. By constructing a directed graph, a standard and efficient computing framework is provided for the subsequent complex iterative optimization algorithm involving many-to-many relationships, so that the allocation relationship between warehouses can be intuitively represented, systematically analyzed, and efficiently processed.
[0035] It is worth mentioning that in the technical solution of the present application, the warehouse directed graph is a mathematical and data structure specifically used to describe inventory transfer relationships. The graph consists of two core elements: nodes (Vertices) and directed edges (DirectedEdges). The nodes in this embodiment are not indifferent points, but represent each unique physical warehouse; more importantly, each node carries the key attributes assigned in the previous step, including its current state (i.e., overstock, out of stock or balanced) and the quantity corresponding to the state (i.e., the specific overstock quantity or out of stock quantity). The directed edges in the graph represent potential, one-way paths for transferring goods from one warehouse to another. Its directed nature is the key to this model. It clearly stipulates that goods can only flow from a warehouse with a lot of goods to a warehouse with a lot of goods, thereby excluding illogical transfer flows at the beginning of the model construction, such as transferring goods from a warehouse with a lot of goods to another warehouse with a lot of goods.
[0036] During the implementation, nodes are first instantiated. The system traverses the set of overstocked warehouses, the set of out-of-stock warehouses, and the set of balanced warehouses generated in the previous step. For each warehouse in these three sets, the system creates a corresponding graph node object in memory. Each created node object is assigned at least two core attributes: a state attribute, whose value is set to overstocked, out-of-stock, or balanced; and a quantity attribute, whose value is set to the specific value corresponding to the state (overstock quantity is a positive number, out-of-stock quantity is a negative number, and balanced is zero). This value will be dynamically updated in subsequent optimization calculations.
[0037] After all nodes have been successfully instantiated, the process then enters the directed edge definition phase. The system executes a core rule to establish connections from the overstock warehouse to the out-of-stock warehouse. This means the program constructs a nested loop, with the outer loop traversing all nodes marked as overstock, and the inner loop traversing all nodes marked as out-of-stock. For each pair of nodes consisting of an overstock warehouse node in the outer loop and an out-of-stock warehouse node in the inner loop, the system defines a potential directed edge between them, from the overstock warehouse to the out-of-stock warehouse. It is important to note that balanced warehouses do not participate in edge creation at this stage; they exist in the graph as isolated, self-associated nodes, neither serving as the starting point nor the end point of a transfer. At this point, a complete warehouse directed graph data structure, including all nodes and their attributes, as well as all potential transfer paths, is constructed and ready to serve as input for the subsequent optimization algorithm.
[0038] In step S4, based on the distance between warehouses, the transportation cost calculation factor, and the unit profit of the target product, the warehouse directed graph is iteratively optimized until no new, more optimal allocation plan can be found to obtain the final optimized allocation plan. In other words, by running its core decision-making engine, namely the iterative optimization loop, it aims to transform a static directed graph containing all potential allocation possibilities into a dynamic, unique, and economically optimal final allocation instruction list. Unlike simple local allocation or single allocation, the core value of this step lies in its simulation of a global market bidding mechanism: all warehouses with more inventory act as sellers, and all warehouses out of stock act as buyers. Through a continuous process of repeated game and preferential substitution, it ensures that each out-of-stock demand can be met by the lowest-cost source of goods, thereby finding a truly global optimal solution in the complex supply and demand network, rather than just a local optimal solution.
[0039] To better understand this step, the core concepts and parameters involved are defined as follows: m,n It refers to the transportation distance from the stock warehouse m to the out-of-stock warehouse n in the geographical or logistics system. It is the basic physical quantity for calculating transportation costs. The transportation cost calculation factor k is a coefficient calculated by the enterprise based on the actual logistics costs. It links the distance with the actual transportation costs. The unit profit P refers to the commercial profit that can be achieved for each target commodity allocated. It constitutes the economic bottom line that must be followed when making allocation decisions. Combining these parameters, the core attribute of each directed edge can be calculated - the transfer cost. The transfer cost from the stock warehouse m to the out-of-stock warehouse n is m,n , and its calculation formula is preferably:
[0040] Cost m,n =k*D m,n2
[0041] where k is a transportation cost calculation factor, and D m,n is the distance between the m-th multi-goods warehouse and the n-th out-of-stock warehouse.
[0042] Finally, the iterative optimization loop is a special algorithm structure, and its design concept is to allow the system to continuously self-adjust and optimize the existing intermediate solutions during the calculation process until the system as a whole reaches a stable state, that is, convergence. At this time, the solution is the final solution. In this embodiment, the control of this loop is managed by a Boolean variable Transfer_state.
[0043] In the embodiment of the present application, this process starts with initialization. Before entering the loop, the system sets an initial value of False for a Boolean status flag Transfer_state. Then, an external Do-While loop is started. The termination condition of this loop is that the value of Transfer_state remains False after a complete round of inner traversal, that is, there is no change in any allocation plan, which means the algorithm has converged. Inside the loop body of each round, the system will execute an inner double For loop. The purpose of this loop is to traverse all combinations of multi-goods warehouses and out-of-stock warehouses in the set of multi-goods warehouses and the set of out-of-stock warehouses. For each pair of multi-goods warehouse m and out-of-stock warehouse n traversed, the algorithm will sequentially execute the following sub-steps:
[0044] First is the profitability check. This sub-step determines whether the transfer cost from warehouse m to warehouse n is less than the unit profit of the target commodity. Specifically, the system calculates Cost m,n , and checks whether it satisfies the inequality Cost m,n < P. If this condition is not met, this transfer path is considered to have no economic value, and this inner iteration is directly skipped to judge the next pair of combinations; if it is met, it is determined that the profitability check result is a successful check, indicating that this path has potential value, and proceed to the next step.
[0045] Next comes the core allocation and optimization sub-steps. After successful verification, the algorithm will first set the system status flag Transfer_state to True, because at least one potential transfer behavior has occurred, thereby ensuring that the outer While loop will continue. Then, the algorithm will dynamically allocate or optimize the supply for the out-of-stock warehouse n. This part is divided into two cases: one is to set the mth multi-stock warehouse as an (initial) optimal allocation option for the nth out-of-stock warehouse, and its allocation quantity needs to be calculated based on the surplus and shortage of the multi-stock warehouse and the out-of-stock warehouse. If the multi-stock quantity of the multi-stock warehouse m is less than the out-of-stock quantity of the out-of-stock warehouse n, then all the excess inventory of the multi-stock warehouse m will be allocated to n, and the multi-stock inventory of m will be emptied, and the out-of-stock quantity of n will be updated; if the multi-stock is more than the out-of-stock, then enough inventory will be allocated to fill n, and the remaining multi-stock quantity of m will be updated. The second case, namely optimized replacement, is even more sophisticated. When there are multiple eligible multi-warehouse supply options for a stock-out warehouse, the algorithm compares the transfer costs of each option to determine whether to set the optimal option as the final optimal allocation choice for the stock-out warehouse. If the transfer cost of a new source o is lower than the cost of a source m in the existing plan, a replacement operation will be performed: the transfer of the more expensive warehouse m will be removed from n's transfer list, and this part of the transfer will be "returned" to warehouse m (that is, the available inventory of warehouse m will be increased). Then, this part of the demand will be met again by warehouse o with a lower cost, and the available inventory of warehouse m will be deducted accordingly. This dynamic bidding and replacement process is the key to ensuring the global optimality of the algorithm.
[0046] Finally, when the inner For loop is fully executed, the outer While loop will check Transfer_state. If its value is True, it means that the update or establishment of the allocation plan still occurred in the previous loop, so the loop will return to the starting point and restart a new round of global traversal and optimization. This process will continue until a certain round of inner loop is completed and Transfer_state maintains its initial False value due to no allocation action. At this point, the While loop terminates. The allocation plan stored in the system memory for each out-of-stock warehouse, which remains after multiple rounds of optimization, is the final optimized transfer plan with the unique and optimal global cost that the present invention seeks. At this time, isolated out-of-stock points or multiple stock points may occur, respectively, because the out-of-stock warehouse cannot find a profitable source of goods, or the multiple warehouses are too far away from all out-of-stock warehouses.
[0047] That is, in an embodiment of the present application, based on the distance between each warehouse, the transportation cost calculation factor and the unit profit of the target product, the warehouse directed graph is iteratively optimized in a loop until no new and better transfer plan for the task can be found to obtain a final optimized transfer plan, including: in each loop, traversing all combinations of multi-stock warehouses and out-of-stock warehouses in the set of multi-stock warehouses and the set of out-of-stock warehouses: based on the transfer cost between the m-th multi-stock warehouse and the n-th out-of-stock warehouse, performing a profitability check to obtain a profitability check result; in response to the profitability check result being a successful check, setting the m-th multi-stock warehouse as the initial optimal allocation selection for the n-th out-of-stock warehouse; and, when the o-th multi-stock warehouse is determined to be the allocation selection for the n-th out-of-stock warehouse, determining whether to set the o-th multi-stock warehouse as the optimal allocation selection for the n-th out-of-stock warehouse based on a comparison between the transfer cost of the o-th multi-stock warehouse and the transfer cost of the m-th multi-stock warehouse.
[0048] Specifically, in the embodiment of the present application, the cost of transferring goods between the m-th warehouse with excess goods and the n-th warehouse with out-of-stock goods is calculated using the following formula:
[0049] Cost m,n =k*D m,n 2
[0050] Among them, k is the transportation cost calculation factor, D m,n is the distance between the mth overstock warehouse and the nth out-of-stock warehouse.
[0051] Specifically, in an embodiment of the present application, based on the transfer cost between the mth multi-stock warehouse and the nth out-of-stock warehouse, a profitability verification is performed to obtain a profitability verification result, including: determining whether the transfer cost between the mth multi-stock warehouse and the nth out-of-stock warehouse is less than the unit profit of the target product; if so, determining that the profitability verification result is a successful verification.
[0052] In a specific application example, there is a multi-warehouse G1 (with a surplus of 100 items), and short-warehouses R1 (with a shortage of 80 items) and R2 (with a shortage of 50 items). Profit P = 10 yuan. The transfer costs C(G1, R1) = 5 yuan, and C(G1, R2) = 12 yuan. The algorithm begins by traversing the combination (G1, R1). If the cost of 5 yuan is less than the profit of 10 yuan, the condition is met. 80 items in G1's inventory are allocated to R1. At this point, G1 has a surplus of 20 items, and R1's shortage is cleared. Transfer_state becomes True. Next, traversing the combination (G1, R2), the cost of 12 yuan is greater than the profit of 10 yuan, which does not meet the condition, so this path is blocked. Assume a more complex scenario and add a multi-warehouse G2 (with a surplus of 40 items). Its cost C(G2, R1) = 8 yuan. After the first round of the loop, R1 is supplied by G1. Entering the second round, when the system reaches (G2, R1), it finds that its cost of 8 yuan is greater than the 5 yuan from G1 to R1, so it won't make the switch. If C(G2, R1) = 4 yuan, the situation will be different: the system will find that the cost from G2 is lower. So, it will make the switch: 40 of the 80 units previously supplied by G1 to R1 (that is, all of G2's inventory) will be supplied by G2. At the same time, G1 "withdraws" 40 units, bringing its available inventory back to 20 + 40 = 60 units, and G2's available inventory will be reset to zero. This process of starting over and optimizing will continue until the system reaches stability.
[0053] According to another aspect of the present application, a rule-based regional inventory balancing system is provided, characterized in that the rule-based regional inventory balancing system is used to execute the rule-based regional inventory balancing method described above. Those skilled in the art will appreciate that the rule-based regional inventory balancing system can be developed as software based on the rule-based regional inventory balancing method. Since the data flow process and mechanism of each step have been discussed in detail, they will not be elaborated here.
[0054] The foregoing description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Any simple modification of the technical solution of the present invention by a person skilled in the art, by means of equivalent substitution or equivalent transformation, without departing from the overall technical content of the technical solution of the present invention, shall fall within the scope of protection of the technical solution of the present invention.
Claims
1. A rule-based regional inventory balancing method, characterized in that: include: Get the current actual inventory of each warehouse; Based on the predicted sales distribution of each warehouse in the next cycle, the status of each warehouse is determined to obtain a set of overstocked warehouses, a set of out-of-stock warehouses, and a set of balanced warehouses; Construct a directed warehouse graph based on the set of overstocked warehouses, the set of out-of-stock warehouses, and the set of balanced warehouses; as well as Based on the distance between each warehouse, the transportation cost calculation factor and the unit profit of the target product, the warehouse directed graph is iteratively optimized in a loop until no new and better transfer plan for the task can be found to obtain the final optimized transfer plan.
2. The rule-based regional inventory balancing method according to claim 1, characterized in that: Based on the sales forecast distribution of each warehouse in a future cycle, the status of each warehouse is determined to obtain a set of overstocked warehouses, a set of out-of-stock warehouses, and a set of balanced warehouses, including: Obtain historical sales data of target products in each warehouse; Statistical analysis is performed on the historical sales data of the target product in each warehouse to obtain the sales forecast distribution of each warehouse in the next cycle. The sales forecast distribution of each warehouse in the next cycle is a normal distribution, and its expected sales volume is μ i , the standard deviation of sales volume is σ i ; Obtaining a target service level set by a user, and determining a safety stock factor based on the target service level; Based on the safety stock coefficient, expected sales volume and sales volume standard deviation, the status of each warehouse is determined to obtain a set of overstocked warehouses, a set of out-of-stock warehouses and a set of balanced warehouses.
3. The rule-based regional inventory balancing method according to claim 2, characterized in that: The target service level is 95% and the safety stock factor is 1.
645.
4. The rule-based regional inventory balancing method according to claim 3, characterized in that: Based on the target service level, safety stock factor, expected sales volume, and sales volume standard deviation, the status of each warehouse is determined to obtain a set of overstocked warehouses, a set of out-of-stock warehouses, and a set of balanced warehouses, including: Extract the current actual inventory of the i-th warehouse; Based on the safety stock coefficient, expected sales volume, and sales volume standard deviation, a threshold for determining a multi-stock warehouse is constructed. The threshold is the expected sales volume plus the product of the safety stock coefficient and the sales volume standard deviation. Based on the safety stock coefficient, expected sales volume, and sales volume standard deviation, a threshold for determining a stock-out warehouse is constructed. The threshold for determining a stock-out warehouse is the expected sales volume minus the product of the safety stock coefficient and the sales volume standard deviation. If the current actual inventory of the i-th warehouse is greater than the multi-stock warehouse determination threshold, the i-th warehouse is determined to be a multi-stock warehouse; If the current actual inventory of the i-th warehouse is less than the out-of-stock warehouse determination threshold, the i-th warehouse is determined to be an out-of-stock warehouse; If the current actual inventory of the i-th warehouse is between the out-of-stock warehouse determination threshold and the overstock warehouse determination threshold, the i-th warehouse is determined to be a balanced warehouse.
5. The rule-based regional inventory balancing method according to claim 1, characterized in that: Based on the distance between each warehouse, the transportation cost calculation factor, and the unit profit of the target product, the warehouse directed graph is iteratively optimized until no new and better inventory transfer plan can be found to obtain a final optimized inventory transfer plan, including: in each cycle, traversing all combinations of the set of the high-stock warehouses and the set of the low-stock warehouses: Based on the transfer cost between the m-th warehouse with excess goods and the n-th warehouse with shortage goods, profitability verification is performed to obtain profitability verification results; In response to the profitability verification result being a successful verification, setting the mth overstocked warehouse as the initial optimal allocation choice for the nth out-of-stock warehouse; When the oth multi-stock warehouse is determined to be the allocation option for the nth out-of-stock warehouse, based on the comparison between the transfer cost of the oth multi-stock warehouse and the transfer cost of the mth multi-stock warehouse, it is determined whether to set the oth multi-stock warehouse as the optimal allocation option for the nth out-of-stock warehouse.
6. The rule-based regional inventory balancing method according to claim 5, characterized in that: The cost of transferring goods between the m-th warehouse with excess goods and the n-th warehouse with insufficient goods is calculated using the following formula: Cost m,n =k*D m,n 2 Among them, k is the transportation cost calculation factor, D m,n is the distance between the mth overstock warehouse and the nth out-of-stock warehouse.
7. The rule-based regional inventory balancing method according to claim 6, characterized in that: Based on the transfer cost between the m-th warehouse with excess inventory and the n-th warehouse with shortage inventory, profitability verification is performed to obtain profitability verification results, including: It is determined whether the transfer cost between the m-th excess stock warehouse and the n-th out-of-stock warehouse is less than the unit profit of the target product. If so, the profitability verification result is determined to be successful.
8. A rule-based regional inventory balancing system, characterized by: The rule-based regional inventory balancing system is used to execute the rule-based regional inventory balancing method according to any one of claims 1 to 7.
Citation Information
Cited By
Intelligent decision-making method and system for multi-warehouse dynamic allocation
CN121365937A