Part demand prediction method and device, electronic equipment and storage medium

By using two different demand prediction models, combining time series data and environmental feature data, and introducing attenuation factors, the problem that the spare parts demand prediction model in the prior art is difficult to capture the characteristics of demand change, achieving higher prediction accuracy.

CN120218482APending Publication Date: 2025-06-27GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510261007.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, the parts demand prediction model based on deep learning is difficult to capture the changing characteristics of demand, resulting in poor prediction accuracy.

Method used

Two pre-trained demand prediction models are used for prediction. The first model combines time series data, environmental feature data and attribute feature data for prediction processing. The second model introduces attenuation factors to characterize the degree of demand decreasing with time by smoothing prediction network, adjusting factor units and predicting fusion units.

Benefits of technology

By combining the prediction results of the two models, the changing characteristics of spare parts demand can be captured more accurately, the accuracy of demand forecasting can be improved, and more reliable data basis for supply chain management and inventory control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218482A_ABST
    Figure CN120218482A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a part demand prediction method and device, electronic equipment and a storage medium, and relates to the technical field of supply chain management, and the method comprises the steps: obtaining the original data of a to-be-predicted part, carrying out the processing of the original data through two different demand prediction models which are trained in advance, and carrying out the prediction to obtain a demand prediction result, and then the final target demand prediction result is determined by using the demand prediction results output by the two models, the accuracy of part demand prediction can be improved to a certain extent, and the parameters of one demand prediction model comprise an attenuation factor used for representing the decrease degree of the demand quantity along with time increase. Therefore, the demand prediction model can more accurately capture the demand change characteristics of the spare and accessory parts, and the precision of spare and accessory part demand prediction is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of supply chain management, and in particular, to a method, apparatus, electronic device, and storage medium for predicting spare part requirements. Background Art

[0002] In some manufacturing industries, such as the automotive manufacturing industry, accurate prediction of spare part requirements is crucial for optimizing inventory control and supply chain management. Therefore, how to improve the accuracy of spare part requirement prediction has always been a popular research topic.

[0003] Currently, in the related art, when predicting spare part requirements based on deep learning, existing spare part requirement data is usually collected to train a prediction model for spare part requirement prediction tasks.

[0004] However, since the demand level of spare parts often has the characteristics of low frequency and sparse distribution, and there is a decay phenomenon in the demand for spare parts in the later stage of production, it is difficult for the models trained in the related art to capture the changing characteristics of the demand quantity, resulting in poor prediction accuracy of the trained prediction model for the demand quantity. Summary of the Invention

[0005] The present disclosure provides a method, apparatus, electronic device, and storage medium for predicting spare part requirements to solve the problem in the related art that the prediction accuracy of the model for the demand quantity is poor because the model is difficult to capture the changing characteristics of the demand quantity.

[0006] In a first aspect, an embodiment of the present disclosure provides a method for predicting spare part requirements, including:

[0007] Obtain the original data of the spare part to be predicted, where the original data includes time series data representing the demand quantity of the spare part to be predicted in at least one preset time period;

[0008] Process the original data by using a pre-trained first demand prediction model, and obtain a first demand prediction result output by the first demand prediction model;

[0009] Process the time series data by using a pre-trained second demand prediction model, and obtain a second demand prediction result output by the second demand prediction model, where the parameters of the second demand prediction model include a decay factor, and the decay factor is used to characterize the degree of decline in the demand quantity over time;

[0010] Based on the first demand prediction result and the second demand prediction result, determine a target demand prediction result corresponding to the spare part to be predicted in the next preset time period.

[0011] Optionally, the original data further includes attribute feature data corresponding to the time series data and environmental feature data corresponding to the at least one preset time period;

[0012] The processing of the original data by using the pre-trained first demand prediction model includes:

[0013] Inputting the time series data, the environmental feature data, and the attribute feature data into the first demand prediction model for demand quantity prediction processing.

[0014] In this embodiment, when using the first demand prediction model for demand prediction, the time series data, the environmental feature data, and the attribute feature data are all input into the first demand prediction model for demand quantity prediction processing. Since external factors such as weather factors and regional factors have a certain impact on the demand quantity, the environmental feature data generated according to weather data, regional data, etc. is input into the first demand prediction model for demand quantity prediction, which can enable the first demand prediction model to capture the relationship between the demand quantity and the environmental features and predict a demand quantity prediction result that matches the environmental features; the attribute features are constructed by statistically analyzing the time series values in the time series data and can reflect the change characteristics of the demand quantity. Therefore, inputting the attribute feature data into the first demand prediction model for demand quantity prediction can enable the first demand prediction model to capture the characteristics of the demand quantity changing over time and predict a demand quantity prediction result that meets the attribute features, enabling the first demand prediction model to predict the demand quantity based on richer features, which helps to further improve the accuracy of the prediction result.

[0015] Optionally, the method further includes:

[0016] Constructing a multi-dimensional vector based on the time series data and performing tensor decomposition on the multi-dimensional vector to obtain reconstructed sequence features;

[0017] Performing normalization processing on each eigenvalue in the reconstructed sequence features to obtain standard sequence features;

[0018] The inputting the time series data, the environmental feature data, and the attribute feature data into the first demand prediction model for demand quantity prediction processing includes:

[0019] Inputting the standard sequence features, the environmental feature data, and the attribute feature data into the first demand prediction model for demand quantity prediction processing.

[0020] In this embodiment, by performing tensor decomposition on time series data, standardizing the reconstructed sequence features obtained, and inputting the obtained standard sequence features, environmental feature data, and attribute feature data into the first demand prediction model for demand prediction processing. Since the standard sequence features are obtained by constructing a multi-dimensional vector from time series data, performing tensor decomposition on the multi-dimensional vector, and then performing standardization processing, tensor decomposition can accurately extract features in time series data and reduce the dimension, simplifying the representation and processing of data and improving the model processing efficiency. By standardizing the reconstructed sequence features after tensor decomposition, the influence of higher features on the prediction result can be weakened. Furthermore, using the standard sequence features obtained through standardization processing to predict the demand can improve the reliability of the prediction result.

[0021] Optionally, the second demand prediction model includes a smoothing prediction network, an adjustment factor unit, and a prediction fusion unit;

[0022] The processing of the time series data using the pre-trained second demand prediction model includes:

[0023] Inputting the time series data into the smoothing prediction network for demand quantity and demand interval prediction to obtain a demand quantity prediction result and a demand interval prediction result;

[0024] Inputting the demand quantity prediction result and the demand interval prediction result into the adjustment factor unit to determine an adjustment factor;

[0025] Inputting the demand quantity prediction result, the demand interval prediction result, and the adjustment factor into the prediction fusion unit, and the prediction fusion unit determines the second demand prediction result based on the attenuation factor.

