Spare parts demand forecasting method and system based on CNN-GA-BP combined model

By combining convolutional neural network (CNN), BP neural network and genetic algorithm (GA), a combined model was established to solve the accuracy problem of electronic equipment spare parts demand forecasting, improve forecasting accuracy and optimize inventory management.

CN116050600BActive Publication Date: 2024-08-23CHINA ELECTRONIC TECH GRP CORP NO 38 RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211729757.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2022-12-28
Filing Date
2022-12-30
Publication Date
2024-08-23
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

Existing technology cannot accurately predict the demand for electronic equipment spare parts, resulting in inventory management problems such as data inconsistency with actual demand and inaccurate prediction methods.

Method used

Using a combined model based on CNN-GA-BP, by obtaining historical demand data, using the underlying prediction model for direct prediction, the middle-layer CNN network performs convolution processing, and uses the GA algorithm to optimize the BP neural network for training to generate accurate spare parts demand predictions. result.

Benefits of technology

It improves the accuracy and precision of spare parts demand forecasting, optimizes inventory management, and provides an effective way to forecast mid- to long-term spare parts demand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116050600B_ABST
    Figure CN116050600B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system, storage medium and electronic device for forecasting spare parts demand based on a combined model of CNN-GA-BP, and relates to the technical field of electronic equipment spare parts forecasting. In the present invention, a combined forecasting model of a CNN network and a BP neural network is combined, wherein the BP neural network is optimized using a GA algorithm, and a regression model is established for predicting future spare parts demand using historical demand data of equipment spare parts. It includes: firstly, three types of individual direct forecasting models are forecasted, and then the direct forecasting results are convolved using a CNN network, and then the back-propagation BP neural network is optimized based on the GA algorithm to form a three-layer combined forecasting model, which is superior to the individual combined model and the individual direct forecasting model, and finally the historical demand data of electronic equipment spare parts is used to evaluate the forecasting performance. The forecasting results prove the superiority of the combined forecasting method; this method can effectively provide a new way to forecast medium- and long-term spare parts demand, thereby optimizing the internal inventory management of the enterprise.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic equipment spare parts prediction, and in particular to a spare parts demand prediction method, system, storage medium and electronic equipment based on a CNN-GA-BP combined model. Background Art

[0002] Since the 21st century, the electronics industry has developed rapidly, and the proportion of China's electronics manufacturing industry in the market has also increased significantly. As a result, it involves the issue of inventory control of electronic equipment spare parts. A basic element of spare parts inventory control is accurate prediction of spare parts demand. The quality of electronic spare parts demand prediction will have a significant impact on equipment spare parts maintenance and support costs and combat readiness.

[0003] The quantification of spare parts consumption for electronic equipment is very complex, especially due to the nonlinear and gray nature of demand. Electronic equipment spare parts suppliers usually determine spare parts demand based on experience; however, this is a random and blind process, which may lead to a large backlog of spare parts if consumption is lower than expected and there is a shortage of key spare parts. The key to solving this problem is to accurately predict spare parts demand.

[0004] The accuracy of different forecasting theories and methods is often directly affected by the way they are applied. Therefore, current demand forecasting research and application often encounter two major challenges: inconsistency between data and actual demand, and inaccurate application of forecasting methods. Summary of the invention

[0005] 1. Technical issues to be resolved

[0006] In view of the shortcomings of the prior art, the present invention provides a method, system, storage medium and electronic device for predicting spare parts demand based on a combined model of CNN-GA-BP, which solves the technical problem that spare parts demand cannot be accurately predicted.

[0007] (II) Technical solution

[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0009] A method for predicting spare parts demand based on a combined model of CNN-GA-BP is used to predict the demand quantity of spare parts for medium- and long-term equipment. In the training process of the combined model based on CNN-GA-BP:

[0010] S1. Obtain and quantify historical demand data for spare parts of electronic equipment;

[0011] S2. Based on the historical demand data vector, the underlying prediction model is used to obtain direct prediction results;

[0012] S3. Concatenate the historical demand data vector and the direct prediction result, and use the middle-layer prediction model CNN network to obtain the convolution result;

[0013] S4. Concatenate the historical demand data vector, the direct prediction result, and the convolution result, and divide the concatenated result into a training set and a test set; and use the training set as the input of the top-layer prediction model GA-BP network to train the input data;

