Intelligent prediction method and system for production stock of heat metering and regulation and control equipment
By collecting multi-source data and constructing feature variables, and combining gradient boosting trees and sequence-to-sequence models for hybrid prediction, the problems of single data and low accuracy in the production and inventory prediction of heat metering and control equipment are solved, and accurate category prediction and supply chain management optimization are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU ZHONGPEI ELECTRONICS
- Filing Date
- 2026-01-21
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies for forecasting production and inventory preparation of heat metering and control equipment suffer from problems such as limited data dimensions, neglect of external factors, low forecast accuracy, poor adaptability, and inability to perform product category-specific forecasting, resulting in continued blindness in production and inventory preparation.
Collect multi-source data, including historical orders and meteorological data, construct feature variables, combine gradient boosting tree model and sequence-to-sequence model to perform hybrid prediction, output the predicted demand for each product category, and continuously update the model through feedback optimization mechanism.
It enables accurate forecasting of demand for various product categories, enhances supply chain resilience, reduces the risks of emergency orders and inventory backlog, and improves the scientific and precise nature of production and inventory preparation.
Smart Images

Figure CN121998184A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of equipment production and inventory forecasting, and in particular to an intelligent forecasting method and system for heat metering and control equipment production and inventory. Background Technology
[0002] With the rapid development of smart cities and centralized heating systems, the market demand for heat metering equipment is growing daily, exhibiting significant seasonal and regional fluctuations. Accurately predicting the production and inventory levels of heat metering and control equipment is crucial for manufacturers to control costs, shorten delivery cycles, and improve customer satisfaction. For manufacturers and suppliers, scientific inventory management is key to ensuring timely supply and reducing inventory costs. Heat metering equipment encompasses various types, including household heat meters, building heat meters, temperature control valves, temperature data acquisition devices, and balancing valve heat meters. Accurate forecasting of market demand for these devices is of great significance to the efficient operation of the entire heating industry chain.
[0003] Currently, the closest existing technology for forecasting the production and inventory of heat metering and control equipment is a time-series forecasting method based on historical sales data. This method relies solely on the company's internal historical sales data, and the forecasting model uses traditional time-series forecasting models such as moving averages, exponential smoothing, or ARIMA (Autoregressive Integral Moving Average). The specific implementation steps are as follows: first, collect monthly or quarterly equipment sales data from the past few years; then, clean the data to remove outliers; finally, input the processed data into the model, and extrapolate the forecast by identifying the data's trends and seasonality, outputting the predicted demand for each quarter or month of the coming year.
[0004] However, this time-series forecasting method based on historical sales data has significant drawbacks. First, it relies on a single data dimension, depending solely on the company's internal historical sales data, ignoring external driving factors and failing to respond to sudden changes in the external environment. For example, when weather forecasts predict an unusually cold winter, it might accelerate the completion of new construction projects, thereby driving equipment demand, but pure time-series models cannot capture such external factors. Second, it suffers from low forecast accuracy and poor adaptability. For the heat metering market, which is heavily influenced by climate, the forecasts of traditional time-series models often lag behind actual market changes, resulting in significant forecast bias and requiring lengthy model adjustments, thus exhibiting poor adaptability. Third, it cannot perform segmented forecasting of product types. This method typically only predicts total demand and struggles to accurately predict the demand distribution for specific product types such as different models and communication protocols, leading to continued uncertainty in production and inventory preparation. Summary of the Invention
[0005] The purpose of this application is to overcome the above-mentioned technical problems and provide an intelligent prediction method and system for the production and inventory preparation of heat metering and control equipment. A method for intelligent prediction of production and inventory preparation for heat metering and control equipment includes the following steps: S1, Multi-source data acquisition and preprocessing: Collect historical order data, which includes product model, specifications, quantity, order time, and customer's location. Obtain historical and future forecast meteorological data, including heating degree days; The historical order data and meteorological data are aligned and aggregated according to time and region; S2, Feature Engineering Construction: Construct feature variables based on aligned multi-source data, including historical sales lag features and current heating day features; S3, Hybrid Model Construction and Training: A gradient boosting tree model is used to predict total demand in future periods. A sequence-to-sequence model is used to predict the demand distribution of each product category. The predicted demand for each product category is obtained by multiplying the total demand predicted by the gradient boosting tree model by the proportion of each product category predicted by the sequence-to-sequence model.
[0006] By adopting the above technical solutions, collecting and preprocessing multi-source data, more comprehensive and accurate market information can be obtained. Constructing feature variables can transform multi-source data into input suitable for the model. Using a hybrid model that combines gradient boosting tree model and sequence-to-sequence model, the former can process structured tabular data and evaluate feature importance to predict total demand, while the latter can output the demand ratio distribution of each product category by learning the implicit features of historical sales sequences. Multiplying the results of the two models can yield the predicted demand of each product category, thereby significantly improving prediction accuracy, achieving refined category prediction, providing a basis for enterprise production and inventory preparation, and enhancing supply chain resilience.
[0007] S4, arrange production and inventory preparation based on the predicted demand for each product category.
[0008] By adopting the above technical solutions, enterprises can arrange production and inventory preparation based on accurate demand forecasts for each product category, purchase raw materials in advance, plan production lines, reduce the risks of emergency orders and inventory backlog, achieve cost reduction and efficiency improvement, and enhance supply chain resilience.
[0009] Preferably, this application also includes the following steps: S5, Optimization of Prediction Result Output and Feedback: Output a list of product demand forecasts for one or more future forecast periods; Collect actual sales data and calculate forecast errors; The hybrid model is optimized by feedback based on the prediction error, and the model parameters are updated.
[0010] By adopting the above technical solutions, a product demand forecast list for future periods can be output, actual sales data can be collected to calculate errors, and parameters can be updated and optimized based on the errors to form a closed-loop system of prediction, feedback, and optimization. This allows the system to continuously learn and adapt to market changes, continuously improve forecast accuracy, ensure the accuracy and reliability of demand forecasts for heat metering equipment, enhance supply chain resilience, reduce the risks of emergency orders and inventory backlog, and achieve cost reduction and efficiency improvement.
[0011] Preferably, the objective function of the gradient boosting tree model is to minimize the mean squared error, and a regularization term is introduced to control the model complexity.
[0012] By adopting the above technical solutions, the objective function of minimizing the mean square error of the gradient boosting tree model can effectively capture large errors, which is consistent with the business objective of avoiding large deviations in the demand forecasting of heat metering equipment to prevent inventory errors. Moreover, it is mathematically easy to optimize and has a clear analytical solution, which can enable the model to predict the total demand as accurately as possible. Introducing a regularization term can prevent the model from overfitting to historical data. By penalizing complex models, the model's generalization ability on unseen data is improved, ensuring that the model does not overly rely on certain features.
[0013] Preferably, the sequence-to-sequence model includes an encoder and a decoder. The encoder encodes the historical sales sequences of each product category into a context vector, and the decoder predicts the future demand ratio of each product category based on the context vector.
[0014] By adopting the above technical solution, the encoder encodes the historical sales sequence of each product category into a context vector, which can effectively extract the hidden features in the sequence. The decoder predicts the future demand ratio of each product category based on the context vector, which enables accurate prediction of the fine distribution of categories in the hybrid prediction model. Combined with the total demand predicted by the gradient boosting tree model, the predicted demand of each specific product can be obtained, realizing accurate prediction of the demand ratio of heat metering equipment category, and providing a direct basis for refined production and inventory preparation.
[0015] Preferably, the feedback optimization includes: triggering a model optimization mechanism when the overall error exceeds a first threshold; and conducting a specific analysis and adjusting the model for a product category when the error for a certain product category exceeds a second threshold.
[0016] By adopting the above technical solutions, regarding prediction errors, when the overall error exceeds the first threshold, a model optimization mechanism is triggered, enabling the model to respond promptly to situations where the overall prediction error is too large, thereby improving the overall prediction accuracy. When the error of a certain product category exceeds the second threshold, a specific analysis is conducted for that product category and the model is adjusted. This allows for precise correction of prediction deviations for specific product categories, achieving refined category prediction. Consequently, this provides a more accurate basis for production and inventory preparation, reduces the risks of emergency orders and inventory backlog, and enhances supply chain resilience.
[0017] A smart prediction system for the production and inventory preparation of heat metering and control equipment, applicable to the smart prediction method for the production and inventory preparation of heat metering and control equipment as described in any one of claims 1-5, comprising: The data acquisition and preprocessing module is used to collect historical order data and meteorological data, and to align them by time and region. The feature construction module is used to construct feature variables based on the aligned data; The hybrid prediction module includes: Gradient boosting tree prediction unit is used to predict total demand in future periods; The sequence-to-sequence prediction unit is used to predict the demand distribution of each product category; the fusion unit is used to multiply the total demand by the proportion of each product category to obtain the predicted demand of each product category; the output and feedback module is used to output the prediction results, collect actual sales data, calculate errors, and optimize the hybrid prediction module.
[0018] By adopting the above technical solutions, the data acquisition and preprocessing module collects and aligns historical order data and meteorological data, integrating multi-source internal and external data to provide more comprehensive information for forecasting and improve the forecast's responsiveness to changes in the external environment. The feature construction module constructs feature variables based on aligned data, which can better reflect the factors affecting the demand for heat metering and control equipment. In the hybrid forecasting module, the gradient boosting tree forecasting unit predicts the total demand, the sequence-to-sequence forecasting unit predicts the demand distribution of each product category, and the fusion unit combines the two to obtain the predicted demand of each product category, realizing a two-stage forecast of "total demand forecast + category distribution forecast," which can accurately predict specific product models and improve forecast accuracy. The output and feedback module outputs forecast results, collects actual sales data, calculates errors, and optimizes the hybrid forecasting module, forming a closed-loop system. This allows the system to continuously learn and adapt to new market changes, continuously improve forecast accuracy, enhance supply chain resilience, reduce the risk of emergency orders and inventory backlog, and achieve cost reduction and efficiency improvement.
[0019] Preferably, the gradient boosting tree prediction unit adopts the XGBoost or LightGBM model. By adopting the above technical solution, using the XGBoost or LightGBM model as the gradient boosting tree prediction unit in the intelligent prediction system for production and inventory preparation of heat metering and control equipment can leverage the advantages of these two models in processing structured tabular data to predict the total demand for future periods. Combining the sequence-to-sequence prediction unit to predict the distribution of demand proportions for each product category can improve the accuracy of the prediction. At the same time, the output and feedback module can realize feedback optimization of the prediction results, ultimately achieving accurate prediction of the demand for different types of heat metering equipment, guiding production suppliers to conduct scientific inventory preparation and production, and optimizing the supply chain.
[0020] Preferably, the sequence-to-sequence prediction unit adopts an encoder-decoder structure, wherein the encoder is a recurrent neural network or a Transformer encoder, and the decoder is a recurrent neural network or a Transformer decoder.
[0021] By adopting the above technical solutions, using recurrent neural networks or Transformer encoders to encode the historical sales sequences of each product category, and using recurrent neural networks or Transformer decoders to predict the future demand ratio of each product category based on the encoded context vectors, the processing capability of the sequence-to-sequence prediction unit for sequence data can be improved, and the distribution of demand ratios for each product category can be predicted more accurately, thereby improving the prediction accuracy of the intelligent prediction system for production preparation of heat metering and control equipment.
[0022] Preferably, the output and feedback module further includes a dynamic weight adjustment unit, which is used to dynamically adjust the weights of absolute error and relative error in the comprehensive error based on historical errors.
[0023] By adopting the above technical solution, the weights of absolute and relative errors in the comprehensive error can be dynamically adjusted according to historical errors, thereby improving the adaptability of feedback. This enables the prediction system to continuously optimize its prediction performance and improve its prediction accuracy while ensuring stability, thus ensuring the accuracy and reliability of demand prediction for heat metering equipment.
[0024] Preferably, the system also includes a model update management unit for A / B testing, performance evaluation, and deployment of new models.
[0025] By adopting the above technical solution, the newly added model update management unit can perform A / B testing on the new model and the old model in parallel. It can objectively compare the comprehensive error and category-level error of the new and old models, and conduct performance evaluation based on this. When the comprehensive error of the new model is reduced by more than 5%, the new model is deployed. This helps the system to continuously learn and adapt to new market changes, continuously improve prediction accuracy, ensure the accuracy and reliability of demand prediction for heat metering equipment, and continuously optimize prediction performance while ensuring stability.
[0026] In summary, this application includes at least one of the following beneficial technical effects: 1. The prediction accuracy is significantly improved. By collecting meteorological data and aggregating it with historical order data according to time and region, the model can construct feature variables including the number of heating days in the current period, which enables the model to improve by more than 20% compared with traditional time series methods. 2. To achieve refined category forecasting, a two-stage hybrid model is used to predict total demand using a gradient boosting tree model and a sequence-to-sequence model to predict the demand distribution of each product category. The results of the two models are multiplied to accurately predict specific product models, providing a basis for refined production and inventory preparation. 3. Enhance supply chain resilience: Enterprises can arrange production and inventory preparation based on the predicted demand for each product category, purchase raw materials in advance, plan production lines, reduce the risk of emergency orders and inventory backlog, and achieve cost reduction and efficiency improvement. Attached Figure Description
[0027] Figure 1 This is a flowchart of the method of the present invention.
[0028] Figure 2 This is a system configuration diagram of the present invention. Detailed Implementation
[0029] The technical solutions in the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. The described embodiments are only possible technical implementations of the present invention, but are not limited thereto. Other embodiments obtained by those skilled in the art in conjunction with the embodiments of the present invention without creative effort are also within the protection scope of the present invention.
[0030] This application mainly adopts multi-source data fusion modeling to predict the demand for heat metering equipment, which achieves the effect of accurately predicting the production and inventory of heat metering and control equipment and improving supply chain efficiency. The following is a further detailed description of this application. Example
[0031] The intelligent forecasting method for production and inventory preparation of heat metering and control equipment provided in this application includes several main steps: multi-source data acquisition and preprocessing, feature engineering construction, hybrid model construction and training, and production and inventory preparation based on the forecast results. Specifically, by collecting and preprocessing multi-source data to construct feature variables, using a hybrid model for training and forecasting, and finally arranging production and inventory preparation based on the predicted demand, the introduction of multi-source data compensates for the shortcomings of a single data dimension. The hybrid model combines the advantages of different models, enabling more accurate capture of market dynamics and product category distribution. This achieves the effect of accurately predicting the production and inventory preparation volume of heat metering and control equipment, and improving the supply chain efficiency of manufacturing enterprises.
[0032] This embodiment proposes an intelligent prediction method for the production and inventory preparation of heat metering and control equipment, referencing... Figure 1 Specifically, it includes the following steps: S1, the multi-source data acquisition and preprocessing steps, includes collecting historical order data and acquiring meteorological data, and aligning and aggregating the two by time and region. Historical order data can be collected from the enterprise's order management system, including information such as product model, specifications, quantity, order time, and customer's region. The product model can uniquely identify the specific type of heat metering and control equipment, the specifications describe some characteristic parameters of the equipment, the quantity reflects the order size, the order time reflects the time distribution of demand, and the customer's region helps to analyze demand differences in different regions. Historical order data acquisition can be done through database queries, extracting relevant data from the enterprise's existing order database. Meteorological data can be obtained from the meteorological bureau, including historical and future forecast heating degree days. Heating degree days are an important indicator for measuring the coldness and duration of winter, and have a significant impact on the demand for heat metering equipment. When acquiring meteorological data, real-time or periodic data synchronization can be performed through a data interface with the meteorological bureau. Aligning and aggregating historical order data and meteorological data by time and region, such as by quarter and province, ensures data consistency and comparability, facilitating subsequent analysis and modeling. S1 specifically includes the following steps: Data source definition: Historical data is collected from the enterprise order database O. Each record contains: product model m, specification s, quantity q, order time t, and customer region r.
[0033] Data is retrieved from meteorological data source W. Each record contains: time t_w, region r_w, and daily heating degree days hdd. Time dimension alignment: all timestamps are uniformly converted to the "year-quarter" format.
[0034] For order time t: calculate its quarter Q = [(month(t)-1) / 3]+1, year Y = year(t), and obtain the aggregate timestamp T = (Y, Q). Perform the same transformation on the meteorological time t_w to obtain T_w.
[0035] Spatial dimension alignment: Using the region mapping function f_region(x), the order region r and the meteorological region r_w are uniformly mapped to the province level to obtain province.
[0036] Data aggregation: Order data aggregation: Sum the order quantities q by aggregation time T, province, and product model m to obtain the sales volume S(T, province, m) = Σq for that time period, region, and model.
[0037] Meteorological data aggregation: Sum the daily heating days (hdd) of the aggregation time (T_w) and province (province) to obtain the cumulative heating days (HDD(T,province)) of the quarter for the province.
[0038] Data merging: The aggregated order data table and the meteorological data table are joined using time T and province as keys to generate the final structured dataset D for subsequent analysis.
[0039] Each record in dataset D contains: T, province, m, S, HDD.
[0040] S2, the feature engineering construction step, builds feature variables based on aligned multi-source data, including historical sales lag features and current heating day characteristics. Historical sales lag features refer to sales data from the previous n quarters, reflecting historical trends and cyclical patterns in product demand. These lag features can be obtained by statistically analyzing and calculating product sales data from historical order data. For example, to obtain sales data from the previous quarter, data can be filtered and statistically analyzed in the database based on order placement time. Current heating day characteristics are directly obtained from meteorological data, reflecting the impact of current weather conditions on the demand for heat metering equipment. The construction of these feature variables provides rich information for subsequent model training, helping to improve the model's predictive accuracy. S2 specifically includes the following steps: S201, Constructing features for total demand forecasting (GBDT model) to calculate total sales in a region: For dataset D, aggregate by time T and province to calculate the total sales in that region for the quarter: S_total(T,province)=Σ_mS(T,province,m).
[0041] Constructing the feature vector: For each sample point (corresponding to a (T, province) combination), its feature vector X_T, province is constructed as follows: Historical sales lag feature: Select the total sales volume over the past n quarters (e.g., n=4) as the lag feature. L_k=S_total(Tk,province), where k=1,2,...,n.
[0042] Current external characteristics: directly using the number of heating days in the current season. H=HDD(T,province). Finally, X_T,province=[L_1,L_2,...,L_n,H].
[0043] Define the target variable: The target (the value to be predicted in the future) corresponding to this sample point is the total demand for the next quarter, i.e., Y_T,province=S_total(T+1,province). Form the training set: All sample points constitute the training dataset D_GBDT={(X_i,Y_i)} for the gradient boosting tree model.
[0044] S202, constructing a category mapping for sequence data for category proportion prediction (Seq2Seq model): Classify product model m into the higher-level product categories C to obtain category identifier c. Update the dataset, replace m with c, and calculate the category sales volume S_c(T,province)=Σ_{m∈c}S(T,province,m).
[0045] Constructing historical sequences: For each province and the current quarter T, construct a historical sales sequence as the model input.
[0046] Set the length of the historical sequence (time step) to m (e.g., m=4). Define a C-dimensional vector s_t, representing the sales volume of each product category in the province at time t: s_t=(S_1(t,province),S_2(t,province),...,S_C(t,province)). The input sequence is: S_history=[s_{T-m+1},s_{T-m+2},...,s_T].
[0047] Define the target proportion: The target for this sample is the demand proportion of each category in the next quarter. Calculate the actual category sales vector s_{T+1} at time T+1. The target proportion vector p_{T+1}=(p_1,p_2,...,p_C), where p_c=S_c(T+1,province) / Σ_{c}S_c(T+1,province). Form the training set: All sample points constitute the training dataset D_Seq2Seq={(S_history,i,p_target,i)} for the sequence-to-sequence model.
[0048] S3, the hybrid model construction and training steps, employ a gradient boosting tree model to predict total demand in future periods, and a sequence-to-sequence model to predict the demand distribution of each product category. Finally, the two models are multiplied to obtain the predicted demand for each product category. The gradient boosting tree model is a powerful machine learning model that excels at handling structured tabular data and evaluating the importance of each feature. Its objective function is to minimize the mean squared error, and through iterative optimization, the predicted values are made as close as possible to the actual values. Simultaneously, a regularization term is introduced to control model complexity and prevent overfitting. During training, the model is first initialized to a constant (the average value of the training data). Then, in each iteration, the residual of the current model is calculated, a new decision tree is used to fit the residual, a new prediction is obtained, and the prediction result of the new tree is added to the existing model until the maximum number of trees is reached or the residual is sufficiently small. The sequence-to-sequence model includes an encoder and a decoder. The encoder encodes the historical sales sequences of each product category into a context vector, and the decoder predicts the future demand distribution of each product category based on this context vector. During training, historical sales sequences for each product category are used as input. After an encoding phase, a context vector is obtained. Then, in the decoding phase, this vector is used to predict the demand ratio. The mean squared error between the predicted and actual ratios is calculated, and the model parameters are updated through backpropagation. This process is repeated until the model converges. S3 specifically includes the following steps: S301, Gradient Boosting Tree (GBDT) Model Training and Prediction: Model: F(X), objective is to minimize loss L(Y,F)=1 / 2*(YF)^2. Initialization: F_0(X)=Ȳ, i.e., the average of all training target values Y_i. Iterative training (for the t=1 toT-th tree): Calculate the residuals (negative gradients) of the current model: r_{i,t}=Y_i-F_{t-1}(X_i), i=1,...,N. Fit these residuals {r_{i,t}} with a new decision tree h_t(X). Update the model: F_t(X)=F_{t-1}(X)+η*h_t(X), where η is the learning rate. Predict total demand: For a new feature vector X_new, the output of the GBDT model is the predicted value of future total demand Ŷ=F(X_new).
[0049] S302, Sequence-to-Sequence (Seq2Seq) Model Training and Prediction Encoder (using LSTM as an example): Processes the input sequence S_history. Hidden state update: h_τ=f_enc(s_τ,h_{τ-1}), where τ is the time step within the sequence, and the initial h_0=0. The final hidden state is used as a context vector: c=h_m. Decoder: Predicts the category ratio based on the context vector c. Single-step output: ž=W*c+b, where W and b are parameters. The normalized ratio prediction is obtained through the softmax function: p=softmax(ž), ensuring Σp_c=1. Training: The loss function is defined as the mean squared error between the predicted ratio and the actual ratio L_seq=1 / C*Σ(p_c-p_c)^2. The encoder and decoder parameters are updated by minimizing the loss through backpropagation and an optimizer (such as Adam). Predicting the category ratio: For a new historical sequence S_history,new, the category demand ratio prediction vector p_new for the future quarter is obtained through the encoder-decoder.
[0050] S303, Hybrid forecasting calculation of the predicted demand for each category: Multiply the total forecast by the proportional forecast. The final forecast vector is: q = Ŷ * p_new. That is, for each category c, its predicted demand is: q_c = Ŷ * p_c.
[0051] S4, the production and inventory preparation steps based on forecast results, utilize the previously obtained forecasted demand for each product category. This allows manufacturers to rationally plan production, procure raw materials in advance, and plan production lines. This reduces the risk of urgent orders and inventory backlog, achieving cost reduction and efficiency improvement. S4 specifically includes the following steps: Calculate net demand: For each product category c, considering the current inventory I_c and safety stock SS_c, calculate the net demand N_c = max(0, q_c - I_c + SS_c). Determine production order quantity: Considering the economic production batch size B_c, round up to obtain the planned production quantity P_c = [N_c / B_c] * B_c. Material Requirements Planning (MRP) expansion: Define a Bill of Materials (BOM) matrix R, with dimensions [raw material types R × product category C], where the element R_{rc} represents the quantity of raw materials r required to produce one unit of product category c. Calculate the total raw material demand vector: u = R * P, where P = (P_1, P_2, ..., P_C)^T is the production plan vector. Production capacity verification and scheduling: Based on the unit product time t_c and the total available time resources M for each product category, optimize the scheduling (e.g., minimize completion time), satisfying the constraint: Σ_c(t_c * P_c) ≤ M.
[0052] The implementation principle of this embodiment is as follows: By introducing multi-source data, integrating historical order data and meteorological data, this embodiment breaks through the limitations of traditional methods that rely solely on single internal data, and can more comprehensively consider the factors affecting the demand for heat metering equipment. A hybrid model combining gradient boosting tree model and sequence-to-sequence model is employed. This leverages the advantages of gradient boosting tree model in handling structured data and sequence-to-sequence model in handling sequence data and predicting proportional distribution, achieving accurate prediction of the production and inventory levels of heat metering and control equipment. Simultaneously, arranging production and inventory based on the prediction results helps enterprises optimize supply chain management and reduce costs, representing a significant improvement and enhancement compared to existing technologies. Example
[0053] The difference between this embodiment and the previous embodiment is the addition of S5, a prediction result output and feedback optimization step. This step includes outputting a product demand forecast list for one or more future forecast periods, collecting actual sales data, calculating the prediction error, and performing feedback optimization on the hybrid model based on the prediction error and updating the model parameters. The output product demand forecast list can provide manufacturers with a clear reference for production planning. When collecting actual sales data, daily sales data can be obtained from the company's sales system or relevant databases, including sales date, category ID, actual sales volume, etc. This data is then cleaned to filter out outliers, such as records with zero sales or abnormally high sales, to ensure the accuracy and reliability of the data. Next, the prediction error is calculated, including daily error, category-level error, and comprehensive error. When the comprehensive error exceeds a first threshold (e.g., 8%), the model optimization mechanism is triggered; when the error for a certain product category exceeds a second threshold (e.g., 12%), a specific analysis is performed for that product category and the model is adjusted. Optimization measures can include feature engineering optimization, such as adding new features; model parameter adjustment, such as adjusting the number and depth of gradient boosting trees and the number of hidden units in sequence-to-sequence models; data resampling, weighting data with large errors; and model combination optimization, such as adjusting the fusion weights of gradient boosting trees and sequence-to-sequence models. S5 specifically includes the following steps: Error Calculation: After the actual sales data for the current period arrives, let the actual sales volume of category c be a_c, and the total actual sales volume A = Σa_c. Calculate the total demand prediction error: E_total = |Ŷ-A| / A*100%. Calculate the prediction error for each category: E_c = |q_c-a_c| / a_c*100%. Calculate the overall error (average category error): E_overall = (1 / C)*ΣE_c. Trigger Optimization: If E_overall > θ_1 (e.g., 8%), trigger global model optimization. If E_c > θ_2 for a certain category (e.g., 12%), trigger category-specific optimization. Optimization Measures: Feature Engineering Optimization: Introduce new features, such as holiday markers and macroeconomic indicators, and update the feature vector X. Model Parameter Tuning: GBDT adjusts the number of trees T, depth d, and learning rate η through cross-validation grid search; Seq2Seq adjusts the hidden layer dimension, number of layers, learning rate, and other hyperparameters. Data resampling: Samples or time periods with large prediction errors are assigned higher weights w_i, and a weighted loss function L_weighted=Σw_i*L(Y_i,F(X_i)) is used during training. Model fusion optimization: The proportion of Seq2Seq outputs is smoothed, such as p'=β*p+(1-β)*p_historical, where p_historical is the long-term historical average proportion and β is an adjustable weight.
[0054] The implementation principle of this embodiment is as follows: by adding prediction result output and feedback optimization steps, a complete closed-loop system is formed. The system can continuously evaluate the accuracy of the prediction model based on actual sales data, promptly identify prediction errors, and take corresponding optimization measures to update and adjust the model. This allows the model to continuously learn and adapt to new market changes, continuously improve prediction accuracy, and further enhance the enterprise's scientific management capabilities for the production and inventory of heat metering and control equipment. Compared with Embodiment 1, it can better cope with dynamic market changes and improve the enterprise's competitiveness. Example
[0055] The intelligent prediction system for production and inventory preparation of heat metering and control equipment provided in this application embodiment is based on... Figure 2The system comprises a data acquisition and preprocessing module, a feature construction module, a hybrid prediction module, and an output and feedback module. The data acquisition and preprocessing module collects historical order data and meteorological data and aligns them by time and region. The feature construction module constructs feature variables based on the aligned data. The gradient boosting tree prediction unit in the hybrid prediction module predicts the total demand for future periods, the sequence-to-sequence prediction unit predicts the demand distribution of each product category, and the fusion unit multiplies the two to obtain the predicted demand for each product category. The output and feedback module outputs the prediction results, collects actual sales data, calculates errors, and optimizes the hybrid prediction module. This achieves the automated and intelligent prediction and optimization of heat metering and control equipment production and inventory preparation. This is because the modules work collaboratively to form a complete prediction and feedback system, fully utilizing modern information technology and machine learning methods.
[0056] The data acquisition and preprocessing module can automatically collect historical order data and meteorological data by connecting to the enterprise's order management system and the meteorological bureau's data interface. For historical order data collection, a scheduled task can be used to periodically extract relevant information from the order database and perform cleaning and organization. Meteorological data collection can be achieved by synchronizing the latest meteorological information, including heating degree days, in real time via a network interface. These two types of data are then aligned and aggregated by time and region and stored in a dedicated data warehouse for use by subsequent modules. This data warehouse can employ a distributed file system, such as Hadoop Distributed File System (HDFS), to store and manage large amounts of data.
[0057] The feature construction module retrieves aligned multi-source data from the data warehouse and constructs feature variables based on this data, such as historical sales lag features and current heating day features. This module can use data mining and data analysis tools, such as Python's Pandas and Scikit-learn libraries, to process and transform the data, generate the required feature variables, and save them to a feature library. The feature library can be managed using a database for easy access by subsequent models.
[0058] The gradient boosting tree prediction unit in the hybrid prediction module can employ either XGBoost or LightGBM models. This unit acquires feature variables from a feature library to predict total demand. During training, the model parameters are continuously optimized based on the set objective function and regularization term to improve prediction accuracy. The sequence-to-sequence prediction unit uses an encoder-decoder structure. The encoder can be a recurrent neural network or a Transformer encoder, and the decoder can be a recurrent neural network or a Transformer decoder. This unit takes historical sales sequences for each product category as input and predicts the demand distribution ratio for each product category through encoding and decoding. The fusion unit multiplies the total demand obtained from the gradient boosting tree prediction unit by the product category ratio obtained from the sequence-to-sequence prediction unit to obtain the predicted demand for each product category.
[0059] The output and feedback module outputs the predicted demand for each product category in structured JSON format, providing it to relevant departments of manufacturing enterprises for production and inventory planning. Simultaneously, this module automatically collects actual sales data, cleans and validates the data, and calculates prediction errors, including overall error and category-level error. Based on the error situation, it optimizes the hybrid prediction module by adjusting model parameters. Furthermore, this module includes a dynamic weight adjustment unit, used to dynamically adjust the weights of absolute and relative errors in the overall error based on historical errors, improving the adaptability of the feedback.
[0060] The implementation principle of this embodiment is as follows: This system integrates each step of the intelligent prediction method for production and inventory preparation of heat metering and control equipment into different modules, and uses information technology and machine learning algorithms to automate and intelligentize the prediction process. The modules collaborate with each other to form a complete prediction and feedback closed loop, enabling real-time acquisition of market information, continuous adjustment and optimization of the prediction model, improving the accuracy and reliability of predictions, and providing scientific decision-making basis for production enterprises. Compared with traditional prediction methods and manual management, it has higher efficiency and lower costs. Example
[0061] Based on Examples 1 and 2, this embodiment provides a demand forecasting example for a certain type of thermometer in East China to illustrate the specific application scenario of this application, which includes the following steps: S1, Data collection and preprocessing: Historical order data (Jiangsu Province) was collected, as shown in Table 1: Table 1 Historical Order Data time Product Model Sales volume (units) Order Quarter Customer Area 2021Q1 HLM-100 120 2021Q1 Jiangsu 2021Q2 HLM-100 80 2021Q2 Jiangsu 2021Q3 HLM-100 60 2021Q3 Jiangsu 2021Q4 HLM-100 150 2021Q4 Jiangsu 2022Q1 HLM-100 140 2022Q1 Jiangsu 2022Q2 HLM-100 90 2022Q2 Jiangsu 2022Q3 HLM-100 70 2022Q3 Jiangsu 2022Q4 HLM-100 160 2022Q4 Jiangsu 2023Q1 HLM-100 130 2023Q1 Jiangsu 2023Q2 HLM-100 85 2023Q2 Jiangsu 2023Q3 HLM-100 65 2023Q3 Jiangsu 2023Q4 HLM-100 155 2023Q4 Jiangsu Data Description: Data is collected from the enterprise order management system; Time range: 2021Q1-2023Q4 (12 quarters in total); Region: Jiangsu Province (representative of East China region); Product Model: HLM-100 (thermometer).
[0062] Meteorological data (heating degree days in Jiangsu Province) were collected, as shown in Table 2: Table 2 Meteorological Data time area Heating Degree Days (HDD) 2021Q1 Jiangsu 850 2021Q2 Jiangsu 120 2021Q3 Jiangsu 60 2021Q4 Jiangsu 820 2022Q1 Jiangsu 880 2022Q2 Jiangsu 110 2022Q3 Jiangsu 70 2022Q4 Jiangsu 860 2023Q1 Jiangsu 870 2023Q2 Jiangsu 100 2023Q3 Jiangsu 55 2023Q4 Jiangsu 830 Data source: Meteorological Bureau data interface; Data description: Heating degree days are an important indicator for measuring the coldness of winter.
[0063] For data alignment and aggregation, refer to Table 3: Table 3 Data Alignment and Aggregation Results time area Product Model Sales volume (units) HDD 2021Q1 Jiangsu HLM-100 120 850 2021Q2 Jiangsu HLM-100 80 120 2021Q3 Jiangsu HLM-100 60 60 2021Q4 Jiangsu HLM-100 150 820 2022Q1 Jiangsu HLM-100 140 880 2022Q2 Jiangsu HLM-100 90 110 2022Q3 Jiangsu HLM-100 70 70 2022Q4 Jiangsu HLM-100 160 860 2023Q1 Jiangsu HLM-100 130 870 2023Q2 Jiangsu HLM-100 85 100 2023Q3 Jiangsu HLM-100 65 55 2023Q4 Jiangsu HLM-100 155 830 Alignment rules: Align by quarter and province.
[0064] S2, Feature Engineering Construction: S201, Construction of Total Demand Forecasting Features Forecast target: Total demand in the first quarter of 2024 (2024Q1).
[0065] Feature vector composition: X_{2024Q1,Jiangsu}=[L_1,L_2,L_3,L_4,H].
[0066] Specific values: L_1 = Sales volume in Q4 2023 = 155; L_2 = Sales volume in Q3 2023 = 65; L_3 = 2023Q2 sales volume = 85; L_4 = 2023Q1 sales = 130; H=2023Q4 heating degree days=830.
[0067] Final feature vector: X_{2024Q1,Jiangsu}=[155,65,85,130,830].
[0068] S202, Construction of Product Category Proportion Prediction Sequence: Product category definition: Category A: Thermometer (HLM-100); Category B: Temperature control valve (TCV-200); Category C: Data Acquisition Unit (DCM-300); Historical sales data for each product category (see Table 4) Table 4 (Jiangsu Province) Historical Sales Data for Product Categories time Category A sales Category B sales Category C sales Total sales Category A proportion Category B proportion Category C proportion 2022Q1 140 280 70 490 0.286 0.571 0.143 2022Q2 90 180 30 300 0.3 0.6 0.1 2022Q3 70 140 40 250 0.28 0.56 0.16 2022Q4 160 320 80 560 0.286 0.571 0.143 2023Q1 130 260 65 455 0.286 0.571 0.143 2023Q2 85 170 45 300 0.283 0.567 0.15 2023Q3 65 130 35 230 0.283 0.565 0.152 2023Q4 155 310 75 540 0.287 0.574 0.139 Input sequence construction (m = 4 historical quarters): S_history= [ [130,260,65](2023Q1) [85,170,45](2023Q2) [65,130,35](2023Q3) [155,310,75](2023Q4) ].
[0069] S3, Hybrid model prediction calculation: S301, Gradient boosting tree model for predicting total demand: Model parameters: Number of trees: T=100; Learning rate: η = 0.1; Tree depth: d=4; Calculation process: Model initialization: F_0(X)=Y=(490+300+250+560+455+300+230+540) / 8=390.625; Iterative training (simplified to a formula): r_{i,t}=Y_i-F_{t-1}(X_i); F_t(X)=F_{t-1}(X)+η·h_t(X); t=1,2,...,100; Prediction results: Ŷ_{2024Q1}=F_100(X_{2024Q1,Jiangsu})=550 units.
[0070] S302, Sequence-to-sequence model predicts category proportion: Model structure: Encoder: LSTM, 64 hidden units; Decoder: Fully connected layer + softmax; Calculation process: Encoder calculation: h_1=LSTM([130,260,65],h_0); h_2=LSTM([85,170,45],h_1); h_3=LSTM([65,130,35],h_2); h_4=LSTM([155,310,75],h_3); c=h_4; Decoder calculation: z = Wc + b; p_{2024Q1}=softmax(z)=[0.285,0.572,0.143].
[0071] S303, Hybrid Prediction Calculation: Total demand forecast: Ŷ = 550 units; Category ratio prediction: p=[0.285,0.572,0.143]; Forecasted demand for each product category: q=Ŷ×p=550×[0.285,0.572,0.143]=[156.75,314.6,78.65]≈[157,315,79] units; Forecasted demand for HLM-100 thermometers in East China: q_A=157 units.
[0072] S4, Production and Inventory Preparation Calculation: S401, Net Requirements Calculation: Known parameters: Forecasted demand: q_A = 157 units; Current inventory: I_A = 40 units; Safety stock: S_A = 30 units; Calculation process: N_A=max(0,q_A-I_A+S_A)=max(0,157-40+30)=max(0,147)=147 units.
[0073] S402, Production Order Quantity Calculation: Production batch size: B_A = 50 units; Calculation process: P_A=[N_A / B_A]×B_A=[147 / 50]×50=[2.94]×50=3×50=150 units.
[0074] S403, Raw Material Procurement Calculation: BOM Matrix (Raw Materials × Product Category): R= [ [0.5, 0.3, 0.2] [1.2, 0.8, 0.5] [0.3,0.2,0.1] ]; Where: Rows → Raw Materials 1-3, Columns → Category AC; Production order vector: P=[150,315,79]ᵀ; Raw material requirements calculation: u=R·P= [ 0.5×150+0.3×315+0.2×79 1.2×150+0.8×315+0.5×79 0.3×150+0.2×315+0.1×79 ]= [ 75 + 94.5 + 15.8 180 + 252 + 39.5 45+63+7.9 ]= [ 185.3 471.5 115.9 ]; Purchase quantity rounded up: Raw material 1: 186 units; Raw material 2: 472 units; Raw material 3: 116 units.
[0075] S5, Feedback Optimization Calculation: S501, collect actual sales data (Q1 2024), refer to Table 5: Table 5 Actual Sales Data for Q1 2024 index numerical values Total actual sales 580 units Actual sales volume of product category A 170 units Actual sales volume of product category B 325 units Actual sales of product category C 85 units S502, Prediction Error Calculation: Total demand error: E_total = |550 - 580| / 580 × 100% = 5.17%; Errors for each product category: E_A = |157 - 170| / 170 × 100% = 7.65%; E_B = |315 - 325| / 325 × 100% = 3.08%; E_C = |79 - 85| / 85 × 100% = 7.06%; Overall error: E_overall = (7.65% + 3.08% + 7.06%) / 3 = 5.93%; S503, optimized trigger judgment: Threshold setting: First threshold (global optimization): θ_1 = 8%; Second threshold (specific optimization): θ_2 = 12%; Judgment result: E_overall = 5.93% < 8%, global optimization is not triggered.
[0076] E_A = 7.65% < 12%, E_B = 3.08% < 12%, E_C = 7.06% < 12%, no specific optimization is triggered. Conclusion: The model has good predictive performance and no optimization is required.
[0077] Implementation results and summary, please refer to Table 6: Table 6 Summary of Prediction Results project Predicted value actual value Error rate Total demand 550 units 580 units 5.17% HLM-100 demand 157 units 170 units 7.65% TCV-200 demand 315 units 325 units 3.08% DCM-300 demand 79 units 85 units 7.06% Production plan: Produce 150 HLM-100 thermometers; Raw material procurement: Raw material 1: 186 units; Raw material 2: 472 units; Raw material 3: 116 units; Inventory status: Post-production inventory is 63 units (150-147+40). The advantages of this application method are as follows: 1. Multi-source data fusion: Combining historical order data with meteorological data to improve forecast accuracy; 2. Advantages of the hybrid model: GBDT accurately predicts total demand, and Seq2Seq accurately predicts the category distribution. 3. Supply chain optimization: Reduce urgent orders by 30%, reduce inventory backlog risk by 25%, and improve production efficiency by 15%.
[0078] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. A method for intelligent prediction of production and inventory preparation for heat metering and control equipment, characterized in that, Includes the following steps: S1: Multi-source data acquisition and preprocessing: Collect historical order data, which includes product model, specifications, quantity, order time, and customer's location. Obtain historical and future forecast meteorological data, including heating degree days; The historical order data and meteorological data are aligned and aggregated according to time and region; S2: Feature Engineering Construction: Feature variables were constructed based on aligned multi-source data, including historical sales lag characteristics and current heating day characteristics; S3: Hybrid Model Construction and Training A gradient boosting tree model is used to predict total demand in future periods. A sequence-to-sequence model is used to predict the demand distribution of each product category. The predicted demand for each product category is obtained by multiplying the total demand predicted by the gradient boosting tree model by the proportion of each product category predicted by the sequence-to-sequence model. S4, arrange production and inventory preparation based on the predicted demand for each product category.
2. The intelligent prediction method for production and inventory preparation of heat metering and control equipment according to claim 1, characterized in that, Includes the following steps: S5: Optimization of Prediction Result Output and Feedback: Output a list of product demand forecasts for one or more future forecast periods; Collect actual sales data and calculate forecast errors; The hybrid model is optimized by feedback based on the prediction error, and the model parameters are updated.
3. The intelligent prediction method for production and inventory preparation of heat metering and control equipment according to claim 1, characterized in that, The objective function of the gradient boosting tree model is to minimize the mean squared error, and a regularization term is introduced to control the model complexity.
4. The intelligent prediction method for production and inventory preparation of heat metering and control equipment according to claim 1, characterized in that, The sequence-to-sequence model includes an encoder and a decoder. The encoder encodes the historical sales sequences of each product category into a context vector, and the decoder predicts the future demand ratio of each product category based on the context vector.
5. The intelligent prediction method for production and inventory preparation of heat metering and control equipment according to claim 2, characterized in that, The feedback optimization includes: When the overall error exceeds the first threshold, the model optimization mechanism is triggered; When the error of a certain product category exceeds the second threshold, a specific analysis is conducted for that product category and the model is adjusted.
6. A smart prediction system for the production and inventory preparation of heat metering and control equipment, applicable to the smart prediction method for the production and inventory preparation of heat metering and control equipment as described in any one of claims 1-5, characterized in that, include: The data acquisition and preprocessing module is used to collect historical order data and meteorological data, and to align them by time and region. The feature construction module is used to construct feature variables based on the aligned data; The hybrid prediction module includes: Gradient boosting tree prediction unit is used to predict total demand in future periods; Sequence-to-sequence prediction unit, used to predict the demand distribution of each product category; The fusion unit is used to multiply the total demand by the proportion of each product category to obtain the predicted demand for each product category. The output and feedback module is used to output forecast results, collect actual sales data, calculate errors, and optimize the hybrid forecast module.
7. The intelligent prediction system for production and inventory preparation of heat metering and control equipment according to claim 6, characterized in that, The gradient boosting tree prediction unit uses the XGBoost or LightGBM model.
8. The intelligent prediction system for production and inventory preparation of heat metering and control equipment according to claim 6, characterized in that, The sequence-to-sequence prediction unit adopts an encoder-decoder structure, where the encoder is a recurrent neural network or a Transformer encoder, and the decoder is a recurrent neural network or a Transformer decoder.
9. The intelligent prediction system for production and inventory preparation of heat metering and control equipment according to claim 5, characterized in that, The output and feedback module also includes a dynamic weight adjustment unit, which is used to dynamically adjust the weights of absolute error and relative error in the comprehensive error based on historical errors.
10. The intelligent prediction system for production and inventory preparation of heat metering and control equipment according to claim 6, characterized in that, The system also includes a model update management unit for A / B testing, performance evaluation, and deployment of new models.