[0026] In this embodiment, by inputting time series data into the smoothing prediction network for demand quantity and demand interval prediction to obtain a demand quantity prediction result and a demand interval prediction result, then the adjustment factor unit determines the adjustment factor using the demand quantity prediction result and the demand interval prediction result, and finally the prediction fusion unit determines the second demand prediction result based on its own attenuation factor and the input adjustment factor, demand quantity prediction result, and demand interval prediction result. Since the adjustment factor is determined based on the demand quantity prediction result and the demand interval prediction result and can reflect the interval change of non-zero demand quantities, and the attenuation factor of the prediction fusion unit can characterize the degree of decline in demand with time, therefore, by determining the adjustment factor and introducing the attenuation factor to determine the prediction result, the demand change trend within the product life cycle can be accurately captured, especially the demand decline phenomenon that may occur in long-term predictions, thereby improving the accuracy of demand prediction.

[0027] Optionally, the adjustment factor unit determines the adjustment factor in the following manner:

[0028] Obtain the first sum value of each demand prediction value in the demand quantity prediction result;

[0029] Obtain the second sum value of each interval prediction value in the demand interval prediction result;

[0030] Determine the first product of the first sum value and the second sum value;

[0031] Determine the second product of the demand prediction value and the interval prediction value at the corresponding time points in the demand quantity prediction result and the demand interval prediction result;

[0032] Calculate the ratio of the sum value of the second products at each time point divided by the first product as the adjustment factor.

[0033] In this embodiment, by using the adjustment factor module, the adjustment factor is determined according to the demand quantity prediction result and the demand interval prediction result and is used for the determination of the second demand prediction value. The adjustment factor is determined according to the demand quantity prediction result and the demand interval prediction result and can reflect the interval change of non-zero demand quantities. Therefore, using the adjustment factor for the determination of the second demand prediction value helps to reduce the prediction deviation and thus improve the accuracy of the prediction result.

[0034] Optionally, determining the target demand prediction result corresponding to the spare parts to be predicted in the next preset time period based on the first demand prediction result and the second demand prediction result includes:

[0035] Obtain the first weight corresponding to the first demand prediction model and the second weight corresponding to the second demand prediction model, where the first weight and the second weight are determined according to the prediction results of the first demand prediction model and the second demand prediction model;

[0036] Perform weighted summation based on the first weight and the first demand prediction result, and the second weight and the second demand prediction result to obtain the target demand prediction result.

[0037] In this embodiment, by obtaining the weights corresponding to each demand prediction model respectively, the weights of the demand prediction models are determined according to the prediction results of the demand prediction models, such that the weights of the demand prediction models are positively correlated with the accuracy of their prediction results. The model with a more accurate prediction result has a higher weight. Furthermore, weighted summation is performed using the weights corresponding to each demand prediction model and their output demand prediction results to obtain the finally determined target demand prediction result, realizing a more reasonable fusion of the demand prediction results of the two demand prediction models to determine the final demand prediction result, which helps to improve the reliability and rationality of the final demand prediction result.

[0038] Optionally, obtaining the first weight corresponding to the first demand prediction model and the second weight corresponding to the second demand prediction model includes:

[0039] Obtaining the first historical prediction result of the first demand prediction model and the second historical prediction result of the second demand prediction model;

[0040] Obtaining the historical actual demand quantity for the time period corresponding to the first historical prediction result;

[0041] Based on the first historical prediction result and the historical actual demand quantity, determining the first deviation corresponding to the first demand prediction model;

[0042] Based on the second historical prediction result and the historical actual demand quantity, determining the second deviation corresponding to the second demand prediction model;

[0043] Based on the first deviation and the second deviation, respectively determining the first weight and the second weight.

[0044] In this embodiment, by obtaining the historical prediction results of two demand prediction models and the historical actual demand quantity for the corresponding time period, and according to the deviations between the historical prediction results output by the two demand prediction models and the historical actual demand quantity respectively, determining the weights corresponding to the two demand prediction models, such that the weights of the demand prediction models are positively correlated with the prediction accuracy of the models. The demand prediction model with more accurate prediction has a larger weight, and its prediction result accounts for a larger proportion in the final result and has a higher influence, thereby further improving the accuracy of the final demand prediction result.

[0045] In a second aspect, an embodiment of the present disclosure provides a spare part demand prediction device, including:

[0046] A data acquisition module, configured to acquire the original data of the spare part to be predicted, where the original data includes time series data for representing the demand quantity of the spare part to be predicted in at least one preset time period;

[0047] A first prediction module, configured to process the original data by using a pre-trained first demand prediction model, and acquire a first demand prediction result output by the first demand prediction model;

[0048] A second prediction module, configured to process the time series data by using a pre-trained second demand prediction model, and acquire a second demand prediction result output by the second demand prediction model, where the parameters of the second demand prediction model include a decay factor, and the decay factor is used to characterize the degree to which the demand quantity decreases as time increases;

[0049] A result determination module, configured to determine a target demand prediction result corresponding to the spare part to be predicted in the next preset time period based on the first demand prediction result and the second demand prediction result.

[0050] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor; a memory for storing executable instructions executable by the processor; the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the spare part demand prediction method as described in the first aspect.

[0051] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, storing a computer program for implementing the spare part demand prediction method as described in the first aspect.

[0052] Through the above technical solutions, the spare part demand prediction method, device, electronic device and storage medium provided by the present disclosure predict the demand quantity of spare parts by pre-training two different demand prediction models, obtain two demand prediction results, and then determine the final target demand prediction result according to these two demand prediction results. Therefore, compared with the solution of using a single model for demand prediction in the traditional solution, using the demand prediction results of two demand prediction models to determine the final demand prediction result can utilize the diversity and complementarity of different demand prediction models, make up for the weaknesses of different models, and can improve the accuracy of spare part demand prediction to a certain extent, providing a more reliable data basis for supply chain management and inventory control; moreover, among the two demand prediction models adopted in this solution, the parameters of one demand prediction model include a decay factor for characterizing the degree of decline in demand quantity as time increases. By introducing the decay factor into the demand prediction model to reflect the demand level that changes as time increases, the demand prediction model can more accurately capture the demand change characteristics of spare parts, improve the demand prediction accuracy of the demand prediction model, and on the basis of ensuring the accuracy of the prediction result by using the dual model for demand prediction, characterize the change in demand quantity as time increases by introducing the characteristics of the decay factor to improve the prediction accuracy of the demand prediction model, and further improve the accuracy of spare part demand prediction.

[0053] The above description is only an overview of the technical solutions of the present disclosure. In order to be able to understand the technical means of the present disclosure more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features and advantages of the present disclosure more obvious and understandable, the specific embodiments of the present disclosure are specifically given below. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In conjunction with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the embodiments of the present disclosure will become clearer and more apparent to those of ordinary skill in the art. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and are only for the purpose of showing the preferred embodiments, and are not considered to be a limitation of the present disclosure. The original components and elements are not necessarily drawn to scale.

[0055] Figure 1 It is a schematic flow chart of a spare part demand prediction method provided by an exemplary embodiment of the present disclosure;

[0056] Figure 2 It is a schematic flow chart of a spare part demand prediction method provided by another exemplary embodiment of the present disclosure;

[0057] Figure 3 It is a schematic flow chart of a spare part demand prediction method provided by yet another exemplary embodiment of the present disclosure;

[0058] Figure 4 It is a schematic flow chart of a spare part demand prediction method provided by still another exemplary embodiment of the present disclosure;

[0059] Figure 5 It is a schematic diagram of a prediction framework for intermittent time series provided by a specific embodiment of the present disclosure;

