Sales forecasting method, sales forecasting device, electronic device, and storage medium

CN122948539APending Publication Date: 2026-10-20GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510464431.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0003]但是,由于影响商品销售数据的因素日益复杂化,现有的销售预测模型可能会遗漏或者难以捕捉到影响商品销售数据的因素,从而导致销售预测发生偏差,影响销售预测结果的准确性

Benefits of technology

[0049]基于实体知识图谱、目标样本数据与待训练的销售预测模型的样本数据,对待训练的销售预测模型的初始模型组件进行训练,得到预先训练的销售预测模型。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005358095850000111
    Figure BDA0005358095850000111
  • Figure HDA0005358095860000011
    Figure HDA0005358095860000011
  • Figure HDA0005358095860000012
    Figure HDA0005358095860000012
Patent Text Reader

Abstract

This application provides a sales forecasting method, a sales forecasting device, an electronic device, and a storage medium, relating to the field of sales forecasting technology. The method includes: when a sales forecasting demand for a target component is detected, determining the sum of acquired sales data for all target products including the target component as the target sales data for the target component; decomposing the time-series data after time-series processing of the target sales data based on a time-series decomposition algorithm and a preset period to obtain a trend component, a periodic component of the preset period, and a residual component of the target component; then, based on a time-series prediction algorithm and a preset period, predicting the trend component, the periodic component, and the residual component of the target component to obtain data characteristics of the preset period; and performing sales forecasting for the target component based on the data characteristics of the preset period to obtain a sales forecasting result. Based on the above scheme, the accuracy of the sales forecasting result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of sales forecasting technology, and more particularly to a sales forecasting method, sales forecasting device, electronic device, and storage medium in the field of sales forecasting technology. Background Technology

[0002] Manufacturers can make sales forecasts when selling products, so that they can better plan the production, inventory and logistics of the products based on the sales forecast results.

[0003] However, due to the increasing complexity of factors affecting commodity sales data, existing sales forecasting models may miss or fail to capture these factors, leading to deviations in sales forecasts and affecting the accuracy of the forecast results.

[0004] Therefore, improving the accuracy of sales forecasts is an urgent problem that needs to be solved. Summary of the Invention

[0005] This application provides a sales forecasting method, a sales forecasting apparatus, an electronic device, and a storage medium, which can improve the accuracy of sales forecasting results.

[0006] In a first aspect, this application provides a sales forecasting method applied to electronic devices, the method comprising:

[0007] When the sales forecast demand for the target component is detected, the sales data of each target product is obtained, where each target product includes the target component;

[0008] The sum of the sales data of each target product is determined as the target sales data of the target component;

[0009] Perform time-series processing on the target sales data to obtain time-series data;

[0010] Based on the time series decomposition algorithm and the preset period, the time series data is decomposed to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component.

[0011] Based on the time series prediction algorithm and the preset period, the trend component of the target component, the period component of the preset period and the residual component of the target component are predicted to obtain the data characteristics of the preset period. Among them, the data characteristics of the preset period are used to represent the historical sales trend of the target component in the preset period.

[0012] Based on the data characteristics of a preset period, sales forecasts are made for the target components, and the sales forecast results are obtained.

[0013] In this embodiment, when a sales forecast demand for a target component is detected, the sum of sales data for all products including the target component can be determined as the sales data (i.e., target sales data) used for sales forecasting of the target component, and the corresponding time-series data after time-series processing of the target sales data can be obtained. Furthermore, when the time-series data corresponding to the target component is decomposed using a time-series decomposition algorithm and a preset period to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component, a time-series prediction algorithm and a preset period can be used to predict the trend component, the periodic component, and the residual component of the target component to obtain the historical sales trend of the target component within the preset period. Then, the future sales data of the target component is predicted using the historical sales trend of the target component within the preset period to obtain the sales forecast result. Compared to existing technologies that use fixed-parameter sales forecasting models to process sales data when dealing with periodic fluctuations in target component sales data, leading to omissions or difficulty in capturing factors influencing the target component's sales data, this solution decomposes the target sales data using a time-series decomposition algorithm and a preset period. Then, it uses a time-series forecasting algorithm and a preset period to predict the decomposed data, obtaining the historical sales trend of the target component within the preset period. This allows for the capture of periodic fluctuations in the target component's sales data, ensuring that more factors influencing the target component's sales data can be captured. Furthermore, by using the data characteristics corresponding to these factors to perform sales forecasting for the target component, the accuracy of the sales forecast results can be improved.

[0014] Furthermore, after decomposing the time-series data corresponding to the target component using a time-series decomposition algorithm and a preset period, the decomposed data of the target component (i.e., the trend component of the target component, the periodic component of the preset period, and the residual component of the target component) is not directly determined as the historical sales trend of the target component within the preset period. Instead, based on the decomposed data of the target component, a time-series prediction algorithm is used to predict the data of the decomposed target component within the preset period, and the predicted data of the target component is determined as the historical sales trend of the target component within the preset period. Since the ability of decomposition combined with prediction to capture factors affecting the sales data of the target component is higher than that of single decomposition, decomposition combined with prediction can capture more factors affecting the sales data of the target component than single decomposition. Therefore, by obtaining more factors affecting the sales data of the target component, the accuracy of the sales prediction results of the target component can be further improved.

[0015] Furthermore, when a sales forecast demand for a target component is detected, the sum of the sales data of all products including the target component is determined as the sales data used for sales forecasting of the target component, rather than using only the sales data of one product as the sales data for sales forecasting of the target component. This results in richer sales data for the target component, thereby further improving the accuracy of the sales forecast results for the target component.

[0016] The preset cycle can include, but is not limited to, annual cycles, seasonal cycles, monthly cycles, and weekly cycles.

[0017] In conjunction with the first aspect, in some implementations of the first aspect, the aforementioned prediction of the trend component, the periodic component of the preset period, and the residual component of the target component based on the time-series prediction algorithm and the preset period are used to obtain data characteristics of the preset period, including:

[0018] Based on the time-series prediction algorithm, the trend component of the target component is predicted to obtain the first predicted component;

[0019] Based on the time-series prediction algorithm, the residual components of the target component are predicted to obtain the second predicted component;

[0020] Based on the preset period, the periodic component of the preset period, the first prediction component, and the second prediction component, the data characteristics of the preset period are obtained.

[0021] In this embodiment, the historical sales trend of the target component within a preset period is obtained by combining the predicted trend component (i.e., the first predicted component), the predicted residual component (i.e., the second predicted component), and the periodic component of the preset period. This avoids the problem of bias in the historical sales trend of the target component obtained from a single data point, thus improving the accuracy of the historical sales trend of the target component. Furthermore, based on the more accurate historical sales trend of the target component, the accuracy of the sales forecast results of the target component is further improved.

[0022] Combining the first aspect and the above implementation methods, in some implementation methods of the first aspect, the above-mentioned data features of the preset period based on the preset period, the periodic component of the preset period, the first prediction component, and the second prediction component include:

[0023] Determine whether the changing trend of the periodic component within the preset period is greater than or equal to the preset changing trend;

[0024] When the changing trend of the periodic component of the preset period is greater than or equal to the preset changing trend, the periodic component of the preset period is predicted based on the time series prediction algorithm and the preset period to obtain the third predicted component.

[0025] The first, second, and third prediction components are integrated to obtain data features for a preset period.

[0026] In this embodiment, when the trend of the periodic component within a preset period is greater than or equal to the preset trend, it indicates that the periodic component of the preset period fluctuates significantly and has poor stability. If the periodic component of the preset period is directly used to predict the historical sales trend of the target component within that preset period, the predicted historical sales trend may not reflect the periodic fluctuations in the target component's sales data. Therefore, the periodic component of the preset period can be predicted first, and then the predicted periodic component can be used to predict the historical sales trend of the target component within that preset period. This allows the predicted historical sales trend of the target component to better reflect the periodic fluctuations in the target component's sales data, ensuring that more factors influencing the target component's sales data can be captured. Furthermore, by obtaining more factors influencing the target component's sales data and using the data characteristics corresponding to these factors to predict the target component's sales, the accuracy of the sales prediction results can be improved.

[0027] In conjunction with the first aspect and the above implementation methods, in some implementations of the first aspect, the method further includes:

[0028] When the changing trend of the periodic component of the preset period is less than the preset changing trend, the first predicted component, the second predicted component and the periodic component of the preset period are integrated to obtain the data characteristics of the preset period.

[0029] In this embodiment, when the trend of the periodic component within a preset period is less than the preset trend, it indicates that the fluctuation of the periodic component within the preset period is small and its stability is good. If the periodic component of the preset period is directly used to predict the historical sales trend of the target component within the preset period, it can better reflect the periodic fluctuations in the target component's sales data. Therefore, the predicted periodic component can be used to predict the historical sales trend of the target component within the preset period, ensuring that the predicted historical sales trend of the target component can better reflect the periodic fluctuations in the target component's sales data. This ensures that more factors affecting the target component's sales data can be captured. Furthermore, by obtaining more factors affecting the target component's sales data and using the data characteristics corresponding to these factors to predict the target component's sales, the accuracy of the target component's sales prediction results can be improved.

[0030] In conjunction with the first aspect and the above implementation methods, in some implementations of the first aspect, the method further includes:

[0031] Obtain a pre-trained sales forecasting model, wherein the pre-trained sales forecasting model is used to generate sales forecast results, and the pre-trained sales forecasting model includes a decomposition module;

[0032] The above-mentioned time-series decomposition algorithm and preset period decompose the time-series data to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component, including:

[0033] In the decomposition module, based on the time series decomposition algorithm and the preset period, the time series data is decomposed to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component.

[0034] In this embodiment of the application, in the decomposition module of the pre-trained sales forecasting model used to generate sales forecast results for the target component, the time series data corresponding to the target component is decomposed. This allows the decomposed data of the target component to better reflect the periodic fluctuations of the target component's sales data, ensuring that more factors affecting the target component's sales data can be captured. Furthermore, when more factors affecting the target component's sales data are obtained, the sales forecast of the target component can be made using the data features corresponding to these factors, thereby improving the accuracy of the target component's sales forecast results.

[0035] Combining the first aspect and the above implementation methods, in some implementation methods of the first aspect, the above-mentioned acquisition of the pre-trained sales forecasting model includes:

[0036] Obtain the model components of the trained base model and the sales forecasting model to be trained. The trained base model is used to forecast the sales of non-target components, and the sales forecasting model to be trained is used to forecast the sales of target components.

