An electronic product sales data prediction method and system based on artificial intelligence

By constructing a hybrid architecture model and using adversarial training techniques, the problems of external feature dependence and weak generalization ability of unknown shocks in electronic product sales forecasting are solved, achieving high-precision and interpretable sales forecasting.

CN121329490BActive Publication Date: 2026-06-19JINAN QITONG ELECTRONIC TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINAN QITONG ELECTRONIC TECHNOLOGY CO LTD
Filing Date
2025-11-03
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies for electronic product sales forecasting are highly dependent on external features, have weak generalization ability to unknown shocks, and have a simple model structure, which limits their predictive performance.

Method used

By constructing a hybrid architecture model based on decomposition-reconstruction and deep learning, and combining it with a predefined market impact morphology function to generate adversarial training samples, the initial sales forecast model is adversarially trained, the component weights are dynamically adjusted, and topological data analysis technology is introduced to extract deep topological features.

Benefits of technology

It significantly improves the robustness and generalization ability of the model, reduces the dependence on external data, improves prediction accuracy by more than 25%, reduces the fluctuation range of prediction error by 40%, and achieves stable response and interpretability to unknown market shocks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121329490B_ABST
    Figure CN121329490B_ABST
Patent Text Reader

Abstract

This application relates to the field of sales forecasting technology, and in particular to an artificial intelligence-based method and system for predicting electronic product sales data. The method includes: acquiring historical sales time-series data of the product to be predicted; constructing an initial sales forecasting model based on the historical sales time-series data; generating adversarial training samples based on one or more predefined market shock morphology functions, wherein the market shock morphology functions are used to simulate external events that cause abnormal fluctuations in sales; using a training dataset containing the adversarial training samples to adversarially train the initial sales forecasting model to obtain a more robust forecasting model; and predicting the future sales of the product to be predicted based on the more robust forecasting model. This solves the problems of strong dependence on external features, weak generalization ability to unknown shocks, and simple model structure in existing technologies.
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 in particular to a method and system for forecasting electronic product sales data based on artificial intelligence. Background Technology

[0002] Electronics sales forecasting is a core component of supply chain management, inventory control, and marketing decisions. Accurate sales forecasts help companies optimize production plans, reduce inventory costs, and improve capital turnover. Traditional sales forecasting methods mainly rely on time series models or simple regression analysis. These methods have good predictive performance for stationary series, but they struggle to effectively capture the nonlinear and non-stationary characteristics of electronics sales, as well as the impact of unexpected external events.

[0003] With the development of deep learning technology, models such as recurrent neural networks, long short-term memory networks, and Transformers are widely used in sales forecasting. They can automatically learn complex temporal dependencies from historical data. However, these data-driven models are highly dependent on the quality and representativeness of the training data. When encountering abnormal sales fluctuations caused by sudden external events (such as major promotional activities, supply chain disruptions, policy changes, or sudden word-of-mouth spreads) that have not appeared in the training data, the predictive performance of the model will significantly decrease, manifesting as large prediction bias and poor robustness.

[0004] Existing technologies attempt to improve model adaptability by introducing external features (such as holidays, weather, and macroeconomic indicators) or anomaly detection algorithms, but they have the following limitations:

[0005] A. High dependence on external characteristics: It is difficult to exhaustively list all external factors that may affect sales, and data on some factors (such as sudden social events) is difficult to obtain in real time and accurately.

[0006] B. Weak generalization ability to unknown shocks: The model mainly learns patterns from historical data and lacks foresight and robustness against new market shock patterns that have not appeared in historical data.

[0007] C. Simple model structure: A single model often struggles to capture the complex characteristics of sales sequences, such as linear / nonlinearity, stationary / nonstationary conditions, and short-term / long-term dependence, thus limiting prediction accuracy. Summary of the Invention

[0008] This application provides an artificial intelligence-based method and system for predicting electronic product sales data, in order to solve the problems of strong dependence on external features, weak generalization ability to unknown shocks, and simple model structure in the prior art.

[0009] The first aspect of this application provides an artificial intelligence-based method for predicting electronic product sales data, comprising the following steps: acquiring historical sales time-series data of the product to be predicted; constructing an initial sales prediction model based on the historical sales time-series data; generating adversarial training samples based on one or more predefined market shock morphology functions, wherein the market shock morphology functions are used to simulate external events that cause abnormal fluctuations in sales; using a training dataset containing the adversarial training samples to perform adversarial training on the initial sales prediction model to obtain a robust prediction model; and predicting the future sales of the product to be predicted based on the robust prediction model.

[0010] Optionally, constructing an initial sales forecasting model based on the historical sales time-series data includes: constructing a first forecasting path based on a decomposition-reconstruction framework, wherein the first forecasting path includes: performing adaptive signal decomposition on the historical sales time-series data to obtain multiple intrinsic mode components and a residual term; performing time-series forecasting on each of the intrinsic mode components and the residual term respectively; summing and reconstructing the forecasting results of all components to obtain a first forecasting result; constructing a second forecasting path based on deep learning, using a neural network model to perform end-to-end learning on the historical sales time-series data to obtain a second forecasting result; and fusing the first forecasting result and the second forecasting result through a weighted average or a neural network fusion processor to complete the construction of the initial sales forecasting model.

[0011] Optionally, the adaptive signal decomposition method is ensemble empirical mode decomposition, variational mode decomposition, or wavelet packet decomposition; the model for time-series prediction of components is an autoregressive integral moving average model, a seasonal autoregressive integral moving average model, or an exponential smoothing state-space model; and the neural network model is a long short-term memory network, a gated recurrent unit, a temporal convolutional network, or a Transformer model.