[0014] S5. Use the test set as the input of the trained GA-BP network to obtain the spare part demand prediction result.

[0015] Preferably, in S2, the bottom-layer prediction model includes the exponential smoothing method and the autoregressive integrated moving average model.

[0016] Preferably, the exponential smoothing method and the autoregressive integrated moving average model include:

[0017] (1) Exponential smoothing method

[0018]

[0019] where y t is the actual value in the t-th period, and this time series is composed of the historical demand data of spare parts, 1 < t < T, and T is the total number of periods; α is the smoothing coefficient, 0 < α < 1; is the predicted value of the i-th method in the t-th period, where i = 1, 2 represent the first-order and second-order exponential smoothing methods respectively;

[0020] Let be the actual value in the (T + 1)-th period of the i-th method, then the two exponential smoothing method models become:

[0021]

[0022]

[0023] where, are the actual values in the (T + 1)-th period of the first-order and second-order exponential smoothing methods respectively;

[0024] (2) Assume that {X t} is a set of weakly stationary time series, and after d-order differencing:

[0025]

[0026] Then the autoregressive integrated moving average model is expressed as:

[0027] W t = α 1 W t-1 + α 2 W t-2 …+ αp W t-p -θ 1 β t-1 -θ 2 β t-2 …-θ p β t-p

[0028] Among them, W t is the sequence after d-order difference processing; B is the backshift operator and satisfies the condition B k X t =X t-k ; represents the difference calculation, and there is X t is the time series value at time t; β t has a mean of 0 and a variance of σ a White noise; α t ,θ t is the model parameter.

[0029] Preferably, after concatenating the historical demand data vector and the direct prediction result in S3, zero padding is first performed and then convolution is performed using a CNN network.

[0030] Preferably, the training process of the GA-BP network in S4 includes:

[0031] S10, initializing the network structure and learning parameters of the BP neural network; the network structure includes an input layer, a hidden layer and an output layer, and using the GA algorithm to perform learning parameter optimization to obtain optimized weights and thresholds;

[0032] S20, input the samples in the training set and calculate the output of the hidden layer;

[0033]

[0034] Among them, H j is the output of the jth node in the hidden layer, f is the activation function, l is the number of nodes in the input layer, ω ij is the weight between the i-th node in the input layer and the j-th node in the hidden layer, x i is the input value of the i-th node in the input layer, a j is the threshold of the jth node in the hidden layer;

[0035] S30, forward propagation, calculate the output O of the output layer k ;

[0036]

[0037] Among them, O kis the output of the kth node in the output layer, q is the number of nodes in the hidden layer, ω jk is the weight between the jth node in the hidden layer and the kth node in the output layer, b k is the threshold of the kth node in the output layer;

[0038] S40, error calculation, calculate the actual output of the current network through the training set and compare it with the expected output of the network,

[0039] e k =Y k -O k

[0040] Among them, e k is the output error of the kth node in the output layer, Y k is the expected output of the kth node in the output layer;

[0041] S50, back propagation, according to the error, correct the weight of the neural network layer by layer,

[0042]

[0043] Among them, η is the learning rate, m is the number of nodes in the output layer;

[0044] S60, updating the threshold, correcting the threshold layer by layer according to the error;

[0045]

[0046] S70: Determine whether the iteration of the BP neural network algorithm has ended. If the specified number of iterations is reached or the difference between two adjacent errors is less than the specified value, the iteration ends and the predicted value is output. Otherwise, return to S20.

[0047] Preferably, the GA algorithm is used in S100 to perform learning parameter optimization, which specifically includes:

[0048] S100, initializing the population;

[0049] S200, using the training error of the BP neural network as a fitness function;

[0050] S300, repeatedly performing selection, crossover, and mutation operations;

[0051] S400, until the individual fitness meets the conditions or the number of iterations reaches the specified number, the iteration is stopped and the optimal weight and threshold are output.

[0052] Preferably, four evaluation indicators are used to verify the prediction accuracy of the CNN-GA-BP based combined model, specifically including:

[0053] (1) Mean absolute error (MAE):

[0054]

[0055] (2) Mean square error (MSE):

[0056]

[0057] (3) Root mean square error RMSE:

[0058]

[0059] (4) R2 coefficient of determination:

[0060]

[0061] Where n is the number of samples; is the predicted value; t is the actual value; is the average of the actual values.