[0037] Transfer learning is performed on the model components of the trained base model to obtain the initial model components of the sales forecasting model to be trained.

[0038] Based on the sample data of the sales forecasting model to be trained, the initial model components of the sales forecasting model to be trained are trained to obtain the pre-trained sales forecasting model.

[0039] In this embodiment, when obtaining the pre-trained sales forecasting model corresponding to the target component, it is not directly trained from a completely new sales forecasting model. Instead, a trained base model used for sales forecasting of other components (i.e., non-target components) is first obtained, and the model components in this trained base model are transferred to the sales forecasting model to be trained corresponding to the target component. Then, the model components transferred to the sales forecasting model to be trained are fine-tuned using sample data from the sales forecasting model to be trained, resulting in the pre-trained sales forecasting model corresponding to the target component. By transferring the model components from the trained base model, the generalization of the sales forecasting model to be trained can be improved, thereby obtaining a more adaptive pre-trained sales forecasting model and improving the accuracy of the sales forecasting results of the pre-trained sales forecasting model. Consequently, when using the pre-trained sales forecasting model to forecast the sales of the target component, the accuracy of the sales forecasting results for the target component can be further improved.

[0040] In conjunction with the first aspect and the above implementation methods, in some implementations of the first aspect, the method further includes:

[0041] Obtain target sample data from the sample data of the trained base model that has the same data type as the sample data of the sales prediction model to be trained;

[0042] Based on the sample data of the sales forecasting model to be trained, the initial model components of the sales forecasting model to be trained are trained to obtain a pre-trained sales forecasting model, including:

[0043] Based on the target sample data and the sample data of the sales forecasting model to be trained, the initial model components of the sales forecasting model to be trained are trained to obtain the pre-trained sales forecasting model.

[0044] In this embodiment of the application, when fine-tuning the model components transferred to the sales forecasting model to be trained, in order to avoid the problem of insufficient training data due to the small amount of sample data of the sales forecasting model to be trained, a portion of the sample data (i.e., target sample data) with the same data type as the sample data of the sales forecasting model to be trained can be determined from the sample data corresponding to the base model after training. The determined portion of sample data is also used in the fine-tuning of the model components transferred to the sales forecasting model to be trained, thereby enriching the training data. When the pre-trained sales forecasting model trained on a large amount of training data performs sales forecasting on the target component, the accuracy of the sales forecasting results of the target component can be further improved.

[0045] In conjunction with the first aspect and the above implementation methods, in some implementations of the first aspect, the method further includes:

[0046] Obtain the entities and entity relationships of the sample data of the trained base model and the sample data of the sales prediction model to be trained;

[0047] Construct an entity knowledge graph based on entities and entity relationships;

[0048] The above-mentioned initial model components of the sales forecasting model to be trained, based on the target sample data and the sample data of the sales forecasting model to be trained, are used to train the pre-trained sales forecasting model, including:

[0049] Based on entity knowledge graphs, target sample data, and sample data of the sales forecasting model to be trained, the initial model components of the sales forecasting model to be trained are trained to obtain a pre-trained sales forecasting model.

[0050] In this embodiment, when fine-tuning the model components transferred to the sales forecasting model to be trained, an entity knowledge graph can be constructed using the entities and entity relationships of the sample data of the trained base model and the sample data of the sales forecasting model to be trained. Once the entity knowledge graph is constructed, it is also used in the fine-tuning of the model components transferred to the sales forecasting model to be trained, in order to extract more entity relationships. This allows the pre-trained sales forecasting model, trained based on more entity relationships, to further improve the accuracy of sales forecast results for the target component.

[0051] Secondly, this application provides a sales forecasting device configured in an electronic device, the device comprising:

[0052] The acquisition module is used to acquire sales data of each target product when the sales forecast demand of the target component is detected, wherein each target product includes the target component;

[0053] The determination module is used to sum the sales data of each target product and determine the target sales data of the target component.

[0054] The time-series processing module is used to perform time-series processing on the target sales data to obtain time-series data.

[0055] The decomposition module is used to decompose time series data based on a time series decomposition algorithm and a preset period to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component.

[0056] The processing module is used to predict the trend component, the periodic component of the preset period, and the residual component of the target component based on the time series prediction algorithm and the preset period, so as to obtain the data features of the preset period. The data features of the preset period are used to represent the historical sales trend of the target component in the preset period.

[0057] The forecasting module is used to forecast the sales of target components based on data characteristics of a preset period and obtain the sales forecast results.

[0058] Thirdly, this application provides an electronic device including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the electronic device to perform the methods described in the first aspect or any possible implementation thereof.

[0059] Fourthly, this application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in the first aspect or any possible implementation thereof.

[0060] Fifthly, this application provides a computer-readable storage medium storing computer program code that, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description

[0061] Figure 1 This is a schematic diagram illustrating a scenario for sales forecasting of related technologies.

[0062] Figure 2 This is a schematic diagram of the architecture of a sales forecasting model provided in an embodiment of this application.

[0063] Figure 3 This is a schematic diagram of the data source architecture for sales forecasting provided in an embodiment of this application.

[0064] Figure 4 This is a flowchart illustrating a sales forecasting method provided in an embodiment of this application.

[0065] Figure 5 This is another flowchart illustrating a sales forecasting method provided in an embodiment of this application.

[0066] Figure 6 This is a schematic diagram of the sales forecasting device provided in the embodiments of this application.

[0067] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0068] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0069] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0070] Figure 1 This is a schematic diagram illustrating a scenario for sales forecasting of related technologies.

[0071] For example, such as Figure 1 As shown, Figure 1 The system includes product 110, electronic device 120, and seller 130 (i.e., manufacturer). Electronic device 120 incorporates a sales forecasting model for predicting the sales of product 110. Product 110 may include physical goods and / or virtual goods, such as game cards, food, video memberships, and game currency. For clarity, the following explanation uses a game card (also referred to as an "expansion card" or "plug-in card") as an example.

[0072] For example, when selling circuit boards, manufacturers can use sales forecasting models in electronic devices to forecast board sales in order to better plan the production, inventory, and logistics of the boards, and adjust the production, inventory, and logistics of the boards according to the sales forecast results to better meet market demand.

[0073] However, with the rapid development of electronic information technology, circuit boards play a crucial role in electronic devices, and their sales data (e.g., sales volume, price information) is dynamic and complex. This is because circuit board sales data is not only affected by regional market characteristics but also experiences irregular and drastic fluctuations due to globalization trends and the growth and adjustments of different economies. Regional markets can include, but are not limited to, developed and emerging markets. Since the demand for circuit boards in developed markets is generally greater than that in emerging markets, circuit board sales data in developed markets are higher than those in emerging markets. In addition, circuit board sales data is also affected by factors such as holidays, shopping festivals, age, and gender. For example, during holidays and shopping festivals, circuit board sales data typically increase significantly. Conversely, during non-holiday or non-shopping festival periods, circuit board sales data may decrease to varying degrees; thus, the factors influencing circuit board sales data are quite complex.

[0074] Existing sales forecasting models are generally based on time series analysis or regression models, allowing for relatively good sales forecasting in a single market (i.e., where only a single factor influences the sales data of circuit boards). This is because sales data in a single market often exhibits high internal consistency (i.e., similar patterns of change in sales data) and is less affected by external factors, making it easier to identify patterns in circuit board sales data. Furthermore, in addition to using existing sales forecasting models for circuit board sales forecasting, better sales forecasting for circuit boards in a single market can also be achieved through rule-based local optimization.

[0075] Therefore, existing sales forecasting models or rule-based local optimizations may miss or fail to capture factors influencing product sales data when faced with complex environments where multiple business units (BUs) and business groups (BGs) operate simultaneously (i.e., multiple factors affecting board sales data). This results in highly variable sales data patterns and a lack of global perspective and flexibility. Consequently, they struggle to meet sales forecasting needs in dynamic scenarios involving multiple BUs and BGs, leading to forecast deviations and affecting the accuracy of forecast results. Furthermore, these deviations in board sales forecasting will impact manufacturers' planning for board production, inventory, and logistics. A single BG may include multiple BUs.

[0076] Assume that the business related to electronic devices is BG1, the television (TV) tuning board is BU1, and the power supply board is BU2. BU1 and BU2 both belong to BG1. However, due to the differences in their respective application scenarios, user needs, and market cycles, BU1 and BU2 will have significantly different demand characteristics, such as sales data, sales trends, and inventory data.

[0077] The reasons why existing sales forecasting models or rule-based local optimizations may deviate in predicting board sales in dynamic demand scenarios involving multiple business units and business groups are mainly as follows:

[0078] 1. Data Silos: Sales data for each business unit (BU) and business group (BG) corresponding to a circuit board are typically isolated and not shared, lacking effective data sharing and integration mechanisms. This results in significant discrepancies in sales data across BUs and BGs, making it difficult to achieve cross-domain (i.e., BU and BG) collaborative optimization of circuit board sales data. Sales data includes, but is not limited to, one or more of the following: sales volume, sales data quality, and sales data distribution. Furthermore, "cross-domain" can refer to data sharing between different BUs, different BGs, and between BUs and BGs.

[0079] 2. Inadequate handling of cyclical fluctuations: Existing sales forecasting models or rule-based local optimizations often rely on fixed parameters and assumptions when dealing with cyclical fluctuations, failing to dynamically adjust to adapt to the demand fluctuations of various business units (BUs) and business groups (BGs). For example, the cycles of holidays and shopping festivals differ between domestic and international markets, and existing sales forecasting models or rule-based local optimizations struggle to flexibly address these changing factors. Seasonal fluctuations are a form of cyclical fluctuation.

[0080] 3. Insufficient Model Generalization Ability: Existing sales forecasting models perform well when dealing with a single market, but their generalization ability is poor when facing multiple business groups (BGs) and business units (BUs). Different BGs and BUs have vastly different characteristics, and existing sales forecasting models cannot capture subtle market changes, leading to biases in sales forecasts. Furthermore, the limited sales data for some BUs or BGs may result in insufficient training of existing sales forecasting models, further reducing the accuracy of their predictions.

[0081] 4. Difficulty in Model Maintenance and Updates: With the continuous changes in the market environment and sales forecasting needs, existing sales forecasting models require frequent updates and maintenance. However, because sales data for boards across different business units (BUs) and business groups are typically isolated and not shared, the difficulty of updating and maintaining existing sales forecasting models increases, resulting in high maintenance costs.