[0012] Optionally, the market shock morphology function includes at least one of the following: a pulse function, used to simulate sales spikes caused by short-term promotions and limited-time flash sales; a step function, used to simulate permanent shifts in sales levels caused by product price increases and policy changes; and an oscillating decay function, used to simulate cyclical fluctuations in sales caused by supply chain disturbances and word-of-mouth events, gradually returning to normal.

[0013] Optionally, adversarial training is performed on the initial sales forecasting model, including: constructing corresponding forecasting sub-models for each component sequence obtained by signal decomposition in the first forecasting path; introducing adversarial training samples generated for the characteristics of each component during the training process of the forecasting sub-models; and applying dynamic weights to the output of each sub-model, wherein adaptive weight decay is applied to the identified components that are significantly affected by market shocks.

[0014] Optionally, before constructing the initial sales forecasting model based on the historical sales time-series data, the method further includes: extracting local topological features that characterize the fluctuation pattern from the historical sales time-series data; and introducing the topological feature vector as an auxiliary input into the construction of the initial sales forecasting model.

[0015] Optionally, using the topological feature vector as an auxiliary input includes: using a multi-head attention mechanism to perform weighted fusion on the topological feature vector to generate a topological attention value; and concatenating or weighting the topological attention value with the hidden state of the neural network model or the prediction intermediate result of the signal decomposition model.

[0016] A second aspect of this application provides an artificial intelligence-based electronic product sales data prediction system, comprising: an acquisition module for acquiring historical sales time-series data of the product to be predicted; a construction module for constructing an initial sales prediction model based on the historical sales time-series data; a generation module for generating adversarial training samples based on one or more predefined market shock morphology functions, wherein the market shock morphology functions are used to simulate external events that cause abnormal fluctuations in sales; a training module for adversarially training the initial sales prediction model using a training dataset containing the adversarial training samples to obtain a robust prediction model; and a prediction module for predicting the future sales of the product to be predicted based on the robust prediction model.

[0017] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to perform the artificial intelligence-based electronic product sales data prediction method as described in the above embodiments.

[0018] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to perform the artificial intelligence-based electronic product sales data prediction method as described in the above embodiments.

[0019] Therefore, this application has at least the following beneficial effects:

[0020] This application's embodiments directly construct an initial model using historical time-series data, reducing reliance on external data from the source. This not only lowers the cost of data collection and preprocessing but also avoids interference with prediction results due to missing, lagging, or distorted external features. By predefining market impact morphology functions such as pulse, step, and oscillating decay types, adversarial training samples are autonomously generated within the model to simulate the impact patterns of various external events. This achieves a shift from relying on external annotations to autonomously generating adversarial data. Even in the absence of complete external feature data, the model can still learn from the generated adversarial samples and possess the ability to cope with market shocks, significantly reducing reliance on external data and effectively solving the pain point of strong dependence on external features.

[0021] By generating adversarial training samples through a predefined market shock pattern function, the impact patterns of external events on sales are transformed into quantifiable data. This allows the model to be exposed to various simulated abnormal scenarios during the training phase. Furthermore, a systematic adversarial training process is constructed, using abnormal fluctuation patterns as "stress test" samples to force the model to learn stable predictive capabilities under perturbation environments. As a result, when faced with market shocks of unknown type and intensity, the model can quickly identify and adjust its predictive logic, significantly improving generalization ability and stability, reducing the prediction error fluctuation range by more than 40%, and achieving a leap from fitting normal conditions to adapting to abnormal conditions.

[0022] By employing an adversarial training mechanism, the ability to adapt to abnormal scenarios and the ability to predict time series data are deeply integrated to form a dual system of "basic prediction + anomaly correction." On the other hand, a hybrid architecture is designed that combines a decomposition-reconstruction pathway with a deep learning pathway. The former analyzes time-frequency characteristics to handle stationary components and periodic patterns, while the latter captures deep nonlinear relationships, achieving complementary advantages. Through data augmentation and dual-pathway fusion, performance bottlenecks are overcome, resulting in a prediction accuracy improvement of over 25%. The system demonstrates stable performance across various sales models, achieving accuracy during stable periods and reliability during volatile periods.

[0023] In the adversarial training process, this application introduces an interpretable weight adjustment mechanism to dynamically adjust the weights of each decomposed component, automatically identifying and attenuating the contribution of components significantly affected by shocks. This not only improves the robustness of the model but also provides an interpretable basis for decision-making. By observing the weight changes of each component, the logic of the model in responding to different types of market shocks can be clearly understood, providing effective insights for business decisions. This achieves a unity of prediction accuracy and model interpretability, and solves the black box problem of model decision-making.

[0024] This application introduces topological data analysis technology to extract topological descriptors representing essential shape features from sales sequences. By integrating these descriptors into the prediction process through an attention mechanism, it overcomes the limitations of traditional statistical features and can identify local structural patterns (such as minute fluctuation patterns and turning point features) in sales sequences that are difficult for the human eye to perceive. This provides a deeper level of feature representation for the prediction model and further improves the prediction accuracy by 8-15%, effectively solving the limitations of feature engineering.

[0025] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0026] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0027] Figure 1 A flowchart illustrating an artificial intelligence-based method for predicting electronic product sales data, according to an embodiment of this application.

[0028] Figure 2 This is a block diagram illustrating an artificial intelligence-based electronic product sales data prediction system according to an embodiment of this application.

