Power plant coal consumption prediction method, device and system and storage medium
By building a multi-model prediction system and utilizing the attention weight fusion of LSTM, XGBoost, and Transformer models, the problem of low prediction accuracy of power plant coal consumption data was solved, and coal consumption prediction with higher accuracy and timeliness was achieved.
Patent Information
- Application Number
- CN202510987482.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-10-28
AI Technical Summary
Existing methods for predicting coal consumption data in power plants rely on manual operation, which suffers from limited data sources, low utilization rates, difficulty in ensuring data quality, and insufficient prediction capabilities of single models, resulting in low prediction accuracy and the inability to provide results in a timely manner.
A multi-model prediction system is constructed, including the LSTM model that captures time series dependency patterns, the XGBoost model that processes short-term mutation characteristics, and the Transformer model that mines cross-power plant knowledge transfer associations. The output values of multiple models are fused through attention weights to generate predicted values for power plant coal consumption.
It improves the accuracy of coal consumption forecasting for power plants, reduces manual intervention, and enables more accurate coal consumption forecasting and timely inventory risk assessment.
Smart Images

Figure CN120851284A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent forecasting technology in the power industry, and in particular to a method, device, system and storage medium for predicting coal consumption in power plants. Background Technology
[0002] Currently, power plant coal consumption data forecasting mainly relies on manual operation. Business personnel manually retrieve internal basic data from the SQL database every day, export it to Excel, and then link it with external information. Based on the average data of the past 7-30 days and combined with experience, they predict and calculate the number of days available in Excel, and then compile the results into a daily report and send it by email. Business supervisors then use their experience to judge inventory risk and decide on the transportation plan.
[0003] However, traditional forecasting methods have many drawbacks, such as limited data sources, low data utilization, difficulty in ensuring data quality, and insufficient forecasting capabilities of single models, resulting in low forecast accuracy and the inability to provide forecast results in a timely manner.
[0004] Therefore, how to provide a method for predicting coal consumption in power plants to improve the accuracy of coal consumption prediction has become an urgent technical problem to be solved. Summary of the Invention
[0005] This application provides a method, apparatus, system, and storage medium for predicting coal consumption in power plants, in order to improve the prediction accuracy of coal consumption forecasting in power plants.
[0006] This application provides a method for predicting coal consumption in power plants, including:
[0007] Acquire various preset data related to coal consumption in power plants;
[0008] An input feature vector for predicting power plant coal consumption is constructed based on various preset data related to power plant coal consumption.
[0009] The input feature vector is input into a variety of pre-built models, including at least two of the following models: a first model for capturing time-series dependency patterns, a second model for processing short-term mutation features, and a third model for mining cross-power plant knowledge transfer associations.
[0010] The attention weights of each model are obtained, and the output values of the multiple models are fused based on the attention weights. The fusion result is used as the predicted value of coal consumption of the power plant.
[0011] The beneficial effects of this application are as follows: It acquires multiple preset data related to power plant coal consumption; constructs an input feature vector for predicting power plant coal consumption based on these preset data; inputs the input feature vector into multiple pre-constructed models, including at least two models among a first model capturing time-series dependency patterns, a second model handling short-term mutation features, and a third model mining cross-power plant knowledge transfer associations; obtains the attention weights of each model, and fuses the output values of the multiple models based on these attention weights, using the fusion result as the predicted value of power plant coal consumption. This application improves prediction accuracy and reduces human intervention by constructing an intelligent prediction method that integrates multiple models to fuse prediction results, thereby enhancing the prediction accuracy of power plant coal consumption forecasting.
[0012] In one embodiment, constructing an input feature vector for predicting power plant coal consumption based on multiple preset data related to power plant coal consumption includes:
[0013] Align multiple preset data sets;
[0014] The aligned data is then cleaned, features extracted, and normalized to generate standardized input feature vectors.
[0015] In one embodiment, obtaining the attention weights of each model includes:
[0016] The attention weights for each model are determined according to the following first pre-set formula:
[0017]
[0018] Where, α i The final normalized attention weights of the i-th model; y i c is the vector result predicted by the i-th model; c is the context vector; W x The linear transformation matrix is used to transform y i Projected into the attention space; W c is a linear transformation matrix used to project c into the attention space; w is the attention score vector; b is the bias vector.
[0019] In one embodiment, fusing the output values of the multiple models based on the attention weights includes:
[0020] The output values of the multiple models are fused according to the following second preset formula:
[0021]
[0022] Among them, y fused This represents the final predicted value of coal consumption for the power plant; α iThe final normalized attention weights of the i-th model; y i This is the vector result predicted by the i-th model.
[0023] In one embodiment, the method further includes:
[0024] Error in obtaining predicted values of coal consumption for power plants;
[0025] The trainable parameters in the first preset formula for error optimization include: the linear transformation matrix W. x and W c The attention score vector w and the bias vector b.
[0026] In one embodiment, the second model is an XGBoost prediction model, and the method further includes:
[0027] When the prediction error is greater than the preset error, the tree depth of the second model is increased according to the preset step size;
[0028] When the number of times the volatility of the prediction error exceeds the preset volatility is greater than the preset number, the tree depth of the second model is reduced according to the preset step size.
[0029] In one embodiment, the method further includes:
[0030] Determine the safety stock boundary based on the predicted value of power plant coal consumption;
[0031] When the current inventory level is lower than the safety stock limit, an early warning signal is issued, and a coal transportation plan suggestion is generated based on the predicted value of the power plant's coal consumption and the current inventory level.
[0032] This application also provides a power plant coal consumption prediction device, comprising:
[0033] The acquisition module is used to acquire various preset data related to coal consumption in power plants;
[0034] The module is used to construct an input feature vector for predicting the coal consumption of power plants based on various preset data related to power plant coal consumption;
[0035] The input module is used to input the input feature vector into a variety of pre-built models, including at least two of the following models: a first model for capturing time-series dependency patterns, a second model for processing short-term mutation features, and a third model for mining cross-power plant knowledge transfer associations.
[0036] The fusion module is used to obtain the attention weights of each model, fuse the output values of the multiple models based on the attention weights, and use the fusion result as the predicted value of coal consumption of the power plant.
[0037] In one embodiment, the building module includes:
[0038] The alignment submodule is used to align multiple preset data sets.
[0039] The generation submodule is used to clean, extract features, and normalize the aligned data to generate a standardized input feature vector.
[0040] In one embodiment, the fusion module is configured to:
[0041] The attention weights for each model are determined according to the following first pre-set formula:
[0042]
[0043] Where, α i The final normalized attention weights of the i-th model; y i c is the vector result predicted by the i-th model; c is the context vector; W x The linear transformation matrix is used to transform y i Projected into the attention space; W c is a linear transformation matrix used to project c into the attention space; w is the attention score vector; b is the bias vector.
[0044] In one embodiment, the fusion module is configured to:
[0045] The output values of the multiple models are fused according to the following second preset formula:
[0046]
[0047] Among them, y fused This represents the final predicted value of coal consumption for the power plant; α i The final normalized attention weights of the i-th model; y i This is the vector result predicted by the i-th model.
[0048] In one embodiment, the apparatus further includes:
[0049] The acquisition submodule is used to obtain the error of the predicted value of coal consumption in power plants;
[0050] The optimization submodule is used to optimize the trainable parameters in the first preset formula based on the error. The trainable parameters include: the linear transformation matrix W. x and W c The attention score vector w and the bias vector b.
[0051] In one embodiment, the second model is an XGBoost prediction model, and the apparatus further includes:
[0052] Add a submodule to increase the tree depth of the second model according to a preset step size when the prediction error is greater than the preset error;
[0053] The reduction submodule is used to reduce the tree depth of the second model according to a preset step size when the number of times the volatility of the prediction error exceeds the preset volatility is greater than the preset number.
[0054] In one embodiment, the apparatus further includes:
[0055] The determination module is used to determine the safety stock boundary based on the predicted value of power plant coal consumption;
[0056] The early warning module is used to issue an early warning signal when the current inventory level is lower than the safety stock limit, and to generate a coal transportation plan suggestion based on the predicted value of the power plant's coal consumption and the current inventory level.
[0057] This application also provides a power plant coal consumption prediction system, including:
[0058] At least one processor; and,
[0059] A memory communicatively connected to the at least one processor; wherein,
[0060] The memory stores instructions that can be executed by the at least one processor to implement the power plant coal consumption prediction method described in any of the above embodiments.
[0061] This application also provides a computer-readable storage medium, which, when the instructions in the storage medium are executed by the processor corresponding to the power plant coal consumption prediction system, enables the power plant coal consumption prediction system to implement the power plant coal consumption prediction method described in any of the above embodiments.
[0062] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0063] The technical solution of this application will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0064] The accompanying drawings are provided to further illustrate the present application and form part of the specification. They are used together with the embodiments of the present application to explain the application and do not constitute a limitation thereof. In the drawings:
[0065] Figure 1 This is a flowchart of a power plant coal consumption prediction method according to an embodiment of this application;
[0066] Figure 2 This is a diagram of a smart prediction framework for power plant coal consumption in one embodiment of this application;
[0067] Figure 3 This is a schematic diagram of the structure of a power plant coal consumption prediction device according to an embodiment of this application;
[0068] Figure 4 This is a schematic diagram of the hardware structure of a power plant coal consumption prediction system according to one embodiment of this application. Detailed Implementation
[0069] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application.
[0070] Figure 1 This is a flowchart of a power plant coal consumption prediction method according to an embodiment of this application, such as... Figure 1 As shown, the method can be implemented as follows: S101-S104:
[0071] In step S101, various preset data related to power plant coal consumption are acquired;
[0072] In step S102, an input feature vector for predicting the coal consumption of the power plant is constructed based on various preset data related to the coal consumption of the power plant;
[0073] In step S103, the input feature vector is input into a variety of pre-constructed models, including at least two of the following models: a first model for capturing time-series dependency patterns, a second model for processing short-term mutation features, and a third model for mining cross-power plant knowledge transfer associations.
[0074] In step S104, the attention weights of each model are obtained, and the output values of the multiple models are fused based on the attention weights. The fusion result is then used as the predicted value of the power plant's coal consumption.
[0075] Acquire various preset data related to power plant coal consumption. These preset data include power plant operation data, meteorological environmental data, transportation plan data, and inventory monitoring data, which provide the foundational information for subsequent prediction models. Specifically, power plant operation data reflects the power plant's operating status, including planned power generation, actual power generation, coal consumption, coal inventory, and power generation load; meteorological environmental data has a significant impact on coal consumption, including continuous meteorological variables (such as temperature, humidity, wind speed, and precipitation), weather categories (such as cloudy / sunny / rainy / snowy), and whether it is a holiday; transportation plan data provides prior information on future coal delivery, including the amount of coal en route and planned arrival time; and inventory monitoring data reflects the power plant's coal safety status, including coal inventory and yard utilization rate.
[0076] This application constructs an input feature vector to predict power plant coal consumption based on various pre-defined data related to power plant coal consumption. To ensure the availability and quality of the raw data and provide a foundation for subsequent analysis, the collected pre-defined data is preprocessed. Specifically, the various pre-defined data are first aligned. Since data from different sources may differ in time scale, recording frequency, etc., their timestamps often differ. To ensure data consistency in the time dimension, a unified time series database is constructed for the various pre-defined data collected from various power plants. Time alignment processing is performed on the data from each data source to ensure that the timestamps of the data from each data source are consistent. For example, hourly power generation data and daily coal inventory data are aligned according to specific time rules (such as interpolation or aggregation on an hourly basis) for subsequent processing. The aligned data is then cleaned, feature extracted, and normalized to generate a standardized input feature vector. Since aligned data may contain missing values and outliers, methods such as linear interpolation, mean imputation, and KNN (K-Nearest Neighbors) can be used to fill in missing values, depending on the data characteristics and business logic. For outliers, reasonable threshold ranges or statistical analysis methods (such as the 3σ criterion or quartile interval method) can be set to identify and remove extreme outliers that deviate from the normal range, ensuring data integrity and accuracy. Key features closely related to power plant coal consumption are extracted from the cleaned data. Specific extraction rules can be based on manual experience or determined using specific algorithms. This application will not elaborate on this further. Of course, to eliminate the adverse effects of dimensional differences on model training, Z-score or Min-Max methods can be used for standardization to unify the dimensions of different variables.
[0077] Furthermore, this application integrates data from multiple power plants, performing cross-power plant data integration and feature construction to achieve regional shared modeling. Specifically, firstly, it assesses the similarity of coal consumption behavior among power plants based on preset data from multiple power plants. For example, methods such as Dynamic Time Warping (DTW) and K-Means clustering are used to evaluate the similarity of coal consumption behavior among various power plants. DTW can effectively handle the scaling and distortion of time series on the time axis, thereby accurately measuring the similarity between time series of coal consumption behavior of different power plants; K-Means clustering can group power plants with similar coal consumption behavior characteristics into one category, intuitively showing the similarity structure of coal consumption behavior among power plants, which helps to discover the commonalities and differences in coal consumption among different power plants. Secondly, redundant features are reduced in the preset data of multiple target power plants whose similarity meets the preset requirements. For example, principal component analysis (PCA) or autoencoder technology can be introduced to reduce the dimensionality of redundant features in the data. Principal Component Analysis (PCA) transforms original features into a few uncorrelated principal components through linear transformation. These principal components retain most of the information in the original data, thus removing redundancy and reducing data dimensionality. An autoencoder, on the other hand, utilizes the self-encoding characteristics of neural networks to learn a compressed representation of the data and automatically extract key features, filtering out redundant information. Dimensionality reduction not only improves the efficiency of subsequent calculations and reduces computational resource consumption but also enhances the model's generalization ability, making it more robust to different data scenarios. Finally, preset time-series features are constructed based on preset data from multiple target power plants after dimensionality reduction. These preset time-series features include at least sliding window statistics, time-series variation features, and periodic features. For example, for sliding window statistics, the mean, standard deviation, maximum, and minimum values of data from the past 7, 14, and 30 days are calculated. For time-series variation characteristics, the first and second differences of the data can be calculated. The first difference reflects the rate of change, showing the trend between adjacent time points; the second difference further describes the change in the rate of change, helping to identify acceleration or deceleration trends in the data. For periodic features, considering that power plant operation is often affected by periodic factors, periodic labels such as weekday / weekend, month, and quarter are added to the data. These periodic labels clearly identify the time period in which the data is located, helping the model capture periodic patterns in the data. For example, power plant loads may differ between weekdays and weekends, and energy demand may vary in different months and quarters. By introducing these periodic features, the model can better adapt to these patterns and improve prediction accuracy. Through multi-power plant data fusion, data from multiple power plants (such as load time series and inventory levels) can be jointly stored to establish a unified data view.For example, distributed databases or ETL tools can be used to achieve cross-power plant data association. This also enhances the model's generalization ability. Furthermore, by aggregating operational and environmental data from multiple power plants, a joint cross-power plant dataset can be constructed, enabling regional shared modeling.
[0078] The input feature vectors are input into various pre-constructed models, including at least two of the following: a first model (e.g., LSTM) for capturing time-series dependencies, a second model (e.g., XGBoost) for handling short-term abrupt changes, and a third model (e.g., Transformer) for mining cross-power plant knowledge transfer associations. To improve prediction accuracy and stability, this application provides a multi-model prediction system based on modeling from multiple perspectives. For example, it constructs a multi-model prediction system integrating LSTM, XGBoost, and Transformer, where each model collaborates to model medium- to long-term trends, short-term disturbances, and long-term cross-power plant patterns.
[0079] The attention weights of each model are obtained, and the output values of the multiple models are fused based on these attention weights. The fusion result is then used as the predicted value of coal consumption for power plants. To fully leverage the advantages of the three types of models in terms of different data dimensions and modeling capabilities, this application designs a FusionStrategy Network (FSN) based on a contextual attention mechanism to achieve dynamic integration of the final prediction results. First, the prediction result sequences and context vectors of multiple models are obtained; for example, the prediction result sequences of LSTM, XGBoost, and Transformer models are obtained, and the context vectors (such as weather category, power plant size, and transportation risk label) are used as auxiliary inputs. The prediction result sequences and context vectors of the multiple models are substituted into the following first preset formula to determine the attention weights of each model:
[0080]
[0081] Where, α i The final normalized attention weights of the i-th model; y i is the vector result predicted by the i-th model; c is the context vector, such as auxiliary features like weather type, power plant size, and transportation risk level; W x A linear transformation matrix is used to transform y i Projected into the attention space (trainable parameters); W c is a linear transformation matrix used to project c into the attention space (trainable parameters); w is the attention score vector, which scores the weights of the current model (trainable parameters); b is the bias vector.
[0082] In one embodiment of this application, the attention weight can also be calculated as follows: First, an attention query vector is generated based on the temporal position and abrupt change magnitude of the input features. For example, the temporal position is encoded, and the temporal order relationship of the input features is represented by position embedding to capture the periodic pattern of coal consumption in power plants (such as daily / weekly / seasonal cycles); and the abrupt change value D of the input at adjacent time steps is calculated. t = |x t -x t-1 | To characterize the drastic changes in data, quantify the drastic changes in coal consumption between adjacent time steps, and characterize the impact of sudden events (such as extreme weather or equipment failure); the time series position P t With mutation magnitude D t After concatenation, a linear transformation is performed to generate the query vector Q:
[0083] Q = W q ·Concat(P t D t )+b q ;
[0084] Among them, W q 、b q These are trainable parameters.
[0085] Then, the matching degree between the output of each sub-model and the query vector is calculated using cosine similarity.
[0086]
[0087] Among them, Similarity i Let f be the matching degree between the i-th model and the query vector, Q be the query vector, and f be the matching degree between the i-th model and the query vector. i (x) is the output of the i-th model.
[0088] The cosine similarity is used to calculate the matching degree between the sub-model output and the query vector, reflecting the sub-model's adaptability to the current time series pattern and its sensitivity to abrupt changes. For example, an LSTM sub-model may be good at capturing long-term trends. If the current time is during a periodic peak in coal consumption, its output will be consistent with the temporal encoding direction of the query vector, resulting in high similarity. If a sub-model can quickly respond to abrupt changes (such as a sudden increase in coal consumption), its output direction will be strongly correlated with the abrupt change magnitude feature component in the query vector, resulting in even higher similarity.
[0089] Then, the matching degree is normalized using the Softmax function to obtain the dynamic weight coefficients.
[0090] The similarity is converted into a probability distribution using the Softmax function:
[0091]
[0092] Weighting coefficient ω i This reflects the importance of each sub-model at the current time step.
[0093] Finally, the weights and predicted values of each model are substituted into the following second preset formula to fuse the output values of the multiple models:
[0094]
[0095] Among them, y fused This represents the final predicted value of coal consumption for the power plant; α i The final normalized attention weights of the i-th model; y i This is the vector result predicted by the i-th model.
[0096] By dynamically fusing multiple models, high-similarity sub-models dominate predictions while low-similarity models are suppressed, ensuring that the model adaptively adjusts the predicted values under different scenarios (stationary / abrupt).
[0097] The aforementioned trainable parameters can be optimized using an error optimization model, such as the number of hidden units in LSTM, the tree depth and split nodes in XGBoost, and the attention weight matrix in Transformer. These parameters are randomly generated during network initialization and progressively optimized during training via backpropagation. The training objective is typically the overall prediction loss (e.g., MSE), with end-to-end joint optimization of parameters for each module (including the attention fusion module). During model training, these parameters are continuously updated using historical data, enabling the fusion network to automatically adjust the weight allocation strategies of different models based on contextual information (e.g., weather, power plant size, transportation risks), achieving a more adaptive and dynamic fusion effect.
[0098] Specifically, the final predicted and actual values of power plant coal consumption are obtained, ensuring strict time alignment to avoid errors caused by time offsets. The error in the predicted power plant coal consumption is calculated based on these two values, for example, using mean squared error or mean absolute percentage error as a loss function. The trainable parameters in the first preset formula are then optimized based on this error. These trainable parameters include: a linear transformation matrix W. x and W c The model consists of an attention score vector w and a bias vector b. The error is backpropagated from the final prediction to each sub-model, and the gradient is calculated layer by layer with respect to the trainable parameters according to the chain rule. The model parameters are then updated using an optimizer (such as Adam).
[0099] Furthermore, when the second model is an XGBoost prediction model, the method further includes: increasing the tree depth of the second model according to a preset step size when the prediction error is greater than a preset error; and decreasing the tree depth of the second model according to a preset step size when the number of times the volatility of the prediction error exceeds a preset volatility exceeds a preset number. For example, when the prediction error is >3%, gradually increasing the maximum depth from the default value of 6 to 8 layers can enhance feature interaction capabilities, thereby reducing the error. When the error volatility is >5% and continues for 3 predictions, reducing the depth to 4-5 layers can prevent overfitting, thereby reducing the error volatility.
[0100] Figure 2 This is a diagram of a smart prediction framework for power plant coal consumption in one embodiment of this application, such as... Figure 2 As shown, in this embodiment, a multi-model prediction system of LSTM, XGBoost, and Transformer is constructed. The first model for capturing temporal dependency patterns is the LSTM prediction model, the second model for handling short-term mutation features is the XGBoost prediction model, and the third model for mining cross-power plant knowledge transfer associations is the Transformer prediction model.
[0101] When constructing the input feature vector for predicting coal consumption of power plants, (1) LSTM uses a sliding window to construct a continuous sequence. The input features include: ① the sequence data of daily coal consumption, coal inventory, power generation load, etc. for 30 to 60 consecutive days, as well as its first-order difference and second-order difference sequences, to capture short-term change trends; ② periodic identifiers (such as days of the week, months) and the mean and standard deviation features within the sliding window.
[0102] (1) LSTM prediction model: time-dependent modeling
[0103] The raw input data includes power plant operation data (such as power generation, boiler temperature, unit load), meteorological environment data (temperature, humidity, wind speed), and historical coal consumption time series.
[0104] The input feature vector is constructed based on the original input data, mainly including: historical coal consumption, inventory, and coal intake over the past T days (e.g., 50 days); continuous meteorological variables over the past T days (e.g., 50 days) (such as temperature, humidity, wind speed, and precipitation). In addition, it includes derived features: first / second-order differences of the above variables (enhancing the ability to perceive changes); lagged features, such as coal consumption three days ago; sliding window statistics (3-day, 7-day, and 14-day means and variances); and periodic labels (weekdays / holidays).
[0105] Model structure: Includes an LSTM layer, a fully connected layer, and an output layer. The LSTM layer is used to extract long-term temporal dependency features. By inputting samples into the LSTM layer at time steps, the LSTM layer updates the hidden state step by step to obtain the final hidden state h.L A fully connected layer (FC) + ReLU is used for nonlinear transformation, transforming h... L After inputting into the fully connected layer, ReLU activation is used to generate a higher-order feature space, enhancing the model's expressive power. The output layer is used for regression prediction of future coal consumption / inventory, with the output of the fully connected layer serving as input to predict the forecast sequence for the next N days.
[0106] Let x t For input features, h t For the hidden state of LSTM, y t For the final output:
[0107] h t =LSTM(x t h t-1 );
[0108] y t =FC(ReLU(FC(h) t ))).
[0109] During the calculation process, a fixed-length sliding window (e.g., 50 days) is constructed, and the window data is input as a sequence into the LSTM to generate time-dimensional hidden states. After nonlinear mapping (FC+ReLU), the output layer generates a prediction sequence for the next N days (e.g., 15 days).
[0110] (2) XGBoost Prediction Model: Modeling Short-Term Abrupt Changes and Nonlinear Responses
[0111] The XGBoost prediction model prefers structured, abrupt, and categorical variable inputs to adapt to short-term disturbance scenarios. Input features include: ① Numerical time-series features: the variation range of daily power generation, coal consumption, and coal intake of power plants in the previous 1-3 days; ② Abrupt change indicators: fluctuations in transportation plans (such as a sudden increase in coal in transit, delivery delays), meteorological anomaly indicators (such as a sudden drop in temperature >5℃, heavy precipitation indicators); ③ Categorical features: weather categories (such as cloudy / sunny / rainy / snowy), holiday indicators; ④ Sliding window statistics (average, maximum, and minimum coal consumption values in the past 7 / 14 days). Categorical features are One-Hot encoded, and continuous variables are Z-score normalized before being input into the model.
[0112] Model Structure: The predictor is trained using the XGBoost algorithm based on gradient boosting trees; the feature input is structured data within a single point or short-term window; the output is the predicted coal consumption value at a future point in time (or multiple points in time). Algorithm Flow: During the training phase, supervised training is performed using features from the last T days and coal consumption labels for future days; during the prediction phase, the coal consumption value for the next N days is directly output based on the latest input features.
[0113] (3) Transformer module: a general predictor with pre-training and transfer learning hints
[0114] The Transformer prediction model takes multi-source data (coal consumption, inventory, weather, transportation, etc.) after data collection and preprocessing as input to construct spatiotemporal joint feature input, and constructs input vector through patch partitioning and embedding mechanism.
[0115] The Transformer module employs a two-stage modeling strategy: a spatiotemporal pre-training stage and a knowledge-guided learning stage. This design extracts common patterns across power plants with different behavioral modes and achieves transfer modeling through a personalized prompting mechanism, thereby possessing cross-power plant and highly generalized predictive capabilities.
[0116] Phase 1: Spatiotemporal Pre-training Phase
[0117] The input data includes the aforementioned power plant operation data, meteorological and environmental data, dispatching plan data, and inventory monitoring data. After embedding, this data is segmented into patch sequences (e.g., with 1 day / hour as a unit of segmentation), then uniformly encoded at different locations, and finally fed into the network for further processing.
[0118] Core structure:
[0119] Patch Embedding: This component is responsible for processing the original input data into blocks according to the time and space dimensions, and projecting them into feature vectors of fixed dimensions.
[0120] ST Masking Mechanisms: Random Masking: By randomly selecting regions for masking, this encourages the model to learn fine-grained spatiotemporal patterns in the data, uncovering micro-features and regularities within the data. Tubular Masking: This masking method helps improve the model's extrapolation ability in the spatial dimension, enabling the model to better handle data in unknown spatial regions. Block Masking: By masking data blocks, this enhances the model's spatial transferability, allowing it to maintain good performance in different spatial scenarios. Temporal Masking: Primarily used to allow the model to learn temporal dependencies in the data, understanding the trends and patterns of data change over time.
[0121] Transformer Blocks architecture:
[0122] Encoder: Processes unmasked patches, focusing on valid unmasked data blocks to extract key information. It is responsible for extracting deep shared spatiotemporal patterns from the complete input: through learning and analysis of large amounts of data, it uncovers prevalent spatiotemporal features and patterns, providing a foundation for subsequent predictions. The standard multi-layer stacked encoder structure consists of several key components: Multi-Head Attention, which automatically focuses on important parts of the data by calculating the correlation between data at different locations, thus better capturing data features; Residual Connection, which effectively solves the gradient vanishing problem, making the model converge more easily during training while preserving information from the original data; Layer Normalization, which normalizes the input data of each layer, accelerating model convergence and improving model stability and generalization ability; and Feed Forward Network, which performs further nonlinear transformations on the data processed by Multi-Head Attention and Layer Normalization, enhancing the model's expressive power.
[0123] Decoder: Receives the output of the Encoder plus placeholder encodings for the masked region. It is responsible for "reconstructing" the masked region using information from the known regions. A standard multi-layered stacked Decoder structure: Each layer also contains several key components: Masked Multi-Head Attention, which, when processing the masked region, more accurately captures the relationship between the masked region and other regions through a multi-head attention mechanism; Encoder-Decoder Attention, which establishes a connection between the Encoder and Decoder, enabling the Decoder to fully utilize the information extracted by the Encoder; Residual Connections, which, similar to residual connections in the Encoder, aid in model training and information transfer; Layer Normalization, which normalizes the data in each layer of the Decoder to ensure model stability; and Feedforward Network, which further performs non-linear transformations on the data to improve the model's reconstruction capability.
[0124] Phase Two: Knowledge-Guided Learning Phase
[0125] This stage feeds the partially embedded input data into four specific networks to generate corresponding memory information: Net-sc (Spatial Proximity): Utilizes Conv2D modeling to extract similarity features between geographically adjacent power plants. Through convolutional operations, it captures the associations and commonalities between spatially adjacent power plants. Net-sh (Spatial Hierarchy): Also employs Conv2D modeling, focusing on reflecting the spatial hierarchy characteristics of power plants in terms of organizational structure and supply chain levels, helping the model understand the location and relationships of different power plants in the spatial structure. Net-tc (Temporal Proximity): Models short-term temporal proximity dependencies using a self-attention mechanism. The self-attention mechanism automatically focuses on the correlation of data at different times in the time series, thereby learning the data change patterns within a short period. Net-tp (Temporal Periodicity): Employs self-attention modeling to strengthen the memory of periodicity (such as weeks, months, etc.). In this way, the model can better capture the periodic features in the data and predict the changing trends of the data in different periods.
[0126] The features generated by these networks are stored in two memory pools: The Temporal Memory Pool extracts features related to temporal proximity and temporal periodicity through convolutional networks. During cue learning, this memory information is continuously optimized to better suit the model's predictive needs. The Spatial Memory Pool extracts features related to spatial proximity and spatial hierarchy using a self-attention mechanism. Similarly, during the cue learning phase, this memory is optimized to provide the model with more accurate spatial information.
[0127] The memory information stored in the memory pool will output prompts and serve as context input in subsequent Transformer Blocks, guiding the model's prediction behavior and enabling the model to make more accurate predictions based on different scenarios and needs.
[0128] Transformer Blocks Structure: In the cue learning phase, a simplified Transformer Encoder structure was adopted to better adapt to the fine-tuning scenario of personalized small-sample power plants. Compared with the pre-training phase, this structure underwent some adjustments: Residual connections were removed. In small-sample fine-tuning scenarios, residual connections could introduce excessive parameters and computational costs; removing them simplifies the model structure and reduces computational costs. Only LayerNorm was fine-tuned. By fine-tuning the LayerNorm parameters, the normalization effect of the model was adjusted to a certain extent to adapt to the new data and task requirements. The remaining modules were kept frozen: Modules such as multi-head self-attention, residual connections (although removed, the corresponding parts in the original structure remained frozen), and feedforward networks were kept in the pre-trained state and no longer updated. The purpose of this was to reduce the number of parameters while ensuring the basic performance of the model, improve the model's transfer efficiency on small-sample data, and avoid overfitting. Specifically:
[0129] Multi-Head Self Attention: Its parameters are determined during the pre-training phase and remain frozen during this phase without adjustment. Residual Connections: Although structurally removed, their corresponding pre-training parameters remain unchanged and are no longer used in training. Layer Normalization: Fine-tuning is performed in this phase to optimize the model's adaptability to new data. Feedforward Networks: Their parameters are also obtained through pre-training and remain frozen during the cue learning phase without updates.
[0130] In one embodiment of this application, after obtaining the final predicted value of coal consumption, a safety stock boundary is determined based on the predicted value of coal consumption of the power plant. For example, the stock level is determined to be no less than the sum of coal consumption in the next M days. When the current stock level is lower than the safety stock boundary, an early warning signal is issued, and a coal transportation plan suggestion is generated based on the predicted value of coal consumption of the power plant and the current stock level.
[0131] The beneficial effects of this application are as follows: It acquires multiple preset data related to power plant coal consumption; constructs an input feature vector for predicting power plant coal consumption based on these preset data; inputs the input feature vector into multiple pre-constructed models, including at least two models among a first model capturing time-series dependency patterns, a second model handling short-term mutation features, and a third model mining cross-power plant knowledge transfer associations; obtains the attention weights of each model, and fuses the output values of the multiple models based on these attention weights, using the fusion result as the predicted value of power plant coal consumption. This application improves prediction accuracy and reduces human intervention by constructing an intelligent prediction method that integrates multiple models to fuse prediction results, thereby enhancing the prediction accuracy of power plant coal consumption forecasting.
[0132] In one embodiment, step S102 above can be implemented as steps A1-A2 as follows:
[0133] In step A1, multiple preset data are aligned.
[0134] In step A2, the aligned data is cleaned, features are extracted, and normalized to generate a standardized input feature vector.
[0135] In one embodiment, obtaining the attention weights of each model in step S104 above can be implemented as follows:
[0136] The attention weights for each model are determined according to the following first pre-set formula:
[0137]
[0138] Where, α i The final normalized attention weights of the i-th model; y i c is the vector result predicted by the i-th model; c is the context vector; W x The linear transformation matrix is used to transform y i Projected into the attention space; W c is a linear transformation matrix used to project c into the attention space; w is the attention score vector; b is the bias vector.
[0139] In one embodiment, the fusion of the output values of the multiple models based on the attention weights in step S104 above can be implemented as follows:
[0140] The output values of the multiple models are fused according to the following second preset formula:
[0141]
[0142] Among them, y fused This represents the final predicted value of coal consumption for the power plant; α i The final normalized attention weights of the i-th model; y i This is the vector result predicted by the i-th model.
[0143] In one embodiment, the method may also be implemented as steps B1-B2:
[0144] In step B1, the error of the predicted value of the power plant's coal consumption is obtained;
[0145] In step B2, the trainable parameters in the first preset formula are optimized according to the error. The trainable parameters include: the linear transformation matrix W. x and W cThe attention score vector w and the bias vector b.
[0146] In one embodiment, the second model is an XGBoost prediction model, and the method can also be implemented as follows: steps C1-C2:
[0147] In step C1, when the prediction error is greater than the preset error, the tree depth of the second model is increased according to the preset step size;
[0148] In step C2, when the number of times the volatility of the prediction error exceeds the preset volatility exceeds the preset number, the tree depth of the second model is reduced according to the preset step size.
[0149] In one embodiment, the method may also be implemented as follows: steps D1-D2:
[0150] In step D1, the safety stock boundary is determined based on the predicted value of the power plant's coal consumption;
[0151] In step D2, when the current inventory level is lower than the safety stock limit, an early warning signal is issued, and a coal transportation plan suggestion is generated based on the predicted value of the power plant's coal consumption and the current inventory level.
[0152] Figure 3 This is a schematic diagram of the structure of a power plant coal consumption prediction device according to an embodiment of this application, including:
[0153] The acquisition module 301 is used to acquire various preset data related to coal consumption in power plants;
[0154] Module 302 is used to construct an input feature vector for predicting the coal consumption of power plants based on various preset data related to coal consumption in power plants;
[0155] The input module 303 is used to input the input feature vector into a variety of pre-built models, wherein the models include at least two of the following: a first model for capturing time-series dependency patterns, a second model for processing short-term mutation features, and a third model for mining cross-power plant knowledge transfer associations.
[0156] The fusion module 304 is used to obtain the attention weights of each model, fuse the output values of the multiple models based on the attention weights, and use the fusion result as the predicted value of coal consumption of the power plant.
[0157] In one embodiment, the building module includes:
[0158] The alignment submodule is used to align multiple preset data sets.
[0159] The generation submodule is used to clean, extract features, and normalize the aligned data to generate a standardized input feature vector.
[0160] In one embodiment, the fusion module is configured to:
[0161] The attention weights for each model are determined according to the following first pre-set formula:
[0162]
[0163] Where, α i The final normalized attention weights of the i-th model; y i c is the vector result predicted by the i-th model; c is the context vector; W x The linear transformation matrix is used to transform y i Projected into the attention space; W c is a linear transformation matrix used to project c into the attention space; w is the attention score vector; b is the bias vector.
[0164] In one embodiment, the fusion module is configured to:
[0165] The output values of the multiple models are fused according to the following second preset formula:
[0166]
[0167] Among them, y fused This represents the final predicted value of coal consumption for the power plant; α i The final normalized attention weights of the i-th model; y i This is the vector result predicted by the i-th model.
[0168] In one embodiment, the apparatus further includes:
[0169] The acquisition submodule is used to obtain the error of the predicted value of coal consumption in power plants;
[0170] The optimization submodule is used to optimize the trainable parameters in the first preset formula based on the error. The trainable parameters include: the linear transformation matrix W. x and W c The attention score vector w and the bias vector b.
[0171] In one embodiment, the second model is an XGBoost prediction model, and the apparatus further includes:
[0172] Add a submodule to increase the tree depth of the second model according to a preset step size when the prediction error is greater than the preset error;
[0173] The reduction submodule is used to reduce the tree depth of the second model according to a preset step size when the number of times the volatility of the prediction error exceeds the preset volatility is greater than the preset number.
[0174] In one embodiment, the apparatus further includes:
[0175] The determination module is used to determine the safety stock boundary based on the predicted value of power plant coal consumption;
[0176] The early warning module is used to issue an early warning signal when the current inventory level is lower than the safety stock limit, and to generate a coal transportation plan suggestion based on the predicted value of the power plant's coal consumption and the current inventory level.
[0177] Figure 4 This is a schematic diagram of the hardware structure of a power plant coal consumption prediction system according to one embodiment of this application, as shown below. Figure 4 As shown, the power plant coal consumption prediction system includes:
[0178] At least one processor 420; and,
[0179] Memory 404 communicatively connected to the at least one processor 420; wherein,
[0180] The memory 404 stores instructions that can be executed by the at least one processor 420 to implement the power plant coal consumption prediction method described in any of the above embodiments.
[0181] Reference Figure 4 The power plant coal consumption prediction system 400 may include one or more of the following components: processing component 402, memory 404, power supply component 406, multimedia component 408, audio component 410, input / output (I / O) interface 412, sensor component 414, and communication component 416.
[0182] Processing component 402 typically controls the overall operation of the power plant coal consumption prediction system 400. Processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the method described above. Furthermore, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.
[0183] Memory 404 is configured to store various types of data to support the operation of the power plant coal consumption prediction system 400. Examples of this data include instructions for any application or method operating on the power plant coal consumption prediction system 400, such as text, images, videos, etc. Memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0184] Power supply component 406 provides power to various components of the power plant coal consumption prediction system 400. Power supply component 406 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the power plant coal consumption prediction system 400.
[0185] Multimedia component 408 includes a screen that provides an output interface between the power plant coal consumption prediction system 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 408 may also include a front-facing camera and / or a rear-facing camera. When the power plant coal consumption prediction system 400 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0186] Audio component 410 is configured to output and / or input audio signals. For example, audio component 410 includes a microphone (MIC) configured to receive external audio signals when the power plant coal consumption prediction system 400 is in an operating mode, such as alarm mode, recording mode, voice recognition mode, and voice output mode. The received audio signals may be further stored in memory 404 or transmitted via communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
[0187] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0188] Sensor assembly 414 includes one or more sensors for providing status assessments of various aspects of the power plant coal consumption prediction system 400. For example, sensor assembly 414 may include a sound sensor. Additionally, sensor assembly 414 may detect the on / off state of the power plant coal consumption prediction system 400, the relative positioning of components (e.g., the display and keypad of the power plant coal consumption prediction system 400), and the operating status of the power plant coal consumption prediction system 400 or one of its components. Sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 414 may also include an accelerometer, a magnetic sensor, a pressure sensor, a material buildup thickness sensor, or a temperature sensor.
[0189] Communication component 416 is configured to enable the power plant coal consumption prediction system 400 to provide wired or wireless communication capabilities with other devices and cloud platforms. The power plant coal consumption prediction system 400 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 416 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0190] In an exemplary embodiment, the power plant coal consumption prediction system 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the power plant coal consumption prediction method described in any of the above embodiments.
[0191] This application also provides a computer-readable storage medium, which, when the instructions in the storage medium are executed by the processor corresponding to the power plant coal consumption prediction system, enables the power plant coal consumption prediction system to implement the power plant coal consumption prediction method described in any of the above embodiments.
[0192] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0193] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0194] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0195] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0196] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for predicting coal consumption in power plants, characterized in that, include: Acquire various preset data related to coal consumption in power plants; An input feature vector for predicting power plant coal consumption is constructed based on various preset data related to power plant coal consumption. The input feature vector is input into a variety of pre-built models, including at least two of the following models: a first model for capturing time-series dependency patterns, a second model for processing short-term mutation features, and a third model for mining cross-power plant knowledge transfer associations. The attention weights of each model are obtained, and the output values of the multiple models are fused based on the attention weights. The fusion result is used as the predicted value of coal consumption of the power plant.
2. The method as described in claim 1, characterized in that, The step of constructing an input feature vector for predicting power plant coal consumption based on multiple preset data related to power plant coal consumption includes: Align multiple preset data sets; The aligned data is then cleaned, features extracted, and normalized to generate standardized input feature vectors.
3. The method as described in claim 1, characterized in that, The process of obtaining the attention weights for each model includes: The attention weights for each model are determined according to the following first pre-defined formula: Where, α i The final normalized attention weights of the i-th model; y i c is the vector result predicted by the i-th model; c is the context vector; W x The linear transformation matrix is used to transform y i Projected into the attention space; W c is a linear transformation matrix used to project c into the attention space; w is the attention score vector; b is the bias vector.
4. The method as described in claim 1, characterized in that, The fusion of the output values of the multiple models based on the attention weights includes: The output values of the multiple models are fused according to the following second preset formula: Among them, y fused This represents the final predicted value of coal consumption for the power plant; α i The final normalized attention weights of the i-th model; y i This is the vector result predicted by the i-th model.
5. The method as described in claim 3, characterized in that, The method further includes: Errors in obtaining predicted values of coal consumption at power plants; The trainable parameters in the first preset formula for error optimization include: the linear transformation matrix W. x and W c The attention score vector w and the bias vector b.
6. The method according to claim 5, characterized in that, The second model is an XGBoost prediction model, and the method further includes: When the prediction error is greater than the preset error, the tree depth of the second model is increased according to the preset step size; When the number of times the volatility of the prediction error exceeds the preset volatility is greater than the preset number, the tree depth of the second model is reduced according to the preset step size.
7. The method according to claim 1, characterized in that, The method further includes: Determine the safety stock boundary based on the predicted value of power plant coal consumption; When the current inventory level is lower than the safety stock limit, an early warning signal is issued, and a coal transportation plan suggestion is generated based on the predicted value of the power plant's coal consumption and the current inventory level.
8. A power plant coal consumption prediction device, characterized in that, include: The acquisition module is used to acquire various preset data related to coal consumption in power plants; The module is used to construct an input feature vector for predicting the coal consumption of power plants based on various preset data related to power plant coal consumption; The input module is used to input the input feature vector into a variety of pre-built models, including at least two of the following models: a first model for capturing time-series dependency patterns, a second model for processing short-term mutation features, and a third model for mining cross-power plant knowledge transfer associations. The fusion module is used to obtain the attention weights of each model, fuse the output values of the multiple models based on the attention weights, and use the fusion result as the predicted value of coal consumption of the power plant.
9. A power plant coal consumption prediction system, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to implement the power plant coal consumption prediction method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor corresponding to the power plant coal consumption prediction system, the power plant coal consumption prediction system is able to implement the power plant coal consumption prediction method as described in any one of claims 1-7.