[0082] It should be noted that the electronic device can be a smart device configured with a sales forecasting model, including but not limited to: personal computers, tablets, handheld devices, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to a wireless modem. The electronic device may have different names in different networks, such as: user equipment, access electronic device, user unit, user station, mobile station, mobile station, remote station, remote electronic device, mobile device, user electronic device, electronic device, wireless communication device, user agent or user device, cellular phone, cordless phone, electronic device in a 5G network or future evolved network, etc. The embodiments in this application are not limited in scope.

[0083] Therefore, in order to improve the accuracy of sales forecast results, this application proposes a sales forecasting method, a sales forecasting device, an electronic device, and a storage medium.

[0084] The following is combined with Figures 2 to 5 The sales forecasting method provided in the embodiments of this application will be described in detail.

[0085] Figure 2 This is a schematic diagram of the architecture of a sales forecasting model provided in an embodiment of this application.

[0086] For example, such as Figure 2 As shown, the sales forecasting model 200 may include a data collection and management layer 101, a model development layer 102, and a system integration and application layer 103. The data collected by the data collection and management layer 101 serves as input, and the sales forecasting results serve as output.

[0087] (1) Data collection and management system 101 mainly includes: multi-source data integration, data warehouse construction and data security and access control.

[0088] Figure 3 This is a schematic diagram of the data source architecture for sales forecasting provided in an embodiment of this application.

[0089] For example, such as Figure 3 As shown, Figure 3 This includes two types of data sources for data collection and management: internal enterprise data and external market data. Comprehensive and accurate sales data for the boards can be obtained through both internal and external market data.

[0090] Internal enterprise data may include, but is not limited to:

[0091] Transaction data: historical sales records, order data, sales channels, and customer information for products (e.g., circuit boards).

[0092] Inventory data: The current inventory level of a product and its historical trends.

[0093] Product information data: product category, model, material attributes, and lifecycle, etc.

[0094] Promotional activity data: product promotion times, discount information, and advertising data, etc.

[0095] Factory information data: Manufacturers' production schedules and working days for products, etc.

[0096] External market data may include, but is not limited to:

[0097] Market data: industry trends, market share, and competitor activities, etc.

[0098] Macroeconomic data: Gross Domestic Product (GDP) growth rate, Consumer Price Index (CPI), and exchange rates, etc.

[0099] Holiday and event information: Dates of holidays and important events in various regions.

[0100] Optionally, when collecting sales data, since there are many sources of sales data, different collection methods can be configured for sales data from different sources.

[0101] For example, through Application Programming Interface (API) interfaces, it can integrate with internal enterprise systems such as Collaborative Product Lifecycle Management (CPLM), Enterprise Resource Planning (ERP), Customer Relationship Management (CRM), and Supply Chain Management (SCM) to automatically and in real-time acquire sales data, inventory data, and customer information. Furthermore, it can automatically and in real-time acquire historical sales and order data for goods through data warehouse interfaces. Additionally, when acquiring external market data, customized web crawlers can be developed to automatically and in real-time acquire external market data from publicly available market reports, government statistics, news media, and other channels.

[0102] When sales data is collected, it can be preprocessed to improve the data quality, thereby improving the accuracy of the sales forecast results of the sales forecast model 200.

[0103] Optionally, preprocessing of sales data may include: data cleaning, data normalization and standardization, noise filtering, feature extraction and construction.

[0104] Data cleaning: When sales data is collected, it can be cleaned first to remove noise and outliers. For example, the sales data of circuit boards in some business units may have missing data or abnormal fluctuations (collectively referred to as "abnormal data"). Abnormal data can be processed by interpolation, smoothing and other methods.

[0105] For missing numerical data, the mean, median, or mode of multiple sales data points can be calculated and used to impute the missing data. For missing categorical data, the mode can be used to replace the missing data. Numerical missing data refers to data types that can be mathematically manipulated, such as integers and floating-point numbers. Categorical missing data refers to data types that represent categories or labels, such as strings and category numbers.

[0106] For data exhibiting abnormal fluctuations, the range of normal data can be determined using quartiles (Q) and the interquartile range (IQR). Data outside this range is considered abnormally fluctuating. For example, values ​​outside 1.5 times the IQR are considered abnormally fluctuating. The abnormally fluctuating data is then replaced with the mean, median, or mode of multiple sales data points. Here, Q can represent the first Q (denoted as "Q1"), the second Q (denoted as "Q2"), and the third Q (denoted as "Q3").

[0107] Data normalization and standardization: After data cleaning, sales data can be normalized and standardized to eliminate the influence of different data dimensions due to differences in data volume and distribution among different business units. Normalization and standardization can employ any of the following methods: min-max normalization, standardization (Z-score), or decimal scaling normalization.

[0108] For example, in BU1, sales volume is measured in tens of thousands of yuan, while the sales quantity is measured in units; or, in BU1, sales volume is measured in tens of thousands of yuan, while in BU2, sales volume is measured in hundreds of yuan. If the sales data from BU1 and BU2 are not normalized and standardized before being directly input into the sales forecasting model, a larger volume of data may dominate the training of the sales forecasting model, while the impact of smaller volumes of data on the model may be ignored. This could lead to a bias in the sales forecasting model's emphasis on different data, thereby affecting the stability of the sales forecasting model and the accuracy of the sales forecast results.

[0109] Noise filtering: Utilizing self-supervised learning technology, noise (i.e., non-board sales data) in the board sales data is automatically identified and filtered to improve the data quality of the sales data.

[0110] Feature extraction and construction: Based on the business understanding of sales (e.g., sales time, product attributes, and price information), key features that affect sales forecast results (e.g., sales time and price information) are extracted, and feature interaction and feature combination operations are performed to enrich the model input.

[0111] For example, when promoting a circuit board, a price reduction may increase the board's sales volume, meaning there is an interaction between the promotion and the price information. Therefore, the promotion and the price information can be used for feature interaction.

[0112] For example, user age, income level, and purchase frequency can be combined into a "spending power index" feature. The spending power index can more accurately reflect a user's purchasing potential than user age, income level, or purchase frequency, thereby improving the accuracy of sales forecasting models.

[0113] Data Warehouse Setup: To support efficient storage and access to sales data, advanced data management technologies, such as distributed data warehouse systems, can be employed to support the storage and retrieval of large volumes of sales data. Distributed data warehouse systems can include, but are not limited to, Hadoop and Hive.

[0114] Data security and access control: To ensure the security of sales data, strict data access permissions can be set to meet the data isolation and data sharing needs of various business units and business groups.

[0115] (2) The model development layer 102 mainly includes: periodic feature (e.g., seasonal feature) extraction, feature transfer, relation transfer, and model transfer. For ease of understanding, the following uses seasonal features as an example of periodic features.

[0116] Seasonal Feature Extraction: To address the changing trends in circuit board sales data, seasonal variation modeling techniques can be used to perform time series analysis on the sales data, capturing seasonal fluctuations. By capturing these fluctuations, manufacturers can make more accurate sales forecasts before holidays and shopping festivals, thus enabling them to rationally plan production, inventory, and logistics, avoiding inventory backlogs or stockouts. Seasonal fluctuations can represent fluctuations in sales data caused by specific time periods, such as a quarter of a year, a week of a month, or a day of a week. It should be understood that factors such as holidays, promotional activities, and seasonal product demand can all cause seasonal fluctuations in circuit board sales data.

[0117] Seasonal feature extraction can be achieved through seasonal decomposition. Specifically, the acquired board sales data can first undergo time-series processing to obtain the corresponding time-series data. Then, seasonal variation modeling techniques can be used to perform seasonal decomposition on the time-series data. Through seasonal decomposition, the time-series data can be broken down into long-term trend components, seasonal components, and residual components. This allows for a better understanding of long-term fluctuations, periodic fluctuations, and random noise in the time-series data, thereby providing a better understanding of seasonal changes in sales data and helping manufacturers to make more accurate sales plans before peak demand periods.

[0118] Among them, the long-term trend can represent the overall trend of time series data over a longer period of time, reflecting the long-term growth, decline, or stabilization trend of the time series data over time. The seasonal term can represent the periodic fluctuation pattern of time series data within a year or a fixed period. The residual term can represent the part remaining in the time series data after removing the long-term trend term and the seasonal term, which represents the influence of random fluctuations or other irregular factors in the time series data that cannot be explained by the long-term trend term and the seasonal term.

[0119] Optionally, seasonal variation modeling techniques may include, but are not limited to, additive models, multiplicative models, seasonal and trend decomposition using Loess (STL) based on locally weighted regression, and Fourier decomposition. However, additive models, multiplicative models, STL decomposition, and Fourier decomposition have high requirements for data quality. In cross-domain sales forecasting, because each business unit (BU) and business group (BG) may have multi-level, multi-frequency, and dynamically changing seasonality, a single time series decomposition method may not be able to accurately capture complex sales data. Therefore, a hybrid model can be used to combine the advantages of multiple methods to improve the accuracy of seasonal decomposition and sales forecast results.

[0120] Among them, the hybrid model can represent the combination of time series decomposition with machine learning or statistical modeling methods, modeling different characteristics of sales data separately, and integrating the results of seasonal decomposition to improve the accuracy of seasonal decomposition and sales forecast results.

[0121] For example, seasonal variation modeling techniques (e.g., multiplicative models) can be used to seasonally decompose time-series data. Then, Long Short-Term Memory (LSTM) networks or Transformer self-attention models can be used to make seasonal predictions on the decomposed data.

[0122] For example, let's take STL decomposition + LSTM as an example: When collecting sales data for circuit boards, the sales data can be sorted in chronological order to obtain the corresponding time-series data. Then, STL decomposition is used to perform seasonal decomposition on the time-series data.

[0123] When performing seasonal decomposition, one can first use locally weighted regression (Loess) to estimate the long-term trend term in the time-series data. After removing the long-term trend term from the sales data, the average value for each period is calculated to form the seasonal term. For example, the seasonal term can be obtained by calculating indicators such as the average sales quantity and sales volume for each season to capture seasonal fluctuations. Then, after removing the long-term trend term and the seasonal term from the sales data, the remaining data is used as the residual term.

[0124] When the seasonality is relatively stable with minimal fluctuations, LSTM can be used to predict the long-term trend and residual terms separately, while maintaining seasonality. The predicted long-term trend, residual, and seasonal terms can then be used to forecast board sales data, yielding a sales forecast result. Conversely, when the seasonality is unstable and fluctuates significantly, LSTM can be used to predict the long-term trend, seasonality, and residual terms separately, again using these predictions to forecast board sales data, resulting in a sales forecast result.