[0062] A spare parts demand forecasting system based on a combined model of CNN-GA-BP is used to forecast the demand quantity of spare parts for medium- and long-term equipment. In the training process of the combined model based on CNN-GA-BP:

[0063] Vectorization module, used to obtain and vectorize the historical demand data of spare parts for electronic equipment;

[0064] The direct prediction module is used to obtain direct prediction results based on the historical demand data vector using the underlying prediction model;

[0065] A convolution module is used to concatenate the historical demand data vector and the direct prediction result, and use a middle-level prediction model CNN network to obtain the convolution result;

[0066] A training module is used to splice the historical demand data vector, direct prediction results, and convolution results, and divide the spliced ​​results into a training set and a test set; and use the training set as the input of the top-level prediction model GA-BP network to train the input data;

[0067] The test module is used to use the test set as the input of the trained GA-BP network to obtain the spare parts demand prediction result.

[0068] A storage medium stores a computer program for forecasting spare parts demand based on a combined model of CNN-GA-BP, wherein the computer program enables a computer to execute the method for forecasting spare parts demand based on a combined model of CNN-GA-BP as described above.

[0069] An electronic device, comprising:

[0070] one or more processors;

[0071] Memory; and

[0072] One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing the combined model spare parts demand prediction method based on CNN-GA-BP as described above.

[0073] (III) Beneficial effects

[0074] The present invention provides a method, system, storage medium and electronic device for forecasting spare parts demand based on a combined model of CNN-GA-BP. Compared with the prior art, the present invention has the following beneficial effects:

[0075] In the present invention, a combined prediction model of CNN network and BP neural network is combined, wherein the BP neural network is optimized by GA algorithm, and a regression model is established to predict the future spare parts demand using the historical demand data of equipment spare parts. It includes: firstly, three types of individual direct prediction models are predicted, and then the direct prediction results are convolved by CNN network, and then the back propagation BP neural network is optimized based on GA algorithm to form a three-layer combined prediction model, which is better than the individual combination model and the individual direct prediction model, and finally the historical demand data of equipment spare parts is used to evaluate the prediction performance. The prediction results prove the superiority of the combined prediction method; this method can effectively provide a new way to predict the medium and long-term spare parts demand, thereby optimizing the internal inventory management of the enterprise. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0077] Figure 1 An overall framework diagram of a method for forecasting spare parts demand based on a combined model of CNN-GA-BP provided in an embodiment of the present invention;

[0078] Figure 2 A block diagram of a method for forecasting spare parts demand based on a combined model of CNN-GA-BP provided in an embodiment of the present invention;

[0079] Figure 3 A schematic diagram of the overall process of a method for forecasting spare parts demand based on a combined model of CNN-GA-BP provided in an embodiment of the present invention;

[0080] Figure 4 A schematic diagram of direct prediction based on exponential smoothing method and differential autoregressive moving average model provided by an embodiment of the present invention;

[0081] Figure 5 A schematic diagram of splicing the convolution results provided by an embodiment of the present invention;

[0082] Figure 6 A schematic diagram of a convolution process of a CNN network provided in an embodiment of the present invention;

[0083] Figure 7 A schematic diagram of a BP neural network training process provided by an embodiment of the present invention;

[0084] Figure 8 A schematic diagram of the structure of a BP neural network provided by an embodiment of the present invention;

[0085] Fig. 9 A schematic diagram of the principle of a GA algorithm provided in an embodiment of the present invention;

[0086] Fig.10 The fitness function change curves during the iteration of the three methods provided in the embodiments of the present invention;

[0087] Fig.11 The predicted values ​​and true values ​​of the three methods provided in the embodiments of the present invention. DETAILED DESCRIPTION

[0088] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0089] The embodiments of the present application solve the technical problem of being unable to accurately predict spare parts demand by providing a method, system, storage medium and electronic device for predicting spare parts demand based on a combined model of CNN-GA-BP.

[0090] The technical solution in the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows:

[0091] In the embodiment of the present invention, a convolutional neural network (CNN) and a BP neural network (Back Propagation Neural Network) are combined, wherein the BP neural network is optimized using a genetic algorithm (GA), and a regression model is established for predicting future spare parts demand using historical demand data for electronic equipment spare parts. The method includes: firstly, three types of individual direct prediction models are predicted, and then the direct prediction results are convolved using a CNN network, and then the back propagation BP neural network is optimized based on the GA algorithm to form a three-layer combined prediction model, which is superior to the individual combination model and the individual direct prediction model, and finally the prediction performance is evaluated using the historical demand data for equipment spare parts. The prediction results prove the superiority of the combined prediction method; this method can effectively provide a new way to predict medium- and long-term spare parts demand, thereby optimizing the internal inventory management of enterprises.

