Vending device replenishment prediction method and system, and storage medium

By building a two-way LSTM model of attention mechanism, we predict the sales volume and replenishment priority of inventory units in vending machines, solving the problem of untimely replenishment in traditional replenishment management methods, and achieving more scientific and efficient replenishment decisions , reduce sales losses due to out of stock.

CN119206940APending Publication Date: 2024-12-27QINGDAO HAIER SPECIAL ICEBOX +1
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202411140855.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The traditional vending machine replenishment management method relies on manual experience and fixed time intervals, and lacks real-time analysis of actual sales data, resulting in untimely replenishment after the product is sold out, affecting sales and user experience.

Method used

Using the replenishment prediction method of vending devices, a two-way LSTM model including attention mechanism is constructed by obtaining historical operation data, and the model is trained to predict the sales volume of inventory units and calculate the replenishment priority, taking into account historical sales data and product importance. and the estimated time of sale, set replenishment priorities.

Benefits of technology

Effectively reduce sales losses caused by out-of-stock, ensure that the goods that need to be replenished the most are given priority, and improve the timeliness and accuracy of replenishment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206940A_ABST
    Figure CN119206940A_ABST
Patent Text Reader

Abstract

The invention provides an automatic vending device replenishment prediction method, which comprises a model training process and a model application process, and is characterized in that the model training process comprises the steps of obtaining historical operation data of different automatic vending devices and establishing a data set, and the historical operation data at least comprises time data, environment data, geographic data and commodity data; constructing a model, processing the historical operation data, and inputting the processed historical operation data into the model for training to obtain a trained model; the model application process comprises the following steps: predicting sales volume of each inventory unit in different automatic vending devices at different time points according to the trained model, and calculating predicted inventory amount of each inventory unit at different time points; and calculating replenishment priorities of different automatic vending devices at least according to the predicted inventory amount of each inventory unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of retail devices, and in particular to a replenishment prediction method, system and storage medium for an automatic vending device. Background Art

[0002] With the popularity of vending machines in various places, they have become a convenient retail model, providing consumers with a shopping experience anytime and anywhere. However, the traditional vending machine replenishment management method has the problem of untimely replenishment. Traditional replenishment methods usually rely on manual experience and fixed time interval replenishment plans, lack of real-time analysis of actual sales data, resulting in the inability to replenish goods in time after they are sold out, affecting sales and user experience. Summary of the invention

[0003] The object of the present invention is to provide a replenishment prediction method, system and storage medium for an automatic vending device to solve the above-mentioned problems.

[0004] The present invention provides a replenishment prediction method for a vending machine, comprising a model training process and a model application process, wherein the model training process comprises:

[0005] Acquire historical operation data of different vending machines and establish a data set, wherein the historical operation data at least includes time data, environmental data, geographic data and commodity data;

[0006] Building a model, processing the historical operation data and inputting it into the model for training to obtain a trained model;

[0007] The model application process includes:

[0008] Predicting the sales volume of each inventory unit in different vending devices at different time points according to the trained model, and calculating the predicted inventory volume of each inventory unit at different time points;

[0009] The replenishment priorities of different vending devices are calculated based on at least the predicted inventory quantity of each of the inventory units.

[0010] As a further improvement of the present invention, the model building includes:

[0011] A bidirectional LSTM model including an attention mechanism is constructed, wherein the bidirectional LSTM model includes an input layer, a bidirectional LSTM layer, an attention layer and an output layer, wherein the input layer receives preprocessed feature data, the bidirectional LSTM layer captures bidirectional context information of the input sequence, and the attention layer highlights important parts of the input sequence by calculating attention weights; and the output layer generates a final prediction result.

[0012] As a further improvement of the present invention, the step of obtaining historical operation data of different vending machines and establishing a data set includes:

[0013] The historical operation data is obtained, and a data set is established with a fixed time period as a dimension. The time data includes date data, sales time period data, and work and holiday data; the environmental data includes ambient temperature data, weather data, and crowd density data; the commodity data includes inventory unit categories, inventory unit sales data, and inventory unit replenishment data.

[0014] As a further improvement of the present invention, predicting the sales volume of each inventory unit in different vending devices at different time points according to the trained model, and calculating the predicted inventory quantity of each inventory unit at different time points specifically include:

[0015] Obtaining inventory units and real-time environmental information on sale at different vending machines, and inputting the trained model into the model;