[0125] Alternatively, the magnitude of seasonal fluctuations can be quantified by calculating a seasonal index.

[0126] For example, transfer learning, as a machine learning method, can leverage knowledge from one domain (the "source domain") to improve the learning performance of another domain (the "target domain"). It effectively utilizes existing knowledge, reduces reliance on large amounts of labeled data, and thus enables efficient learning and prediction of sales forecasting models in the target domain even with limited data. Since the source domain typically possesses abundant data and pre-trained models, while the target domain may lack sufficient data and / or its models may not be fully developed, sharing and transferring existing knowledge from the source domain to the target domain compensates for the data deficiency. This reduces the data requirements and training time of the model in the target domain, improving its training efficiency and enabling accurate predictions even with limited data. Furthermore, transfer learning can handle differences in data distribution across domains, enhancing the generalization ability of models in the target domain and achieving cross-domain collaborative optimization.

[0127] Because transfer learning has significant advantages in handling problems such as insufficient data volume and large differences in data distribution, it can be applied to complex scenarios such as cross-domain sales forecasting. In cross-domain sales forecasting, transfer learning can realize data sharing and integration among different business units (BUs) and business groups (BGs), break down data silos, improve data utilization, and help different BUs and BGs share valuable information, thereby achieving cross-domain collaborative optimization.

[0128] In transfer learning, the target domain can represent a product domain where there is a demand for sales forecasting but the corresponding sales forecasting model has not yet been trained (e.g., boards), and the source domain can represent a product domain where there is a demand for sales forecasting and the corresponding sales forecasting model has already been trained (e.g., screens).

[0129] To further improve the generalization ability of the model in the target domain (i.e., the sales forecasting model corresponding to the board), multi-task reinforcement learning (MTRTL) can be added to transfer learning. MTRTL can significantly improve the accuracy, dynamic adaptability and generalization ability of the model in the target domain.

[0130] MTRTL achieves more efficient prediction and optimization in the target domain by simultaneously optimizing multiple sales forecasting-related tasks (e.g., sales data forecasting, inventory management, and promotional effectiveness analysis) and dynamically adjusting task strategies using reinforcement learning feedback mechanisms. MTRTL can include multi-transfer learning modules, task learning modules, and reinforcement learning modules.

[0131] The transfer learning module can include feature transfer, relation transfer, and model transfer.

[0132] Feature transfer can transfer the same features (called "shared features") between sales data in the source domain and sales data in the target domain to the target domain, thereby achieving feature sharing.

[0133] When performing feature transfer, feature extraction can begin by identifying shared features between the sales data in the source and target domains. Since the feature spaces of the sales data in the source and target domains may differ, feature alignment is necessary after extracting the shared features. This aligns the shared features in the source domain to those in the target domain, ensuring their feature spaces are identical. The aligned shared features are then transferred to the target domain, achieving cross-domain feature sharing. Feature alignment methods can include Principal Component Analysis (PCA) and Adaptive Feature Alignment.

[0134] For example, the source domain is the screen, and the target domain is the board. The sales data for the screen includes sales quantity, sales time, number and duration of promotional activities, user age, and price information. The sales data for the board includes sales quantity, sales time, and price information. Therefore, the shared features between the screen's and board's sales data are sales quantity, sales time, and price information. The feature spaces of the sales quantity, sales time, and price information in the screen's sales data are aligned to the feature spaces of the board's sales data. The aligned sales quantity, sales time, and price information from the screen are then migrated to the board's sales data, so that the migrated board's sales data includes not only the sales quantity, sales time, and price information corresponding to the board, but also the sales quantity, sales time, and price information corresponding to the screen.

[0135] Relationship transfer can capture the data relationships between sales data in the source domain and sales data in the target domain, and transfer these relationships to the sales data in the target domain. The relationship transfer technique for capturing these relationships can be Graph Neural Networks (GNNs), which construct cross-domain knowledge graphs to capture the data relationships between sales data in the source and target domains. This overcomes the shortcomings of traditional transfer learning in relationship modeling, thus achieving more efficient relationship transfer.

[0136] When performing relationship transfer, a knowledge graph (referred to as an "entity knowledge graph") can be constructed using sales data from both the source and target domains. This knowledge graph includes entities such as sales data, customer information, and sales channels. Once the entity knowledge graph is obtained, Generative Neural Networks (GNNs) can be used to model it, extracting entity relationship features between the sales data from the source and target domains. These entity relationship features are then transferred to the sales data in the target domain. This enhances the sales forecasting model's ability to understand different business scenarios, making it more applicable to various situations and improving the reliability and interpretability of the forecast results. Entity relationship features represent the connections between different entities, such as sales relationships, inventory relationships, and market competition relationships.

[0137] For example, sales relationships include the sales volume of circuit boards in a certain region and the price information of circuit boards in a certain season.

[0138] The process of constructing an entity knowledge graph may include: first, identifying entities related to sales forecasting from sales data in both the source and target domains, such as sales volume, customer information, and sales channels. Then, through data-driven mining, relation extraction (RE) is used to identify the relationships between different entities and model those relationships, thereby obtaining the entity knowledge graph.

[0139] Model transfer can directly transfer model parameters and / or model structure from the source domain's corresponding sales forecasting model to the target domain's corresponding sales forecasting model when the prediction tasks in the source and target domains are similar. This improves the generalization ability of the target domain model and reduces the difficulty and cost of developing and maintaining the target domain's corresponding sales forecasting model. Model transfer methods can include deep learning models, gradient boosting tree models, etc.

[0140] In transfer learning, deep learning models can first pre-train the target domain sales forecasting model on the sales data of the source domain. After pre-training, the pre-trained target domain sales forecasting model is then fine-tuned so that it can be trained using the sales data and knowledge of the source domain. This improves its predictive performance and avoids the impact of insufficient sales data in the target domain on the stability and accuracy of the sales forecasting model, thus significantly improving the stability and accuracy of the target domain sales forecasting model.

[0141] Gradient boosting tree models can achieve model transfer by reloading the sales forecasting model corresponding to the source domain and continuing to train on the sales forecasting model corresponding to the source domain, so that the sales forecasting model corresponding to the source domain can be adapted to the target domain after training.

[0142] Optionally, in addition to feature transfer, relation transfer, and model transfer, the transfer learning module may also include instance transfer, parameter transfer, task transfer, domain adaptation, etc., which can be selected according to sales forecasting needs. This application embodiment does not limit this.

[0143] A multi-task learning module can represent a constructed multi-task neural network sharing underlying features, with each task having an independent output layer. These multi-tasks could include sales quantity prediction, inventory management prediction, and promotional effectiveness analysis. Furthermore, the multi-task learning module can include a shared feature extraction layer, a task-specific layer, and a weight allocation layer.

[0144] A shared feature extraction layer can use a deep neural network to extract common features for different tasks. This deep neural network can be a convolutional neural network (CNN), LSTM, or similar.

[0145] Among them, common features for different tasks can represent common features that affect the forecasts for different tasks. For example, the model, size, and material of the circuit board will affect the sales quantity forecast and inventory management forecast, so the model, size, and material of the circuit board can be used as common features for sales quantity forecast and inventory management forecast.

[0146] Task-specific layers allow for the design of independent output layers for each task, enabling optimization of prediction results for each task.

[0147] The weighting layer dynamically adjusts the weights of each task based on its importance and the model's performance. The weights of each task are determined using an activation function (e.g., the softmax function), which also determines whether each task contributes to improving the accuracy of sales forecasts. When a task contributes to improving the accuracy of sales forecasts (e.g., task A), a higher weight can be assigned to task A, with a greater weight reflecting the improvement. Conversely, when a task reduces the accuracy of sales forecasts (e.g., task B), a lower weight can be assigned to task B, or task B can be removed.

[0148] For example, the weight of sales volume forecasts may be higher than the weight of inventory management forecasts.

[0149] Reinforcement Learning (RL), a machine learning method that learns optimal strategies through interaction with the environment, can dynamically adjust task weights based on the performance of a sales forecasting model in the target domain. This allows the model to better adapt to different business scenarios and changes, thereby achieving more efficient model optimization. RL can include reward function design, strategy optimization, and environmental feedback.

[0150] Reward function design refers to designing a reward function based on the performance of the sales forecasting model in the target domain. For example, a positive reward is given when the accuracy of the sales forecasting model in the target domain improves; conversely, a negative reward is given when the accuracy of the sales forecasting model in the target domain decreases. The reward function can be explained using formula (1):

[0151] R t =α*accuracy + β*synergistic effect + γ*data utilization (1)

[0152] In formula (1), t represents time, and R t Let t represent the reward function at time t, which is used to represent the performance of the sales forecasting model in the target domain; α, β, and γ represent different weighting coefficients, which are used to adjust the contribution of accuracy, synergy (i.e., the correlation between various tasks), and data utilization to the reward, respectively.

[0153] Policy optimization can be achieved by dynamically adjusting task weights using reinforcement learning algorithms. Reinforcement learning algorithms can include Q-Learning and Deep Q-Network, among others. Policy optimization can be explained using equation (2):

[0154]

[0155] In formula (2), t+1 represents the next time step corresponding to t, Q t(s,a) Let Q represent the Q-value (i.e., the expected future cumulative reward) obtained by performing action a in state s at time t. t+1(s,a) R represents the Q-value obtained by performing action a in state s at time t+1, i.e., the updated Q-value. t Let ω represent the reward function at time t, where ω can represent a discount factor (0 < ω ≤ 1), used to measure the importance of future rewards. The larger ω is, the greater the impact of future rewards. a′ Q(s′,a′) represents the maximum Q-value obtained from all possible actions a′ in the new state s′, represents the expected future reward when choosing the optimal policy, and ε represents the learning rate (0<ε≤1), which determines Q. t+1(s,a) With Q t(s,a)Updated ratio.

[0156] Environmental feedback can use business data from the target domain as feedback data for the sales forecasting model, continuously optimizing task weights and improving the dynamic adaptability of the sales forecasting model corresponding to the target domain. Furthermore, through reward function design and strategy optimization, the adaptive efficiency of the sales forecasting model corresponding to the target domain is improved, enabling it to quickly adapt to changes in the target domain, thereby enhancing its practicality and flexibility.

