Intelligent vending machine control method and system

Through intelligent vending machine control methods, sales analysis and real-time monitoring are used to achieve reasonable allocation and dynamic adjustment of vending machine goods, solve the problem of inefficient inventory management of traditional vending machines, and improve operational efficiency and consumer experience.

CN120472581BActive Publication Date: 2025-09-23CLP DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510968598.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2025-09-23
Estimated Expiration
2045-07-15

AI Technical Summary

Technical Problem

Traditional vending machines have inefficient inventory management and are unable to adapt to changes in sales, resulting in out-of-stock situations for popular products. They also lack a flexible dynamic adjustment mechanism, impacting consumer experience and operational efficiency.

Method used

By obtaining the sales flow and product types of the vending machines, conducting sales analysis and sorting, designing the initial product distribution location, monitoring inventory in real time, performing product redistribution and replenishment demand assessment, and building an intelligent replenishment reminder mechanism, reasonable matching and dynamic adjustment of products in the vending machines can be achieved.

Benefits of technology

It improves the intelligence level of vending machines, optimizes inventory management, reduces out-of-stock situations, improves operational efficiency and customer experience, and meets the market demand for flexible and intelligent vending.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472581B_ABST
    Figure CN120472581B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of vending machine control technology, and in particular to a method and system for controlling intelligent vending machines. The method comprises the following steps: obtaining the sales flow and product types of the vending machine, sorting the products according to sales volume to design an initial distribution location, simulating the shelving of products based on the sales flow and initial location, monitoring the quantity of products in real time and calculating the sales volume of various types of products, performing extreme point pairing of product types based on real-time sales data, adjusting the distribution location to optimize the layout, calculating the shortest redistribution path based on the new distribution location, implementing product redistribution, evaluating replenishment needs and establishing a replenishment reminder mechanism, achieving coordinated control of product redistribution and replenishment, and improving the operational efficiency of the vending machine. The present invention implements coordinated replenishment control of vending machines, promoting efficient operation and management of vending machines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vending machine control, and in particular to an intelligent vending machine control method and system. Background Art

[0002] The operation and management of traditional vending machines often rely on static product layouts and manual replenishment, resulting in inefficient inventory management. The distribution of products in the vending machines is difficult to adapt to actual sales conditions, especially during peak hours. Out-of-stock phenomena of popular products frequently occur, affecting consumers' shopping experience. The lack of a flexible dynamic adjustment mechanism makes it impossible for vending machines to effectively respond to changes in consumer demand, further limiting the realization of sales potential. In addition, existing technologies have shortcomings in real-time data monitoring and sales analysis. Many vending machines are unable to track the sales of various products in real time, resulting in replenishment decisions relying on outdated data and being unable to adjust product positions in time to adapt to market changes. The traditional replenishment model lacks scientific basis and is prone to excessive or insufficient inventory, increasing operating costs and affecting the economic benefits of the vending machine. Especially in vending machines that sell multiple types of products, the mutual influence between products has not been effectively considered, further exacerbating the complexity of management. Summary of the Invention

[0003] Based on this, it is necessary to provide a smart vending machine control method and system to solve at least one of the above technical problems.

[0004] To achieve the above object, a smart vending machine control method includes the following steps:

[0005] Step S1: Obtain the sales flow of the vending machine and the types of goods in the vending machine; arrange the types of goods in the vending machine by sales volume based on the sales flow of the vending machine to obtain goods type sorting data; design the initial goods distribution location based on the goods type sorting data;

[0006] Step S2: Based on the vending machine sales flow and the initial goods distribution location, simulate the goods on the shelves and continuously monitor the real-time goods quantity of the vending machine; calculate the real-time sales data of each vending machine's goods type based on the preset initial goods quantity and the real-time goods quantity of the vending machine;

[0007] Step S3: Pairing the vending machine goods types based on real-time sales data to obtain paired goods types; swapping and reallocating the initial goods distribution positions based on the paired goods types and the size contours of the paired goods types to generate reallocated goods distribution positions;

[0008] Step S4: Calculate the shortest redistribution path based on the preset vending machine shelf layout and the redistributed goods distribution location; redistribute goods based on the shortest redistribution path, and establish a goods redistribution mechanism based on the goods redistribution data;

[0009] Step S5: Evaluate the replenishment demand based on the real-time sales data and the real-time quantity of goods in the vending machine, and build a replenishment reminder mechanism based on the replenishment demand; integrate the goods redistribution mechanism and the replenishment reminder mechanism to achieve collaborative control of coupled vending machines.

[0010] The present invention realizes effective analysis of goods sales by acquiring the sales flow and goods types of the vending machine. The sorting of sales data provides a scientific basis for the design of the initial distribution position of goods, ensuring the priority display of popular goods. The implementation of goods shelf simulation enables real-time monitoring of the inventory of the vending machine. By comparing the initial goods quantity and the real-time quantity, the real-time sales data can be accurately calculated, providing data support for subsequent optimization. The extreme points of the real-time sales data are matched with each other to achieve a reasonable match between the goods types and optimize the distribution effect of the goods. The distribution position of the matched goods types is readjusted to improve the convenience of customers to pick up the goods. The calculation of the shortest path for redistribution ensures the most efficient movement of goods inside the vending machine. It is efficient and reduces the time loss in the reallocation process. The constructed goods reallocation mechanism provides flexibility for the dynamic adjustment of vending machines and can quickly respond to changes in market demand. The implementation of replenishment demand assessment provides accurate data basis for inventory management, ensuring the continuous supply of goods in vending machines. The constructed replenishment reminder mechanism effectively reduces the occurrence of out-of-stock situations. The integration of the goods reallocation mechanism and the replenishment reminder mechanism realizes the coordinated control of vending machines, improves the overall operational efficiency, and ensures the optimization of customer experience. The implementation of the overall method not only improves the intelligence level of vending machines, promotes the efficient operation and management of vending machines, meets the market demand for flexible and intelligent vending solutions, but also promotes the innovation and development of the smart retail industry.

[0011] The present invention also provides an intelligent vending machine control system for executing the intelligent vending machine control method described above, the intelligent vending machine control system comprising:

[0012] The sales ranking module is used to obtain the sales flow of the vending machine and the types of goods in the vending machine; based on the sales flow of the vending machine, the types of goods in the vending machine are sorted by sales volume to obtain the goods type ranking data; based on the goods type ranking data, the initial goods distribution location is designed;

[0013] The shelf monitoring module is used to simulate the shelf loading of goods based on the sales flow of the vending machine and the initial goods distribution location, and continuously monitor the real-time goods quantity of the vending machine; the real-time sales data of each vending machine's goods type is calculated based on the preset initial goods quantity and the real-time goods quantity of the vending machine;

[0014] The heterogeneous matching module is used to match the types of goods in the vending machines according to real-time sales data to obtain paired goods types; the initial goods distribution positions are swapped and reallocated based on the paired goods types and the size contours of the paired goods types to generate reallocated goods distribution positions;

[0015] A path reconstruction module is used to calculate the shortest redistribution path based on the preset vending machine shelf layout and the redistributed goods distribution location; redistribute goods based on the redistribution shortest path, and establish a goods redistribution mechanism based on the goods redistribution data;

[0016] The collaborative replenishment module is used to evaluate replenishment needs based on real-time sales data and the real-time quantity of goods in vending machines, and to build a replenishment reminder mechanism based on replenishment needs; it integrates the goods reallocation mechanism and the replenishment reminder mechanism to achieve collaborative control of coupled vending machines.

[0017] The present invention realizes the rapid acquisition and analysis of the sales flow and product types of vending machines through the implementation of the sales ranking module. The arrangement based on sales data provides a scientific basis for the design of the initial distribution position of goods, ensuring the priority display of high-sales products. The introduction of the shelf monitoring module enables the simulation of goods shelf, continuously monitors the real-time quantity of goods in the vending machine, calculates the real-time sales data of each type of goods, and provides accurate data support for optimization. The heterogeneous matching module pairs the types of goods with each other through the analysis of real-time sales data, optimizes the distribution strategy of goods, and improves the convenience and satisfaction of customers in picking up goods by redistributing the paired types of goods. The path reconstruction module calculates the shortest path according to the preset pattern of the vending machine shelves and the redistributed goods positions, ensuring The high efficiency of the goods redistribution process reduces the redistribution time and cost. The constructed goods redistribution mechanism provides flexibility for the dynamic adjustment of vending machines and can quickly respond to changes in market demand. The collaborative replenishment module evaluates replenishment needs based on real-time sales data and the number of goods in the vending machine, provides an accurate inventory management solution, and ensures the continuous supply of goods. The construction of the replenishment reminder mechanism effectively reduces out-of-stock situations and improves the operational efficiency of the vending machine. The synergy of the integrated goods redistribution mechanism and the replenishment reminder mechanism realizes the intelligent control of the vending machine, improves the overall operational efficiency, and enhances the customer's shopping experience. The realization of the overall system promotes the development of smart retail, meets the market demand for flexible and intelligent vending solutions, and enhances the competitive advantage of vending machines. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A flowchart of a method for controlling an intelligent vending machine;

[0019] Figure 2 Detailed implementation flow chart of step S2;

[0020] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0021] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. It is obvious that the embodiments described are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts are within the scope of protection of the present invention.

[0022] In addition, the accompanying drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor and / or microcontroller approaches.

[0023] It should be understood that although the terms "first," "second," and the like may be used herein to describe various elements, these elements should not be limited by these terms. These terms are used solely to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element, without departing from the scope of the exemplary embodiments. The term "and / or" as used herein includes any and all combinations of one or more of the listed associated items.

[0024] To achieve this, please refer to Figures 1 to 2 , a smart vending machine control method, comprising the following steps:

[0025] Step S1: Obtain the sales flow of the vending machine and the types of goods in the vending machine; arrange the types of goods in the vending machine by sales volume based on the sales flow of the vending machine to obtain goods type sorting data; design the initial goods distribution location based on the goods type sorting data;

