A method for forecasting the production demand of raw materials for cement poles
Patent Information
- Application Number
- CN202611152773.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-20
AI Technical Summary
[0004]为了解决现有技术中原材料需求预测对多周期规律表达不足、难以结合外部因素与生产计划动态提取并融合特征、预测精度受限的问题,第一方面,本发明提供了一种水泥电杆原材料生产需求预测方法,包括以下步骤:
[0018]本发明将历史原材料消耗数据按周期重构为二维矩阵,并结合多周期正余弦相位编码构建多通道二维周期张量,以增强模型对周内变化、跨周期趋势及季节性规律的表达能力。通过联合外部影响数据与相位编码生成对应数据点的扰动权重,并与基准权重组合形成相位自适应一维行卷积核和列卷积核,使模型能够针对不同时间相位分别提取周期内关联特征和跨周期趋势特征。进一步利用门控网络计算融合系数,对不同尺度特征进行自适应加权融合,并结合生产计划数据进行预测解码,从而提升水泥电杆原材料需求预测的准确性和稳定性。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application belongs to the field of demand forecasting, and in particular relates to a method for forecasting the production demand of raw materials for cement poles. Background Technology
[0002] Cement poles are essential materials in the construction of infrastructure such as power and communications, and their production process typically requires the continuous consumption of basic raw materials such as steel bars, cement, and sand. Scientific forecasting of raw material production demand helps companies rationally plan procurement, inventory, and production, reducing the risk of capital tied up in inventory and minimizing work stoppages due to insufficient material supply. Because the demand for cement poles is influenced by various factors such as infrastructure construction cycles, seasonal climate changes, macroeconomic policies, and short-term unforeseen events, raw material consumption often exhibits multi-cycle and non-linear fluctuations. For example, annually, it may fluctuate due to seasonal variations and construction cycles, while in the short term, it may experience localized fluctuations depending on specific production schedules and changes in the external environment. Therefore, accurately predicting future raw material demand by comprehensively utilizing historical consumption data, production plan data, and external influencing factors is a crucial issue for cement pole manufacturers to improve their intelligent management and production collaboration capabilities.
[0003] Existing raw material demand forecasting methods typically rely on traditional time series models or basic machine learning algorithms, often treating historical consumption data as a single time series. This limits their ability to represent multi-scale cyclical patterns, such as weekly, monthly, and annual cycles. When faced with complex production plans and multiple external environmental factors, existing methods often employ static, uniform feature extraction approaches. This makes it difficult to dynamically adjust the focus of feature perception based on the cyclical phase at different time points, and also fails to fully characterize the coupling relationship between external influencing factors and the time phase. Consequently, the models lack adaptability in extracting local fluctuation features within a cycle and macro-trend features across cycles, and the fusion of multi-scale features is insufficient, thus affecting the stability and accuracy of raw material demand forecasting under complex production environments. Summary of the Invention
[0004] To address the shortcomings of existing raw material demand forecasting technologies, such as insufficient representation of multi-period patterns, difficulty in dynamically extracting and integrating features from external factors and production plans, and limited forecasting accuracy, this invention provides a method for forecasting the production demand of raw materials for cement poles, comprising the following steps: Acquire historical raw material consumption time-series data, production plan data, and external impact data; reconstruct the historical raw material consumption time-series data into an original consumption data matrix based on a first time period as the first channel of a two-dimensional periodic tensor; set a second time period, and calculate the sine and cosine phase codes of each data point in the original consumption data matrix within the second time period and the annual period, respectively, as the second and third channels of the two-dimensional periodic tensor. Set baseline weights for one-dimensional row convolution kernels and one-dimensional column convolution kernels. Combine the external influence data with the phase encoding of the second and third channels, and generate perturbation weights corresponding to the phase of each data point through a phase-aware parameter network. Multiply the perturbation weights element-wise with the baseline weights to obtain the phase-adaptive one-dimensional row convolution kernels and one-dimensional column convolution kernels corresponding to each data point. Use the phase-adaptive one-dimensional row convolution kernels and one-dimensional column convolution kernels to perform local convolution at the corresponding data point positions of the first channel of the two-dimensional periodic tensor to extract intra-period correlation features and cross-period trend features. Based on the perturbation weights and the phase encoding of the second and third channels, a fusion coefficient is calculated through a gating network. The fusion coefficients are then used to weight and fuse the intra-period correlation features and cross-period trend features to obtain multi-scale fusion features. The multi-scale fusion features and the production plan data are then input into a prediction decoding network to output the raw material production demand prediction results for future time periods.
[0005] Furthermore, the step of reconstructing the historical raw material consumption time-series data into an original consumption data matrix based on a first time period as the first channel of a two-dimensional periodic tensor includes: The first time period is set to 7 days. The historical raw material consumption time series data is divided into equal segments according to the length of the first time period to obtain multiple time series segments of the same length. The multiple time-series segments of the same length are arranged vertically and stacked in chronological order to construct the original consumption data matrix with a two-dimensional structure.
[0006] Furthermore, the setting of the baseline weights for the one-dimensional row convolution kernel and the one-dimensional column convolution kernel includes: Learnable parameters of one-dimensional row convolution kernels and one-dimensional column convolution kernels are randomly initialized and used as the baseline weights, which are stored in the underlying parameter variables. The baseline weights are updated through the backpropagation algorithm during model training.
[0007] Furthermore, the step of combining the external influence data with the phase encoding of the second and third channels, and generating perturbation weights corresponding to the phase of each data point through a phase-aware parameter network, includes: After extending the external influence data to the same spatial dimension as the phase encoding of the second channel, it is then concatenated with the phase encodings of the second and third channels in the channel dimension. The concatenated data is input into the phase sensing parameter network containing a multilayer perceptron and activation functions, and the output is a feature coefficient vector with the same dimension as the baseline weight. The feature coefficient vector is mapped to the perturbation weights of the corresponding data points.
[0008] Further, the step of using the phase-adaptive one-dimensional row convolution kernel and the one-dimensional column convolution kernel to perform local convolution at the corresponding data point positions of the first channel of the two-dimensional periodic tensor to extract intra-period correlation features and cross-period trend features includes: Using the phase-adaptive one-dimensional row convolution kernel and edge padding, the first local convolution calculation is performed at the corresponding data point positions of the original consumed data matrix to output the intra-period correlation features; Using a phase-adaptive one-dimensional column convolution kernel and edge padding, a second local convolution calculation is performed at the corresponding data point positions of the original consumed data matrix to output the cross-cycle trend feature.
[0009] Further, the step of calculating fusion coefficients through a gating network based on the perturbation weights and the phase encoding of the second and third channels, and using the fusion coefficients to weightedly fuse the intra-period correlation features and cross-period trend features to obtain multi-scale fusion features includes: The perturbation weights are concatenated with the phase codes of the second and third channels, and the concatenation result is input into a fully connected layer containing a Sigmoid activation function. The network output is mapped to a range of 0 to 1 using the Sigmoid activation function to obtain the fusion coefficient of the associated features within the corresponding period, and the value obtained by subtracting the fusion coefficient from 1 is used as the allocation weight of the cross-period trend feature.
[0010] Further, the step of inputting the multi-scale fusion features and the production plan data into the prediction decoding network to output the raw material production demand prediction results for future time periods includes: After reconstructing the multi-scale fusion features into a time series format, they are concatenated with the production plan data to construct a comprehensive feature tensor. The comprehensive feature tensor is imported into the prediction decoding network containing gated recurrent units for feature mapping decoding operations, and the predicted values for each future time interval within the future prediction time period are generated through a fully connected output layer.
[0011] On the other hand, the present invention also provides a system for predicting the production demand of raw materials for cement poles, comprising the following modules: The calculation module is used to acquire historical raw material consumption time series data, production plan data, and external influence data; based on a first time period, the historical raw material consumption time series data is reconstructed into an original consumption data matrix as the first channel of a two-dimensional periodic tensor; a second time period is set, and the sine and cosine phase codes of each data point in the original consumption data matrix within the second time period and the annual period are calculated as the second and third channels of the two-dimensional periodic tensor, respectively. The generation module is used to set the baseline weights of the one-dimensional row convolution kernel and the one-dimensional column convolution kernel, and, in conjunction with the external influence data and the phase encoding of the second and third channels, generate perturbation weights corresponding to the phase of each data point through a phase-aware parameter network; multiply the perturbation weights element-wise with the baseline weights to obtain the phase-adaptive one-dimensional row convolution kernel and the one-dimensional column convolution kernel corresponding to each data point; and use the phase-adaptive one-dimensional row convolution kernel and the one-dimensional column convolution kernel to perform local convolution at the corresponding data point positions of the first channel of the two-dimensional periodic tensor to extract intra-period correlation features and cross-period trend features. The prediction module is used to calculate the fusion coefficient through a gating network based on the perturbation weight and the phase encoding of the second and third channels, and to use the fusion coefficient to weight and fuse the intra-period correlation features and cross-period trend features to obtain multi-scale fusion features; the multi-scale fusion features and the production plan data are input into the prediction decoding network to output the raw material production demand prediction results for the future time period.
[0012] Preferably, the step of reconstructing the historical raw material consumption time-series data into an original consumption data matrix based on a first time period as the first channel of a two-dimensional periodic tensor includes: The first time period is set to 7 days. The historical raw material consumption time series data is divided into equal segments according to the length of the first time period to obtain multiple time series segments of the same length. The multiple time-series segments of the same length are arranged vertically and stacked in chronological order to construct the original consumption data matrix with a two-dimensional structure.
[0013] Preferably, the step of setting the baseline weights for the one-dimensional row convolution kernel and the one-dimensional column convolution kernel includes: Learnable parameters of one-dimensional row convolution kernels and one-dimensional column convolution kernels are randomly initialized and used as the baseline weights, which are stored in the underlying parameter variables. The baseline weights are updated through the backpropagation algorithm during model training.
[0014] Preferably, the step of combining the external influence data with the phase encoding of the second and third channels, and generating perturbation weights corresponding to the phase of each data point through a phase-aware parameter network, includes: After extending the external influence data to the same spatial dimension as the phase encoding of the second channel, it is then concatenated with the phase encodings of the second and third channels in the channel dimension. The concatenated data is input into the phase sensing parameter network containing a multilayer perceptron and activation functions, and the output is a feature coefficient vector with the same dimension as the baseline weight. The feature coefficient vector is mapped to the perturbation weights of the corresponding data points.
[0015] Preferably, the step of using the phase-adaptive one-dimensional row convolution kernel and the one-dimensional column convolution kernel to perform local convolution at the corresponding data point positions of the first channel of the two-dimensional periodic tensor to extract intra-period correlation features and cross-period trend features includes: Using the phase-adaptive one-dimensional row convolution kernel and edge padding, the first local convolution calculation is performed at the corresponding data point positions of the original consumed data matrix to output the intra-period correlation features; Using a phase-adaptive one-dimensional column convolution kernel and edge padding, a second local convolution calculation is performed at the corresponding data point positions of the original consumed data matrix to output the cross-cycle trend feature.
[0016] Preferably, the step of calculating fusion coefficients through a gating network based on the perturbation weights and the phase encoding of the second and third channels, and using the fusion coefficients to weight and fuse the intra-period correlation features and cross-period trend features to obtain multi-scale fusion features includes: The perturbation weights are concatenated with the phase codes of the second and third channels, and the concatenation result is input into a fully connected layer containing a Sigmoid activation function. The network output is mapped to a range of 0 to 1 using the Sigmoid activation function to obtain the fusion coefficient of the associated features within the corresponding period, and the value obtained by subtracting the fusion coefficient from 1 is used as the allocation weight of the cross-period trend feature.
[0017] Preferably, the step of inputting the multi-scale fusion features and the production plan data into the prediction decoding network to output the raw material production demand prediction results for future time periods includes: After reconstructing the multi-scale fusion features into a time series format, they are concatenated with the production plan data to construct a comprehensive feature tensor. The comprehensive feature tensor is imported into the prediction decoding network containing gated recurrent units for feature mapping decoding operations, and the predicted values for each future time interval within the future prediction time period are generated through a fully connected output layer.
[0018] This invention reconstructs historical raw material consumption data into a two-dimensional matrix according to periods, and constructs a multi-channel two-dimensional periodic tensor by combining multi-period sine and cosine phase encoding to enhance the model's ability to express intra-weekly variations, cross-period trends, and seasonal patterns. By combining external influence data with phase encoding to generate perturbation weights for corresponding data points, and combining these with baseline weights to form phase-adaptive one-dimensional row and column convolution kernels, the model can extract intra-period correlation features and cross-period trend features for different time phases. Furthermore, a gating network is used to calculate fusion coefficients, adaptively weighting and fusing features at different scales, and combining this with production plan data for prediction and decoding, thereby improving the accuracy and stability of raw material demand forecasting for cement poles. Attached Figure Description
[0019] Figure 1 A flowchart for a method to predict the production demand of raw materials for cement poles; Figure 2 This is a schematic diagram of the original two-dimensional consumption data matrix; Figure 3 This is a diagram illustrating the demand forecast results for a future time period. Detailed Implementation
[0020] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] This invention proposes a method for predicting the production demand of raw materials for cement poles, such as... Figure 1 As shown, it includes the following steps: S1: Obtain historical raw material consumption time-series data, production plan data, and external impact data.
[0022] The daily consumption of raw materials such as cement, steel bars, and aggregates over the past five years is extracted using the application programming interfaces (APIs) of the Enterprise Resource Planning (ERP) and Manufacturing Execution System (MES) to serve as historical raw material consumption time-series data. Simultaneously, the planned production pole models and quantities for the future forecast period are obtained through the production scheduling system as production planning data. Temperature, rainfall, holiday tags, and macroeconomic indicators for the corresponding time range are acquired through data interfaces or public data sources and used as external impact data. Missing value imputation and maximum / minimum standardization are performed on the extracted data, with missing value imputation implemented using a cubic spline interpolation algorithm. Subsequent steps are illustrated using any one of the target raw materials (cement, steel bars, aggregates, etc.) as an example; demand forecasting for other raw materials can be performed separately using the same process.
[0023] S2, based on the first time period, reconstruct the historical raw material consumption time series data into the original consumption data matrix as the first channel of the two-dimensional periodic tensor.
[0024] The first time period is set as a week. The standardized daily historical consumption time series data of the target raw materials is segmented and folded according to a fixed length of seven days per week. The one-dimensional time series data sequence is converted into a two-dimensional data array with the number of rows equal to the total number of weeks and the number of columns equal to seven using a reshaping function. The original consumption data matrix is obtained and then converted into a tensor format with a dimension of one times the total number of weeks multiplied by seven. The converted tensor is used as the first channel of the two-dimensional periodic tensor.
[0025] In one embodiment, the step of reconstructing the historical raw material consumption time-series data into an original consumption data matrix based on a first time period as the first channel of a two-dimensional periodic tensor includes: The first time period is set to 7 days. The historical raw material consumption time series data is divided into equal segments according to the length of the first time period to obtain multiple time series segments of the same length. The multiple time-series segments of the same length are arranged vertically and stacked in chronological order to construct the original consumption data matrix with a two-dimensional structure.
[0026] A 365-day historical sequence of daily continuous consumption data of target raw materials was obtained. To match the weekly work cycle, the first time period parameter was fixed at 7 days. A non-overlapping one-dimensional sliding window algorithm with a fixed width of 7 and a sliding step size of 7 was used to continuously and equidistantly segment the data along the time axis of the original data time series to the right. This operation divided the first 364 data points divisible by 7 days in the annual sequence into 52 non-overlapping one-dimensional time series segments of equal length. Data points with less than one cycle were either filled in or incorporated into the next batch of prediction data. Based on the chronological order of these sequences on the actual time axis, from the first week segment to the fifty-second week segment, vertical stacking and data splicing were performed sequentially. This operation constructed a two-dimensional original consumption data matrix with a height of 52 rows and a width of 7 columns. The reconstructed original consumption data matrix served as the first input channel tensor of the subsequent network model. The two-dimensional original consumption data matrix is shown below. Figure 2 As shown.
[0027] S3, set a second time period, and calculate the sine and cosine phase codes of each data point in the original consumption data matrix within the second time period and the annual period, respectively, as the second and third channels of the two-dimensional periodic tensor.
[0028] The second time period is set to a month. For each data point in the original consumption data matrix, the date value of the month and the day of the year corresponding to the timestamp are extracted. The sine and cosine values of the data point within the corresponding natural month are calculated using a trigonometric function positional encoding algorithm to obtain a vector of length two. Similarly, the sine and cosine values of the data point within the annual period are calculated to obtain another vector of length two. The monthly and annual sine and cosine phase codes of all data points are arranged along the spatial dimension into a two-dimensional feature map with the same temporal and spatial dimensions as the original consumption data matrix. The monthly sine and cosine phase codes are used as the phase codes for the second channel, and the annual sine and cosine phase codes are used as the phase codes for the third channel.
[0029] S4, set the baseline weights of the one-dimensional row convolution kernel and the one-dimensional column convolution kernel, combine the external influence data with the phase encoding of the second and third channels, and generate the perturbation weights corresponding to the phase of each data point through the phase-aware parameter network.
[0030] Two baseline convolutional kernel tensors of sizes 1×3 and 3×1 are initialized, and initial baseline weights are assigned using a preset weight initialization algorithm. A phase-aware parameter network containing multiple fully connected layers and a linear rectified activation function is constructed. The external influence data vectors at the corresponding time nodes are concatenated with the phase encoding vectors of the second and third channels to form an input feature vector, which is then input into the phase-aware parameter network. Through multi-layer linear transformation and forward propagation with activation functions, a feature coefficient vector including row direction coefficients and column direction coefficients is output. This feature coefficient vector is then mapped to the perturbation weights corresponding to the phase of each data point.
[0031] In one embodiment, setting the baseline weights for the one-dimensional row convolution kernel and the one-dimensional column convolution kernel includes: Learnable parameters of one-dimensional row convolution kernels and one-dimensional column convolution kernels are randomly initialized and used as the baseline weights, which are stored in the underlying parameter variables. The baseline weights are updated through the backpropagation algorithm during model training.
[0032] Two independent one-dimensional convolutional structures are predefined. The one-dimensional row convolutional kernel is configured with a size of 1×3 to extract local correlations between three adjacent days within the same week; the one-dimensional column convolutional kernel is configured with a size of 3×1 to extract long-term trends within the same week across three weeks. The Xavier uniform distribution initialization method is used to assign random floating-point values to the weight matrices of these two convolutional kernels. The generated floating-point tensor distribution is centered at 0, and its value boundaries are determined by the number of input and output channels corresponding to the convolutional kernel. These initialized tensors together form the baseline weight matrix.
[0033] The aforementioned baseline weight tensors are set as learnable parameters and stored in the network model's parameter dictionary. During model training, the network compares the model's predicted raw material demand with historical actual demand, and calculates the loss function value using the mean squared error. The partial derivative gradient of the loss value with respect to each baseline weight is calculated using the backpropagation algorithm. Combined with an initial learning rate of 0.001 and the Adam optimizer, the baseline weights are adjusted in the opposite direction of the gradient, and the feature extraction state is updated through multiple batches of iterative operations.
[0034] In one embodiment, the step of combining the external influence data with the phase encoding of the second and third channels, and generating perturbation weights corresponding to the phase of each data point through a phase-aware parameter network, includes: After extending the external influence data to the same spatial dimension as the phase encoding of the second channel, it is then concatenated with the phase encodings of the second and third channels in the channel dimension. The concatenated data is input into the phase sensing parameter network containing a multilayer perceptron and activation functions, and the output is a feature coefficient vector with the same dimension as the baseline weight. The feature coefficient vector is mapped to the perturbation weights of the corresponding data points.
[0035] External impact data were collected based on three feature dimensions: average daily rainfall, temperature, and holiday markers, forming a 365-day external impact data sequence with each time point containing 3-dimensional features. Using the same time alignment rules as the original consumption data matrix in S2, external impact data corresponding to the 52-row, 7-column effective consumption data points were extracted. Through time-step repetition padding and broadcasting algorithms, the external impact data sequence was expanded and reshaped into a 52-row, 7-column external environment feature tensor with each data point containing 3-dimensional external features. In the channel dimension, this 2D external environment feature tensor was concatenated with a second-channel sine / cosine phase code containing information about the natural month cycle and a third-channel sine / cosine phase code containing the 365-day annual cycle, resulting in a 52×7×7 three-dimensional comprehensive feature tensor.
[0036] The feature vector corresponding to each data point in the aforementioned three-dimensional tensor is input into the phase-aware parameter network. The input to the phase-aware parameter network is the fused and concatenated comprehensive feature tensor. The phase-aware parameter network is structured as a multilayer perceptron, which includes three hidden layers connected in sequence, with 16, 32, and 16 nodes in each hidden layer, respectively. Each hidden layer receives the feature data output from the previous layer, performs a linear transformation and bias stacking, and then generates corresponding hidden layer features through the ReLU activation function. The hidden layer features output from the third hidden layer are further input to the output layer. After linear transformation and bias stacking, the output layer uses the Tanh activation function to restrict the output result to between -1 and 1, resulting in a 6-dimensional feature coefficient vector with feature coefficient values between -1.0 and +1.0. The first three elements of the 6-dimensional feature coefficient vector are used as row-direction feature coefficients, and the last three elements are used as column-direction feature coefficients. Each feature coefficient is multiplied by 0.1 and then added by 1 to convert it into row-direction perturbation weights and column-direction perturbation weights with values between 0.9 and 1.1. These weights are then applied to the corresponding data points to adjust the weights.
[0037] S5, multiply the perturbation weights and the baseline weights element by element to obtain the phase-adaptive one-dimensional row convolution kernel and one-dimensional column convolution kernel corresponding to each data point.
[0038] The perturbation weight tensor output by the phase-aware parameter network in the corresponding row direction is multiplied element-wise with the reference weight tensor of the one-dimensional row convolution kernel to obtain a phase-adaptive one-dimensional row convolution kernel customized for each specific time node. Similarly, the perturbation weight tensor in the column direction is multiplied element-wise with the reference weight tensor of the one-dimensional column convolution kernel to obtain a phase-adaptive one-dimensional column convolution kernel. The row-direction perturbation weights contain three elements, corresponding to the three weight elements in a 1×3 one-dimensional row convolution kernel; the column-direction perturbation weights also contain three elements, corresponding to the three weight elements in a 3×1 one-dimensional column convolution kernel.
[0039] S6, using the phase-adaptive one-dimensional row convolution kernel and the one-dimensional column convolution kernel to perform local convolution at the corresponding data point positions of the first channel of the two-dimensional periodic tensor to extract intra-period correlation features and cross-period trend features.
[0040] For each target data point in the first channel of the two-dimensional periodic tensor, one-dimensional local window data adjacent to the data point in the row direction is extracted. An adaptive convolution algorithm is then applied, combined with a phase-adaptive one-dimensional row convolution kernel specific to that point, to perform a dot product operation. This identifies the correlation pattern of raw material consumption over a seven-day week to obtain intra-cycle correlation features. Simultaneously, one-dimensional local window data adjacent to the data point across weeks in the column direction is extracted. The corresponding phase-adaptive one-dimensional column convolution kernel is then used to perform a dot product operation to identify the changing patterns of raw material consumption over multiple weeks, obtaining cross-cycle trend features.
[0041] In one embodiment, the step of using the phase-adaptive one-dimensional row convolution kernel and the one-dimensional column convolution kernel to perform local convolution at the corresponding data point positions of the first channel of the two-dimensional periodic tensor to extract intra-period correlation features and cross-period trend features includes: Using the phase-adaptive one-dimensional row convolution kernel and edge padding, the first local convolution calculation is performed at the corresponding data point positions of the original consumed data matrix to output the intra-period correlation features; Using a phase-adaptive one-dimensional column convolution kernel and edge padding, a second local convolution calculation is performed at the corresponding data point positions of the original consumed data matrix to output the cross-cycle trend feature.
[0042] For the original data matrix, the generated perturbation weights and baseline weights are combined to form an adaptive one-dimensional row convolution kernel and a one-dimensional column convolution kernel suitable for the current data points. Before computation, zero-value edge padding with a width of 1 is performed on both sides of the input matrix. This row convolution kernel is then used to perform a sliding operation along the horizontal direction of the matrix with a stride of 1 to extract intra-period correlation features, outputting an intra-period correlation feature map with a size of 52 rows and 7 columns. A 3×1 adaptive one-dimensional column convolution kernel is used. Zero-value edge padding with a height of 1 is performed on the top and bottom ends of the data matrix to maintain the size before and after computation. This column convolution kernel is then used to perform a sliding local convolution operation in the vertical direction with a stride of 1 to extract cross-period trend features, with the output size fixed at 52 rows and 7 columns.
[0043] S7. Based on the perturbation weights and the phase encoding of the second and third channels, the fusion coefficients are calculated through a gating network. The fusion coefficients are then used to weight and fuse the intra-period correlation features and cross-period trend features to obtain multi-scale fusion features.
[0044] A gated network consisting of a multilayer perceptron and a sigmoid activation function is constructed. The perturbation weight vector of the current data point and the phase encoding vectors of the second and third channels are concatenated and input into the gated network. An adaptive weight value between 0 and 1 is output as the fusion coefficient through forward computation. This fusion coefficient is multiplied by the intra-period correlation feature, and the difference between 1 and the fusion coefficient is multiplied by the cross-period trend feature. The products of the two are added to complete the nonlinear fusion of features at different scales, generating a multi-scale fused feature that includes short-term fluctuations and long-term trends.
[0045] In one embodiment, the step of calculating fusion coefficients through a gating network based on the perturbation weights and the phase encodings of the second and third channels, and then using the fusion coefficients to weightedly fuse the intra-period correlation features and cross-period trend features to obtain multi-scale fusion features includes: The perturbation weights are concatenated with the phase codes of the second and third channels, and the concatenation result is input into a fully connected layer containing a Sigmoid activation function. The network output is mapped to a range of 0 to 1 using the Sigmoid activation function to obtain the fusion coefficient of the associated features within the corresponding period, and the value obtained by subtracting the fusion coefficient from 1 is used as the allocation weight of the cross-period trend feature.
[0046] Before weighted fusion of the two-scale features, for each time point, a 6-dimensional perturbation weight vector and a total of 4-dimensional sine and cosine phase encoding vectors in the second and third channels corresponding to that point are extracted. These two sets of data are concatenated to form a composite feature input sequence of length 10. This concatenated feature sequence is then input into a gated network containing fully connected layers and a sigmoid activation function. The input to the gated network is the composite feature input sequence. The output of the gated network is the fusion coefficient. The calculation formula for the gated network is as follows: Where X is the input sequence, W is the linear transformation weight matrix, b is the bias vector, and C is the fusion coefficient. After the linear matrix transformation, the output is mapped to a range of 0 to 1 using the Sigmoid activation function. The fusion coefficients of the corresponding intra-period correlation features are obtained based on this operation, and the value obtained by subtracting the fusion coefficients from 1 is used as the weight allocation for the cross-period trend features, for example, weight ratios of 0.6 and 0.4.
[0047] S8, input the multi-scale fusion features and the production plan data into the prediction decoding network to output the raw material production demand prediction results for the future time period.
[0048] A prediction-decoding network incorporating gated recurrent units is employed. Multi-scale fused features are reconstructed into historical time-series features and input into the gated recurrent units for encoding, yielding a historical context vector. A fully connected layer maps production plan data for the future prediction period to a future plan condition sequence. The historical context vector is copied according to the length of the future prediction period and concatenated with the future plan condition sequence along the feature dimension. This concatenation is then input into the sequence processing module of the gated recurrent unit for temporal dependency modeling. A linear fully connected output layer performs regression calculations, outputting the predicted daily raw material demand for the future prediction period. An inverse standardization function is then called to restore the prediction results to actual business physical quantities, thus obtaining the predicted raw material production demand for the future period.
[0049] In one embodiment, the step of inputting the multi-scale fusion features and the production planning data into the prediction decoding network to output the raw material production demand prediction result for a future time period includes: After reconstructing the multi-scale fusion features into a time series format, they are concatenated with the production plan data to construct a comprehensive feature tensor. The comprehensive feature tensor is imported into the prediction decoding network containing gated recurrent units for feature mapping decoding operations, and the predicted values for each future time interval within the future prediction time period are generated through a fully connected output layer.
[0050] The obtained fusion coefficients are used to weight and sum the intra-period correlation features and cross-period trend features, fusing them into a comprehensive feature map. Through a dimension reshaping operation, the two-dimensional features are transformed back into a historical time series format tensor with a length consistent with the number of effective data points in the original consumed data matrix. This tensor is then mapped through a fully connected mapping layer to a historical time series feature with a hidden channel feature dimension of 64.
[0051] Production plan data, including production shift information and the number of models to be put into production for the next 14 days, is extracted and mapped into a future plan condition sequence of length 14 with a hidden channel feature dimension of 64 through a fully connected layer. Historical time series features are input into a gated recurrent unit for encoding, and the hidden state of the last historical time step is obtained as a historical context vector. This historical context vector is then copied into a context sequence of length 14. The context sequence and the future plan condition sequence are concatenated along the feature dimension to construct a comprehensive feature tensor of length 14. This comprehensive feature tensor is then imported into a prediction decoding network. The input to the prediction decoding network is the comprehensive feature tensor. The prediction decoding network structure includes a gated recurrent unit and a fully connected output layer. The output of the prediction decoding network is the predicted raw material production demand for the future time period.
[0052] The gated recurrent unit in the prediction-decoding network receives the current input features and the hidden state from the previous time step at each future time step, and first calculates the update gate and the reset gate respectively. The update gate controls the proportion of the hidden state from the previous time step retained in the current hidden state, and the reset gate controls the degree to which the hidden state from the previous time step participates in the candidate hidden state calculation. Subsequently, the gated recurrent unit generates candidate hidden states based on the current input features and the previous hidden state adjusted by the reset gate, and uses the update gate to perform weighted fusion between the previous hidden state and the candidate hidden states to obtain the hidden state at the current time step. Finally, a linear regression operation is performed through a fully connected layer with a dropout rate of 0.2, outputting a prediction result matrix with a dimension of 14×1. This output matrix represents the daily raw material demand forecast for the next 14 days. The demand forecast results for the future time period are as follows: Figure 3 As shown.
[0053] For various raw materials such as cement, steel bars, and sand, each raw material is taken as the target raw material, and the corresponding original consumption data matrix is constructed according to the process from S2 to S8. The demand forecast value of the raw material in the future forecast period is then output.
[0054] This invention also proposes a system for predicting the production demand of raw materials for cement poles, comprising the following modules: The calculation module is used to acquire historical raw material consumption time series data, production plan data, and external influence data; based on a first time period, the historical raw material consumption time series data is reconstructed into an original consumption data matrix as the first channel of a two-dimensional periodic tensor; a second time period is set, and the sine and cosine phase codes of each data point in the original consumption data matrix within the second time period and the annual period are calculated as the second and third channels of the two-dimensional periodic tensor, respectively. The generation module is used to set the baseline weights of the one-dimensional row convolution kernel and the one-dimensional column convolution kernel, and, in conjunction with the external influence data and the phase encoding of the second and third channels, generate perturbation weights corresponding to the phase of each data point through a phase-aware parameter network; multiply the perturbation weights element-wise with the baseline weights to obtain the phase-adaptive one-dimensional row convolution kernel and the one-dimensional column convolution kernel corresponding to each data point; and use the phase-adaptive one-dimensional row convolution kernel and the one-dimensional column convolution kernel to perform local convolution at the corresponding data point positions of the first channel of the two-dimensional periodic tensor to extract intra-period correlation features and cross-period trend features. The prediction module is used to calculate the fusion coefficient through a gating network based on the perturbation weight and the phase encoding of the second and third channels, and to use the fusion coefficient to weight and fuse the intra-period correlation features and cross-period trend features to obtain multi-scale fusion features; the multi-scale fusion features and the production plan data are input into the prediction decoding network to output the raw material production demand prediction results for the future time period.
[0055] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for predicting the production demand of raw materials for cement poles, characterized in that, Includes the following steps: Acquire historical raw material consumption time-series data, production plan data, and external impact data; reconstruct the historical raw material consumption time-series data into an original consumption data matrix based on a first time period as the first channel of a two-dimensional periodic tensor; set a second time period, and calculate the sine and cosine phase codes of each data point in the original consumption data matrix within the second time period and the annual period, respectively, as the second and third channels of the two-dimensional periodic tensor. Set the baseline weights for one-dimensional row convolution kernels and one-dimensional column convolution kernels, combine the external influence data with the phase encoding of the second and third channels, and generate perturbation weights corresponding to the phase of each data point through a phase-aware parameter network. The perturbation weights are multiplied element-wise with the baseline weights to obtain the phase-adaptive one-dimensional row convolution kernel and the one-dimensional column convolution kernel corresponding to each data point; the phase-adaptive one-dimensional row convolution kernel and the one-dimensional column convolution kernel are used to perform local convolution at the corresponding data point positions of the first channel of the two-dimensional periodic tensor to extract intra-period correlation features and cross-period trend features. Based on the perturbation weights and the phase encoding of the second and third channels, a fusion coefficient is calculated through a gating network. The fusion coefficients are then used to weight and fuse the intra-period correlation features and cross-period trend features to obtain multi-scale fusion features. The multi-scale fusion features and the production plan data are input into the prediction decoding network to output the raw material production demand prediction results for future time periods.
2. The method according to claim 1, characterized in that, The process of reconstructing the historical raw material consumption time-series data into an original consumption data matrix based on a first time period as the first channel of a two-dimensional periodic tensor includes: The first time period is set to 7 days. The historical raw material consumption time series data is divided into equal segments according to the length of the first time period to obtain multiple time series segments of the same length. The multiple time-series segments of the same length are arranged vertically and stacked in chronological order to construct the original consumption data matrix with a two-dimensional structure.
3. The method according to claim 1, characterized in that, The setting of the baseline weights for the one-dimensional row convolution kernel and the one-dimensional column convolution kernel includes: Learnable parameters of one-dimensional row convolution kernels and one-dimensional column convolution kernels are randomly initialized and used as the baseline weights, which are stored in the underlying parameter variables. The baseline weights are updated through the backpropagation algorithm during model training.
4. The method according to claim 1, characterized in that, The method of combining the external influence data with the phase encoding of the second and third channels, and generating perturbation weights corresponding to the phase of each data point through a phase-aware parameter network, includes: After extending the external influence data to the same spatial dimension as the phase encoding of the second channel, it is then concatenated with the phase encodings of the second and third channels in the channel dimension. The concatenated data is input into the phase sensing parameter network containing a multilayer perceptron and activation functions, and the output is a feature coefficient vector with the same dimension as the baseline weight. The feature coefficient vector is mapped to the perturbation weights of the corresponding data points.
5. The method according to claim 1, characterized in that, The step of using the phase-adaptive one-dimensional row convolution kernel and the one-dimensional column convolution kernel to perform local convolution at the corresponding data point positions of the first channel of the two-dimensional periodic tensor to extract intra-period correlation features and cross-period trend features includes: Using the phase-adaptive one-dimensional row convolution kernel and edge padding, the first local convolution calculation is performed at the corresponding data point positions of the original consumed data matrix to output the intra-period correlation features; Using a phase-adaptive one-dimensional column convolution kernel and edge padding, a second local convolution calculation is performed at the corresponding data point positions of the original consumed data matrix to output the cross-cycle trend feature.
6. The method according to claim 4, characterized in that, The step involves calculating fusion coefficients using a gating network based on the perturbation weights and the phase encodings of the second and third channels. These fusion coefficients are then used to weight and fuse intra-period correlation features and cross-period trend features to obtain multi-scale fusion features, including: The perturbation weights are concatenated with the phase codes of the second and third channels, and the concatenation result is input into a fully connected layer containing a Sigmoid activation function. The network output is mapped to a range of 0 to 1 using the Sigmoid activation function to obtain the fusion coefficient of the associated features within the corresponding period, and the value obtained by subtracting the fusion coefficient from 1 is used as the allocation weight of the cross-period trend feature.
7. The method according to claim 1, characterized in that, The step of inputting the multi-scale fusion features and the production plan data into the prediction decoding network to output the raw material production demand prediction results for future time periods includes: After reconstructing the multi-scale fusion features into a time series format, they are concatenated with the production plan data to construct a comprehensive feature tensor. The comprehensive feature tensor is imported into the prediction decoding network containing gated recurrent units for feature mapping decoding operations, and the predicted values for each future time interval within the future prediction time period are generated through a fully connected output layer.
8. A system for predicting the production demand of raw materials for cement poles, characterized in that, Includes the following modules: The calculation module is used to acquire historical raw material consumption time-series data, production plan data, and external impact data; Based on the first time period, the historical raw material consumption time series data is reconstructed into an original consumption data matrix as the first channel of the two-dimensional periodic tensor; a second time period is set, and the sine and cosine phase codes of each data point in the original consumption data matrix are calculated in the second time period and the annual period, respectively, as the second and third channels of the two-dimensional periodic tensor. The generation module is used to set the baseline weights of the one-dimensional row convolution kernel and the one-dimensional column convolution kernel, and, in conjunction with the external influence data and the phase encoding of the second and third channels, generate perturbation weights corresponding to the phase of each data point through the phase-aware parameter network. The perturbation weights are multiplied element-wise with the baseline weights to obtain the phase-adaptive one-dimensional row convolution kernel and the one-dimensional column convolution kernel corresponding to each data point; the phase-adaptive one-dimensional row convolution kernel and the one-dimensional column convolution kernel are used to perform local convolution at the corresponding data point positions of the first channel of the two-dimensional periodic tensor to extract intra-period correlation features and cross-period trend features. The prediction module is used to calculate the fusion coefficients through a gating network based on the perturbation weights and the phase encoding of the second and third channels, and to use the fusion coefficients to weight and fuse the intra-period correlation features and cross-period trend features to obtain multi-scale fusion features; The multi-scale fusion features and the production plan data are input into the prediction decoding network to output the raw material production demand prediction results for future time periods.
9. The system according to claim 8, characterized in that, The process of reconstructing the historical raw material consumption time-series data into an original consumption data matrix based on a first time period as the first channel of a two-dimensional periodic tensor includes: The first time period is set to 7 days. The historical raw material consumption time series data is divided into equal segments according to the length of the first time period to obtain multiple time series segments of the same length. The multiple time-series segments of the same length are arranged vertically and stacked in chronological order to construct the original consumption data matrix with a two-dimensional structure.
10. The system according to claim 8, characterized in that, The setting of the baseline weights for the one-dimensional row convolution kernel and the one-dimensional column convolution kernel includes: Learnable parameters of one-dimensional row convolution kernels and one-dimensional column convolution kernels are randomly initialized and used as the baseline weights, which are stored in the underlying parameter variables. The baseline weights are updated through the backpropagation algorithm during model training.