[0060] Figure 6 It is a schematic structural diagram of a spare part demand prediction device provided by an embodiment of the present disclosure. Specific Embodiments

[0061] The embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0062] It should be understood that the various steps recorded in the method embodiments of the present disclosure can be executed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.

[0063] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0064] It should be noted that the concepts such as "first", "second", etc. mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0065] It should be noted that the modification of "one" and "plural" mentioned in this disclosure is illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".

[0066] The names of the messages or information exchanged between multiple devices in the embodiments of this disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0067] The following will explain in detail the spare parts demand prediction method, device, electronic device and storage medium provided by this disclosure with reference to the accompanying drawings.

[0068] In view of the characteristics of intermittency (low frequency) and small sample size in the demand for spare parts in the manufacturing industry (such as the automotive manufacturing industry), and the problem that in the related art, a single prediction model is used for the demand prediction of spare parts, and due to the difficulty in capturing the law of demand change, the accuracy of the prediction result is not good, this disclosure provides a spare parts demand prediction solution to improve the accuracy of demand prediction and provide a more reliable basis for supply chain management and inventory control.

[0069] Among them, the intermittency feature can be characterized by different indicators. Commonly used feature indicators include Average Demand Interval (ADI) and Coefficient of Variation (CV). Among them, ADI is defined as the ratio of the total number of cycles to the number of demand occurrences within the total cycle. ADI≥1.32 indicates that the data has the characteristics of intermittent distribution; CV is a statistic that measures the relative dispersion degree of data, and is defined as the ratio of the standard deviation of historical non-zero demand to the average value of historical non-zero demand.

[0070] Figure 1A flowchart of a spare part demand prediction method provided by an exemplary embodiment of the present disclosure. This method can be executed by a spare part demand prediction device provided by an embodiment of the present disclosure. The device can be implemented in software and / or hardware and integrated in an electronic device.

[0071] As Figure 1 shown, the spare part demand prediction method may include the following steps:

[0072] Step 101: Obtain the original data of the spare parts to be predicted. The original data includes time series data representing the demand for the spare parts to be predicted in at least one preset time period.

[0073] Among them, the preset time period can be set according to actual business needs, such as one year, one quarter, four months, one month, one week, etc.; the time granularity (i.e., the demand statistics period) between the timestamps corresponding to each demand in the time series data can also be set according to actual business needs, such as set to one month, one week, one day, etc.

[0074] For example, the time series data can be the sequence data of the demand for the spare parts to be predicted each month in the most recent year (i.e., the preset time period is one year). Based on this time series data, the demand for each month in the next year can be predicted.

[0075] For another example, the time series data can include multiple subsequences. Each subsequence can be the sequence data of the demand for the spare parts to be predicted every half month in a quarter (i.e., the preset time period is a quarter). Based on the time series data, the demand for the spare parts to be predicted every half month in the latest quarter can be predicted.

[0076] Step 102: Process the original data using a pre-trained first demand prediction model and obtain the first demand prediction result output by the first demand prediction model.

[0077] Among them, the first demand prediction model can be pre-trained. By collecting existing relevant data and training the initial model, a trained demand prediction model (for ease of description and distinction, called the first demand prediction model) is obtained. Among them, the initial model can adopt Light Gradient Boosting Machine (LightGBM), or other network models with different structures. The present disclosure does not limit this.

[0078] Taking the example of training the first demand prediction model using the LightGBM model, the original data related to the spare parts to be predicted collected can be preprocessed first, including but not limited to feature engineering, missing value processing, data standardization, etc., and the processed data is divided into a training set and a test set. Among them, the original data includes time series data of the demand for the spare parts to be predicted in different time periods, and may also include some external environment data and attribute feature data (such as statistical features and rollback features of the demand). Then, set the parameters of the LightGBM model, including the objective parameter used to specify the school task and the corresponding learning objective, and its parameter values are, for example, binary classification (binary), multi-classification (multiclass), regression (regression). In this disclosure, the value of the objective parameter is selected as "regression"; the boosting_type parameter used to specify the boosting type, and its parameter values are, for example, Gradient Boosting Decision Tree (GBDT), Dropouts meet Multiple Additive Regression Trees (DART), Gradient-based One-Side Sampling (GOSS), etc., where the default parameter value is GBDT; the num_leaves parameter used to specify the maximum number of leaves of the tree, with a default value of 31. The larger the value of this parameter, the more complex the model and the easier it is to overfit; the max_depth parameter used to specify the maximum depth of the tree, which can be used to limit the complexity of the tree and prevent overfitting. By default, it is not restricted; the learning_rate parameter or eta parameter used to specify the learning rate for each iteration, with a default value of 0.1. A smaller learning rate usually requires more iterations to achieve better results; the feature_fraction parameter used to specify the proportion of features randomly selected for each tree, with a default value of 1. When set to 1, it means using all features.

[0079] Exemplarily, the parameter settings of the LightGBM model can be: the value of the objective parameter is regression, the value of the boosting_type parameter is GBDT, the value of the num_leaves parameter is 31, the value of the learning_rate parameter is 0.05, and the value of the feature_fraction parameter is 0.9.

[0080] After setting the model parameters of the LightGBM model, the LightGBM model can be used to train the model on the training set, enabling the model to learn the characteristics of the data in the training set to complete the demand prediction task. Parameter tuning can be performed through methods such as cross-validation to obtain better model performance. Subsequently, the performance of the trained model can be evaluated on the test set, and the performance of the model can be evaluated using evaluation metrics such as Root Mean Square Error (RMSE) and Mean Absolute Percentage Error (MAPE), and the effect of the model can be tested to select the optimal parameters, thereby obtaining the trained first demand prediction model.

[0081] In this embodiment, for the obtained original data, it can be input into the first demand prediction model, and the first demand prediction model is used to process the original data to predict the demand for the spare parts to be predicted in the next preset time period, and the demand prediction result (for ease of description and distinction, referred to as the first demand prediction result) is output.

[0082] Step 103, use the pre-trained second demand prediction model to process the time series data, and obtain the second demand prediction result output by the second demand prediction model, where the parameters of the second demand prediction model include a decay factor, and the decay factor is used to characterize the degree to which the demand decreases as time increases.

[0083] Among them, the second demand prediction model is pre-trained. By collecting existing demand data, the initial model is trained to obtain a trained demand prediction model (for ease of description and distinction, referred to as the second demand prediction model). Among them, the initial model can be a model improved from the Croston model. The model parameters of the initial model include a decay factor used to characterize the degree to which the demand decreases as time increases. By introducing the decay factor, the demand level that decreases as time increases is reflected. The initial model is iteratively trained using the collected demand data, enabling the model to learn the characteristics of the demand data to complete the demand prediction task. During the training process, the decay factor and other model parameters of the model are continuously adjusted and optimized, and the effect of the model can be tested according to performance metrics such as RMSE and MAPE to select the optimal parameters to obtain the trained second demand prediction model.

[0084] In this embodiment, the time series data in the original data is input into the second demand prediction model, and the second demand prediction model is used to process the time series data to predict the demand for the spare parts to be predicted in the next preset time period, and the demand prediction result (for ease of description and distinction, referred to as the second demand prediction result) is output.