[0092] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0093] Example:

[0094] like Figures 1-2 As shown, an embodiment of the present invention provides a method for predicting spare parts demand based on a combined model of CNN-GA-BP, which is used to predict the demand quantity of spare parts for medium- and long-term equipment. In the training process of the combined model based on CNN-GA-BP:

[0095] S1. Obtain and quantify historical demand data for equipment spare parts;

[0096] S2. Based on the historical demand data vector, the underlying prediction model is used to obtain direct prediction results;

[0097] S3, splicing the historical demand data vector and the direct prediction result, and using the middle-level prediction model CNN network to obtain the convolution result;

[0098] S4, splicing the historical demand data vector, direct prediction results, and convolution results, and dividing the splicing results into a training set and a test set; and using the training set as the input of the top-level prediction model GA-BP network to train the input data;

[0099] S5. Using the test set as input of the trained GA-BP network to obtain spare parts demand prediction results.

[0100] The prediction results obtained by using the above prediction method prove the superiority of the combined prediction method; it can effectively provide a new way for the prediction of medium- and long-term spare parts demand, thereby optimizing the internal inventory management of enterprises.

[0101] As Figure 3 shown, the following will introduce each step of the above technical solution in detail:

[0102] In step S1, obtain and vectorize the historical demand data of equipment spare parts.

[0103] In this step, collect the historical demand data (historical consumption data) of electronic equipment spare parts in the past five years. After preprocessing the data, obtain the corresponding vectors.

[0104] In step S2, according to the historical demand data vector, use the underlying prediction model to obtain the direct prediction result.

[0105] The underlying prediction model includes the exponential smoothing method (single and double exponential smoothing methods) and the autoregressive integrated moving average model; including:

[0106] (1) Exponential smoothing method

[0107]

[0108] Among them, y t is the actual value of the t-th period, and this time series is composed of the historical demand data of spare parts, 1 < t < T, where T is the total number of periods; α is the smoothing coefficient, 0 < α < 1; is the predicted value of the i-th method in the t-th period, where i = 1, 2 represent the single and double exponential smoothing methods respectively;

[0109] Let be the actual value of the i-th method in the (T + 1)-th period, then the two exponential smoothing method models become:

[0110]

[0111]

[0112] Among them, are the actual values of the single and double exponential smoothing methods in the (T + 1)-th period respectively;

[0113] (2) Assume that {X t} is a set of weakly stationary time series, after d-order differencing:

[0114]

[0115] Then the autoregressive integrated moving average model is expressed as:

[0116] W t = α1 W t-1 +α 2 W t-2 …+α p W t-p -θ 1 β t-1 -θ 2 β t-2 …-θ p β t-p

[0117] Among them, W t is the sequence after d-order difference processing; B is the backshift operator and satisfies the condition B k X t =X t-k ; represents the difference calculation, and there is X t is the time series value at time t; β t has a mean of 0 and a variance of σ a White noise; α t ,θ t is the model parameter.

[0118] Through the underlying prediction model, the time series is predicted using the first exponential smoothing method, the second exponential smoothing method, and the difference autoregressive moving average model, and the prediction results are as follows: Figure 4 shown.

[0119] exist Figure 4 In: The initial data line is the preprocessed spare parts historical demand data vector. The first twelve data of the initial data line are predicted using the exponential smoothing method as follows: Figure 2 The first data of the LES row in the figure is obtained by analogy, and the entire LES row data is obtained by analogy; similarly, the second to thirteen data and the third to fourteen data of the initial data row are predicted using the quadratic exponential smoothing method and the autoregressive integrated moving average model (ARIMA) to obtain the first data of the SES row and ARIMA row as shown above, and the entire SES row and ARIMA row data are obtained by analogy.

[0120] In step S3, the historical demand data vector and the direct prediction result are concatenated, and the convolution result is obtained by using the middle-level prediction model CNN network.

