Retail demand forecasting method and system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]然而,在实际应用中,对于多业务主体场景下的需求预测往往存在适用性不足的问题
[0015]本申请实施例提供了零售需求预测方法及系统,本申请实施例针对在多业务主体场景下适用性不足的技术问题,通过基座模型、企业自适应适配器以及时间掩码相配合的方式,实现对不同业务主体和不同预测任务的统一适配;并且,通过引入目标商品对象对应的至少一个关联商品对象参与需求预测处理,利用商品之间的关联关系辅助当前商品对象的需求预测,从而有利于提高商品需求预测的准确度。
Smart Images

Figure CN122550226A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of retail demand forecasting, and in particular to retail demand forecasting methods and systems. Background Technology
[0002] In data-driven business management scenarios, it is often necessary to predict the changing trends or quantitative outcomes of target objects over a future period based on historical business data, in order to provide a basis for resource allocation, planning, inventory management, or business decisions. Especially in commodity circulation and supply chain collaboration scenarios, it is common to predict demand for a future period based on historical demand data for commodity objects, combined with time, attributes, or other business factors.
[0003] However, in practical applications, demand forecasting in scenarios involving multiple business entities often suffers from insufficient applicability. For example, some business entities or target objects lack sufficient historical data, and there are differences in data scale, data distribution, and business characteristics among different business entities. Furthermore, different business scenarios have different requirements for forecasting cycles, making it difficult for existing forecasting technologies to achieve a unified and effective adaptation across different entities and tasks. Summary of the Invention
[0004] The purpose of this application is to provide a retail demand forecasting method and system that effectively improves the adaptability of demand forecasting in multi-enterprise scenarios to different data distributions, different forecasting periods, and product relationships.
[0005] The objective of this application is achieved through the following technical solution: In a first aspect, embodiments of this application provide a retail demand forecasting method, the method comprising: acquiring forecasting feature information and forecasting task information of a target product object; acquiring a target demand forecasting model; wherein the target demand forecasting model includes a base layer and an enterprise perception adaptation layer, the target demand forecasting model being used to adapt different forecasting tasks based on the forecasting task information; determining at least one associated product object corresponding to the target product object based on the association relationship between the target product object and at least one other product object; performing demand forecasting processing through the target demand forecasting model based on the forecasting feature information of the target product object, the association data of the at least one associated product object, and the forecasting task information, to obtain a standard demand forecasting result corresponding to the target product object; and determining the demand forecasting result corresponding to the target product object from the standard demand forecasting result according to the forecasting task information.
[0006] In some embodiments, the step of performing demand forecasting processing based on the predicted feature information of the target product object, the associated data of the at least one associated product object, and the prediction task information through the target demand forecasting model to obtain the standard demand forecasting result corresponding to the target product object includes: inputting the predicted feature information of the target product object and the associated data of the at least one associated product object into the base layer; performing demand forecasting processing on the predicted feature information of the target product object and the associated data of the at least one associated product object through the base layer based on the cross-sequence modeling capability pre-learned from product data of multiple business entities; performing enterprise difference adaptation on the base layer through the enterprise-aware adaptation layer; and performing task difference adaptation on the standard demand forecasting result in conjunction with the prediction task information.
[0007] In some embodiments, determining at least one associated product object corresponding to the target product object based on the association relationship between the target product object and at least one other product object includes: determining the association strength between the target product object and the other product objects based on at least one of spatial constraints, semantic similarity, residual correlation after deseasoning, and co-occurrence behavior information; and determining at least one associated product object corresponding to the target product object based on the association strength.
[0008] In some embodiments, determining at least one associated product object corresponding to the target product object based on the association strength includes: establishing a neighbor index table corresponding to the target product object according to the association strength; and selecting at least one product object from the neighbor index table whose association strength meets the condition as at least one associated product object corresponding to the target product object.
[0009] In some embodiments, the standard demand prediction result is a standard demand prediction sequence covering a preset maximum prediction length; the step of combining the prediction task information to perform task difference adaptation on the standard demand prediction result includes: according to the prediction task information, extracting a target prediction sequence of a corresponding length from the standard demand prediction sequence as the demand prediction result.
[0010] In some embodiments, before performing demand forecasting processing through the target demand forecasting model based on the predicted feature information of the target product object, the association data of the at least one associated product object, and the prediction task information, the method further includes: performing length alignment processing on the historical demand data of the target product object and generating corresponding mask information; and performing relative time encoding on the input sequence and / or output sequence.
[0011] In some embodiments, before performing demand forecasting processing through the target demand forecasting model based on the predicted feature information of the target product object, the association data of the at least one associated product object, and the prediction task information, the method further includes: normalizing the historical demand data of the target product object based on the statistics of the current time window to obtain input data representing relative fluctuations; wherein, determining the demand forecasting result corresponding to the target product object from the standard demand forecasting results according to the prediction task information includes: performing inverse normalization processing on the target prediction sequence based on the statistics to obtain the demand forecasting result.
[0012] In some embodiments, when the length of the historical demand data of the target product object is less than a preset threshold, the method further includes: determining a reference prototype corresponding to the target product object; determining a prior statistic based on the reference prototype; and determining a target statistic for the normalization process based on the prior statistic and the statistic of the current time window.
[0013] Secondly, embodiments of this application provide a retail demand forecasting system, the system comprising: a data acquisition module for acquiring forecasting feature information and forecasting task information of a target product object; a model acquisition module for acquiring a target demand forecasting model; wherein the target demand forecasting model includes a base layer and an enterprise perception adaptation layer, the target demand forecasting model being used to adapt to different forecasting tasks based on the forecasting task information; an association determination module for determining at least one associated product object corresponding to the target product object based on the association relationship between the target product object and at least one other product object; a demand forecasting module for performing demand forecasting processing through the target demand forecasting model based on the forecasting feature information of the target product object, the association data of the at least one associated product object, and the forecasting task information, to obtain a standard demand forecasting result corresponding to the target product object; and a result determination module for determining the demand forecasting result corresponding to the target product object from the standard demand forecasting result according to the forecasting task information.
[0014] Thirdly, embodiments of this application provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the retail demand forecasting method described in any one of the first aspects above.
[0015] This application provides a retail demand forecasting method and system. Addressing the technical problem of insufficient applicability in multi-business entity scenarios, this application achieves unified adaptation to different business entities and forecasting tasks through a combination of a base model, an enterprise adaptive adapter, and a time mask. Furthermore, by introducing at least one associated product object corresponding to the target product object into the demand forecasting process, the association between products is used to assist in the demand forecasting of the current product object, thereby improving the accuracy of product demand forecasting. Attached Figure Description
[0016] This application will be further described below with reference to the accompanying drawings and specific embodiments.
[0017] Figure 1 This is a flowchart illustrating a retail demand forecasting method provided in an embodiment of this application.
[0018] Figure 2 This is a schematic diagram of the overall architecture of a retail demand forecasting system provided in an embodiment of this application.
[0019] Figure 3 This is a flowchart comparing a zero-sample prediction mode and a fine-tuning mode provided in an embodiment of this application.
[0020] Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0021] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] In the description of the embodiments of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0023] In specific retail demand forecasting scenarios, related technologies typically use historical demand data for products, combined with time series analysis, machine learning, or deep learning methods, to predict demand over a future period to support business activities such as replenishment, procurement, allocation, and inventory management. However, in service-oriented scenarios involving multiple enterprises, multiple product categories, and multiple business cycles, this technology still has certain limitations.
[0024] On the one hand, small and medium-sized retail enterprises, new brands, or newly launched products often lack sufficient historical demand data, making it difficult to establish relevant predictive models or resulting in poor predictive stability, thus leading to insufficient cold start capability. On the other hand, even if some enterprises have accumulated certain historical data, this data usually only reflects the corresponding enterprise's own operating conditions and market change characteristics, with relatively limited data coverage. This makes models trained based on data from a single entity prone to insufficient generalization ability and limited applicability, making it difficult to adapt well to differences in data distribution among different enterprises and unseen business fluctuation scenarios.
[0025] Furthermore, different enterprises or different business scenarios often have different requirements for forecast lead time. For example, some business scenarios focus more on forecast results over a shorter period, while others require forecast results over a longer period. In response, it is common to build, train, or maintain different models for different forecast periods, which can easily lead to problems such as complex model management, high deployment costs, and poor reusability.
[0026] Furthermore, traditional demand forecasting methods typically treat the demand sequence corresponding to an individual product as a relatively independent forecasting object, while underutilizing the objectively existing relationships between products. For example, different products may have complementary, substitutive, co-display, or coexisting relationships on the same site. If this type of relationship information is not effectively utilized, the forecasting model often fails to fully characterize the linkage features between products, thus affecting forecasting performance.
[0027] Furthermore, in multi-enterprise centralized forecasting services or collaborative modeling scenarios, different enterprises typically exhibit significant differences in historical data length, sales volume, business characteristics, and application requirements. Without a unified data adaptation mechanism, the relevant models will struggle to accommodate the heterogeneity among different entities.
[0028] In view of this, this application provides a retail demand forecasting method that takes into account the forecasting ability under conditions of insufficient data in a multi-enterprise scenario, the adaptability between different entities, the unified processing ability of tasks with different forecasting cycles, the ability to utilize product correlation relationships, and the privacy protection requirements in the process of data use.
[0029] See Figure 1 , Figure 1 This is a flowchart illustrating a retail demand forecasting method provided in an embodiment of this application.
[0030] This application provides a retail demand forecasting method, which includes steps S101-S105: S101: Obtain the prediction feature information and prediction task information of the target product object.
[0031] S102: Obtain the target demand prediction model; wherein, the target demand prediction model includes a base layer and an enterprise perception adaptation layer, and the target demand prediction model is used to adapt different prediction tasks based on prediction task information.
[0032] S103: Based on the association relationship between the target product object and at least one other product object, determine at least one associated product object corresponding to the target product object.
[0033] S104: Based on the predicted feature information of the target product object, the associated data of at least one related product object, and the predicted task information, the demand prediction process is carried out through the target demand prediction model to obtain the standard demand prediction result corresponding to the target product object.
[0034] S105: Based on the forecast task information, determine the demand forecast result corresponding to the target commodity object from the standard demand forecast results.
[0035] It is understood that the retail demand forecasting method provided in this application can be a forecasting processing method for commodity circulation and supply chain collaboration scenarios, used to estimate the demand changes of a target commodity object over a future period based on historical business data. In some specific implementations, this method can be applied to business processes such as replenishment, procurement, allocation, inventory management, or business decision-making. The target commodity object can be a single commodity to be forecasted, a single inventory unit, or a single sales unit. For example, the target commodity object can be a specific specification of beverage under a certain brand, a specific model of small household appliance, or a specific inventory unit under a certain site. In some embodiments, the target commodity object can represent a single forecasting granularity unit. Accordingly, the retail demand forecasting method in this application can perform forecasting processing on a single target commodity object, or perform forecasting processing on multiple target commodity objects separately or in parallel. In other words, multiple commodities to be forecasted can be regarded as corresponding target commodity objects, and the demand forecasting results corresponding to each target commodity object can be determined based on the same processing logic. By limiting the forecasting processing object to the target commodity object, the subsequent processes of obtaining forecasting feature information, determining associated commodity objects, and outputting demand forecasting results can revolve around the same forecasting subject, thereby facilitating the formation of a clear processing chain.
[0036] In some embodiments, the predictive feature information of the target product object can be information used to characterize the historical demand patterns, time attribute patterns, or static business attributes of the target product object. The predictive feature information of the target product object can include at least one of the following: historical demand data, calendar feature information, and static attribute information. For example, historical demand data of the target product object can include sales data, outbound volume data, or order volume data obtained by daily, weekly, or other time granularity statistics; calendar feature information can include weekly, monthly, or holiday information; static attribute information can include category information, brand information, price range information, or product attribute information. The predictive task information can be information used to characterize the current predictive task objective and output requirements. Specifically, the predictive task information can include the target prediction lead time, or task parameters related to the business cycle. For example, the predictive task information can characterize replenishment demand for the next 30 days, planning demand for the next 90 days, or long-cycle demand for the next 180 days. The predictive feature information of the target product object is mainly used to characterize the "prediction basis," and the predictive task information is mainly used to characterize the "prediction requirements." Together, they can define the input basis and output range of the demand forecasting process. Furthermore, the predictive task information can also be used to enable the target demand forecasting model to perform adaptation processing for different forecasting tasks.
[0037] In some embodiments, the target demand forecasting model can be a model that receives the predictive feature information of a target product object and outputs the standard demand forecasting result corresponding to the target product object in combination with the prediction task information. Specifically, the target demand forecasting model can be constructed as a demand forecasting foundation model for the retail sector. In some extended embodiments, the target demand forecasting model can also adopt a two-layer architecture of foundation-temporal adapter. Specifically, the two-layer architecture of foundation-temporal adapter can include a foundation layer for extracting common temporal patterns, and an enterprise-aware injection layer for introducing subject differences and temporal adaptation information, so as to take into account both the extraction of general temporal patterns and the adaptation of enterprise differences. In this way, the target demand forecasting model can retain unified modeling capabilities while taking into account the adaptation needs of different business subjects, different target product objects, or different task scenarios. Furthermore, the training process of the target demand forecasting model can be based on historical business data of multiple product objects from multiple business entities, in order to learn the general demand modeling capability across business entities and product objects; in the model application stage, forecasting can be performed for a single target product object or batch forecasting can be performed for multiple target product objects.
[0038] By first obtaining the target demand forecasting model, and then combining the forecasting feature information of the target product object with the associated data of at least one related product object corresponding to the target product object for demand forecasting processing, the entire retail demand forecasting method can have a unified model entry point and provide a unified processing framework for different business entities and different forecasting tasks.
[0039] In some specific implementations, the base component of the target demand prediction model can adopt an improved temporal Transformer architecture based on a patch mechanism. Specifically, time points can be divided and aggregated into multiple temporal segments to form temporal value embeddings; alternatively, calendar feature embeddings and static attribute embeddings can be combined to construct multimodal retail embeddings. Furthermore, the encoder can employ a multi-layer self-attention mechanism to capture long-term dependencies, while the decoder can adopt a generative architecture that supports variable-length outputs. In this way, local temporal semantics and long-term temporal dependencies corresponding to the target product object can be extracted while reducing computational complexity. In some implementations, prediction task information can also participate in model input, decoding control, or output constraints to enable the target demand prediction model to form corresponding standard demand prediction results for different prediction tasks.
[0040] In some embodiments, the association between a target product object and at least one other product object can be relational information used to characterize the coexistence, similarity, linkage, or co-occurrence relationships between different product objects. Specifically, the association between a target product object and at least one other product object can be determined based on at least one of spatial constraints, semantic similarity, deseasonalized residual correlation, and co-occurrence behavior information. For example, spatial constraints can be used to characterize whether the target product object and at least one other product object are in the same tenant, the same sales platform, or the same site; semantic similarity can be used to characterize the similarity between the target product object and at least one other product object in terms of category, brand, or price range; deseasonalized residual correlation can be used to characterize the actual linkage between the target product object and at least one other product object after removing the effects of holidays or periodicity; and co-occurrence behavior information can be used to characterize the co-occurrence of the target product object and at least one other product object in transaction flow or shopping baskets. By utilizing the association between a target product object and at least one other product object, it is possible to avoid treating the target product object as an isolated time series, thereby providing a basis for subsequently determining at least one associated product object corresponding to the target product object.
[0041] In some specific implementations, the association between a target product object and at least one other product object can be generated through the first stage: offline construction of a multidimensional association graph (offline Relation Mining Engine). This can include offline analysis of spatial constraints, semantic similarity, deseasonalized residual correlations, and co-occurrence behavior information among multiple product objects, forming a multidimensional association graph oriented towards the target product object. This offline construction method allows various association factors to be pre-converted into reusable association assets, thereby reducing the temporary computational burden in the online prediction stage.
[0042] In some embodiments, at least one associated product object corresponding to the target product object can be a product object with a strong association with the target product object and meeting the filtering criteria. Specifically, different other product objects can be sorted or filtered according to the association relationship between the target product object and at least one other product object, and then the at least one associated product object corresponding to the target product object can be determined. For example, a neighbor index table can be constructed according to the association strength, and the top K most strongly associated product objects can be selected from the neighbor index table as at least one associated product object corresponding to the target product object. The association data of at least one associated product object corresponding to the target product object can be information used to characterize the status or location of at least one associated product object corresponding to the target product object. Specifically, the association data of at least one associated product object corresponding to the target product object can include historical demand data of at least one associated product object corresponding to the target product object, or neighbor index information or neighbor location subscript information. The association data of at least one associated product object corresponding to the target product object and the predictive feature information of the target product object together constitute the data foundation for demand forecasting processing. The predictive feature information of the target product object mainly characterizes the temporal and attribute characteristics of the target product object itself, and the association data of at least one associated product object corresponding to the target product object mainly characterizes external product association information.
[0043] In some embodiments, demand forecasting is performed using a target demand forecasting model based on the predicted feature information of the target product object, the association data of at least one associated product object corresponding to the target product object, and the forecasting task information. This means that the target demand forecasting model jointly models the target product object's own information and associated product information, and performs task adaptation processing in conjunction with the forecasting task information to output the standard demand forecasting result corresponding to the target product object. Specifically, the demand forecasting process may include encoding the historical demand patterns of the target product object, or it may include modeling the cross-sequence relationship between the target product object and at least one associated product object corresponding to the target product object. For example, the target demand forecasting model can not only receive the time series data of the target product object, but also receive the neighbor index information of at least one associated product object corresponding to the target product object, and can also receive or utilize the forecasting task information to make predictions using strongly associated product information in the same batch. When there are multiple products to be predicted, the target demand forecasting model can also receive the predicted feature information and the association data of the associated product objects corresponding to each of the multiple target product objects in the same forecasting batch, and output the standard demand forecasting results corresponding to the multiple target product objects respectively in conjunction with the corresponding forecasting task information.
[0044] In this way, on the one hand, the target demand forecasting model can learn the changing patterns of the target product itself; on the other hand, it can utilize the changing trends of complementary, substitute, or co-occurring products to assist in current forecasting, thereby improving the accuracy and stability of the standard demand forecasting results for the target product. Furthermore, by introducing forecasting task information into the demand forecasting process, the same target demand forecasting model can generate corresponding standard demand forecasting results for different forecasting tasks, thus improving the model's adaptability to different task scenarios.
[0045] In some specific implementations, cross-series attention can be introduced into the target demand forecasting model to establish a sequence-level information interaction relationship between the target product object and at least one associated product object. This allows the target demand forecasting model to utilize not only the temporal changes of the target product object itself, but also the temporal changes of associated product objects to assist in the current forecast. This can enhance the target demand forecasting model's ability to characterize cross-product linkages to a certain extent.
[0046] In some embodiments, the standard demand forecasting result can be a uniformly formatted forecasting result output by the target demand forecasting model for the target commodity object. Specifically, the standard demand forecasting result can be a standard demand forecasting sequence covering a preset maximum forecasting length. For example, the standard demand forecasting result can be a forecasting vector covering a forecasting length of 180 days, used to accommodate short-cycle replenishment demand, medium-cycle planning demand, or long-cycle supply chain demand. Using the standard demand forecasting result as an intermediate output allows the target demand forecasting model to first form a unified forecasting baseline result, and then further limit the final output range with forecasting task information, thereby avoiding the need to build multiple independent models for different forecasting horizons.
[0047] In some embodiments, determining the demand forecast result corresponding to the target product object from the standard demand forecast results based on the forecast task information can mean selecting, truncating, or transforming the standard demand forecast results according to the current task requirements. Specifically, when the forecast task information includes the target forecast lead time, a target forecast sequence matching the target forecast lead time can be truncated from the standard demand forecast sequence corresponding to the standard demand forecast results as the demand forecast result corresponding to the target product object. For example, when the forecast task information corresponds to replenishment demand in the next 45 days, the target forecast sequence for the first 45 days can be truncated from the standard demand forecast results covering a longer forecast length; when the forecast task information corresponds to planning demand in the next 90 days, the target forecast sequence for the first 90 days can be truncated from the same standard demand forecast results. By decoupling the standard demand forecast results from the forecast task information, the same target demand forecast model can output demand forecast results of different lengths for different business scenarios, thereby improving model reusability and task adaptability.
[0048] In some embodiments, the process involves acquiring the predictive feature information and predictive task information of the target product object, acquiring the target demand prediction model, determining at least one associated product object corresponding to the target product object based on the association relationship between the target product object and at least one other product object, performing demand prediction processing through the target demand prediction model based on the predictive feature information of the target product object, the associated data of the at least one associated product object corresponding to the target product object, and the predictive task information, and determining the demand prediction result from the standard demand prediction result based on the predictive task information. This enables a unified prediction process for multi-business entity scenarios. This retail demand prediction method, on the one hand, can introduce associated product information based on the target product object's own data, improving the ability of demand prediction processing to utilize cross-product linkage features; on the other hand, through the cooperation of the base layer and the enterprise perception adaptation layer, and combined with the predictive task information, different prediction tasks can be adapted, allowing the same target demand prediction model to accommodate the needs of different prediction cycles. This can, to some extent, improve the insufficient applicability of existing prediction technologies across different entities and tasks, and help improve the flexibility, generalization ability, and business adaptability of demand prediction processing.
[0049] In some embodiments, based on the predicted feature information of the target product object, the associated data of at least one related product object, and the predicted task information, demand prediction processing is performed through a target demand prediction model to obtain a standard demand prediction result corresponding to the target product object. This may include: inputting the predicted feature information of the target product object and the associated data of at least one related product object into the base layer; performing demand prediction processing on the predicted feature information of the target product object and the associated data of at least one related product object through the base layer based on the cross-sequence modeling capability pre-learned from product data of multiple business entities; performing enterprise-specific adaptation on the base layer through an enterprise-aware adaptation layer; and performing task-specific adaptation on the standard demand prediction result in conjunction with the predicted task information.
[0050] In some embodiments, the base layer can be a model layer for extracting common temporal patterns, and the enterprise-aware adaptation layer can be a model layer for introducing enterprise-specific information into the base layer. Specifically, the base layer can be used to learn shared demand change patterns among different business entities, different product objects, or different business scenarios, such as periodic change patterns, trend change patterns, or cross-product linkage patterns; the enterprise-aware adaptation layer can be used to inject enterprise-related semantic identity information (soft prompt), statistical distribution information (stats), or temporal characteristic information (private LoRA weights) into the base layer, so that the target demand prediction model can share basic prediction capabilities while taking into account data and business differences between different enterprises. By dividing the target demand prediction model into a base layer and an enterprise-aware adaptation layer, the model structure can simultaneously possess general modeling capabilities and difference adaptation capabilities.
[0051] In some specific implementations, the training process of the target demand forecasting model can adopt a phased training approach. Specifically, in the first phase, the global mask parameter `mask_threshold` can be set to -30 to make the target demand forecasting model prioritize historical demand patterns over the past 30 days. In the second phase, the mask constraint can be removed to `mask_threshold` = -365, allowing the target demand forecasting model to further integrate historical information from across the year. Furthermore, the learning rate in the first phase can be 1e-3, and the learning rate in the second phase can decay to 1e-4. This approach can balance the modeling of both short-term fluctuations and long-term seasonal characteristics.
[0052] In some embodiments, the base layer can be the backbone processing layer in the target demand forecasting model, used to receive the predicted feature information of the target product object and the association data of at least one associated product object corresponding to the target product object, and to jointly model the relevant information. Specifically, the base layer can adopt a temporal Transformer structure based on the Patch mechanism, or other network structures capable of processing time series and multi-source feature information. For example, the base layer can divide the historical demand data of the target product object into multiple time series segments and encode them, or it can combine calendar feature information, static attribute information, or neighbor index information for unified processing. The base layer, in conjunction with the demand forecasting processing steps described in the above embodiments, can serve as the main computational entity for forming standard demand forecasting results.
[0053] In some embodiments, cross-sequence association modeling refers to the base layer performing joint analysis and prediction processing on the sequence information corresponding to multiple product objects based on cross-sequence modeling capabilities pre-learned from product data of multiple business entities. Specifically, cross-sequence association modeling can focus not only on the historical demand changes of the target product object itself, but also on the historical demand changes, relative positional relationships, or neighbor relationships of at least one associated product object corresponding to the target product object. For example, when the target product object is a beverage of a certain specification, the at least one associated product object corresponding to the target product object may include substitute products of the same category, jointly purchased products, or products coexisting on the same site. The base layer can combine the association data of the target product object and the at least one associated product object corresponding to the target product object to model the coordinated changes, substitution changes, or linkage changes between multiple product objects. In this way, it can avoid treating the target product object as an isolated sequence for prediction, thereby improving the ability of the target demand prediction model to utilize cross-product relationships.
[0054] In some embodiments, the base layer, based on cross-sequence modeling capabilities pre-learned from product data of multiple business entities, performs demand forecasting processing on the predictive feature information of the target product object and the association data of at least one associated product object. This can be understood as the base layer using the predictive feature information of the target product object and the association data of at least one associated product object as input to generate a predictive representation that better reflects actual business relationships. Specifically, the base layer can highlight the strong correlation between the target product object and at least one associated product object during encoding, and can prioritize the use of sequence information of at least one associated product object during attention calculation. Since this cross-sequence modeling capability is pre-learned from product data of multiple business entities, the base layer can not only perform demand forecasting processing for the current target product object, but also reuse learned common temporal patterns and cross-product association patterns in multi-business entity scenarios. In this way, the base layer can retain the temporal information of the target product object itself while introducing supplementary information from at least one associated product object, thereby improving the accuracy and stability of standard demand forecasting results.
[0055] In some specific implementations, the effective receptive field of the target demand prediction model can be controlled through dynamic masking. Specifically, attention computation can be expressed as: Here, M can represent a dynamically adjusted mask matrix. Furthermore, to ensure accuracy across different service nodes within a unified output view, a weighted loss function can be constructed: .
[0056] In some implementations, the weight vector It may include a time decay term. and key enhancement items For key nodes such as t∈{30,60,90,180} (end of month / quarter), additional weights can be applied. ,For example =5.0. This allows the target demand forecasting model to achieve higher accuracy at key business nodes.
[0057] In some specific implementations, the part corresponding to cross-sequence association modeling can also be called the third stage: Sparse CSA Module Implementation. Specifically, this can include introducing cross-sequence attention computation by focusing only on the local relationship between the target product object and at least one associated product object, instead of performing full attention computation on all product objects. This reduces memory usage and computational complexity while preserving the ability to interact with cross-product information.
[0058] In some specific implementations, a subgraph sampling method based on the central node can be used to organize the target product object and at least one associated product object corresponding to the target product object. Specifically, an anchor product object can be randomly selected, and the Top-K neighbors corresponding to the anchor product object can be retrieved from the offline index table. The anchor product object and the Top-K neighbors are then combined into a micro-batch, and multiple micro-batches are further concatenated to form a training batch. Furthermore, the target demand prediction model can receive not only the time-series data of the current target product object, but also the neighbor index information. For example, the input tensor can be represented as X: [Batch Size, Seq Len, Feature Dim], and the auxiliary input can be represented as Neighbor Indices: [Batch Size, K]. In some specific implementations, only the attention between neighbors can be calculated, thereby reducing the memory usage from O(B²) to O(B·K). In this way, the effectiveness of cross-sequence association modeling can be improved while controlling computational overhead.
[0059] In some specific implementations, the online organization process surrounding the target product object and at least one associated product object can also be referred to as the second stage: Online Graph Injection based on subgraph sampling. Specifically, this can include: during the training or inference phase, dynamically extracting local subgraphs from the offline-built association structure based on the current target product object, and injecting the associated product objects from the local subgraphs into the current batch of data. This allows offline association results to be flexibly utilized in online prediction processing and helps improve the efficiency of utilizing cross-product association information.
[0060] In some embodiments, the enterprise-aware adaptation layer can be a model layer used to characterize individual enterprise differences and adjust the processing of the base layer. Specifically, the enterprise-aware adaptation layer can generate adaptation information suitable for injection into the base layer based on enterprise identification information, enterprise profile information, enterprise statistical distribution information, or enterprise temporal characteristic information. For example, the enterprise-aware adaptation layer can map different enterprises to different cue vectors, parameter biases, distribution correction parameters, or lightweight adapter parameters, so that the same base layer exhibits different feature responses when facing different enterprises. The relationship between the enterprise-aware adaptation layer and the base layer can be an insertion relationship, a calling relationship, or a parameter injection relationship. Of course, the enterprise-aware adaptation layer can also adopt other structural forms that can reflect enterprise differences, as long as it can achieve enterprise-level adaptation of the base layer.
[0061] In some specific implementations, the enterprise-aware adaptation layer can perform multi-dimensional parsing of enterprise identifiers through a set of lightweight, pluggable adapters. Specifically, the enterprise-aware adaptation layer can parse enterprise identifiers into semantic identity information, statistical distribution information, and temporal characteristic information. Furthermore, semantic identity information can be represented using soft cue vectors, statistical distribution information can be represented using statistical parameters, and temporal characteristic information can be represented using lightweight parameter modules. This allows the target demand prediction model to achieve more granular adaptation to different enterprises while sharing the base capabilities.
[0062] In some embodiments, enterprise-specific adaptation refers to adjusting the processing of the base layer based on differences between different enterprises in terms of data scale, data distribution, operational attributes, or temporal patterns. Specifically, enterprise-specific adaptation does not change the overall process of retail demand forecasting methods, but rather, on the basis of a unified process, enables the input data corresponding to different enterprises to adopt a representation and processing method more suitable for the current enterprise after entering the base layer. For example, large-scale enterprises and small-scale enterprises may differ in sales volume, promotional fluctuations, and cyclical patterns. The enterprise-aware adaptation layer can correct some parameter responses in the base layer to address these differences. Similarly, different enterprises may differ in product category structure, supply chain cycles, or business models. The enterprise-aware adaptation layer can enable the target demand forecasting model to generate more targeted forecast outputs for different enterprises while maintaining its ability to learn common patterns. Through enterprise-specific adaptation, the applicability limitations that easily arise when relying solely on a unified model to process data from multiple business entities can be alleviated to some extent.
[0063] In some embodiments, adapting standard demand forecasting results to task differences by incorporating forecasting task information can refer to adapting the standard demand forecasting results to the task based on the target forecast lead time, business cycle parameters, or output requirements of the current forecasting task. Specifically, forecasting task information can participate in the selection, truncation, or constraint of standard demand forecasting results, enabling the same target demand forecasting model to generate corresponding demand forecasting results for different forecasting cycles, different task objectives, or different business scenarios. For example, when the forecasting task information corresponds to a short-cycle replenishment task, a shorter forecasting length can be determined based on the standard demand forecasting results; when the forecasting task information corresponds to a medium- to long-term planning task, a longer forecasting length can be determined based on the same standard demand forecasting results. In this way, the target demand forecasting model can take into account the differences between different forecasting tasks without changing the overall architecture of the base layer and the enterprise perception adaptation layer.
[0064] In some embodiments, the base layer and the enterprise-aware adaptation layer can form a cooperative two-layer processing architecture. The base layer is primarily responsible for extracting shared temporal patterns and cross-product association patterns between the target product object and at least one associated product object. The enterprise-aware adaptation layer is primarily responsible for incorporating enterprise-specific information into the base layer's processing. Simultaneously, the target demand prediction model can also incorporate prediction task information to adapt the standard demand prediction results to task differences. Specifically, the base layer addresses cross-product modeling, the enterprise-aware adaptation layer addresses cross-enterprise adaptation, and task-specific adaptation based on prediction task information addresses output adaptation between different prediction tasks. All three work together to generate the standard demand prediction results. For example, within the same target demand prediction model, the base layer can be shared across different enterprises, while the enterprise-aware adaptation layer can be adjusted accordingly for different enterprises and can also output demand prediction results matching the current task based on different prediction task information. This avoids building a complete model for each enterprise and prevents prediction bias caused by completely ignoring enterprise differences, thereby improving the reusability and scalability of the target demand prediction model in multi-business scenarios.
[0065] By inputting the predicted feature information of the target product object and the associated data of at least one related product object into the base layer, and leveraging the cross-sequence modeling capabilities pre-learned from product data of multiple business entities, the base layer performs demand forecasting processing on the predicted feature information of the target product object and the associated data of at least one related product object. Furthermore, an enterprise-aware adaptation layer adapts the base layer to enterprise differences, and the standard demand forecasting results are adapted to task differences by incorporating forecasting task information. This approach enhances the target demand forecasting model's ability to depict the linkage between the target product object and related product objects. It also allows the target demand forecasting model to consider data and business differences between different enterprises, and further, task differences between different forecasting tasks. In this way, the accuracy, generalization ability, and scenario adaptability of both standard and general demand forecasting results can be improved to a certain extent.
[0066] In some embodiments, determining at least one associated product object corresponding to the target product object based on the association relationship between the target product object and at least one other product object may include: determining the association strength between the target product object and other product objects based on at least one of spatial constraints, semantic similarity, residual correlation after deseasoning, and co-occurrence behavior information; and determining at least one associated product object corresponding to the target product object based on the association strength.
[0067] In some embodiments, spatial constraints can be information characterizing whether a target product object and at least one other product object have a basis for coexistence in the business space. Specifically, spatial constraints can include whether the target product object and at least one other product object belong to the same tenant, the same sales platform, or the same site. For example, two product objects that coexist within the same tenant, the same sales platform, or the same site may have a high probability of spatial coexistence; while two product objects that are not in the same business space may have relatively weak spatial constraints. Spatial constraints are mainly used to constrain the range of candidate objects from the perspective of the business physical scenario, so as to avoid prematurely including product objects that lack a real basis for coexistence in the related product screening process.
[0068] In some embodiments, semantic similarity can be information used to characterize the degree of proximity between a target product object and at least one other product object in terms of static business attributes. Specifically, semantic similarity can be calculated based on product representations generated from category information, brand information, price range information, or product attribute information. For example, two product objects from different brands but belonging to the same carbonated beverage category, with similar price ranges and specifications, can have high semantic similarity. Semantic similarity helps identify potential substitute products or competing products, thus ensuring that at least one associated product object corresponding to the target product object is not limited to product objects that change synchronously over time, but can also include product objects that have a substitution relationship or a similar relationship in terms of business semantics.
[0069] In some embodiments, the residual correlation after deseasoning can be used to characterize the degree of dynamic linkage between the target product and at least one other product after removing the influence of periodicity. Specifically, the weekly seasonality, annual seasonality, or other periodicity can be removed from the historical demand sequences corresponding to the target product and at least one other product to obtain a denoised residual sequence, and then the degree of correlation between the two can be determined based on the residual sequence. For example, during holidays, promotional periods, or seasonal fluctuations, the original demand data of multiple product objects may rise simultaneously, but this synchronous change may not truly reflect a stable linkage between the target product and at least one other product object; after removing the influence of periodicity, if the residual sequences of the target product and at least one other product object still show a relationship of rising and falling together or fluctuating in opposite directions, it can better reflect the true dynamic correlation. By introducing the residual correlation after deseasoning, the impact of spurious correlation on the screening results of related products can be reduced to some extent.
[0070] In some embodiments, co-occurrence behavior information can be information characterizing the co-occurrence of a target product object and at least one other product object in a transaction. Specifically, co-occurrence behavior information can be calculated based on transaction logs, order records, or shopping basket data. For example, if a target product object and at least one other product object frequently appear together in the same order or the same shopping basket, they can be considered to have strong co-occurrence behavior characteristics. Co-occurrence behavior information helps identify complementary or jointly consumed products, thus ensuring that the at least one associated product object corresponding to the target product object includes not only substitute products but also products with matching relationships, complementary products, or products with joint sales relationships. This expands the source range of the at least one associated product object corresponding to the target product object, enabling subsequent demand forecasting processing to utilize richer product linkage information.
[0071] In some embodiments, association strength can be the result of quantifying the degree of association between a target product and at least one other product. Specifically, association strength can be determined based on at least one of spatial constraints, semantic similarity, deseasoned residual correlation, and co-occurrence behavior information, or a combination of several of these factors. For example, potential substitute products can be screened based solely on semantic similarity, or spatial constraints, semantic similarity, deseasoned residual correlation, and co-occurrence behavior information can be combined to comprehensively score the relationship between the target product and at least one other product. Association strength essentially acts as an intermediate quantitative bridge, unifying the relatively dispersed multidimensional association factors between the target product and at least one other product into the same evaluation framework, and providing a ranking and comparable basis for subsequent screening of at least one associated product corresponding to the target product.
[0072] In some specific implementations, association strength can be quantified using a scoring function. Specifically, the association strength scoring function can be expressed as: .in, It can represent spatial constraint terms. It can represent semantic similarity terms. It can represent the residual correlation term after deseasoning. This can represent the shopping basket enhancement factor. By uniformly quantifying the correlation factors across multiple dimensions, the degree of correlation between the target product and at least one other product can be made more comparable and rankingable.
[0073] In some embodiments, determining at least one associated product object corresponding to the target product object based on association strength may include sorting, filtering, or selecting multiple candidate product objects. Specifically, the association strength between multiple other product objects and the target product object can be determined first, and then they can be sorted from high to low according to association strength. Product objects with higher association strength can be selected as at least one associated product object corresponding to the target product object. For example, a candidate list sorted by association strength can be generated around the target product object, and the top few product objects can be selected from the candidate list as at least one associated product object corresponding to the target product object for subsequent demand forecasting processing. This ensures that the at least one associated product object corresponding to the target product object entering the demand forecasting processing stage is more concentrated on product objects with truly strong associations, strong linkages, or strong business relevance.
[0074] In some embodiments, spatial constraints, semantic similarity, deseasoned residual correlation, and co-occurrence behavior information can form a complementary relationship. Specifically, spatial constraints are mainly used to ensure the rationality of the business space, semantic similarity is mainly used to reflect the proximity of static attributes, deseasoned residual correlation is mainly used to reflect the linkage of dynamic demand changes, and co-occurrence behavior information is mainly used to reflect the common occurrence characteristics of transaction behavior. Using at least one of these factors to determine the association strength allows the screening of at least one associated product object corresponding to the target product object to focus on both static business attributes and dynamic temporal changes and actual transaction behavior, thereby improving the rationality and applicability of the determination results of at least one associated product object corresponding to the target product object.
[0075] By further refining the association between a target product object and at least one other product object—determining the association strength based on at least one of spatial constraints, semantic similarity, residual correlation after deseasoning, and co-occurrence behavior information—and then determining at least one associated product object corresponding to the target product object based on the association strength, the process of determining at least one associated product object corresponding to the target product object becomes more targeted and interpretable. This approach avoids, to some extent, the randomness inherent in selecting product objects based solely on a single dimension or empirical rules. Furthermore, it helps provide higher-quality candidate product objects for subsequent cross-sequence association modeling, thereby enhancing the ability of retail demand forecasting methods to utilize product linkage relationships and improving the accuracy and stability of demand forecasting results.
[0076] In some embodiments, determining at least one associated product object corresponding to the target product object based on the association strength may include: establishing a neighbor index table corresponding to the target product object based on the association strength; selecting at least one product object from the neighbor index table whose association strength meets the condition as at least one associated product object corresponding to the target product object.
[0077] In some embodiments, the neighbor index table corresponding to the target product object can be an information table used to store multiple product objects associated with the target product object and their corresponding relationships. Specifically, the neighbor index table corresponding to the target product object may include at least one of the following: identification information, sorting information, location index information, or association strength information of multiple candidate product objects. For example, for each target product object, a corresponding candidate list can be pre-generated, recording the association strength between multiple other product objects and the target product object and their order of arrangement; alternatively, the identification information of multiple other product objects can be stored in descending order of association strength to form a neighbor index table corresponding to the target product object that can be quickly retrieved. The neighbor index table corresponding to the target product object mainly serves to structure and organize candidate product objects, so as to transform the association strength results obtained in the previous stage into data assets that can be directly accessed later.
[0078] In some specific implementations, the neighbor index table corresponding to the target product object can also be organized in the form of a sparse adjacency list. The sparse adjacency list only records product objects with a high correlation to the target product object and their index relationships, without having to record all relationships between all product objects. This reduces the storage overhead of association information and facilitates the rapid location of high-value associated product objects during the training or inference phases.
[0079] In some embodiments, establishing a neighbor index table corresponding to the target product object based on the association strength can represent organizing, sorting, and recording multiple other product objects around the target product object according to the degree of association between them. Specifically, the association strength between each of the multiple other product objects and the target product object can be determined first. Then, based on the order of association strength, the multiple other product objects can be sorted, and the sorting results can be written into the neighbor index table corresponding to the target product object. For example, product objects with higher association strength can be ranked at the beginning of the neighbor index table corresponding to the target product object, and product objects with lower association strength can be ranked at the end. In this way, the neighbor index table corresponding to the target product object can not only reflect whether there is an association between the target product object and multiple other product objects, but also reflect the differences in the degree of association between different product objects, thereby improving the targeting of the subsequent selection process.
[0080] In some specific implementations, each target product object can be sorted according to its association strength, and the top K most strongly associated product objects can be written into the neighbor index table corresponding to the target product object. Specifically, K can be 16. Of course, the value of K can also be adjusted according to the model input size or computing resources. Furthermore, the neighbor index table corresponding to the target product object can be stored in a feature library or a high-performance key-value database for fast retrieval during the training or inference phases. This makes the process of calling associated product objects more efficient.
[0081] In some embodiments, at least one product object satisfying the association strength condition can refer to a product object in the neighbor index table corresponding to the target product object whose association strength meets a preset filtering requirement. Specifically, satisfying the association strength condition can include an association strength greater than or equal to a preset threshold, or an association strength ranking among the top few, or an association strength satisfying both the threshold condition and the ranking condition. For example, the top K product objects with the highest association strength can be selected from the neighbor index table corresponding to the target product object as at least one associated product object corresponding to the target product object; alternatively, product objects with association strength higher than a preset score can be filtered from the neighbor index table corresponding to the target product object as at least one associated product object corresponding to the target product object. Setting the association strength condition allows for flexible control over the quantity and quality of at least one associated product object corresponding to the target product object based on accuracy requirements, computing resource requirements, or model input scale requirements in different business scenarios.
[0082] In some embodiments, selecting at least one product object from the neighbor index table corresponding to the target product object that meets the association strength criteria, as at least one associated product object corresponding to the target product object, can be a process of quantitatively screening the candidates in the neighbor index table corresponding to the target product object. Specifically, this selection process does not use all candidate product objects indiscriminately, but prioritizes retaining product objects that have a strong association with the target product object, a close business connection, or a high probability of linkage. For example, when the target product object is a beverage of a certain specification, the neighbor index table corresponding to the target product object may also include similar alternative beverages, snacks sold together, and frequently co-occurring products on the same site. In this case, product objects that meet the association strength criteria can be further selected from the neighbor index table corresponding to the target product object for subsequent demand forecasting processing. In this way, while ensuring the sufficiency of relevant information about the target product object, too many weakly associated product objects can be avoided in the model processing.
[0083] In some embodiments, a "candidate set - target set" correspondence can be formed between the neighbor index table corresponding to the target product object and at least one associated product object corresponding to the target product object. Specifically, the neighbor index table corresponding to the target product object can serve as a storage and organization carrier for candidate product objects, while the at least one associated product object corresponding to the target product object can be the final result obtained by filtering from the neighbor index table corresponding to the target product object. That is to say, the neighbor index table corresponding to the target product object focuses on storing a wider range of associated candidate information, while the at least one associated product object corresponding to the target product object focuses on reflecting the product objects that are actually used for demand forecasting after conditional filtering. By distinguishing between the candidate layer and the usage layer, the management of the association information between the target product object and multiple other product objects can be made clearer, and it is also beneficial to flexibly adjust the candidate range and usage range at different stages.
[0084] In some embodiments, establishing a neighbor index table corresponding to the target product object can also improve the data retrieval efficiency during the training or inference phases. Specifically, if the association strength between the target product object and multiple other product objects is determined and then temporarily calculated and filtered during each demand forecasting process, it may increase computational overhead. However, by pre-establishing a neighbor index table corresponding to the target product object, candidate product objects associated with the target product object can be quickly located in subsequent demand forecasting processes, and at least one product object whose association strength meets the condition can be further selected. For example, when constructing a local association subgraph around the target product object or organizing local batch inputs, the corresponding candidate objects can be directly extracted based on the neighbor index table corresponding to the target product object. This helps improve the retrieval efficiency and retrieval efficiency of at least one associated product object corresponding to the target product object.
[0085] By establishing a neighbor index table corresponding to the target product object based on the association strength, and selecting at least one product object from this table that meets the association strength criteria as the at least one associated product object corresponding to the target product object, the process of determining associated product objects can be further structured, hierarchical, and reusable. On the one hand, the neighbor index table can centrally manage multiple candidate product objects and their association degrees, thereby improving the efficiency of organizing association information. On the other hand, by selecting at least one product object from the neighbor index table that meets the association strength criteria, the interference of weakly associated product objects on subsequent demand forecasting can be reduced to some extent, thus improving the quality of the at least one associated product object corresponding to the target product object and further enhancing the accuracy, stability, and processing efficiency of demand forecasting results.
[0086] In some embodiments, the standard demand forecasting result is a standard demand forecasting sequence covering a preset maximum forecasting length. Adapting the standard demand forecasting result to task differences, in conjunction with forecasting task information, may include: extracting a target forecasting sequence of a corresponding length from the standard demand forecasting sequence based on the forecasting task information, as the demand forecasting result.
[0087] In some embodiments, the preset maximum forecast length can be the maximum output forecast range pre-set for the target demand forecasting model. Specifically, the preset maximum forecast length can be set according to the longest forecast cycle requirement in the business scenario. For example, in replenishment, procurement, inventory planning, or supply chain collaboration scenarios, different businesses may focus on forecast results for shorter, medium, or longer cycles, respectively. The preset maximum forecast length can correspond to the longer forecast range in these business scenarios. The setting of the preset maximum forecast length is mainly used to provide a unified output boundary for the target demand forecasting model, so that when the target demand forecasting model performs demand forecasting processing, it first outputs forecast content covering a relatively complete time range, rather than changing the output structure for different tasks.
[0088] In some embodiments, a standard demand forecast sequence can be a serialized forecast output covering a preset maximum forecast length. Specifically, the standard demand forecast sequence can arrange multiple forecast positions in chronological order, each forecast position can correspond to a demand forecast value for one future time unit, or it can correspond to a demand forecast value aggregated from multiple future time units. For example, the standard demand forecast sequence can include forecast values for several future days, or forecast values for several future weeks. The relationship between the standard demand forecast sequence and the aforementioned standard demand forecast result can be a relationship between result form and result content, wherein the standard demand forecast result focuses on representing intermediate output in a unified format, while the standard demand forecast sequence focuses on representing the serialized expression of this intermediate output in the time dimension. By using the standard demand forecast sequence as an intermediate carrier, a foundation can be provided for subsequent flexible truncation based on forecast task information.
[0089] In some embodiments, determining the demand forecast result corresponding to the target product object from the standard demand forecast results based on the forecast task information may include determining the target output range based on the forecast task information and extracting a partial sequence corresponding to the target output range from the standard demand forecast sequence. Specifically, the forecast task information can characterize the requirements of different business tasks on the forecast cycle, while the standard demand forecast sequence can provide a unified forecast basis covering a longer time range. Therefore, the demand forecast result may not be the result obtained by re-executing an independent forecast, but rather the result further determined from the existing standard demand forecast sequence. This allows for a hierarchical distinction between the process of determining the demand forecast result and the process of generating the standard demand forecast result, maintaining the uniformity of the output form of the target demand forecast model on the one hand, and improving the adaptability flexibility between different tasks on the other.
[0090] In some embodiments, the target prediction sequence may be a partial sequence selected from the standard demand prediction sequence that matches the current prediction task. Specifically, the target prediction sequence may cover the time length corresponding to the prediction task information, or it may cover the time interval corresponding to the prediction task information. For example, when the prediction task information corresponds to a demand prediction task for the next thirty days, the sequence portion corresponding to the first thirty prediction positions can be selected from the standard demand prediction sequence as the target prediction sequence; when the prediction task information corresponds to a demand prediction task for the next ninety days, the sequence portion corresponding to the first ninety prediction positions can be selected from the same standard demand prediction sequence as the target prediction sequence. A "unified output - on-demand access" relationship can be formed between the target prediction sequence and the standard demand prediction sequence, that is, the standard demand prediction sequence is responsible for providing the complete prediction basis, and the target prediction sequence is responsible for carrying the prediction content that the current task actually needs to output.
[0091] In some embodiments, truncating the target prediction sequence to a corresponding length can refer to truncating, extracting, or selecting a standard demand prediction sequence according to the length defined by the prediction task information. Specifically, truncating can be selecting consecutive sequence segments of the corresponding length starting from the beginning of the standard demand prediction sequence, or in some extended embodiments, other truncating methods can be determined based on the prediction task information. Of course, in more common demand prediction scenarios, the target prediction sequence is usually a consecutive segment at the beginning of the standard demand prediction sequence, because prediction tasks typically focus on a continuous time range extending into the future from the current prediction point in time. By truncating the target prediction sequence to a corresponding length, the same standard demand prediction sequence can generate demand prediction results of different lengths under different tasks, thereby improving the reusability of the target demand prediction model.
[0092] In some embodiments, the standard demand forecast sequence and the target forecast sequence can also form a coordinated relationship between unified output and differentiated application. Specifically, the target demand forecast model can output a unified standard demand forecast sequence for different business entities and different business tasks, while various business tasks can obtain their respective target forecast sequences from the standard demand forecast sequence based on the forecast task information. For example, in short-cycle business scenarios, a shorter target forecast sequence can be extracted from the standard demand forecast sequence for short-cycle replenishment or inventory adjustment; in long-cycle business scenarios, a longer target forecast sequence can be extracted from the same standard demand forecast sequence for medium- to long-term procurement planning or supply chain planning. In this way, the demand forecast results can be adapted to different business tasks without changing the unified output structure of the target demand forecast model.
[0093] By limiting the standard demand forecasting results to a standard demand forecasting sequence covering a preset maximum forecasting length, and further extracting a target forecasting sequence of corresponding length from the standard demand forecasting sequence based on forecasting task information, the target demand forecasting model can first generate a unified standard forecasting output, and then generate corresponding demand forecasting results for different tasks. This avoids building, training, or maintaining multiple independent models for different forecasting periods, thus reducing model management complexity and maintenance costs. Furthermore, it allows for a more flexible correspondence between demand forecasting results and business tasks, thereby improving the adaptability and application efficiency of retail demand forecasting methods to demands across different forecasting periods.
[0094] In some embodiments, the forecasting task information may include a target forecasting lead time. The target forecasting lead time can be information used to characterize the future time range corresponding to the current forecasting task. Specifically, the target forecasting lead time may correspond to a number of future days, a number of future weeks, or a number of other future time units. For example, the target forecasting lead time may be 30 days, 45 days, 90 days, or 180 days.
[0095] In some embodiments, the target forecast lead time can be used to determine the actual length of the target forecast sequence taken from the standard demand forecast sequence. Specifically, when the target forecast lead time is short, a shorter target forecast sequence can be truncated from the standard demand forecast sequence; when the target forecast lead time is long, a longer target forecast sequence can be truncated from the standard demand forecast sequence. In this way, the same standard demand forecast sequence can be adapted to different business tasks.
[0096] In some specific implementations, the target demand prediction model can always output coverage L out =180-day standard demand forecast sequence. Downstream applications can slice the standard demand forecast sequence on demand according to the actual business demand length D. Specifically, the slicing method can be represented as: Output = Vector{180}[0:D]. For example, when the target forecast lead time corresponding to the replenishment task is 45 days, the first 45 bits of the standard demand forecast sequence can be directly extracted as the target forecast sequence. In this way, the same standard demand forecast sequence can be adapted to tasks with different forecast periods.
[0097] By limiting the forecasting task information to include the target forecast lead time, the process of determining the demand forecasting results can be made clearer, and it is beneficial to improve the adaptability of retail demand forecasting methods to demand in different forecasting cycles.
[0098] In some embodiments, before performing demand forecasting processing through the target demand forecasting model based on the predicted feature information of the target product object, the association data of the at least one associated product object, and the prediction task information, the method may further include: performing length alignment processing on the historical demand data of the target product object and generating corresponding mask information; and performing relative time encoding on the input sequence and / or output sequence.
[0099] In some specific implementations, processes such as length alignment, mask information generation, relative time encoding, normalization, and denormalization can collectively constitute the modified data pipeline. Specifically, the data pipeline can be used to transform raw historical demand data, associated data of related product objects, and task-related information into a unified input format suitable for processing by the target demand prediction model. By modifying the data pipeline, the data input process under different historical lengths, data volumes, and prediction tasks can be made more consistent.
[0100] In some embodiments, length alignment can be a process of adjusting historical demand data of different lengths to a uniform input length. Specifically, when the length of historical demand data for a target product is less than a preset length, padding can be added to the beginning of the historical demand data; when the length of historical demand data for a target product exceeds the preset length, a target time window that meets the requirements can be selected as the input data. For example, historical demand data within the most recent preset time period can be used as the input basis, and the historical demand data corresponding to different target product objects can be kept consistent in length. This facilitates the target demand prediction model in processing different target product objects using a uniform input structure.
[0101] In some specific implementations, the standard input length of the target demand prediction model can be set to L. in =365 days. For example, if the historical demand data for a target product is only 60 days, this 60 days of data can be aligned to the end of the timeline, and 365-60=305 placeholders can be added to the left to create a uniform input length. This ensures that the historical demand data for different target product products maintains a consistent input length.
[0102] In some embodiments, the masking information can be used to characterize which positions correspond to valid historical demand data and which positions correspond to padding content after length alignment. Specifically, after padding the historical demand data of the target product object, the masking information can be used to identify the real data portion and the padding portion. For example, the masking information can enable the target demand forecasting model to focus on the real historical demand data when processing input data, while reducing or avoiding interference from padding content in the demand forecasting process. By generating masking information, the usability of input data can be further improved based on length alignment processing.
[0103] In some embodiments, relative time encoding can be an encoding method used to characterize the distance relationship between each time position relative to the prediction trigger time. Specifically, relative time encoding may not directly use absolute dates, but rather use the relative position with respect to the current prediction time to characterize the time order in the input sequence and / or output sequence. For example, different positions in the input sequence can represent different time positions before the prediction trigger time, and different positions in the output sequence can represent different time positions after the prediction trigger time. In this way, the target demand prediction model can pay more attention to the relative relationship between time positions, thereby improving the unified processing capability across different prediction tasks.
[0104] In some specific implementations, the relative time encoding can be set according to the relative distance from the predicted trigger point T=0. Specifically, the input sequence encoding can be represented as: X time_idx =[-L in The output sequence encoding can be represented as: Y time_idx =[1,2,…,L out ], where L out =180. With this encoding method, regardless of whether the historical demand data has been length aligned, the rightmost valid historical point can be anchored to -1, and the semantics of the Nth predicted position in the future can also remain consistent, which is conducive to improving the unified processing capability between different prediction tasks.
[0105] In some embodiments, relative time encoding of the input and / or output sequences can be combined with length alignment processing. Specifically, length alignment processing is mainly used to unify data length, while relative time encoding is mainly used to unify temporal semantics. The former can solve the problem of inconsistent historical demand data lengths for different target commodity objects, while the latter can ensure consistent semantic expression of future time positions under different prediction tasks. By combining the two, the target demand prediction model can still perform demand prediction processing based on a relatively consistent data format and time representation when faced with different historical lengths and different task requirements.
[0106] By performing length alignment processing on the historical demand data of the target commodity object and generating corresponding mask information before demand forecasting, and by performing relative time encoding on the input sequence and / or output sequence, the consistency of input data and the consistency of time expression can be improved to a certain extent. This is beneficial to improving the adaptability of the target demand forecasting model to different target commodity objects and different forecasting tasks, and further improving the stability and accuracy of demand forecasting results.
[0107] In some embodiments, before performing demand forecasting processing through a target demand forecasting model based on the predictive feature information of the target commodity object, the association data of at least one associated commodity object, and the prediction task information, the method may further include: normalizing the historical demand data of the target commodity object based on the statistics of the current time window to obtain input data representing relative fluctuations.
[0108] Among them, determining the demand forecast result corresponding to the target commodity object from the standard demand forecast results based on the forecast task information may include: performing inverse normalization processing on the target forecast sequence based on statistics to obtain the demand forecast result.
[0109] In some embodiments, the statistics for the current time window can be statistical parameters determined based on historical demand data of the target product within the current input time range. Specifically, the statistics for the current time window may include the mean, standard deviation, or other statistical information that reflects the data distribution characteristics within the current time window. For example, the mean and standard deviation can be determined based on historical sales data of the target product within the current time window to characterize the central level and volatility of the demand data within the current time window. The statistics for the current time window are mainly used to characterize the data distribution within the current input time range, thereby providing a unified basis for normalization and denormalization processing.
[0110] In some embodiments, normalization can be a scaling process applied to historical demand data of a target product. Specifically, normalization can be performed by shifting and scaling historical demand data of the target product based on statistics within the current time window, transforming data from different target products or different time windows into a form that is easier to model uniformly. For example, historical demand data can be standardized based on the mean and standard deviation of the current time window. This allows historical demand data to reflect more of the relative trend of demand changes rather than directly reflecting absolute differences in magnitude before entering the target demand forecasting model.
[0111] In some specific implementations, reversible instance normalization can be used for normalization. Specifically, before inputting the target demand forecasting model, the mean of the current time window can be calculated. and standard deviation The input data is then transformed according to the following formula: This allows the target demand forecasting model to focus more on the relative fluctuation trend of the target product, rather than directly relying on the absolute magnitude of historical demand data for the target product.
[0112] In some embodiments, the input data representing relative fluctuations can be normalized input data. Specifically, the input data representing relative fluctuations can highlight the changes in the target commodity relative to its own statistical level within the current time window. For example, under different enterprise conditions, different commodity conditions, or different business scales, the absolute values of historical demand data for the target commodity may vary significantly. However, the input data representing relative fluctuations formed after normalization can more comprehensively reflect the rise, fall, or fluctuation range of demand. This helps the target demand forecasting model learn the changing patterns of the target commodity without overly relying on the absolute value level of the original historical demand data.
[0113] In some embodiments, denormalization can be a process of restoring the target forecast sequence from the normalized space to the actual demand numerical space based on statistics of the current time window. Specifically, the target forecast sequence output by the target demand forecasting model can first maintain a data scale consistent with the input data representing relative fluctuations, and then, combined with statistics of the current time window, restore the target forecast sequence to a demand forecast result with practical business meaning. For example, the target forecast sequence can be scaled based on the mean and standard deviation of the current time window. Through denormalization, the demand forecast result can be re-corresponded to the actual demand level of the target product, thereby facilitating subsequent replenishment, procurement, allocation, or inventory management.
[0114] In some specific implementations, the target prediction sequence can be inversely normalized according to the following formula: .in, This can represent the normalized prediction result output by the target demand forecasting model. and This can represent the statistics corresponding to the current time window. Furthermore, the actual... and It can be stored locally on the tenant's premises instead of being uploaded to the cloud. This reduces the risk of leakage of the original absolute value information while restoring the actual business meaning of the demand forecast results.
[0115] In some embodiments, normalization and denormalization processes can form a complementary data processing relationship. Specifically, normalization primarily operates on the historical demand data input stage of the target commodity, ensuring the target demand forecasting model receives input data representing relative fluctuations; denormalization primarily operates on the target forecast sequence output stage, restoring the target forecast sequence to a directly applicable demand forecast result. The former focuses on improving data consistency during the model processing stage, while the latter focuses on restoring the business interpretability of the output result. Through this combination of pre-processing and post-processing, input data and output results can be managed on a unified scale without altering the overall demand forecasting process.
[0116] By normalizing historical demand data for the target product based on statistics within the current time window to obtain input data representing relative fluctuations, and then performing inverse normalization on the target forecast sequence when determining the demand forecast result for the target product, the impact of differences in the magnitude of original demand data between different target products on the target demand forecast model's processing can be reduced to some extent, while ensuring that the final output retains practical business significance. This improves the adaptability of the target demand forecast model to different data distribution scenarios and further enhances the stability and usability of the demand forecast results.
[0117] In some embodiments, when the length of the historical demand data for the target product object is less than a preset threshold, the method further includes: determining a reference prototype corresponding to the target product object; determining a prior statistic based on the reference prototype; and determining a target statistic for normalization processing based on the prior statistic and the statistic of the current time window.
[0118] In some specific implementations, when the historical demand data length for the target product object is less than a preset threshold, this scenario can be considered a cold start or a low-sample scenario. Specifically, the preset threshold can be 30 days. In this case, the Top-1 similar reference prototype can be retrieved from the feature library based on the static attribute information of the target product object, and the corresponding hint vector and distribution parameters of the reference prototype can be loaded. Furthermore, the prior distribution of the reference prototype can be read. and the local statistics corresponding to the current input. Weighted fusion is performed to form a corrected statistic for normalization. This improves the stability of the statistic determination when historical demand data is relatively short.
[0119] In some embodiments, the length of historical demand data for a target product is less than a preset threshold, indicating that the historical observation samples corresponding to the target product are relatively few, and the data base available to characterize demand patterns within the current time window is relatively limited. Specifically, the preset threshold can be set according to the minimum effective historical length in the business scenario. For example, the preset threshold can correspond to the lower limit of the number of short-cycle samples, or it can correspond to the minimum time length that meets the requirements of statistical stability. When the length of historical demand data for a target product is less than the preset threshold, the statistics of the current time window may be more susceptible to occasional fluctuations, short-term promotions, or local anomalies. Therefore, it can be further corrected by combining prior information provided by the reference prototype.
[0120] In some embodiments, the reference prototype can be a reference object that is similar to the target product object in terms of business attributes, operational attributes, or demand characteristics. Specifically, the reference prototype can be determined based on category information, brand information, price range information, tenant attribute information, site attribute information, or other static attribute information corresponding to the target product object. For example, when there is a lack of sufficient historical demand data for newly listed beverage products corresponding to the target product object, a reference prototype can be determined from mature product objects of the same category, similar price range, or similar operating scenarios. The reference prototype is mainly used to provide a distribution reference that can be used when data is insufficient, so as to assist in subsequent statistical adjustments.
[0121] In some embodiments, prior statistics can be statistical information determined based on a reference prototype. Specifically, prior statistics may include the mean, standard deviation, or other statistical parameters that can characterize the demand distribution of the reference prototype. For example, the mean and standard deviation of the reference prototype can be determined based on historical demand data of the reference prototype within a corresponding time range, and these statistical parameters can be used as prior statistics. A "prototype reference - current observation" relationship can be formed between the prior statistics and the statistics of the current time window, where the prior statistics mainly reflect the general distribution level of similar objects, and the statistics of the current time window mainly reflect the local observation results of the target product object within the current input time range.
[0122] In some embodiments, the target statistic can be a statistical parameter used for normalization, determined based on prior statistics and statistics within the current time window. Specifically, the target statistic can be obtained by combining, weighting, smoothing, or correcting prior statistics and statistics within the current time window. For example, when historical demand data for the target product is limited, the influence of the prior statistic can be appropriately increased; as historical demand data for the target product gradually increases, the influence of the statistics within the current time window can also be gradually increased. In this way, the target statistic can both preserve the local characteristics of the current data for the target product and, to some extent, utilize the prior distribution information of the reference prototype to improve the stability of the statistical basis used for normalization.
[0123] In some embodiments, a progressive processing relationship can be formed between the reference prototype, prior statistics, and target statistics. Specifically, a reference prototype can be determined first around the target product object, then a prior statistic can be determined based on the reference prototype, and finally the target statistic can be determined by combining the prior statistics and the statistics of the current time window. Through this processing chain, the normalization processing in scenarios with short historical demand data no longer relies solely on a small number of observation samples, but also utilizes the distribution reference information provided by similar objects, thereby helping to reduce the impact of statistical bias on subsequent demand forecasting processing under short sample conditions.
[0124] By determining a reference prototype corresponding to the target product when the length of historical demand data for the target product is less than a preset threshold, determining prior statistics based on the reference prototype, and then determining the target statistics for normalization based on the prior statistics and the statistics of the current time window, the stability and rationality of the statistics determination process can be improved to some extent in scenarios with insufficient data. This helps alleviate the problem of unstable normalization basis when the historical demand data for the target product is too short, and also improves the accuracy and usability of subsequent demand forecasting results in cold start or low-sample scenarios.
[0125] See Figure 2 , Figure 2 This is a schematic diagram of the overall architecture of a retail demand forecasting system provided in an embodiment of this application.
[0126] This application provides a retail demand forecasting system, which includes: a data acquisition module, a model acquisition module, an association determination module, a demand forecasting module, and a result determination module.
[0127] The system comprises the following modules: a data acquisition module for acquiring predictive feature information and predictive task information for the target product object; a model acquisition module for acquiring the target demand prediction model, which includes a base layer and an enterprise-aware adaptation layer, and is used to adapt to different prediction tasks based on the prediction task information; an association determination module for determining at least one associated product object based on the association relationship between the target product object and at least one other product object; a demand prediction module for performing demand prediction processing through the target demand prediction model based on the predictive feature information of the target product object, the association data of at least one associated product object, and the prediction task information, to obtain the standard demand prediction result corresponding to the target product object; and a result determination module for determining the demand prediction result corresponding to the target product object from the standard demand prediction result based on the prediction task information.
[0128] In specific application scenarios, different Software as a Service (SaaS) tenants can provide product data, historical demand data, and task request information from different business entities. The data acquisition module can obtain predictive feature information and predictive task information of the target product object from multiple SaaS tenants. This allows the system to access data from different sources for multi-business entity scenarios. The data acquisition module can perform identification, normalization, or other preprocessing on data from multiple SaaS tenants to convert data from different business entities into a unified input format suitable for subsequent model processing. This helps reduce the impact of data differences between different business entities on predictive processing and also improves data security during use.
[0129] The model acquisition module can acquire the target demand forecasting model, which may include a base layer and an enterprise-aware adaptation layer, or it may adopt a two-layer architecture of base-time adapter. The demand forecasting module can perform demand forecasting processing based on the predictive feature information of the target product object and the association data of at least one related product object, through the target demand forecasting model, to obtain the standard demand forecasting result corresponding to the target product object. In this way, a unified model can be used to complete retail demand forecasting processing.
[0130] The association determination module can identify at least one associated product object corresponding to the target product object based on the association relationship between the target product object and at least one other product object. This allows the system to utilize information from associated product objects while predicting demand for the target product object, thus improving its ability to leverage cross-product linkage relationships.
[0131] In some embodiments, the system can adapt to different data adaptation or prediction modes. For example, a prototype matching mode for zero-sample or few-sample scenarios, or a lightweight fine-tuning mode for scenarios with some historical data. This allows the same retail demand forecasting system to adopt different processing methods under different business entities and different data foundations, thereby improving the system's applicability.
[0132] For some specific implementations, see Figure 3 , Figure 3 This diagram illustrates a comparison of the zero-shot prediction mode and the fine-tuning mode. Different prediction processing paths can be used for different historical data lengths. When the judgment result is a cold start, the process enters the zero-shot prediction path on the left. This path includes attribute extraction, vector retrieval, prototype matching, and (hint / statistic) inference in sequence. Attribute extraction is used to extract static attribute information of the target product object or corresponding business entity; vector retrieval is used to retrieve similar objects from the feature library based on attribute information; prototype matching is used to determine the reference prototype corresponding to the target product object; and (hint / statistic) inference is used to load the hint and statistical information corresponding to the reference prototype, input the relevant information into the base model, and then the base model outputs the corresponding prediction result.
[0133] When the judgment result indicates fine-tuning, the process enters the fine-tuning prediction path on the right. This path includes two input branches: loading LoRA weights and enterprise soft cues / statistics. Loading LoRA weights introduces lightweight parameters corresponding to the current business entity, while enterprise soft cues / statistics introduces cues and statistical distribution information corresponding to the business entity. These two parts of information work together to fine-tune the model, enabling it to further adapt to the current business entity on top of the capabilities of the base model, and then output the corresponding prediction results.
[0134] Therefore, input data is provided by multiple SaaS tenants, preprocessed, and then input into the target demand prediction model. The model combines information from associated product objects to complete the demand prediction process and finally outputs the demand prediction results corresponding to the target product objects. This improves the adaptability and prediction effect of retail demand prediction in multi-business scenarios.
[0135] See Figure 4 , Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of this application.
[0136] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method provided in the above embodiments.
[0137] The electronic device may include: a memory 110, a processor 120, and a communication interface 130. The memory 110, the processor 120, and the communication interface 130 are connected through internal connection paths.
[0138] The memory 110 is used to store computer programs, which in some implementations may include code for implementing the methods of the embodiments of this application.
[0139] The processor 120 executes the computer program stored in the memory 110 to control the communication interface 130 to receive input data and information, and output operation results and other data. In some implementations, when the solutions of the embodiments of this application are implemented by software or firmware, the computer program used to implement the solutions of the embodiments of this application can be stored in the processor 120 and executed by the processor 120.
[0140] The memory 110 may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM). It should be noted that the memory 110 described herein is intended to include, but is not limited to, any memory of these and other suitable types. As an example, the memory 110 includes random access memory (RAM), cache memory, and read-only memory (ROM). The memory 110 stores a computer program that can be executed by processor 120, causing processor 120 to implement the steps of any of the methods described above.
[0141] The processor 120 can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor 120 can be any conventional processor.
[0142] In implementation, each step of the above method can be completed by the integrated logic circuitry of the hardware in the processor 120 or by instructions in software form. The method disclosed in the embodiments of this application can be directly implemented by the hardware processor, or by a combination of hardware and software modules in the processor 120. The software modules can be located in mature storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in the memory 110, and the processor 120 reads the information in the memory 110 and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are not provided here.
[0143] In some implementations, in addition to the hardware units described above, electronic devices may also include software modules, such as operating systems, basic input / output systems (BIOS), and application software.
[0144] An operating system is used to manage one or more hardware and software resources of an electronic device; it is the kernel and foundation of the electronic device. The operating system handles fundamental tasks such as managing and configuring memory, determining the priority of system resource allocation and demand, controlling input and output devices, operating networks, and managing file systems. To facilitate user operation, most operating systems provide a user interface for interaction with the system.
[0145] The BIOS is used to perform hardware initialization during the power-on boot phase and to provide runtime services for the operating system and applications. In some implementations, the BIOS can also monitor and display processor temperature and execute temperature protection strategies.
[0146] Application software, also known as an application program, can be understood as software written for a specific user application purpose, and is one of the main categories of computer software. For example, application software can be a program used to achieve purposes such as power control and temperature management.
[0147] It is understood that the specific examples in this application are only intended to help those skilled in the art better understand the implementation of this application, and are not intended to limit the scope of protection of this application.
[0148] It is understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application.
[0149] It is understood that the various implementation methods described in this application can be implemented individually or in combination, and this application does not limit them.
[0150] Unless otherwise stated, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "one or more" as used in this application includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0151] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0152] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes and beneficial effects of the embodiments described above can be referred to the corresponding processes and beneficial effects in other embodiments, and will not be repeated here.
[0153] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0154] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the technical solution in this application, depending on actual needs.
[0155] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0156] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, essentially, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0157] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A retail demand forecasting method characterized by, The method includes: Obtain the prediction feature information and prediction task information of the target product object; Obtain a target demand prediction model; wherein, the target demand prediction model includes a base layer and an enterprise perception adaptation layer, and the target demand prediction model is used to adapt different prediction tasks based on the prediction task information; Based on the association relationship between the target product object and at least one other product object, at least one associated product object corresponding to the target product object is determined; Based on the predicted feature information of the target product object, the associated data of the at least one associated product object, and the predicted task information, the target demand prediction model is used to perform demand prediction processing to obtain the standard demand prediction result corresponding to the target product object. Based on the prediction task information, the demand prediction result corresponding to the target product object is determined from the standard demand prediction results.
2. The retail demand forecasting method of claim 1, wherein, The process of performing demand forecasting based on the predicted feature information of the target product object, the association data of at least one associated product object, and the prediction task information, through the target demand forecasting model, yields the standard demand forecasting result corresponding to the target product object, including: The predicted feature information of the target product object and the association data of the at least one associated product object are input into the base layer; The base layer uses cross-sequence modeling capabilities pre-learned from product data of multiple business entities to perform demand forecasting processing on the predictive feature information of the target product object and the associated data of at least one associated product object. The enterprise-aware adaptation layer is used to adapt the base layer to enterprise differences. Based on the predicted task information, the standard demand prediction results are adapted to meet the task differences.
3. The retail demand forecasting method of claim 1, wherein, The step of determining at least one associated product object corresponding to the target product object based on the association relationship between the target product object and at least one other product object includes: The association strength between the target product object and the other product objects is determined based on at least one of the following: spatial constraints, semantic similarity, residual correlation after deseasoning, and co-occurrence behavior information. Based on the association strength, at least one associated product object corresponding to the target product object is determined.
4. The retail demand forecasting method of claim 3, wherein, The step of determining at least one associated product object corresponding to the target product object based on the association strength includes: Establish a neighbor index table corresponding to the target product object based on the association strength; Select at least one product object from the neighbor index table that meets the association strength condition, and use it as at least one associated product object corresponding to the target product object.
5. The retail demand forecasting method of claim 2, wherein, The standard demand forecast result is a standard demand forecast sequence that covers a preset maximum forecast length. The step of adapting the standard demand prediction results to task differences by combining the prediction task information includes: Based on the prediction task information, a target prediction sequence of corresponding length is extracted from the standard demand prediction sequence and used as the demand prediction result.
6. The retail demand forecasting method of claim 2, wherein, Before performing demand forecasting processing through the target demand forecasting model based on the predicted feature information of the target product object, the association data of the at least one associated product object, and the prediction task information, the method further includes: The historical demand data of the target product object is length-aligned, and corresponding mask information is generated; Perform relative time encoding on the input sequence and / or output sequence.
7. The retail demand forecasting method of claim 2, wherein, Before performing demand forecasting processing through the target demand forecasting model based on the predicted feature information of the target product object, the association data of the at least one associated product object, and the prediction task information, the method further includes: Based on the statistics of the current time window, the historical demand data of the target commodity is normalized to obtain input data representing relative fluctuations. The step of determining the demand forecast result corresponding to the target commodity object from the standard demand forecast result based on the forecast task information includes: performing inverse normalization processing on the target forecast sequence based on the statistics to obtain the demand forecast result.
8. The retail demand forecasting method of claim 7, wherein, If the length of the historical demand data for the target product is less than a preset threshold, the method further includes: Determine the reference prototype corresponding to the target product object; Prior statistics are determined based on the reference prototype; Based on the prior statistics and the statistics of the current time window, a target statistic for the normalization process is determined.
9. A retail demand forecasting system characterized by, The system includes: The data acquisition module is used to acquire the predictive feature information and predictive task information of the target product object; The model acquisition module is used to acquire the target demand prediction model; wherein, the target demand prediction model includes a base layer and an enterprise perception adaptation layer, and the target demand prediction model is used to perform adaptation processing on different prediction tasks based on the prediction task information; The association determination module is used to determine at least one associated product object corresponding to the target product object based on the association relationship between the target product object and at least one other product object; The demand forecasting module is used to perform demand forecasting processing through the target demand forecasting model based on the forecasting feature information of the target product object, the association data of the at least one associated product object, and the forecasting task information, to obtain the standard demand forecasting result corresponding to the target product object. The result determination module is used to determine the demand forecast result corresponding to the target commodity object from the standard demand forecast results based on the forecast task information.
10. An electronic device comprising a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the retail demand forecasting method of any one of claims 1 to 8.