[0016] The model is used to calculate the predicted sales of different vending devices at multiple time points, each time point being separated by a fixed time period;

[0017] Calculate the forecasted inventory. The forecasted inventory at each time point is the inventory at the previous time point minus the forecasted sales at the previous time point.

[0018] As a further improvement of the present invention, the replenishment priority of different vending devices is calculated at least according to the weight and predicted inventory of each inventory unit, including:

[0019] Calculate the estimated sell-out time based on the predicted inventory quantity;

[0020] Obtaining a weight for each inventory unit, wherein the weight is set based on historical sales data, importance, or sales volume;

[0021] Calculate the urgency score of each inventory unit based on its weight and estimated sell-out time;

[0022] Determine the replenishment priority of different vending devices by combining the urgency scores of each inventory unit;

[0023] A replenishment route and replenishment sequence are developed based on the replenishment priorities.

[0024] As a further improvement of the present invention, the processing of the historical operation data and inputting it into the model for training specifically includes:

[0025] Detect and filter outliers in historical operational data;

[0026] Clean up missing values ​​in historical operational data;

[0027] The historical operation data is standardized and divided into training set, validation set and data set.

[0028] As a further improvement of the present invention, it also includes:

[0029] Regularly retrain and optimize said models using newly collected data;

[0030] Analyze the system's performance metrics, including precision, recall, and false positive rate;

[0031] The model is adjusted according to the performance indicator.

[0032] The present invention also provides a vending machine replenishment prediction system, which comprises:

[0033] A data collection module, used to obtain historical operation data and real-time environmental information, wherein the historical operation data includes at least time data, environmental data, geographic data and commodity data;

[0034] A data processing module, used to process the historical operation data, including outlier detection, missing value cleaning and data standardization;

[0035] A model building module, used to build a model, input the processed historical operation data into the model for training, and obtain a trained model;

[0036] The prediction module is used to predict the sales volume of each inventory unit at different time points based on the trained model and calculate the predicted inventory volume of each inventory unit at different time points;

[0037] The replenishment calculation module is used to calculate the replenishment priority of different vending devices according to the predicted inventory of each inventory unit.

[0038] As a further improvement of the present invention, the model building module is used to construct a bidirectional LSTM model including an attention mechanism, the bidirectional LSTM model includes an input layer, a bidirectional LSTM layer, an attention layer and an output layer, the input layer receives preprocessed feature data, the bidirectional LSTM layer captures the bidirectional context information of the input sequence, the attention layer highlights the important parts of the input sequence by calculating the attention weight; the output layer generates the final prediction result.

[0039] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for predicting replenishment of an automatic vending device are implemented.

[0040] The beneficial effects of the present invention are as follows: the present invention obtains historical operation data of different vending machines, establishes a data set, constructs a bidirectional LSTM model including an attention mechanism, and performs model training and optimization. Through the model, the sales volume of each inventory unit in different vending machines at different time points can be predicted, the predicted inventory volume of each inventory unit at different time points can be calculated, and the replenishment priority of each inventory unit calculated by comprehensively considering factors such as historical sales data, commodity importance, and expected sell-out time can be comprehensively evaluated. Replenishment needs can be comprehensively evaluated, and replenishment priorities can be formulated based on the degree of urgency to ensure that the devices that need replenishment the most are replenished first, thereby effectively reducing sales losses caused by out-of-stock. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a schematic diagram of the model training process steps in one embodiment of the present invention.

[0042] Figure 2 It is a schematic diagram of the steps of preprocessing data in one embodiment of the present invention.

[0043] Figure 3 It is a schematic diagram of the steps of the model application process in one embodiment of the present invention.

[0044] Figure 4 It is a schematic diagram of step S21 in the model application process in one embodiment of the present invention.

[0045] Figure 5 2 is a schematic diagram of step S22 in the model application process in one embodiment of the present invention.

[0046] Figure 6 It is a block diagram of a replenishment prediction system for an automatic vending machine in one embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in combination with the specific implementation methods of the present invention and the corresponding drawings. Obviously, the described implementation methods are only part of the implementation methods of the present invention, not all implementation methods. Based on the implementation methods of the present invention, all other implementation methods obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0048] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0049] This embodiment provides a replenishment prediction method for a vending machine, including a model training process and a model application process.

