A Fine-Grained Demand Forecasting Method for Retail Products Based on Hierarchical Learning
Through a hierarchical learning-based approach, the definition of auxiliary variables and consistency constraints are solved, and the problem of inaccurate product demand forecasts in unmanned vending machines is achieved, and more accurate retail product demand forecasts are achieved.
Patent Information
- Application Number
- CN202411148104.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2044-08-21
AI Technical Summary
The prior art is difficult to accurately predict the demand for products in unmanned vending machines, especially because product replacement behavior is not fully observed, resulting in inaccurate prediction results.
Using a hierarchical learning method, auxiliary variables are defined including initial demand, real sales volume and product transfer probability, and the consistency constraints of product dimensions, spatial dimensions and time dimensions are determined through a hierarchical method to conduct fine-grained demand prediction for retail products.
It improves the accuracy of demand forecasting of retail products such as unmanned vending machines or smart shelves, can more accurately reflect changes in customer demand, and enhances prediction accuracy.
Smart Images

Figure CN119250882B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of fine-grained demand forecasting, and particularly to a fine-grained demand forecasting method for retail products based on hierarchical learning. Background Art
[0002] The vending machine operates automatically without a 24-hour guard. Due to the limited types and quantities of products inside and the inability to replenish them in a timely manner, there are many situations where when certain products are sold out, the next customer cannot successfully purchase such products. As a result, the true sales volume of such products does not equal their true demand. In addition, in real-world scenarios, customers' purchasing behaviors are diverse. For example, when a customer's first choice is out of stock, they may choose other products to replace their first choice; or they may directly choose not to purchase, etc. And usually, the demand for products and the substitution between products are not observed, making it difficult to accurately predict the demand for products in the vending machine. Therefore, how to accurately predict the demand for products in the vending machine has become the focus of current research.
[0003] In the prior art, video surveillance data is usually used to estimate the demand for vending machine products. This method improves the demand forecasting model by extracting lost sales information and using the group-lasso method to capture substitution behaviors between different products. However, there are still problems such as the need to use video surveillance data and the relatively rough processing of video surveillance data, resulting in inaccurate prediction results.
[0004] Therefore, in the related art, there is an urgent need for a method that can accurately predict the demand for products in the retail scenario. Summary of the Invention
[0005] Based on this, in view of the above technical problems, it is necessary to provide a fine-grained demand forecasting method for retail products based on hierarchical learning that can accurately predict the demand for products in the retail scenario.
[0006] In a first aspect, this application provides a fine-grained demand forecasting method for retail products based on hierarchical learning. The method includes:
[0007] Defining auxiliary variables, where the auxiliary variables include the initial demand, true sales volume, and product transfer probability of retail products;
[0008] Determining the predicted sales volume of products based on the initial demand, true sales volume, and product transfer probability;
[0009] Determining a demand forecasting objective function based on the predicted sales volume of products;
[0010] Determining consistency constraints based on the product dimension, spatial dimension, and time dimension using a hierarchical method based on the demand forecasting objective function;
[0011] Solve the demand forecasting objective function when one of the auxiliary variables is fixed based on the consistency constraint, and perform fine-grained demand forecasting for retail products.
[0012] Optionally, in an embodiment of the present application, the predicted sales volume of the product is defined as follows:
[0013]
[0014] Where, is the predicted sales volume of product i in retail store s at the t-th time period, d ist is the initial demand of product i in retail store s at the t-th time period, d kst is the initial demand of product k in retail store s at the t-th time period, I kst =1 means that product k has inventory in retail store s at the t-th time period, I kst =0 means that product k is sold out in retail store s at the t-th time period, l ist is the actual sales volume of product i in retail store s at the t-th time period, l kst is the actual sales volume of product k in retail store s at the t-th time period, β ki is the probability that product i transfers to product k, β ik is the probability that product k transfers to product i.
[0015] Optionally, in an embodiment of the present application, the demand forecasting objective function is:
[0016]
[0017] Where, d ist is the initial demand of product i in retail store s at the t-th time period, β ij is the probability that product j transfers to product i, l ist is the actual sales volume of product i in retail store s at the t-th time period, is the predicted sales volume of product i in retail store s at the t-th time period.
[0018] Optionally, in an embodiment of the present application, the method further includes:
[0019] Set the constraint conditions for the initial demand, actual sales volume, and product transfer probability.
[0020] Optionally, in an embodiment of the present application, the consistency constraint based on the product dimension is expressed as:
[0021] ∑ i∈P l ist =∑ i∈P d ist ;
[0022] The consistency constraint based on the spatial dimension is expressed as:
[0023]
[0024] ∑ s∈S l ist =∑ s∈S d ist ;
[0025] The consistency constraint based on the time dimension is expressed as:
[0026]
[0027] Wherein, is the predicted sales volume of product i in retail store s at the t-th time period, d ist is the initial demand of product i in retail store s at the t-th time period, d kst is the initial demand of product k in retail store s at the t-th time period, I ist = 1, I kst = 1 means that product i or k has inventory in retail store s at the t-th time period, I ist = 0, I kst = 0 means that product i or k is sold out in retail store s at the t-th time period, l ist is the actual sales volume of product i in retail store s at the t-th time period, l kst is the actual sales volume of product k in retail store s at the t-th time period, β ki is the probability of product i transferring to product k, β ik is the probability of product k transferring to product i.
[0028] Optionally, in an embodiment of the present application, the solution of the demand prediction objective function when fixing one of the auxiliary variables based on the consistency constraint includes:
[0029] Assume that the product demand is fixed, and minimize the demand prediction objective function under the product transfer probability;
[0030] Assume that the product transfer probability is fixed, and minimize the demand prediction objective function under the product demand.
[0031] In a second aspect, the present application also provides a fine-grained demand prediction device for retail products based on hierarchical learning. The device includes:
[0032] An auxiliary variable definition module for defining auxiliary variables, where the auxiliary variables include the initial demand, actual sales volume, and product transfer probability of retail products;
[0033] A product predicted sales volume determination module, configured to determine the predicted sales volume of a product based on the initial demand, the actual sales volume, and the product transfer probability;
[0034] A demand prediction objective function determination module, configured to determine a demand prediction objective function based on the predicted sales volume of the product;
[0035] A consistency constraint determination module, configured to determine consistency constraints based on the product dimension, the space dimension, and the time dimension by using a hierarchical method based on the demand prediction objective function;
[0036] A retail product fine-grained demand prediction module, configured to perform retail product fine-grained demand prediction by solving the demand prediction objective function when one of the auxiliary variables is fixed based on the consistency constraint.
[0037] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and the processor executes the steps of the methods in the foregoing various embodiments.
[0038] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the methods in the foregoing various embodiments are implemented.
[0039] For the foregoing retail product fine-grained demand prediction method based on hierarchical learning, first, auxiliary variables are defined, and the auxiliary variables include the initial demand, the actual sales volume, and the product transfer probability of a retail product; then, the predicted sales volume of the product is determined based on the initial demand, the actual sales volume, and the product transfer probability; then, a demand prediction objective function is determined based on the predicted sales volume of the product; then, consistency constraints based on the product dimension, the space dimension, and the time dimension are determined by using a hierarchical method based on the demand prediction objective function; finally, retail product fine-grained demand prediction is performed by solving the demand prediction objective function when one of the auxiliary variables is fixed based on the consistency constraint. That is to say, when predicting the demand for products in a retail scenario, it is not necessary to rely on complex video surveillance data. By effectively capturing the substitution relationship between different products and performing demand prediction at multiple levels, it mainly solves the prediction requirements for low-aggregation single products-stores-days (SKU-store-day), decomposes the product demand into finer granularities, improves the accuracy of retail product demand prediction for vending machines or smart shelves, etc., and can more accurately reflect the demand changes of customers, thereby improving the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is an application environment diagram of a retail product fine-grained demand prediction method based on hierarchical learning in an embodiment;
[0041] Figure 2 It is a schematic flow chart of a fine-grained demand forecasting method for retail products based on hierarchical learning in an embodiment;
[0042] Figure 3 It is a structural block diagram of a fine-grained demand forecasting device for retail products based on hierarchical learning in an embodiment;
[0043] Figure 4 It is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0044] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] A fine-grained demand forecasting method for retail products based on hierarchical learning provided by an embodiment of the present application can be applied to, for example Figure 1 the application environment shown. Among them, the terminal 102 communicates with the server 104 through a network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed in the cloud or other network servers. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0046] In one embodiment, as Figure 2 shown, a fine-grained demand forecasting method for retail products based on hierarchical learning is provided. Taking the method applied to Figure 1 the server in as an example, the method includes the following steps:
[0047] S201: Define auxiliary variables, where the auxiliary variables include the initial demand, actual sales volume, and product transfer probability of retail products.
[0048] In the embodiments of the present application, in daily life scenarios, for the replacement phenomenon of retail products, it can generally be divided into three types: a) replacement based on out-of-stock; b) replacement based on classification; and c) replacement of the hybrid type of the first two. Types a) and b) are suitable for the purchase of daily consumer goods, and type c) is suitable for the purchase of durable products. Only the first replacement type is considered in the present application. Assume that the replacement only considers the replacement based on out-of-stock, does not consider the classification replacement, and when a replacement occurs, each customer must replace the original product with any other product, ignoring the situation of choosing not to purchase, and the replacement will only occur once. At the same time, the replacement due to the difference in out-of-stock time of out-of-stock products within a period of time is not considered, that is, within a fixed period of time, out-of-stock products will not transform into each other. First, define auxiliary variables, including the initial demand, actual sales volume, product transfer probability, etc. of retail products, as shown in the following table.
[0049]
[0050] S203: Determine the predicted sales volume of the product based on the initial demand, actual sales volume, and product transfer probability.
[0051] In the embodiments of the present application, after defining the auxiliary variables, the predicted sales volume of the product in the actual situation is represented based on the auxiliary variables. In the actual situation, since some products (such as Product A I ist =0) are sold out within the time period t, that is, the inventory is empty. Then when there are still customers who want to buy Product A but cannot buy it, the customers will choose to buy another product (Product B I ist =1) to replace the original Product A that they wanted to buy. At this time, the actual sales volumes of Products A and B are not equal to their initial demands. Among them, the predicted sales volume of Product A is equal to the initial demand of Product A minus the sales volume transferred to Product B, and the predicted sales volume of Product B is equal to the initial demand of Product B plus the sales volume transferred from Product A to Product B.
[0052] Specifically, in an embodiment of the present application, the predicted sales volume of the product is defined as follows:
[0053]
[0054] Among them, is the predicted sales volume of product i in retail store s at the t-th time period, d ist is the initial demand of product i in retail store s at the t-th time period, d kst is the initial demand of product k in retail store s at the t-th time period, I kst =1 means that product k has inventory in retail store s at the t-th time period, I kst =0 means that product k is sold out in retail store s at the t-th time period, l istis the actual sales volume of product i in retail store s at the t-th time period, l kst is the actual sales volume of product k in retail store s at the t-th time period, β ki is the probability that product i transfers to product k, β ik is the probability that product k transfers to product i.
[0055] In one embodiment of the present application, for products A and B that can transfer to each other, their predicted sales volume can be defined as follows.
[0056]
[0057] Among them, is the predicted sales volume of product i in retail store s at the t-th time period, d ist is the initial demand of product i in retail store s at the t-th time period, d kst is the initial demand of product k in retail store s at the t-th time period, I kst I = 1 indicates that product k has inventory in retail store s at the t-th time period, I kst I = 0 indicates that product k is sold out in retail store s at the t-th time period, l ist is the actual sales volume of product i in retail store s at the t-th time period, l kst is the actual sales volume of product k in retail store s at the t-th time period, β ki is the probability that product i transfers to product k, β ik is the probability that product k transfers to product i.
[0058] S205: Determine the demand prediction objective function based on the predicted sales volume of the product.
[0059] In the embodiment of the present application, during the demand prediction process, the purpose is to minimize the sum of the errors between the predicted sales volume and the actual sales volume. That is, in one embodiment of the present application, the demand prediction objective function can be expressed as:
[0060]
[0061] Among them, s ist is the initial demand of product i in retail store s at the t-th time period, β ij is the probability that product j transfers to product i, l ist is the actual sales volume of product i in retail store s at the t-th time period, is the predicted sales volume of product i in retail store s at the t-th time period.
[0062] At the same time, the demand prediction objective function is further expressed in combination with the predicted sales volume of the product. The demand prediction objective function can be expressed as:
[0063]
[0064] Among them, is the predicted sales volume of product i in retail store s at the t-th time period, d ist is the initial demand of product i in retail store s at the t-th time period, d kst is the initial demand of product k in retail store s at the t-th time period, I ist = 1, I kst = 1 means that product i or k has inventory in retail store s at the t-th time period, I ist = 0, I kst = 0 means that product i or k is sold out in retail store s at the t-th time period, l ist is the actual sales volume of product i in retail store s at the t-th time period, l kst is the actual sales volume of product k in retail store s at the t-th time period, β ki is the probability that product i transfers to product k, β ik is the probability that product k transfers to product i.
[0065] In an embodiment of the present application, the method further includes:
[0066] Setting constraint conditions for the initial demand, actual sales volume, and product transfer probability.
[0067] In an embodiment of the present application, in reality, in order to narrow the search range of the optimization model, improve the solution efficiency, and prevent numerical instability, by combining the correlation between the actual sales volume and the predicted demand, the value range of each product demand is limited by setting constraint conditions for the initial demand, actual sales volume, and product transfer probability. Specifically, when the inventory of a product is non-empty (i.e., I ist = 1), it cannot be replaced by other products, but there may be a situation where other products transfer to this product. Therefore, its demand d ist must be less than or equal to its sales volume l ist , which can be expressed as:
[0068] 0 ≤ d ist ≤ l ist
[0069] When the inventory of a product is empty (i.e., I ist = 0), considering that there may be a product replacement phenomenon, its demand d ist must be greater than its sales volume l ist , but it will not exceed too much. Assuming that mean is the average sales volume of this product in this store during time period T, therefore, the range of its demand can be expressed as:
[0070] l ist ≤ d ist ≤ l ist + mean
[0071] From the definition of β ij , it can be known that it is the probability that a product is transferred to other products after the product is out of stock. Therefore, first of all, its value must be greater than or equal to 0 and less than or equal to 1. And assuming that the transfer will surely occur, for any product j ∈ P, there is:
[0072] And 0 ≤ β ij ≤ 1
[0073] S207: Determine the consistency constraints based on the product dimension, spatial dimension, and time dimension by using a hierarchical method based on the demand forecasting objective function.
[0074] In the embodiment of the present application, the present application mainly solves the demand forecasting with low aggregation degree, that is, the demand forecasting of single product - store - day (SKU - store - day). The consistency constraints based on the product dimension, spatial dimension, and time dimension are determined by using a hierarchical method based on the demand forecasting objective function. Specifically, at the low - aggregation - degree level, that is, in the demand forecasting at the single - product level, the basic condition of the consistency of high - aggregation - degree demand and sales volume is proposed, that is, the total sales volume and total demand of all products in the set P, store S, and time period T by consumers are consistent. This means that even when forecasting the sales volume at the single - product level, it is necessary to ensure that the aggregated sales volume is consistent with the actual overall demand.
[0075] Specifically, in an embodiment of the present application, the consistency constraint based on the product dimension is expressed as:
[0076] ∑ i∈P l ist = ∑ i∈P d ist ;
[0077] The consistency constraint based on the spatial dimension is expressed as:
[0078]
[0079] ∑ s∈S l ist = ∑ s∈S d ist ;
[0080] The consistency constraint based on the time dimension is expressed as:
[0081]
[0082] Among them, is the predicted sales volume of product i in retail store s at the t - th time period, d ist is the initial demand of product i in retail store s at the t - th time period, d kst is the initial demand of product k in retail store s at the t - th time period, I ist= 1, I kst = 1 indicates that product i or k has inventory at retail store s in the t-th time period, I ist = 0, I kst = 0 indicates that product i or k has been sold out at retail store s in the t-th time period, l ist is the actual sales volume of product i at retail store s in the t-th time period, l kst is the actual sales volume of product k at retail store s in the t-th time period, β ki is the probability of product i transferring to product k, β ik is the probability of product k transferring to product i.
[0083] In an embodiment of the present application, the product demand and conversion rate prediction model using data hierarchicalization and consistency constraints based on the product dimension can be expressed as:
[0084]
[0085]
[0086] I ist = 1, 0 ≤ d ist ≤ l ist
[0087] I ist = 0, l ist ≤ d ist ≤ l ist + mean
[0088] Among them, the first condition of the constraint is based on data hierarchicalization and consistency constraints of the product dimension. Relaxing the model to its penalty form, it is expressed as:
[0089]
[0090] I ist = 1, 0 ≤ d ist ≤ l ist
[0091] I ist = 0, l ist ≤ d ist ≤ l ist + mean
[0092] Among them, λ is the Lagrange coefficient of the high aggregation degree demand and sales volume consistency constraint condition.
[0093] S209: Solve the demand prediction objective function when one of the auxiliary variables is fixed based on the consistency constraint, and perform fine-grained demand prediction for retail products.
[0094] In the embodiments of the present application, the product demand and conversion rate prediction model is a quadratic programming model with cross terms β ij and d ist The goal of the model is to find variables γ ij and d ist to minimize the sum of the squared errors between the predicted sales volume and the actual sales volume. Due to the existence of cross terms, both the original model and its penalized form are non-convex. Solve the demand prediction objective function when one of the auxiliary variables is fixed based on the consistency constraint for fine-grained demand prediction of retail products. Specifically, the model is split into two independent quadratic programming (QP) problems, and each programming problem only involves one independent variable, that is, one of the auxiliary variables β ij or d isy is fixed, and then each quadratic programming problem is solved independently and continuously looped until the end condition is met, that is where ε is the algorithm stop condition parameter and is a very small number.
[0095] Specifically, in an embodiment of the present application, the solution of the demand prediction objective function when one of the auxiliary variables is fixed based on the consistency constraint includes:
[0096] S301: Assume that the product demand is fixed and minimize the demand prediction objective function under the product transition probability;
[0097] S303: Assume that the product transition probability is fixed and minimize the demand prediction objective function under the product demand.
[0098] In an embodiment of the present application, the alternating minimization algorithm is used to solve the model, that is, assume that the product demand d ist or the product transition probability β ij is fixed, and correspondingly minimize the demand prediction objective function under the product transition probability β ij or the product demand d ist to solve the optimal product transition probability β ij or the product demand d ist . Specifically, it is divided into two sub-optimization problems. Sub-problem P1: Assume that the main product demand d ist is fixed and minimize the objective function under β ij , that is, set Solve the optimal β ij :
[0099] When
[0100]
[0101] When
[0102]
[0103] Sub - problem P2: Assume the replacement rate β ij is fixed and minimize d ist under the objective function, that is, set Solve for the optimal d ist :
[0104] When
[0105]
[0106] When
[0107] When I ist = 1, 0 ≤ d ist ≤ l ist
[0108] When l ist = 0, l ist ≤ d ist ≤ l ist + mean
[0109] where is the Lagrange coefficient of the constraint condition that the conversion probability belongs to the range between zero and one, μ is a coefficient in the regularization term, used to control the smoothness in the parameter update process, and are penalty terms, used to ensure sufficient reduction of the objective function, thus ensuring the convergence of the objective function.
[0110] It should be noted that in the model, the parameters also need to be initialized. The parameters specifically include the actual sales volume l ist , the inventory situation I ist , the initial demand the initial transition probability λ, μ, φ. Among them, the actual sales volume l ist and the inventory situation I ist both come from the data pre - processed on the real data. For as shown in the following table, the initial demand of products with inventory but zero sales or no sales (no inventory and no sales) on the day is initialized to 0; the demand of products with inventory but non - zero sales is initialized to the product sales volume minus 1; the demand of out - of - stock products is initialized to the product sales volume plus 1.
[0111]
[0112] For Assume that initially the probability of each product transferring to any other product is equal, but the probability of transferring to itself is 0. Therefore, the initial transition probability It can be initialized by 1 / (the number of products - 1). λ, μ, and φ are directly initialized as λ = 1, μ = 0.5, and φ = 1.
[0113] In the above fine-grained demand prediction method for retail products based on hierarchical learning, first, auxiliary variables are defined. The auxiliary variables include the initial demand, actual sales volume, and product transfer probability of retail products. Then, based on the initial demand, actual sales volume, and product transfer probability, the predicted sales volume of the product is determined. Then, based on the predicted sales volume of the product, a demand prediction objective function is determined. Then, based on the demand prediction objective function, a hierarchical method is used to determine the consistency constraints based on the product dimension, spatial dimension, and time dimension. Finally, based on the consistency constraints, the demand prediction objective function when one of the auxiliary variables is fixed is solved to perform fine-grained demand prediction for retail products. That is, when predicting the product demand in the retail scenario, it does not need to rely on complex video surveillance data. By effectively capturing the substitution relationship between different products and performing demand prediction at multiple levels, it mainly solves the prediction demand of low-aggregation single product-store-day (SKU-store-day), decomposes the product demand into finer granularity, improves the accuracy of demand prediction for retail products such as vending machines or smart shelves, and can more accurately reflect the demand changes of customers, thereby improving the prediction accuracy.
[0114] The following uses a specific embodiment to illustrate the specific implementation steps of a fine-grained demand prediction method for retail products based on hierarchical learning in this application. First, in S401, auxiliary variables are defined. The auxiliary variables include the initial demand, actual sales volume, and product transfer probability of retail products. Then, in S403, based on the initial demand, actual sales volume, and product transfer probability, the predicted sales volume of the product is determined. In S405, the predicted sales volume of the product is defined as follows:
[0115]
[0116] Among them, is the predicted sales volume of product i in retail store s at the t-th time period, d ist is the initial demand of product i in retail store s at the t-th time period, d kst is the initial demand of product k in retail store s at the t-th time period, I kst = 1 means that product k has inventory in retail store s at the t-th time period, I kst = 0 means that product k is sold out in retail store s at the t-th time period, l ist is the actual sales volume of product i in retail store s at the t-th time period, l kst is the actual sales volume of product k in retail store s at the t-th time period, β ki is the probability that product i transfers to product k, β ikThe probability of product k transferring to product i.
[0117] After that, in S407, determine the demand forecasting objective function based on the predicted sales volume of the product. S409, the demand forecasting objective function is:
[0118]
[0119] where d ist is the initial demand of product i in retail store s at the t-th time period, β ij is the probability of product j transferring to product i, and l ist is the actual sales volume of product i in retail store s at the t-th time period, is the predicted sales volume of product i in retail store s at the t-th time period.
[0120] After that, in S411, set the constraint conditions for the initial demand, actual sales volume, and product transfer probability.
[0121] After that, in S413, determine the consistency constraints based on the product dimension, spatial dimension, and time dimension using a hierarchical method. S415, the consistency constraint based on the product dimension is expressed as:
[0122] ∑ i∈P l ist = ∑ i∈P d ist ;
[0123] The consistency constraint based on the spatial dimension is expressed as:
[0124]
[0125] ∑ s∈S l ist = ∑ s∈S d ist ;
[0126] The consistency constraint based on the time dimension is expressed as:
[0127]
[0128] where, is the predicted sales volume of product i in retail store s at the t-th time period, d ist is the initial demand of product i in retail store s at the t-th time period, d kst is the initial demand of product k in retail store s at the t-th time period, I ist = 1, I kst = 1 means that product i or k has inventory in retail store s at the t-th time period, I ist = 0, I kst= 0 means that product i or k is sold out at retail store s in the t-th time period, l ist is the actual sales volume of product i at retail store s in the t-th time period, l kst is the actual sales volume of product k at retail store s in the t-th time period, β ki is the probability that product i transfers to product k, β ik is the probability that product k transfers to product i.
[0129] Finally, in S417, solve the demand forecasting objective function when one of the auxiliary variables is fixed based on the consistency constraint, and perform fine-grained demand forecasting for retail products. In S419 - S421, assuming that the product demand is fixed, minimize the demand forecasting objective function under the product transfer probability; assuming that the product transfer probability is fixed, minimize the demand forecasting objective function under the product demand.
[0130] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0131] Based on the same inventive concept, an embodiment of the present application also provides a fine-grained demand forecasting device for retail products based on hierarchical learning for implementing the fine-grained demand forecasting method for retail products based on hierarchical learning described above. The implementation solutions provided by this device to solve problems are similar to the implementation solutions described in the above method. Therefore, the specific limitations in one or more embodiments of the fine-grained demand forecasting device for retail products based on hierarchical learning provided below can refer to the limitations on the fine-grained demand forecasting method for retail products based on hierarchical learning in the above text, and will not be repeated here.
[0132] In one embodiment, as Figure 3 shown, a fine-grained demand forecasting device 300 for retail products based on hierarchical learning is provided, including: an auxiliary variable definition module 301, a product predicted sales volume determination module 303, a demand forecasting objective function determination module 305, a consistency constraint determination module 307, and a fine-grained demand forecasting module 309 for retail products, where:
[0133] The auxiliary variable definition module 301 is used to define auxiliary variables, and the auxiliary variables include the initial demand of retail products, the actual sales volume, and the product transfer probability.
[0134] The product predicted sales volume determination module 303 is used to determine the product predicted sales volume based on the initial demand, the actual sales volume, and the product transfer probability.
[0135] The demand forecasting objective function determination module 305 is used to determine the demand forecasting objective function based on the product predicted sales volume.
[0136] The consistency constraint determination module 307 is used to determine the consistency constraints based on the product dimension, the spatial dimension, and the time dimension by using a hierarchical method based on the demand forecasting objective function.
[0137] The retail product fine-grained demand forecasting module 309 is used to perform retail product fine-grained demand forecasting by solving the demand forecasting objective function when one of the auxiliary variables is fixed based on the consistency constraints.
[0138] In an embodiment of the present application, the product predicted sales volume is defined as follows:
[0139]
[0140]
[0141] Where is the predicted sales volume of product i in retail store s at the t-th time period, d ist is the initial demand of product i in retail store s at the t-th time period, d kst is the initial demand of product k in retail store s at the t-th time period, I kst I = 1 means that product k has inventory in retail store s at the t-th time period, I kst I = 0 means that product k is sold out in retail store s at the t-th time period, l ist is the actual sales volume of product i in retail store s at the t-th time period, l kst is the actual sales volume of product k in retail store s at the t-th time period, β ki is the probability that product i transfers to product k, β ik is the probability that product k transfers to product i.
[0142] In an embodiment of the present application, the demand forecasting objective function is:
[0143]
[0144] Where d ist is the initial demand of product i in retail store s at the t-th time period, β ijThe probability of product j transferring to product i, l ist The actual sales volume of product i in retail store s at the t-th time period The predicted sales volume of product i in retail store s at the t-th time period
[0145] In an embodiment of the present application, the method further includes:
[0146] Setting the constraint conditions for the initial demand, actual sales volume, and product transfer probability
[0147] In an embodiment of the present application, the consistency constraint based on the product dimension is expressed as:
[0148] ∑ i∈P l ist = ∑ i∈P d ist ;
[0149] The consistency constraint based on the spatial dimension is expressed as:
[0150]
[0151] ∑ s∈S l ist = ∑ s∈S d ist ;
[0152] The consistency constraint based on the time dimension is expressed as:
[0153]
[0154] Wherein, is the predicted sales volume of product i in retail store s at the t-th time period, d ist is the initial demand of product i in retail store s at the t-th time period, d kst is the initial demand of product k in retail store s at the t-th time period, I ist = 1, I kst = 1 means that product i or k has inventory in retail store s at the t-th time period, I ist = 0, I kst = 0 means that product i or k is sold out in retail store s at the t-th time period, l ist is the actual sales volume of product i in retail store s at the t-th time period, l kst is the actual sales volume of product k in retail store s at the t-th time period, β ki is the probability of product i transferring to product k, β ik is the probability of product k transferring to product i
[0155] In an embodiment of the present application, the retail product fine-grained demand prediction module is further used for:
[0156] Assume that the product demand is fixed, and minimize the demand forecasting objective function under the product transfer probability;
[0157] Assume that the product transfer probability is fixed, and minimize the demand forecasting objective function under the product demand.
[0158] Each module in the above-mentioned retail product fine-grained demand forecasting device based on hierarchical learning can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0159] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 4 shown. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be achieved through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a retail product fine-grained demand forecasting method based on hierarchical learning. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0160] Those skilled in the art can understand that Figure 4 the structure shown in
[0161] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, it implements the steps in the above-mentioned method embodiments.
[0162] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0163] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0164] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0165] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the method embodiments as described above. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., and are not limited thereto.
[0166] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered that the scope recorded in this specification.
[0167] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A fine-grained demand forecasting method for retail products based on hierarchical learning, characterized in that The method includes: Defining auxiliary variables, where the auxiliary variables include the initial demand of retail products, the actual sales volume, and the product transfer probability; Determining the predicted sales volume of the product based on the initial demand, the actual sales volume, and the product transfer probability; Determining the demand prediction objective function based on the predicted sales volume of the product; Using a hierarchical method to determine the consistency constraints based on the product dimension, the spatial dimension, and the time dimension based on the demand prediction objective function; Solving the demand prediction objective function when one of the auxiliary variables is fixed based on the consistency constraints to perform fine-grained demand prediction of retail products; The predicted sales volume of the product is defined as follows: Among them, is the product at the retail store s the t predicted sales volume in the th time period, is the product at the retail store s the t initial demand in the th time period, is the product retail store s the t initial demand in the th time period, is the product at the retail store s the t inventory in the th time period, is the product at the retail store s the t sold out in the th time period, is the product at the retail store s the t actual sales volume in the th time period, is the product at the retail store s the t actual sales volume in the th time period, is the product the probability of transferring to product is the probability of is the product transferring to product is the probability.
2. The fine-grained demand prediction method for retail products based on hierarchical learning according to claim 1, wherein The demand prediction objective function is: Among them, is the initial demand of product in the t-th time period at retail store s, is the probability that product is transferred to product . is the actual sales volume of product in the t-th time period at retail store s, is the predicted sales volume of product in the t-th time period at retail store s, is the set index of all products, is the set index of all stores, is the set index of all time periods.
3. A fine-grained demand prediction method for retail products based on hierarchical learning according to claim 1, characterized in that The method further includes: Setting the constraint conditions for the initial demand, the actual sales volume, and the product transfer probability.
4. A fine-grained demand prediction method for retail products based on hierarchical learning according to claim 1, characterized in that The consistency constraint based on the product dimension is expressed as: ; The consistency constraint based on the spatial dimension is expressed as: , , ; The consistency constraint based on the time dimension is expressed as: , , Among them, is the predicted sales volume of the product in the retail store s in the t th time period, is the initial demand of the product in the retail store s in the t th time period, is the initial demand of the product retail store s in the t th time period, , is the product or in the retail store s in the t th time period has inventory, , is the product or in the retail store s in the t th time period is sold out, is the actual sales volume of the product in the retail store s in the t th time period, is the actual sales volume of the product in the retail store s in the t th time period, is the probability that the product transfers to the product , is the probability that the product transfers to the product , is the set index of all products, is the set index of all stores, is the set index of all time periods.
5. A fine-grained demand prediction method for retail products based on hierarchical learning according to claim 1, characterized in that Solving the demand prediction objective function when one of the auxiliary variables is fixed based on the consistency constraints: Assuming that the product demand is fixed, minimizing the demand prediction objective function under the product transfer probability; Assuming that the product transfer probability is fixed, minimizing the demand prediction objective function under the product demand.
6. A fine-grained demand prediction device for retail products based on hierarchical learning, characterized in that The device includes: An auxiliary variable definition module for defining auxiliary variables, where the auxiliary variables include the initial demand of retail products, the actual sales volume, and the product transfer probability; A predicted product sales volume determination module for determining the predicted sales volume of the product based on the initial demand, the actual sales volume, and the product transfer probability; A demand prediction objective function determination module for determining the demand prediction objective function based on the predicted sales volume of the product; A consistency constraint determination module for using a hierarchical method to determine the consistency constraints based on the product dimension, the spatial dimension, and the time dimension based on the demand prediction objective function; A fine-grained demand prediction module for retail products for solving the demand prediction objective function when one of the auxiliary variables is fixed based on the consistency constraints to perform fine-grained demand prediction of retail products; The predicted sales volume of the product is defined as follows: Among them, is the product at the retail store s the t predicted sales volume in the th time period, is the product at the retail store s the t initial demand in the th time period, is the product retail store s the t initial demand in the th time period, is the product at the retail store s the t inventory in the th time period, is the product at the retail store s the t sold out in the th time period, is the product at the retail store s the t actual sales volume in the th time period, is the product at the retail store s the t actual sales volume in the th time period, is the product the probability of transferring to product is the probability is the product transferring to product is the probability.
7. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for determining replenishment amount of offline retail store, terminal and medium
CN115689451A
Sales prediction method and device based on commodity attribute characteristics, and storage medium
CN115983895A