[0085] In an alternative embodiment of the present application, before inputting the time series data into the first demand forecasting model or the second demand forecasting model, the values in the time series data can be normalized first to reduce the differences between the values in the time series data and weaken the influence of outliers such as larger or smaller values in the time series data on the forecasting results, thereby ensuring the accuracy of the forecasting results.

[0086] It should be noted that in this embodiment, the execution order of steps 102 and 103 is not sequential, and the two can be executed sequentially or simultaneously. Figure 1 The illustrated embodiment only takes the execution of step 103 after step 102 as an example to explain the present disclosure, and cannot be used as a limitation to the present disclosure.

[0087] Step 104, based on the first demand forecasting result and the second demand forecasting result, determine the target demand forecasting result corresponding to the spare parts to be forecasted.

[0088] In this embodiment, after obtaining the first demand forecasting result output by the first demand forecasting model and the second demand forecasting result output by the second demand forecasting model, the final forecasted demand quantity (referred to as the target demand forecasting result) of the spare parts to be forecasted in the next preset time period can be determined based on the first demand forecasting result and the second demand forecasting result.

[0089] As an example, the mean value of the first demand forecasting result and the second demand forecasting result can be calculated as the target demand forecasting result.

[0090] As another example, the larger value of the first demand forecasting result and the second demand forecasting result can be selected as the target demand forecasting result to reduce the probability that the inventory of the spare parts to be forecasted cannot meet the actual demand.

[0091] The spare part demand prediction method provided by the embodiments of the present disclosure obtains the original data of the spare part to be predicted, where the original data includes time series data used to represent the demand quantity of the spare part to be predicted in at least one preset time period; processes the original data by using a pre-trained first demand prediction model, and obtains a first demand prediction result output by the first demand prediction model; processes the time series data by using a pre-trained second demand prediction model, and obtains a second demand prediction result output by the second demand prediction model, where the parameters of the second demand prediction model include a decay factor, and the decay factor is used to characterize the degree to which the demand quantity decreases as time increases; determines the target demand prediction result corresponding to the spare part to be predicted in the next preset time period based on the first demand prediction result and the second demand prediction result. By adopting the solution of the present disclosure, the demand quantity of spare parts is predicted by pre-training two different demand prediction models to obtain two demand prediction results, and then the final target demand prediction result is determined according to these two demand prediction results. Therefore, compared with the solution of using a single model for demand prediction in the traditional solution, using the demand prediction results of two demand prediction models to determine the final demand prediction result can utilize the diversity and complementarity of different demand prediction models, make up for the weaknesses of different models, and can improve the accuracy of spare part demand prediction to a certain extent, providing a more reliable data basis for supply chain management and inventory control; moreover, among the two demand prediction models adopted in this solution, the parameters of one demand prediction model include a decay factor used to characterize the degree to which the demand quantity decreases as time increases. By introducing the decay factor into the demand prediction model to reflect the demand level that changes with time, the demand prediction model can more accurately capture the demand change characteristics of spare parts, improve the demand prediction accuracy of the demand prediction model. On the basis of ensuring the accuracy of the prediction result by using the dual-model for demand prediction, the change of the demand quantity with time is characterized by introducing the feature of the decay factor to improve the prediction accuracy of the demand prediction model, and further improves the accuracy of spare part demand prediction.

[0092] The demand for some spare parts is usually also related to factors such as weather and region. In order for the model to learn richer features and further improve the prediction accuracy of the first demand prediction model, in an alternative implementation manner of the present disclosure, the original data further includes attribute feature data corresponding to time series data and environmental feature data corresponding to at least one preset time period. Among them, the attribute feature data may include, but is not limited to, statistical features of demand (such as the mean and standard deviation of demand), lag features (used to represent the time series lag values of historical demand), rollback features (which can be represented by the historical rolling average of demand), and life cycle features (used to represent the time span from the listing to the delisting of spare parts); the environmental feature data may include, but is not limited to, weather features corresponding to weather data (such as temperature, humidity, precipitation, etc.), regional features corresponding to regional data (i.e., the geographical location information of the sales area of the spare parts to be predicted), and holiday features corresponding to holiday data (whether a specific date is a holiday).

[0093] For the attribute feature data, statistical features, lag features, rollback features, etc. can be constructed by statistically analyzing the time series values in the time series data (i.e., the demand corresponding to each moment). For example, for the lag feature, the lag feature is determined by analyzing which time stamp's demand before a certain time stamp is highly correlated with the demand at that time stamp. For example, for the data at time t, assuming that the data at this moment is highly correlated with the data of the previous day, the same day of last week, the same day of last month, and the data of the same period last year, then, the data of t-1, t-7, t-30, and t-365 can be used as the lag feature. For the rollback feature, a rolling window can be set. For example, the rolling window can be set to one day, one week, two weeks, one month, etc. The average value within the rolling window period from the current moment is statistically calculated as the rollback feature of the current moment. Assuming the rolling window is 7 days, for the time t in the time series data, the statistical values (such as the average value) of the previous seven days can be taken as the rollback feature, that is, the average value of the demand in the time period from t-1 to t-8 is used as the rollback feature of time t. It can be understood that the median, standard deviation, maximum value, minimum value, etc. of the demand in the time period from t-1 to t-8 can also be statistically calculated as the rollback feature.

[0094] For the environmental feature data, weather data, regional data, and holiday data for at least one preset time period can be collected, and these categorical data can be converted into numerical features through one-hot encoding.

[0095] Taking weather characteristics as an example, assume that a weather dataset is collected, which contains three categories: "Sunny" (clear sky), "Rainy" (rainy day), and "Snowy" (snowy day). After using one-hot encoding, the original weather data will be converted into three columns, with each column representing a weather category, as shown in Table 1 below.

[0096] Table 1

[0097] Weather data Sunny Rainy Snowy t1: Sunny 1 0 0 t2: Rainy 0 1 0 t3: Sunny 1 0 0 t4: Snowy 0 0 1

[0098] Thus, in this embodiment, when using the first demand prediction model for demand prediction, the time series data, environmental feature data, and attribute feature data are all input into the first demand prediction model for demand quantity prediction processing. Since external factors such as weather factors and regional factors have a certain impact on the demand quantity, the environmental feature data generated based on weather data, regional data, etc. is input into the first demand prediction model for demand quantity prediction, which can enable the first demand prediction model to capture the relationship between the demand quantity and environmental features and predict a demand quantity prediction result that matches the environmental features; the attribute features are constructed by statistically analyzing the time series values in the time series data and can reflect the change characteristics of the demand quantity. Therefore, inputting the attribute feature data into the first demand prediction model for demand quantity prediction can enable the first demand prediction model to capture the characteristics of the demand quantity changing over time and predict a demand quantity prediction result that meets the attribute features, enabling the first demand prediction model to predict the demand quantity based on richer features and helping to further improve the accuracy of the prediction result.

[0099] The demand quantities in the time series data are not balanced, and there may be individual large or small values, which may affect the accuracy of the prediction result. To reduce the impact of these values on the prediction result, the time series data can be processed and the processed data can be input into the demand prediction model for demand quantity prediction. Thus, in an optional implementation manner of the present disclosure, as Figure 2 shown, based on the foregoing embodiment, the spare parts demand prediction method of the present disclosure may further include the following steps:

[0100] Step 201, construct a multi-dimensional vector based on the time series data and perform tensor decomposition on the multi-dimensional vector to obtain reconstructed sequence features.

[0101] Among them, the currently common dimension conversion methods can be used to perform dimension conversion on time series data to obtain multi-dimensional vectors. For example, the Multi-channel Delay Embedding Transform (MDT) can be used to convert time series data into multi-dimensional vectors. MDT is a technology that converts a one-dimensional time series into a multi-dimensional representation. When performing dimension conversion, it is necessary to first select appropriate delay parameters τ and dimension d according to autocorrelation and partial autocorrelation. Then, a multi-dimensional vector can be constructed according to the delay parameters τ and dimension d. For any timestamp t in the time series data, a d-dimensional vector is constructed and expressed as: X t =[x t ,x t +τ,x t +2*τ…,x t +(d - 1)*τ], so that the demand corresponding to several timestamps in the time series data is included, that is, several d-dimensional vectors are constructed and obtained.

[0102] Next, for the constructed multi-dimensional vectors, tensor decomposition can be performed to obtain reconstructed sequence features. Among them, currently common tensor decomposition methods such as Tucker tensor decomposition and CP decomposition can be used to perform tensor decomposition on the multi-dimensional vectors.

[0103] Exemplarily, taking Tucker tensor decomposition of multi-dimensional vectors as an example, Tucker tensor decomposition decomposes a tensor into the product of a core tensor and a series of factor matrices. Tucker tensor decomposition decomposes the constructed multi-dimensional vector into a core tensor G∈R^(R1*R2*R3) and factor matrices An∈R^(In*Rn), where R1, R2, and R3 represent the dimensions of the core tensor; the factor matrices include A1∈R^(I1*R1), A2∈R^(I2*R2), and A3∈R^(I3*R3), and I1, R1 represent the dimensions of factor matrix A1, I2, R2 represent the dimensions of factor matrix A2, and I3, R3 represent the dimensions of factor matrix A3. Then, the reconstructed sequence features are calculated through the reconstruction formula X = G×1A1×2A2×3A3, where ×n (n = 1, 2, 3) represents the n-mode product. Obtaining the reconstructed sequence features through the product of the core tensor and the factor matrices can map the high-dimensional multi-dimensional vectors to a low-dimensional tensor space and achieve dimensionality reduction.

[0104] Step 202, perform standardization processing on each eigenvalue in the reconstructed sequence features to obtain standard sequence features.

[0105] Among them, currently common data standardization processing methods can be used to perform standardization processing on each eigenvalue in the reconstructed sequence features to obtain standard sequence features.

[0106] As an example, the Z-Score normalization method can be used to normalize the reconstructed sequence features. Specifically, all the feature values in the reconstructed sequence features can be obtained, and based on these feature values, the feature mean can be calculated through mean calculation, and the feature standard deviation can be calculated through standard deviation calculation. Then, using the determined feature mean and feature standard deviation, each feature value in the reconstructed sequence can be normalized to obtain the standard sequence features. Among them, for any feature value z in the reconstructed sequence features, it can be normalized through the following formula (1):

[0107]

[0108] where μ represents the feature mean, σ represents the feature standard deviation, and z′ represents the normalized feature value.

[0109] By normalizing each feature value in the reconstructed sequence features, the influence of outliers such as larger or smaller feature values in the reconstructed sequence features on the prediction results can be reduced.

[0110] Therefore, in this embodiment, when obtaining the first demand prediction result using the first demand prediction model, the standard sequence features, environmental feature data, and attribute feature data can be input into the first demand prediction model for demand quantity prediction processing to obtain the first demand prediction result. Since the standard sequence features are obtained by constructing a multi-dimensional vector from time series data, performing tensor decomposition on the multi-dimensional vector, and then performing normalization processing, tensor decomposition can accurately extract the features in the time series data and reduce the dimension, simplify the representation and processing of the data, and improve the model processing efficiency; by normalizing the reconstructed sequence features after tensor decomposition, the influence of higher features on the prediction result can be weakened, and then using the standard sequence features obtained by normalization processing to predict the demand quantity can improve the reliability of the prediction result.

[0111] In an alternative embodiment of the present disclosure, the second demand prediction model includes a smoothing prediction network, an adjustment factor unit, and a prediction fusion unit. When performing model training, the smoothing prediction network, the adjustment factor unit, and the prediction fusion unit are jointly trained rather than separately trained. As Figure 3 shown, based on the foregoing embodiment, step 103 may include the following sub-steps:

[0112] Step 301, input the time series data into the smoothing prediction network for demand quantity and demand interval prediction, and obtain the demand quantity prediction result and the demand interval prediction result.

[0113] Among them, the smoothing prediction network processes the input time series data through the exponential smoothing formula, predicts both the demand quantity and the demand interval parts respectively, and outputs the demand quantity prediction result and the demand interval prediction result.

[0114] Exemplarily, the smoothing prediction network can adopt the Croston model. The exponential smoothing formula for demand quantity prediction is expressed as formula (2) below, and the exponential smoothing formula for demand interval prediction can be expressed as formula (3) below:

[0115] V T+1|T = αx T +(1 - α)V T (2)

[0116] Z T+1|T = β*Q + (1 - β)Z T (3)

[0117] Where α and β represent the exponential smoothing factors, which are model parameters that need to be adjusted and optimized through model training; x T represents the actual demand quantity corresponding to the T time stamp, V T represents the predicted value corresponding to the T time stamp, V T+1 represents the predicted value corresponding to the (T + 1) time stamp, Q represents the number of intervals since the last non-zero demand quantity, Z T represents the predicted value of the interval at the T time stamp, Z T+1 represents the predicted value of the interval at the (T + 1) time stamp.

[0118] Using the Croston model, the exponentially smoothed demand quantity prediction result (denoted as V) of the non-zero sequence can be determined, and the number of zeros between consecutive non-zero demand intervals in the demand sequence can be determined. Adding 1 to the number gives a time interval, and then the demand interval prediction result can be obtained by exponential smoothing prediction.

[0119] Step 302: Input the demand quantity prediction result and the demand interval prediction result into the adjustment factor unit to determine the adjustment factor.

[0120] In this embodiment, after obtaining the demand quantity prediction result and the demand interval prediction result, inputting the demand quantity prediction result and the demand interval prediction result into the adjustment factor unit can determine the adjustment factor.

[0121] In an alternative embodiment of the present disclosure, the adjustment factor unit determines the adjustment factor in the following manner: obtaining the sum value of each demand prediction value in the demand quantity prediction result (for the convenience of description and distinction, referred to as the first sum value), and obtaining the sum value of each interval prediction value in the demand interval prediction result (for the convenience of description and distinction, referred to as the second sum value), and determining the product of the first sum value and the second sum value (for the convenience of description and distinction, referred to as the first product); and, determining the product of the demand prediction value and the interval prediction value at the corresponding time point in the demand quantity prediction result and the demand interval prediction result (for the convenience of description and distinction, referred to as the second product); finally, calculating the ratio of the sum value of the second product at each time point to the first product as the adjustment factor.