[0050] like Figure 1 As shown, the model training process includes:

[0051] S11: Acquire historical operation data of different vending machines and establish a data set, wherein the historical operation data at least includes time data, environmental data, geographic data and commodity data.

[0052] S12: Build a model, process the historical operation data and input it into the model for training to obtain a trained model.

[0053] In step S11, it specifically includes:

[0054] The historical operation data is obtained, and a data set is established with a fixed time period as a dimension. The time data includes date data, sales time period data, and work and holiday data; the environmental data includes ambient temperature data, weather data, and crowd density data; the commodity data includes inventory unit categories, inventory unit sales data, and inventory unit replenishment data.

[0055] By segmenting data into fixed time periods (such as every hour, every half hour, etc.), the continuous data stream can be refined into time segments that are easy to manage and analyze, making the data more structured and facilitating subsequent statistical analysis and pattern recognition. Data in fixed time periods can better capture the periodicity and trends in time series. For example, the sales volume of vending machines may vary significantly at different time periods of the day. By refining the time period, these change patterns can be identified more accurately, thereby improving the accuracy of the forecasting model.

[0056] During the model prediction phase, the time dimension of the input data is kept consistent with the time dimension of the training data. This ensures that the time series features learned by the model during training can be correctly applied during prediction.

[0057] The establishment of the data set collects historical operation data from different dimensions, mainly including time data, environmental data and commodity data. By collecting and integrating various types of data, we can fully understand the operation of the vending device, predict future sales and replenishment needs, and provide sufficient information support for model training.

[0058] Time data is a basic dimension in vending machine operation and includes the following specific information:

[0059] Date data: Record the date of each data point, such as "2024-07-29". Date data can help identify long-term trends and cyclical changes, such as the difference in sales between weekends and weekdays.

[0060] Sales time period data: Divide a day into fixed time periods, such as hourly, half-hourly, or minutely time periods. For example: 00:00-00:59, 01:00-01:59, and so on, until 23:00-23:59. The data for each time period helps identify sales peaks and troughs at different times of the day.

[0061] Working and holiday data: Identifies whether the date corresponding to the data point is a working day or a holiday. It can be represented by a binary value, for example: 0 for working days and 1 for holidays. By dividing into holidays and working days, it helps to identify the difference in sales patterns between holidays and working days.

[0062] Environmental data reflects the external factors of the environment in which the vending device is located, mainly including:

[0063] Ambient temperature data: records temperature information for each time period, which can be obtained through the device's built-in sensor or third-party weather services. Temperature data helps analyze the impact of weather on sales, especially the sales of beverages and cold drinks.

[0064] Weather data: records weather conditions for each time period, such as sunny, rainy, cloudy, etc. It can be obtained through the weather API, such as sunny, cloudy, rainy, snowy, etc. Weather data can help identify sales changes under different weather conditions, for example, rainy days may lead to a drop in sales.

[0065] Crowd density data: records the crowd density within 500 meters of the device placement address. It can be obtained through the device's built-in camera or third-party data services. Crowd density data can reflect changes in the flow of people in the surrounding environment and help predict sales.

[0066] Product data includes detailed information about stock keeping units, mainly including:

[0067] Stock keeping unit category: Identifies different types of merchandise in a vending unit and can be represented by a unique product code or SKU, for example: SKU1: soda, SKU2: mineral water, SKU3: chocolate, etc.

[0068] Inventory unit sales data: records the sales quantity of each commodity in each time period. For example: SKU1: 20 bottles, SKU2: 15 bottles, SKU3: 10 pieces, etc. Sales data is the basis for predicting future sales and replenishment needs.

[0069] Stock keeping unit replenishment data: records the replenishment quantity of each commodity in a fixed time period, for example: SKU1: 30 bottles, SKU2: 25 bottles, SKU3: 20 pieces, etc. Replenishment data can help analyze the replenishment frequency and the effectiveness of the replenishment strategy.

[0070] After acquiring the data, the data is preprocessed, which specifically includes:

[0071] S111: Detect and filter outliers on historical operation data.

[0072] S112: Clean missing values ​​in historical operation data.

[0073] S113: Standardize the historical operation data and divide it into training set, validation set and data set.

[0074] In step S111, an outlier refers to a data point that is significantly different from other data points in the data set. Detecting and filtering outliers can improve the accuracy and robustness of the model. Z-Score, box plot, etc. can be used for detection.