[0029] Figure 3 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0030] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0031] The following description, with reference to the accompanying drawings, illustrates an artificial intelligence-based method and system for predicting electronic product sales data. Addressing the issue of strong dependence on external features mentioned in the background section, this application provides an artificial intelligence-based method for predicting electronic product sales data. This method addresses the issue of strong dependence on external features by using historical sales time-series data as the core for modeling, eliminating the need for complex external features. Furthermore, it autonomously generates adversarial examples within the model through a predefined market shock morphology function, reducing external data dependence, lowering costs, and broadening the applicable scenarios. To address the issue of weak generalization to unknown shocks, adversarial examples are transformed into quantifiable training data. Combined with systematic adversarial training, the model is exposed to simulated abnormal scenarios, improving the generalization and stability to unknown shocks, thus achieving a shift from simulated to quantifiable generalization. The project represents a leap from adapting to the norm to adapting to anomalies. Addressing the bottlenecks of a single model structure, it integrates anomaly adaptation and time-series prediction capabilities through adversarial training, forming a system that combines decomposition-reconstruction with a dual-path hybrid architecture of deep learning to overcome performance bottlenecks and adapt to various sales models. Addressing the black box of model decision-making, it introduces an interpretable weight adjustment mechanism in adversarial training to dynamically adjust the weights of sequence components, achieving a balance between prediction accuracy and interpretability, providing insights for business decisions. Addressing the limitations of traditional feature engineering, it introduces topological data analysis technology to extract deep topological descriptors of sequences, breaking through the limitations of statistical features, improving prediction accuracy from the feature level, and comprehensively optimizing sales forecasting performance.

[0032] The following description, with reference to the accompanying drawings, illustrates an artificial intelligence-based method and system for predicting electronic product sales data according to an embodiment of this application.

[0033] Specifically, Figure 1 This is a flowchart illustrating an artificial intelligence-based method for predicting electronic product sales data, provided in an embodiment of this application.

[0034] like Figure 1 As shown, this AI-based method for predicting electronic product sales data includes the following steps:

[0035] In step S101, historical sales time series data of the product to be predicted are obtained.

[0036] Among them, the product to be predicted refers to the specific goods or services for which future sales need to be predicted. It can be various physical products, such as electronic products, food, and clothing, or virtual products or services, such as software subscriptions and online courses. Historical sales time series data can be a data set that records the sales volume, sales amount, and other sales-related indicators of the product to be predicted at various points in the past (such as daily, weekly, and monthly). For example, the sales volume data of a certain brand of mobile phones for each month in the past year.

[0037] It is understood that the embodiments of this application obtain historical sales time series data of the product to be predicted, which serves as the unique and direct data support for subsequent modeling.

[0038] In step S102, an initial sales forecasting model is constructed based on historical sales time-series data.

[0039] It is understood that the embodiments of this application utilize historical sales time series data to construct an initial sales forecasting model, deeply explore the inherent patterns and trends of product sales in historical data, and form a preliminary forecasting framework.

[0040] In this embodiment of the application, the initial sales forecasting model is constructed based on historical sales time-series data, including: constructing a first forecasting path based on a decomposition-reconstruction framework, the first forecasting path including: performing adaptive signal decomposition on historical sales time-series data to obtain multiple intrinsic mode components and a residual term; performing time-series forecasting on each intrinsic mode component and the residual term respectively; summing and reconstructing the forecasting results of all components to obtain a first forecasting result; constructing a second forecasting path based on deep learning, using a neural network model to perform end-to-end learning on historical sales time-series data to obtain a second forecasting result; and fusing the first forecasting result and the second forecasting result through a weighted average or a neural network fusion device to complete the construction of the initial sales forecasting model.

[0041] The decomposition-reconstruction framework is a data processing and modeling framework that first decomposes complex data into multiple relatively simple components with specific characteristics, then processes and analyzes these components separately, and finally reconstructs the processed results to obtain a deeper understanding of the original data and more accurate predictions. Intrinsic mode components can be components with specific physical meanings obtained in the adaptive signal decomposition process, and residual terms can be the parts remaining after removing all intrinsic mode components after adaptive signal decomposition.

[0042] The adaptive signal decomposition methods are ensemble empirical mode decomposition, variational mode decomposition, or wavelet packet decomposition; the models for time-series prediction of components are autoregressive integral moving average models, seasonal autoregressive integral moving average models, or exponential smoothing state-space models; the neural network models are long short-term memory networks, gated recurrent units, temporal convolutional networks, or Transformer models.

[0043] It is understood that the embodiments of this application construct a first prediction path based on a decomposition-reconstruction framework. First, adaptive signal decomposition is performed on historical sales time-series data to extract multiple intrinsic mode components and residual terms. Then, time-series predictions are performed on each component and residual term, and the results are summed and reconstructed to obtain the first prediction result. This path can accurately analyze the time-frequency characteristics of the data, effectively capture stationary components and periodic patterns in the sales data, and avoid the omission of data segmentation features by a single prediction. On the other hand, a second prediction path based on deep learning is constructed. A neural network model is used to perform end-to-end learning on historical sales time-series data to obtain the second prediction result. The two pathways excel at uncovering deep nonlinear relationships in data and capturing complex fluctuation patterns. Finally, by merging the results of the two pathways through weighted averaging or a neural network fusion processor, the advantages of the two pathways are complemented. This retains the accurate fitting of the decomposition-reconstruction to the subdivided patterns while incorporating the ability of deep learning to capture complex relationships. The resulting initial sales forecasting model not only makes full use of the diverse features of historical sales time series data but also improves the fitting accuracy to normal sales patterns, providing a higher-performance benchmark model for subsequent adversarial training. At the same time, the dual-pathway design adapts to different data features, further enhancing the applicability of the initial model in diverse sales scenarios.

[0044] Specifically, variational mode decomposition is employed to adaptively transform the original signal by constructing and solving a constrained variational problem. Decomposed into A unit with a center frequency The intrinsic mode functions (IMF) Its mathematical model is as follows:

[0045] ;

[0046] ;

[0047] in, The preset number of modes, It is the first One modal component, It is the center frequency of this mode. It is the Dirac function. It is the imaginary unit. This indicates taking the partial derivative with respect to time. The input signal to be decomposed is the original input signal.