[0121] In particular, in this step, after concatenating the historical demand data vector and the direct prediction result, zero padding is first performed, and then convolution is performed using the CNN network to avoid the loss of edge data features. The convolution process is as follows Figure 5As shown, the result after convolution and splicing is as follows Figure 6 shown.

[0122] In step S4, the historical demand data vector, direct prediction results, and convolution results are spliced, and the spliced ​​results are divided into a training set and a test set; and the training set is used as the input of the top-level prediction model GA-BP network to train the input data.

[0123] The training process of the GA-BP network is as follows: Figure 7 As shown, including:

[0124] S10. Initialize the network structure and learning parameters of the BP neural network.

[0125] like Figure 8 As shown, the network structure includes an input layer, a hidden layer and an output layer, and the GA algorithm is used to perform learning parameter optimization to obtain optimized weights and thresholds;

[0126] S20, input the samples in the training set and calculate the output of the hidden layer;

[0127]

[0128] Among them, H j is the output of the jth node in the hidden layer, f is the activation function, l is the number of nodes in the input layer, ω ij is the weight between the i-th node in the input layer and the j-th node in the hidden layer, x i is the input value of the i-th node in the input layer, a j is the threshold of the jth node in the hidden layer;

[0129] S30, forward propagation, calculate the output O of the output layer k ;

[0130]

[0131] Among them, O k is the output of the kth node in the output layer, q is the number of nodes in the hidden layer, ω jk is the weight between the jth node in the hidden layer and the kth node in the output layer, b k is the threshold of the kth node in the output layer;

[0132] S40, error calculation, calculate the actual output of the current network through the training set and compare it with the expected output of the network,

[0133] e k =Y k -O k

[0134] Among them, ek is the output error of the kth node in the output layer, Y k is the expected output of the kth node in the output layer;

[0135] S50, back propagation, according to the error, correct the weight of the neural network layer by layer,

[0136]

[0137] Among them, η is the learning rate, m is the number of nodes in the output layer;

[0138] S60, updating the threshold, correcting the threshold layer by layer according to the error;

[0139]

[0140] S70: Determine whether the iteration of the BP neural network algorithm has ended. If the specified number of iterations is reached or the difference between two adjacent errors is less than the specified value, the iteration ends and the predicted value is output. Otherwise, return to S20.

[0141] Specifically, Fig. 9 As shown, the GA algorithm is used in S100 to perform learning parameter optimization, which specifically includes:

[0142] S100, initializing the population;

[0143] S200, using the training error of the BP neural network as a fitness function;

[0144] S300, repeatedly performing selection, crossover, and mutation operations;

[0145] S400, until the individual fitness meets the conditions or the number of iterations reaches the specified number, the iteration is stopped and the optimal weight and threshold are output.

[0146] In step S5, the test set is used as the input of the trained GA-BP network to obtain the spare parts demand prediction result.

[0147] The GA-BP network that has been trained and obtained the optimal weight is used for regression prediction. The test set is used for performance evaluation to obtain the spare parts demand prediction results.

[0148] In addition, the embodiment of the present invention also uses four evaluation indicators to verify the prediction accuracy of the combined model based on CNN-GA-BP, specifically including:

[0149] (1) Mean absolute error (MAE):

[0150]

[0151] (2) Mean square error (MSE):

[0152]

[0153] (3) Root mean square error RMSE:

[0154]

[0155] (4) R2 coefficient of determination:

[0156]

[0157] Where n is the number of samples; is the predicted value; t is the actual value; is the average of the actual values.

[0158] Since the top-level prediction model uses a BP neural network based on GA optimization to predict spare parts demand. The embodiment of the present invention selects a three-layer neural network, which can theoretically fit any linear function. The activation function selects the common Sigmoid function. Only the impact of the number of hidden layer neurons on the performance of the BP neural network is considered. As the number of neurons increases, the prediction accuracy is improving, but at the same time the training time is also increasing. Therefore, it is necessary to weigh the prediction accuracy and training time. Taking all factors into consideration, the embodiment of the present invention selects 10 neurons in a hidden layer. For genetic parameter selection, the population size is set to 100, the crossover probability and mutation probability are set to 0.3 and 0.1 respectively, and the maximum number of iterations is set to 50 times. The root mean square error of the neural network is selected as the fitness function of the genetic algorithm, and the optimal fitness function is obtained after 50 iterations.