[0075] In step S112, when the amount of data is sufficient, data points with missing values ​​are directly deleted, which is suitable for the case where the missing values ​​account for a small proportion. Alternatively, statistical methods (such as mean, median, mode) are used to fill in missing values, and interpolation or regression models are used to predict missing values.

[0076] In step S113, standardization can make the data on the same scale to avoid the unbalanced impact of certain features on the model due to different dimensions. The division of the data set helps the training and verification of the model and prevents overfitting.

[0077] The data is divided into training set, validation set and data set. Random partitioning, time series partitioning and other methods can be used to divide the data. The training set is used to train the model, accounting for 70%-80% of the data set. The validation set is used for parameter adjustment and model selection. During the training process, the validation set helps select the best hyperparameters and model structure, accounting for 10%-15% of the data set. The test set is used to evaluate the performance of the model. After training and validation, the test set is used to measure the performance of the model on unseen data, accounting for 10%-15% of the data set.

[0078] In step S12, constructing the model specifically includes:

[0079] A bidirectional LSTM model including an attention mechanism is constructed, wherein the bidirectional LSTM model includes an input layer, a bidirectional LSTM layer, an attention layer and an output layer, wherein the input layer receives preprocessed feature data, the bidirectional LSTM layer captures bidirectional context information of the input sequence, and the attention layer highlights important parts of the input sequence by calculating attention weights; and the output layer generates a final prediction result.

[0080] The main function of the input layer is to receive preprocessed feature data, which includes time data, environmental data, and product data. The input data is usually a multidimensional array, with each dimension representing a feature. The implementation of the input layer uses a data format suitable for neural network processing, such as TensorFlow's tensor (Tensor) or PyTorch's tensor. The shape of the input tensor is (batch_size, seq_len, input_dim), where batch_size is the batch size, seq_len is the sequence length, and input_dim is the dimension of the input feature.

[0081] The bidirectional LSTM layer processes the input sequence in two directions (forward and backward) to capture the bidirectional contextual information of the sequence. The forward LSTM processes the forward information of the sequence, and the backward LSTM processes the reverse information of the sequence, and then concatenates the outputs of the two. The bidirectional LSTM consists of two independent LSTM layers, one for the forward sequence and one for the reverse sequence. The shape of the output tensor is (batch_size, seq_len, 2*hidden_dim), where hidden_dim is the hidden layer dimension of the LSTM unit.

[0082] The calculation formula of the LSTM layer is as follows:

[0083]

[0084] in, represents the hidden state after forward LSTM processing, represents the hidden state after backward LSTM processing, x t is the input at the current time step t, is the hidden state of the previous time step t-1 of the forward LSTM, is the hidden state of the next time step t+1 of the backward LSTM.

[0085] In the bidirectional LSTM model, the outputs of the forward and backward LSTMs are concatenated together to form a combined output at each time step:

[0086]

[0087] The attention layer highlights the important parts of the input sequence by calculating the attention weights, allowing the model to pay more attention to the information at key moments. The attention mechanism generates a new representation by calculating an attention score for each time step in the input sequence and then weighting the input according to these scores.

[0088] The attention layer usually includes a fully connected layer to calculate the attention scores, which are then converted into weights through a softmax function.

[0089] The representation obtained by weighted summation is used in the subsequent output layer.

[0090] The attention layer highlights the important parts of the input sequence by calculating the attention weights. First, the output of the LSTM is converted into the attention space through a fully connected layer. Then the attention weights are calculated and weighted summed to obtain the new context representation. The calculation process of the attention mechanism is as follows:

[0091] u t =tanh(W att h t )

[0092] Where: u t is the attention score, h t is the output of LSTM at time step t, W att is the weight matrix of the attention mechanism.

[0093] Next, the softmax function is used to normalize the attention score and calculate the attention weight a t , the calculation process is as follows:

[0094]

[0095] Attention weight a t is the exponential sum of the attention scores over all time steps, with the denominator being the normalization. The attention weights represent the importance of each element in the input sequence.

[0096] Finally, the output of LSTM is weighted and summed to obtain the new context representation s, that is, the context vector, with the following formula:

[0097]

[0098] The attention mechanism can dynamically adjust the attention weight according to the specific task and input data, so that the model can focus on the most important part of the information in the sequence instead of processing all the information on average. It can dynamically focus on the important information in the input sequence and improve the accuracy and interpretability of the prediction.

