Sales forecasting method and apparatus
Patent Information
- Application Number
- CN202611087645.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-27
AI Technical Summary
时序预测模型本质上是纯数值特征的回归拟合,无法直接理解非结构化的复杂文本信息,如营销大促方案、竞品降价策略等
[0015]上述发明中的一个实施例具有如下优点或有益效果:目标商品的上下文信息中可以包括非结构化的复杂文本信息,如营销大促方案、竞品降价策略等。推理模型综合考虑目标商品的上下文信息,确定出目标决策词元。通过依次执行目标决策词元对应的算子执行路径中的各算子执行过程,能够准确地预测出商品的销量。
Smart Images

Figure CN122989177A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a sales forecasting method and apparatus. Background Technology
[0002] Time series forecasting models are typically used to predict product sales. These models include XGBoost, LightGBM, DeepAR, TFT, and PatchTST. However, time series forecasting models are essentially regression fitting of purely numerical features and cannot directly interpret unstructured, complex textual information, such as marketing promotion plans or competitor price reduction strategies. Therefore, time series forecasting models often fail to accurately predict product sales. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a sales forecasting method and apparatus that can accurately predict the sales volume of goods.
[0004] In a first aspect, embodiments of the present invention provide a sales forecasting method, including: Obtain the context information of the target product; The context information is input into the inference model so that the inference model can determine the target decision term from multiple sales decision terms; Determine the operator execution path and parameter range corresponding to the target decision term; wherein, the operator execution path includes: at least one operator execution process; the parameter range is used to limit the values of the parameters required for the operator execution process; The execution process of each operator in the operator execution path is executed sequentially to obtain the predicted sales volume of the target product.
[0005] Optionally, before inputting contextual information into the inference model to determine the target decision term from multiple sales decision terms, the following steps are also included: Based on the evaluation information of the target product, determine the decision-making cost-effectiveness score of the target product; In response to a decision cost-effectiveness score exceeding a threshold, the process involves inputting contextual information into the inference model to enable it to identify the target decision term from multiple sales decision terms. If the decision cost-effectiveness score is not higher than the score threshold, the basic time-series forecasting model is invoked to obtain the predicted sales volume of the target product.
[0006] Optionally, based on the evaluation information of the target product, a decision-making cost-effectiveness score for the target product is determined, including: Based on the validation set of the target product, the confidence interval of the basic time series prediction model is calculated, and the uncertainty score is determined according to the confidence interval. Calculate the similarity of the text embedding vectors of multiple external events of the target product, and determine the semantic activation score based on the similarity. The business weight score is determined based on the sales volume, gross profit, and stockout penalty costs of the target product. The decision-making cost-effectiveness score of the target product is determined based on the uncertainty score, semantic activation score, and business weight score.
[0007] Optionally, the execution processes of each operator in the operator execution path are executed sequentially to obtain the predicted sales volume of the target product, including: The current execution process is determined from the operator execution path; From the parameter range, determine the values of the target parameters required for the current execution process; If the value of the target parameter is within a preset range, the current execution process is executed using the value of the target parameter. In response to the target parameter's value being outside the preset range, the default value of the target parameter is obtained; using the default value, the current execution process is executed.
[0008] Optionally, the target decision term also corresponds to a residual fine-tuning coefficient; After executing the execution processes of each operator in the operator execution path sequentially to obtain the predicted sales volume of the target product, the process also includes: By using the residual fine-tuning coefficient, the predicted sales volume is fine-tuned and compensated to obtain the optimized predicted sales volume of the target product.
[0009] Optionally, before inputting the contextual information into the inference model, the following may also be included: Obtain historical context information and actual sales volume of the target product in a historical period; Using an inference model, multiple candidate decision lexical units corresponding to historical context information are generated; For each candidate decision term, execute the operator execution path corresponding to the candidate decision term to determine the predicted sales volume corresponding to the candidate decision term; substitute the predicted sales volume corresponding to the candidate decision term into the cost loss function to obtain the predicted score corresponding to the candidate decision term. Substitute the actual sales figures into the cost loss function to obtain the true score; Based on the predicted score and the actual score of each candidate decision term, the relative advantage value of each candidate decision term is determined. The model parameters of the inference model are optimized and adjusted by using the relative advantage values of each candidate decision term.
[0010] Optionally, after generating multiple candidate decision lexical units corresponding to historical context information using an inference model, the process further includes: The prediction error corresponding to the candidate decision word is determined by using the evaluation network corresponding to the inference model. In response to a prediction error exceeding an error threshold, residual fine-tuning coefficients are generated based on the prediction error; these residual fine-tuning coefficients are used to fine-tune and compensate for the predicted sales corresponding to candidate decision terms. By combining historical context information, candidate decision terms, and residual fine-tuning coefficients, historical training samples are generated, and the inference model is optimized and trained using these historical training samples.
[0011] Secondly, embodiments of the present invention provide a sales forecasting device, comprising: The information acquisition module is used to acquire contextual information about the target product; The lexical determination module is used to input contextual information into the inference model so that the inference model can determine the target decision lexical from multiple sales decision lexicals; The path determination module is used to determine the operator execution path and parameter range corresponding to the target decision term; wherein, the operator execution path includes: at least one operator execution process; the parameter range is used to limit the values of the parameters required for the operator execution process; The sales forecasting module is used to execute the execution processes of each operator in the operator execution path in sequence to obtain the predicted sales of the target product.
[0012] Thirdly, embodiments of the present invention provide an electronic device, including: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the methods of any of the above embodiments.
[0013] Fourthly, embodiments of the present invention provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method of any of the above embodiments.
[0014] Fifthly, embodiments of the present invention provide a computer program product, including a computer program, wherein the computer program, when executed by a processor, implements the method of any of the above embodiments.
[0015] One embodiment of the above invention has the following advantages or beneficial effects: the contextual information of the target product may include unstructured complex textual information, such as marketing promotion plans, competitor price reduction strategies, etc. The inference model comprehensively considers the contextual information of the target product to determine the target decision tokens. By sequentially executing the execution processes of each operator in the operator execution path corresponding to the target decision tokens, the sales volume of the product can be accurately predicted.
[0016] Furthermore, the sales forecasting process is broken down into two independent processes: the decision term determination process and the operator execution process. After determining the target decision term, the predicted sales volume of the target product can be quickly obtained by executing the operator execution path corresponding to the target decision term. Specifically, the target decision term for the product is calculated and saved in advance. After reaching the preset time point, executing the operator execution path corresponding to the target decision term can efficiently obtain the predicted sales volume within a very narrow window. The solution of this embodiment also has corresponding responsiveness to the interactive requirements of planning experts for "instant data modification and rapid recalculation simulation".
[0017] Furthermore, by discretizing the high-dimensional and complex operator execution paths and parameter spaces into shorter sales decision vocabularies, the decision-making time of the agent can be significantly reduced, thus solving the computational bottleneck of online full-scale high concurrency.
[0018] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0019] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein: Figure 1 This is a schematic diagram of the flow of a sales forecasting method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the flow of a sales forecasting method provided in another embodiment of the present invention; Figure 3 This is a schematic diagram of the flow of an optimization method for an inference model provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a sales forecasting device provided in one embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0020] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0021] It should be noted that the acquisition, storage, use, and processing of data in the technical solutions of this invention comply with the relevant provisions of national laws and regulations.
[0022] Figure 1 This is a schematic diagram illustrating the flow of a sales forecasting method according to an embodiment of the present invention. Figure 1 As shown, the method includes: Step 101: Obtain the context information of the target product.
[0023] Contextual information includes: historical sales statistics, macro-level features, and unstructured complex text information. Historical sales statistics include: average sales, standard deviation of sales, and recent forecast error. Macro-level features include: overall fluctuation trends of the relevant product category, regional major events in the sales region, and national promotional policy arrangements. Complex text information includes: marketing and promotional copy, unstructured text such as weather and disaster warnings, etc. The contextual information includes multi-level related information such as product, category, and region. Cross-level contextual information association can significantly reduce micro-level random noise at the single product level.
[0024] Step 102: Input the context information into the inference model so that the inference model can determine the target decision term from multiple sales decision terms.
[0025] There is a one-to-one correspondence between sales decision terms and product forecasting methods. The product forecasting method is determined by the operator execution path and parameter range. Each sales decision term corresponds to a unique operator execution path and parameter range. The operator execution path is used to execute the product sales forecasting process. The operator execution path includes at least one operator execution process. The parameter range is used to limit the values of the parameters required for the operator execution process. The operator execution process includes: operators and data processing. Users can pre-set the definition information and extraction method of the processed data according to their needs.
[0026] Each operator execution process corresponds to a unique operator. An operator is a model operator, model, function, or rule that performs a certain calculation or operation. Model operators may include: convolution operators, pooling operators, fully connected operators, etc. Models, functions, and rules can be flexibly configured according to business needs. Models may include: time series models, LSTM (Long Short-Term Memory) networks, regression analysis models, demand forecasting models, etc. Functions may include: moving average functions, exponential smoothing functions, seasonality forecasting functions, and data balancing auxiliary functions, etc. Rules are used to process data into a preset structural form.
[0027] For example: the sales decision term is Token<ACT_42> Token<ACT_42> The mapped operator execution path and parameter range are as follows: Out-of-stock filling The sequence data is smoothed, with the smoothing hyperparameter set to 2.5. This includes shortage filling. The operator execution path is to smooth the sequence data. Shortage filling and smoothing the sequence data are the respective operator execution processes. The smoothing hyperparameter is set to 2.5, representing the parameter range.
[0028] Taking stockout filling as an example, the operator for this process is an LSTM model. The data processed in this process includes: historical sales volume, product availability, inventory, total page views (PV), and out-of-stock PV. Historical sales volume and product availability are mandatory data. The remaining data are optional. The system uses the LSTM model to predict sales demand during stockout periods based on historical sales volume and product availability, thus completing the stockout filling process.
[0029] Taking the smoothing of sequence data as an example, the operator for this process is either a moving average function or an exponential smoothing function. The data processed includes: sales time series, product price, final price, warehouse price, and whether there are near-expiry promotions. The system smooths the sales time series data based on the product price and final price by calling the moving average function or exponential smoothing function.
[0030] The methods for product forecasting are finite, as are the number of sales decision terms. Before executing step 102, this method further includes: discretizing and compressing the action space for sales decisions. Multiple operator execution paths and parameter ranges for product sales forecasting are pre-determined. The determined operator execution paths and parameter ranges are combined to obtain feasible operator execution paths and their corresponding parameter ranges. Sales decision terms are assigned one-to-one mappings to each feasible operator execution path and its corresponding parameter range. Finally, each sales decision term, along with its corresponding operator execution path and parameter range, is stored in a sales decision term table.
[0031] The context information is aligned. The aligned context information and prompts are then input into the inference model. During the thought chain reasoning process, the inference model performs associative reasoning across levels and multiple modalities of context, ultimately directly predicting and outputting discretized target decision terms. By using shorter sales decision terms to represent complex control combinations, the inference model's inference throughput and speed are significantly improved.
[0032] Step 103: Determine the operator execution path and parameter range corresponding to the target decision term; wherein, the operator execution path includes: at least one operator execution process; the parameter range is used to limit the values of the parameters required for the operator execution process.
[0033] The target decision terms obtained from offline inference are mapped and restored to operator execution paths and parameter ranges. Based on the restored execution paths and parameter ranges, structured decision information is generated and stored in a global policy configuration table. The global policy configuration table is then distributed and cached in a distributed file system or in-memory database.
[0034] Step 104: Execute each operator in the operator execution path in sequence to obtain the predicted sales volume of the target product.
[0035] When the sales forecasting job on the big data platform starts, the computing engine efficiently retrieves the pre-generated strategy configuration table from the cache or in-memory database. This strategy configuration table is then broadcast to all distributed computing nodes. The computing nodes retrieve the operator execution path and parameter range corresponding to the target decision term from the strategy configuration table. Through parallel computation by the distributed computing nodes, the predicted sales volume of the target product is obtained.
[0036] In the embodiment of this invention, the contextual information of the target product may include unstructured complex text information. The inference model comprehensively considers the contextual information of the target product to determine the target decision terms. By sequentially executing the execution processes of each operator in the operator execution path, the sales volume of the product can be accurately predicted.
[0037] Furthermore, the sales forecasting process is broken down into two independent processes: the decision term determination process and the operator execution process. After determining the target decision terms, the predicted sales volume of the target product can be obtained quickly and efficiently by executing the operator execution path for the target decision terms. Specifically, the target decision terms are calculated and saved in advance, and after reaching a preset time point, the operator execution path for the target decision terms is executed, which can obtain the predicted sales volume within a very narrow window. The solution of this embodiment also has corresponding responsiveness to the interactive requirements of planning experts for "instant data modification and rapid recalculation simulation".
[0038] Furthermore, discretizing high-dimensional and complex strategy paths and parameter spaces into extremely short sales decision terms can significantly reduce the decision-making time of the agent and solve the computational bottleneck of online full-scale high concurrency. At the same time, sales decision terms can also replace hard-coded multiple nested branches, realizing dynamic, on-demand, and multi-level assembly of business rules.
[0039] In one embodiment of the present invention, the process of sequentially executing each operator execution process in the operator execution path to obtain the predicted sales volume of the target product includes: determining the current execution process from the operator execution path; determining the value of the target parameter required for the current execution process from the parameter range; executing the current execution process using the target parameter value in response to the target parameter value being within a preset range; obtaining the default value of the target parameter in response to the target parameter value being outside the preset range; and executing the current execution process using the default value.
[0040] The system reads the target parameter value and performs boundary squeezing verification. If the target parameter value is within the preset range, the execution interpreter in the distributed computing node sequentially calls the local operator library according to the operator execution path, substitutes the target parameter into the formula, and repairs the baseline time series prediction value. If the target parameter value is outside the preset range, a circuit breaker operation is triggered, the abnormal parameter generated by the inference model is discarded, and the default value of the target parameter is forcibly loaded for calculation, ensuring the stability and controllability of the system.
[0041] Figure 2 This is a schematic diagram of a sales forecasting method provided in another embodiment of the present invention. Figure 2 As shown, the method includes: Step 201: Based on the evaluation information of the target product, determine the decision-making cost-effectiveness score of the target product.
[0042] Evaluation information may include: sales volume, gross profit, stockout penalty costs, validation sets, and external events. The decision cost-effectiveness score characterizes the probability that the benefit of inventory loss mitigation exceeds the inference computing power cost. The benefit of inventory loss mitigation is determined based on the product sales volume predicted by the inference model. The inference computing power cost is the computing power cost consumed by the inference model in predicting sales volume.
[0043] Step 202: Determine whether the decision cost-effectiveness score is higher than the score threshold.
[0044] If the decision-making cost-effectiveness score is higher than the score threshold, the target product is determined to be a high-cost-effectiveness decision-making product, and is diverted to the inference channel, proceeding to step 203. If the decision-making cost-effectiveness score is not higher than the score threshold, the target product is determined to be a regular or no-decision-benefit product, and is diverted to the default rule channel, proceeding to step 207.
[0045] Step 203: Obtain the context information of the target product.
[0046] Step 204: Input the context information into the inference model so that the inference model can determine the target decision term from multiple sales decision terms.
[0047] Step 205: Determine the operator execution path and parameter range corresponding to the target decision term.
[0048] The operator execution path includes at least one operator execution process. The parameter range is used to limit the values of the parameters required for the operator execution process.
[0049] Step 206: Execute the execution process of each operator in the operator execution path in sequence to obtain the predicted sales volume of the target product.
[0050] Step 207: Call the basic time series forecasting model to obtain the predicted sales volume of the target product.
[0051] Basic time series prediction models include XGBoost, LightGBM, DeepAR, TFT, and PatchTST. Compared to calling inference models, calling basic time series prediction models can save computing resources and has a faster prediction speed.
[0052] In the solution of this invention embodiment, the decision-making cost-effectiveness score of the target product is first determined, and then, based on the decision-making cost-effectiveness score, it is determined whether to call the inference model to obtain the predicted sales volume of the target product. This method can effectively divert most products that do not require deep intervention to the default rule channel, reducing the computational load of large models.
[0053] In one embodiment of the present invention, determining the decision-making cost-effectiveness score of the target product based on the evaluation information of the target product includes: calculating the confidence interval of the basic time series prediction model based on the validation set of the target product, and determining the uncertainty score based on the confidence interval; calculating the similarity of the text embedding vectors of multiple external events of the target product, and determining the semantic activation score based on the similarity; determining the business weight score based on the sales volume information, gross profit information and stockout penalty cost of the target product; and determining the decision-making cost-effectiveness score of the target product based on the uncertainty score, the semantic activation score and the business weight score.
[0054] You can select recent and corresponding time periods as the validation set periods. For example, if the prediction period is July of this year, you can select May of this year, June of this year, and July of last year as the validation period periods. Determine multiple statistical periods within the validation set. Obtain the actual sales volume of the target product in each statistical period to generate the validation set. Use the basic time series forecasting model to obtain the predicted sales volume of the target product in each statistical period. Based on the actual and predicted sales volume of the target product in each statistical period, determine the confidence interval of the basic time series forecasting model. The wider the confidence interval, the higher the uncertainty of the basic time series model's understanding of the target product. Based on the confidence interval, output the uncertainty score Sunc.
[0055] External events can include promotional events, abnormal weather events, etc. Using a dual-tower semantic model, the similarity of the text embedding vectors of multiple external events is calculated to obtain a semantic activation score (Ssem). Furthermore, based on the target product's sales volume, gross profit, and out-of-stock penalty cost, a business weight score (Wbiz) is obtained. The product of the semantic activation score (Ssem) and the business weight score (Wbiz) is used as the joint activation index (Sact).
[0056] The uncertainty score Sunc, the joint activation index Sact, and conventional statistical features are used as a joint feature vector and input into a lightweight decision tree meta-classifier, such as the LightGBM model. The meta-classifier predicts the decision cost-effectiveness score of the target product.
[0057] By integrating multi-dimensional features such as confidence intervals, cross-modal event semantics, and commercial weights of the commodity supply chain, the system intelligently judges the cost-effectiveness of inference model intervention and achieves efficient traffic filtering. It filters out the inference overhead of most stable commodities in advance, which greatly optimizes the system's computational efficiency and computing power allocation.
[0058] Figure 3 This is a schematic diagram illustrating the flow of an optimization method for an inference model according to an embodiment of the present invention. Figure 3 As shown, the method includes: Step 301: Obtain the historical context information and actual sales volume of the target product in the historical period.
[0059] Historical context information refers to the context information of the target product during a historical period. Actual sales volume refers to the actual number of the target product sold during the historical period.
[0060] Step 302: Using the inference model, generate multiple candidate decision lexical units corresponding to the historical context information.
[0061] Read historical context information and actual sales figures from the experience cache set. Set the group sampling size to G, where G is a positive integer. Utilize the inference agent deployed in the computing cluster to perform G-1 parallel sampling operations on the same historical context information, generating G-1 different candidate decision lexical units.
[0062] Step 303: For each candidate decision term, execute the operator execution path corresponding to the candidate decision term to determine the predicted sales volume corresponding to the candidate decision term; substitute the predicted sales volume corresponding to the candidate decision term into the cost loss function to obtain the predicted score corresponding to the candidate decision term.
[0063] The cost loss function is constructed using the logic of QMAPE (Quantile Mean Absolute Percentage Error). For example, when the predicted sales volume is higher than the actual sales volume, the coefficient for the deviation is 10%. When the predicted sales volume is lower than the actual sales volume, the coefficient for the deviation is 20%. In this way, the cost loss function will be more inclined to predict higher sales volumes, ensuring that the goods are not out of stock.
[0064] In a local high-performance computing environment, lightweight mathematical formula languages such as PyTorch and Python are used to replicate the processing logic of each operator execution process in the distributed engine, constructing a sandbox simulator that eliminates the need for distributed scheduling. Using the sandbox simulator, the G-1 group strategy scheme is quickly computed forward, and the corresponding predicted sales are output. Based on a preset business cost loss function, G-1 predicted scores [r1, r2, ..., r] are calculated. G-1 ].
[0065] Step 304: Substitute the actual sales volume into the cost loss function to obtain the true score.
[0066] Substituting the actual sales volume into the business cost loss function yields the true score r. real .
[0067] Step 305: Based on the predicted score and the actual score corresponding to each candidate decision term, determine the relative advantage value corresponding to each candidate decision term.
[0068] Combine G-1 predicted scores and actual scores r real Generate a mixed group containing G scoring samples. R hybrid = [r1,r2,…,r] G-1, r real Calculate the mean μ and standard deviation σ of the mixed group. Calculate the relative advantage value for each candidate decision term within the group. Ai :
[0069] Where 1≤i≤G-1.
[0070] Step 306: Optimize and adjust the model parameters of the inference model by using the relative advantage values corresponding to each candidate decision term.
[0071] Based on the relative advantage values corresponding to candidate decision terms, a gradient adjustment strategy is run to fine-tune the model parameters, forcing the strategy to evolve and update in a direction that surpasses historical actual scores. This causes the model parameters of the inference model to converge in a direction that reduces the total cost of supply chain business, thus achieving a self-evolving closed loop of post-processing decision logic at the business benefit level.
[0072] In the scheme of this invention embodiment, a hybrid group is constructed based on the predicted score and the actual score corresponding to each candidate decision term. Using a group relative strategy optimization algorithm, low-cost autonomous iteration is achieved to align the large model's decision strategy with actual business benefit indicators without requiring a side discriminator or running a distributed cluster.
[0073] In one embodiment of the present invention, after generating multiple candidate decision terms corresponding to historical context information using an inference model, the method further includes: determining the prediction error corresponding to the candidate decision terms using an evaluation network corresponding to the inference model; generating residual fine-tuning coefficients based on the prediction error in response to the prediction error being higher than an error threshold; wherein the residual fine-tuning coefficients are used to fine-tune and compensate for the predicted sales volume corresponding to the candidate decision terms; combining historical context information, candidate decision terms, and residual fine-tuning coefficients to generate historical training samples; and using the historical training samples to optimize and train the inference model.
[0074] During training, a double-loop reflection check is performed. If the prediction error after simulation exceeds the error threshold, a secondary reflection mechanism is triggered, and the inference model autonomously generates a compensatory sales residual adjustment value δ. The sales residual adjustment value δ is used for end-point calibration.
[0075] In one embodiment of the present invention, the target decision term also corresponds to a residual fine-tuning coefficient; after executing the execution processes of each operator in the operator execution path in sequence to obtain the predicted sales of the target product, the method further includes: using the residual fine-tuning coefficient to fine-tune and compensate the predicted sales to obtain the optimized predicted sales of the target product.
[0076] If the target decision term also corresponds to a residual fine-tuning coefficient δ, then after the operator flow is executed, the residual fine-tuning coefficient δ is used to perform high-dimensional residual nonlinear fine-tuning compensation, which makes up for the upper limit of the repair capability of traditional mathematical operators in extreme scenarios and achieves higher prediction anti-disturbance and prediction accuracy.
[0077] Figure 4 This is a schematic diagram of a sales forecasting device provided in one embodiment of the present invention. Figure 4 As shown, the device includes: The information acquisition module 401 is used to acquire the context information of the target product; The lexical determination module 402 is used to input contextual information into the inference model so that the inference model can determine the target decision lexical from multiple sales decision lexicals; The path determination module 403 is used to determine the operator execution path and parameter range corresponding to the target decision word; wherein, the operator execution path includes: at least one operator execution process; the parameter range is used to limit the values of the parameters required for the operator execution process; The sales forecasting module 404 is used to execute the execution processes of each operator in the operator execution path in sequence to obtain the predicted sales of the target product.
[0078] Optionally, it also includes: The decision-making module is used to determine the decision-making cost-effectiveness score of the target product based on the evaluation information of the target product; In response to a decision cost-effectiveness score exceeding a threshold, the process involves inputting contextual information into the inference model to enable it to identify the target decision term from multiple sales decision terms. If the decision cost-effectiveness score is not higher than the score threshold, the basic time-series forecasting model is invoked to obtain the predicted sales volume of the target product.
[0079] Optionally, the decision module is specifically used for: Based on the validation set of the target product, the confidence interval of the basic time series prediction model is calculated, and the uncertainty score is determined according to the confidence interval. Calculate the similarity of the text embedding vectors of multiple external events of the target product, and determine the semantic activation score based on the similarity. The business weight score is determined based on the sales volume, gross profit, and stockout penalty costs of the target product. The decision-making cost-effectiveness score of the target product is determined based on the uncertainty score, semantic activation score, and business weight score.
[0080] Optionally, the sales forecasting module 404 is specifically used for: The current execution process is determined from the operator execution path; From the parameter range, determine the values of the target parameters required for the current execution process; If the value of the target parameter is within a preset range, the current execution process is executed using the value of the target parameter. In response to the target parameter's value being outside the preset range, the default value of the target parameter is obtained; using the default value, the current execution process is executed.
[0081] Optionally, the target decision term also corresponds to a residual fine-tuning coefficient; The sales forecasting module 404 is also used for: By using the residual fine-tuning coefficient, the predicted sales volume is fine-tuned and compensated to obtain the optimized predicted sales volume of the target product.
[0082] Optionally, it also includes: The optimization module is used to obtain the historical context information and actual sales volume of the target product in a historical period. Using an inference model, multiple candidate decision lexical units corresponding to historical context information are generated; For each candidate decision term, execute the operator execution path corresponding to the candidate decision term to determine the predicted sales volume corresponding to the candidate decision term; substitute the predicted sales volume corresponding to the candidate decision term into the cost loss function to obtain the predicted score corresponding to the candidate decision term. Substitute the actual sales figures into the cost loss function to obtain the true score; Based on the predicted score and the actual score of each candidate decision term, the relative advantage value of each candidate decision term is determined. The model parameters of the inference model are optimized and adjusted by using the relative advantage values of each candidate decision term.
[0083] Optionally, the optimization module is also used for: The prediction error corresponding to the candidate decision word is determined by using the evaluation network corresponding to the inference model. In response to a prediction error exceeding an error threshold, residual fine-tuning coefficients are generated based on the prediction error; these residual fine-tuning coefficients are used to fine-tune and compensate for the predicted sales corresponding to candidate decision terms. By combining historical context information, candidate decision terms, and residual fine-tuning coefficients, historical training samples are generated, and the inference model is optimized and trained using these historical training samples.
[0084] This invention provides an electronic device, comprising: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the methods of any of the above embodiments.
[0085] This invention provides a computer program product, including a computer program that, when executed by a processor, implements the method of any of the above embodiments.
[0086] The following is for reference. Figure 5 It shows a schematic diagram of the structure of a computer system 500 suitable for implementing a terminal device of the present invention. Figure 5 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0087] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 502 or programs loaded from storage section 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the system 500. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0088] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.
[0089] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined above in the system of this invention.
[0090] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0091] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0092] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be located in a processor, and for example, can be described as: an information acquisition module, a lexical determination module, a path determination module, and a sales forecasting module. The names of these modules do not necessarily limit the module itself; for example, the information acquisition module can also be described as "a module that allows the user to acquire contextual information about the target product."
[0093] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: Obtain the context information of the target product; The context information is input into the inference model so that the inference model can determine the target decision term from multiple sales decision terms; Determine the operator execution path and parameter range corresponding to the target decision term; wherein, the operator execution path includes: at least one operator execution process; the parameter range is used to limit the values of the parameters required for the operator execution process; The execution process of each operator in the operator execution path is executed sequentially to obtain the predicted sales volume of the target product.
[0094] According to the technical solution of this invention, the contextual information of the target product may include unstructured complex text information, such as marketing promotion plans and competitor price reduction strategies. The inference model comprehensively considers the contextual information of the target product to determine the target decision terms. By sequentially executing the execution processes of each operator in the operator execution path, the sales volume of the product can be accurately predicted.
[0095] Furthermore, the sales forecasting process is broken down into two independent processes: the decision term determination process and the operator execution process. After determining the target decision terms, the predicted sales volume of the target product can be obtained quickly and efficiently by executing the operator execution path for the target decision terms. Specifically, the target decision terms are calculated and saved in advance, and after reaching a preset time point, the operator execution path for the target decision terms is executed, which can obtain the predicted sales volume within a very narrow window. The solution of this embodiment also has corresponding responsiveness to the interactive requirements of planning experts for "instant data modification and rapid recalculation simulation".
[0096] Furthermore, by discretizing the high-dimensional and complex strategy paths and parameter spaces into extremely short sales decision vocabularies, the decision-making time of the agent can be significantly reduced, thus solving the computational bottleneck of online full-scale high concurrency.
[0097] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A sales forecasting method, characterized in that, include: Obtain the context information of the target product; The context information is input into the inference model so that the inference model can determine the target decision term from multiple sales decision terms. Determine the operator execution path and parameter range corresponding to the target decision term; wherein, the operator execution path includes: at least one operator execution process; the parameter range is used to limit the values of the parameters required by the operator execution process; The predicted sales volume of the target product is obtained by sequentially executing each operator execution process in the operator execution path.
2. The method according to claim 1, characterized in that, Before inputting the context information into the inference model to enable the inference model to determine the target decision term from multiple sales decision terms, the method further includes: Based on the evaluation information of the target product, determine the decision-making cost-effectiveness score of the target product; In response to the decision cost-effectiveness score being higher than the score threshold, the step of inputting the context information into the inference model is performed so that the inference model can determine the target decision term from multiple sales decision terms. If the decision cost-effectiveness score is not higher than the score threshold, the basic time-series prediction model is invoked to obtain the predicted sales volume of the target product.
3. The method according to claim 2, characterized in that, The step of determining the decision-making cost-effectiveness score of the target product based on the evaluation information of the target product includes: Based on the validation set of the target product, the confidence interval of the basic time series prediction model is calculated, and the uncertainty score is determined according to the confidence interval. Calculate the similarity of the text embedding vectors of multiple external events of the target product, and determine the semantic activation score based on the similarity. The business weight score is determined based on the sales volume information, gross profit information, and stockout penalty cost of the target product. The decision-making cost-effectiveness score of the target product is determined based on the uncertainty score, the semantic activation score, and the business weight score.
4. The method according to claim 1, characterized in that, The step of sequentially executing each operator execution process in the operator execution path to obtain the predicted sales volume of the target product includes: The current execution process is determined from the operator execution path; From the parameter range, determine the values of the target parameters required for the current execution process; In response to the target parameter being within a preset range, the current execution process is executed using the target parameter's value. In response to the target parameter's value being outside the preset range, the default value of the target parameter is obtained; and the current execution process is executed using the default value.
5. The method according to claim 1, characterized in that, The target decision term also corresponds to a residual fine-tuning coefficient; After sequentially executing each operator execution process in the operator execution path to obtain the predicted sales volume of the target product, the method further includes: The predicted sales volume is fine-tuned and compensated using the residual fine-tuning coefficient to obtain the optimized predicted sales volume of the target product.
6. The method according to claim 1, characterized in that, Before inputting the context information into the inference model, the process further includes: Obtain historical context information and actual sales volume of the target product in a historical period; Using the inference model, multiple candidate decision lexical units corresponding to the historical context information are generated; For each candidate decision term, the operator execution path corresponding to the candidate decision term is executed to determine the predicted sales volume corresponding to the candidate decision term; the predicted sales volume corresponding to the candidate decision term is substituted into the cost loss function to obtain the predicted score corresponding to the candidate decision term. Substituting the actual sales figures into the cost loss function yields the true score; Based on the predicted score and the actual score corresponding to each candidate decision term, the relative advantage value corresponding to each candidate decision term is determined. The model parameters of the inference model are optimized and adjusted by using the relative advantage values corresponding to each candidate decision term.
7. The method according to claim 6, characterized in that, After generating multiple candidate decision lexical units corresponding to the historical context information using the inference model, the process further includes: The prediction error corresponding to the candidate decision term is determined using the evaluation network corresponding to the inference model. In response to the prediction error exceeding an error threshold, residual fine-tuning coefficients are generated based on the prediction error; wherein, the residual fine-tuning coefficients are used to fine-tune and compensate the predicted sales corresponding to the candidate decision term. The historical context information, the candidate decision terms, and the residual fine-tuning coefficients are combined to generate historical training samples, and the inference model is optimized and trained using the historical training samples.
8. A sales forecasting device, characterized in that, include: The information acquisition module is used to acquire contextual information about the target product; The lexical determination module is used to input the context information into the inference model so that the inference model can determine the target decision lexical from multiple sales decision lexicals; A path determination module is used to determine the operator execution path and parameter range corresponding to the target decision term; wherein, the operator execution path includes: at least one operator execution process; the parameter range is used to limit the values of the parameters required by the operator execution process; The sales forecasting module is used to sequentially execute each of the operator execution processes in the operator execution path to obtain the predicted sales of the target product.
9. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-7.