[0157] For example, if there is a sudden surge in sales of circuit boards in a certain week, but insufficient inventory leads to stockouts, this information, as environmental feedback, will prompt the sales forecasting model corresponding to the circuit boards to adjust its strategy and increase the weight of inventory management tasks.

[0158] (3) The System Integration and Application Layer 103 mainly includes: IT system integration, visualization and reporting, model monitoring, and data updates. Through the System Integration and Application Layer 103, the accuracy and real-time performance of sales forecasting results from the sales forecasting model can be ensured, providing manufacturers with strong decision support for planning aspects such as board production, inventory, and logistics.

[0159] Information Technology (IT) System Integration: Seamlessly integrate the output of the sales forecasting model corresponding to the board with the manufacturer's existing IT system through system interfaces to ensure that the sales forecasting results can be transmitted to each business unit and business group in real time.

[0160] Visualization and Reporting: Sales forecast results will be presented in a visual manner, such as charts and / or dashboards, for use and analysis by users (e.g., sales personnel). Furthermore, when outliers deviate from historical trends in the sales forecast results, these outliers can be highlighted with special identifiers (e.g., emphasis) to make them more noticeable, alerting users to these outliers and enabling them to better plan for board sales.

[0161] Meanwhile, to increase users' confidence in the sales forecast results, the extracted seasonal characteristics, historical sales volume of boards, price information and customer information can be compiled into a report and output as the interpretable content of the sales forecast model.

[0162] Model monitoring: Monitor the discrepancies between seasonal characteristics and sales forecast results.

[0163] In model monitoring, the performance of sales forecasting models can be tracked in real time. By setting up a real-time monitoring system, the predictive performance of sales forecasting models under different markets and business scenarios can be tracked. By comparing actual sales data with sales forecast results, prediction errors in the sales forecasting model can be quickly identified. Furthermore, when the prediction error is too large, an alarm mechanism can be triggered to remind users to adjust the parameters of the sales forecasting model in a timely manner. Tracked metrics may include, but are not limited to, Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE).

[0164] In model monitoring, anomaly detection can also be performed on the sales forecasting model. By employing an anomaly detection model, changes in the distribution of the input data of the sales forecasting model can be monitored, such as abnormal sales fluctuations and surges in regional demand. When anomalies are detected, the failure of the sales forecasting model caused by data anomalies can be recorded and fed back to the update module of the sales forecasting model, thereby updating the parameters in the sales forecasting model in a timely manner.

[0165] Data Updates: Regularly update the training data for the sales forecasting model, including sales volume, demand information from new markets, and holiday and promotional cycles. When highly volatile features (referred to as "outliers") are detected in seasonal characteristics, these outliers can be automatically filtered out to prevent them from affecting the accuracy of sales forecasts, thereby improving the accuracy of the forecasts. Furthermore, transfer learning can be used to retain the weights of the previous sales forecasting model in the updated model, reducing the training time of the updated model while improving its predictive performance.

[0166] The sales forecasting model 200 achieves full-process management from sales data acquisition to sales forecasting model application through the data collection and management layer 101, the model development layer 102, and the system integration and application layer 103, thereby improving the accuracy and applicability of sales forecast results.

[0167] Figure 4 This is a flowchart illustrating a sales forecasting method provided in an embodiment of this application. The method can be... Figure 1 The electronic device 120 in the middle performs the operation.

[0168] For example, such as Figure 4 As shown, method 400 is applicable to the above. Figure 2 The sales forecasting model 200 shown; the method 400 includes the following implementation process:

[0169] S410: When the sales forecast demand for the target component is detected, the sales data of each target product is obtained.

[0170] Each target product includes target components with projected sales demand (e.g., the circuit board mentioned above). A target component can refer to a similar component within each target product. For example, if product A contains a circuit board, and product B contains both a circuit board and a screen, then the circuit board can be identified as the target component.

[0171] For example, if a sales forecast demand for a target component is detected, sales data for each product including the target component (which may be referred to as "each target product") can be obtained.

[0172] S420: The sum of the sales data of each target product is determined as the target sales data of the target component.

[0173] For example, when the sales data of each target product is obtained, the total sales data of each target product can be determined. The total sales data of each target product is then used as the data required for sales forecasting of the target component (which can be referred to as "target sales data").

[0174] For example, if the target products are product A and product B, the sales data of product A and product B can be summarized to obtain the summarized sales data (which can be called the "sum of sales data").

[0175] S430 performs time-series processing on the target sales data to obtain time-series data.

[0176] For example, when the target sales data of the target component is obtained, in order to decompose the target sales data, the target sales data can first be processed by time series to obtain the time-series processed target sales data (which can be called "time series data").

[0177] S440 decomposes time-series data based on a time-series decomposition algorithm and a preset period to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component.

[0178] For example, when the time series data corresponding to the target sales data is obtained, the time series data can be decomposed according to a preset period using a time series decomposition algorithm to obtain the trend component of the target component (i.e., the long-term trend term mentioned above), the periodic component of the preset period, and the residual component of the target component (i.e., the residual term mentioned above).

[0179] Optionally, when the preset period is a seasonal period, the periodic component of the preset period can be a seasonal component (i.e., the seasonal term mentioned above).

[0180] Among them, time series decomposition algorithm can refer to an algorithm for decomposing time series data, such as STL algorithm, addition model, multiplication model and Fourier decomposition.

[0181] The trend component of the target component represents the long-term trend of the time series data. The periodic component of the prediction period represents the periodic trend of the time series data. The residual component of the target component represents the trend in the time series data that cannot be expressed by the trend component and the periodic component of the prediction period.

[0182] The preset cycle can include, but is not limited to, annual cycles, seasonal cycles, monthly cycles, and weekly cycles.

[0183] S450, based on a time-series prediction algorithm and a preset period, predicts the trend component of the target component, the periodic component of the preset period, and the residual component of the target component to obtain the data characteristics of the preset period.

[0184] Among them, the data features of the preset period are used to represent the historical sales trend of the target component within the preset period.

[0185] For example, when the trend component, the periodic component of the preset period, and the residual component of the target component are obtained after decomposition, the trend component, the periodic component of the preset period, and the residual component of the target component can be predicted by a time series prediction algorithm according to the preset period, and the predicted data features can be used as the data features of the target component in the preset period.

[0186] Among them, time series prediction algorithms can refer to algorithms that predict time series data, such as LSTM and Transformer.

[0187] Optionally, the above-mentioned prediction of the trend component, the periodic component of the preset period, and the residual component of the target component based on the time-series prediction algorithm and the preset period to obtain the data characteristics of the preset period includes: predicting the trend component of the target component based on the time-series prediction algorithm to obtain a first predicted component; predicting the residual component of the target component based on the time-series prediction algorithm to obtain a second predicted component; and obtaining the data characteristics of the preset period based on the preset period, the periodic component of the preset period, the first predicted component, and the second predicted component.

[0188] For example, when the trend components of the decomposed target component are obtained, the trend components of the target component can be predicted by a time series prediction algorithm to obtain the predicted trend components (which can be called the "first predicted component").

[0189] Furthermore, when the residual components of the decomposed target component are obtained, the residual components of the target component can be predicted using a time-series prediction algorithm to obtain the predicted residual components (which can be called "second prediction components").

[0190] Furthermore, when the first prediction component and the second prediction component are predicted, the data characteristics of the preset period can be obtained by combining the preset period and the periodic component of the preset period based on the first prediction component and the second prediction component.

[0191] In this embodiment, the historical sales trend of the target component within a preset period is obtained by combining the predicted trend component (i.e., the first predicted component), the predicted residual component (i.e., the second predicted component), and the periodic component of the preset period. This avoids the problem of bias in the historical sales trend of the target component obtained from a single data point, thus improving the accuracy of the historical sales trend of the target component. Furthermore, based on the more accurate historical sales trend of the target component, the accuracy of the sales forecast results of the target component is further improved.

[0192] Optionally, the above-mentioned method of obtaining data features of the preset period based on the preset period, the periodic component of the preset period, the first prediction component, and the second prediction component includes: determining whether the change trend of the periodic component of the preset period is greater than or equal to the preset change trend; when the change trend of the periodic component of the preset period is greater than or equal to the preset change trend, predicting the periodic component of the preset period based on the time series prediction algorithm and the preset period to obtain the third prediction component; and integrating the first prediction component, the second prediction component, and the third prediction component to obtain the data features of the preset period.

[0193] For example, when the periodic component of the preset period is obtained, it can be determined whether the changing trend of the periodic component of the preset period is greater than or equal to the preset changing trend.

[0194] When the trend of change of the periodic component of the preset period is greater than or equal to the preset trend, it indicates that the fluctuation of the periodic component of the preset period is large and the stability is poor. It is necessary to use a time series prediction algorithm to predict the periodic component of the preset period according to the preset period to obtain the predicted periodic component (which can be called the "third predicted component").

[0195] Furthermore, when the first, second, and third prediction components are obtained, they can be integrated (i.e., summarized) to obtain the integrated prediction component. The integrated prediction component is then used as the data feature for the aforementioned preset period.

[0196] The preset trend can be set based on sales forecast requirements, but this application embodiment does not limit this.

[0197] It should be understood that the integrated prediction component is obtained by combining the first prediction component, the second prediction component, and the third prediction component.

[0198] In this embodiment, when the trend of the periodic component within a preset period is greater than or equal to the preset trend, it indicates that the periodic component of the preset period fluctuates significantly and has poor stability. If the periodic component of the preset period is directly used to predict the historical sales trend of the target component within that preset period, the predicted historical sales trend may not reflect the periodic fluctuations in the target component's sales data. Therefore, the periodic component of the preset period can be predicted first, and then the predicted periodic component can be used to predict the historical sales trend of the target component within that preset period. This allows the predicted historical sales trend of the target component to better reflect the periodic fluctuations in the target component's sales data, ensuring that more factors influencing the target component's sales data can be captured. Furthermore, by obtaining more factors influencing the target component's sales data and using the data characteristics corresponding to these factors to predict the target component's sales, the accuracy of the sales prediction results can be improved.

[0199] Alternatively, when the changing trend of the periodic component of the preset period is less than the preset changing trend, the first predicted component, the second predicted component, and the periodic component of the preset period are integrated to obtain the data features of the preset period.

[0200] For example, when the changing trend of the periodic component of the preset period is less than the preset changing trend, it indicates that the fluctuation of the periodic component of the preset period is small and the stability is good. The periodic component of the preset period can be directly integrated with the first prediction component and the second prediction component to obtain another integrated prediction component. The other integrated prediction component is used as the data feature of the preset period.