[0099] The Dropout layer is included after the attention layer. The Dropout layer prevents the neural network from overfitting during the training process. It randomly discards a part of neurons in each training iteration so that the network does not rely on certain specific neurons, thereby improving the generalization ability of the model.

[0100] Finally, the output of the attention layer passes through a fully connected layer and is mapped to the final output space. The output dimension is output_dim, which represents the number of categories in the classification task. The output shape of the fully connected layer is (batch_size, output_dim).

[0101] The model introduces a bidirectional processing mechanism that can simultaneously consider the forward and backward information of the input sequence, which enables the model to more comprehensively capture the characteristics of the sequence data and improve prediction accuracy and model performance. The attention mechanism enables the model to dynamically focus on the most important information in the sequence, rather than treating all information equally, effectively improving the model's processing capabilities. The combination of bidirectional LSTM and the attention mechanism enables the model to better capture the characteristics of the sequence data and improve prediction accuracy and model performance.

[0102] The trained model can predict the sales of different inventory units at different vending machines at various time points in the future, thereby predicting when the inventory units will be sold out.

[0103] like Figure 3 As shown, the model application process includes:

[0104] S21: predicting the sales volume of each inventory unit in different vending devices at different time points according to the trained model, and calculating the predicted inventory quantity of each inventory unit at different time points.

[0105] S22: Calculating replenishment priorities of different vending machines based at least on the predicted inventory quantity of each inventory unit.

[0106] like Figure 4 As shown, in step S21, it specifically includes:

[0107] S211: Obtain inventory units and real-time environmental information of different vending devices on sale, and input the information into the trained model.

[0108] S212: The model is used to calculate the predicted sales of different vending machines at multiple time points, each time point being separated by a fixed time period.

[0109] S213: Calculate the forecasted inventory. The forecasted inventory at each time point is the inventory at the previous time point minus the forecasted sales at the previous time point.

[0110] In step S211, obtain the information of the inventory units on sale, including the product name, SKU code, current inventory, replenishment records, including the time and quantity of the most recent replenishment. Obtain real-time environmental information, including the current date and time, weekday / holiday identification, and identification of different time periods (such as morning, noon, and evening). Obtain environmental data: temperature, weather, crowd density, etc.

[0111] In steps S212 and S213, the model is used to predict sales at each time point. The model calculates the predicted sales at each time point and the predicted inventory at each time point based on the input inventory data and environmental information. Starting from the current time point, the predicted inventory is calculated at each time point. The predicted inventory at each time point is equal to the inventory at the previous time point minus the predicted sales at the previous time point.

[0112] like Figure 4 As shown, in step S22, it specifically includes:

[0113] S221: Calculate the estimated sell-out time according to the predicted inventory quantity.

[0114] S222: Obtain a weight of each inventory unit, where the weight is set based on historical sales data, importance, or sales volume.

[0115] S223: Calculate the urgency score of each inventory unit according to the weight of each inventory unit and the estimated sell-out time.

[0116] S224: Determine replenishment priorities of different vending machines by combining the urgency scores of each inventory unit.

[0117] S225: Formulate a replenishment route and replenishment sequence according to the replenishment priority.

[0118] In step S221, starting from the current time point, the predicted inventory quantity at each time point is calculated until the inventory quantity is less than or equal to zero, or until the inventory quantity is less than or equal to a preset threshold, and it is determined as the estimated sell-out time.

[0119] In step S222, the weight of each inventory unit is set according to historical sales data, commodity importance, sales volume and other factors. The historical sales data is the sales record of each inventory unit, including indicators such as average sales volume and peak sales volume. The commodity importance is the importance evaluated based on factors such as the profit margin and customer demand of the commodity. The above indicators are comprehensively considered to set the weight of each inventory unit.

[0120] Combine the weight of the inventory unit and the estimated time to sell out to calculate the urgency score, which reflects the urgency of its replenishment. For example, the urgency can be calculated by the inverse ratio of the weight and the estimated time to sell out. The higher the weight and the shorter the estimated time to sell out, the higher the urgency score, indicating that replenishment needs to be done faster. Then, the urgency scores of all inventory units in each vending device are combined to determine the overall urgency of a single device. According to the comprehensive score, the replenishment priority of different vending devices is sorted.