[0122] That is to say, the adjustment factor unit determines the adjustment factor through the following formula (4):

[0123]

[0124] where V i represents the demand prediction value at the i-th time stamp in the demand quantity prediction result, and Z i represents the interval prediction value at the i-th time stamp in the demand interval prediction result, represents the determined adjustment factor.

[0125] In this embodiment, by using the adjustment factor module, the adjustment factor is determined according to the demand quantity prediction result and the demand interval prediction result and is used for the determination of the second demand prediction value. The adjustment factor is determined according to the demand quantity prediction result and the demand interval prediction result and can reflect the interval change of non-zero demand quantities. Therefore, using the adjustment factor for the determination of the second demand prediction value helps to reduce the prediction deviation and thus improve the accuracy of the prediction result.

[0126] Step 303: Input the demand quantity prediction result, the demand interval prediction result, and the adjustment factor into the prediction fusion unit, and the prediction fusion unit determines the second demand prediction result based on the decay factor.

[0127] Among them, the parameters of the prediction fusion unit include the decay factor, and the decay factor is introduced to reflect the demand level that decreases with time.

[0128] In this embodiment, the demand quantity prediction result, the demand interval prediction result, and the adjustment factor are input into the prediction fusion unit, and the prediction fusion unit performs prediction fusion according to the above input data and its own parameters (including the decay factor) to obtain the second demand prediction result.

[0129] Exemplarily, the prediction fusion unit can determine the second demand prediction result through the following formula (5):

[0130]

[0131] Among them, t represents the t-th timestamp of the current prediction, and V t represents the demand prediction value corresponding to the t-th timestamp, and Z t represents the interval prediction value corresponding to the t-th timestamp, δ represents the decay factor, 0 < δ < 1, and y t represents the final demand prediction value corresponding to the t-th timestamp. The final demand prediction values corresponding to all determined timestamps constitute the second demand prediction result.

[0132] As can be seen from the above description, in this embodiment, for the training of the second demand prediction model, the model parameters that need to be adjusted and optimized include the exponential smoothing factor and the decay factor in the exponential smoothing formula. The number of model parameters to be optimized is small, so the second demand prediction model can be trained relatively quickly.

[0133] In the spare parts demand prediction method of this embodiment, the time series data is input into the smoothing prediction network to predict the demand quantity and the demand interval, obtaining the demand quantity prediction result and the demand interval prediction result. Then, the adjustment factor unit determines the adjustment factor using the demand quantity prediction result and the demand interval prediction result. Finally, the prediction fusion unit determines the second demand prediction result based on its own decay factor and the input adjustment factor, demand quantity prediction result, and demand interval prediction result. Since the adjustment factor is determined according to the demand quantity prediction result and the demand interval prediction result and can reflect the interval change of non-zero demand quantities, and the decay factor of the prediction fusion unit can characterize the degree of decline in demand quantity over time, therefore, by determining the adjustment factor and introducing the decay factor to determine the prediction result, the demand change trend within the product life cycle can be accurately captured, especially the demand decline phenomenon that may occur in long-term predictions, thereby improving the accuracy of demand prediction.

[0134] The solution of the present disclosure is to perform demand prediction by two demand prediction models respectively, and then determine the final demand prediction result according to the demand prediction results respectively output by the two demand prediction models. Therefore, it is very necessary to reasonably fuse the demand prediction results output by the two demand prediction models to ensure the accuracy of the final demand prediction result. In an alternative embodiment of the present disclosure, as Figure 4 shown, on the basis of the foregoing embodiment, step 104 may include the following sub-steps:

[0135] Step 401, obtain the first weight corresponding to the first demand prediction model and the second weight corresponding to the second demand prediction model, where the first weight and the second weight are determined according to the prediction results of the first demand prediction model and the second demand prediction model.

[0136] As an example, the average of the first demand prediction result and the second demand prediction result can be calculated, and then the first demand prediction result and the second demand prediction result are respectively compared with the obtained average value. A larger weight (e.g., 0.6) is set for the model corresponding to the one with a smaller difference from the average value among the first demand prediction result and the second demand prediction result, and a smaller weight (e.g., 0.4) is set for the model corresponding to the one with a larger difference from the average value, so as to obtain the first weight corresponding to the first demand prediction model and the second weight corresponding to the second demand prediction model. For example, assume that the difference between the first demand prediction result and the average value is smaller, while the difference between the second demand prediction result and the average value is larger. Then, a larger weight is set for the first demand prediction model as the first weight, and a smaller weight is set for the second demand prediction model as the second weight. Among them, the sum of the first weight and the second weight is 1. As another example, the historical prediction results output by the first demand prediction model and the second demand prediction model for demand prediction in the past can be obtained respectively. Among them, the historical prediction result obtained from the first demand prediction model is called the first historical prediction result, and the historical prediction result obtained from the second demand prediction model is called the second historical prediction result. The timestamps corresponding to the first historical prediction result and the second historical prediction result are the same; and, the historical actual demand quantity corresponding to the time period of the first historical prediction result is obtained. It can be understood that since the timestamps corresponding to the first historical prediction result and the second historical prediction result are the same, the second historical prediction result also corresponds to the same time period as the obtained historical actual demand quantity. Then, based on the first historical prediction result and the historical actual demand quantity, the first deviation corresponding to the first demand prediction model is determined, and based on the second historical prediction result and the historical actual demand quantity, the second deviation corresponding to the second demand prediction model is determined. For example, the mean absolute error (MAE) between the first historical prediction result and the historical actual demand quantity can be calculated as the first deviation. Similarly, the MAE between the second historical prediction result and the historical actual demand quantity is calculated as the second deviation. Finally, based on the first deviation and the second deviation, the first weight and the second weight are respectively determined. Among them, if the statistical index used to determine the deviation is that the smaller the index value, the smaller the difference between the predicted value and the true value, then a larger weight is assigned to the demand prediction model corresponding to the smaller value among the first deviation and the second deviation. On the contrary, if the statistical index used to determine the deviation is that the larger the index value, the smaller the difference between the predicted value and the true value, then a larger weight is assigned to the demand prediction model corresponding to the larger value among the first deviation and the second deviation.

[0137] The MAE can be used as a statistical index to measure the deviation between the prediction result of the demand prediction model and the actual demand quantity. Since the smaller the MAE, the smaller the difference, the first weight and the second weight can be determined through the following formula (6):

[0138]

[0139] Among them, w1 represents the first weight, w2 represents the second weight, MAE1 represents the first deviation, and MAE2 represents the second deviation.

[0140] In this embodiment, by obtaining the historical prediction results of two demand prediction models and the historical true demand quantities in the corresponding time periods, and based on the deviations between the historical prediction results output by the two demand prediction models and the historical true demand quantities respectively, the weights corresponding to the two demand prediction models are determined, such that the weights of the demand prediction models are positively correlated with the prediction accuracies of the models. The demand prediction model with a more accurate prediction has a larger weight, and its prediction result occupies a greater proportion in the final result and has a higher influence, thereby further improving the accuracy of the final demand prediction result.

[0141] Step 402: Perform weighted summation based on the first weight and the first demand prediction result, and the second weight and the second demand prediction result to obtain the target demand prediction result.