[0201] In this embodiment, when the trend of the periodic component within a preset period is less than the preset trend, it indicates that the fluctuation of the periodic component within the preset period is small and its stability is good. If the periodic component of the preset period is directly used to predict the historical sales trend of the target component within the preset period, it can better reflect the periodic fluctuations in the target component's sales data. Therefore, the predicted periodic component can be used to predict the historical sales trend of the target component within the preset period, ensuring that the predicted historical sales trend of the target component can better reflect the periodic fluctuations in the target component's sales data. This ensures that more factors affecting the target component's sales data can be captured. Furthermore, by obtaining more factors affecting the target component's sales data and using the data characteristics corresponding to these factors to predict the target component's sales, the accuracy of the target component's sales prediction results can be improved.

[0202] S460, based on data characteristics of a preset period, performs sales forecasting for target components and obtains sales forecast results.

[0203] For example, when the data characteristics of the target component are obtained in a preset period, the sales data of the target component can be used to make a sales forecast based on the data characteristics of the preset period, so as to obtain the corresponding sales forecast result of the target component.

[0204] The sales forecast results may include, but are not limited to, one or more of the following: forecasted sales volume of the target component, forecasted price information, forecasted sales region, forecasted inventory level, and forecasted sales users.

[0205] In such Figure 4In the method 400 shown, when a sales forecast demand for a target component is detected, the sum of sales data for each product including the target component can be determined as the sales data (i.e., target sales data) used for sales forecasting of the target component, and the corresponding time-series data after time-series processing of the target sales data can be obtained. Furthermore, when the time-series data corresponding to the target component is decomposed using a time-series decomposition algorithm and a preset period to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component, a time-series prediction algorithm and a preset period can be used to predict the trend component, the periodic component, and the residual component of the target component to obtain the historical sales trend of the target component within the preset period. Then, the future sales data of the target component is predicted using the historical sales trend of the target component within the preset period to obtain the sales forecast result. Compared to existing technologies that use fixed-parameter sales forecasting models to process sales data when dealing with periodic fluctuations in target component sales data, leading to omissions or difficulty in capturing factors influencing the target component's sales data, this solution decomposes the target sales data using a time-series decomposition algorithm and a preset period. Then, it uses a time-series forecasting algorithm and the preset period to predict the decomposed data, obtaining the historical sales trend of the target component within the preset period. This allows for the capture of the periodic fluctuations in the target component's sales data, ensuring that more factors influencing the target component's sales data are captured. Furthermore, by using the data characteristics corresponding to these factors to predict the target component's sales, the accuracy of the sales forecast results can be improved. Moreover, after decomposing the time-series data corresponding to the target component using the time-series decomposition algorithm and the preset period, the decomposed data of the target component (i.e., the trend component of the target component, the periodic component of the preset period, and the residual component of the target component) is not directly determined as the historical sales trend of the target component within the preset period. Instead of relying solely on the decomposed target component data, this method uses a time-series forecasting algorithm and a preset period to predict the data for the target component, establishing the predicted data as the historical sales trend of the target component within the preset period. Because decomposition combined with forecasting is more effective at capturing factors influencing the target component's sales data than single decomposition, it can capture more factors affecting the target component's sales data. Therefore, by obtaining more factors influencing the target component's sales data, the accuracy of the sales forecast results can be further improved.Furthermore, when a sales forecast demand for a target component is detected, the sum of the sales data of all products including the target component is determined as the sales data used for sales forecasting of the target component, rather than using only the sales data of one product as the sales data for sales forecasting of the target component. This results in richer sales data for the target component, thereby further improving the accuracy of the sales forecast results for the target component.

[0206] Optionally, a pre-trained sales forecasting model is obtained; wherein the pre-trained sales forecasting model is used to generate sales forecasting results, and the pre-trained sales forecasting model includes a decomposition module; based on a time series decomposition algorithm and a preset period, the time series data is decomposed to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component, including: in the decomposition module, based on a time series decomposition algorithm and a preset period, the time series data is decomposed to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component.

[0207] For example, when a sales forecast demand for a target component is detected, a pre-trained sales forecast model can be obtained first.

[0208] The pre-trained sales forecasting model is used to generate sales forecast results for the target component. If sales forecasts are needed for other components (which can be referred to as "non-target components"), the trained base model corresponding to that other component can be obtained. In other words, there is a one-to-one correspondence between the target component and its corresponding pre-trained sales forecasting model. This is because the pre-trained sales forecasting model for the target component can better capture the influencing factors affecting the sales data of the target component, while capturing the influencing factors of other components' sales data is prone to omissions or failures.

[0209] When decomposing time-series data, the time-series data can be decomposed in the decomposition module of the pre-trained sales forecast model corresponding to the target component using a time-series decomposition algorithm and a preset period, thereby obtaining the trend component of the target component, the periodic component of the preset period, and the residual component of the target component.

[0210] In this embodiment of the application, in the decomposition module of the pre-trained sales forecasting model used to generate sales forecast results for the target component, the time series data corresponding to the target component is decomposed. This allows the decomposed data of the target component to better reflect the periodic fluctuations of the target component's sales data, ensuring that more factors affecting the target component's sales data can be captured. Furthermore, when more factors affecting the target component's sales data are obtained, the sales forecast of the target component can be made using the data features corresponding to these factors, thereby improving the accuracy of the target component's sales forecast results.

[0211] In one possible implementation, the acquisition of the pre-trained sales forecasting model includes: acquiring the model components of the trained base model and the sales forecasting model to be trained, wherein the trained base model is used to forecast sales of non-target components, and the sales forecasting model to be trained is used to forecast sales of target components; performing transfer learning on the model components of the trained base model to obtain the initial model components of the sales forecasting model to be trained; and training the initial model components of the sales forecasting model to be trained based on the sample data of the sales forecasting model to be trained to obtain the pre-trained sales forecasting model.

[0212] For example, when a sales forecasting demand for a target component (i.e., the target domain mentioned above) is detected, if a pre-trained sales forecasting model is required, it is necessary to first obtain a maturely trained sales forecasting model (which can be referred to as a "trained base model") corresponding to the non-target component (i.e., the source domain mentioned above). This trained base model can be used to perform sales forecasting for the non-target component. Additionally, it is necessary to obtain a sales forecasting model (which can be referred to as a "sales forecasting model to be trained") corresponding to the target component that has not yet been trained.

[0213] To improve the generalization and training efficiency of the sales forecasting model to be trained, as well as to reduce training costs and difficulty, model components (which can be called "model components to be transferred") in the trained base model can be obtained, and transfer learning can be performed on the model components to be transferred through a preset transfer model to transfer the model components to be transferred to the sales forecasting model to be trained (i.e., the above model transfer), which can be used as the model components to be trained in the sales forecasting model to be trained (which can be called "initial model components").

[0214] Furthermore, once the initial model component of the sales forecasting model to be trained is obtained, sample data corresponding to the sales forecasting model to be trained can be acquired. This sample data can then be used to train the initial model component until training is complete, resulting in a pre-trained sales forecasting model corresponding to the target component. The sample data corresponding to the sales forecasting model to be trained can represent a portion of the target component's historical sales data.

[0215] Optionally, the model components to be transferred may include, but are not limited to, one or more of the following: model parameters (e.g., weights, biases, etc.), model structure (e.g., number of model layers, type of model layers, etc.), and hyperparameters (e.g., learning rate, batch size, etc.). Furthermore, the preset transfer model may include, but is not limited to, deep learning models and gradient boosting tree models.

[0216] Specifically, the prediction task in the trained base model corresponding to the non-target component can include the prediction task in the sales prediction model to be trained corresponding to the target component. Furthermore, the model components transferred from the trained base model to the sales prediction model to be trained are related to the prediction task in the sales prediction model to be trained.

[0217] In this embodiment, when obtaining the pre-trained sales forecasting model corresponding to the target component, it is not directly trained from a completely new sales forecasting model. Instead, a trained base model used for sales forecasting of other components (i.e., non-target components) is first obtained, and the model components in this trained base model are transferred to the sales forecasting model to be trained corresponding to the target component. Then, the model components transferred to the sales forecasting model to be trained are fine-tuned using sample data from the sales forecasting model to be trained, resulting in the pre-trained sales forecasting model corresponding to the target component. By transferring the model components from the trained base model, the generalization of the sales forecasting model to be trained can be improved, thereby obtaining a more adaptive pre-trained sales forecasting model and improving the accuracy of the sales forecasting results of the pre-trained sales forecasting model. Consequently, when using the pre-trained sales forecasting model to forecast the sales of the target component, the accuracy of the sales forecasting results for the target component can be further improved.

[0218] Optionally, target sample data with the same data type as the sample data of the sales forecasting model to be trained can be obtained from the sample data of the trained base model; the above-mentioned training of the initial model components of the sales forecasting model to be trained based on the sample data of the sales forecasting model to be trained to obtain a pre-trained sales forecasting model includes: training the initial model components of the sales forecasting model to be trained based on the target sample data and the sample data of the sales forecasting model to be trained to obtain a pre-trained sales forecasting model.

[0219] For example, when training the initial model components of the sales forecasting model using sample data from the model to be trained, sample data corresponding to the trained base model can also be obtained (i.e., the feature transfer mentioned above). The sample data of the trained base model can represent all or part of the historical sales data of non-target components.

[0220] When the sample data corresponding to the trained base model (which can be referred to as "first sample data") and the sample data corresponding to the sales prediction model to be trained (which can be referred to as "second sample data") are obtained, the part of the first sample data that has the same data type as the second sample data can be identified in the first sample data (which can be called "target sample data").

[0221] Once the target sample data is determined from the first sample data, the initial model component in the sales forecasting model to be trained can be trained using the target sample data and the second sample data until training is completed, thus obtaining the pre-trained sales forecasting model corresponding to the target component.

[0222] In this embodiment of the application, when fine-tuning the model components transferred to the sales forecasting model to be trained, in order to avoid the problem of insufficient training data due to the small amount of sample data of the sales forecasting model to be trained, a portion of the sample data (i.e., target sample data) with the same data type as the sample data of the sales forecasting model to be trained can be determined from the sample data corresponding to the base model after training. The determined portion of sample data is also used in the fine-tuning of the model components transferred to the sales forecasting model to be trained, thereby enriching the training data. When the pre-trained sales forecasting model trained on a large amount of training data performs sales forecasting on the target component, the accuracy of the sales forecasting results of the target component can be further improved.