[0026] Step S2: Based on the vending machine sales flow and the initial goods distribution location, simulate the goods on the shelves and continuously monitor the real-time goods quantity of the vending machine; calculate the real-time sales data of each vending machine's goods type based on the preset initial goods quantity and the real-time goods quantity of the vending machine;

[0027] Step S3: Pairing the vending machine goods types based on real-time sales data to obtain paired goods types; swapping and reallocating the initial goods distribution positions based on the paired goods types and the size contours of the paired goods types to generate reallocated goods distribution positions;

[0028] Step S4: Calculate the shortest redistribution path based on the preset vending machine shelf layout and the redistributed goods distribution location; redistribute goods based on the shortest redistribution path, and establish a goods redistribution mechanism based on the goods redistribution data;

[0029] Step S5: Evaluate the replenishment demand based on the real-time sales data and the real-time quantity of goods in the vending machine, and build a replenishment reminder mechanism based on the replenishment demand; integrate the goods redistribution mechanism and the replenishment reminder mechanism to achieve collaborative control of coupled vending machines.

[0030] The present invention realizes effective analysis of goods sales by acquiring the sales flow and goods types of the vending machine. The sorting of sales data provides a scientific basis for the design of the initial distribution position of goods, ensuring the priority display of popular goods. The implementation of goods shelf simulation enables real-time monitoring of the inventory of the vending machine. By comparing the initial goods quantity and the real-time quantity, the real-time sales data can be accurately calculated, providing data support for subsequent optimization. The extreme points of the real-time sales data are matched with each other to achieve a reasonable match between the goods types and optimize the distribution effect of the goods. The distribution position of the matched goods types is readjusted to improve the convenience of customers to pick up the goods. The calculation of the shortest path for redistribution ensures the most efficient movement of goods inside the vending machine. It is efficient and reduces the time loss in the reallocation process. The constructed goods reallocation mechanism provides flexibility for the dynamic adjustment of vending machines and can quickly respond to changes in market demand. The implementation of replenishment demand assessment provides accurate data basis for inventory management, ensuring the continuous supply of goods in vending machines. The constructed replenishment reminder mechanism effectively reduces the occurrence of out-of-stock situations. The integration of the goods reallocation mechanism and the replenishment reminder mechanism realizes the coordinated control of vending machines, improves the overall operational efficiency, and ensures the optimization of customer experience. The implementation of the overall method not only improves the intelligence level of vending machines, promotes the efficient operation and management of vending machines, meets the market demand for flexible and intelligent vending solutions, but also promotes the innovation and development of the smart retail industry.

[0031] In an embodiment of the present invention, the intelligent vending machine control method includes the following steps:

[0032] Step S1: Obtain the sales flow of the vending machine and the types of goods in the vending machine; arrange the types of goods in the vending machine by sales volume based on the sales flow of the vending machine to obtain goods type sorting data; design the initial goods distribution location based on the goods type sorting data;

[0033] In this embodiment, when obtaining the sales flow of the vending machine and the types of goods in the vending machine, the set remote data collection gateway device is used to collect the daily transaction records of the vending machine and store them in a structured data table. The data table fields include a transaction timestamp field, a goods number field, a transaction quantity field, and a transaction success status field. The transaction timestamp is recorded in UNIX format with an interval unit of seconds, and the goods number is a 6-digit decimal code. The total daily sales volume of each kind of goods is accumulated by parsing the transaction quantity field, and the goods type information table is extracted from the storage module of the local controller of the vending machine. The table uses a Key-Value structure to record the correspondence between the goods number and the goods name. Based on the transaction The goods number field in the record is mapped to build a unified goods category sales table, which is merged and sorted by daily cumulative sales values ​​and arranged in descending order to form goods category sorting data. The goods category sorting data is presented in the form of a two-dimensional array, where each row corresponds to a goods category and its sales data. This data is combined with the shelf layout template to generate the initial goods distribution position, where the shelf layout template adopts a two-dimensional matrix structure, and the matrix row and column dimensions are set to 5 rows and 4 columns respectively. The initial goods distribution position is mapped to the priority position area of ​​the layout matrix in the order of the sorting data. The priority position area is defined as the first two rows of the matrix, totaling 8 positions, corresponding to the priority sales area.

[0034] Step S2: Based on the vending machine sales flow and the initial goods distribution location, simulate the goods on the shelves and continuously monitor the real-time goods quantity of the vending machine; calculate the real-time sales data of each vending machine's goods type based on the preset initial goods quantity and the real-time goods quantity of the vending machine;

[0035] In this embodiment, when simulating the shelving of goods based on the sales flow of the vending machine and the initial goods distribution position, the goods flow simulator embedded in the simulation platform is used, and the initial goods quantity threshold is set to 20 pieces of each type of goods. The simulator puts the goods into the aisle cache list according to the initial goods distribution position, and performs the decrement operation one by one in the order of the sales flow. After the goods number field of each sales flow matches the aisle number, the quantity is subtracted by 1. The simulation cycle is set to 72 hours. The remaining goods quantity is recorded at each node every hour to form a real-time goods quantity matrix for the vending machine. The goods quantity matrix uses the goods type number as the key and records the real-time quantity value. The real-time sales data is calculated based on the initial goods quantity and the real-time goods quantity. The calculation method is real-time sales value = initial goods quantity - current goods quantity. The calculation process is completed by traversing each goods type number. The final real-time sales data is recorded in a JSON structure, which contains fields such as goods number, sales value, and remaining inventory value.

[0036] Step S3: Pairing the vending machine goods types based on real-time sales data to obtain paired goods types; swapping and reallocating the initial goods distribution positions based on the paired goods types and the size contours of the paired goods types to generate reallocated goods distribution positions;

[0037] In this embodiment, when the vending machine product types are paired with each other based on real-time sales data, all product types are first linearly sorted from high to low according to real-time sales, and numbered from 1 to n, where n is the total number of product types. If the total number is even, the product types numbered i and n-i+1 are directly paired one by one, where i is an integer between 1 and n / 2. If n is an odd number, the intermediate product types are not paired. This pairing forms a paired product type table, which records the number combination and real-time sales of each pair of product types. The initial product distribution positions are sequentially looked up based on the combinations in the pairing table to determine the initial position of each paired product in the shelf layout, and the position index number is recorded. Subsequently, a position swap operation is performed on each pair of paired products, that is, the product at number position i is adjusted to number position j, and the product at position j is adjusted to position i, thereby generating a new reallocated product distribution position matrix. The matrix structure is consistent with the original initial distribution matrix structure, but the position mapping content is updated.

[0038] Step S4: Calculate the shortest redistribution path based on the preset vending machine shelf layout and the redistributed goods distribution location; redistribute goods based on the shortest redistribution path, and establish a goods redistribution mechanism based on the goods redistribution data;

[0039] In this embodiment, when calculating the shortest redistribution path based on the preset vending machine shelf layout and the redistributed goods distribution location, the shelf structure diagram is first used to perform structured grid modeling, and the vending machine shelf layout is mapped into a 5×4 two-dimensional grid diagram. Each grid node is numbered from 1 to 20. The breadth-first search algorithm (BFS) is used to traverse and search the path between each pair of initial positions and redistributed positions. The movable direction of each step is set to up, down, left, and right, a total of 4 options. Crossing boundary nodes and occupied positions is prohibited. The path length is measured in moving steps, and the number of steps is limited to no more than 15 steps. The path data is stored in a list format, and each path is a random number. The path is a numbered sequence. The multi-axis handling arm in the intelligent shelving execution device is scheduled in sequence by redistributing the shortest path list. The handling arm performs each cargo transfer task at a speed of 2m / s. After each pair of cargo is redistributed, a transfer log is recorded. The redistribution log fields include the starting node, target node, cargo type number, path number, execution timestamp, etc. The cargo redistribution data is constructed by accumulating the transfer log. This data is input into the cargo redistribution mechanism construction module. The module maps each redistribution operation into a node transformation state sequence to form a redistribution state flow graph, which is stored in the global scheduling system for subsequent replenishment scheduling or inventory reorganization.

[0040] Step S5: Evaluate the replenishment demand based on the real-time sales data and the real-time quantity of goods in the vending machine, and build a replenishment reminder mechanism based on the replenishment demand; integrate the goods redistribution mechanism and the replenishment reminder mechanism to achieve collaborative control of coupled vending machines.

[0041] In this embodiment, when evaluating replenishment needs based on real-time sales data and the real-time quantity of goods in vending machines, we first extract from the real-time sales data the types of goods whose sales are 1.5 times higher than the average sales, defining them as high-frequency goods. We then match the numbers of these goods with the corresponding fields in the real-time goods quantity table, extract the current inventory value, set the inventory safety threshold to 5 pieces, generate replenishment tags for goods below the threshold, and then construct a replenishment demand list based on the replenishment tags. The list fields include the goods type number, current inventory value, average daily consumption rate, and expected clearance time. Through the prediction model, The model estimates the time it takes to clear the remaining inventory. It uses a linear regression prediction method and sets the sample period to nearly 48 hours. The average daily sales volume change rate must not exceed 10% before the forecast data is used. If the predicted clearance time is less than the current system time plus the replenishment response time limit (e.g., 4 hours), the category will be included in the urgent replenishment demand. The replenishment reminder mechanism pushes information including replenishment suggestions, clearance warnings, remaining time limits, and recommended replenishment batches to the control platform backend in a list format. At the same time, the reallocation log and replenishment log are merged and stored in the replenishment archiving module for subsequent scheduling and strategy iteration.

[0042] Preferably, step S1 includes the following steps:

[0043] Step S11: Obtain the sales flow of the vending machine and the types of goods in the vending machine; deconstruct the daily average transaction rate of the vending machine sales flow to obtain the average daily sales volume of the goods, wherein the statistical period is nearly 7 consecutive days;

[0044] Step S12: linearly sorting the types of goods in the vending machines based on the average daily sales volume of the goods, thereby obtaining sorting data of the goods types, wherein the maximum number of sorted types does not exceed 40;