[0142] Among them, the target demand prediction result = the first weight * the first demand prediction result + the second weight * the second demand prediction result.

[0143] The spare part demand prediction method of this embodiment determines the weights corresponding to each demand prediction model by obtaining the weights corresponding to each demand prediction model, where the weights of the demand prediction models are determined according to the prediction results of the demand prediction models, such that the weights of the demand prediction models are positively correlated with the accuracies of their prediction results. The model with a more accurate prediction result has a higher weight. Furthermore, weighted summation is performed using the weights corresponding to each demand prediction model and their output demand prediction results to obtain the finally determined target demand prediction result, realizing a more reasonable integration of the demand prediction results of the two demand prediction models to determine the final demand prediction result, which helps to improve the reliability and rationality of the final demand prediction result.

[0144] Figure 5 It is a schematic diagram of a prediction framework for intermittent time series provided by a specific embodiment of the present disclosure, which can implement the spare part demand prediction method of the present disclosure. As Figure 5As shown in the figure, the prediction framework includes two parts: a tensor light gradient boosting machine model (the first demand prediction model) and a linear decay exponential model (the second demand prediction model), which are respectively used for demand prediction. Among them, the tensor light gradient boosting machine model processes the original data. After performing multi-channel delay embedding transformation on the time series data in the original data and then performing tensor decomposition, and performing feature transformation on the external environment data and internal attribute data in the original data in the feature engineering part, the transformed environmental feature data, attribute feature data, and the standard sequence features after tensor decomposition are input into the LightGBM model for demand prediction, and the LightGBM model outputs the predicted value. The linear decay exponential model includes the Croston model, an adjustment factor unit, and a prediction fusion unit. The time series data in the original data is first input into the Croston model. The demand sequence and demand interval sequence are determined according to the time series data. Then, the demand quantity prediction and the demand time interval prediction are performed through the smoothing exponential formula to obtain the demand quantity prediction result and the demand interval prediction result. The prediction value fusion part is implemented by the adjustment factor unit and the prediction fusion unit. First, the adjustment factor unit determines the adjustment factor according to the demand quantity prediction result and the demand interval prediction result. Then, the prediction fusion unit determines the predicted value according to the adjustment factor, the demand quantity prediction result, the demand interval prediction result, and its own decay factor. The model fusion part is used to fuse the predicted values output by the two models to obtain the final demand prediction result.

[0145] In addition, as Figure 5 shown, the effects of the two models can also be fed back. Managers can regularly evaluate the impact of marketing activities on demand prediction and adjust the parameters of the demand prediction model in a timely manner or add new influencing factors to maintain the timeliness and accuracy of demand prediction. This includes but is not limited to:

[0146] (1) Parameter adjustment: Adjust the parameters of the first demand prediction model according to market feedback, such as the learning rate, tree depth, etc.; adjust the exponential smoothing factor and decay factor in the second demand prediction model;

[0147] (2) Adding new influencing factors: According to information such as the marketing activity plan, add new influencing factors, construct new feature values, add the feature values to the feature engineering, and retrain the first demand prediction model to ensure the prediction accuracy of the model.

[0148] To implement the above embodiments, the present disclosure also provides a spare parts demand prediction device.

[0149] Figure 6 As shown in the structural schematic diagram of the spare parts demand prediction device provided by an embodiment of the present disclosure, the device is implemented in a software and / or hardware manner and can be integrated in an electronic device.

[0150] As Figure 6As shown in the figure, the spare parts demand prediction device 50 may include: a data acquisition module 510, a first prediction module 520, a second prediction module 530, and a result determination module 540.

[0151] Among them, the data acquisition module 510 is used to acquire the original data of the spare parts to be predicted, and the original data includes time series data for representing the demand quantity of the spare parts to be predicted in at least one preset time period;

[0152] The first prediction module 520 is used to process the original data by using a pre-trained first demand prediction model, and obtain a first demand prediction result output by the first demand prediction model;

[0153] The second prediction module 530 is used to process the time series data by using a pre-trained second demand prediction model, and obtain a second demand prediction result output by the second demand prediction model. Among them, the parameters of the second demand prediction model include an attenuation factor, and the attenuation factor is used to characterize the degree of decline in the demand quantity as time increases;

[0154] The result determination module 540 is used to determine a target demand prediction result corresponding to the spare parts to be predicted in the next preset time period based on the first demand prediction result and the second demand prediction result.

[0155] Optionally, the original data further includes attribute feature data corresponding to the time series data and environmental feature data corresponding to at least one preset time period; the first prediction module 520 is further used for:

[0156] Inputting the time series data, environmental feature data, and attribute feature data into the first demand prediction model for demand quantity prediction processing.

[0157] Further optionally, the spare parts demand prediction device 50 further includes:

[0158] A decomposition module, which is used to construct a multi-dimensional vector based on the time series data, and perform tensor decomposition on the multi-dimensional vector to obtain reconstructed sequence features;

[0159] A normalization module, which is used to perform normalization processing on each eigenvalue in the reconstructed sequence features to obtain standard sequence features;

[0160] The first prediction module 520 is further used for:

[0161] Inputting the standard sequence features, environmental feature data, and attribute feature data into the first demand prediction model for demand quantity prediction processing.

[0162] Optionally, the second demand prediction model includes a smoothing prediction network, an adjustment factor unit, and a prediction fusion unit; the second prediction module 530 is further used for:

[0163] Input the time series data into the smoothing prediction network for demand quantity and demand interval prediction to obtain the demand quantity prediction result and the demand interval prediction result;

[0164] Input the demand quantity prediction result and the demand interval prediction result into the adjustment factor unit to determine the adjustment factor;

[0165] Input the demand quantity prediction result, the demand interval prediction result and the adjustment factor into the prediction fusion unit, and the prediction fusion unit determines the second demand prediction result based on the attenuation factor.

[0166] Further optionally, the adjustment factor unit determines the adjustment factor in the following manner:

[0167] Obtain the first sum value of each demand prediction value in the demand quantity prediction result;

[0168] Obtain the second sum value of each interval prediction value in the demand interval prediction result;

[0169] Determine the first product of the first sum value and the second sum value;

[0170] Determine the second product of the demand prediction value and the interval prediction value at the corresponding time point in the demand quantity prediction result and the demand interval prediction result;

[0171] Calculate the ratio of the sum value of the second product at each time point divided by the first product as the adjustment factor.

[0172] Optionally, the result determination module 510 includes:

[0173] A weight acquisition unit for acquiring the first weight corresponding to the first demand prediction model and the second weight corresponding to the second demand prediction model, wherein the first weight and the second weight are determined according to the prediction results of the first demand prediction model and the second demand prediction model;

[0174] A result determination unit for performing weighted summation based on the first weight and the first demand prediction result, and the second weight and the second demand prediction result to obtain the target demand prediction result.

[0175] Further optionally, the weight acquisition unit is further configured to:

[0176] Obtain the first historical prediction result of the first demand prediction model and the second historical prediction result of the second demand prediction model;

[0177] Obtain the historical true demand quantity corresponding to the time period of the first historical prediction result;

[0178] Based on the first historical prediction result and the historical true demand quantity, determine the first deviation corresponding to the first demand prediction model;

