A method for forecasting spare parts demand based on intermittent fitting index
Through the spare parts demand forecasting method based on intermittent fitting index, using intermittent fitting index and BP neural network model, the demand forecasting problem in spare parts inventory management of ship enterprises is solved, and more efficient inventory management and cost control are achieved.
Patent Information
- Application Number
- CN202411723072.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-11-28
AI Technical Summary
Existing technologies make it difficult to effectively manage the spare parts inventory of shipbuilding companies, resulting in inventory accumulation and excessively high management costs. A more accurate spare parts demand forecasting method is needed.
A spare parts demand forecasting method based on intermittent fitting index is adopted, including data cleaning, intermittent index calculation, clustering and BP neural network model training. The spare parts demand forecasting model is constructed through the intermittent fitting index InterSim and hierarchical clustering method.
It achieves accurate prediction of spare parts demand, improves the scientificity and efficiency of inventory management, and reduces inventory costs.
Smart Images

Figure CN119579064B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to inventory management technology, and in particular to a spare parts demand forecasting method based on intermittent fitting indicators. Background Art
[0002] Maritime transport, due to its large capacity, low cost, and wide applicability, has become the primary mode of transportation in international trade, promoting a substantial increase in new ship orders. However, due to the significant increase in demand for ship supporting equipment, the production capacity of shipping companies cannot be rapidly increased in a short period of time. The inventory management costs of shipping companies are too high, and inventory is piling up in warehouses. From the perspective of optimizing spare parts demand forecasts, it is necessary to improve the current management of shipyard spare parts inventory. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a spare parts demand forecasting method based on intermittent fitting indicators in view of the defects in the prior art.
[0004] The technical solution adopted by the present invention to solve its technical problem is:
[0005] A spare parts demand forecasting method based on intermittent fitting index includes the following steps:
[0006] 1) Obtain a spare parts data set, wherein the spare parts data includes spare part numbers and corresponding spare parts quantities, and perform data cleaning on the spare parts quantities;
[0007] 2) Obtaining a spare parts demand data set and converting the spare parts demand data set into a spare parts demand sequence;
[0008] The spare parts demand data set includes the time and quantity of each spare part shipped out;
[0009] Based on the spare part number, the same spare parts are grouped into a sequence according to the delivery time. The time interval of the values in the sequence is equal to the fixed delivery cycle time interval. If there is no delivery demand in the spare part demand sequence for a certain delivery, the sequence is padded with 0.
[0010] A spare parts demand data set is converted into a spare parts demand sequence. The sequence of the spare parts is:
[0011] T={x1,x2,...,x i ,...,x n}, x i ∈{1,2,3,...,m}
[0012] Where x i is the i-th outbound demand quantity in the spare parts demand data;
[0013] 3) Perform data cleaning on spare parts demand sequence;
[0014] Use 3σ criteria to clean the data of spare parts demand sequence;
[0015] 4) Obtain the intermittency index of each spare parts demand sequence;
[0016] 4.1) Calculate the average demand interval of each spare parts demand sequence;
[0017] ADI=n i / z i ;
[0018] Where n i Indicates that the i-th sequence has n i cycles, z i represents the number of non-zero cycles in the i-th sequence, and ADI represents the average demand interval in a certain sequence;
[0019] 4.2) Calculate the demand variation CV of each spare parts demand sequence 2 ;
[0020]
[0021]
[0022] Where S i represents the standard deviation of non-zero demand periods, l represents the number of non-zero demand periods, represents the demand in the i-th non-zero demand period, represents the average demand during the non-zero demand period;
[0023] 5) Classify each spare parts demand sequence according to the average demand interval and demand variation;
[0024] The classification is based on the following:
[0025] ADI≤1.32 and CV 2 ≤0.49, stable demand category; indicating that demand is relatively stable and there are fewer zero-demand periods.
[0026] ADI≤1.32 and CV 2 >0.49, unstable demand type; indicating that the demand is unstable, highly variable, and occurs frequently.
[0027] ADI>1.32 and CV 2 ≤0.49, intermittent demand type; it means that the demand is irregular and sporadic, and the demand is relatively stable.
[0028] ADI>1.32 and CV 2>0.49, blocky demand type; indicates that the demand pattern appears randomly, with a large number of time periods without demand and large differences between the demands of different periods, accompanied by a large number of zero demand periods.
[0029] 6) Construction of intermittent fitting index;
[0030] The intermittent fitting index is constructed by combining the maximum information coefficient MIC, the average demand interval between spare parts demand sequences and the intermittent index Zero-Dist;
[0031] For a given sequence set T = {T1, T2, ..., T M}, M is the number of sequences, where the i-th sequence T i ={x i (1), x i (2), ..., x i (N)}, where N is the number of elements in the sequence; the intermittent fitting index InterSim is expressed as follows:
[0032] InterSim(T i , T j )=(1-MIC(T i , T j ))⊙Zero-Dist(T i , T j )⊙ADI * (T i , T j );
[0033] Among them, MIC(T i , T j ) represents the sequence T i and sequence T j The maximum information coefficient between, ⊙ represents the Hadamard product, Zero-Dist(T i , T j ) represents the sequence T i and sequence T j The distribution difference of the 0 element position, ADI * (T i , T j ) represents the sequence T i and sequence T j The average demand interval between
[0034] 7) Clustering each spare parts demand sequence based on the intermittent fitting index;
[0035] Based on the intermittent fitting index, the similarity index between spare parts demand sequences is defined and the spare parts demand sequences are clustered.
[0036] 8) Establishing a BP neural network spare parts demand forecasting model, using the spare parts demand sequence in step 7) as input data of the BP neural network forecasting model to perform model training;
[0037] 9) Use the trained model to predict spare parts demand.
[0038] According to the above solution, in step 3), before data cleaning of the spare parts demand sequence, spare parts demand sequences with non-zero demand values appearing less than 3 times are eliminated.
[0039] According to the above solution, in step 3), the 3σ criterion is used to clean the spare parts demand sequence data, as follows:
[0040] μ-3σ≤x i ≤μ+3σ
[0041] Where: μ is x i The mean of ; σ is the standard deviation;
[0042] When the measured value x i When the deviation from the mean value exceeds the upper or lower control limit, the measured value is judged to be an outlier and is replaced by the mean of the sequence as a correction.
[0043] According to the above scheme, in step 6), the maximum information coefficient MIC is calculated as follows:
[0044]
[0045] Where a and b represent the number of grids in the x and y directions, respectively. This is essentially the grid distribution. The number of grid divisions is equal to a × b, and B represents the size of the sample subset.
[0046] The calculation steps are as follows:
[0047] Step 1) Grid the original variables and set the values of a and b;
[0048] Step 2) Calculate the mutual information between each sample and select the grid with the largest mutual information as the relationship between the variables;
[0049] Step 3) Normalize the mutual information value according to the sample size B and the number of grids a and b to obtain the MIC value.
[0050] According to the above scheme, in step 6), the intermittent index Zero-Dist is calculated as follows:
[0051]
[0052] Where: zero * (T i)={zero(x1), zero(x2),..., zero(x N )},x l ∈{x1,x2,……,x N},
[0053] According to the above scheme, in step 6), the average demand interval ADI between spare parts demand sequences * (T i , T j ) is calculated as follows:
[0054]
[0055] Where: ADI(T i ) represents the sequence T i The average demand interval, k is the variable coefficient; ADI * (T i , T j ) is used to represent the sequence T i and sequence T j The difference in the frequency of occurrence of 0 elements in two sequences.
[0056] According to the above scheme, in step 7), the clustering steps are as follows:
[0057] Step 7.1: Set each spare parts demand sequence as a class to obtain a class cluster: CLASS = {class1, class2, ..., class M}, set the final clustering to K categories;
[0058] Step 7.2: Find the two classes with the shortest distance from the class cluster CLASS i , class j ; The distance calculation formula is as follows:
[0059]
[0060] Step 7.3: Add the class i and class j Merge into a new class and update the class cluster CLASS;
[0061] Step 7.4) If |CLASS| = K, go to step 7.5); otherwise go to step 7.2);
[0062] Step 7.5) Calculate the ADI of each sequence in the class and calculate the average ADI value of all sequences in each class;
[0063] Step 7.6) If the average ADI value is greater than the preset threshold, it means that the spare parts contained in this category are not in the predictable category, and its corresponding class is set as the unpredictable class CLASS_1 = {class1, class2, ..., class q}, where there are q classes in the unpredictable class; the rest are predictable classes: CLASS_2 = {class1, class2, ..., class p}, where there are p classes in the unpredictable class, and q+p=K.
[0064] According to the above scheme, in step 8), the predictable spare parts demand sequence obtained in step 7) is used as the input data of the BP neural network prediction model, and the first 80% of the demand data of a type of spare parts demand sequence is selected as the input data each time, and the last 20% is selected as the output data.
[0065] The beneficial effects produced by the present invention are:
[0066] The present invention designs a new intermittent similarity index InterSim. Unlike traditional intermittent measurement indicators, this index can more comprehensively measure the similarity between sequences by comprehensively considering factors such as sequence sparsity, change trend, and spacing distribution, thereby accurately quantifying the predictability of intermittent sequences. It provides a scientific basis for parts classification and demand forecasting, and is highly practical and universal.
[0067] The present invention constructs a BP neural network prediction model by combining the intermittent similarity index and the hierarchical clustering method, thereby realizing effective prediction of the demand for parts and spare parts. The prediction model based on the InterSin index of the present invention has advantages in processing sequences with high similarity and utilizing structured information, and can better capture the characteristics of the sequence, thereby improving the prediction effect of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0069] Figure 1 is a flow chart of a method according to an embodiment of the present invention;
[0070] Figure 2 This is a schematic diagram of spare parts consumption classification types according to an embodiment of the present invention;
[0071] Figure 3 is a flow chart of intermittent hierarchical clustering according to an embodiment of the present invention;
[0072] Figure 4 is a hierarchical clustering flow chart of an embodiment of the present invention;
[0073] Figure 5 is a diagram showing the proportion of spare parts types in a case according to an embodiment of the present invention;
[0074] Figure 6 1 is a diagram comparing the prediction results and expected results of a neural network of category 1 according to an embodiment of the present invention;
[0075] Figure 7 1 is a diagram comparing the prediction results and expected results of the neural network of category 2 according to an embodiment of the present invention;
[0076] Figure 8 3. This is a comparison chart of the prediction results and expected results of the neural network of category 3 according to an embodiment of the present invention;
[0077] Figure 9 1 is a comparison chart of WMA prediction results for category 1 according to an embodiment of the present invention;
[0078] Figure 10 is a category 1 error analysis diagram of an embodiment of the present invention;
[0079] Figure 11 2 is a comparison chart of WMA prediction results of category 2 according to an embodiment of the present invention;
[0080] Figure 12 is a category 2 error analysis diagram of an embodiment of the present invention;
[0081] Figure 13 3 is a comparison chart of WMA prediction results of category 3 according to an embodiment of the present invention;
[0082] Figure 14 is a category three error analysis diagram of an embodiment of the present invention; DETAILED DESCRIPTION
[0083] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0084] like Figure 1 As shown, a spare parts demand forecasting method based on intermittent fitting index includes the following steps:
[0085] 1) Obtain a spare parts data set, wherein the spare parts data includes spare part numbers and corresponding spare parts quantities, and perform data cleaning on the spare parts quantities;
[0086] If the spare part quantity is 0, it means that there is no outbound record of the spare part in this period, which means that there is no demand for the spare part in this period. A negative spare part quantity is an outlier. To ensure the validity, accuracy, and feasibility of subsequent research, the outlier data with a quantity of 0 and a negative value are eliminated.
[0087] Based on the spare parts dataset, we can obtain the historical data of spare parts delivery records;
[0088] 2) Obtaining a spare parts demand data set and converting the spare parts demand data set into a spare parts demand sequence;
[0089] The spare parts demand data set includes the time and quantity of each spare part shipped out;
[0090] Based on the spare part number, the same spare parts are grouped into a sequence according to the delivery time. The time interval of the values in the sequence is equal to the fixed delivery cycle time interval. If there is no delivery demand in the spare part demand sequence for a certain delivery, the sequence is padded with 0.
[0091] A spare parts demand data set is converted into a spare parts demand sequence. The sequence of the spare parts is:
[0092] T={x1,x2,...,x i ,...,x n}, x i ∈{1,2,3,...,m}
[0093] Where x i is the i-th outbound demand quantity in the spare parts demand data;
[0094] In order to further improve the quality of training data and reduce the uncertainty of data collection, if there are few non-zero values in the spare parts demand sequence, it will be difficult to analyze the trend and regularity of the sequence, and it will have little predictive value. Therefore, spare parts demand sequences with non-zero demand values appearing less than 3 times are eliminated.
[0095] 3) Perform data cleaning on spare parts demand sequence;
[0096] The 3σ criterion is used to continue data cleaning of the spare parts demand sequence.
[0097] μ-3σ≤x i ≤μ+3σ
[0098] Where: μ is x i The mean of ; σ is the standard deviation;
[0099] When the measured value x i When the deviation from the mean value exceeds the upper or lower control limit, the measured value is judged to be an outlier and is replaced by the mean of the sequence as a correction;
[0100] 4) Obtain the intermittency index of each spare parts demand sequence;
[0101] 4.1) Calculate the average demand interval of each spare parts demand sequence;
[0102] ADI=n i / z i ;
[0103] Where n i Indicates that the i-th sequence has n i cycles, z i represents the number of non-zero cycles in the i-th sequence, and ADI represents the average demand interval in a certain sequence;
[0104] 4.2) Calculate the demand variation CV of each spare parts demand sequence 2 ;
[0105]
[0106] Where S i represents the standard deviation of non-zero demand periods, l represents the number of non-zero demand periods, represents the demand in the i-th non-zero demand period, represents the average demand during the non-zero demand period;
[0107] 5) Classify each spare parts demand sequence according to the average demand interval and demand variation; Figure 2 ;
[0108] The classification is based on the following:
[0109] ADI≤1.32 and CV 2 ≤0.49, stable demand category; indicating that demand is relatively stable and there are fewer zero-demand periods.
[0110] ADI≤1.32 and CV 2 >0.49, unstable demand type; indicating that the demand is unstable, highly variable, and occurs frequently.
[0111] ADI>1.32 and CV 2 ≤0.49, intermittent demand type; it means that the demand is irregular and sporadic, and the demand is relatively stable.
[0112] ADI>1.32 and CV 2 >0.49, blocky demand; this indicates that the demand pattern appears randomly, with large periods of no demand and large differences in demand between periods, accompanied by a large number of zero-demand periods;
[0113] 6) Construction of intermittent fitting index;
[0114] The intermittent fitting index is constructed by combining the maximum information coefficient MIC, the average demand interval between spare parts demand sequences and the intermittent index Zero-Dist;
[0115] For a given sequence set T = {T1, T2, ..., T M}, M is the number of sequences, where the i-th sequence Ti ={x i (1), x i (2), ..., x i (N)}, where N is the number of elements in the sequence; the intermittent fitting index InterSim is expressed as follows:
[0116] InterSim(T i , T j )=(1-MIC(T i , T j ))⊙Zero-Dist(T i , T j )⊙ADI * (T i , T j );
[0117] Among them, MIC(T i , T j ) represents the sequence T i and sequence T j The maximum information coefficient between, ⊙ represents the Hadamard product, Zero-Dist(T i , T j ) represents the sequence T i and sequence T j The distribution difference of the position of the 0 element, ADI * (T i , T j ) represents the sequence T i and sequence T j The average demand interval between
[0118] Maximum Information Coefficient (MIC)
[0119] The MIC algorithm is a correlation measurement algorithm based on a hierarchical approach. It discretizes the values of two variables and calculates the mutual information between them. The mutual information is then regularized to obtain a statistical value between 0 and 1, which can be used to measure the correlation between the two variables. The closer the MIC value is to 1, the closer the correlation between the two variables is. The closer the MIC value is to 0, the higher the independence between the two variables is. The calculation formula is as follows:
[0120]
[0121] Where a and b represent the number of grids in the x and y directions, respectively. This is essentially the grid distribution. The number of grid divisions is equal to a × b. B represents the subset size of the sample, which is usually set to about 0.6 of the total sample size.
[0122] The calculation steps are as follows:
[0123] Step 1: Grid the original variables and set the values of a and b;
[0124] Step 2: Calculate the mutual information between each sample and select the grid with the largest mutual information as the relationship between the variables;
[0125] Step 3: Normalize the mutual information value according to the sample size B and the number of grids a and b to obtain the MIC value.
[0126] MIC can better characterize the nonlinear correlation and non-functional association between two sequences, thereby theoretically obtaining the change rules between sequences.
[0127] Intermittent indicator Zero-Dist:
[0128] Based on the above analysis, the intermittent index (Zero-Dist) is used to reflect the position of the "0" element in the two intermittent spare parts demand sequences;
[0129]
[0130] Where: zero * (T i )={zero(x1), zero(x2),..., zero(x N )},x l ∈{x1,x2,……,x N},
[0131] As can be seen from the above formula, Zero-Dist can well measure the time lag characteristics and the distribution difference of zero-element intervals between two time series. It mainly evaluates the similarity between two time series by calculating the degree of difference in the zero-element position intervals in the two time series. The smaller the Zero-Dist value, the more similar the two time series are, and the larger the value, the greater the difference.
[0132] Average demand interval ADI between spare parts demand sequences * (T i , T j );
[0133]
[0134] Among them: ADI (T i ) represents the sequence T i The average demand interval, k is the variable coefficient, here it is set to k = 1.2; ADI * (T i , T j ) is used to represent the sequence T iand sequence T j The difference in the frequency of occurrence of 0 elements in the two sequences;
[0135] The intermittent fitting index is more comprehensive, accurate and reliable than the traditional similarity measurement method, and can better reveal the association and similarity between sequences.
[0136] 7) Clustering each spare parts demand sequence based on the intermittent fitting index;
[0137] Based on the intermittent fitting index, the similarity index between spare parts demand sequences is defined and the spare parts demand sequences are clustered; Figure 3 ;
[0138] By defining the similarity index between sequences, agglomerative hierarchical clustering is implemented for time series, and its clustering results can intuitively reflect the association and similarity between sequences.
[0139] like Figure 4 , the steps to construct hierarchical clustering based on intermittent fitting indicators are as follows:
[0140] Step 1: Set each spare parts demand sequence as a class to obtain a class cluster: CLASS = {class1, class2, ..., class M}, set the final clustering to K categories.
[0141] Step 2: Find the two classes with the shortest distance from the class cluster CLASS i , class j The distance calculation formula is as follows:
[0142]
[0143] Step 3: Add the class i and class j Merge into a new class and update the class cluster CLASS;
[0144] Step 4: If |CLASS| = K, go to step 5; otherwise go to step 2;
[0145] Step 5: Calculate the ADI of each sequence in the class and calculate the average ADI value of all sequences in each class;
[0146] Step 6: If the average ADI value is greater than the preset threshold, it means that the spare parts contained in this category are not in the predictable category, and its corresponding class is set as the unpredictable class CLASS_1 = {class1, class2, ..., class q}, where there are q classes in the unpredictable class; the rest are predictable classes: CLASS_2 = {class1, class2, ..., classp}, where there are p classes in the unpredictable class, and q+p=K.
[0147] 8) Establishing a BP neural network spare parts demand forecasting model, using the spare parts demand sequence in step 7) as input data of the BP neural network forecasting model to perform model training;
[0148] Step 1: Data Processing
[0149] To prevent the network model weights from being skewed due to different eigenvalue ranges, which could affect the stability and accuracy of the network model, the data must be normalized. Using the minimum-maximum method, the mapmin_max function in MATLAB was used to scale the values of each variable to the range [-1, 1].
[0150] Step 2: Forecast spare parts demand
[0151] Dataset division: The predictable spare parts demand sequence obtained based on S6 is used as the input data of the BP neural network prediction model. Each time, the first 80% of the demand data of a type of spare parts demand sequence is selected as the input data, and the last 20% is selected as the output data. There are a total of p predictable classes.
[0152] Step 3: Build the network model
[0153] (1) Set the training function to trainlm, the adaptive learning function to Learning-GDM, and the objective function to MSE.
[0154] (2) Set the network structure to a single hidden layer. In the BP neural network, the number of nodes in the input layer and the output layer is fixed, while the number of nodes in the hidden layer is uncertain. To select the appropriate number of neurons, you can use the calculation formula of the hidden layer:
[0155]
[0156] Where N is the number of hidden layer nodes, i is the number of input layer nodes, j is the number of output layer nodes, and a is an integer less than 10.
[0157] (3) Set the number of network training steps to 1000, the training target minimum error to 0.001, and the learning rate to 0.01.
[0158] 9) Use the trained model to predict spare parts demand.
[0159] A specific embodiment
[0160] With the goal of reducing inventory costs and improving forecast accuracy, BP neural network and weighted moving average method (WMA) were selected to predict spare parts demand. The codes involved were all programmed in MATLB 2021a.
[0161] To validate the use of a hierarchical clustering method based on intermittent fit indices for spare parts demand forecasting, we collected spare parts demand data from a 4S dealership in 2018. This dataset includes the spare part's serial number, part number, name, place of origin, quantity, arrival city, shipment date, shipment order number, shipment warehouse, store order number, store review time, manufacturer review time, order type, and whether it was a special order. The data involved covers daily spare parts shipment data from January to December 2018.
[0162] Step 1: Clean the data based on the number of spare parts. Remove the outliers with a quantity of "0" or negative values.
[0163] Step 2: Using months as the time series unit, each spare part is set as a sequence. The length of each spare part sequence in the dataset is 12. To ensure the uniformity of the sequence length and facilitate subsequent data processing, months with no demand for each spare part are padded with "0" and spare part demand sequences with fewer than three non-"0" demand values are removed.
[0164] Step 3: In the present invention, the 3σ criterion is used to filter out the outliers of each spare parts sequence, and the mean of each spare parts sequence is used to correct the outliers of the sequence;
[0165] Step 4: Based on the spare parts obtained in step 3, which include various types of consumable parts, 1938 types of intermittent consumable spare parts were finally screened out through the SBC classification method;
[0166] Step 5: Based on the intermittent spare parts demand sequence obtained in step 4, the intermittent fitting index is used to quantify the trend information and fluctuation pattern between spare parts sequences;
[0167] Step 6: Based on the intermittent fitting index, the staggered clustering method is used to divide the spare parts demand series into predictable and unpredictable categories. Set K = 6, where the predictable category includes 3 categories of spare parts and the unpredictable category includes 3 categories of spare parts.
[0168] According to the above hierarchical clustering method, 1938 spare parts types are divided into 6 categories, namely 3 types of predictable time series and 3 types of unpredictable time series, and finally divided into 4 categories such as Figure 5 As shown:
[0169] Step 7: Based on the three types of predictable spare parts obtained in step 6, the BP neural network and weighted moving average (WMA) algorithms are used to predict spare parts demand. The prediction results are as follows:
[0170] (1) BP neural network prediction results
[0171] In the training process of category 1 (447 spare parts), 5×4900 of the input data are used to train the neural network, and the remaining 5×937 test data set is used to test the trained network. The results are as follows Figure 6 As shown:
[0172] In the training process of category 2 (766 spare parts), 5×8257 of the input data are used to train the network, and the remaining 5×1625 test data set is used to test the trained network. The results are as follows Figure 7 As shown:
[0173] In the training process of category 3 (706 spare parts), 5×7691 data in the input data are used to train the network, and the remaining 5×1496 test data set is used to test the trained network. The results are as follows Figure 8 As shown:
[0174] Comparing the predicted data and expected target data obtained by the neural network in the above three types of predictable sequences, we can see that the distribution of the predicted data is consistent with the expected value, indicating that the prediction effect of the model is good, and the difference between its prediction results and the test target data is small.
[0175] (2) Prediction results based on the WMA algorithm
[0176] WMA forecasts were performed for 447 spare parts in the predictable time series category 1, 766 spare parts in the category 2, and 706 spare parts in the category 3. The previous three months of each spare part were set as historical data, and the weight coefficients were set to 1 / 6, 2 / 6, and 3 / 6 respectively for forecast analysis. The average value of the forecast data was compared with the average value of the expected target data, and the error analysis results were obtained as follows Figures 9 to 14 shown.
[0177] The WMA algorithm is used to predict the spare parts of the above three categories respectively. The predicted values are compared with the expected target values. It can be seen that the errors shown in the figure have large fluctuations, indicating that the prediction algorithm is not robust and the prediction accuracy is not high.
[0178] (3) Comparative analysis of the results of BP neural network and WMA algorithm
[0179] Because spare parts demand sample data is intermittent and contains many zero requests, it is subject to significant noise and volatility. Due to the presence of squares in the mean squared error (MSE), large errors are penalized more severely, making the MSE sensitive to some noisy data. The mean absolute error (MAE), on the other hand, gives equal weight to the error of each sample and is relatively more robust, especially to large errors. Therefore, MSE and MAE are used to evaluate forecast accuracy, using the following calculation formula:
[0180]
[0181] From the definition, we can see that the smaller the mean absolute error and mean square error values are, the more consistent the predicted value is with the expected target value, and the higher the prediction accuracy of the demand forecasting method is.
[0182] Table 1 Comparison of prediction errors between neural network and WMA (category 1)
[0183]
[0184] Table 2 Comparison of prediction errors between neural network and WMA (category 2)
[0185]
[0186] Table 3 Comparison of prediction errors between neural network and WMA (category 3)
[0187]
[0188] As can be seen from the above table, in the three categories of predictable time series, the prediction results of the neural network are better than those of the WMA algorithm.
[0189] In summary, the present invention has the following advantages compared with the prior art:
[0190] This paper combines intermittency metrics such as MIC, ADI, and Zero-dist to introduce a new intermittency similarity metric, InterSim. Unlike traditional intermittency metrics, this metric comprehensively measures intersequence similarity by considering factors such as sequence sparsity, variation trends, and spacing distribution. This allows for accurate quantification of the predictability of intermittent sequences, providing a scientific basis for both parts classification and demand forecasting. It is highly practical and universally applicable.
[0191] This paper combines the InterSin metric with a hierarchical clustering method to construct a BP neural network prediction model, effectively forecasting the demand for spare parts. Compared with traditional intermittent demand forecasting methods, the InterSin metric-based prediction model has advantages in processing highly similar sequences and utilizing structured information. It can better capture the characteristics of the sequence, thereby improving the model's prediction results.
[0192] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all such improvements and changes should fall within the scope of protection of the appended claims of the present invention.
Claims
1. A spare parts demand forecasting method based on intermittent fitting index, characterized in that: The following steps are involved: 1) Obtain a spare parts data set, wherein the spare parts data includes spare part numbers and corresponding spare parts quantities, and perform data cleaning on the spare parts quantities; 2) Obtaining a spare parts demand data set and converting the spare parts demand data set into a spare parts demand sequence; The spare parts demand data set includes the time and quantity of each spare part shipped out; Based on the spare part number, the same spare parts are grouped into a sequence according to the delivery time. The time interval of the values in the sequence is equal to the fixed delivery cycle time interval. If there is no delivery demand in the spare part demand sequence for a certain delivery, the sequence is padded with 0. A spare parts demand data set is converted into a spare parts demand sequence. The sequence of the spare parts is: T={x1,x2,...,x i ,...,x n }; Where x i is the i-th outbound demand quantity in the spare parts demand data; 3) Perform data cleaning on spare parts demand sequence; Use 3σ criteria to clean the data of spare parts demand sequence; 4) Obtain the intermittency index of each spare parts demand sequence; 4.1) Calculate the average demand interval of each spare parts demand sequence; <h2 style=";text-align:left;direction:ltr">ADI=n<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> / z<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> ; Where n i Indicates that the i-th sequence has n i cycles, z i represents the number of non-zero cycles in the i-th sequence, and ADI represents the average demand interval in a certain sequence; 4.2) Calculate the demand variation CV of each spare parts demand sequence 2 ; Where S i represents the standard deviation of non-zero demand periods, l represents the number of non-zero demand periods, represents the demand in the i-th non-zero demand period, represents the average demand during the non-zero demand period; 5) Classify each spare parts demand sequence according to the average demand interval and demand variation; 6) Construction of intermittent fitting index; The intermittent fitting index is constructed by combining the maximum information coefficient MIC, the average demand interval between spare parts demand sequences and the intermittent index Zero-Dist; For a given sequence set T = {T1, T2, ..., T M }, M is the number of sequences, where the i-th sequence T i ={x i (1), x i (2), ..., x i (N)}, where N is the number of elements in the sequence; the intermittent fitting index InterSim is expressed as follows: InterSim(T i ,T j )=(1-MIC(T i ,T j ))⊙Zero-Dist(T i ,T j )⊙ADI * (T i ,T j ); Among them, among them, MIC(T i , T j ) represents the sequence T i and sequence T j The maximum information coefficient between, ⊙ represents the Hadamard product, Zero-Dist(T i , T j ) represents the sequence T i and sequence T j The distribution difference of the position of the 0 element, ADI * (T i , T j ) represents the sequence T i and sequence T j The average demand interval between 7) Clustering each spare parts demand sequence based on the intermittent fitting index; Based on the intermittent fitting index, the similarity index between spare parts demand sequences is defined and the spare parts demand sequences are clustered. 8) Establishing a BP neural network spare parts demand forecasting model, using the spare parts demand sequence in step 7) as input data of the BP neural network forecasting model to perform model training; 9) Use the trained model to predict spare parts demand.
2. The spare parts demand forecasting method based on intermittent fitting index according to claim 1 is characterized in that: In the step 3), before data cleaning of the spare parts demand sequence, spare parts demand sequences with non-zero demand values appearing less than 3 times are eliminated.
3. The spare parts demand forecasting method based on intermittent fitting index according to claim 1 is characterized in that: In step 3), the 3σ criterion is used to clean the spare parts demand sequence data, as follows: μ-3σ≤x i ≤μ+3σ Where: μ is x i The mean of ; σ is the standard deviation; When the measured value x i When the deviation from the mean value exceeds the upper or lower control limit, the measured value is judged to be an outlier and is replaced by the mean of the sequence as a correction.
4. The spare parts demand forecasting method based on intermittent fitting index according to claim 1 is characterized in that: The classification is based on the following: ADI≤1.32 and CV 2 ≤0.49, stable demand category; indicating that demand is relatively stable and there are fewer zero-demand periods; ADI≤1.32 and CV 2 >0.49, unstable demand type; indicating that demand is unstable, highly variable, and occurs frequently; ADI>1.32 and CV 2 ≤0.49, intermittent demand; indicating that demand is irregular and sporadic, and demand is relatively stable; ADI>1.32 and CV 2 >0.49, blocky demand type; indicates that the demand pattern appears randomly, with a large number of time periods without demand and large differences between the demands of different periods, accompanied by a large number of zero demand periods.
5. The spare parts demand forecasting method based on intermittent fitting index according to claim 1 is characterized in that: In step 6), the maximum information coefficient MIC is calculated as follows: Where a and b represent the number of grids in the x and y directions, respectively. This is essentially the grid distribution. The number of grid divisions is equal to a × b, and B represents the size of the sample subset. The calculation steps are as follows: Step 6.1) Grid the original variables and set the values of a and b; Step 6.2) Calculate the mutual information between each sample and select the grid with the largest mutual information as the relationship between the variables; Step 6.3) Normalize the mutual information value according to the sample size B and the number of grids a and b to obtain the MIC value.
6. The spare parts demand forecasting method based on intermittent fitting index according to claim 1 is characterized in that: In step 6), the intermittent index Zero-Dist is calculated as follows: in:
7. The spare parts demand forecasting method based on intermittent fitting index according to claim 1 is characterized in that: In step 6), the average demand interval ADI between spare parts demand sequences * (T i , T j ) is calculated as follows: Where: ADI(T i ) represents the sequence T i The average demand interval, k is the variable coefficient; ADI * (T i , T j ) is used to represent the sequence T i and sequence T j The difference in the frequency of occurrence of 0 elements in two sequences.
8. The spare parts demand forecasting method based on intermittent fitting index according to claim 1 is characterized in that: In step 7), the clustering steps are as follows: Step 7.1: Set each spare parts demand sequence as a class to obtain a class cluster: CLASS = {class1, class2, ..., class M }, set the final clustering to K categories; Step 7.2: Find the two classes with the shortest distance from the class cluster CLASS i , class j ; The distance calculation formula is as follows: Step 7.3: Add the class i and class j Merge into a new class and update the class cluster CLASS; Step 7.4) If |CLASS| = K, go to step 7.5); Otherwise, go to step 7.2); Step 7.5) Calculate the ADI of each sequence in the class and calculate the average ADI value of all sequences in each class; Step 7.6) If the average ADI value is greater than the preset threshold, it means that the spare parts contained in this category are not in the predictable category, and its corresponding class is set as the unpredictable class CLASS_1 = {class1, class2, ..., class q }, where there are q classes in the unpredictable class; the rest are predictable classes: CLASS_2 = {class1, class2, ..., class p }, where there are p classes in the unpredictable class, and q+p=K.
9. The spare parts demand forecasting method based on intermittent fitting index according to claim 8, characterized in that: In step 8), the predictable spare parts demand sequence obtained in step 7) is used as input data for the BP neural network prediction model, and the first 80% of the demand data of a type of spare parts demand sequence is selected as input data each time, and the last 20% is selected as output data.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to claims 1 to 9 is implemented.