Multi-variety material demand forecasting method and system considering spring festival effect
By incorporating the Spring Festival effect into the improved Prophet forecasting model, the problems of intermittency in converting daily data to monthly data and the correlation between materials in material demand forecasting were resolved, resulting in more accurate demand forecasting for multiple material varieties and optimizing production management.
Patent Information
- Application Number
- CN202311845522.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-12-28
AI Technical Summary
Existing technologies struggle to accurately handle the intermittent nature of converting daily data to monthly data in material demand forecasting, and fail to effectively consider the relationships between different materials, resulting in inaccurate forecasting results.
An improved Prohet forecasting model that takes into account the Spring Festival effect is adopted. By collecting historical posting data of multiple materials, predictability and correlation are judged, predictable and unpredictable data are separated, influencing factors before and after the festival are constructed, the Prohet model is modified, and combined with multiple regression forecasting, the future monthly demand is generated.
It improves the accuracy and reliability of material demand forecasting, ensures the rational arrangement of production activities, reduces material waste, and improves production efficiency and delivery capabilities.
Smart Images

Figure CN117745028B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of demand planning, and more specifically, relates to a method and system for forecasting the demand of multiple types of materials that takes into account the Spring Festival effect. Background Technology
[0002] Material demand forecasting is a crucial aspect of material management and control in the production process. Accurate and reasonable demand forecasting is essential for a company's operations and supply chain management. Accurate forecasting ensures that companies obtain the necessary materials in a timely manner, avoiding production disruptions or even customer order delays caused by material shortages. It also helps companies avoid over-purchasing and over-production, thereby reducing waste of materials and resources. Furthermore, by forecasting demand and procurement timing, companies can rationally plan production activities and material supply, avoiding idle production lines and improving production efficiency and delivery capabilities.
[0003] In material demand forecasting, the raw data is mostly daily data, but due to the need for bulk ordering, monthly demand is forecasted. Usually, the daily data is summed before forecasting, or the daily data is forecasted and then summed. Due to the strong intermittency of the data, both of these methods require fully mining the information in the data. In addition, from the perspective of demand categories, it takes a lot of time to forecast and manage each material individually, and it fails to take into account the correlation between different materials. Using a single model to forecast materials often makes it difficult to ensure the accuracy and reliability of the forecast results. Summary of the Invention
[0004] In view of the above-mentioned defects or improvement needs of the existing technology, the present invention provides a method and system for predicting the demand of multiple materials that takes into account the Spring Festival effect. By taking into account the Spring Festival effect and correlation, the material demand can be predicted more reasonably.
[0005] To achieve the above objectives, according to one aspect of the present invention, a method for forecasting the demand of multiple materials considering the Spring Festival effect is provided. The method includes: S1: collecting historical posting data of multiple materials, and judging the predictability and correlation of different materials based on daily granular posting data; S2: aggregating predictable data and unpredictable data respectively to obtain monthly historical demand datasets for predictable materials and monthly historical demand datasets for unpredictable materials; S3: generating data demand for future months based on the historical demand dataset for unpredictable materials; constructing a Spring Festival effect influencing factor on material demand before and after the festival for the historical demand dataset for predictable materials, using the Spring Festival effect influencing factor to modify the Prophet prediction model to obtain an improved Prophet prediction model, and using the improved Prophet prediction model to generate data demand for future months.
[0006] Preferably, step S3, which uses an improved Prohet prediction model to generate data requirements for future months, specifically involves: Step 1: Establishing influencing factors for multiple periods before and after the festival to identify the Spring Festival effect in the corresponding month, considering the impact of holidays on the production process; Step 2: Correcting the Prohet prediction model using the Spring Festival effect influencing factor to obtain an improved Prohet prediction model; Step 3: Processing the original demand data based on month-on-month calculations to obtain stable data, and inputting the stable data as historical data into the improved Prohet prediction model to obtain target prediction data. Specifically, if the predictable varieties are independent of other varieties, then... An improved Prohet prediction model is used to obtain the predicted values for a single variety's future months. If the predictable variety is correlated with other varieties, the improved Prohet prediction model is used to obtain preliminary predicted values for multiple varieties' future months and fitted values for multiple varieties' historical months. The fitted values for multiple varieties' historical months are compared with the actual values for multiple varieties' historical months to obtain the residual values for multiple varieties' historical months. Multiple regression prediction is performed using these residual values to obtain the residual values for multiple varieties' future months. The preliminary predicted values for multiple varieties' future months are then corrected using these residual values to obtain the target predicted values for multiple varieties' future months.
[0007] Preferably, in step 1, establishing multiple segments of influence factors before and after the festival to identify the Spring Festival effect influence factors of the corresponding month is specifically as follows: establishing four segments of influence factors before and after the festival to identify the Spring Festival effect influence factors of the corresponding month. The four segments include two segments before the festival and two segments after the festival. The first segment is from day w1 to day w2 before the festival, the second segment is from day w2 before the festival to the start day of the festival, the third segment is during the festival, and the fourth segment is from the end day of the festival to day w4 after the festival. In the first segment, the influence factor increases from 0 to the maximum value, in the second segment, the influence factor decreases from the maximum value to a negative value, in the third segment, the influence factor remains at the minimum value, and in the fourth segment, the influence factor increases from the minimum value to 0, where w1>w2.
[0008] Preferably, in step 1, multiple impact factors for the period before and after the festival are established to identify the impact factor of the Spring Festival effect in the corresponding month of the festival. Specifically, the impact factors of each day of the month are summed to obtain the impact factor of the Spring Festival effect in the corresponding month of the festival.
[0009] Preferably, the improved prophet prediction model is as follows: the Spring Festival effect influencing factor is added as an independent variable to the prophet prediction model.
[0010] Preferably, in step S1, the Apriori algorithm is used to determine the predictability and correlation of different materials based on the daily particle size accounting data.
[0011] Preferably, in step S1, the determination of the predictability and correlation of different materials based on daily particle overage data is as follows: using the Apriori algorithm, a support threshold is set. If the support of a certain material alone does not reach the threshold, then the material is unpredictable; otherwise, it is predictable. If the support of multiple materials reaches the threshold at the same time, then it is determined that the multiple materials are predictable and their demands influence each other.
[0012] Preferably, in step S3, for the monthly historical demand dataset of unpredictable varieties, the expert experience method is used to generate the data demand for future months based on the historical demand data.
[0013] The second aspect of this application provides a multi-variety material demand forecasting system considering the Spring Festival effect. The system includes: a data acquisition module for collecting historical posting data of multiple materials and determining the predictability and correlation of different materials based on daily granular posting data; an aggregation module for aggregating predictable and unpredictable data to obtain monthly historical demand datasets for predictable and unpredictable materials; and a forecasting module for generating future monthly data demands based on the historical demand datasets for unpredictable materials and using an improved Prophet forecasting model that considers the Spring Festival effect and material correlation for the historical demand datasets for predictable materials.
[0014] A third aspect of this application provides a computer storage medium storing a computer-executable program, which, when executed, implements the multi-material demand forecasting method described above.
[0015] In summary, compared with the prior art, the multi-variety material demand forecasting method and system considering the Spring Festival effect provided by the present invention mainly have the following advantages:
[0016] Beneficial effects:
[0017] 1. This application processes historical posting data, distinguishes between its predictability and correlation, and adopts different prediction methods for different data, resulting in more reasonable prediction results.
[0018] 2. This application classifies and predicts the independence of predictable varieties. For independent varieties, an improved Prophet prediction model is used for direct prediction. For related varieties, residual prediction is used to correct the prediction data of multiple related varieties, resulting in more accurate prediction results.
[0019] 3. For forecasting interrelated multi-variety materials, this application uses an improved Prohet forecasting model that considers the Spring Festival effect and material correlation to generate data demand for future months from historical demand datasets of predictable varieties. The improved Prohet forecasting model incorporates the Spring Festival effect factor. This improved Prohet forecasting model obtains the fitting value of each material to historical data and the preliminary forecast value for future data. The historical data fitting value is compared with the actual value to obtain the forecast residual, and the residuals of multiple materials are obtained. Multivariate prediction is performed on the multivariate residuals to obtain the residual forecast value of future data for each variety. The preliminary forecast value and the residual forecast are added together to obtain the final forecast value, thus making the forecast more accurate. Attached Figure Description
[0020] Figure 1 This is a schematic diagram illustrating the steps of the multi-variety material demand forecasting method considering correlation effects and the Spring Festival effect in an embodiment of this application;
[0021] Figure 2 This is a flowchart illustrating the multi-variety material demand forecasting method that considers correlation effects and the Spring Festival effect in an embodiment of this application.
[0022] Figure 3 This is a flowchart of an embodiment of the present application that discloses a modified Prophet prediction model that considers the Spring Festival effect and material correlation for predictable varieties.
[0023] Figure 4 This is a schematic diagram of the Spring Festival effect factor identification model disclosed in the embodiments of this application. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0025] This invention provides a method for forecasting the demand of multiple materials that considers correlation effects and the Spring Festival effect, such as... Figures 1-3 As shown, the method includes the following steps S1 to S3.
[0026] S1: Collect historical posting data for multiple materials and determine the predictability and correlation of different materials based on daily particle posting data.
[0027] The daily posting data collected from the warehouse includes the posting date, the production line number of the demand, the material number, and the demand quantity, which together form the material demand dataset.
[0028] Assuming that the daily demand for different materials for each production line is simultaneous, we construct a related dataset using the set of material numbers required by each production line daily as one data point.
[0029] In a further optimized scheme, the Apriori algorithm is used to mine the predictability and correlation of different materials.
[0030] Specifically, the Apriori algorithm is used to set a support threshold. If the support of a certain material alone does not reach the threshold, then that material is unpredictable; otherwise, it is predictable. If the support of multiple materials reaches the threshold at the same time, then it is determined that the multiple materials are predictable and their demand affects each other.
[0031] Wherein, support S refers to the frequency of a certain material or several materials appearing together in the associated dataset, i.e., S = σ(∪x) i ) / n, where x i σ refers to the i-th material, U is the set symbol, representing a set of one or more materials, σ is the frequency calculation, and n is the sample size of the associated dataset.
[0032] S2: Aggregate the predictable and unpredictable data to obtain the monthly historical demand datasets for predictable varieties and the monthly historical demand datasets for unpredictable varieties.
[0033] For unpredictable material varieties, they are decomposed from the above historical demand dataset to generate multiple independent monthly historical demand datasets for unpredictable varieties.
[0034] For predictable material varieties, historical data of varieties that are not related to other materials are extracted from the aforementioned historical demand dataset to generate multiple independent predictable monthly historical demand datasets; historical data of varieties that are related to other materials are extracted from the aforementioned historical demand dataset to generate multiple related predictable monthly historical demand datasets.
[0035] S3: For the monthly historical demand dataset of unpredictable varieties, generate data demand for future months based on the historical demand data; for the historical demand dataset of predictable varieties, construct the Spring Festival effect influencing factor on material demand before and after the festival, use the Spring Festival effect influencing factor to modify the prophet prediction model to obtain an improved prophet prediction model, and use the improved prophet prediction model to generate data demand for future months.
[0036] In a further optimized approach, for the monthly historical demand dataset of unpredictable varieties, an expert-based method is used to predict future monthly demand based on historical monthly demand. For example, an expert-based method based on historical averages is used, with a historical window length of 3 months.
[0037] In a further optimized scheme, the use of an improved Prophet prediction model to generate data requirements for future months specifically involves the following steps 1 to 3:
[0038] Step 1: To address the impact of holidays on the production process, establish influencing factors for multiple periods before and after the holidays in order to identify the Spring Festival effect influencing factors for the corresponding month.
[0039] In a further optimized scheme, influencing factors for multiple periods before and after the festival are established to identify the specific influencing factors of the Spring Festival effect in the corresponding month of the festival:
[0040] To identify the Spring Festival effect in the corresponding month of the festival, four influencing factors were established for the period before and after the festival. The four influencing factors include two periods before the festival and two periods after the festival. The first period is from day w1 to day w2 before the festival, the second period is from day w2 before the festival to the start of the festival, the third period is during the festival, and the fourth period is from the end of the festival to day w4 after the festival.
[0041] The first segment indicates that the positive effect of pre-holiday stockpiling reaches its maximum value, with the influence factor increasing from 0 to its maximum value. The second segment indicates that the production pace gradually slows down, and the influence factor decreases from its maximum value to a negative value, with the influence factor dropping to 0 3 days before the holiday. In the third segment, there is no production activity, and the influence factor remains at its minimum value. The fourth segment indicates that production activities gradually resume after the holiday, and the influence factor rises from its minimum value to 0, with w1>w2>w3.
[0042] For example, when considering the Spring Festival effect, the Spring Festival effect factor identification model in this embodiment is a linear model with four segmented variable weights, such as... Figure 4 As shown, the first segment represents the peak of the positive effect of pre-holiday stockpiling, i.e., from w1 = 15 days before the holiday to w2 = 7 days before the holiday, the effect increases from 0 to a maximum of H = 0.1429; the second segment represents the gradual slowdown of production, i.e., from w2 days before the holiday to New Year's Eve, the effect decreases from a maximum to a negative effect, with the effect being 0 for w3 = 3 days before the holiday; the third segment represents the absence of production activities during the Spring Festival, with the effect remaining at a minimum of h = -1 / 7; the fourth segment represents the gradual resumption of production activities after the holiday, i.e., from the sixth day of the Lunar New Year to w4 = 9 days after the holiday, the effect gradually increases from a minimum of h to 0; after calculating the daily Spring Festival effect using the above four steps, the effects of each day of the month are summed to obtain the monthly Spring Festival effect factor.
[0043] In a further optimized scheme, the daily impact factors of each month are summed to obtain the Spring Festival effect impact factor for the corresponding month.
[0044] Step 2: Use the Spring Festival effect factor to modify the prophet prediction model to obtain an improved prophet prediction model.
[0045] The improved prophet prediction model is as follows: the prophet prediction model is modified by using the Spring Festival effect influencing factor, specifically by adding the Spring Festival effect influencing factor as an independent variable to the prophet prediction model.
[0046] Specifically, for independently predictable materials, a prophet model considering the Spring Festival effect is adopted, which can be expressed by the formula y(t)=g(t)+s(t)+c(f). t )+∈ t The expression represents the modeling of non-periodic variations in the time series, where g(t) models seasonal variations, and c(f) represents the modeling of seasonal variations. t Model the Spring Festival effect factor for the current month, ∈ t This refers to error terms that the model failed to detect.
[0047] Step 3: Based on the month-on-month calculation, process the original demand data to obtain stable data, and input the stable data as historical data into the improved prophet prediction model to obtain the target prediction data.
[0048] Specifically, the data stabilization method based on the month-on-month calculation, i.e., y′ t =(y t -y t-1 ) / y t-1 To obtain the stable data, where y′ t For the data after it has stabilized at time t, y t Given the original demand data at time t, y t-1 This refers to the original demand data at time t-1, which is the time preceding time t.
[0049] The calculated Spring Festival effect factor is used as an explanatory variable. The stabilized data is used as historical data input to the improved Prophet model to fit the historical data and predict the future data.
[0050] The inverse month-on-month ratio is calculated for the fitting and prediction results, i.e. The predicted values are obtained, where, Let t be the demand forecast value. Let t be the predicted value obtained based on the stationary data at time t.
[0051] The stabilized data is used as historical data and input into the improved Prohet prediction model to obtain target prediction data. Specifically, if the predictable variety is independent of other varieties, the improved Prohet prediction model is used to predict the predicted value of a single variety for the next month. If the predictable variety is correlated with other varieties, the improved Prohet prediction model is used to predict the preliminary predicted value of multiple varieties for the next month and the fitted value of multiple varieties for the historical months. The fitted value of the multiple varieties for the historical months is compared with the true value of the multiple varieties for the historical months to obtain the residual value of the multiple varieties for the historical months. The residual value of the multiple varieties for the historical months is used to perform multiple regression prediction to obtain the residual value of the multiple varieties for the next month. The residual value of the multiple varieties for the next month is used to correct the preliminary predicted value of the multiple varieties for the next month to obtain the target predicted value of the multiple varieties for the next month.
[0052] This embodiment considers the correlation effect and the Spring Festival effect in the forecasting of demand for multiple materials and the processing of forecast results: Based on the forecast results, the procurement plan is guided to more accurately replenish materials in the centralized procurement process on a monthly basis, balance shortages and surpluses, and avoid material shortages, stagnation, and stockpiling.
[0053] A second aspect of this application provides a multi-product material demand forecasting system that considers correlation effects and the Spring Festival effect, the system comprising:
[0054] Data Acquisition Module: Used to collect historical posting data for multiple materials, and to determine the predictability and correlation of different materials based on daily granular posting data;
[0055] Aggregation module: Used to aggregate predictable and unpredictable data to obtain monthly historical demand datasets for predictable varieties and monthly historical demand datasets for unpredictable varieties.
[0056] The prediction module is used to generate data requirements for future months based on the historical monthly demand dataset for unpredictable commodities. For historical demand datasets for predictable commodities, it constructs a Spring Festival effect factor on material demand before and after holidays, uses the Spring Festival effect factor to modify the Prophet prediction model to obtain an improved Prophet prediction model, and uses the improved Prophet prediction model to generate data requirements for future months.
[0057] A third aspect of this application provides a computer storage medium storing a computer-executable program, which, when executed, implements the multi-material demand forecasting method described above.
[0058] From the above description of the embodiments, those skilled in the art will readily understand that the present invention can be implemented by hardware capable of executing specific computer programs, such as the system of the present invention, and the electronic processing unit, server, client, mobile phone, control unit, processor, etc. included in the system. The present invention can also be implemented by computer software that executes the methods of the present invention, for example, by control software executed by a microprocessor, electronic control unit, client, server, etc. However, it should be noted that the computer software executing the methods of the present invention is not limited to execution in one or a specific set of hardware entities; it can also be implemented in a distributed manner by unspecified hardware. For computer software, the software product can be stored in a computer-readable storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or distributed across a network, as long as it enables electronic devices to execute the methods according to the present invention.
[0059] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for forecasting the demand of multiple materials considering the Spring Festival effect, characterized in that the method... include: S1: Collect historical posting data for multiple materials and determine the predictability and correlation of different materials based on daily granular posting data; specifically: use the Apriori algorithm and set a support threshold. If the support of a certain material alone does not reach the threshold, then the material is unpredictable; otherwise, it is predictable. If the support of multiple materials reaches the threshold at the same time, then it is determined that the multiple materials are predictable and their demand affects each other. S2: Aggregate the predictable and unpredictable data to obtain the monthly historical demand datasets for predictable varieties and the monthly historical demand datasets for unpredictable varieties. S3: For the monthly historical demand dataset of unpredictable varieties, generate data demand for future months based on the historical demand data; for the historical demand dataset of predictable varieties, construct the Spring Festival effect influencing factor on material demand before and after the festival, use the Spring Festival effect influencing factor to modify the prophet prediction model to obtain an improved prophet prediction model, and use the improved prophet prediction model to generate data demand for future months. The specific requirements for generating future monthly data using the improved prophet prediction model in step S3 are as follows: Step 1: To address the impact of holidays on the production process, establish influencing factors for multiple segments before and after the holiday to identify the Spring Festival effect in the corresponding month. Specifically, establish influencing factors for four segments before and after the holiday to identify the Spring Festival effect in the corresponding month. These four segments include two segments before the holiday and two segments after the holiday. The first segment before the holiday... The day before the festival The first section is the day before the holiday. The first day of the Tianzhi Festival is the second segment, the festival period is the third segment, and the festival ends on the last day of the festival and continues afterward. The fourth segment is defined as follows: In the first segment, the positive effect of pre-holiday stockpiling reaches its maximum, with the influence factor increasing from 0 to its maximum value; in the second segment, production gradually slows down, and the influence factor decreases from its maximum value to a negative value. (The text then abruptly shifts to a seemingly unrelated topic: pre-holiday stockpiling...) The impact factor drops to 0 in the first segment; in the third segment, there is no production activity, and the impact factor remains at its minimum value; in the fourth segment, which represents the gradual resumption of production activity after the holiday, the impact factor rises from its minimum value to 0. ; Step 2: Use the Spring Festival effect factor to modify the prophet prediction model to obtain an improved prophet prediction model; Step 3: Process the original demand data based on month-on-month calculations to obtain stable data, i.e., based on the formula. The data after it has stabilized is obtained, among which, for t Data after time stabilizes for t Real-time raw demand data, for t- The original demand data at time 1; the stabilized data is then used as historical data and input into the improved prophet prediction model to obtain the target prediction data, specifically: If the predictable variety is independent of other varieties, an improved Prohet prediction model is used to obtain the predicted value for the future month of a single variety. If the predictable variety is correlated with other varieties, an improved Prohet prediction model is used to obtain the preliminary predicted value for the future month of multiple varieties and the fitted value for the historical months of multiple varieties. The fitted value for the historical months of multiple varieties is compared with the actual value for the historical months of multiple varieties to obtain the residual value for the historical months of multiple varieties. The residual value for the historical months of multiple varieties is used to perform multiple regression prediction to obtain the residual value for the future month of multiple varieties. The residual value for the future months of multiple varieties is used to correct the preliminary predicted value for the future month of multiple varieties to obtain the fitting and prediction results for the future month of multiple varieties. The final target predicted value is obtained by performing an inverse month-on-month calculation on the fitting and prediction results.
2. The method for forecasting demand for multiple materials according to claim 1, characterized in that, In step 1, multiple impact factors for the period before and after the festival are established to identify the impact factor of the Spring Festival effect in the corresponding month of the festival. Specifically, the impact factors of each day of the month are summed to obtain the impact factor of the Spring Festival effect in the corresponding month of the festival.
3. The method for forecasting demand for multiple materials according to claim 1 or 2, characterized in that, The improved prophet prediction model is to add the Spring Festival effect influencing factor as an independent variable to the prophet prediction model.
4. The method for forecasting demand for multiple materials according to claim 1, characterized in that, In step S3, for the monthly historical demand dataset of unpredictable varieties, the expert experience method is used to generate the data demand for future months based on the historical demand data.
5. A multi-variety material demand forecasting system considering the Spring Festival effect, characterized in that, The system for implementing the multi-material demand forecasting method according to any one of claims 1-4 includes: Data Acquisition Module: Used to collect historical posting data for multiple materials, and to determine the predictability and correlation of different materials based on daily granular posting data; Aggregation module: Used to aggregate predictable and unpredictable data to obtain monthly historical demand datasets for predictable varieties and monthly historical demand datasets for unpredictable varieties. The prediction module is used to generate data requirements for future months based on the historical monthly demand dataset for unpredictable commodities. For historical demand datasets for predictable commodities, it constructs a Spring Festival effect factor on material demand before and after holidays, uses the Spring Festival effect factor to modify the Prophet prediction model to obtain an improved Prophet prediction model, and uses the improved Prophet prediction model to generate data requirements for future months.
6. A computer storage medium, characterized in that, The device contains a computer-executable program, which, when executed, implements the multi-material demand forecasting method as described in any one of claims 1 to 4.