[0121] By analyzing historical sales data, you can accurately understand the sales trend and popularity of each inventory unit. Setting weights based on the importance of goods helps optimize inventory management and allocate limited inventory resources to more important and higher-demand goods. The setting of weights makes replenishment decisions not only based on inventory volume, but also taking into account the historical sales performance and importance of the goods, which increases the scientificity and rationality of the decision.

[0122] The urgency scores of all SKUs within each vending unit are combined to determine the overall urgency of a single unit, ensuring that replenishment decisions take into account overall demand.

[0123] After obtaining the replenishment priority, the path optimization algorithm is used to determine the optimal route. The path optimization algorithm can adopt existing path optimization algorithms, such as greedy algorithm, ant colony algorithm, etc.

[0124] This embodiment also includes the steps of:

[0125] Regularly retrain and optimize the model using newly collected data; analyze system performance indicators, including accuracy, recall, and false alarm rate; and adjust the model based on the performance indicators.

[0126] Continuously collect operational data of vending machines, including new sales records, inventory change data, environmental data, etc., to ensure the timeliness and accuracy of the data, and regularly extract the latest data from the database. Retrain the model with updated data sets to ensure that the model can learn the latest data features and trends, improve prediction accuracy, and ensure the accuracy and adaptability of the model through continuous updates. As time goes by and the environment changes, the data distribution and characteristics may change. Regularly updating the model can ensure its prediction performance and practicality.

[0127] like Figure 6 As shown, this embodiment also provides a replenishment prediction system for an automatic vending device, which includes:

[0128] Data collection module 1, used to obtain historical operation data and real-time environmental information, wherein the historical operation data at least includes time data, environmental data, geographic data and commodity data;

[0129] Data processing module 2, used for processing the historical operation data, including outlier detection, missing value cleaning and data standardization;

[0130] Model building module 3, used to build a model, input the processed historical operation data into the model for training, and obtain a trained model;

[0131] Prediction module 4, used to predict the sales volume of each inventory unit at different time points according to the trained model, and calculate the predicted inventory volume of each inventory unit at different time points;

[0132] The replenishment calculation module 5 is used to calculate the replenishment priority of different automatic vending devices according to the predicted inventory quantity of each inventory unit.

[0133] This embodiment also provides a replenishment prediction method for a vending machine, wherein the model building module is used to construct a bidirectional LSTM model including an attention mechanism, and the Bi-LSTM model includes an input layer, a bidirectional LSTM layer, an attention layer and an output layer, wherein the input layer receives preprocessed feature data, the bidirectional LSTM layer captures bidirectional context information of the input sequence, and the attention layer highlights important parts of the input sequence by calculating attention weights; and the output layer generates a final prediction result.

[0134] This embodiment further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for predicting replenishment of an automatic vending device are implemented.

[0135] In summary, this embodiment obtains historical operation data of different vending machines, establishes a data set, constructs a bidirectional LSTM model including an attention mechanism, and performs model training and optimization. Through the model, the sales volume of each inventory unit in different vending machines at different time points can be predicted, the predicted inventory volume of each inventory unit at different time points can be calculated, and the replenishment priority of each inventory unit calculated by comprehensively considering factors such as historical sales data, commodity importance, and expected sell-out time can be comprehensively evaluated. Replenishment needs can be comprehensively evaluated, and replenishment priorities can be formulated based on urgency to ensure that the devices that need replenishment the most are replenished first, thereby effectively reducing sales losses caused by out-of-stock.

[0136] It should be understood that although this specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each implementation mode may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

[0137] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. All equivalent implementation methods or changes that do not deviate from the technical spirit of the present invention should be included in the scope of protection of the present invention.

Claims

1. A replenishment prediction method for a vending machine, comprising a model training process and a model application process, characterized in that: The model training process includes: Acquire historical operation data of different vending machines and establish a data set, wherein the historical operation data at least includes time data, environmental data, geographic data and commodity data; Building a model, processing the historical operation data and inputting it into the model for training to obtain a trained model; The model application process includes: Predicting the sales volume of each inventory unit in different vending devices at different time points according to the trained model, and calculating the predicted inventory volume of each inventory unit at different time points; The replenishment priorities of different vending devices are calculated based on at least the predicted inventory quantity of each of the inventory units.