[0179] Based on the second historical prediction result and the historical true demand volume, determine the second deviation corresponding to the second demand prediction model;

[0180] Based on the first deviation and the second deviation, determine the first weight and the second weight respectively.

[0181] The spare part demand prediction device applied to an electronic device provided by an embodiment of the present disclosure can execute the spare part demand prediction method provided by the embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution of the method. The content not described in detail in the device embodiment of the present disclosure can be referred to the description in any method embodiment of the present disclosure.

[0182] An embodiment of the present disclosure further provides a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, the processor is enabled to execute the above related steps to implement the spare part demand prediction method provided in any embodiment of the present disclosure.

[0183] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:

[0184] A processor;

[0185] A memory for storing executable instructions of the processor;

[0186] The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the spare part demand prediction method provided in any embodiment of the present disclosure.

[0187] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium, and the storage medium stores a computer program for implementing the spare part demand prediction method provided in any embodiment of the present disclosure.

[0188] It should be noted that the computer-readable medium described above in the present disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0189] The above computer-readable medium can be included in the above electronic device; or it can exist separately and not be assembled into the electronic device.

[0190] Among them, for the beneficial effects of the above embodiments, reference can be made to the beneficial effects in the corresponding methods provided above, and details will not be elaborated here.

[0191] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0192] The units involved in the embodiments described in the present disclosure can be implemented in software or in hardware. In some cases, the name of the unit does not constitute a limitation on the unit itself.

[0193] The functions described above herein can be performed, at least in part, by one or more hardware logic components. By way of example, and without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Arrays (FPGA), Application Specific Integrated Circuits (ASIC), Application Specific Standard Products (ASSP), System on a Chip (SOC), Complex Programmable Logic Devices (CPLD), and the like.

[0194] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM or Flash memory), an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0195] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0196] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0197] It should also be noted that, in the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. In addition, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, commodity or equipment including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or equipment. In the absence of more restrictions, the elements defined by the statement "comprise one..." do not exclude the presence of other identical elements in the process, method, commodity or equipment including the elements.

[0198] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. For those skilled in the art, the present disclosure may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure should be included within the scope of the claims of the present disclosure.

Claims

1. A method for forecasting demand for spare parts, characterized in that: The method comprises: Acquire original data of spare parts to be predicted, wherein the original data includes time series data for representing the demand quantity of the spare parts to be predicted in at least one preset time period; Processing the raw data using a pre-trained first demand forecasting model, and obtaining a first demand forecasting result output by the first demand forecasting model; Processing the time series data using a pre-trained second demand forecasting model, and obtaining a second demand forecasting result output by the second demand forecasting model, wherein the parameters of the second demand forecasting model include an attenuation factor, and the attenuation factor is used to characterize the degree to which demand decreases over time; Based on the first demand forecast result and the second demand forecast result, a target demand forecast result corresponding to the spare parts to be forecasted in the next preset time period is determined.

2. The method for forecasting spare parts demand according to claim 1, characterized in that: The original data also includes attribute feature data corresponding to the time series data and environmental feature data corresponding to the at least one preset time period; The processing of the raw data by using the pre-trained first demand forecasting model includes: The time series data, the environmental characteristic data and the attribute characteristic data are input into the first demand forecasting model to perform demand forecasting processing.

3. The method for forecasting spare parts demand according to claim 2, characterized in that: The method further comprises: Constructing a multidimensional vector based on the time series data, and performing tensor decomposition on the multidimensional vector to obtain a reconstructed sequence feature; Standardizing each feature value in the reconstructed sequence feature to obtain a standard sequence feature; The step of inputting the time series data, the environmental characteristic data and the attribute characteristic data into the first demand forecasting model to perform demand forecasting processing includes: The standard sequence characteristics, the environmental characteristic data and the attribute characteristic data are input into the first demand forecasting model to perform demand forecasting processing.

4. The method for forecasting spare parts demand according to claim 1, characterized in that: The second demand forecasting model includes a smooth forecasting network, an adjustment factor unit and a forecast fusion unit; The processing of the time series data by using the pre-trained second demand forecasting model includes: Inputting the time series data into the smoothing prediction network to perform demand quantity and demand interval prediction, and obtaining demand quantity prediction results and demand interval prediction results; Inputting the demand quantity prediction result and the demand interval prediction result into the adjustment factor unit to determine the adjustment factor; The demand quantity forecast result, the demand interval forecast result and the adjustment factor are input into the forecast fusion unit, and the forecast fusion unit determines the second demand forecast result based on the attenuation factor.

5. The method for forecasting spare parts demand according to claim 4, characterized in that: The adjustment factor unit determines the adjustment factor in the following manner: Obtaining a first sum of each demand forecast value in the demand forecast result; Obtaining a second sum of each interval prediction value in the demand interval prediction result; determining a first product of the first sum value and the second sum value; Determine a second product of the demand forecast value and the interval forecast value at a corresponding time point in the demand quantity forecast result and the demand interval forecast result; The ratio of the sum of the second products at each time point divided by the first product is calculated as the adjustment factor.

6. The method for forecasting spare parts demand according to any one of claims 1 to 5, characterized in that: The determining, based on the first demand forecast result and the second demand forecast result, a target demand forecast result corresponding to the spare parts to be forecasted in the next preset time period includes: Obtaining a first weight corresponding to the first demand forecasting model and a second weight corresponding to the second demand forecasting model, wherein the first weight and the second weight are determined according to forecasting results of the first demand forecasting model and the second demand forecasting model; The target demand forecast result is obtained by performing weighted summation based on the first weight and the first demand forecast result, and the second weight and the second demand forecast result.

7. The method for forecasting spare parts demand according to claim 6, characterized in that: The obtaining a first weight corresponding to the first demand forecasting model and a second weight corresponding to the second demand forecasting model includes: Obtaining a first historical forecast result of the first demand forecast model and a second historical forecast result of the second demand forecast model; Obtaining the historical actual demand for the time period corresponding to the first historical forecast result; Determining a first deviation corresponding to the first demand forecasting model based on the first historical forecast result and the historical actual demand; Determining a second deviation corresponding to the second demand forecasting model based on the second historical forecast result and the historical actual demand; The first weight and the second weight are determined based on the first deviation and the second deviation, respectively.

8. A spare parts demand forecasting device, characterized in that: The device comprises: A data acquisition module, used to acquire original data of the spare parts to be predicted, wherein the original data includes time series data for representing the demand of the spare parts to be predicted in at least one preset time period; A first prediction module, used to process the original data using a pre-trained first demand prediction model, and obtain a first demand prediction result output by the first demand prediction model; a second forecasting module, configured to process the time series data using a pre-trained second demand forecasting model, and obtain a second demand forecasting result output by the second demand forecasting model, wherein the parameters of the second demand forecasting model include an attenuation factor, and the attenuation factor is used to characterize the degree to which the demand decreases with time; The result determination module is used to determine the target demand forecast result corresponding to the spare parts to be predicted in the next preset time period based on the first demand forecast result and the second demand forecast result.

9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the spare parts demand forecasting method described in any one of claims 1-7 above.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to implement the spare parts demand forecasting method described in any one of claims 1-7 above.