Purchase demand prediction method combined with PMC material management and control
By using time series decomposition, market dynamics analysis, and cluster optimization, and combining inventory data to generate procurement plans, the problem of deviation in procurement demand forecasting in PMC material control has been solved, improving forecast accuracy and procurement efficiency.
Patent Information
- Application Number
- CN202511632190.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-02-13
AI Technical Summary
Existing technologies struggle to fully integrate various influencing factors in PMC material management, leading to significant discrepancies between procurement demand forecasts and actual needs. This is especially true in dynamic market environments where it is difficult to capture key changes and balance inventory and production conflicts.
The time series decomposition method is used to separate trend and seasonal components, identify high variability patterns, combine market price indices and autoregressive integral moving average models, identify peak patterns in historical high demand periods through cluster analysis, optimize the demand forecast series, and generate procurement plans by combining inventory averages.
It improved the accuracy of procurement demand forecasting, reduced inventory costs and the risk of supply-demand mismatch, and achieved intelligent material management.
Smart Images

Figure CN121526477A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of material control data processing technology, and in particular to a procurement demand forecasting method that combines PMC material control. Background Technology
[0002] In the field of PMC (Production Management and Control), accurate forecasting of procurement needs is crucial for enterprises' production efficiency and cost control, and is a core element in ensuring smooth production and avoiding resource waste.
[0003] Especially in manufacturing companies, the accuracy of procurement needs not only affects inventory management but also involves the stability of the entire supply chain. However, many current solutions often fail to fully integrate various influencing factors when dealing with complex production environments, resulting in significant discrepancies between forecasts and actual needs.
[0004] Especially when facing a dynamically changing market environment and ever-changing material consumption patterns, existing methods often struggle to integrate the complex relationship between material consumption patterns in the production process and real-time market dynamics, failing to capture key changes in a timely manner and balancing the contradictions between inventory and production. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies, this invention provides a procurement demand forecasting method that combines PMC material control to solve the above-mentioned problems.
[0006] The technical solution adopted by this invention to solve its technical problem is: a procurement demand forecasting method combined with PMC material control, comprising the following steps: S1: Obtain the material consumption sequence and corresponding timestamp data, and use the time series decomposition method to separate the trend component and seasonal component to obtain the consumption pattern characteristic sequence; S2: If the fluctuation range of the consumption pattern characteristic sequence exceeds a preset threshold, it is determined as a basic demand prediction value sequence; S3: Obtain the market price index series, and use correlation analysis to calculate the correlation coefficient between the basic demand forecast series and the market price index series as a market dynamic influencing factor. If the absolute value of the market dynamic influencing factor exceeds a set threshold, the basic demand forecast sequence is updated through the autoregressive integral moving average component of the time series model. S4: Extract the peak and valley positions from the basic demand forecast value sequence, and use clustering method to group them into similar consumption pattern groups. If the peak position of a certain group coincides with the historical high demand period, then update the basic demand forecast value sequence by amplifying the corresponding amplitude of the basic demand forecast value sequence. S5: Generate a procurement plan sequence based on the basic demand forecast sequence and the average inventory level over the past year; S6: Obtain the sequence value and corresponding timestamp in the procurement plan sequence, and generate the final output report.
[0007] It is worth noting that in step S1, the material consumption sequence and corresponding timestamp data are obtained from the material usage log of historical production records. For the material consumption sequence and corresponding timestamp data, the STL function in Python's statsmodels library is used to separate the trend component and the seasonal component to obtain the consumption pattern feature sequence. The residual sequence obtained by the STL function through local weighted regression to smooth the trend and subtracting the seasonal mean is used as the consumption pattern feature sequence.
[0008] Preferably, in step S2, the consumption pattern feature sequence is input into a trained scikit-learn random forest classifier to obtain a material type classification result, wherein the random forest classifier takes the sequence as input and outputs the material type classification result; and a preset threshold for the corresponding classification is obtained based on the material type classification result. If the fluctuation range of the consumption pattern feature sequence exceeds the preset threshold of its corresponding category, it is determined as a basic demand prediction value sequence.
[0009] Optionally, in step S2, the average consumption rate is calculated for the consumption pattern characteristic sequence; For the average consumption rate, the standard deviation is calculated as the fluctuation range; If the fluctuation amplitude exceeds the preset threshold of the corresponding category, it is marked as a high-variability pattern sequence.
[0010] Specifically, in step S3, a market price index sequence is obtained from a real-time market supply and demand data source; The basic demand forecast series is concatenated with the market price index series to obtain the first concatenated series. The concatenation is determined by connecting the two series along the column axis using the NumPy library. The correlation coefficient is calculated for the first spliced sequence as a market dynamic influencing factor; wherein, the correlation coefficient is determined by the product of the covariance between the demand forecast value sequence and the market price index sequence divided by their respective standard deviations, the covariance being the average of the product of the deviations between the two sequences, and the standard deviation being the square root of the sequence variance.
[0011] It is worth noting that in step S3, the step of updating the basic demand forecast sequence through the autoregressive integral moving average component of the time series model includes: obtaining the basic demand forecast sequence as input data, adjusting it through the autoregressive integral moving average model, and obtaining a preliminary adapted sequence. Calculate the moving average of the initial adaptation sequence, and use the moving average to update the basic demand forecast sequence with bias adjustment.
[0012] Preferably, in step S4, the peak position and valley position are obtained from the basic demand forecast value sequence, wherein the peak position is the position of the maximum value point of the rated interval in the sequence, and the valley position is the position of the minimum value point of the rated interval in the sequence. Clustering algorithms are used to group the peak locations and valley locations, and similar consumption pattern groups are obtained by calculating the distance between the locations; For the same similar consumption pattern group, it is determined whether the peak position overlaps with the consumption sequence corresponding to the historical high demand period. If they overlap, the overlapping position is obtained, and the corresponding amplitude of the basic demand forecast value sequence is adjusted by adding the deviation coefficient to the corresponding point value of the current similar consumption pattern group sequence, so as to update the basic demand forecast value sequence. The deviation coefficient is the difference between the average value of the historical high demand period and the corresponding point value of the current similar consumption pattern group, multiplied by a preset weight. The average value of the historical high demand period is the average value of the sequence value within a specified length interval centered on the overlapping position in the consumption sequence corresponding to the historical high demand period.
[0013] Optionally, in step S5, the difference between the basic demand forecast sequence and the average inventory value of the past year is calculated to obtain a deviation sequence as a procurement plan sequence.
[0014] The beneficial effects of this invention are as follows: In the procurement demand forecasting method combined with PMC material control, addressing the forecasting deviations and inventory imbalances caused by market fluctuations and demand changes in enterprise material consumption forecasting and procurement plans, this invention decomposes the trends and seasonal characteristics of material consumption through time series analysis, calculates consumption rates and fluctuation amplitudes, identifies high-variability patterns as basic forecast sequences, and combines real-time market price indices. Correlation analysis quantifies dynamic market influencing factors, triggering an autoregressive integral moving average model to dynamically adjust the forecast sequence. Further, cluster analysis identifies peak patterns overlapping with historical high-demand periods, optimizing the demand forecast sequence. Finally, the invention combines the calculation of average inventory levels to generate a procurement plan sequence to fill demand gaps. This invention, through multi-level data fusion and dynamic adjustment mechanisms, effectively improves forecasting accuracy and procurement efficiency, reduces inventory costs and supply-demand mismatch risks, and achieves intelligent material management. Attached Figure Description
[0015] Figure 1 This is a flowchart of a procurement demand forecasting method combined with PMC material control in one embodiment of the present invention; Figure 2This is a flowchart illustrating step S3 in one embodiment of the present invention. Detailed Implementation
[0016] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. It should be noted that these descriptions are for the purpose of aiding understanding the present invention, but do not constitute a limitation thereof. Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0017] like Figure 1 and 2 As shown, a procurement demand forecasting method combining PMC material control includes the following steps: S1: Obtain the material consumption sequence and corresponding timestamp data, and use the time series decomposition method to separate the trend component and seasonal component to obtain the consumption pattern characteristic sequence; S2: If the fluctuation range of the consumption pattern feature sequence exceeds the preset threshold, it is marked as a high variation mode and determined as the basic demand prediction value sequence. S3: Obtain the market price index series, and use correlation analysis to calculate the correlation coefficient between the basic demand forecast series and the market price index series as a market dynamic influencing factor. If the absolute value of the market dynamic influencing factor exceeds a set threshold, the basic demand forecast sequence is updated through the autoregressive integral moving average component of the time series model. S4: Extract the peak and valley positions from the basic demand forecast value sequence, and use clustering method to group them into similar consumption pattern groups. If the peak position of a certain group coincides with the historical high demand period, then update the basic demand forecast value sequence by amplifying the corresponding amplitude of the basic demand forecast value sequence. S5: Generate a procurement plan sequence based on the basic demand forecast sequence and the average inventory level over the past year; S6: Obtain the sequence value and corresponding timestamp in the procurement plan sequence, and generate the final output report.
[0018] In the proposed procurement demand forecasting method incorporating PMC (Production, Manufacturing, and Control) material management, this invention addresses the forecasting deviations and inventory imbalances in enterprise material consumption forecasts and procurement plans caused by market fluctuations and demand changes. It decomposes material consumption trends and seasonal characteristics through time series analysis, calculates consumption rates and fluctuation amplitudes, identifies high-variability patterns as the basic forecast sequence, and combines real-time market price indices. Correlation analysis quantifies dynamic market influencing factors, triggering an autoregressive integral moving average model to dynamically adjust the forecast sequence. Further, cluster analysis identifies peak patterns overlapping with historical high-demand periods, optimizing the demand forecast sequence. Finally, it combines the calculation of average inventory levels to generate a procurement plan sequence to fill demand gaps. This invention effectively improves forecasting accuracy and procurement efficiency, reduces inventory costs and supply-demand mismatch risks, and achieves intelligent material management through multi-level data fusion and dynamic adjustment mechanisms.
[0019] It is worth noting that in step S1, the material consumption sequence and corresponding timestamp data are obtained from the material usage log of historical production records. For the material consumption sequence and corresponding timestamp data, the STL function in Python's statsmodels library is used to separate the trend component and the seasonal component to obtain the consumption pattern feature sequence. The residual sequence obtained by the STL function through local weighted regression to smooth the trend and subtracting the seasonal mean is used as the consumption pattern feature sequence. The sequence value x_i represents each consumption value, and the sequence length n represents the number of data points.
[0020] One possible implementation involves extracting material consumption sequences and corresponding timestamp data from historical production material usage logs. Specifically, assuming steel is the primary material used on a factory production line, the logs record daily steel consumption, for example, data from January 1, 2022 to December 31, 2023. Each day has a timestamp corresponding to a consumption value, such as 500 kg consumed on January 1st, 480 kg consumed on January 2nd, etc. This forms a sequence of length n=730, where each x_i represents the steel consumption for that day. In this way, the data extraction process focuses on the structured fields of the logs, ensuring timestamps are accurate to the day level, thus providing a reliable foundation for subsequent analysis.
[0021] When processing this data, the STL function from Python's statsmodels library is used to separate the trend and seasonal components. Here, STL refers to the seasonal-trend decomposition method, which is based on Locally Weighted Regression Scatter Smoothing (LOESS) to process time series. This function first applies LOESS smoothing to the entire series to estimate the trend component, i.e., fitting the long-term variation pattern of the series through weighted regression, such as the overall trend of steel consumption slowly increasing with production scale. Then, it calculates the seasonal component, typically assuming seasonal cycles such as weekly or monthly repetition, for example, a pattern where factory consumption is higher from Monday to Friday and lower on weekends, obtaining the seasonal mean by averaging each seasonal point. Finally, the trend and seasonal components are subtracted from the original series, and the remaining part is the residual series. This residual series is considered a characteristic sequence of consumption patterns because it captures random fluctuations or anomalous patterns after removing the trend and seasonality. The residual series obtained after processing by the STL function may show abnormally high consumption on certain days, such as extra usage due to sudden orders, thus revealing non-periodic patterns in consumption.
[0022] Preferably, in step S2, the consumption pattern feature sequence is input into a trained scikit-learn random forest classifier to obtain a material type classification result, wherein the random forest classifier takes the sequence as input and outputs the material type classification result; and a preset threshold for the corresponding classification is obtained based on the material type classification result. If the fluctuation range of the consumption pattern feature sequence exceeds the preset threshold of its corresponding category, it is marked as a high-variability pattern and determined as a basic demand prediction value sequence.
[0023] In one possible implementation, the consumption pattern feature sequence is input into a pre-trained scikit-learn random forest classifier. Specifically, the consumption pattern feature sequence obtained after step S1 contains data from 730 time points. The random forest classifier is an ensemble learning model composed of multiple decision trees, each trained independently and voting to determine the final output. Here, the sequence is used as input, and the classifier analyzes the sequence's statistical characteristics, such as mean, variance, or autocorrelation coefficient, to predict the material type, for example, classifying the sequence as "high-frequency consumption" or "low-frequency stable." During training, the classifier uses historical labeled data, such as sequence samples of previously known materials, creating subsets through bootstrap sampling and selecting the best feature for splitting at each tree node, ultimately outputting the material type classification result. For example, after inputting a sequence of an active ingredient, the classifier might output "high-frequency consumption" because the sequence shows frequent positive and negative fluctuation patterns. The key to this method lies in the robustness of random forests; they can handle high-dimensional inputs and reduce overfitting, improving accuracy by averaging the predictions of multiple trees.
[0024] In the step of obtaining the preset threshold for the corresponding category based on the material type classification result, the preset threshold corresponding to the classification result can be obtained by referring to the classification result-preset threshold mapping table. For example, if the classification is "high-frequency consumption type", the threshold obtained from the mapping table is 0.15, which is based on historical data statistics.
[0025] Optionally, in step S2, the average consumption rate is calculated for the consumption pattern characteristic sequence; let the total consumption of the sequence be X, the sum of the timestamp intervals be Y, and the average consumption rate Z = X / Y; For the average consumption rate, the standard deviation is calculated as the fluctuation range; let the value of the i-th sequence be x_i, the sequence length be n, and the standard deviation be n / 2. ; If the fluctuation amplitude exceeds the preset threshold of the corresponding category, it is marked as a high-variability pattern sequence.
[0026] The average consumption rate is calculated for the consumption pattern characteristics of the sequence. The average consumption rate is obtained by dividing the total consumption of the sequence by the sum of the timestamp intervals. For example, if the sum of 100 values in the sequence is 500 units and the sum of the timestamp intervals is 99 days (assuming a daily interval of 1 day, 100 values represent 100 days, then the sum of the timestamp intervals in these 100 days is 99 days), then the average consumption rate is 500 divided by 99, which is approximately equal to 5.05 units / day. This calculation captures the overall consumption rate of the sequence and provides a benchmark for fluctuation analysis.
[0027] For the average consumption rate, the standard deviation is calculated as the fluctuation range. The standard deviation is obtained by summing the squared differences of the average consumption rate minus the sequence values, dividing by the sequence length n minus one, and then taking the square root. In the example, for a sequence with an average rate of 5.05, each value is subtracted from 5.05, squared, summed, divided by 99 (sequence length 100-1 equals 99), and then the square root is taken to obtain the standard deviation, such as 1.2. This reflects the dispersion of consumption. For consumption pattern characteristic sequences classified as "high-frequency consumption type," a threshold of 0.15 is obtained from the mapping table. If the fluctuation range of this consumption pattern characteristic sequence is 1.2, exceeding the threshold of 0.15, it is marked as a high-variability pattern. This helps companies identify unstable materials, such as active ingredients, which are greatly affected by market demand, leading to more flexible inventory planning and thus more accurate resource allocation in business operations.
[0028] Specifically, in step S3, a market price index sequence is obtained from a real-time market supply and demand data source; The basic demand forecast series is concatenated with the market price index series to obtain the first concatenated series. The concatenation is determined by connecting the two series along the column axis using the NumPy library. The correlation coefficient is calculated for the first spliced sequence as a market dynamic influencing factor; wherein, the correlation coefficient is determined by the product of the covariance between the demand forecast value sequence and the market price index sequence divided by their respective standard deviations, the covariance being the average of the product of the deviations between the two sequences, and the standard deviation being the square root of the sequence variance.
[0029] In one possible implementation, obtaining price index value sequences from market supply and demand sources can be achieved by accessing specialized databases within the relevant industry. For example, companies could connect to an industry association's supply and demand platform to extract price data for specific raw materials. Specifically, these sources typically provide real-time updated indices covering global supply chain fluctuations. This sequence might include daily price points from the past year, ranging from historical lows to peaks, helping companies capture market dynamics.
[0030] In one possible implementation, the basic demand forecast sequence and the market price index sequence are concatenated to obtain a first concatenated sequence. The concatenation is determined by connecting the two sequences along the column axis using the NumPy library. This means converting two one-dimensional arrays into a two-dimensional structure and merging them horizontally. Specifically, the basic demand forecast sequence might be demand estimates at 100 time points based on historical consumption, such as daily forecast consumption ranging from 50 to 80 units, while the price index sequence corresponds to the same time points, ranging from 0.9 to 1.2. Then, the NumPy column_stack function is used to concatenate them into a [100, 2] array, with the first column representing demand and the second column representing price. This facilitates subsequent analysis to capture the interaction patterns between the two.
[0031] In one possible implementation, a correlation coefficient is calculated for the first spliced sequence as a market dynamic influencing factor. This correlation coefficient is determined by dividing the covariance between the demand forecast sequence and the market price index sequence by the product of their respective standard deviations. The covariance is the average of the products of the deviations between the two sequences, and the standard deviation is the square root of the sequence variances. The result is obtained directly using the `corrcoef` function from the NumPy library. Specifically, the covariance calculation first calculates the product of the demand deviation and price deviation for each corresponding point, then takes the average. The standard deviation is derived from the square root of the variance of each sequence. The final correlation coefficient ranges from -1 to 1, indicating that a positive correlation means increased demand is accompanied by rising prices. For example, for the spliced sequence, the `corrcoef` function might output a correlation coefficient of 0.75, indicating a high positive correlation between the demand forecast and the price index for a certain material. This is because when market demand is strong, supplier prices rise accordingly, allowing companies to adjust their inventory strategies to avoid cost overruns due to price fluctuations.
[0032] It is worth noting that in step S3, the step of updating the basic demand forecast sequence through the autoregressive integral moving average component of the time series model includes: obtaining the basic demand forecast sequence as input data, adjusting it through the autoregressive integral moving average model, and obtaining a preliminary adapted sequence. Calculate the moving average of the initial adaptation sequence, and use the moving average to update the basic demand forecast sequence with bias adjustment.
[0033] The autoregressive integral moving average model is a time series forecasting tool that combines the autoregressive part to capture the linear dependence of the series, the integral part to handle non-stationarity, and the moving average part to handle random disturbances. Through these components, the series is modeled and predicted, thereby achieving optimized adjustments to the forecast of basic demand.
[0034] For example, if the market dynamics impact factor is 0.7, and its absolute value exceeds the threshold of 0.5, the model correction process is activated. This helps to adjust forecasts in a timely manner in the event of sudden market events such as supply chain disruptions, thus avoiding inventory backlogs or shortages.
[0035] In one possible implementation, the basic demand forecast sequence is obtained as input data, and after adjustment by an autoregressive integral moving average model, a preliminary adapted sequence is obtained. For example, a basic demand forecast sequence containing 90 time points, each point representing the daily expected usage, such as from 40 units to 70 units, is then input into the model for fitting and adjustment. The output preliminary adapted sequence reflects the version after stabilization and noise filtering.
[0036] In one possible implementation, the process of calculating the moving average of the initial adaptation sequence and updating the basic demand forecast sequence using the deviation adjustment based on the moving average can be achieved by a simple arithmetic mean, for example, by averaging five consecutive points of the initial adaptation sequence as the moving average, then subtracting the corresponding timestamp value in the basic demand forecast sequence from this value to calculate the deviation, and adjusting the basic demand forecast sequence accordingly, such as by raising the forecast if the deviation is positive.
[0037] Specifically, the moving average is the average of values within a window, helping to smooth short-term fluctuations. Deviation adjustment corrects the values at corresponding timestamps in the basic demand forecast sequence by weighting them to better align with the trend of the adaptation sequence, thereby improving forecast accuracy. For example, for an initial adaptation sequence, if the calculated moving average is 50 units and the moving average is positive, the values at the corresponding timestamps in the basic demand forecast sequence are adjusted upwards. The adjustment amount is the moving average multiplied by a preset weight. For example, if the weight is 0.06, the value in the basic demand forecast sequence that was originally 45 units is adjusted to 48 units. This strengthens the logical chain from initial adaptation to final update, ensuring that companies maintain efficient inventory levels amidst market uncertainty.
[0038] Preferably, in step S4, the peak position and valley position are obtained from the basic demand forecast value sequence, wherein the peak position is the position of the maximum value point of the rated interval in the sequence, and the valley position is the position of the minimum value point of the rated interval in the sequence. Clustering algorithms are used to group the peak locations and valley locations, and similar consumption pattern groups are obtained by calculating the distance between the locations; For the same similar consumption pattern group, it is determined whether the peak position overlaps with the consumption sequence corresponding to the historical high demand period. If they overlap, the overlapping position is obtained, and the corresponding amplitude of the basic demand forecast value sequence is adjusted by adding the deviation coefficient to the corresponding point value of the current similar consumption pattern group sequence, so as to update the basic demand forecast value sequence. The deviation coefficient is the difference between the average value of the historical high demand period and the corresponding point value of the current similar consumption pattern group, multiplied by a preset weight. The average value of the historical high demand period is the average value of the sequence value within a specified length interval centered on the overlapping position in the consumption sequence corresponding to the historical high demand period.
[0039] Specifically, the rated interval can be defined as a window of 10 consecutive time points. Within this window, all values are compared to locate the extreme points. This method is based on the principle of local extremum detection of a sequence. It identifies peaks and valleys by traversing the sequence and comparing adjacent points, thus avoiding the bias caused by global maximums and minimums.
[0040] In one possible implementation, the specific operation of grouping peak and valley locations using a clustering algorithm can be implemented using the K-means clustering algorithm. This algorithm is an unsupervised learning method that groups similar points together by calculating the Euclidean distance between locations. It first initializes center points and then iteratively assigns and updates centers until convergence. For example, all peak and valley locations can be treated as data points, and their distances on the time axis, such as position differences, can be calculated. If the distance is less than a preset threshold, such as 5 time points, they are grouped into the same group, thus obtaining groups of similar consumption patterns. This grouping helps identify recurring consumption patterns. For instance, in a basic demand forecast sequence, multiple peak locations, such as points 20, 45, and 70, are clustered together if they are close in distance, representing a periodic high demand pattern, while valley groups correspond to low demand periods. This connects the logical chain from extreme value extraction to pattern classification, ensuring that subsequent adjustments are targeted at specific patterns.
[0041] In one possible implementation, the process of determining whether the peak position of the same similar consumption pattern group overlaps with the consumption sequence corresponding to historical high-demand periods can be achieved through a position matching algorithm. For example, comparing the peak position of the current group, such as point 30, with the peak position of a high-demand period in the historical sequence, such as the interval between points 28 and 32, if there is overlap, it is considered a coincidence, and then the overlapping position, such as point 30, is obtained. Specifically, the historical high-demand period can be a sequence of holiday promotion periods marked from past data. The principle of this step is based on the alignment and matching of time series, and the degree of overlap is confirmed by calculating the position offset. If there is an overlap, an adjustment mechanism is triggered, which continues the analysis of the pattern group and transitions to deviation correction.
[0042] Specifically, if multiple peaks with different positions and values appear in the same similar consumption pattern group, these peaks are first arranged in descending order of value. The first peak, i.e., the peak with the largest value, is then compared with the consumption sequence corresponding to the historical high demand period. If they match, the consumption sequence corresponding to that historical high demand period is used for subsequent calculations. If they do not match, the second peak is compared with the consumption sequence corresponding to the historical high demand period, and so on. If none of the peaks match the consumption sequence corresponding to the historical high demand period, then it is determined that the similar consumption pattern group does not match the consumption sequence corresponding to the historical high demand period.
[0043] In one possible implementation, the step of adjusting the corresponding magnitude of the basic demand forecast value sequence by adding a deviation coefficient to the corresponding point value of the current similar consumption pattern group can be applied directly after calculating the deviation coefficient. For example, the deviation coefficient is the difference between the historical high demand period average (e.g., 75 units) and the current point value (e.g., 65 units), multiplied by a weight of 0.8 to obtain 8, and then added to the corresponding point to update the sequence. Specifically, the historical high demand period average is obtained by averaging over an interval of length 5 centered on the overlapping position. This adjustment is based on the principle of deviation compensation, ensuring that the sequence reflects historical experience.
[0044] It is worth noting that in step S5, the difference between the basic demand forecast value sequence and the average inventory value of the past year is calculated to obtain the deviation sequence as the procurement plan sequence.
[0045] For example, when calculating the deviation series, each value in the baseline demand forecast series can be subtracted from the average inventory level of the past year. If a value in the baseline demand forecast series is 1200 units while the average inventory level is 900 units, the deviation is 300 units, indicating a potential shortage. This series as a whole reflects the demand-inventory imbalance over time, helping companies avoid the risk of stockouts. Finally, arranging all deviations according to timestamps yields the deviation series.
[0046] In one possible implementation, when retrieving procurement plan data from a database, this data is typically stored in a structured table, with each row corresponding to a timestamp such as the first day of each month, and the sequence value representing the demand gap.
[0047] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.
Claims
1. A method for predicting procurement demand in conjunction with material control of PMC, characterized by, The method comprises the following steps: S1: obtaining material consumption sequence and corresponding timestamp data, separating trend component and seasonal component by using time series decomposition method to obtain consumption law characteristic sequence; S2: if the fluctuation amplitude of the consumption law characteristic sequence exceeds the preset threshold, it is determined as the basic demand prediction value sequence; S3: obtaining market price index sequence, calculating the correlation coefficient between the basic demand prediction value sequence and the market price index sequence as the market dynamic influence factor by using correlation analysis; For the market dynamic influence factor, if its absolute value exceeds the set threshold, the basic demand prediction value sequence is updated by the autoregressive integral moving average component of the time series model; S4: extracting peak and valley positions from the basic demand prediction value sequence, grouping similar consumption patterns by using clustering method, if the peak position of a group coincides with the historical high demand period, the basic demand prediction value sequence is updated by amplifying the corresponding amplitude of the basic demand prediction value sequence; S5: generating procurement plan sequence according to the basic demand prediction value sequence and the average value of past one year's inventory; S6: obtaining sequence values and corresponding timestamps in the procurement plan sequence, and generating a final output report.
2. The method of claim 1, wherein the method further comprises: In the step S1, the material consumption sequence and the corresponding timestamp data are obtained from the material usage log of the historical production record; For the material consumption sequence and the corresponding timestamp data, the STL function in the Python statsmodels library is used to separate the trend component and the seasonal component, and the consumption law characteristic sequence is obtained, wherein the STL function smoothes the trend by local weighted regression and subtracts the residual sequence obtained by the seasonal mean to obtain the consumption law characteristic sequence.
3. The method of claim 1, wherein the method further comprises: In the step S2, the consumption law characteristic sequence is input into the trained random forest classifier of scikit-learn to obtain the material type classification result, wherein the random forest classifier takes the sequence as input and outputs the material type classification result; the preset threshold of the corresponding classification is obtained according to the material type classification result; If the fluctuation amplitude of the consumption law characteristic sequence exceeds the preset threshold of the corresponding classification, it is determined as the basic demand prediction value sequence.
4. The method of claim 3, wherein the method further comprises: In the step S2, the average consumption rate of the consumption law characteristic sequence is calculated; For the average consumption rate, the standard deviation is calculated as the fluctuation amplitude; If the fluctuation amplitude exceeds the preset threshold of the corresponding classification, it is marked as a high variation mode sequence.
5. The method of claim 1, wherein the method further comprises: determining a demand forecast for the item based on the demand data and the demand forecast model; and determining a replenishment order for the item based on the demand forecast and a replenishment policy. In the step S3, the market price index sequence is obtained from the real-time market supply and demand data source; The basic demand prediction value sequence and the market price index sequence are spliced to obtain a first spliced sequence, wherein the splicing is determined by connecting two sequences along the column axis through the NumPy library; The correlation coefficient is calculated as the market dynamic influence factor for the first spliced sequence; wherein the correlation coefficient is determined by the covariance between the demand prediction value sequence and the market price index sequence divided by the product of the respective standard deviations, the covariance is the average of the deviation product between the two sequences, and the standard deviation is the square root of the sequence variance.
6. The method of claim 1, wherein the method further comprises: In the step S3, the step of updating the base demand prediction value sequence by an autoregressive integrated moving average component of a time series model comprises: obtaining the base demand prediction value sequence as input data, adjusting the base demand prediction value sequence by the autoregressive integrated moving average model to obtain a preliminary adaptation sequence; calculating a moving average of the preliminary adaptation sequence, and updating the base demand prediction value sequence by using the moving average to perform deviation adjustment.
7. The method of claim 1, wherein the method further comprises: determining a demand forecast for the item based on the demand data and the demand forecast model; and determining a replenishment order for the item based on the demand forecast and a replenishment policy. In the step S4, a peak position and a valley position are obtained from the base demand prediction value sequence, the peak position is a maximum value point position of a rated interval in the sequence, and the valley position is a minimum value point position of the rated interval in the sequence; a clustering algorithm is used to group the peak position and the valley position, a similar consumption pattern group is obtained by calculating distances between positions; for the same similar consumption pattern group, it is determined whether the peak position coincides with a consumption sequence corresponding to a historical high demand period, if the peak position coincides with the consumption sequence, a coincidence position is obtained, and a corresponding amplitude of the base demand prediction value sequence is adjusted by adding a deviation coefficient to a corresponding point value of a sequence corresponding to the current similar consumption pattern group to update the base demand prediction value sequence; the deviation coefficient is a difference between a historical high demand period average value and a corresponding point value of a sequence corresponding to the current similar consumption pattern group multiplied by a preset weight, and the historical high demand period average value is an average value of sequence values in a rated length interval centered on the coincidence position in the consumption sequence corresponding to the historical high demand period.
8. The method of claim 1, wherein the method further comprises: determining a demand forecast for the item based on the demand data and the demand forecast model; and determining a replenishment order for the item based on the demand forecast and a replenishment policy. In the step S5, a deviation sequence is obtained by performing difference calculation on the base demand prediction value sequence and an average value of inventories in the past year as a procurement plan sequence.
Citation Information
Cited By
Engineering cycle material supply and demand prediction method and system based on deep learning
CN122222339A
Engineering cycle material supply and demand prediction method and system based on deep learning
CN122222339B