[0048] By introducing a quadratic penalty term and Lagrange multipliers The constrained problem is transformed into an unconstrained problem, and the alternating direction multiplier method is used for iterative updates. , and Let's solve this. Ultimately, the original sequence is decomposed into:

[0049] ;

[0050] in, This is the residual term.

[0051] For sales data, the decomposed IMF may correspond to seasonal fluctuations (such as quarterly cycles), short-term promotional patterns, random noise, etc., while the residual term may represent long-term growth or decline trends.

[0052] Component prediction and summation reconstruction, for each subsequence obtained from decomposition and Choose the most suitable prediction model based on its characteristics.

[0053] For trend items It may employ Holt-Winters exponential smoothing (triple exponential smoothing), whose formula includes horizontal, trend, and seasonal components.

[0054] ;

[0055] in, , , They represent time. Horizontal, trend and seasonal components, It is a smoothing parameter.

[0056] For stationary periodic components It is possible that a seasonal autoregressive integral moving average (SARIMA) model will be used, and its model structure is as follows: Modeling is performed using autoregression (AR), differencing (I), and moving average (MA).

[0057] For high-frequency fluctuation components, a simple autoregressive model may be used.

[0058] After each component is predicted independently, we get The final output of the first prediction path is obtained by summing and reconstructing:

[0059] ;

[0060] The second prediction pathway is end-to-end learning of deep learning models, which utilizes the powerful nonlinear fitting ability of neural networks to directly learn complex mapping relationships from the original data.

[0061] Taking temporal convolutional networks as an example, their core principle is the use of dilated causal convolution to ensure that the receptive field grows exponentially over time without leaking future information. One-dimensional dilated convolution operation... In sequence elements The definition above is:

[0062] ;

[0063] in, Indicates the expansion factor as Convolution operation, Is the convolution kernel at the 1st The weight of each position, It is the kernel size. This ensured causality.

[0064] TCN avoids gradient vanishing by stacking residual blocks. Each residual block contains multiple layers of dilated causal convolutions, weight normalization, ReLU activation, and Dropout. Finally, the network processes the input sequence... Mapped to predicted output .

[0065] Dual-path fusion: a synergistic mechanism that leverages the complementary strengths of two pathways. The outputs of the two pathways are integrated through a learnable fusion mechanism, rather than a simple fixed-weight averaging.

[0066] Using a neural network fusion mechanism:

[0067] ;

[0068] in, This means concatenating the two prediction results into a single feature vector. and It is a fusion of the network's weights and biases. The function normalizes the output to weights.

[0069] In this embodiment of the application, before constructing the initial sales forecasting model based on historical sales time-series data, the method further includes: extracting local topological features that characterize the fluctuation pattern from the historical sales time-series data; and introducing the topological feature vector as an auxiliary input into the construction of the initial sales forecasting model.

[0070] Among them, local topological features are extracted from local segments of historical sales time-series data and are used to describe the spatial relationships and structural characteristics between data points in the local area; the topological feature vector is a set of numerical vectors obtained by quantizing the extracted local topological features.

[0071] It is understood that the embodiments of this application extract topological invariants composed of local extreme points in a sequence through topological data analysis methods, thereby capturing local fluctuation patterns and global topological structures that are difficult to describe by traditional methods. These topological feature vectors are weighted and fused through a multi-head attention mechanism to generate topological attention values, which are then combined with the hidden states of the neural network or the intermediate results of decomposition predictions. This significantly enhances the ability to identify non-stationary and nonlinear sales dynamics, especially when facing unknown external event shocks, it can more accurately distinguish abnormal fluctuation types and improve the robustness and accuracy of predictions.

[0072] In this embodiment of the application, the topological feature vector is used as an auxiliary input, including: using a multi-head attention mechanism to perform weighted fusion of the topological feature vector to generate a topological attention value; and concatenating or weighting the topological attention value with the hidden state of the neural network model or the prediction intermediate result of the signal decomposition model.

[0073] It is understood that the multi-head attention mechanism in this application embodiment can automatically identify key micro-fluctuation information, strengthen effective features and weaken redundant features, solve the problem of important information being buried, and make the topological attention value feature expression stronger; combining it with the key data of the model, it supplements the micro-topological feature dimension of the dual-path model, allowing the decomposition-reconstruction path to accurately identify local differences in periodic fluctuations, and the deep learning path to deepen the understanding of complex nonlinear relationships, ultimately improving the fitting accuracy of the initial model in scenarios with frequent sales fluctuations, providing a high-quality benchmark model for subsequent adversarial training, and enhancing the accuracy and reliability of future sales prediction.

[0074] Specifically, local topological features are extracted using persistent cohomology techniques in topological data analysis. The specific steps are as follows:

[0075] Sequence transformation: Convert historical sales time-series data into point clouds or time series graphs.

[0076] Persistent homology computation: Computes the persistent barcode or persistent graph of the topology on 0-dimensional and 1-dimensional homology groups. 0-dimensional homology describes the generation and disappearance of connected components, while 1-dimensional homology describes the appearance and disappearance of ring structures.

[0077] Feature vectorization: Extracting topological invariants from the barcode as features, such as the persistence interval length of homology groups in various dimensions, birth time, death time, and other statistics, and combining them into a fixed-dimensional topological feature vector. .

[0078] Feature fusion: combining topological feature vectors Input a multi-head self-attention mechanism for weighted fusion to generate topological attention values. The attention value is concatenated with the final hidden state of the deep learning pathway (such as the TCN network) and then input into the fully connected layer for prediction, thereby incorporating the global topological structure information of the data into the decision-making process of the deep learning model.

[0079] In step S103, adversarial training samples are generated based on one or more predefined market shock pattern functions, wherein the market shock pattern functions are used to simulate external events that cause abnormal fluctuations in sales.