[0159] In order to verify the effectiveness of the spare parts demand combination prediction method based on the convolutional neural network and BP neural network optimized by genetic algorithm in the embodiment of the present invention, the spare parts demand prediction results of the CNN-GA-BP combination model provided by the embodiment of the present invention are compared with the spare parts demand prediction results of the single BP model or the CNN-BP model. The specific prediction results are shown in Table 1.

[0160] Table 1 Effects of different models on spare parts demand prediction

[0161]

[0162] It can be seen from Table 1 that the four evaluation index values ​​of the CNN-GA-BP method are lower than the evaluation index values ​​of the other two methods. Compared with the BP method, CNN-GA-BP reduces the mean absolute error (MAE) by 13.8%, the mean square error (MSE) by 24.87%, the root mean square error (RMSE) by 13.33%, and the R2 coefficient by 1.99%, and the prediction accuracy has been greatly improved; compared with the CNN-BP method, CNN-GA-BP reduces the mean absolute error (MAE) by 6.6%, the mean square error (MSE) by 20.13%, the root mean square error (RMSE) by 10.64%, and the R2 coefficient by 1.34%, and the prediction accuracy has been well improved.

[0163] like Fig.10 As shown in the figure, the CNN-GA-BP method converges faster than the BP neural network and CNN-BP methods, and has a smaller fitness function value.

[0164] like Fig.11 As shown in the figure, the size of the predicted value and the true value when using BP, CNN-BP, and CNN-GA-BP prediction methods are shown respectively.

[0165] In summary, the prediction of electronic equipment spare parts demand based on the CNN-GA-BP combined model is superior to that of a single BP model or CNN-BP model in terms of higher accuracy, faster convergence speed, more accurate prediction results, and so on.

[0166] The embodiment of the present invention provides a spare parts demand forecasting system based on a combined model of CNN-GA-BP, which is used to forecast the demand quantity of spare parts for medium- and long-term equipment. In the training process of the combined model based on CNN-GA-BP:

[0167] Vectorization module, used to obtain and vectorize the historical demand data of spare parts for electronic equipment;

[0168] The direct prediction module is used to obtain direct prediction results based on the historical demand data vector using the underlying prediction model;

[0169] A convolution module is used to concatenate the historical demand data vector and the direct prediction result, and use a middle-level prediction model CNN network to obtain the convolution result;

[0170] A training module is used to splice the historical demand data vector, direct prediction results, and convolution results, and divide the spliced ​​results into a training set and a test set; and use the training set as the input of the top-level prediction model GA-BP network to train the input data;

[0171] The test module is used to use the test set as the input of the trained GA-BP network to obtain the spare parts demand prediction result.

[0172] An embodiment of the present invention provides a storage medium storing a computer program for predicting spare parts demand based on a combined model of CNN-GA-BP, wherein the computer program enables a computer to execute the method for predicting spare parts demand based on a combined model of CNN-GA-BP as described above.

[0173] An embodiment of the present invention provides an electronic device, including:

[0174] one or more processors;

[0175] Memory; and

[0176] One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing the combined model spare parts demand prediction method based on CNN-GA-BP as described above.

[0177] In summary, compared with the prior art, the present invention has the following beneficial effects:

[0178] 1. In the embodiment of the present invention, a combined prediction model of CNN network and BP neural network is combined, wherein the BP neural network is optimized by GA algorithm, and a regression model is established to predict the future spare parts demand using the historical demand data of equipment spare parts. It includes: firstly, three types of individual direct prediction models are predicted, and then the direct prediction results are convolved by CNN network, and then the back propagation BP neural network is optimized based on GA algorithm to form a three-layer combined prediction model, which is better than the individual combination model and the individual direct prediction model, and finally the historical demand data of electronic equipment spare parts is used to evaluate the prediction performance. The prediction results prove the superiority of the combined prediction method; this method can effectively provide a new way to predict the medium and long-term spare parts demand, thereby optimizing the internal inventory management of the enterprise.

[0179] 2. In the embodiment of the present invention, the demand for spare parts of electronic equipment is predicted based on the CNN-GA-BP combined model. Compared with a single BP model or a CNN-BP model, it has higher accuracy, faster convergence speed, more accurate prediction results, and is superior.