2. The replenishment prediction method for an automatic vending machine according to claim 1, characterized in that: The constructing model comprises: A bidirectional LSTM model including an attention mechanism is constructed, wherein the bidirectional LSTM model includes an input layer, a bidirectional LSTM layer, an attention layer and an output layer, wherein the input layer receives preprocessed feature data, the bidirectional LSTM layer captures bidirectional context information of the input sequence, and the attention layer highlights important parts of the input sequence by calculating attention weights; and the output layer generates a final prediction result.

3. The replenishment prediction method for a vending machine according to claim 1, characterized in that: The step of obtaining historical operation data of different vending machines and establishing a data set includes: The historical operation data is obtained, and a data set is established with a fixed time period as a dimension. The time data includes date data, sales time period data, and work and holiday data; the environmental data includes ambient temperature data, weather data, and crowd density data; the commodity data includes inventory unit categories, inventory unit sales data, and inventory unit replenishment data.

4. The replenishment prediction method for an automatic vending machine according to claim 1, characterized in that: Predicting the sales volume of each inventory unit in different vending devices at different time points according to the trained model, and calculating the predicted inventory volume of each inventory unit at different time points, specifically includes: Obtaining inventory units and real-time environmental information on sale at different vending machines, and inputting the trained model into the model; The model is used to calculate the predicted sales of different vending devices at multiple time points, each time point being separated by a fixed time period; Calculate the forecasted inventory. The forecasted inventory at each time point is the inventory at the previous time point minus the forecasted sales at the previous time point.

5. The replenishment prediction method for an automatic vending machine according to claim 1, characterized in that: The step of calculating replenishment priorities of different vending machines at least according to the weights and predicted inventory quantities of the inventory units comprises: Calculate the estimated sell-out time based on the predicted inventory quantity; Obtaining a weight for each inventory unit, wherein the weight is set based on historical sales data, importance, or sales volume; Calculate the urgency score of each inventory unit based on its weight and estimated sell-out time; Determine the replenishment priority of different vending devices by combining the urgency scores of each inventory unit; A replenishment route and replenishment sequence are developed based on the replenishment priorities.

6. The replenishment prediction method for an automatic vending machine according to claim 1, characterized in that: The processing of the historical operation data and inputting it into the model for training specifically includes: Detect and filter outliers in historical operational data; Clean up missing values ​​in historical operational data; The historical operation data is standardized and divided into training set, validation set and data set.

7. The replenishment prediction method for an automatic vending machine according to claim 1, characterized in that: Also includes: Regularly retrain and optimize said models using newly collected data; Analyze the system's performance metrics, including precision, recall, and false positive rate; The model is adjusted according to the performance indicator.

8. A replenishment prediction system for an automatic vending machine, characterized in that: include: A data collection module, used to obtain historical operation data and real-time environmental information, wherein the historical operation data includes at least time data, environmental data, geographic data and commodity data; A data processing module, used to process the historical operation data, including outlier detection, missing value cleaning and data standardization; A model building module, used to build a model, input the processed historical operation data into the model for training, and obtain a trained model; The prediction module is used to predict the sales volume of each inventory unit at different time points based on the trained model and calculate the predicted inventory volume of each inventory unit at different time points; The replenishment calculation module is used to calculate the replenishment priority of different vending devices according to the predicted inventory of each inventory unit.

9. The replenishment prediction method for an automatic vending machine according to claim 8, characterized in that: The model building module is used to build a bidirectional LSTM model including an attention mechanism, wherein the bidirectional LSTM model includes an input layer, a bidirectional LSTM layer, an attention layer and an output layer, wherein the input layer receives preprocessed feature data, the bidirectional LSTM layer captures bidirectional context information of the input sequence, and the attention layer highlights important parts of the input sequence by calculating attention weights; and the output layer generates a final prediction result.

10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the replenishment prediction method for a vending device according to any one of claims 1 to 7.

Citation Information

Cited By

  • Warehouse distribution and cabinet separation method, system and equipment and storage medium

    CN119850097A

  • A method, system, device and storage medium for warehouse goods allocation and cabinets

    CN119850097B

  • Book commodity resource management method, system, equipment and medium

    CN120297864A

  • Method for predicting replenishment work order based on multi-modal data

    CN120996722A

  • Electric power business hall self-service payment terminal bill missing alarm method and system

    CN121011036A