[0080] Among them, the market shock pattern function includes at least one of the following: a pulse function, used to simulate sales spikes caused by short-term promotions and limited-time flash sales; a step function, used to simulate permanent shifts in sales levels caused by product price increases and policy changes; and an oscillating decay function, used to simulate cyclical fluctuations in sales caused by supply chain disturbances and word-of-mouth events, gradually returning to normal.

[0081] It is understood that the embodiments of this application generate adversarial training samples by introducing predefined market shock morphology functions, systematically implanting prior knowledge of abnormal market events into the model training, and realizing a paradigm shift from passively fitting data to actively adapting to disturbances. Specifically, the impulse function simulates short-term sales spikes, forcing the model to learn the peak response and decline patterns under promotional scenarios, avoiding overfitting or underfitting to sudden traffic; the step function constructs a permanent shift in sales levels, enhancing the model's ability to identify and track sudden changes in market demand baselines (such as price system adjustments and industry policy promulgations), preventing the predicted curve from lagging behind the true trend; the oscillating decay function reproduces the cyclical fluctuations and gradually convergent patterns, training the model to capture oscillation frequency and decay rate in complex events such as supply chain disruptions and word-of-mouth marketing, improving the decoupling accuracy of medium- and long-term fluctuation patterns, significantly strengthening the model's generalization and robustness when facing unknown market shocks, so that the prediction system is no longer limited to the statistical patterns of historical data, but has a structured anti-interference ability against uncertainties in the real business environment.

[0082] Specifically, a set of market impact pattern functions is defined, which contains at least the following three basis functions with explicit mathematical expressions:

[0083] Impulse-type function: Simulated using a Gaussian-like impulse or a double-exponential decay function, its mathematical expression can be represented as: ;

[0084] in, To control the pulse amplitude to simulate impact intensity, To define the center position of the pulse, t is the time of impact occurrence. To control the pulse width to simulate the duration of the impact.

[0085] This function adjusts parameters This generates short-term sales peaks of various shapes.

[0086] Step function: Simulated using the Sigmoid function or its variants, its mathematical expression can be represented as follows:

[0087] ;

[0088] in, This indicates the final magnitude of the step (the permanent shift in sales level). The center point where the step jump occurs. To control the steepness of the step.

[0089] Oscillating decay type function: Simulated using a damped sine wave, its mathematical expression can be expressed as follows:

[0090] in, The initial amplitude, The attenuation coefficient is... The oscillation frequency is... For phase.

[0091] This function uses parameters The combination of these parameters simulates the initial intensity, speed of return to normalcy, fluctuation period, and initial phase of cyclical sales fluctuations.

[0092] When generating adversarial examples, basis functions are randomly selected from the function library, and their parameters are randomly sampled within a preset range. Then, the generated impulse sequences are generated. With the original historical sales sequence According to a certain proportion Superimpose to synthesize adversarial training samples ;

[0093] By systematically changing the type and parameters of the basis functions, adversarial training datasets covering various market impact scenarios can be generated on a large scale.

[0094] It should be noted that the adversarial training employs an alternating training strategy, and its specific process is as follows:

[0095] In each training epoch, iterate through each batch of the training dataset and perform the following three steps for each batch in sequence:

[0096] Raw data training: Sample a batch of raw data from the training set and calculate the loss function between the model's predictions and the actual values. (e.g., mean squared error), and update the model parameters through backpropagation.

[0097] Adversarial example generation: With the current model parameters fixed, and using the same batch of raw data, based on a predefined library of market shock pattern functions, a pattern function is randomly selected and its parameters are sampled to generate adversarial perturbations, thus obtaining adversarial examples. ,in This is the disturbance intensity coefficient, which is set to 0.3 by default.

[0098] Adversarial data training: Input the generated adversarial examples into the model and calculate its predictive loss. The model's total loss function is defined as a weighted sum of the original data loss and the adversarial data loss:

[0099] ;

[0100] in, To balance the hyperparameters used to control the model's robustness to adversarial examples, the values ​​are typically between 0.5 and 1.0.

[0101] By minimizing While optimizing prediction accuracy, the model is forced to learn stability under perturbations and performs backpropagation and gradient descent to minimize... Update the model parameters for the target.

[0102] Through the above alternating training process, the model is forced to learn stability against adversarial perturbations while optimizing the prediction accuracy of the original data, thereby guiding its parameters to converge to a flatter region of minimum loss, and ultimately significantly enhancing the model's generalization ability in the face of unknown market shocks.

[0103] In step S104, the initial sales prediction model is adversarially trained using a training dataset containing adversarial training samples to obtain a prediction model with enhanced robustness.

[0104] Understandably, this application's embodiments proactively introduce simulated external event samples that cause abnormal sales fluctuations, enabling the model to move beyond passively fitting historical data and systematically incorporate prior knowledge of abnormal market events. The resulting predictive model exhibits significantly improved generalization and robustness, accurately capturing sales change patterns in complex market environments, effectively responding to unknown market shocks, and possessing structured anti-interference capabilities against uncertainties in real-world business environments, thereby providing more reliable and accurate sales forecasts.

[0105] In this embodiment of the application, adversarial training of the initial sales forecasting model includes: constructing corresponding prediction sub-models for each component sequence obtained by signal decomposition in the first prediction path; introducing adversarial training samples generated for the characteristics of each component during the training process of the prediction sub-models; and applying dynamic weights to the output of each sub-model, wherein adaptive weight decay is applied to the identified components that are significantly affected by market shocks.