[0045] Step S13: extracting the priority positions of goods distribution in the preset vending machine shelf layout, wherein the number of priority shelves is 12, distributed within a distance of one column from the center axis of the first two rows;

[0046] Step S14: Determine the initial cargo distribution location based on the cargo type sorting data and the cargo distribution priority location, where each type of cargo corresponds to only 1-2 cargo grids.

[0047] In this embodiment, the sales record log files stored locally in the past 7 days are parsed by the remote data acquisition gateway terminal module embedded in the main controller of the vending machine. The log files are stored in CSV (comma separated value) format. Each record contains fields including transaction timestamp, transaction product number, transaction quantity, payment status code, and channel number information. Each record is sorted by time. The timestamp is in UTC format and encoded in seconds. The acquisition program reads the CSV file through the Pandas data analysis library in the Python language and groups it by the transaction time field. In each group, the cumulative summary is performed by the product number field to generate the daily sales quantity of each product. The daily sales quantity is divided by the daily sales cycle length (i.e., 24 hours). ) to get the average number of transactions per hour, and then multiply it by 24 to get the average daily sales value of the product. During all processing, records with payment status codes other than success codes are eliminated, and only records with transaction status fields of 1 are retained as valid transactions. The product type information is extracted from the vending machine system configuration table. The configuration table is a JSON structure, and each product number and corresponding name, packaging specifications, and inventory limits are stored in a key-value pair format. This structure is connected with the product number field in the sales log to form a complete product type information set with daily average sales statistics fields. All product types are compared and arranged from large to small according to the daily average sales field. If the daily average sales are equal, they are arranged in ascending order according to the product number. During the sorting process, the daily average sales corresponding to each product are The sales value and the product number are constructed as a two-tuple and stored as a tuple list structure in Python. The sorting function is executed on the list and the sales value is specified as the primary key to be sorted in reverse order. After the sorting is completed, the first 40 product type numbers and their average daily sales values ​​are intercepted in order to construct a new list. This list is the product type sorting data list. Each item in the list contains the product number, corresponding name, specification, unit average daily sales value, and position index in the sorted list. The position index is numbered sequentially from 1 to 40. The list is used as input data for subsequent shelf allocation and priority mapping. By reading the shelf layout structure defined in the physical structure drawing of the vending machine, the two-dimensional matrix mapping relationship of its aisle pattern is obtained. The structure is a matrix with 5 rows and 4 columns, and each shelf is labeled. It is a string format of R row number and C column number. For example, R1C1 represents the first row and first column, and R2C2 represents the second row and second column. The preset priority shelves are all shelves located in the first two rows and within one column to the left and right of the central axis (i.e., the second column). Specifically, they are R1C1, R1C2, R1C3, R2C1, R2C2, R2C3, R1C4, R2C4, R1C5, R2C5, R1C6, and R2C6, a total of 12 shelves. The priority shelf list is loaded into the memory in the form of a string array as a fixed priority allocation position. The position definition is stored in the configuration file of the vending machine main control program. The configuration file is in YAML format. The field "HighPrioritySlots" points to the shelf set.This set is used as the target distribution area for subsequent goods distribution. The cargo grid numbers that do not contain this set are not included in the current distribution operation range. The sorted data list of goods types is traversed from front to back in index order. Each traversal extracts a goods type number and the corresponding average daily sales value. According to the range of the average daily sales value, it is determined whether the goods need to occupy 2 cargo grid positions. Specifically, when the average daily sales of the goods is greater than or equal to the set threshold of 15 pieces, 2 cargo grid positions are allocated. Otherwise, only 1 cargo grid position is allocated. The cargo grid numbers that have not been allocated are extracted in order from the priority cargo grid list. The number is used as the current allocation location for the goods. The goods number and the shelf number are combined into an allocation mapping item and stored in the initial goods allocation table. The table structure is in the form of a dictionary, with each key being the goods number and the corresponding value being a list structure containing one or two shelf numbers. This process is repeated until the list of goods types is traversed or the priority shelf is exhausted. If the shelf quantity is insufficient, the excess will not be allocated. This initial goods allocation table is used to drive the host computer or controller to generate a product shipping route map and a replenishment route planning map. It is also used in subsequent simulations of sales changes and path deduction operations of the goods flow process.

[0048] Preferably, step S2 includes the following steps:

[0049] Step S21: Identify historical sales patterns in the vending machine sales flow; infer the goods sales trend based on the historical sales patterns; perform goods distribution simulation based on the initial goods distribution location, thereby obtaining simulated goods distribution data;

[0050] Step S22: simulating vending machine operations based on the goods sales trend and simulated goods distribution data, and continuously monitoring the real-time goods quantity of the vending machine;

[0051] Step S23: Classify the preset initial quantity of goods and the real-time quantity of goods in the vending machine according to the types of goods, thereby obtaining the initial quantity of each type of goods and the real-time quantity of each type of goods;

[0052] Step S24: Calculate the real-time sales data of each type of goods in each vending machine based on the initial quantity of each type of goods and the real-time quantity of each type of goods.

[0053] In this embodiment, the sales data of the past 60 days stored in the local embedded database is called. The data table contains fields such as transaction timestamp, product number, transaction quantity, transaction amount, and channel number. After grouping by product number using SQL statements, the daily sales series of each product is counted at the daily time granularity to construct a time series sales data table in the form of a two-dimensional matrix. Each column of the table represents a product, and each row is the sales value corresponding to a continuous date. On this basis, the ARIMA model (autoregressive integrated moving average model) in the time series analysis library statsmodels in the Python language is called to fit the model parameters for each product series separately. The initial parameters p=2, d=1, q=2 are set, and AI is used. The C criterion (Akaike Information Criterion) is used to evaluate and adjust the model's goodness. After the model fitting is completed, the sales forecast value vector for the next 7 days is derived. This vector is used as the sales trend of the goods. The trend data is stored in the form of a JSON structure indexed by the product number. Each record contains the product number, the actual sales sequence of the past 7 days, the fitting parameters, the predicted sales vector and the predicted confidence interval. After generating the sales trend of the goods, the initial goods distribution table and the shelf position table are called. The shelf number position of each product number is compared to perform hourly simulation reduction processing on each predicted sales value vector. Combined with the daily business hours of the vending machine (such as 08:00 to 22:00), the goods sales simulation is performed hourly. The shortest path priority distribution strategy is used to simulate the goods outbound action, that is, simulation Every hour, the corresponding shelves of each commodity are shipped in sequence. The inventory value in the shelf is subtracted in turn according to the predicted sales value every hour to generate the simulated remaining inventory matrix every hour, and finally form the complete simulated goods distribution data. The data structure is a three-dimensional tensor with the dimensions of product number, time period, and shelf number. Each value represents the number of remaining commodities in the shelf during the time period. The simulated distribution data generated in the previous step is called and combined with the IoT device communication module running in the embedded control board to connect to the embedded weight sensor group. The sensor group uses 16-channel distributed weighing sensors. A group of weighing sensors is arranged at the bottom of each shelf and the empty weight value and full weight value of the shelf are set. The difference is divided by the weight of the single item to obtain the shelf capacity conversion coefficient. The built-in AD of the STM32 control chip is used. The C module samples the analog signal of each sensor at an interval of 100ms and performs sliding average denoising through a filter group. The threshold deviation is set to be less than 2g as a stable value, thereby obtaining the current quantity of goods in each cargo compartment. The data is uploaded to the cloud data cluster via the MQTT protocol and compared and matched in real time with the local simulation distribution results. If the actual monitoring value of a cargo compartment differs from the simulated distribution value by more than ±2 pieces, it is marked as an abnormality. The abnormal mark will be recorded in the cargo compartment status monitoring table. Marks that last for more than 30 minutes will trigger the generation of remote inspection instructions. The business simulation process is carried out according to the daily business cycle, and the cargo remaining quantity vector is updated every day. The updated remaining quantity vector is used to backfill the simulation results and participate in the dynamic cargo flow prediction of the next cycle.Extract the list of shelf numbers corresponding to each product number in the initial cargo distribution table, read the initial weighing value corresponding to each shelf number from the startup initialization inventory file when the embedded system starts, call the above weighing value and the shelf empty weight value and unit cargo weight for conversion processing, obtain the initial shelf product quantity, perform group aggregation operations on all initial quantity values ​​by shelf number, add the quantities of the same product number in multiple shelves, and obtain the total number of pieces of the product at the time of initial loading, and construct the initial inventory vector. The real-time cargo quantity acquisition process is consistent with the aforementioned real-time weighing module. The current shelf weighing value is converted into quantity and then grouped and aggregated. Similarly, aggregation is performed by product number to form a real-time inventory vector. Both vectors are stored in a dictionary structure, with the key being the product number and the value being the corresponding quantity value. This structure will be used as the later The basic input for real-time sales calculations is also written to the daily operations data log for end-of-day settlement and replenishment strategy calculations. The mapping relationship between the initial inventory vector and the real-time inventory vector is called, and the sales difference is calculated for each product number: the initial inventory quantity minus the real-time inventory quantity. If a product exists in the initial inventory vector but not in the real-time inventory vector, the real-time inventory is recorded as 0. Otherwise, the actual value is used. All differences are output as positive integers, and negative values ​​are automatically corrected to 0. This process is executed by an independent thread in the embedded controller and is scheduled every 5 minutes. After each execution, a product sales record is generated. The record contains the product number, the current timestamp, the sales quantity in the current period, the corresponding shelf number range, and the corresponding business hour identifier. This record is sent to the local cache and uploaded to the remote inventory control platform via the HTTP POST method. It is also written to the local business log file for subsequent data analysis and anomaly detection modules. This ultimately forms a real-time sales data set for each vending machine product type. Each data item can be compared with the predicted sales vector for error and used as an input parameter for the next dynamic distribution adjustment calculation.

[0054] Preferably, in step S3, pairing the types of goods in the vending machines according to the real-time sales data includes:

[0055] According to the real-time sales data, the types of goods in the vending machines are sorted according to the real-time sales to obtain the real-time sales arrangement data of various categories;