[0223] Optionally, the entities and entity relationships of the sample data of the trained base model and the sample data of the sales forecasting model to be trained are obtained respectively; an entity knowledge graph is constructed based on the entities and entity relationships; the initial model components of the sales forecasting model to be trained are trained based on the target sample data and the sample data of the sales forecasting model to be trained to obtain a pre-trained sales forecasting model, including: training the initial model components of the sales forecasting model to be trained based on the entity knowledge graph, the target sample data and the sample data of the sales forecasting model to be trained to obtain a pre-trained sales forecasting model.

[0224] For example, when training the initial model components in the sales forecasting model to be trained using the target sample data and the second sample data, it is also possible to obtain the entities and entity relationships in the first sample data and the entities and entity relationships in the second sample data.

[0225] To extract more entity relationships, an entity knowledge graph can be constructed using the entities and entity relationships in the first sample data and the entities and entity relationships in the second sample data.

[0226] Furthermore, once the entity knowledge graph is constructed, the initial model components in the sales forecasting model to be trained can be trained together using the entity knowledge graph, target sample data, and second sample data until training is complete, thus obtaining the pre-trained sales forecasting model corresponding to the target component.

[0227] Specifically, when an entity knowledge graph is obtained, the entity relationships and entities in the entity knowledge graph can be obtained first (i.e., the above relationship transfer). Then, the initial model components in the sales prediction model to be trained are trained together with the entity relationships and entities in the entity knowledge graph, as well as the target sample data and the second sample data, until the training is completed, and the pre-trained sales prediction model corresponding to the target component is obtained.

[0228] The entities in the first or second sample data can represent things that have independent meaning and can be identified, such as one or more of the following: sales volume, customer information, and sales channels. Furthermore, the entity relationships in the first or second sample data can represent the associations between different entities, such as one or more of the following: sales relationships, purchasing relationships, inventory relationships, and market competition relationships.

[0229] For example, if the entity is a circuit board and the customer information is customer A, a purchase relationship can be established: customer A purchased the circuit board. This purchase relationship records customer A's purchase behavior and that the purchased item is the circuit board.

[0230] It should be noted that the entities and their relationships in the first sample data and the second sample data are independent of each other, resulting in limited training information, which is not conducive to training the initial model components in the sales forecasting model. Therefore, an entity knowledge graph is constructed using the entities and their relationships in the first and second sample data. This integrates the entities and their relationships from both sets of data, obtaining more entities and relationships, facilitating the discovery of hidden entity relationships, enriching the entity knowledge graph, and thus providing more training information, which is beneficial for training the initial model components in the sales forecasting model.

[0231] In this embodiment, when fine-tuning the model components transferred to the sales forecasting model to be trained, an entity knowledge graph can be constructed using the entities and entity relationships of the sample data of the trained base model and the sample data of the sales forecasting model to be trained. Once the entity knowledge graph is constructed, it is also used in the fine-tuning of the model components transferred to the sales forecasting model to be trained, in order to extract more entity relationships. This allows the pre-trained sales forecasting model, trained based on more entity relationships, to further improve the accuracy of sales forecast results for the target component.

[0232] For example, when the model components to be transferred in the trained base model, the target sample data in the first sample data, and the entity relationships and entities in the entity knowledge graph are obtained, the initial model components in the sales prediction model to be trained can be trained using the model components to be transferred, the target sample data, and / or the entity relationships and entities in the entity knowledge graph until training is completed, and the pre-trained sales prediction model corresponding to the target component is obtained.

[0233] Optionally, the pre-trained sales forecasting model may also include modules for multiple tasks, and these multiple tasks may represent different sales tasks for the target component, such as sales tasks, inventory tasks, and transportation tasks.

[0234] Since each of the multiple tasks affects the sales forecast results for the target component, to improve the accuracy of the pre-trained sales forecasting model, the degree of influence of each task on the sales forecast results of the target component can be determined. The weights of each task can then be adjusted based on its degree of influence, so that the sales forecast results of the pre-trained sales forecasting model are more biased towards predicting the sales data of the target component.

[0235] The degree of impact of each task is positively correlated with its own weight.

[0236] Figure 5 This is another flowchart illustrating a sales forecasting method provided in an embodiment of this application.

[0237] For example, such as Figure 5 As shown, the method 500 includes the following implementation process:

[0238] S501: When the sales forecast demand for the target component is detected, the sales data of each target product is obtained.

[0239] For example, if a sales forecast demand for a target component is detected, sales data for each target product, including that target component, can be obtained.

[0240] S502, the sum of the sales data of each target product is determined as the target sales data of the target component.

[0241] For example, when the sales data of each target product is obtained, the sum of the sales data of each target product can be determined as the target sales data of the target component.

[0242] S503 performs time-series processing on the target sales data to obtain time-series data.

[0243] For example, when the target sales data of the target component is obtained, in order to decompose the target sales data, the target sales data can first be processed by time series to obtain time series data.

[0244] S504, based on the time series decomposition algorithm and preset period, decomposes the time series data to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component.

[0245] For example, when decomposing time series data, a time series decomposition algorithm can be used to decompose the time series data according to a preset period to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component.

[0246] S505, based on the time-series prediction algorithm, predicts the trend component of the target component to obtain the first prediction component.

[0247] For example, when the trend components of the decomposed target component are obtained, the trend components of the target component can be predicted by a time series prediction algorithm to obtain the first predicted component.

[0248] S506, based on the time-series prediction algorithm, predicts the residual components of the target component to obtain the second predicted component.

[0249] For example, when the residual components of the decomposed target component are obtained, the residual components of the target component can be predicted by a time-series prediction algorithm to obtain a second predicted component.

[0250] S507, determine whether the changing trend of the periodic component of the preset period is greater than or equal to the preset changing trend. If yes, execute S508; if no, execute S510.

[0251] For example, when the periodic component of the preset period is obtained, it can be determined whether the changing trend of the periodic component of the preset period is greater than or equal to the preset changing trend.

[0252] It should be understood that S505, S506, and S507 can be executed simultaneously or sequentially, and the embodiments of this application do not limit this.

[0253] S508, based on the time series prediction algorithm and the preset period, predicts the periodic component of the preset period to obtain the third predicted component.

[0254] For example, when the change trend of the periodic component of the preset period is greater than or equal to the preset change trend obtained by S507, the periodic component of the preset period can be predicted by the time series prediction algorithm according to the preset period to obtain the third predicted component.

[0255] S509, integrate the first prediction component, the second prediction component and the third prediction component to obtain the data features of the preset period.

[0256] For example, when the first prediction component, the second prediction component, and the third prediction component are obtained, they can be integrated to obtain data features for a preset period.

[0257] S510, integrate the first predicted component, the second predicted component, and the periodic component of the preset period to obtain the data features of the preset period.

[0258] For example, when the change trend of the periodic component of the preset period is less than the preset change trend obtained by S507, the periodic component of the preset period can be integrated with the first prediction component and the second prediction component to obtain the data characteristics of the preset period.

[0259] S511, based on data characteristics of a preset period, performs sales forecasting for target components and obtains sales forecast results.

[0260] For example, when the data characteristics of the target component in a preset period are obtained through S509 or S510, the sales data of the target component can be predicted based on the data characteristics of the preset period to obtain the sales prediction result.

[0261] S512 visualizes the sales forecast results, resulting in a visualized sales forecast.

[0262] For example, when the sales forecast results for the target component are obtained, the sales forecast results can be visualized to make them more intuitive, thus obtaining visualized sales forecast results.

[0263] S513 outputs visualized sales forecast results.

[0264] For example, when a visualized sales forecast is obtained, the visualized sales forecast can be output.

[0265] In summary, when a sales forecasting demand for a target component is detected, the sum of sales data for all products including the target component can be used as the sales data for forecasting the target component. To avoid the problem of missing or failing to capture factors affecting the sales data of the target component when processing the periodic fluctuations of the target component's sales data using a fixed-parameter sales forecasting model, this solution decomposes the target sales data of the target component within a preset period to obtain the historical sales trend of the target component within that preset period. This allows for the capture of the periodic fluctuations in the target component's sales data, ensuring that more factors affecting the target component's sales data can be captured. Furthermore, by using the data characteristics corresponding to these factors to forecast the sales of the target component, the accuracy of the sales forecast results can be improved.

[0266] Furthermore, when a sales forecast demand for a target component is detected, in order to obtain richer sales data for the target component, the sum of the sales data of each product including the target component can be determined as the sales data for forecasting the sales of the target component. This further improves the accuracy of the sales forecast results for the target component based on richer sales data.

[0267] Furthermore, when acquiring the pre-trained sales forecasting model corresponding to the target component, it is not directly trained from a completely new sales forecasting model. Instead, a trained base model used for sales forecasting of other components is first acquired, and the model components in this trained base model are transferred to the sales forecasting model to be trained for the target component. Then, the model components transferred to the sales forecasting model are fine-tuned using the sample data of the sales forecasting model to be trained, the sample data of the trained base model with the same data type as the sample data of the sales forecasting model to be trained, and / or the entity knowledge graph constructed from the entities and entity relationships of the sample data of the trained base model and the sample data of the sales forecasting model to be trained. This results in a pre-trained sales forecasting model with more accurate prediction results. Consequently, when using the pre-trained sales forecasting model to forecast the sales of the target component, the accuracy of the sales forecast results for the target component can be further improved.

[0268] It should be noted that, Figure 5 All steps are in Figures 2 to 4 The corresponding embodiments are described in detail, and will not be repeated here.

[0269] It should be understood that the above examples are provided to help those skilled in the art understand the embodiments of this application, and are not intended to limit the embodiments of this application to the specific values ​​or scenarios exemplified. Those skilled in the art can obviously make various equivalent modifications or variations based on the above examples, and such modifications or variations also fall within the scope of the embodiments of this application.

[0270] The above text combined Figures 1 to 5 The sales forecasting method provided in the embodiments of this application is described in detail below; the following will be combined with Figure 6 and Figure 7 The apparatus embodiments of this application are described in detail below. It should be understood that the apparatus in the embodiments of this application can perform the various methods described in the foregoing embodiments of this application, that is, the specific working processes of the various products described below can be referred to the corresponding processes in the foregoing method embodiments.

[0271] Figure 6 This is a schematic diagram of the sales forecasting device provided in the embodiments of this application.