[0180] It should be noted that, in this article, 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. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0181] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for forecasting spare parts demand based on a combined model of CNN-GA-BP. It is characterized in that For predicting the demand quantity of spare parts for electronic equipment in the medium and long term, in the training process of the combined model based on CNN-GA-BP: S1. Obtain and quantify historical demand data for spare parts of electronic equipment; S2. Based on the historical demand data vector, the underlying prediction model is used to obtain direct prediction results; S3, splicing the historical demand data vector and the direct prediction result, and using the middle-level prediction model CNN network to obtain the convolution result; S4, splicing the historical demand data vector, direct prediction results, and convolution results, and dividing the splicing results into a training set and a test set; and using the training set as the input of the top-level prediction model GA-BP network to train the input data; S5, using the test set as the input of the trained GA-BP network to obtain spare parts demand prediction results; The underlying prediction model in S2 includes exponential smoothing method and difference autoregressive moving average model; The exponential smoothing method and the difference autoregressive moving average model include: (1) Exponential smoothing method Among them, y t is the actual value in the t-th period, and this time series is composed of the historical demand data of spare parts, where 1 < t < T and T is the total number of periods; α is the smoothing coefficient, where 0 < α < 1; is the predicted value of the i-th method in the t-th period, where i = 1, 2 represent the first-order and second-order exponential smoothing methods respectively; set up is the actual value of the i-th method in period T+1, then the two exponential smoothing models become: in, They are the actual values ​​of the first and second exponential smoothing methods in the T+1 period respectively; (2) Assume {X t } is a set of weakly stationary time series, after d-order differences: The difference autoregressive moving average model is expressed as: W t =a 1 W t-1 +a 2 W t-2 …+a p W t-p -θ 1 b t-1 -θ 2 b t-2 …-i p b t-p Among them, W t is the sequence after d-order difference processing; B is the backshift operator and satisfies the condition B k X t =X t-k ; represents the difference calculation, and there is X t is the time series value at time t; β t has a mean of 0 and a variance of σ a White noise; α t ,θ t are model parameters; The training process of the GA-BP network in S4 includes: S10, initializing the network structure and learning parameters of the BP neural network; the network structure includes an input layer, a hidden layer and an output layer, and using the GA algorithm to perform learning parameter optimization to obtain optimized weights and thresholds; S20, input the samples in the training set and calculate the output of the hidden layer; Among them, H j is the output of the jth node in the hidden layer, f is the activation function, l is the number of nodes in the input layer, ω ij is the weight between the i-th node in the input layer and the j-th node in the hidden layer, x i is the input value of the i-th node in the input layer, a j is the threshold of the jth node in the hidden layer; S30, forward propagation, calculate the output O of the output layer k ; Among them, O k is the output of the kth node in the output layer, q is the number of nodes in the hidden layer, ω jk is the weight between the jth node in the hidden layer and the kth node in the output layer, b k is the threshold of the kth node in the output layer; S40, error calculation, calculate the actual output of the current network through the training set and compare it with the expected output of the network, and k =And k -EITHER k Among them, e k is the output error of the kth node in the output layer, Y k is the expected output of the kth node in the output layer; S50, back propagation, according to the error, correct the weight of the neural network layer by layer, Among them, η is the learning rate, m is the number of nodes in the output layer; S60, updating the threshold, correcting the threshold layer by layer according to the error; S70: Determine whether the iteration of the BP neural network algorithm has ended. If the specified number of iterations is reached or the difference between two adjacent errors is less than the specified value, the iteration ends and the predicted value is output. Otherwise, return to S20; In S10, the GA algorithm is used to perform learning parameter optimization, which specifically includes: S100, initializing the population; S200, using the training error of the BP neural network as a fitness function; S300, repeatedly performing selection, crossover, and mutation operations; S400, until the individual fitness meets the conditions or the number of iterations reaches the specified number, the iteration is stopped and the optimal weight and threshold are output.

2. The method for predicting spare parts demand based on the combined model of CNN-GA-BP as claimed in claim 1, It is characterized in that In S3, after concatenating the historical demand data vector and the direct prediction result, zero padding is first performed, and then convolution is performed using a CNN network.

3. The method for predicting spare parts demand based on the combined model of CNN-GA-BP according to claim 1 or 2, It is characterized in that Four evaluation indicators are used to verify the prediction accuracy of the combined model based on CNN-GA-BP, including: (1) Mean absolute error (MAE): (2) Mean square error (MSE): (3) Root mean square error RMSE: (4) R2 coefficient of determination: Where n is the number of samples; is the predicted value; t is the actual value; is the average of the actual values.