[0106] It is understood that the embodiments of this application, by introducing an adversarial training mechanism, incorporate adversarial samples containing simulated market shocks into the model training process, fundamentally improving the robustness of the prediction model in the face of complex uncertainties in the real world. This training method enables the model to no longer merely learn the smooth patterns in historical sales data, but to actively learn how to identify and filter abnormal fluctuation signals by repeatedly exposing it to various extreme but reasonable perturbation scenarios, thereby converging in the parameter space to a flatter optimum with greater generalization ability.

[0107] After each validation cycle, the root mean square error of each sub-model on the original validation set and the adversarial validation set is calculated and denoted as . and ( (For component indexes). Calculate the error growth rate for each sub-model. .

[0108] Adaptive weight decay: Set a threshold (Default value is 0.15). For any sub-model ,like If the value is significantly affected by market shocks, then that component is determined to be significantly affected by market shocks. Its weight in model fusion... Attenuation will be applied: ,in This is the decay factor (default is 0.1). The weight decay operation is performed after each validation period to ensure that the model automatically reduces the contribution of unstable components during training, focusing on regular patterns that are less affected by shocks.

[0109] In step S105, the future sales volume of the product to be predicted is predicted based on the robustness-enhanced prediction model.

[0110] Specifically, Monte Carlo Dropout technology is used to generate dynamic forecast intervals with upper and lower boundaries, quantifying uncertainty to help inventory and production planning avoid stockpiling problems; preset market shock events are injected to conduct stress tests, and the results are compared to quantify the marginal impact of external events on sales, supporting strategy optimization and risk response; the contribution of each modal component to the forecast results is analyzed based on the decomposition-reconstruction path, clarifying the influence weight to improve interpretability and help understand the sales-driven logic; abnormal fluctuations in input data are detected through real-time pattern matching, and shock risk warnings are triggered simultaneously when outputting forecast values, giving enterprises buffer time to respond.

[0111] According to the embodiments of this application, an AI-based method for predicting electronic product sales data addresses the problem of strong dependence on external features by using historical sales time-series data as the core model, eliminating the need for complex external features. Furthermore, it autonomously generates adversarial examples within the model through a predefined market shock morphology function, reducing external data dependence, lowering costs, and broadening the applicable scenarios. To address the problem of weak generalization to unknown shocks, adversarial examples are transformed into quantifiable training data. Combined with systematic adversarial training, the model is exposed to simulated abnormal scenarios, improving its generalization and stability to unknown shocks, achieving a leap from fitting normal conditions to adapting to anomalies. To address the bottleneck of a single model structure, adversarial training integrates anomaly adaptation and time-series prediction capabilities into a system, coupled with a hybrid architecture of decomposition-reconstruction and deep learning, overcoming performance bottlenecks and adapting to various sales models. To address the black box nature of model decision-making, an interpretable weight adjustment mechanism is introduced in adversarial training to dynamically adjust the weights of sequence components, achieving a balance between prediction accuracy and interpretability, providing insights for business decisions. To address the limitations of traditional feature engineering, topological data analysis technology is introduced to extract deep topological descriptors of the sequence, overcoming statistical feature limitations, improving prediction accuracy at the feature level, and comprehensively optimizing sales prediction performance.

[0112] The following example illustrates an AI-based method for predicting electronic product sales data. Taking the monthly sales forecast of a certain brand of smartphones in the Chinese market as an application scenario, this brand faces various market shocks such as seasonal promotions, supply chain fluctuations, and competitors releasing new products. It urgently needs an intelligent forecasting system that can accurately predict future sales and assess potential risks.

[0113] Monthly sales data for this brand's smartphones were collected from January 2020 to December 2024, totaling 60 data points. The data from the first 54 months (January 2020 to June 2024) was used as the training set, and the data from the last 6 months (July 2024 to December 2024) was used as the test set.

[0114] The initial sales forecasting model construction includes two forecasting pathways and a model fusion stage. The first forecasting pathway is a decomposition-reconstruction pathway. Variational mode decomposition is first used to decompose the sales series in the training set. After setting the number of modes, three intrinsic mode components (IMF1, IMF2, IMF3) and one residual term are obtained. Then, forecasting models are built for each component. The residual term (representing the long-term trend) adopts the Holt-Winters triple exponential smoothing model, and IMF1 (reflecting annual periodicity) adopts SARIMA(1,1,1)(1,1,1). 12 The models are as follows: IMF2 (reflecting quarterly fluctuations) adopts the SARIMA(1,0,0)(1,0,0)3 model, and IMF3 (for high-frequency noise) adopts the AR(2) model. The second prediction path is a deep learning path. A prediction model based on a temporal convolutional network (TCN) is constructed. The network structure contains 4 residual blocks, each with 2 layers of dilated causal convolutions (with dilation factors). The kernel size is set, the hidden layer dimension is 64, the input is the sales sequence of the past 12 months, and the output is the sales forecast for the next 6 months. Finally, the model is fused using a neural network fusion device. Its structure is a two-layer fully connected network (input dimension 2, hidden layer dimension 8, output dimension 1), and the Softmax activation function is used to automatically learn the weight distribution of the two path outputs.

[0115] Adversarial training sample generation: Defining three types of market shock pattern functions:

[0116] Impulse-type function: Simulated using a Gaussian-like impulse or a double-exponential decay function, its mathematical expression can be represented as:

[0117] ;

[0118] in, To control the pulse amplitude to simulate impact intensity, To define the center position of the pulse, t is the time of impact occurrence. To control the pulse width to simulate the duration of the impact.

[0119] Parameter range: A∈[1000,5000] (units), μ∈[1,12] (months), σ∈[0.5,2] (months).

[0120] Step function: Simulated using the Sigmoid function or its variants, its mathematical expression can be represented as follows:

[0121] ;

[0122] in, This indicates the final magnitude of the step (the permanent shift in sales level). The center point where the step jump occurs. To control the steepness of the step.

[0123] Parameter range: Δ∈[−2000,2000] (units), t0∈[1,12] (months), k∈[0.5,3].

[0124] Oscillating decay type function: Simulated using a damped sine wave, its mathematical expression can be expressed as follows: ;

[0125] in, The initial amplitude, The attenuation coefficient is... The oscillation frequency is... For phase.

[0126] Parameter range: B∈[500,2000] (units), β∈[0.1,0.5], ω∈[0.1,0.3], ϕ∈[0,2π];

[0127] During adversarial training, one of the three functions is randomly selected each training epoch. Parameters are randomly sampled to generate adversarial examples, which are then superimposed onto the original training data at 30% intensity (η=0.3). Each component of the VMD decomposition is trained separately, with a weight decay applied to the high-frequency component IMF3 (initially 0.2, decaying to 0.02 every 10 epochs). The training hyperparameters are set as follows: learning rate 0.001, batch size 32, and training epochs 200. Prediction results show that on the test set from July to December 2024, the mean absolute error (MAE) is 1,250 units, a 40.5% improvement over the single TCN model; the root mean square error (RMSE) is 1,580 units, a 43.6% improvement over the SARIMA model; and the mean absolute percentage error (MAPE) is 8.7%, reaching an industry-leading level.

[0128] Uncertainty quantification employs Monte Carlo Dropout (Dropout rate = 0.1, sampling count = 100) to generate 95% confidence intervals. For example, with a predicted value of 15,800 units in October 2024, the interval is [14,200, 17,500] units, with a width of 3,300 units, representing 20.9% of the predicted value, providing a reasonable risk boundary. Under stress testing scenarios, simulating the impact of the "Double 11" shopping festival (a pulse-type impact injected in November, A = 4000, σ = 0.8), the baseline prediction for November sales is 16,500 units, while the stress test prediction is 20,200 units, resulting in a marginal impact of +3,700 units (+22.4%). Simulating the impact of a "supply chain disruption" (an oscillating decay-type impact injected from July to September, B = 1500, β = 0.3, ω = 0.25), the predicted impact for total Q3 sales is -2,800 units (-5.8%).

[0129] Attribution analysis was conducted on the forecast results for December 2024. Analysis of component contributions revealed that the long-term trend component had a significant impact on the forecast results, contributing +8,200 units, accounting for +46.3%; the annual cycle component followed closely, contributing +6,500 units, accounting for +36.7%; the quarterly fluctuation component contributed +1,800 units, accounting for +10.2%; and the random fluctuation component, while initially having some influence, still contributed +1,250 units after weight attenuation, accounting for +7.1%. Combining all components, the final total forecast value was 17,750 units.

[0130] In summary, an initial model was constructed through two prediction pathways: decomposition-reconstruction and deep learning. Adversarial examples were generated using three types of market shock morphology functions for training. The final model performed excellently on the test set, with error metrics reaching industry-leading levels. Furthermore, the model achieved uncertainty quantification, stress testing, and attribution analysis of the prediction results.

[0131] Next, referring to the accompanying drawings, we describe an artificial intelligence-based electronic product sales data prediction system according to an embodiment of this application.

[0132] Figure 2 This is a block diagram of an AI-based electronic product sales data prediction system according to an embodiment of this application.

[0133] like Figure 2 As shown, the AI-based electronic product sales data prediction system 10 includes: an acquisition module 100, a construction module 200, a generation module 300, a training module 400, and a prediction module 500.

[0134] The system comprises the following modules: Acquisition module 100 acquires historical sales time-series data of the product to be predicted; Construction module 200 constructs an initial sales forecasting model based on the historical sales time-series data; Generation module 300 generates adversarial training samples based on one or more predefined market shock morphology functions, wherein the market shock morphology functions are used to simulate external events that cause abnormal fluctuations in sales; Training module 400 performs adversarial training on the initial sales forecasting model using a training dataset containing adversarial training samples to obtain a robust forecasting model; and Prediction module 500 predicts the future sales of the product to be predicted based on the robust forecasting model.

[0135] It should be noted that the foregoing explanation of the embodiment of the AI-based electronic product sales data prediction method also applies to the AI-based electronic product sales data prediction system of this embodiment, and will not be repeated here.

[0136] The AI-based electronic product sales data prediction system proposed in this application addresses the issue of strong dependence on external features by using historical sales time-series data as the core for modeling, eliminating the need for complex external features. It also autonomously generates adversarial examples within the model through a predefined market shock morphology function, reducing external data dependence, lowering costs, and broadening applicable scenarios. To address the issue of weak generalization to unknown shocks, adversarial examples are transformed into quantifiable training data. Combined with systematic adversarial training, the model is exposed to simulated abnormal scenarios, improving its generalization and stability to unknown shocks, achieving a leap from fitting normal conditions to adapting to anomalies. To address the bottleneck of a single model structure, adversarial training integrates anomaly adaptation and time-series prediction capabilities into a system. Coupled with a hybrid architecture combining decomposition-reconstruction and deep learning, it overcomes performance bottlenecks and adapts to various sales models. To address the black box nature of model decision-making, an interpretable weight adjustment mechanism is introduced in adversarial training to dynamically adjust the weights of sequence components, achieving a balance between prediction accuracy and interpretability, providing insights for business decisions. To address the limitations of traditional feature engineering, topological data analysis technology is introduced to extract deep topological descriptors of the sequence, overcoming statistical feature limitations and improving prediction accuracy at the feature level, comprehensively optimizing sales prediction performance.

[0137] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:

[0138] The memory 301, the processor 302, and the computer program stored on the memory 301 and capable of running on the processor 302.

[0139] When the processor 302 executes the program, it implements the artificial intelligence-based electronic product sales data prediction method provided in the above embodiments.

[0140] Furthermore, electronic devices also include:

[0141] Communication interface 303 is used for communication between memory 301 and processor 302.

[0142] The memory 301 is used to store computer programs that can run on the processor 302.

[0143] The memory 301 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage.

[0144] If the memory 301, processor 302, and communication interface 303 are implemented independently, then the communication interface 303, memory 301, and processor 302 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0145] Optionally, in a specific implementation, if the memory 301, processor 302, and communication interface 303 are integrated on a single chip, then the memory 301, processor 302, and communication interface 303 can communicate with each other through an internal interface.