[0056] Identify the sales axis types of various types of real-time sales ranking data;

[0057] Determine the extreme point of the goods category axis based on the sales volume category axis;

[0058] According to the extreme points of the central axis of the goods category, the real-time sales arrangement data of various categories are matched to obtain the matching goods categories.

[0059] In this embodiment, all product numbers and corresponding sales values ​​are extracted from the real-time sales data set generated above. The data structure is in the form of key-value pairs, where the key is the product number and the value is the cumulative sales value of the product in the current period. The sorted method in the standard library is called in the Python running environment of the embedded controller and the parameter key is set to the sales value and reverse is set to True, so that the sorting results are arranged from high to low according to the sales value. The generated sorting result is a list structure, in which each element is a tuple containing the product number and the sales value. The position of each tuple represents the relative position of the product in the sales sequence. The execution time of the sorting operation is controlled within 5 milliseconds. By outputting the sorting result to a temporary cache table, the table fields include The sorting index, product number, sales value, and data structure will serve as the input basis for subsequent central axis identification and extreme point pairing. To ensure real-time data updates, the sorting process is automatically executed after each round of real-time sales data calculation is completed to ensure that the pairing operation is performed based on the latest round of sales status. All sorted data in the above cache table are read, and the total number of data items in the statistical table is recorded as N. Then, the division N divided by 2 is performed to obtain the middle index value. The middle index value is rounded down to the central axis index in the sales sorting list. If N is an odd number, the central axis index is the position of N divided by 2 rounded down. If N is an even number, the central axis index is one of the two adjacent indexes corresponding to N divided by 2. According to the set logic, the higher index position is given priority, that is, N divided by 2 plus 1 position, and the central axis index position is located. The corresponding product number and sales value can determine that the product is a sales axis type. In the system, in order to ensure processing consistency, the axis product number is written into the system variable axis identification register. All subsequent pole generation and pairing are based on the axis identification as the reference origin. This operation is completed through standard data structure access method and integer index calculation. The operation tool used is the embedded data access interface module and the integer index pointer logic module. It does not involve external IO communication. The product number in the axis identification register is called, and the real-time sales value of the current product is queried. The value is defined as the axis sales value, recorded as V axis, and then all sorted product items in the cache table are traversed. The difference between the sales value of each product and V axis is calculated. The difference formula is V product minus Remove the V middle axis, and the difference obtained is used as the sales deviation value of the product. Sort the deviation values ​​from small to large according to the absolute value of the deviation value. Set the deviation value to 0 as the extreme middle axis. The two product numbers with the largest and smallest deviation values ​​are recorded as the extreme maximum group and the extreme minimum group respectively. This operation constructs a symmetrical extreme structure with the sales value of the middle axis as the reference benchmark. The extreme structure uses the middle axis value as the zero reference line. The deviation direction reflects the symmetrical relationship of the products in the sales dimension. The specific calculation involves a subtraction operation and an absolute value solution operation for each product. The operation time complexity is O(n). Under the current embedded system, the execution efficiency is maintained within 10 milliseconds. The generated extreme structure is output in the form of a three-column table. The fields include product number, sales deviation value, and extreme position mark.Sort the extreme point group with the smallest extreme point group by sales deviation value from high to low, and mark the positive and negative deviation direction for each extreme point, that is, sales greater than the middle axis are positive extreme points, and sales less than the middle axis are negative extreme points. The matching logic uses a one-to-one correspondence between the two groups of product numbers, that is, starting from the positive extreme point with the largest deviation, one by one with the negative extreme point with the largest deviation. If the number of elements in the two groups is inconsistent, the number of short groups is used as the total number of matches, and the remaining unmatched items are marked as "no corresponding extreme point". Each group of matching result structure includes the positive extreme point product number, the negative extreme point product number, their respective sales deviation values ​​and their absolute difference. The difference is retained in the structure as a symmetry reference indicator. This structure forms the extreme point matching result table, which is subsequently used for channel adjustment and predictive distribution model construction. During the operation, the matching logic is constructed by the internal matching function in a zip structure, and combined with a custom matching strategy function to support fast comparison and residual item marking. The matching results are persisted to the daily matching record table through local database transaction write operations, and the timestamp is used as the version index to record the current matching status for subsequent analysis.

[0060] It is particularly important to perform extreme point matching of the real-time sales data of various categories according to the extreme points of the central axis of the goods category to obtain the matching goods categories including:

[0061] From the real-time sales data of various categories, the categories of goods with sales higher than the central axis point are extracted in descending order to form a high-sales interval sequence;

[0062] Extract the types of goods whose sales volume is lower than the extreme point of the central axis in ascending order to form a low sales volume interval sequence;

[0063] According to the symmetrical relationship between the sales gradients of each type of goods in the high-sales interval series and the low-sales interval series, one-to-one pairing is performed to obtain extreme point control pairing data;

[0064] Determine the paired cargo types based on the polar control paired data.

[0065] In this embodiment, by calling the data capture module embedded in the embedded operating system, the product sales record is read from the product sales cache table of the vending machine control mainboard. The record is a two-dimensional array structure. Each data includes a product identification code, the cumulative sales value in the past 72 hours, the current remaining inventory and the initial entry index. According to the sales axis threshold value V axis previously obtained by the sales axis recognition module, each sales record is traversed, and the internal digital comparison instruction is used to determine whether the sales field is greater than V axis. If the condition is met, the product information is stored in the high sales data storage unit. The storage unit is organized in a FIFO (first in first out) structure, and the storage format is a four-tuple structure, including product code, sales value, original position, sales Volume growth deviation. After all products that meet the conditions are extracted, the underlying sorting function is called to rearrange the data in order of sales value from large to small. The sorting operation is executed in parallel by the dual-clock synchronous processor integrated on the control board. The sorting results are stored in a data structure named high-sales partition list and are ready to be passed to the next processing stage. The execution logic structure is consistent with the high-sales data extraction, except that the judgment logic is adjusted to the sales value being less than the middle axis threshold V middle axis. After completing all the screening of the sales below the threshold, the corresponding product information is written into the low-sales data buffer. The data structure is consistent with the above four-tuple, the difference is that the sales deviation field value is negative and is sorted in ascending order. The system built-in function module is called during sorting, and quick sorting is used. The logic guarantees efficiency and sorting stability through successive index marking. This function does not call external libraries and is entirely implemented by the main control chip firmware instruction set. After the sorting is completed, the low-sales sequence is stored in a data table with a structure called the low-sales partition list. Each item in the data table corresponds to a product category with relatively low sales, which is represented by a negative pole away from the center of the central axis in the sales structure. The data is transmitted to the storage buffer for reading and use by the pole symmetry pairing module. In the system settings, if the sales volume of a certain product category is 0, it still needs to be retained in the low-sales partition table, but its deviation value will be set to the maximum negative value, i.e. -65535, to facilitate subsequent symmetric relationship identification processing. The pole mapping control unit in the main control board is activated to read the high-sales partition list and the low-sales partition list. For two product types at the same index position, their sales values ​​and sales deviation values ​​are obtained respectively, and the symmetry error of the two relative to the central axis sales is calculated. This is specifically completed through the absolute value difference calculation function. The error value is named ΔV error. If the ΔV error is less than the hard-coded symmetry threshold T (T=4) in the system, the pair is considered to be a valid pairing that satisfies the extreme point comparison relationship. The result is written into the pairing output data structure. Each set of pairing data consists of two product codes, sales value pairs, and error values. The system adopts pair-by-pair traversal logic when reading two partition lists. If the list lengths are inconsistent, the empty record identifier NullFlag is filled at the end of the shorter list and recorded in the error log. This pair is a mismatch and does not participate in the subsequent valid result output.The pairing operations in this process are written into a register named as the pairing temporary storage table in sequence according to the pairing group number. The table structure supports parallel reading and is equipped with a read-write mutex to avoid data conflicts. After completing a round of pairing, a signal is automatically sent to trigger the confirmation process. The processor calls all valid data items in the pairing temporary storage table and removes data items whose error value field is greater than the set threshold through filtering logic. At the same time, it checks whether there are duplicate pairing records. If there are duplicates, the unique record is retained according to the earliest timestamp, and the rest are set as invalid pairs and cleared. The final result combines the two product category identifiers into a pairing identifier. The identifier structure contains the positive product code, the negative product code, and the negative product code. The product code, pairing generation timestamp, and pairing number are written into the control system's pairing status table in batches and synchronously sent to the channel configuration module via the data bus. After receiving the pairing status data, the module rearranges the shelves according to the product category within the group. This rearrangement operation does not change the original inventory data, but only updates the configuration mapping table, which is used to control the association between the shipping path and the product in the sales execution system. After confirming that the pairing confirmation step is complete, the system pulls the pairing completion flag level high through the control signal line and holds it for 5 seconds to ensure that the lower modules obtain the status. After completion, it automatically resets to zero and resumes execution, waiting for the next round of instructions to trigger the pairing logic.

[0066] Preferably, in step S3, reversing and reallocating the initial cargo distribution positions by matching cargo types and body contours of the matched cargo types includes:

[0067] Eliminate the same paired goods types from the paired goods types to obtain heterogeneous paired goods types;

[0068] Extracting body contours of heterogeneous paired cargo species;

[0069] Carry out cargo placement simulation based on the body contours of heterogeneous paired cargo types and the preset vending machine shelf layout, and analyze the gap tolerance between the upper and lower shelves after cargo placement;

[0070] Determine the feasibility of swapping goods positions through the gap tolerance between the upper and lower shelves;

[0071] Determine the corresponding initial positions of heterogeneous paired goods based on the initial goods distribution positions, where the initial positions are two-dimensional numbered coordinates of the vending machine shelves with a row number of [1-5] and a layer number of [1-6];

[0072] Based on the feasibility of cargo position swapping, the corresponding initial positions of heterogeneous paired cargo types are swapped to generate reallocated cargo distribution positions. The number of cargo swaps in each swapping process shall not exceed the single swap threshold, that is, N≤10 pieces.

