Intelligent vending machine replenishment path optimization scheduling method and system based on artificial intelligence
By using LSTM time series models and multi-vehicle route optimization technology, the problems of insufficient sales forecasting and unstable route optimization in the replenishment scheduling of smart vending machines are solved, achieving efficient and balanced replenishment scheduling and service guarantee.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI QUZHI NETWORK TECH CO LTD
- Filing Date
- 2026-04-24
- Publication Date
- 2026-07-24
AI Technical Summary
Existing smart vending machine replenishment scheduling suffers from problems such as insufficient accuracy in sales forecasting, lack of quantitative basis for replenishment priority determination, and failure to consider service reliability in route optimization, leading to operational instability and resource waste.
We use an LSTM time series model to predict product sales, calculate replenishment priority by combining stockout probability, and construct a path optimization objective function by optimizing the multi-vehicle path planning (VRPTW) problem with time windows. We also introduce a stockout penalty mechanism to perform dynamic vehicle scheduling.
It improved the accuracy of sales forecasting, enabled resources to be allocated to high-value sites, balanced transportation costs and service reliability, adapted to sudden demand, and enhanced the stability and flexibility of replenishment scheduling.
Smart Images

Figure CN122453286A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and intelligent logistics scheduling technology, specifically to an artificial intelligence-based intelligent vending machine replenishment route optimization scheduling method and system. Background Technology
[0002] Vending machines, as a crucial terminal carrier in the new retail landscape, are widely used in transportation hubs, office buildings, and communities. Their efficient operation relies on precise replenishment scheduling. Current mainstream replenishment strategies mostly employ fixed-cycle replenishment or experience-based manual scheduling, combining basic inventory thresholds to determine replenishment needs. At the route planning level, they largely depend on traditional TSP (Traveling Salesman Problem) or basic VRP (Vehicle Routing Problem) algorithms, aiming for the shortest distance or lowest transportation cost. Some companies have introduced simple time-series statistical models for sales forecasting, but these haven't fully integrated historical sales patterns, site revenue priorities, and real-time inventory status. In terms of logistics scheduling, manual scheduling remains dominant, only meeting basic delivery needs and failing to form a closed-loop intelligent scheduling system encompassing "prediction-priority-route optimization."
[0003] The existing technology has three core shortcomings: First, the accuracy of sales forecasting is insufficient. Traditional statistical models cannot capture the temporal fluctuations and periodic characteristics of vending machine sales data, which can easily lead to over-replenishment or stockouts, affecting revenue and user experience. Second, the determination of replenishment priority lacks quantitative basis and relies heavily on the subjective experience of operators. It does not incorporate key factors such as stockout probability, site revenue contribution, and inventory consumption rate into a unified scoring model, making it difficult to allocate resources to high-value sites. Third, route optimization does not take service reliability into account. The traditional VRPTW (Vehicle Routing Problem with Time Window) algorithm only aims to minimize route cost and does not introduce a stockout penalty mechanism. This can easily lead to situations where high-priority sites are overlooked in order to reduce transportation costs. At the same time, it lacks the ability to dynamically schedule vehicles in real time, making it unable to cope with sudden demand and changes in road conditions, resulting in an inability to balance replenishment efficiency and service stability.
[0004] Therefore, there is an urgent need for an AI-based intelligent vending machine replenishment path optimization and scheduling method to solve the problems of insufficient sales forecast accuracy, lack of quantitative basis for replenishment priority determination, and failure to take service reliability into account in the path optimization of existing technologies. Summary of the Invention
[0005] To address these issues, this invention provides an AI-based method and system for optimizing replenishment paths for smart vending machines. This method solves problems such as insufficient sales forecast accuracy, lack of quantitative basis for replenishment priority determination, and failure to consider service reliability in existing smart vending machine replenishment scheduling, thereby achieving efficient and balanced replenishment scheduling and service assurance.
[0006] To achieve the above objectives, the present invention provides the following technical solution: an artificial intelligence-based intelligent vending machine replenishment path optimization and scheduling method, characterized in that it includes:
[0007] Historical sales data from each vending machine site is collected; based on the historical sales data, a prediction process is performed using an LSTM time series model to obtain the product sales forecast; based on the product sales forecast and the site's inventory status, the probability of stockouts at each site is calculated.
[0008] Based on the product sales forecast and the stockout probability, the replenishment priority of each vending machine site is calculated using a priority scoring formula; and a site replenishment plan is generated based on the replenishment priority.
[0009] Based on the site replenishment plan, the VRPTW (Multi-Vehicle Route Planning) problem with time windows is transformed into a quadratic optimization problem. Based on the quadratic optimization problem, a route optimization objective function is constructed and solved by combining vehicle capacity constraints and time window constraints to obtain the optimal replenishment route.
[0010] Based on the optimal replenishment route, and considering the vehicle's load and replenishment point conditions, replenishment vehicles are dynamically scheduled to complete the allocation and execution control of replenishment tasks.
[0011] As a preferred solution for the AI-based intelligent vending machine replenishment path optimization scheduling method, the formula for calculating the product sales forecast result during the calculation and prediction process using the LSTM time series model is as follows:
[0012]
[0013]
[0014] In the formula, Predict sales at time t; Let this be the hidden state at time t; Input features at time t; All of these are learnable parameters of the model;
[0015] The formula for calculating the probability of stockout is:
[0016]
[0017] In the formula, Let i be the probability of being out of stock at site i; The current inventory of site i; Let i be the predicted sales volume at time t; This is the inventory safety factor.
[0018] As a preferred embodiment of the artificial intelligence-based intelligent vending machine replenishment path optimization scheduling method, the priority scoring formula is as follows:
[0019]
[0020]
[0021] In the formula, Rate the priority; Let i be the probability of being out of stock at site i; , Revenue for sites i and j, respectively; The current inventory of site i; The maximum inventory for site i; All are weighting coefficients.
[0022] As a preferred embodiment of the artificial intelligence-based intelligent vending machine replenishment path optimization scheduling method, the expression of the path optimization objective function is as follows:
[0023]
[0024] In the formula, Z represents the total cost; K represents the total number of vehicles; and N represents the total number of stations. Let $\frac{i}{j}$ be the path cost from site $i$ to site $j$. The variable is 0-1: if vehicle k travels along the path i→j, then it is 1; otherwise, it is 0. This is the penalty coefficient for stockouts; The penalty amount for a single instance of stockout at site i; It is a 0-1 variable: if site i is successfully restocked, it is 1; otherwise, it is 0.
[0025] As a preferred embodiment of the AI-based intelligent vending machine replenishment path optimization scheduling method, the expression for the vehicle capacity constraint is:
[0026]
[0027] In the formula, Demand for site i; Let k be a 0-1 variable indicating whether vehicle k serves station i. The rated capacity of vehicle k;
[0028] The expression for the time window constraint is:
[0029]
[0030] In the formula, These are the upper and lower limits of the service time window for site i, respectively. Let be the time it takes for vehicle k to arrive at station i.
[0031] This invention also provides an artificial intelligence-based intelligent vending machine replenishment path optimization and scheduling system, employing the above-mentioned artificial intelligence-based intelligent vending machine replenishment path optimization and scheduling method, including:
[0032] The product sales forecasting and out-of-stock probability calculation module is used to collect historical sales data from each vending machine site; based on the historical sales data, it performs forecasting processing using an LSTM time series model to obtain product sales forecast results; based on the product sales forecast results and combined with the site's inventory status, it calculates the out-of-stock probability for each site.
[0033] The site replenishment plan generation module is used to calculate the replenishment priority of each vending machine site based on the product sales forecast results and the stockout probability using a priority scoring formula; and to generate a site replenishment plan based on the replenishment priority.
[0034] The path optimization objective function construction and solution module is used to transform the multi-vehicle route planning (VRPTW) problem with time windows into a quadratic optimization problem based on the station replenishment plan; based on the quadratic optimization problem, combined with vehicle capacity constraints and time window constraints, the path optimization objective function is constructed and solved to obtain the optimal replenishment path;
[0035] The replenishment vehicle dynamic scheduling module is used to dynamically schedule replenishment vehicles based on the optimal replenishment route, combined with the vehicle's load and replenishment point conditions, to complete the allocation and execution control of replenishment tasks.
[0036] As a preferred solution for an AI-based intelligent vending machine replenishment path optimization and scheduling system, in the product sales prediction and out-of-stock probability calculation module, during the calculation and prediction process using the LSTM time series model, the formula for calculating the product sales prediction result is as follows:
[0037]
[0038]
[0039] In the formula, Predict sales at time t; Let this be the hidden state at time t; Input features at time t; All of these are learnable parameters of the model;
[0040] The formula for calculating the probability of stockout is:
[0041]
[0042] In the formula, Let i be the probability of being out of stock at site i; The current inventory of site i; Let i be the predicted sales volume at time t; This is the inventory safety factor.
[0043] As a preferred solution for an AI-based intelligent vending machine replenishment path optimization and scheduling system, the priority scoring formula in the site replenishment plan generation module is:
[0044]
[0045]
[0046] In the formula, Rate the priority; Let i be the probability of being out of stock at site i; , Revenue for sites i and j, respectively; The current inventory of site i; The maximum inventory for site i; All are weighting coefficients.
[0047] As a preferred solution for an AI-based intelligent vending machine replenishment path optimization scheduling system, the expression of the path optimization objective function in the path optimization objective function construction and solution module is as follows:
[0048]
[0049] In the formula, Z represents the total cost; K represents the total number of vehicles; and N represents the total number of stations. Let $\frac{i}{j}$ be the path cost from site $i$ to site $j$. The variable is 0-1: if vehicle k travels along the path i→j, then it is 1; otherwise, it is 0. This is the penalty coefficient for stockouts; The penalty amount for a single instance of stockout at site i; It is a 0-1 variable: if site i is successfully restocked, it is 1; otherwise, it is 0.
[0050] As a preferred solution for an AI-based intelligent vending machine replenishment path optimization and scheduling system, the expression for the vehicle capacity constraint in the path optimization objective function construction and solution module is as follows:
[0051]
[0052] In the formula, Demand for site i; Let k be a 0-1 variable indicating whether vehicle k serves station i. The rated capacity of vehicle k;
[0053] The expression for the time window constraint is:
[0054]
[0055] In the formula, These are the upper and lower limits of the service time window for site i, respectively. Let be the time it takes for vehicle k to arrive at station i.
[0056] The present invention has the following advantages:
[0057] First, by capturing the fluctuation characteristics of sales data through time series models, we can better align with actual sales patterns, reduce situations of over- or under-stocking, and improve operational stability.
[0058] Second, establish a multi-dimensional quantitative scoring system that incorporates factors such as stockout risk, revenue contribution, and inventory consumption into priority calculations, so that replenishment resources are tilted towards high-value sites.
[0059] Third, introduce a shortage penalty mechanism in route optimization to balance transportation costs and service reliability, and avoid missing key stations in order to reduce costs.
[0060] Fourth, dynamic scheduling based on real-time vehicle operating status can adapt to sudden demands and changes in road conditions, improving the overall flexibility and adaptability of scheduling.
[0061] Fifth, a "prediction-priority-path optimization" system is formed, which eliminates the need for excessive reliance on human experience, reduces operational and management costs, and improves the level of automation. Attached Figure Description
[0062] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.
[0063] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.
[0064] Figure 1 This is a flowchart illustrating the artificial intelligence-based intelligent vending machine replenishment path optimization scheduling method provided in Embodiment 1 of the present invention;
[0065] Figure 2 This is a schematic diagram illustrating the specific implementation process of the AI-based intelligent vending machine replenishment path optimization scheduling method provided in Embodiment 1 of the present invention;
[0066] Figure 3 This is a schematic diagram of the architecture of the AI-based smart vending machine replenishment path optimization scheduling system provided in Embodiment 2 of the present invention. Detailed Implementation
[0067] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.
[0068] Example 1
[0069] See Figure 1 and Figure 2 Embodiment 1 of the present invention provides an artificial intelligence-based intelligent vending machine replenishment path optimization scheduling method, including the following steps:
[0070] S1. Collect historical sales data from each vending machine site; based on the historical sales data, perform prediction processing using an LSTM time series model to obtain product sales prediction results; based on the product sales prediction results and combined with the site inventory status, calculate the out-of-stock probability of each site.
[0071] S2. Based on the product sales forecast results and the stockout probability, calculate the replenishment priority of each vending machine site using the priority scoring formula; generate a site replenishment plan according to the replenishment priority;
[0072] S3. Based on the station replenishment plan, the VRPTW (Multi-Vehicle Route Planning) problem with time windows is transformed into a quadratic optimization problem. Based on the quadratic optimization problem, combined with vehicle capacity constraints and time window constraints, a path optimization objective function is constructed and solved to obtain the optimal replenishment path.
[0073] S4. Based on the optimal replenishment route, and in combination with the vehicle's load and replenishment point conditions, dynamically schedule the replenishment vehicles to complete the allocation and execution control of replenishment tasks.
[0074] In this embodiment, in step S1, historical sales data of each vending machine site is collected; based on the historical sales data, a prediction process is performed using an LSTM time series model to obtain the product sales prediction result; based on the product sales prediction result and combined with the site inventory status, the out-of-stock probability of each site is calculated.
[0075] Specifically, the historical sales data of each vending machine site is first collected and cleaned to remove abnormal orders and missing values, and then a time series dataset is constructed according to the site-product-time dimension. The processed time series data is then input into an LSTM time series model, which learns the periodicity and volatility of historical sales and outputs the product sales forecast results for future periods. Finally, combined with the current inventory level of the site and the predicted sales, the out-of-stock probability of the corresponding products at each site is calculated, providing data support for subsequent priority determination.
[0076] In the process of calculation and prediction using the LSTM time series model, the formula for calculating the commodity sales forecast result is as follows:
[0077]
[0078]
[0079] In the formula, Predict sales at time t; Let this be the hidden state at time t; Input features at time t; All of these are learnable parameters of the model;
[0080] The formula for calculating the probability of stockout is:
[0081]
[0082] In the formula, Let i be the probability of being out of stock at site i; The current inventory of site i; Let i be the predicted sales volume at time t; This is the inventory safety factor.
[0083] In this embodiment, in step S2, based on the product sales forecast result and the out-of-stock probability, the replenishment priority of each vending machine site is calculated using a priority scoring formula; and a site replenishment plan is generated according to the replenishment priority.
[0084] Specifically, using sales forecast results and stockout probability as core inputs, combined with factors such as site revenue contribution and inventory consumption rate, each site is quantitatively scored using a preset priority scoring formula to obtain the site replenishment priority. The sites that need replenishment are selected by sorting them from high to low priority. Based on the demand quantity and inventory threshold of each site, a site replenishment plan is generated, which includes the replenishment site, replenishment product, and total demand, providing a task basis for subsequent path optimization.
[0085] The priority scoring formula is as follows:
[0086]
[0087]
[0088] In the formula, Rate the priority; Let i be the probability of being out of stock at site i; , Revenue for sites i and j, respectively; The current inventory of site i; The maximum inventory for site i; All are weighting coefficients.
[0089] In this embodiment, in step S3, based on the station replenishment plan, the multi-vehicle route planning (VRPTW) problem with time windows is transformed into a quadratic optimization problem; based on the quadratic optimization problem, combined with vehicle capacity constraints and time window constraints, a route optimization objective function is constructed and solved to obtain the optimal replenishment route.
[0090] Specifically, based on the replenishment plan, the replenishment sites, distribution centers, and vehicles are abstracted as road network nodes and edges, transforming the multi-vehicle route planning problem with time windows into a solvable quadratic optimization problem. During the optimization process, the maximum vehicle load constraint and the station service time window constraint are introduced to construct an objective function that includes path cost and out-of-stock penalty. The objective function is solved by the operations research algorithm to obtain the optimal replenishment path that satisfies the constraints and has the lowest total cost, providing route solutions for vehicle scheduling.
[0091] The expression for the path optimization objective function is as follows:
[0092]
[0093] In the formula, Z represents the total cost; K represents the total number of vehicles; and N represents the total number of stations. Let $\frac{i}{j}$ be the path cost from site $i$ to site $j$. The variable is 0-1: if vehicle k travels along the path i→j, then it is 1; otherwise, it is 0. This is the penalty coefficient for stockouts; The penalty amount for a single instance of stockout at site i; It is a 0-1 variable: if site i is successfully restocked, it is 1; otherwise, it is 0.
[0094] The expression for the vehicle capacity constraint is:
[0095]
[0096] In the formula, Demand for site i; Let k be a 0-1 variable indicating whether vehicle k serves station i. The rated capacity of vehicle k;
[0097] The expression for the time window constraint is:
[0098]
[0099] In the formula, These are the upper and lower limits of the service time window for site i, respectively. Let be the time it takes for vehicle k to arrive at station i.
[0100] In this embodiment, in step S4, based on the optimal replenishment route and combined with the vehicle's load and replenishment point conditions, the replenishment vehicles are dynamically scheduled to complete the allocation and execution control of the replenishment task.
[0101] Specifically, the optimal replenishment route is assigned to the corresponding vehicle, and the task is dynamically adjusted based on the real-time load status of the vehicle and the actual demand changes at the replenishment point. During the delivery process, the vehicle location and station status are monitored in real time. If there are changes in road conditions, emergency replenishment at the station, or vehicle overloading, the route or task allocation is corrected in a timely manner to ensure that the replenishment task is completed on time and in the required quantity, thereby achieving closed-loop control of the entire replenishment process.
[0102] The application scenarios of this invention are as follows:
[0103] In urban office buildings and commercial complexes, this invention can rationally arrange replenishment vehicles and routes based on the sales data and inventory status of multiple smart vending machines, thereby improving the overall efficiency of terminal replenishment.
[0104] In transportation hubs such as subway stations, high-speed rail stations, and airports, this invention can adapt to the operational characteristics of vending machines with large fluctuations in passenger flow, dynamically adjust replenishment plans and delivery routes, and reduce the waste of operational resources.
[0105] In enclosed areas such as campuses and industrial parks, this invention can uniformly schedule densely distributed smart vending machines, optimize vehicle delivery arrangements, and maintain a stable supply of equipment.
[0106] In community and convenience service point scenarios, this invention can generate replenishment plans based on daily sales patterns, adapt to the layout of distributed locations, and make replenishment scheduling more in line with actual operational needs.
[0107] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.
[0108] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0109] Example 2
[0110] See Figure 3 Embodiment 2 of the present invention also provides an artificial intelligence-based intelligent vending machine replenishment path optimization and scheduling system, including:
[0111] The product sales forecasting and out-of-stock probability calculation module 001 is used to collect historical sales data from each vending machine site; based on the historical sales data, it performs forecasting processing through an LSTM time series model to obtain product sales forecast results; based on the product sales forecast results and combined with the site inventory status, it calculates the out-of-stock probability of each site.
[0112] The site replenishment plan generation module 002 is used to calculate the replenishment priority of each vending machine site based on the product sales forecast results and the stockout probability through a priority scoring formula; and generate a site replenishment plan according to the replenishment priority.
[0113] The path optimization objective function construction and solution module 003 is used to transform the multi-vehicle route planning (VRPTW) problem with time windows into a quadratic optimization problem based on the station replenishment plan; based on the quadratic optimization problem, combined with vehicle capacity constraints and time window constraints, the path optimization objective function is constructed and solved to obtain the optimal replenishment path;
[0114] The replenishment vehicle dynamic scheduling module 004 is used to dynamically schedule replenishment vehicles based on the optimal replenishment route, combined with the vehicle's load and replenishment point conditions, to complete the allocation and execution control of replenishment tasks.
[0115] In this embodiment, in the commodity sales forecasting and stockout probability calculation module 001, during the calculation and forecasting process using the LSTM time series model, the formula for calculating the commodity sales forecast result is as follows:
[0116]
[0117]
[0118] In the formula, Predict sales at time t; Let this be the hidden state at time t; Input features at time t; All of these are learnable parameters of the model;
[0119] The formula for calculating the probability of stockout is:
[0120]
[0121] In the formula, Let i be the probability of being out of stock at site i; The current inventory of site i; Let i be the predicted sales volume at time t; This is the inventory safety factor.
[0122] In this embodiment, the priority scoring formula in the site replenishment plan generation module 002 is:
[0123]
[0124]
[0125] In the formula, Rate the priority; Let i be the probability of being out of stock at site i; , Revenue for sites i and j, respectively; The current inventory of site i; The maximum inventory for site i; All are weighting coefficients.
[0126] In this embodiment, in the path optimization objective function construction and solution module 003, the expression of the path optimization objective function is:
[0127]
[0128] In the formula, Z represents the total cost; K represents the total number of vehicles; and N represents the total number of stations. Let $\frac{i}{j}$ be the path cost from site $i$ to site $j$. The variable is 0-1: if vehicle k travels along the path i→j, then it is 1; otherwise, it is 0. This is the penalty coefficient for stockouts; The penalty amount for a single instance of stockout at site i; It is a 0-1 variable: if site i is successfully restocked, it is 1; otherwise, it is 0.
[0129] In this embodiment, in the path optimization objective function construction and solution module 003, the expression for the vehicle capacity constraint is:
[0130]
[0131] In the formula, Demand for site i; Let k be a 0-1 variable indicating whether vehicle k serves station i. The rated capacity of vehicle k;
[0132] The expression for the time window constraint is:
[0133]
[0134] In the formula, These are the upper and lower limits of the service time window for site i, respectively. Let be the time it takes for vehicle k to arrive at station i.
[0135] It should be noted that the information interaction and execution process between the modules of the above system are based on the same concept as the method embodiment in Embodiment 1 of this application, and the resulting technical effects are the same as those in the method embodiment of this application. For details, please refer to the description in the method embodiment shown above in this application, and it will not be repeated here.
[0136] Example 3
[0137] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium storing program code for an artificial intelligence-based intelligent vending machine replenishment path optimization scheduling method. The program code includes instructions for executing the artificial intelligence-based intelligent vending machine replenishment path optimization scheduling method of Embodiment 1 or any possible implementation thereof.
[0138] Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0139] Example 4
[0140] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;
[0141] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor can call the program instructions to execute the AI-based smart vending machine replenishment path optimization scheduling method of Embodiment 1 or any possible implementation thereof.
[0142] Specifically, a processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. This memory can be integrated into the processor or located outside the processor and exist independently.
[0143] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable system. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0144] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing systems. They can be centralized on a single computing system or distributed across a network of multiple computing systems. Optionally, they can be implemented using program code executable by a computing system, thereby storing them in a storage system for execution by the computing system. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0145] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.
Claims
1. An AI-based method for optimizing and scheduling replenishment routes in smart vending machines, characterized in that: include: Historical sales data from each vending machine site is collected; based on the historical sales data, a prediction process is performed using an LSTM time series model to obtain the product sales prediction results. Based on the product sales forecast results and the site inventory status, the out-of-stock probability of each site is calculated. Based on the product sales forecast and the stockout probability, the replenishment priority of each vending machine site is calculated using a priority scoring formula; and a site replenishment plan is generated based on the replenishment priority. Based on the site replenishment plan, the VRPTW (Multi-Vehicle Route Planning) problem with time windows is transformed into a quadratic optimization problem. Based on the quadratic optimization problem, a route optimization objective function is constructed and solved by combining vehicle capacity constraints and time window constraints to obtain the optimal replenishment route. Based on the optimal replenishment route, and considering the vehicle's load and replenishment point conditions, replenishment vehicles are dynamically scheduled to complete the allocation and execution control of replenishment tasks.
2. The artificial intelligence-based intelligent vending machine replenishment path optimization and scheduling method according to claim 1, characterized in that, In the process of calculation and prediction using the LSTM time series model, the formula for calculating the commodity sales forecast result is as follows: In the formula, Predict sales at time t; Let this be the hidden state at time t; Input features at time t; All of these are learnable parameters of the model; The formula for calculating the probability of stockout is: In the formula, Let i be the probability of being out of stock at site i; The current inventory of site i; Let i be the predicted sales volume at time t; This is the inventory safety factor.
3. The artificial intelligence-based intelligent vending machine replenishment path optimization and scheduling method according to claim 2, characterized in that, The priority scoring formula is as follows: In the formula, Rate the priority; Let i be the probability of being out of stock at site i; , Revenue for sites i and j, respectively; The current inventory of site i; The maximum inventory for site i; All are weighting coefficients.
4. The artificial intelligence-based intelligent vending machine replenishment path optimization and scheduling method according to claim 3, characterized in that, The expression for the path optimization objective function is: In the formula, Z represents the total cost; K represents the total number of vehicles; and N represents the total number of stations. Let $\frac{i}{j}$ be the path cost from site $i$ to site $j$. The variable is 0-1: if vehicle k travels along the path i→j, then it is 1; otherwise, it is 0. This is the penalty coefficient for stockouts; The penalty amount for a single instance of stockout at site i; It is a 0-1 variable: if site i is successfully restocked, it is 1; otherwise, it is 0.
5. The artificial intelligence-based intelligent vending machine replenishment path optimization and scheduling method according to claim 4, characterized in that, The expression for the vehicle capacity constraint is: In the formula, Demand for site i; Let k be a 0-1 variable indicating whether vehicle k serves station i. The rated capacity of vehicle k; The expression for the time window constraint is: In the formula, These are the upper and lower limits of the service time window for site i, respectively. Let be the time it takes for vehicle k to arrive at station i.
6. An AI-based intelligent vending machine replenishment path optimization and scheduling system, employing the AI-based intelligent vending machine replenishment path optimization and scheduling method as described in any one of claims 1-5, characterized in that, include: The product sales forecasting and out-of-stock probability calculation module is used to collect historical sales data from each vending machine site; based on the historical sales data, it performs forecasting processing through an LSTM time series model to obtain the product sales forecast results. Based on the product sales forecast results and the site inventory status, the out-of-stock probability of each site is calculated. The site replenishment plan generation module is used to calculate the replenishment priority of each vending machine site based on the product sales forecast results and the stockout probability using a priority scoring formula; and to generate a site replenishment plan based on the replenishment priority. The path optimization objective function construction and solution module is used to transform the multi-vehicle route planning (VRPTW) problem with time windows into a quadratic optimization problem based on the station replenishment plan; based on the quadratic optimization problem, combined with vehicle capacity constraints and time window constraints, the path optimization objective function is constructed and solved to obtain the optimal replenishment path; The replenishment vehicle dynamic scheduling module is used to dynamically schedule replenishment vehicles based on the optimal replenishment route, combined with the vehicle's load and replenishment point conditions, to complete the allocation and execution control of replenishment tasks.
7. The intelligent vending machine replenishment path optimization and scheduling system based on artificial intelligence according to claim 6, characterized in that, In the product sales forecasting and stockout probability calculation module, during the calculation and forecasting process using the LSTM time series model, the formula for calculating the product sales forecast result is as follows: In the formula, Predict sales at time t; Let this be the hidden state at time t; Input features at time t; All of these are learnable parameters of the model; The formula for calculating the probability of stockout is: In the formula, Let i be the probability of being out of stock at site i; The current inventory of site i; Let i be the predicted sales volume at time t; This is the inventory safety factor.
8. The intelligent vending machine replenishment path optimization and scheduling system based on artificial intelligence according to claim 7, characterized in that, In the site replenishment plan generation module, the priority scoring formula is: In the formula, Rate the priority; Let i be the probability of being out of stock at site i; , Revenue for sites i and j, respectively; The current inventory of site i; The maximum inventory for site i; All are weighting coefficients.
9. The intelligent vending machine replenishment path optimization and scheduling system based on artificial intelligence according to claim 8, characterized in that, In the path optimization objective function construction and solution module, the expression of the path optimization objective function is: In the formula, Z represents the total cost; K represents the total number of vehicles; and N represents the total number of stations. Let $\frac{i}{j}$ be the path cost from site $i$ to site $j$. The variable is 0-1: if vehicle k travels along the path i→j, then it is 1; otherwise, it is 0. This is the penalty coefficient for stockouts; The penalty amount for a single instance of stockout at site i; It is a 0-1 variable: if site i is successfully restocked, it is 1; otherwise, it is 0.
10. The intelligent vending machine replenishment path optimization and scheduling system based on artificial intelligence according to claim 9, characterized in that, In the path optimization objective function construction and solution module, the expression for the vehicle capacity constraint is: In the formula, Demand for site i; Let k be a 0-1 variable indicating whether vehicle k serves station i. The rated capacity of vehicle k; The expression for the time window constraint is: In the formula, These are the upper and lower limits of the service time window for site i, respectively. Let be the time it takes for vehicle k to arrive at station i.