[0272] For example, such as Figure 6 As shown, the device 600 is configured in an electronic device and includes:

[0273] The acquisition module 610 is used to acquire sales data of each target product when the sales forecast demand of the target component is detected, wherein each target product includes the target component;

[0274] The determination module 620 is used to determine the target sales data of the target component by summing the sales data of each target product.

[0275] The time-series processing module 650 is used to perform time-series processing on the target sales data to obtain time-series data.

[0276] The decomposition module 640 is used to decompose time series data based on a time series decomposition algorithm and a preset period to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component.

[0277] The processing module 650 is used to predict the trend component, the periodic component of the preset period, and the residual component of the target component based on the time series prediction algorithm and the preset period, so as to obtain the data characteristics of the preset period. The data characteristics of the preset period are used to represent the historical sales trend of the target component in the preset period.

[0278] The prediction module 660 is used to make sales forecasts for target components based on data characteristics of a preset period and obtain sales forecast results.

[0279] In one possible implementation, the processing module 650 is specifically used for:

[0280] Based on the time-series prediction algorithm, the trend component of the target component is predicted to obtain the first predicted component;

[0281] Based on the time-series prediction algorithm, the residual components of the target component are predicted to obtain the second predicted component;

[0282] Based on the preset period, the periodic component of the preset period, the first prediction component, and the second prediction component, the data characteristics of the preset period are obtained.

[0283] In one possible implementation, the processing module 650 is specifically used for:

[0284] Determine whether the changing trend of the periodic component within the preset period is greater than or equal to the preset changing trend;

[0285] When the changing trend of the periodic component of the preset period is greater than or equal to the preset changing trend, the periodic component of the preset period is predicted based on the time series prediction algorithm and the preset period to obtain the third predicted component.

[0286] The first, second, and third prediction components are integrated to obtain data features for a preset period.

[0287] In one possible implementation, the processing module 650 is specifically used for:

[0288] When the changing trend of the periodic component of the preset period is less than the preset changing trend, the first predicted component, the second predicted component and the periodic component of the preset period are integrated to obtain the data characteristics of the preset period.

[0289] In one possible implementation, the acquisition module 610 is also used for:

[0290] Obtain a pre-trained sales forecasting model, wherein the pre-trained sales forecasting model is used to generate sales forecast results, and the pre-trained sales forecasting model includes a decomposition module;

[0291] The decomposition module 640 is specifically used for:

[0292] In the decomposition module, based on the time series decomposition algorithm and the preset period, the time series data is decomposed to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component.

[0293] In one possible implementation, the acquisition module 610 is also used for:

[0294] Obtain the model components of the trained base model and the sales forecasting model to be trained. The trained base model is used to forecast the sales of non-target components, and the sales forecasting model to be trained is used to forecast the sales of target components.

[0295] Transfer learning is performed on the model components of the trained base model to obtain the initial model components of the sales forecasting model to be trained.

[0296] Based on the sample data of the sales forecasting model to be trained, the initial model components of the sales forecasting model to be trained are trained to obtain the pre-trained sales forecasting model.

[0297] In one possible implementation, the acquisition module 610 is also used for:

[0298] Obtain target sample data from the sample data of the trained base model that has the same data type as the sample data of the sales prediction model to be trained;

[0299] Based on the target sample data and the sample data of the sales forecasting model to be trained, the initial model components of the sales forecasting model to be trained are trained to obtain the pre-trained sales forecasting model.

[0300] In one possible implementation, the acquisition module 610 is also used for:

[0301] Obtain the entities and entity relationships of the sample data of the trained base model and the sample data of the sales prediction model to be trained;

[0302] Construct an entity knowledge graph based on entities and entity relationships;

[0303] Based on entity knowledge graphs, target sample data, and sample data of the sales forecasting model to be trained, the initial model components of the sales forecasting model to be trained are trained to obtain a pre-trained sales forecasting model.

[0304] It should be noted that the aforementioned device 600 is embodied in the form of a functional module. The term "module" here can be implemented in software and / or hardware, without specific limitations.

[0305] For example, a "module" can be a software program, hardware circuit, or a combination of both that implements the above functions. Hardware circuits may include application-specific integrated circuits (ASICs), electronic circuits, processors (e.g., shared processors, proprietary processors, or combined processors) and memory for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functions.

[0306] Therefore, the modules of the various examples described in the embodiments of this application 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.

[0307] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application.

[0308] For example, such as Figure 7 As shown, the electronic device 700 includes a memory 710 and a processor 720, wherein the memory 710 stores executable program code 7101, and the processor 720 is used to call and execute the executable program code 7101 to perform a sales forecasting method.

[0309] This application can divide electronic devices into functional modules based on the above method examples. For example, each module can correspond to a separate functional module, or two or more functions can be integrated into a single processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and represents only one logical functional division; in actual implementation, there may be other division methods.

[0310] When each functional module is divided according to its corresponding function, the electronic device may include: an acquisition module, a determination module, a timing processing module, a decomposition module, a processing module, and a prediction module, etc. It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0311] The electronic device provided in this application is used to execute the sales forecasting method described above, and thus can achieve the same effect as the above implementation method.

[0312] When using integrated units, the electronic device may include a processing module and a storage module. The processing module is used to control and manage the operation of the electronic device. The storage module is used to support the execution of relevant program code and data by the electronic device.

[0313] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits shown in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and microprocessors, etc., and the storage module may be a memory.

[0314] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described in the foregoing embodiments. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs (Digital Video Discs), CD-ROMs (Compact Disc Read-Only Memory), microdrives, magneto-optical disks, ROMs (Read-Only Memory), RAMs (Random Access Memory), EPROMs (Erasable Programmable Read-Only Memory), EEPROMs (Electrically Erasable Programmable Read Only Memory), DRAMs (Dynamic Random Access Memory), VRAMs (Video Random Access Memory), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0315] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement a sales forecasting method as described in the above embodiments.

[0316] In addition, the electronic device provided in the embodiments of this application may specifically be a chip, component or module. The electronic device may include a connected processor and a memory. The memory is used to store instructions. When the electronic device is running, the processor may call and execute the instructions to make the chip execute a sales forecasting method in the above embodiments.

[0317] The electronic devices, computer-readable storage media, computer program products or chips provided in this application are all used to perform the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0318] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0319] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or 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 device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0320] The above description is merely a specific embodiment 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 sales forecasting method, characterized in that, Applied to electronic devices, the method includes: When a sales forecast demand for a target component is detected, sales data for each target product are obtained, wherein each target product includes the target component; The sum of the sales data of each target product is determined as the target sales data of the target component; The target sales data is processed using time-series methods to obtain time-series data. Based on the time series decomposition algorithm and the preset period, the time series data is decomposed to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component. Based on the time-series prediction algorithm and the preset period, the trend component of the target component, the periodic component of the preset period, and the residual component of the target component are predicted to obtain the data features of the preset period, wherein the data features of the preset period are used to represent the historical sales trend of the target component in the preset period. Based on the data characteristics of the preset period, sales forecasts are made for the target component to obtain sales forecast results.

2. The method according to claim 1, characterized in that, The time-series prediction algorithm and the preset period are used to predict the trend component of the target component, the periodic component of the preset period, and the residual component of the target component to obtain the data characteristics of the preset period, including: Based on the time-series prediction algorithm, the trend component of the target component is predicted to obtain the first predicted component; Based on the time-series prediction algorithm, the residual components of the target component are predicted to obtain a second predicted component; Based on the preset period, the periodic component of the preset period, the first prediction component, and the second prediction component, the data features of the preset period are obtained.

3. The method according to claim 2, characterized in that, The process of obtaining data features for the preset period based on the preset period, the periodic component of the preset period, the first prediction component, and the second prediction component includes: Determine whether the changing trend of the periodic component of the preset period is greater than or equal to the preset changing trend; When the changing trend of the periodic component of the preset period is greater than or equal to the preset changing trend, the periodic component of the preset period is predicted based on the time series prediction algorithm and the preset period to obtain a third predicted component. The first prediction component, the second prediction component, and the third prediction component are integrated to obtain the data features of the preset period.

4. The method according to claim 3, characterized in that, The method further includes: When the changing trend of the periodic component of the preset period is less than the preset changing trend, the first predicted component, the second predicted component, and the periodic component of the preset period are integrated to obtain the data features of the preset period.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Obtain a pre-trained sales forecasting model, wherein the pre-trained sales forecasting model is used to generate the sales forecasting results, and the pre-trained sales forecasting model includes a decomposition module; The step of decomposing the time-series data based on a time-series decomposition algorithm and a preset period to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component includes: In the decomposition module, the time series data is decomposed based on the time series decomposition algorithm and the preset period to obtain the trend component of the target component, the periodic component of the preset period, and the residual component of the target component.

6. The method according to claim 5, characterized in that, The process of obtaining the pre-trained sales prediction model includes: Obtain the model components of the trained base model and the sales forecasting model to be trained, wherein the trained base model is used to forecast the sales of non-target components, and the sales forecasting model to be trained is used to forecast the sales of the target components. Transfer learning is performed on the model components of the trained base model to obtain the initial model components of the sales prediction model to be trained. Based on the sample data of the sales forecasting model to be trained, the initial model components of the sales forecasting model to be trained are trained to obtain the pre-trained sales forecasting model.

7. The method according to claim 6, characterized in that, The method further includes: Obtain target sample data from the sample data of the trained base model that has the same data type as the sample data of the sales prediction model to be trained; The step of training the initial model components of the sales forecasting model to be trained based on the sample data of the sales forecasting model to be trained, to obtain the pre-trained sales forecasting model, includes: Based on the target sample data and the sample data of the sales forecasting model to be trained, the initial model components of the sales forecasting model to be trained are trained to obtain the pre-trained sales forecasting model.

8. The method according to claim 7, characterized in that, The method further includes: Obtain the entities and entity relationships of the sample data of the trained base model and the sample data of the sales prediction model to be trained; Based on the entities and their relationships, an entity knowledge graph is constructed. The step of training the initial model components of the sales forecasting model to be trained based on the target sample data and the sample data of the sales forecasting model to be trained, to obtain the pre-trained sales forecasting model, includes: Based on the entity knowledge graph, the target sample data, and the sample data of the sales forecasting model to be trained, the initial model components of the sales forecasting model to be trained are trained to obtain the pre-trained sales forecasting model.

9. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the electronic device to perform the method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 8.