[0073] In this embodiment, a set of all the goods category numbers currently in the candidate reallocation state is extracted from the vending machine goods inventory database, and this set is recorded as M. Then, a pairing candidate table is constructed, and a pairing relationship is formed for any two goods categories in M. The pairing method is to construct a two-dimensional pairing combination matrix P through the Cartesian product method, where P(i, j) represents the combination of goods category i and goods category j. Next, the pairing combination matrix is ​​deduplicated, and all items where i=j in P(i, j) are filtered out, that is, all combinations of goods categories paired with themselves are eliminated. This process is implemented by calling the HashSet fast duplication detection algorithm. All combinations retained in the processed matrix are the heterogeneous paired goods category set, and this set is written to the reallocation candidate pairing cache table for subsequent processing. The entire operation process is based on the local memory mapping table and the high-frequency SKU (Stock Keeping Unit, inventory unit) list construction is completed, each update cycle is 30 seconds and the latest 5 rounds of processing records are retained for debugging and backtracking. For each pair of heterogeneous goods in the above cache table, the 3D model parsing unit in the structure recognition module is called to obtain the standard body data of the corresponding goods type. A standard OBJ model file has been generated for each type of goods in the modeling phase. The model file is imported through the MeshLab server batch processing interface and the bounding box extraction operation is performed. The extraction method is to set the projection section contour under a fixed angle perspective, and obtain the 3D vector parameters consisting of the long side, short side, and height respectively. Each piece of goods uses its largest enclosing cube as its space occupancy unit. The body contour is converted into a vector combination of length, width, and height and stored in the contour mapping table. The default length unit of this process is millimeter (mm). After the contour extraction is completed, all data formats are converted into standard JSON structure for use in goods placement simulation. If there are multiple specification codes in the recognition process, In the case where two models share the same product name, the largest model is prioritized as the representative model to enter the contour mapping table, and the physical layout template corresponding to the shelf specification number used by the vending machine is retrieved. The template records the maximum capacity, maximum length, width and height limits and maximum load threshold corresponding to each column and each layer, and is imported into the simulation module in the form of a standardized table. In the placement simulation, the body contour parameters are used as the geometric occupancy model of the goods, and a two-dimensional spatial grid is constructed with the column as the X-axis and the layer as the Y-axis. In each simulation, two heterogeneous paired goods are inserted into any set of column and layer coordinates in the grid. The physical conflict is determined by the three-dimensional coordinate overlap detection algorithm, and then the vertical space distance from the top to the bottom of the previous layer and the lateral gap between the left and right adjacent units are calculated. The gap tolerance is defined as the difference between the maximum adjacent unoccupied height value between the upper and lower goods and the shelf allowable gap threshold. For each pair of paired goods, a floating matrix will be output and the maximum and minimum tolerance values ​​will be recorded. The matrix is ​​stored in the goods layout tolerance log table for the basis of the swap judgment conditions.All simulation operations are completed based on the OpenCascade geometric operation engine and accelerated by OpenMP parallel threads. The time limit for each simulation round is set to 20 milliseconds. The layout tolerance log table is called. For all simulated heterogeneous paired goods, their upper and lower tolerance floating matrices are extracted, and a fixed threshold of Δh = 15mm is set as the minimum allowable swappable height difference. Then, if the upper and lower layer gap tolerance of each pair of heterogeneous goods is greater than or equal to Δh, it is marked as "swappable". At the same time, the horizontal projection width must be within the width limit of the current column, that is, the remaining available width after deducting the aisle wall thickness from the column width is greater than the horizontal width of the wider of the two goods. This judgment logic is compared with the size parameters of each pair of goods one by one. The cargo pairs that meet the above-mentioned upper and lower tolerances and left and right volume conditions are marked as "confirmed to be swapped", and their initial column-layer coordinates are recorded in the swap candidate position table. The candidate position table is stored in a hash structure. Each entry includes cargo number 1, cargo number 2, column-layer number 1, column-layer number 2, upper and lower gap tolerance values, and left and right width margin values. The system first extracts the cargo factory distribution position log table from the cargo inventory scheduling database. The table provides detailed column-layer numbers for the cargo distribution records in each vending machine. Each cargo entry contains four fields: product number, vending machine number, column number, and layer number. For all heterogeneous paired cargoes, their factory default loading positions are retrieved in the log table according to their numbers and standardized in a two-dimensional coordinate format. The column number range is 1 to 5, the layer number range is 1 to 6, all numbers are positive integers, and the coordinate encoding method is increasing from left to right for columns and from bottom to top for layers. After obtaining all the initial coordinates, the paired goods numbers and their corresponding coordinates are assembled into a standard key-value pair structure and added to the swap operation candidate table. If there are multiple distribution locations for the same type of goods, the coordinates of the top two in sales volume are preferentially selected as the swap candidate location points. For each set of swap candidate locations that meet the upper and lower tolerances and left and right width margins, the initial column and layer number pairs are extracted from the swap operation candidate table, and the actual swap operation is performed under the condition that the swap threshold is not exceeded. The threshold N is set to 10 pieces, that is, the number of swapped pieces of each type of goods in each swap operation shall not exceed 1. 0 pieces. The operation is completed by calling the aisle rewrite module of the vending machine control system. After receiving the swap request, the rewrite module performs the following operations: the first step is to close the current vending operation channel corresponding to the aisle with the column number involved. The second step is to clear the goods identification of the current aisle and lock the shipping control authority. The third step is to transfer the goods from the original column position to the corresponding column position according to the specified number through manual assistance or robotic loading arms. The fourth step is to rewrite the mapping relationship table between the goods number and column number to ensure that the coordinates in the database are consistent with the actual situation. The fifth step is to enable the updated aisle sales channel and restore the shipping authority. This operation must be completed when the vending machine is unloaded. After the task is completed, an operation log entry is generated and uploaded to the remote operation platform for confirmation.

[0074] Preferably, in step S4, calculating the shortest redistribution path according to the preset vending machine shelf layout and the redistribution goods distribution position includes:

[0075] Perform structured mapping on the preset vending machine shelf layout to obtain the shelf structure framework;

[0076] Determine the rack node coordinates based on the rack structure framework;

[0077] Analyze the feasible shelf nodes from the initial goods distribution location to the reallocated goods distribution location through the shelf node coordinates;

[0078] Construct multiple feasible movement paths based on feasible shelf nodes;

[0079] The feasible moving paths are screened to contain the path with the least feasible rack nodes, thereby obtaining the shortest redistribution path.

[0080] In this embodiment, the shelf layout diagram is converted into a digital matrix representation. This matrix is ​​stored in the form of a two-dimensional array, where the rows correspond to the shelf column numbers and the columns correspond to the shelf layer numbers. Matrix elements record whether a shelf unit exists at that location; if it exists, it is assigned a value of 1; if it does not, it is assigned a value of 0. The structured mapping process calls the image recognition module to perform pixel-level analysis on the shelf layout diagram. Edge detection and template matching algorithms are used to identify shelf boundaries and grid lines. The shelf layout is mapped into a two-dimensional coordinate system to form shelf structure framework data. The shelf structure framework data is stored in the form of an adjacency matrix, which describes the adjacency relationship between each shelf unit. The dimension of the adjacency matrix corresponds to the number of shelf columns multiplied by the number of layers. The values ​​of the matrix elements reflect whether adjacent nodes are connected. The adjacency matrix in the shelf structure framework is called to traverse each valid node in the adjacency matrix and calculate the spatial coordinates based on the actual physical dimensions of the shelf. The physical dimensions include the shelf unit width of 0.4 meters and height of 0.3 meters, the node coordinates are expressed in a three-dimensional coordinate system, the X-axis corresponds to the column number multiplied by the unit width, the Y-axis corresponds to the layer number multiplied by the unit height, and the Z-axis is fixed to 0 to represent the shelf plane. The node coordinate storage structure is a two-dimensional array, each element contains the node's column number, layer number and corresponding X, Y, and Z coordinate information. The coordinate calculation is completed by performing floating-point operations through the embedded computing unit, and the calculation results are stored in the node coordinate table in the memory. The node coordinates of the initial cargo position and the reallocated cargo position are read, corresponding to the specific node index of the column and layer in the two-dimensional number, and the initial node coordinates and the target node coordinates are located in the node coordinate table. All paths between two nodes are calculated based on the adjacency matrix of the shelf structure framework. The path search adopts the depth-first search (DFS) and breadth-first search (BFS) in the graph search algorithm. The method combines BFS) and sets the node access mark array to avoid repeated access and dead loops. When screening paths, the movement range is limited to the connection of adjacent shelf unit nodes. The moving distance between nodes is limited to the unit width or height. The search result is a path set containing multiple feasible shelf node sequences. The path sequence is stored in the form of a node coordinate array. Each path records the node access order. The aforementioned path set is sorted and the path construction algorithm is used to connect the path nodes in sequence. During the path construction process, each path starts from the initial node and visits each node coordinate point in the path in turn. The Euclidean distance between adjacent nodes is calculated. The distance calculation formula is that the distance d between node i and node j is equal to the square root of the sum of the squares of the coordinate differences of the two points. It is executed through the floating-point calculation module, and the distances between adjacent nodes are accumulated to obtain the total length of the entire path. At the same time, the total number of path nodes is recorded for screening. All paths are saved in the path list, and each path in the list contains path nodes. The path construction process is executed on an embedded controller, with path information stored in non-volatile memory to ensure data persistence. The path list is traversed, the number of nodes in each path is compared, and the path with the smallest number of nodes is determined using a minimum comparison algorithm. During the screening process, a candidate path queue is established, initially empty. The number of nodes in each path is traversed. If the number of nodes in the current path is less than the number of nodes in the candidate path queue, the candidate path is replaced. If the number of nodes is the same, the total length of the paths is compared, and the path with the shorter length is retained. Ultimately, the path with the fewest nodes and the shortest path length is determined as the shortest path for redistribution. The screening algorithm is executed by an embedded microprocessor, using registers to temporarily store the optimal path parameters. The output path includes the node coordinate sequence, path length, and number of nodes. The result is pushed to the path execution control unit for subsequent cargo movement operation scheduling, ensuring the optimal path from the initial location to the redistribution location.

