Retail product fine-grained demand prediction method based on hierarchical learning
Through a hierarchical learning-based approach, auxiliary variables and consistency constraints are defined, the accuracy of product demand prediction in unmanned vending machines is solved, and higher prediction accuracy and fine-grained demand reflection are achieved.
Patent Information
- Application Number
- CN202411148104.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-08-21
AI Technical Summary
The prior art is difficult to accurately predict product demand in unmanned vending machines, especially because product replacement behavior is not fully observed and processed, resulting in inaccurate prediction results.
Using a hierarchical learning method, auxiliary variables are defined including initial demand, real sales volume and product transfer probability, consistency constraints are determined through a hierarchical method, and the demand prediction objective function is solved to achieve fine-grained demand prediction, avoiding relying on complex video surveillance data.
It improves the accuracy of product demand forecasting of unmanned vending machines or smart shelves, can more accurately reflect changes in customer demand, and enhances prediction accuracy.
Smart Images

Figure CN119250882A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of fine-grained demand forecasting, and in particular to a method for retail product fine-grained demand forecasting based on hierarchical learning. Background Art
[0002] Unmanned vending machines operate automatically 24 hours a day without supervision. Due to the limited variety and quantity of products in them, and the inability to restock in time, there are many cases where when certain products are sold out, the next customer cannot successfully purchase the same product, resulting in the actual sales volume of the product not being equal to its actual demand. In addition, in real scenarios, customers' purchasing behaviors are diverse. For example, when a customer's first choice is sold out, he or she may choose other products to replace his or her first choice; or he or she may directly choose not to buy, etc., and usually the demand for products and the replacement between products are not observed, which makes it difficult to accurately predict the demand for products in vending machines. Therefore, how to accurately predict the demand for products in vending machines 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 the missing sales information and using the group-lasso method to capture the substitution behavior between different products. However, there is still the problem of needing to use video surveillance data and the rough processing of video surveillance data, resulting in inaccurate prediction results.
[0004] Therefore, in the relevant technology, there is an urgent need for a method that can accurately predict product demand in retail scenarios. Summary of the invention
[0005] Based on this, it is necessary to provide a retail product fine-grained demand forecasting method based on hierarchical learning that can accurately predict product demand in retail scenarios in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for retail product fine-grained demand forecasting based on hierarchical learning. The method comprises:
[0007] defining auxiliary variables, wherein the auxiliary variables include initial demand for retail products, actual sales volume, and product transfer probability;
[0008] Determining predicted sales of the product based on the initial demand, actual sales and product transfer probability;
[0009] Determining a demand forecasting objective function based on the predicted sales volume of the product;
[0010] Based on the demand forecasting objective function, a hierarchical method is used to determine consistency constraints based on product dimension, space dimension and time dimension;
[0011] Based on the consistency constraint, a demand forecasting objective function is solved when one of the auxiliary variables is fixed to perform fine-grained demand forecasting for retail products.
[0012] Optionally, in one embodiment of the present application, the product forecast sales volume is defined as follows:
[0013]
[0014] in, is the predicted sales volume of product i in retail store s in time period t, d ist is the initial demand for product i in retail store s in time period t, d kst is the initial demand of product k at retail store s in the tth period, I kst =1 means product k is in stock in retail store s in the tth time period, I kst = 0 means product k is sold out in retail store s in the tth time period, l ist is the actual sales volume of product i in retail store s in the tth time period, l kst is the actual sales volume of product k in retail store s in the tth time period, β ki is the probability of transferring from product i to product k, β ik is the probability of transferring from product k to product i.
[0015] Optionally, in one embodiment of the present application, the demand forecasting objective function is:
[0016]
[0017] Among them, d ist is the initial demand for product i in retail store s in the tth period, β ij is the probability of transferring from product j to product i, l ist is the actual sales volume of product i in retail store s in the tth time period, is the predicted sales volume of product i in retail store s in time period t.
[0018] Optionally, in one embodiment of the present application, the method further includes:
[0019] Set the constraints of the initial demand, actual sales volume, and product transfer probability.
[0020] Optionally, in one 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 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] in, is the predicted sales volume of product i in retail store s in time period t, d ist is the initial demand for product i in retail store s in time period t, d kst is the initial demand of product k at retail store s in the tth period, I ist =1,I kst =1 means product i or k is in stock in retail store s in the tth time period, I ist =0,I kst = 0 means product i or k is sold out in retail store s in the tth time period, l ist is the actual sales volume of product i in retail store s in the tth time period, l kst is the actual sales volume of product k in retail store s in the tth time period, β ki is the probability of transferring from product i to product k, β ik is the probability of transferring from product k to product i.
[0028] Optionally, in one embodiment of the present application, solving the demand forecast objective function when one of the auxiliary variables is fixed based on the consistency constraint includes:
[0029] Assuming that the product demand is fixed, minimize the demand forecast objective function under the product transfer probability;
[0030] Assuming that the product transfer probability is fixed, minimize the demand forecast objective function under the product demand.
[0031] In a second aspect, the present application also provides a retail product fine-grained demand forecasting device based on hierarchical learning. The device comprises:
[0032] An auxiliary variable definition module, used to define auxiliary variables, wherein the auxiliary variables include initial demand for retail products, actual sales volume, and product transfer probability;
[0033] A product forecast sales volume determination module, used to determine the product forecast sales volume based on the initial demand, actual sales volume and product transfer probability;
[0034] A demand forecasting objective function determination module, used to determine a demand forecasting objective function based on the predicted sales volume of the product;
[0035] A consistency constraint determination module, used to determine consistency constraints based on product dimension, space dimension and time dimension by adopting a hierarchical method based on the demand forecast objective function;
[0036] The retail product fine-grained demand forecasting module is used to solve the demand forecasting objective function when one of the auxiliary variables is fixed based on the consistency constraint, and perform retail product fine-grained demand forecasting.
[0037] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the methods described in the above embodiments.
[0038] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in each of the above embodiments are implemented.
[0039] The above-mentioned retail product fine-grained demand forecasting method based on hierarchical learning, first, defines auxiliary variables, the auxiliary variables include the initial demand of retail products, real sales, and product transfer probability; then, determines the product predicted sales based on the initial demand, real sales and product transfer probability; then, determines the demand forecasting objective function based on the product predicted sales; then, based on the demand forecasting objective function, a hierarchical method is used to determine the consistency constraints based on product dimension, space dimension and time dimension; finally, based on the consistency constraint, the demand forecasting objective function is solved when one of the auxiliary variables is fixed, and the retail product fine-grained demand forecasting is performed. That is to say, when predicting the demand of retail scene products, there is no need to rely on complex video surveillance data. By effectively capturing the substitution relationship between different products and predicting demand at multiple levels, it mainly solves the low-aggregation single product-store-day (SKU-store-day) forecasting demand, decomposes the product demand into finer granularity, improves the accuracy of retail product demand forecasting of unmanned vending machines or smart shelves, etc., can more accurately reflect the changes in customer demand, thereby improving the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 An application environment diagram of a retail product fine-grained demand forecasting method based on hierarchical learning in one embodiment;
[0041] Figure 2 A schematic diagram of a process of a retail product fine-grained demand forecasting method based on hierarchical learning in one embodiment;
[0042] Figure 3 It is a structural block diagram of a retail product fine-grained demand forecasting device based on hierarchical learning in one embodiment;
[0043] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with 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] The present application provides a method for predicting retail product demand based on hierarchical learning, which can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the 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 it can be placed on the cloud or other network servers. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0046] In one embodiment, Figure 2 As shown in the figure, a fine-grained demand forecasting method for retail products based on hierarchical learning is provided. Figure 1 The server in the example is used to illustrate the following steps:
[0047] S201: Define auxiliary variables, where the auxiliary variables include initial demand for retail products, actual sales volume, and product transfer probability.
[0048] In the embodiments of the present application, in daily life scenarios, the replacement phenomenon of retail products can generally be divided into three types: a) replacement based on out-of-stock; b) replacement based on classification; and c) replacement of the first two mixed types. a and b are suitable for the purchase of daily consumer goods, c is suitable for the purchase of durable products, and only the first type of replacement is considered in this application. Assume that the replacement only considers replacement based on out-of-stock, and does not consider classification replacement. When replacement occurs, each customer must replace the original product with any other product, ignoring the situation of choosing not to buy, and the replacement will only occur once. At the same time, the replacement of out-of-stock products due to differences in out-of-stock time within a time period is not considered, that is, within a fixed time period, out-of-stock products will not be converted into each other. First, define auxiliary variables, including the initial demand for retail products, real sales, product transfer probability, etc., as shown in the following table.
[0049]
[0050] S203: Determine the predicted sales volume of the product based on the initial demand, the actual sales volume and the product transfer probability.
[0051] In the embodiment of the present application, after the auxiliary variables are defined, the predicted sales volume of the product in the actual situation is expressed based on the auxiliary variables. ist =0) is sold out in time period t, that is, the inventory is empty. Then when there are 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. At this time, the actual sales of products A and B are no longer equal to their initial demand. The predicted sales of product A is equal to the initial demand of product A minus the sales transferred to product B, and the predicted sales of product B is equal to the initial demand of product B plus the sales transferred from product A to product B.
[0052] Specifically, in one embodiment of the present application, the product forecast sales volume is defined as follows:
[0053]
[0054] in, is the predicted sales volume of product i in retail store s in time period t, d ist is the initial demand for product i in retail store s in time period t, d kst is the initial demand of product k at retail store s in the tth period, I kst =1 means product k is in stock in retail store s in the tth time period, I kst = 0 means product k is sold out in retail store s in the tth time period, l istis the actual sales volume of product i in retail store s in the tth time period, l kst is the actual sales volume of product k in retail store s in the tth time period, β ki is the probability of transferring from product i to product k, β ik is the probability of transferring from product k to product i.
[0055] In one embodiment of the present application, for products A and B that can be transferred to each other, their predicted sales can be defined as follows.
[0056]
[0057] in, is the predicted sales volume of product i in retail store s in time period t, d ist is the initial demand for product i in retail store s in time period t, d kst is the initial demand of product k at retail store s in the tth period, I kst =1 means product k is in stock in retail store s in the tth time period, I kst = 0 means product k is sold out in retail store s in the tth time period, l ist is the actual sales volume of product i in retail store s in the tth time period, l kst is the actual sales volume of product k in retail store s in the tth time period, β ki is the probability of transferring from product i to product k, β ik is the probability of transferring from product k to product i.
[0058] S205: Determine a demand forecasting objective function based on the predicted sales volume of the product.
[0059] In the embodiment of the present application, in the process of demand forecasting, the goal 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 forecasting objective function can be expressed as:
[0060]
[0061] Among them, s ist is the initial demand for product i in retail store s in the tth period, β ij is the probability of transferring from product j to product i, l ist is the actual sales volume of product i in retail store s in the tth time period, is the predicted sales volume of product i in retail store s in time period t.
[0062] At the same time, combined with the product forecast sales volume, the demand forecast objective function is further expressed. The demand forecast objective function can be expressed as:
[0063]
[0064] in, is the predicted sales volume of product i in retail store s in time period t, d ist is the initial demand for product i in retail store s in time period t, d kst is the initial demand of product k at retail store s in the tth period, I ist =1,I kst =1 means product i or k is in stock in retail store s in the tth time period, I ist =0,I kst = 0 means product i or k is sold out in retail store s in the tth time period, l ist is the actual sales volume of product i in retail store s in the tth time period, l kst is the actual sales volume of product k in retail store s in the tth time period, β ki is the probability of transferring from product i to product k, β ik is the probability of transferring from product k to product i.
[0065] In one embodiment of the present application, the method further includes:
[0066] Set the constraints of the initial demand, actual sales volume, and product transfer probability.
[0067] In one embodiment of the present application, in order to narrow the search scope of the optimization model, improve the solution efficiency and prevent numerical instability in real situations, the correlation between real sales and predicted demand is combined, and the constraints of initial demand, real sales and product transfer probability are set to limit the value range of each product demand. Specifically, when the inventory of a product is not empty (i.e., I ist =1), it is impossible to replace it with other products, but there may be other products transferred to this product, so 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 a product's inventory is empty (i.e. ist =0), considering that product replacement may have occurred, so its demand d ist Must be greater than its sales volume ist , but it will not exceed too much. Assuming mean is the average sales volume of the product in the store during time period T, the range of its demand can be expressed as:
[0070] l ist ≤d ist ≤l ist +mean
[0071] By β ij From the definition of , we know that it is the probability that a product is transferred to other products after it 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 definitely occur, then for any product j∈P:
[0072] And 0≤β ij ≤1
[0073] S207: Based on the demand forecasting objective function, a hierarchical method is used to determine consistency constraints based on product dimension, space dimension and time dimension.
[0074] In the embodiments of the present application, the present application mainly solves the demand forecasting of low degree of aggregation, that is, single product-store-day (SKU-store-day). A hierarchical method is used based on the demand forecasting objective function to determine the consistency constraints based on product dimension, space dimension and time dimension. Specifically, at the low degree of aggregation level, that is, in the demand forecasting at the single product level, the basic condition of consistency between high degree of aggregation demand and sales volume is proposed, that is, the total sales volume and total demand of consumers for all commodities in the set P, store S and time period T are consistent, which means that even when predicting 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 one 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 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] in, is the predicted sales volume of product i in retail store s in time period t, d ist is the initial demand for product i in retail store s in time period t, d kst is the initial demand of product k at retail store s in the tth period, I ist=1,I kst =1 means product i or k is in stock in retail store s in the tth time period, I ist =0,I kst = 0 means product i or k is sold out in retail store s in the tth time period, l ist is the actual sales volume of product i in retail store s in the tth time period, l kst is the actual sales volume of product k in retail store s in the tth time period, β ki is the probability of transferring from product i to product k, β ik is the probability of transferring from product k to product i.
[0083] In one embodiment of the present application, a product demand and conversion rate prediction model using data hierarchy and consistency constraints based on product dimensions 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] The first constraint is the data hierarchy and consistency constraint based on the product dimension. If the model is relaxed to its penalty form, it can be 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 Lagrangian coefficient of high aggregation demand and sales consistency constraint.
[0093] S209: Solving the demand forecasting objective function when one of the auxiliary variables is fixed based on the consistency constraint to perform fine-grained demand forecasting for retail products.
[0094] In the embodiment of the present application, the product demand and conversion rate prediction model is a cross term β ij and d ist The quadratic programming model aims to find the variable γ ij and d ist To minimize the sum of squared errors between predicted sales and actual sales. Due to the existence of cross terms, the original model and its penalty form are non-convex. Based on the consistency constraint, the demand forecasting objective function is solved when one of the auxiliary variables is fixed, and fine-grained demand forecasting of retail products is performed. Specifically, the model is divided into two independent quadratic programming (QP) problems, each of which involves only one independent variable, namely the auxiliary variable β ij or isy One of them is fixed, and then each quadratic programming problem is solved independently, and the cycle continues until the end condition is met, that is, Among them, ε is the algorithm stopping condition parameter, which is a very small number.
[0095] Specifically, in one embodiment of the present application, solving the demand forecast objective function when one of the auxiliary variables is fixed based on the consistency constraint includes:
[0096] S301: Assuming that the product demand is fixed, minimize the demand forecast objective function under the product transfer probability;
[0097] S303: Assuming that the product transfer probability is fixed, minimize the demand forecasting objective function under the product demand.
[0098] In one embodiment of the present application, the model is solved by using an alternating minimization algorithm, that is, assuming that the product demand d ist Or product transition probability β ij Fixed, corresponding to minimizing the product transfer probability β ij or product demand ist Under the demand forecast objective function, solve the optimal product transfer probability β ij or product demand ist Specifically, it is divided into two sub-optimization problems. Sub-problem P1: Assuming that the main product demand d ist is fixed and minimizes β ij The objective function under Solving for the optimal β ij :
[0099] when
[0100]
[0101] when
[0102]
[0103] Subproblem P2: Assume the replacement rate β ij is fixed and minimizes d ist The objective function under Find 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] in, is the Lagrange coefficient of the constraint condition that the conversion probability belongs to between zero and one, μ is a coefficient in the regularization term, which is used to control the smoothness of the parameter update process. and is a penalty term used to ensure that the objective function is sufficiently reduced, thereby ensuring the convergence of the objective function.
[0110] It should be noted that in the model, parameters need to be initialized. The parameters include the actual sales volume l ist , Inventory Status I ist , initial demand Initial transition probability λ, μ, φ. Among them, the real sales volume l ist and inventory status I ist All of them are derived from preprocessed data on real data. As shown in the following table, the demand for products that are in stock but have a sales volume of 0 or are not sold (no stock and no sales) on that day is initialized to 0; the demand for products that are in stock but have a sales volume that is not 0 is initialized to the product sales volume minus 1; the demand for out-of-stock products is initialized to the product sales volume plus 1.
[0111]
[0112] for Assume that at the beginning, the probability of each product transferring to any other product is equal, but the probability of transferring to itself is 0, so the initial transfer probability is It can be initialized by 1 / (number of products - 1). λ, μ, φ are directly initialized to λ=1, μ=0.5, φ=1.
[0113] In the above-mentioned retail product fine-grained demand forecasting method based on hierarchical learning, first, auxiliary variables are defined, and the auxiliary variables include the initial demand, real sales volume, and product transfer probability of the retail product; then, the product predicted sales volume is determined based on the initial demand, real sales volume, and product transfer probability; then, the demand forecasting objective function is determined based on the product predicted sales volume; then, a hierarchical method is used to determine the consistency constraints based on the product dimension, space dimension, and time dimension based on the demand forecasting objective function; finally, the demand forecasting objective function is solved when one of the auxiliary variables is fixed based on the consistency constraint, and the retail product fine-grained demand forecasting is performed. That is to say, when predicting the demand of retail scene products, there is no need to rely on complex video surveillance data. By effectively capturing the substitution relationship between different products and predicting demand at multiple levels, the forecasting demand of low-aggregation single product-store-day (SKU-store-day) is mainly solved, and the product demand is decomposed into finer granularity, which improves the accuracy of retail product demand forecasting of unmanned vending machines or smart shelves, etc., and can more accurately reflect the changes in customer demand, thereby improving the prediction accuracy.
[0114] The following is a specific implementation example to illustrate the specific implementation steps of a retail product fine-grained demand forecasting method based on hierarchical learning in this application. First, S401, define auxiliary variables, which include the initial demand, actual sales volume, and product transfer probability of the retail product. Then, S403, determine the product forecast sales volume based on the initial demand, actual sales volume, and product transfer probability. S405, the product forecast sales volume is defined as follows:
[0115]
[0116] in, is the predicted sales volume of product i in retail store s in time period t, d ist is the initial demand for product i in retail store s in time period t, d kst is the initial demand of product k at retail store s in the tth period, I kst =1 means product k is in stock in retail store s in the tth time period, I kst = 0 means product k is sold out in retail store s in the tth time period, l ist is the actual sales volume of product i in retail store s in the tth time period, l kst is the actual sales volume of product k in retail store s in the tth time period, β ki is the probability of transferring from product i to product k, β ikis the probability of transferring from product k to product i.
[0117] Then, S407, a demand forecasting objective function is determined based on the predicted sales volume of the product. S409, the demand forecasting objective function is:
[0118]
[0119] Among them, d ist is the initial demand for product i in retail store s in the tth period, β ij is the probability of transferring from product j to product i, l ist is the actual sales volume of product i in retail store s in the tth time period, is the predicted sales volume of product i in retail store s in time period t.
[0120] Afterwards, S411, the constraints of the initial demand, actual sales volume, and product transfer probability are set.
[0121] Then, S413, based on the demand forecasting objective function, a hierarchical method is used to determine consistency constraints based on product dimension, space dimension and time dimension. S415, the consistency constraint based on product dimension is expressed as:
[0122] ∑ i∈P l ist =∑ i∈P d ist ;
[0123] The consistency constraint based on 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] in, is the predicted sales volume of product i in retail store s in time period t, d ist is the initial demand for product i in retail store s in time period t, d kst is the initial demand of product k at retail store s in the tth period, I ist =1,I kst =1 means product i or k is in stock in retail store s in the tth time period, I ist =0,I kst= 0 means product i or k is sold out in retail store s in the tth time period, l ist is the actual sales volume of product i in retail store s in the tth time period, l kst is the actual sales volume of product k in retail store s in the tth time period, β ki is the probability of transferring from product i to product k, β ik is the probability of transferring from product k to product i.
[0129] Finally, S417, based on the consistency constraint, the demand forecast objective function when one of the auxiliary variables is fixed is solved to perform fine-grained demand forecasting for retail products. S419-S421, assuming that the product demand is fixed, the demand forecast objective function under the product transfer probability is minimized; assuming that the product transfer probability is fixed, the demand forecast objective function under the product demand is minimized.
[0130] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation 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-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0131] Based on the same inventive concept, the embodiment of the present application also provides a device for predicting retail product fine-grained demand based on hierarchical learning for realizing the method for predicting retail product fine-grained demand based on hierarchical learning mentioned above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the device for predicting retail product fine-grained demand based on hierarchical learning provided below can refer to the limitations of the method for predicting retail product fine-grained demand based on hierarchical learning above, and will not be repeated here.
[0132] In one embodiment, Figure 3 As shown, a retail product fine-grained demand forecasting device 300 based on hierarchical learning is provided, comprising: an auxiliary variable definition module 301, a product forecast sales volume determination module 303, a demand forecasting objective function determination module 305, a consistency constraint determination module 307 and a retail product fine-grained demand forecasting module 309, wherein:
[0133] The auxiliary variable definition module 301 is used to define auxiliary variables, which include initial demand, actual sales volume, and product transfer probability of retail products.
[0134] The product forecast sales volume determination module 303 is used to determine the product forecast sales volume based on the initial demand, actual sales volume and product transfer probability.
[0135] The demand forecasting objective function determination module 305 is used to determine the demand forecasting objective function based on the predicted sales volume of the product.
[0136] The consistency constraint determination module 307 is used to determine the consistency constraints based on the product dimension, the space dimension and the time dimension by adopting a hierarchical method based on the demand forecasting objective function.
[0137] The retail product fine-grained demand forecasting module 309 is used to solve the demand forecasting objective function when one of the auxiliary variables is fixed based on the consistency constraint to perform retail product fine-grained demand forecasting.
[0138] In one embodiment of the present application, the product forecast sales volume is defined as follows:
[0139]
[0140]
[0141] in, is the predicted sales volume of product i in retail store s in time period t, d ist is the initial demand for product i in retail store s in time period t, d kst is the initial demand of product k at retail store s in the tth period, I kst =1 means product k is in stock in retail store s in the tth time period, I kst = 0 means product k is sold out in retail store s in the tth time period, l ist is the actual sales volume of product i in retail store s in the tth time period, l kst is the actual sales volume of product k in retail store s in the tth time period, β ki is the probability of transferring from product i to product k, β ik is the probability of transferring from product k to product i.
[0142] In one embodiment of the present application, the demand forecasting objective function is:
[0143]
[0144] Among them, d ist is the initial demand for product i in retail store s in the tth period, β ijis the probability of transferring from product j to product i, l ist is the actual sales volume of product i in retail store s in the tth time period, is the predicted sales volume of product i in retail store s in time period t.
[0145] In one embodiment of the present application, the method further includes:
[0146] Set the constraints of the initial demand, actual sales volume, and product transfer probability.
[0147] In one 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 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] in, is the predicted sales volume of product i in retail store s in time period t, d ist is the initial demand for product i in retail store s in time period t, d kst is the initial demand of product k at retail store s in the tth period, I ist =1,I kst =1 means product i or k is in stock in retail store s in the tth time period, I ist =0,I kst = 0 means product i or k is sold out in retail store s in the tth time period, l ist is the actual sales volume of product i in retail store s in the tth time period, l kst is the actual sales volume of product k in retail store s in the tth time period, β ki is the probability of transferring from product i to product k, β ik is the probability of transferring from product k to product i.
[0155] In one embodiment of the present application, the retail product fine-grained demand forecasting module is further used to:
[0156] Assuming that the product demand is fixed, minimize the demand forecast objective function under the product transfer probability;
[0157] Assuming that the product transfer probability is fixed, minimize the demand forecast 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 module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0159] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As 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, and 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, a retail product fine-grained demand forecasting method based on hierarchical learning is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0160] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0161] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[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-mentioned method embodiments are implemented.
[0163] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[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 used 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 skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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 embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0166] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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, they should be considered to be within the scope of this specification.
[0167] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A fine-grained demand forecasting method for retail products based on hierarchical learning, characterized in that: The method comprises: defining auxiliary variables, wherein the auxiliary variables include initial demand for retail products, actual sales volume, and product transfer probability; Determining predicted sales of the product based on the initial demand, actual sales and product transfer probability; Determining a demand forecasting objective function based on the predicted sales volume of the product; Based on the demand forecasting objective function, a hierarchical method is used to determine consistency constraints based on product dimension, space dimension and time dimension; Based on the consistency constraint, a demand forecasting objective function is solved when one of the auxiliary variables is fixed to perform fine-grained demand forecasting for retail products.
2. The method for retail product fine-grained demand forecasting based on hierarchical learning according to claim 1, characterized in that: The product forecast sales volume is defined as follows: in, is the predicted sales volume of product i in retail store s in time period t, d ist is the initial demand for product i in retail store s in time period t, d kst is the initial demand of product k at retail store s in the tth period, I kst =1 means product k is in stock in retail store s in the tth time period, I kst = 0 means product k is sold out in retail store s in the tth time period, l ist is the actual sales volume of product i in retail store s in the tth time period, l kst is the actual sales volume of product k in retail store s in the tth time period, β ki is the probability of transferring from product i to product k, β ik is the probability of transferring from product k to product i.
3. The method for retail product fine-grained demand forecasting based on hierarchical learning according to claim 1, characterized in that: The demand forecasting objective function is: Among them, d ist is the initial demand for product i in retail store s in the tth period, β ij is the probability of transferring from product j to product i, l ist is the actual sales volume of product i in retail store s in the tth time period, is the predicted sales volume of product i in retail store s in time period t.
4. The method for retail product fine-grained demand forecasting based on hierarchical learning according to claim 1 is characterized in that: The method further comprises: Set the constraints of the initial demand, actual sales volume, and product transfer probability.
5. The method for retail product fine-grained demand forecasting based on hierarchical learning according to claim 1, characterized in that: The consistency constraint based on the product dimension is expressed as: ∑ i∈P l ist =∑ i∈P d ist ; The consistency constraint based on spatial dimension is expressed as: ∑ s∈s l ist =∑ s∈S d ist ; The consistency constraint based on the time dimension is expressed as: in, is the predicted sales volume of product i in retail store s in time period t, d ist is the initial demand for product i in retail store s in time period t, d kst is the initial demand of product k at retail store s in the tth period, I ist =1,I kst =1 means product i or k is in stock in retail store s in the tth time period, I ist =0,I kst = 0 means product i or k is sold out in retail store s in the tth time period, l ist is the actual sales volume of product i in retail store s in the tth time period, l kst is the actual sales volume of product k in retail store s in the tth time period, β ki is the probability of transferring from product i to product k, β ik is the probability of transferring from product k to product i.
6. The method for retail product fine-grained demand forecasting based on hierarchical learning according to claim 1, characterized in that: The demand forecast objective function is solved based on the consistency constraint when one of the auxiliary variables is fixed: Assuming that the product demand is fixed, minimize the demand forecast objective function under the product transfer probability; Assuming that the product transfer probability is fixed, minimize the demand forecast objective function under the product demand.
7. A retail product fine-grained demand forecasting device based on hierarchical learning, characterized in that: The device comprises: An auxiliary variable definition module, used to define auxiliary variables, wherein the auxiliary variables include initial demand for retail products, actual sales volume, and product transfer probability; A product forecast sales volume determination module, used to determine the product forecast sales volume based on the initial demand, actual sales volume and product transfer probability; A demand forecasting objective function determination module, used to determine a demand forecasting objective function based on the predicted sales volume of the product; A consistency constraint determination module, used to determine consistency constraints based on product dimension, space dimension and time dimension by adopting a hierarchical method based on the demand forecast objective function; The retail product fine-grained demand forecasting module is used to solve the demand forecasting objective function when one of the auxiliary variables is fixed based on the consistency constraint, and perform retail product fine-grained demand forecasting.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Product analysis method based on multi-dimensional perceptual information semantic hierarchy association
CN106779858A
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
Offline store sales volume prediction method, storage medium and electronic equipment
CN117575668A