[0146] Processor 302 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0147] This application also provides a computer-readable storage medium storing a computer program or instructions thereon, which, when executed by a processor, implements the above-described artificial intelligence-based electronic product sales data prediction method.

[0148] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0149] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0150] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0151] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or more of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0152] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

Claims

1. A method for predicting electronic product sales data based on artificial intelligence, characterized in that, Includes the following steps: Obtain historical sales time-series data for the product to be predicted; Local topological features characterizing the fluctuation pattern are extracted from the historical sales time-series data. These topological feature vectors are used as auxiliary inputs and incorporated into the initial sales forecasting model. The initial sales forecasting model is constructed based on the historical sales time-series data, including: constructing a first prediction path based on a decomposition-reconstruction framework; the first prediction path includes: performing adaptive signal decomposition on the historical sales time-series data to obtain multiple intrinsic mode components and a residual term; performing time-series prediction on each intrinsic mode component and the residual term; summing and reconstructing the prediction results of all components to obtain a first prediction result; constructing a second prediction path based on deep learning, using a neural network model to perform end-to-end learning on the historical sales time-series data to obtain a second prediction result; and fusing the first prediction result and the second prediction result through a weighted average or a neural network fusion processor to complete the construction of the initial sales forecasting model. Based on one or more predefined market shock pattern functions, adversarial training samples are generated, wherein the market shock pattern functions are used to simulate external events that cause abnormal fluctuations in sales, and wherein the market shock pattern functions include at least one of the following: Impulse functions are used to simulate sales spikes caused by short-term promotions and limited-time flash sales. Step function is used to simulate permanent shifts in sales levels caused by product price increases or policy changes. Oscillating decay function is used to simulate the cyclical fluctuations in sales caused by supply chain disturbances and word-of-mouth events, and the gradual return to normal. The initial sales prediction model is adversarially trained using a training dataset containing the adversarial training samples to obtain a prediction model with enhanced robustness. Based on the robustness-enhanced prediction model, the future sales volume of the product to be predicted is forecasted. 2.The electronic product sales data prediction method based on artificial intelligence according to claim 1, wherein, The adaptive signal decomposition method is ensemble empirical mode decomposition, variational mode decomposition, or wavelet packet decomposition; the model for time-series prediction of components is an autoregressive integral moving average model, a seasonal autoregressive integral moving average model, or an exponential smoothing state-space model; the neural network model is a long short-term memory network, a gated recurrent unit, a temporal convolutional network, or a Transformer model. 3.The AI-based electronic product sales data prediction method of claim 1, wherein, Adversarial training of the initial sales forecasting model includes: For each component sequence obtained by signal decomposition in the first prediction path, a corresponding prediction sub-model is constructed. During the training process of the prediction sub-model, adversarial training samples generated for the characteristics of each component are introduced. Dynamic weights are applied to the outputs of each sub-model, with adaptive weight decay applied to the components that are identified as significantly affected by market shocks. 4.The AI-based electronic product sales data prediction method of claim 1, wherein, The step of using topological feature vectors as auxiliary input includes: The topological feature vectors are weighted and fused using a multi-head attention mechanism to generate topological attention values; The topological attention value is concatenated or weighted with the hidden state of the neural network model or the intermediate prediction result of the signal decomposition model.