[0081] Preferably, in step S4, performing cargo redistribution based on the shortest redistribution path and building a cargo redistribution mechanism based on cargo redistribution data includes:

[0082] Projecting the redistributed shortest path onto the preset vending machine shelf layout to obtain a projected moving path;

[0083] The goods are redistributed and moved by projecting the moving path to obtain goods redistribution data;

[0084] Mining reallocation rules from cargo reallocation data;

[0085] The allocation mechanism is archived through the redistribution rules and the cargo redistribution mechanism is constructed.

[0086] In this embodiment, the node coordinate sequence contained in the reallocated shortest path is read, and the two-dimensional number of each node is mapped to the corresponding grid position of the vending machine shelf layout. The vending machine shelf layout stores the shelf column number and layer number information in the form of a two-dimensional array. The projection process adopts a coordinate mapping algorithm to map the column number of the path node to the shelf column index, and the layer number to the shelf layer index. The mapping result is stored in the projected mobile path data structure, which contains the shelf column number and layer number corresponding to the path node for subsequent cargo movement control. The projection process is executed by the coordinate conversion module of the embedded controller, and the conversion accuracy reaches 0.01 meters, ensuring the accurate positioning of the path node in the shelf layout. After the projection is completed, the mobile path sequence generated is arranged in sequence according to the path node order, which is convenient for the controller to drive the cargo handling robot or mobile device to move along the path, call the path node information in the projected mobile path data structure, and combine the current position and target position data of the cargo. The cargo handling robot arm is controlled to move cargo node by node. The robot arm control module reads the two-dimensional coordinates of the path nodes, calculates the spatial distance between adjacent nodes, and generates the corresponding motion trajectory and velocity curve based on the robot arm's kinematic model. The motion trajectory is generated by a trajectory planning algorithm, with a trajectory point spacing of 0.05 meters and a maximum velocity limit of 0.2 meters per second. During the movement, the robot arm's end effector position and posture data are collected in real time. A force feedback sensor detects the cargo gripping status to ensure the cargo is secure. Movement operation data, including node sequence, movement timestamp, and gripping force, is recorded in real time to the cargo redistribution data storage module. This data structure stores all cargo movement trajectories and related parameters. A data mining algorithm is used to perform statistical analysis on the cargo movement trajectory and timestamp data. The frequency statistics module is called to calculate the number of movements and path overlap for each cargo type. An association rule mining algorithm is used to extract high-frequency cargo movement combinations and path patterns from the redistribution data. The algorithm parameters are set to a minimum support threshold of 0.3 and a confidence threshold of 0.7. The rule mining process classifies similar paths and movement behaviors through clustering analysis based on cargo type identification, movement start and end nodes, and time characteristics. The final output is a rule set containing rule conditions and results. The rule content includes the frequency of cargo type swaps, path node preferences, and movement time period distribution. The rule set is saved in the rule base module, and the rule set data is archived and managed according to the cargo type, path node, and movement time dimensions. The archiving process calls the relational database management system (RDMS). The rule data table is structured and stored in a RDBMS (Resource Database Management System). The table fields include rule ID, cargo type combination, route node sequence, movement frequency, and rule generation time. Rule data is version-controlled during archiving to ensure traceability of rule updates. When building a cargo redistribution mechanism, the archived rule library is called upon and an automatic cargo redistribution strategy is set based on the rule trigger conditions. The mechanism module uses a state machine model to describe rule trigger states and redistribution actions. The state transition logic is based on the route preferences and cargo combinations output by the rule library. The mechanism execution engine schedules cargo handling units through an embedded controller to achieve dynamic redistribution control. Mechanism configuration parameters include a redistribution frequency threshold of once a week and a minimum path node count threshold of no more than 15 nodes.

[0087] Preferably, in step S5, evaluating replenishment demand based on real-time sales data and the real-time quantity of goods in the vending machine, and building a replenishment reminder mechanism based on the replenishment demand includes:

[0088] Capture high-frequency sales points in real-time sales data and map high-frequency sales categories based on these points;

[0089] Based on the high-frequency sales categories, query the remaining inventory data of the corresponding categories in the real-time goods quantity of the vending machine;

[0090] Evaluate replenishment needs based on remaining inventory data to obtain inventory replenishment requirements;

[0091] Predict inventory clearance time using real-time sales data and remaining inventory data;

[0092] Infer urgent replenishment needs based on preset replenishment time interval data and inventory clearance time limit data;

[0093] Integrate inventory replenishment needs and emergency replenishment needs, and archive the replenishment mechanism to build a replenishment reminder mechanism.

[0094] In this embodiment, the sales data with timestamps are obtained from the internal sensors and transaction record system of the vending machine. The data includes the product category code, sales time and sales quantity. The sales data is segmented by time using the sliding time window method. The time window length is set to 30 minutes. The total sales of each product category in each time window is calculated. Then, the frequency statistics algorithm is used to sort the segmented sales. The time points corresponding to the top 10% of the product categories in terms of sales volume are extracted as the high-frequency sales points. The high-frequency sales points are stored in the sales analysis module in the form of a timestamp list, ensuring fine time granularity and being able to capture the sales peaks in different time periods within the day. The frequency point extraction process is executed in the embedded processor using the real-time data stream processing framework to ensure that the data update delay does not exceed 5 seconds. The sales frequency point timestamp list in the sales analysis module is called, and the real-time sales database is indexed by the timestamp to filter the goods category codes with the highest sales in the corresponding time window. A high-frequency sales category set is constructed, which contains the goods category ID, sales frequency and average sales value. The elements of the set are sorted in descending order according to the sales frequency. The database query language is used to execute multi-condition filtering queries. The filtering conditions limit the time window range and sales threshold. The filtering process applies index acceleration technology to improve query efficiency. After the query results are returned, they are stored in the database. The cache area for high-frequency goods categories provides input data for subsequent inventory queries. The cache area update frequency is synchronized with the sales data collection to ensure the timeliness of high-frequency goods category data. The real-time inventory data provided by the built-in goods monitoring system of the vending machine is read. The inventory data is indexed by the goods category code and contains inventory quantity, batch information and shelf location information. The goods category set is used as the query condition. The inventory management module is called through the efficient data interface to query the current inventory value for each high-frequency goods category. The inventory data storage structure adopts the key-value pair format, with the key being the goods category ID and the value being the integer inventory quantity. The inventory query response time is controlled within 50 milliseconds, and the query results are accurate. The remaining inventory data is aggregated to form a list. Each record in the list contains the product category ID and its corresponding remaining inventory quantity. The list data is used as the input parameter for replenishment demand evaluation. An inventory threshold comparison model is designed. The model parameters include the minimum inventory threshold and the maximum safety stock threshold for each product. The threshold data comes from historical sales data and the supply chain replenishment cycle. The threshold value is stored in the parameter database in the form of an integer. During the evaluation process, the remaining inventory quantity is compared with the corresponding threshold. If the inventory quantity is lower than the minimum inventory threshold, a replenishment demand signal is generated. The replenishment demand signal includes the product category code and the out-of-stock quantity calculation result. The calculation is based on the formula: out-of-stock quantity = maximum safety stock threshold - current inventory quantity. The out-of-stock quantity is a positive integer. The replenishment demand signal is aggregated to form an inventory replenishment demand list. The list items include the product code and the corresponding replenishment quantity. The replenishment demand evaluation process is executed by the central processing unit. The calculation time does not exceed 100 milliseconds, ensuring real-time response to changes in replenishment demand.A time series forecasting algorithm is used to model the sales speed of goods. The sales speed is calculated by the sliding average method. The sliding window size is set to 7 days. The average daily sales rate of each product category is calculated. The predicted inventory clearance time limit is calculated using the formula: Inventory clearance time limit = current inventory quantity / The average daily sales rate, inventory quantity and sales rate are all real values. The calculation result unit is day. The inventory clearance time limit value is accurate to one decimal place. The prediction process calls the statistical module and the historical sales database, and combines the current inventory data to generate a clearance time limit list for each product category. The list data structure contains the product category code and the corresponding clearance time limit. The prediction result is used for subsequent replenishment urgency judgment. The prediction module is updated regularly with an update interval of 1 hour. The prediction calculation takes less than 200 milliseconds. The replenishment time interval configuration is read. The configuration includes multiple time period divisions, such as 8 am to 6 pm on weekdays and non-working time periods. The time interval data is stored as a timestamp pair for the logic judgment module to call. Combined with the inventory clearance time limit list, it is judged one by one whether the clearance time limit of each product category is less than the remaining time from the current time to the next replenishment time window. If the clearance time limit is shorter than the remaining time, an emergency replenishment demand record is generated. The emergency replenishment demand contains the product code, current time, expected inventory exhaustion time and urgency level. The urgency level is divided into It is a level three system that automatically calculates the difference in clearing time limits and writes emergency replenishment demand data into the replenishment management database to facilitate automatic triggering of replenishment plans. Logical judgment is executed using an embedded rule engine with a response time of less than 50 milliseconds. The replenishment demand management module is called to merge the inventory replenishment demand list and the emergency replenishment demand record. The merge operation ensures data consistency through database transaction processing. The archived data table contains fields: product category code, out-of-stock quantity, urgency level, replenishment generation time, and replenishment status mark. Archived data supports multi-dimensional retrieval and historical data backtracking. The replenishment mechanism archiving operation is executed by the data management service. After archiving is completed, the replenishment reminder mechanism is triggered. The reminder mechanism publishes replenishment notification messages through the message queue. The notification message content includes the product code, replenishment quantity, and replenishment urgency. The message sending interface supports SMS, email, and broadcast on the internal display screen of the vending machine to ensure the accurate allocation of replenishment tasks. The configuration parameters of the replenishment reminder mechanism are stored in the configuration database, and the configuration update frequency is every morning to ensure the timeliness and accuracy of the replenishment reminder information.