4. A spare parts demand forecasting system based on CNN-GA-BP combined model, It is characterized in that For predicting the demand quantity of mid- and long-term equipment spare parts, in the training process of the combined model based on CNN-GA-BP: Vectorization module, used to obtain and vectorize the historical demand data of spare parts for electronic equipment; The direct prediction module is used to obtain direct prediction results based on the historical demand data vector using the underlying prediction model; A convolution module is used to concatenate the historical demand data vector and the direct prediction result, and use a middle-level prediction model CNN network to obtain the convolution result; A training module is used to splice the historical demand data vector, direct prediction results, and convolution results, and divide the spliced ​​results into a training set and a test set; and use the training set as the input of the top-level prediction model GA-BP network to train the input data; A testing module, used to use the test set as input of the trained GA-BP network to obtain spare parts demand prediction results; The underlying prediction model in the direct prediction module includes an exponential smoothing method and a difference autoregressive moving average model; The exponential smoothing method and the difference autoregressive moving average model include: (1) Exponential smoothing method where y t is the actual value at the t-th period, and this time series is composed of the historical demand data of spare parts, where 1 < t < T and T is the total number of periods; α is the smoothing coefficient, where 0 < α < 1; is the predicted value of the i-th method at the t-th period, where i = 1, 2 represent the first-order and second-order exponential smoothing methods respectively; set up is the actual value of the i-th method in period T+1, then the two exponential smoothing models become: in, They are the actual values ​​of the first and second exponential smoothing methods in the T+1 period respectively; (2) Assume {X t } is a set of weakly stationary time series, after d-order differences: The difference autoregressive moving average model is expressed as: W t =a 1 W t-1 +a 2 W t-2 …+a p W t-p -θ 1 b t-1 -θ 2 b t-2 …-i p b t-p Among them, W t is the sequence after d-order difference processing; B is the backshift operator and satisfies the condition B k X t =X t-k ; represents the difference calculation, and there is X t is the time series value at time t; β t has a mean of 0 and a variance of σ a White noise; α t ,θ t are model parameters; The training process of the GA-BP network includes: S10, initializing the network structure and learning parameters of the BP neural network; the network structure includes an input layer, a hidden layer and an output layer, and using the GA algorithm to perform learning parameter optimization to obtain optimized weights and thresholds; S20, input the samples in the training set and calculate the output of the hidden layer; Among them, H j is the output of the jth node in the hidden layer, f is the activation function, l is the number of nodes in the input layer, ω ij is the weight between the i-th node in the input layer and the j-th node in the hidden layer, x i is the input value of the i-th node in the input layer, a j is the threshold of the jth node in the hidden layer; S30, forward propagation, calculate the output O of the output layer k ; Among them, O k is the output of the kth node in the output layer, q is the number of nodes in the hidden layer, ω jk is the weight between the jth node in the hidden layer and the kth node in the output layer, b k is the threshold of the kth node in the output layer; S40, error calculation, calculate the actual output of the current network through the training set and compare it with the expected output of the network, and k =And k -EITHER k Among them, e k is the output error of the kth node in the output layer, Y k is the expected output of the kth node in the output layer; S50, back propagation, according to the error, correct the weight of the neural network layer by layer, Among them, η is the learning rate, m is the number of nodes in the output layer; S60, updating the threshold, correcting the threshold layer by layer according to the error; S70: Determine whether the iteration of the BP neural network algorithm has ended. If the specified number of iterations is reached or the difference between two adjacent errors is less than the specified value, the iteration ends and the predicted value is output. Otherwise, return to S20; In S10, the GA algorithm is used to perform learning parameter optimization, which specifically includes: S100, initializing the population; S200, using the training error of the BP neural network as a fitness function; S300, repeatedly performing selection, crossover, and mutation operations; S400, until the individual fitness meets the conditions or the number of iterations reaches the specified number, the iteration is stopped and the optimal weight and threshold are output.

5. A storage medium, It is characterized in that It stores a computer program for forecasting spare parts demand based on the combined model of CNN-GA-BP, wherein the computer program enables the computer to execute the method for forecasting spare parts demand based on the combined model of CNN-GA-BP as described in any one of claims 1 to 3.

6. An electronic device, It is characterized in that include: one or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing the combined model spare parts demand forecasting method based on CNN-GA-BP as described in any one of claims 1 to 3.