5. An artificial intelligence-based electronic product sales data prediction system, characterized in that, include: The acquisition module is used to acquire historical sales time-series data of the product to be predicted; A construction module is used to extract local topological features that characterize the fluctuation pattern from the historical sales time-series data; The topological feature vector is used as an auxiliary input to construct the initial sales forecast model. The initial sales forecast model is constructed based on the historical sales time-series data. This involves constructing a first prediction path based on a decomposition-reconstruction framework. The first prediction path includes: performing adaptive signal decomposition on the historical sales time-series data to obtain multiple intrinsic mode components (IMCs) and a residual term; performing time-series prediction on each IMC and the residual term; summing and reconstructing the prediction results of all components to obtain a first prediction result; constructing a second prediction path based on deep learning, using a neural network model to perform end-to-end learning on the historical sales time-series data to obtain a second prediction result; and fusing the first prediction result and the second prediction result through a weighted average or a neural network fusion processor to complete the construction of the initial sales forecast model. A generation module is used to generate adversarial training samples based on one or more predefined market shock pattern functions, wherein the market shock pattern functions are used to simulate external events that cause abnormal fluctuations in sales, and wherein the market shock pattern functions include at least one of the following: Impulse functions are used to simulate sales spikes caused by short-term promotions and limited-time flash sales. Step function is used to simulate permanent shifts in sales levels caused by product price increases or policy changes. Oscillating decay function is used to simulate the cyclical fluctuations in sales caused by supply chain disturbances and word-of-mouth events, and the gradual return to normal. The training module is used to adversarially train the initial sales prediction model using a training dataset containing the adversarial training samples to obtain a prediction model with enhanced robustness. The prediction module is used to predict the future sales volume of the product to be predicted based on the robustness-enhanced prediction model.

6. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the artificial intelligence-based electronic product sales data prediction method as described in any one of claims 1-4.

7. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they are used to implement the artificial intelligence-based electronic product sales data prediction method as described in any one of claims 1-4.