[0095] Of particular importance is the inference of urgent replenishment needs based on preset replenishment time interval data and inventory clearance time limit data, including:

[0096] Identify the shortest replenishment window for the preset replenishment time interval data to obtain the minimum replenishment cycle threshold for the corresponding vending machine;

[0097] Combined with the inventory clearance time limit data, the cycle threshold is compared and judged. If the inventory clearance time limit data is less than the minimum replenishment cycle threshold, the current product category is marked as a high-priority replenishment category;

[0098] Aggregate all marked high-priority replenishment categories and generate an urgent replenishment category list;

[0099] Map emergency replenishment demand data according to the emergency replenishment category list.

[0100] In this embodiment, a replenishment time interval data structure is established. The replenishment time interval data is stored in a two-dimensional array structure, where the first dimension represents the device number of each smart vending machine, and the second dimension records the daily fixed executable replenishment time period. Each time period is defined in the form of a start and end timestamp. The timestamp format adopts the UNIX timestamp format and is measured in milliseconds. The preset data comes from the time window field in the daily delivery route planning table of the equipment management system. This field is usually derived from the intersection area of ​​the earliest arrival time and the latest departure time field of the logistics system. Combined with the GPS positioning of each device and the historical replenishment record, the minimum time interval extraction method is used to filter out the shortest executable replenishment window from multiple time periods, and its duration value is recorded. As the minimum replenishment cycle threshold of the device, the minimum replenishment cycle threshold unit is hours, and the minimum accuracy is not less than 1 minute. Finally, the threshold data is stored in the replenishment threshold field under the corresponding device number index, and the inventory clearance time limit data corresponding to the current moment is read. The inventory clearance time limit data comes from the output result of the sales high-frequency point prediction model. The model uses the unit time sales data of the past 72 hours as the input sample, and predicts the remaining saleable time of each type of goods under the current sales growth trend through a linear fitting method based on a sliding window. The unit is hours, and the prediction error does not exceed ±5%. Then the inventory clearance time limit data is compared item by item with the minimum replenishment cycle threshold obtained in the previous step. If the inventory clearance time limit of any category of goods If the value is less than the minimum replenishment cycle threshold of the corresponding vending machine, the number of the product category is recorded in the high-priority replenishment category set, and the priority label of the product category in the set in the subsequent replenishment scheduling system is marked as urgent. The product code mapping rule table is called, which records the mapping relationship between each product number and the product category to which it belongs. For example, numbers C102, C103, and C104 all belong to the beverage category, and numbers F301 and F302 belong to the snack food category. The mapping search operation is performed on each product number in the high-priority replenishment category set in turn, and the HashMap structure is used to construct a key-value pair mapping index to speed up the retrieval process. Then, an urgent replenishment category list is constructed according to the product category, and the list contains Category number, category name, urgent goods count, remaining inventory value of each category, estimated sell-out time, minimum replenishment cycle threshold, all data formats are stored in JSON structure and cached in Redis, and the cache validity period is set to no more than 10 minutes. The replenishment demand mapping algorithm in the intelligent replenishment scheduling module is called. The algorithm reads each record in the urgent replenishment category list, extracts the category number and urgent goods count as core fields item by item, and reads the output data of the distribution capacity evaluation model at the same time. The model generates a dynamic distribution score based on parameters such as the current inventory status, the shortest distance of the replenishment path, and the current task load of the delivery person. The score ranges from 0 to 1, and a weight value is generated for each urgent category based on the score.Finally, a list of urgent replenishment demand data is generated by weight from high to low. Each record in this list includes: vending machine number, category number, recommended replenishment quantity, estimated sell-out time, delivery route score, and urgency weight. Finally, the urgent replenishment demand data is sent to the Kafka input channel of the replenishment scheduling control module for use by the downstream replenishment plan generation algorithm.

[0101] Preferably, the integrated goods reallocation mechanism and replenishment reminder mechanism in step S5 includes:

[0102] Integrate the trigger conditions in the cargo redistribution mechanism and the replenishment reminder mechanism to obtain a coordinated trigger condition;

[0103] Based on the collaborative triggering conditions, the cargo redistribution mechanism and the replenishment reminder mechanism are synchronously scheduled to obtain a collaborative scheduling mechanism;

[0104] By embedding the collaborative scheduling mechanism into the vending machine, the collaborative control of coupled vending machines can be achieved.

[0105] In this embodiment, an independent trigger logic structure of two types of mechanisms is established. The triggering condition of the goods reallocation mechanism is calculated based on the inventory balance difference and sales rate imbalance between adjacent vending machine groups. The inventory balance difference is calculated by reading the real-time inventory data of the vending machine shelves, forming a multidimensional inventory vector with the goods category as the dimension, and then calculating the Euclidean distance of the inventory vectors between adjacent devices, and comparing it with the set reallocation threshold. If the distance is greater than the reallocation threshold, the reallocation logic is triggered. The sales rate imbalance is calculated using the standardized formula of the maximum and minimum sales volume difference. The triggering condition of the replenishment reminder mechanism comes from the logical judgment that the inventory clearance warning time is less than the dynamic delivery arrival time. The dynamic delivery arrival time is predicted by the delivery path prediction model. Generation, the model generates an estimated arrival time based on historical delivery trajectories and current traffic conditions. The trigger logic determines whether there is a time window that cannot be covered by delivery based on the category. The fusion operation constructs a logical intersection rule table to cross-map the two independent trigger conditions in dimensions such as time window, category type, and inventory status, and forms a collaborative trigger condition expression set with the compound expression of "inventory difference exceeds the threshold and clearing warning is effective". The set is stored in the trigger condition storage table of the central control module and refreshed every 15 seconds. The event perception module scans the trigger condition storage table in real time. When an instance that meets the collaborative trigger condition expression is detected, the collaborative scheduling logic is triggered immediately. The scheduling mechanism is implemented through an event-driven architecture, which is based on Kafka. Taking the a event channel as the main line, a parallel consumption model of cargo scheduling request events and prompt signal events is established. The cargo scheduling request event carries the source device number, target device number, category number, and the number of items to be scheduled. The prompt signal event carries the vending machine number, cargo number, clearing warning time, and scheduling response identification field. The event processor submits the two types of events to the scheduling decision unit at the same time. The decision unit performs event competition scheduling based on the priority determination mechanism. The priority calculation model comprehensively considers the three factors of inventory urgency index, sales rate, and redistribution accessibility to construct a priority score value. The scheduling event with the highest score is written into the scheduling execution list first, which then triggers the joint execution interface of the redistribution executor and the replenishment prompt module. The redistribution executor is based on the inventory manager. The data provided is used to update the flow of goods. The replenishment reminder module generates synchronous reminder content through the vending machine screen and the remote management platform. All collaborative scheduling events are transferred to the local cache module for 10 minutes through the topic publishing mechanism. Each vending machine device controller has an independent event subscription thread. It pulls the latest scheduling event record every 5 seconds and performs logical conversion within the device. If the scheduling event is a goods transfer-out type, the aisle temporary storage control instruction is triggered to transfer the designated aisle items to the dedicated shipping cache location, and wait for the target device to complete the execution of the pickup instruction before releasing the inventory. If the scheduling event is a goods transfer-in type, the inventory record is modified after confirming that the goods have been successfully placed by scanning the code. The replenishment reminder synchronization process is completed by the human-computer interaction module.A prompt box containing the product category number, urgency mark, remaining inventory, and estimated clearance time is generated on the screen. The prompt box style is color-coded to match the main visual of the vending machine interface to increase prompt visibility. All replenishment prompt events are also uploaded to the event log module of the remote control platform and stamped with a timestamp and execution status code field for subsequent tracking.

[0106] The present invention also provides an intelligent vending machine control system for executing the intelligent vending machine control method described above, the intelligent vending machine control system comprising:

[0107] The sales ranking module is used to obtain the sales flow of the vending machine and the types of goods in the vending machine; based on the sales flow of the vending machine, the types of goods in the vending machine are sorted by sales volume to obtain the goods type ranking data; based on the goods type ranking data, the initial goods distribution location is designed;

[0108] The shelf monitoring module is used to simulate the shelf loading of goods based on the sales flow of the vending machine and the initial goods distribution location, and continuously monitor the real-time goods quantity of the vending machine; the real-time sales data of each vending machine's goods type is calculated based on the preset initial goods quantity and the real-time goods quantity of the vending machine;

[0109] The heterogeneous matching module is used to match the types of goods in the vending machines according to real-time sales data to obtain paired goods types; the initial goods distribution positions are swapped and reallocated based on the paired goods types and the size contours of the paired goods types to generate reallocated goods distribution positions;

[0110] A path reconstruction module is used to calculate the shortest redistribution path based on the preset vending machine shelf layout and the redistributed goods distribution location; redistribute goods based on the redistribution shortest path, and establish a goods redistribution mechanism based on the goods redistribution data;

[0111] The collaborative replenishment module is used to evaluate replenishment needs based on real-time sales data and the real-time quantity of goods in vending machines, and to build a replenishment reminder mechanism based on replenishment needs; it integrates the goods reallocation mechanism and the replenishment reminder mechanism to achieve collaborative control of coupled vending machines.

[0112] The present invention realizes the rapid acquisition and analysis of the sales flow and product types of vending machines through the implementation of the sales ranking module. The arrangement based on sales data provides a scientific basis for the design of the initial distribution position of goods, ensuring the priority display of high-sales products. The introduction of the shelf monitoring module enables the simulation of goods shelf, continuously monitors the real-time quantity of goods in the vending machine, calculates the real-time sales data of each type of goods, and provides accurate data support for optimization. The heterogeneous matching module pairs the types of goods with each other through the analysis of real-time sales data, optimizes the distribution strategy of goods, and improves the convenience and satisfaction of customers in picking up goods by redistributing the paired types of goods. The path reconstruction module calculates the shortest path according to the preset pattern of the vending machine shelves and the redistributed goods positions, ensuring The high efficiency of the goods redistribution process reduces the redistribution time and cost. The constructed goods redistribution mechanism provides flexibility for the dynamic adjustment of vending machines and can quickly respond to changes in market demand. The collaborative replenishment module evaluates replenishment needs based on real-time sales data and the number of goods in the vending machine, provides an accurate inventory management solution, and ensures the continuous supply of goods. The construction of the replenishment reminder mechanism effectively reduces out-of-stock situations and improves the operational efficiency of the vending machine. The synergy of the integrated goods redistribution mechanism and the replenishment reminder mechanism realizes the intelligent control of the vending machine, improves the overall operational efficiency, and enhances the customer's shopping experience. The realization of the overall system promotes the development of smart retail, meets the market demand for flexible and intelligent vending solutions, and enhances the competitive advantage of vending machines.

[0113] The present invention is therefore intended to be illustrative and non-restrictive in all respects, with the scope of the invention being defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the application documents are intended to be embraced therein.

[0114] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is to be construed in the widest possible manner consistent with the principles and novel features disclosed herein.

Claims

1. A method for controlling an intelligent vending machine, characterized in that: The following steps are involved: Step S1: Obtain the sales flow of the vending machine and the types of goods in the vending machine; Arrange the types of goods in the vending machines by sales volume based on the sales flow of the vending machines to obtain the goods type sorting data; design the initial goods distribution location based on the goods type sorting data; Step S2: Based on the vending machine sales flow and the initial goods distribution location, simulate the goods on the shelves and continuously monitor the real-time goods quantity of the vending machine; calculate the real-time sales data of each vending machine's goods type based on the preset initial goods quantity and the real-time goods quantity of the vending machine; Step S3: Pairing the vending machine's goods types based on the real-time sales data to obtain paired goods types; swapping and reallocating the initial goods distribution locations based on the paired goods types and the size contours of the paired goods types to generate reallocated goods distribution locations; wherein pairing the vending machine's goods types based on the real-time sales data includes: According to the real-time sales data, the types of goods in the vending machines are sorted according to the real-time sales to obtain the real-time sales arrangement data of various categories; Identify the sales axis types of various types of real-time sales ranking data; Determine the extreme point of the goods category axis based on the sales volume category axis; According to the extreme points of the central axis of the goods category, the real-time sales data of various categories are matched to obtain the matching goods category. Step S4: Calculate the shortest redistribution path based on the preset vending machine shelf layout and the redistributed goods distribution location; redistribute goods based on the shortest redistribution path, and establish a goods redistribution mechanism based on the goods redistribution data; Step S5: Evaluate the replenishment demand based on the real-time sales data and the real-time quantity of goods in the vending machine, and build a replenishment reminder mechanism based on the replenishment demand; integrate the goods redistribution mechanism and the replenishment reminder mechanism to achieve collaborative control of coupled vending machines.

2. The intelligent vending machine control method according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: Obtain the sales flow of the vending machine and the types of goods in the vending machine; deconstruct the daily average transaction rate of the vending machine sales flow to obtain the average daily sales volume of the goods, wherein the statistical period is nearly 7 consecutive days; Step S12: linearly sorting the types of goods in the vending machines based on the average daily sales volume of the goods, thereby obtaining sorting data of the goods types, wherein the maximum number of sorted types does not exceed 40; Step S13: extracting the priority positions of goods distribution in the preset vending machine shelf layout, wherein the number of priority shelves is 12, distributed within a distance of one column from the center axis of the first two rows; Step S14: Determine the initial cargo distribution location based on the cargo type sorting data and the cargo distribution priority location, where each type of cargo corresponds to only 1-2 cargo grids.

3. The intelligent vending machine control method according to claim 1, characterized in that: Step S2 includes the following steps: Step S21: Identify historical sales patterns in the vending machine sales flow; infer the goods sales trend based on the historical sales patterns; perform goods distribution simulation based on the initial goods distribution location, thereby obtaining simulated goods distribution data; Step S22: simulating vending machine operations based on the goods sales trend and simulated goods distribution data, and continuously monitoring the real-time goods quantity of the vending machine; Step S23: Classify the preset initial quantity of goods and the real-time quantity of goods in the vending machine according to the types of goods, thereby obtaining the initial quantity of each type of goods and the real-time quantity of each type of goods; Step S24: Calculate the real-time sales data of each type of goods in each vending machine based on the initial quantity of each type of goods and the real-time quantity of each type of goods.

4. The intelligent vending machine control method according to claim 1, characterized in that: In step S3, the initial cargo distribution positions are swapped and reallocated by matching cargo types and body contours of the matched cargo types, including: Eliminate the same paired goods types from the paired goods types to obtain heterogeneous paired goods types; Extracting body contours of heterogeneous paired cargo species; Carry out cargo placement simulation based on the body contours of heterogeneous paired cargo types and the preset vending machine shelf layout, and analyze the gap tolerance between the upper and lower shelves after cargo placement; Determine the feasibility of swapping goods positions through the gap tolerance between the upper and lower shelves; Determine the corresponding initial positions of the heterogeneous paired goods based on the initial goods distribution positions, wherein the initial positions are two-dimensional coordinates of the vending machine shelves with a column number range of 1 to 5 and a layer number range of 1 to 6; Based on the feasibility of cargo position swapping, the corresponding initial positions of heterogeneous paired cargo types are swapped to generate reallocated cargo distribution positions. The number of cargo swaps in each swapping process shall not exceed the single swap threshold, that is, N≤10 pieces.

5. The intelligent vending machine control method according to claim 1, characterized in that: Calculating the shortest redistribution path in step S4 based on the preset vending machine shelf layout and the redistribution of goods distribution locations includes: Perform structured mapping on the preset vending machine shelf layout to obtain the shelf structure framework; Determine the rack node coordinates based on the rack structure framework; Analyze the feasible shelf nodes from the initial goods distribution location to the reallocated goods distribution location through the shelf node coordinates; Construct multiple feasible movement paths based on feasible shelf nodes; The feasible moving paths are screened to contain the path with the least feasible rack nodes, thereby obtaining the shortest redistribution path.

6. The intelligent vending machine control method according to claim 1, characterized in that: In step S4, cargo redistribution is performed based on the shortest redistribution path, and a cargo redistribution mechanism is constructed based on cargo redistribution data, including: Projecting the redistributed shortest path onto the preset vending machine shelf layout to obtain a projected moving path; The goods are redistributed and moved by projecting the moving path to obtain goods redistribution data; Mining reallocation rules from cargo reallocation data; The allocation mechanism is archived through the redistribution rules and the cargo redistribution mechanism is constructed.

7. The intelligent vending machine control method according to claim 1, characterized in that: In step S5, the replenishment demand is evaluated based on the real-time sales data and the real-time quantity of goods in the vending machine, and a replenishment reminder mechanism is established based on the replenishment demand, including: Capture high-frequency sales points in real-time sales data and map high-frequency sales categories based on these points; Based on the high-frequency sales categories, query the remaining inventory data of the corresponding categories in the real-time goods quantity of the vending machine; Evaluate replenishment needs based on remaining inventory data to obtain inventory replenishment requirements; Predict inventory clearance time using real-time sales data and remaining inventory data; Infer urgent replenishment needs based on preset replenishment time interval data and inventory clearance time limit data; Integrate inventory replenishment needs and emergency replenishment needs, and archive the replenishment mechanism to build a replenishment reminder mechanism.

8. The intelligent vending machine control method according to claim 1, characterized in that: The integrated goods redistribution mechanism and replenishment reminder mechanism in step S5 include: Integrate the trigger conditions in the cargo redistribution mechanism and the replenishment reminder mechanism to obtain a coordinated trigger condition; Based on the collaborative triggering conditions, the cargo redistribution mechanism and the replenishment reminder mechanism are synchronously scheduled to obtain a collaborative scheduling mechanism; By embedding the collaborative scheduling mechanism into the vending machine, the collaborative control of coupled vending machines can be achieved.

9. An intelligent vending machine control system, characterized in that: For executing the intelligent vending machine control method according to claim 1, the intelligent vending machine control system comprises: The sales ranking module is used to obtain the sales flow of the vending machine and the types of goods in the vending machine; based on the sales flow of the vending machine, the types of goods in the vending machine are sorted by sales volume to obtain the goods type ranking data; based on the goods type ranking data, the initial goods distribution location is designed; The shelf monitoring module is used to simulate the shelf loading of goods based on the sales flow of the vending machine and the initial goods distribution location, and continuously monitor the real-time goods quantity of the vending machine; the real-time sales data of each vending machine's goods type is calculated based on the preset initial goods quantity and the real-time goods quantity of the vending machine; The heterogeneous matching module is used to perform extreme matching of the vending machine's goods types according to the real-time sales data to obtain the matched goods types; to perform position swapping and reallocation of the initial goods distribution positions according to the matched goods types and the body contours of the matched goods types to generate reallocated goods distribution positions; wherein, performing extreme matching of the vending machine's goods types according to the real-time sales data includes: sorting the vending machine's goods types according to the real-time sales data to obtain real-time sales arrangement data of various categories; identifying the sales median axis types of the real-time sales arrangement data of various categories; determining the median axis extremes of the goods types based on the sales median axis types; and performing extreme comparison and matching of the real-time sales arrangement data of various categories according to the median axis extremes of the goods types to obtain the matched goods types; A path reconstruction module is used to calculate the shortest redistribution path based on the preset vending machine shelf layout and the redistributed goods distribution location; redistribute goods based on the redistribution shortest path, and establish a goods redistribution mechanism based on the goods redistribution data; The collaborative replenishment module is used to evaluate replenishment needs based on real-time sales data and the real-time quantity of goods in vending machines, and to build a replenishment reminder mechanism based on replenishment needs; it integrates the goods reallocation mechanism and the replenishment reminder mechanism to achieve collaborative control of coupled vending machines.

Citation Information

Patent Citations

  • Shelf position adjusting method, device, computer device and storage medium

    CN109086921A

  • Automatic vending machine goods configuration method based on artificial intelligence

    CN115564505A