An energy prediction method and system based on a time series fusion prediction model

By using a multi-head attention mechanism based on a time-series fusion prediction model and Mogrifier LSTM, combined with a Bayesian optimization framework guided by a large language model LLM, the problem of lack of physical constraints in existing energy prediction models under extreme conditions is solved, achieving efficient and adaptive energy prediction and improving the prediction accuracy and consistency of the model in dynamic environments.

CN123179269APending Publication Date: 2026-11-27NANCHANG INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611253533.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing energy prediction models lack physical constraints under extreme conditions, leading to prediction failures and making it difficult to gain high trust in industrial applications. Furthermore, Bayesian optimization is inefficient in high-dimensional parameter spaces and struggles to avoid physical violation patterns.

Method used

We employ a time-series fusion prediction model, reshaping time-frequency interactions through a multi-head attention mechanism and Mogrifier LSTM, and combining it with a Bayesian optimization framework guided by the large language model LLM to dynamically select key variables and construct a hybrid loss function, thereby achieving deep self-consistency between physical constraints and data fitting.

Benefits of technology

It significantly improves the dynamic adaptability of instantaneous power fluctuations and long-term historical memory, endows the model with the ability to adapt in dynamic environments, solves the dynamic bottleneck of traditional architecture in non-stationary transient energy fluctuations, and improves the accuracy and consistency of predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179269A_ABST
    Figure CN123179269A_ABST
Patent Text Reader

Abstract

The application discloses an energy prediction method and system based on a time sequence fusion prediction model, and relates to the technical field of energy prediction.The method comprises the following steps: bidirectional time sequence modeling is performed on historical observation variables and historical target variables to obtain multi-scale time sequence features; channel attention weighting and time attention weighting are sequentially performed on the multi-scale time sequence features to obtain frequency domain refined features; nonlinear transformation is performed on the frequency domain refined features to obtain encoder output features; unidirectional time sequence modeling is performed on time feature variables to obtain decoder hidden features; the attention weights of multi-source time sequence data are determined to obtain context features; nonlinear transformation is performed on the context features and the decoder hidden features to obtain decoder output features; and prediction is performed on the decoder output features to obtain an energy prediction result.The application solves the dynamic bottleneck that a traditional architecture is difficult to sensitively capture non-stationary transient energy fluctuation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy forecasting technology, and in particular to an energy forecasting method and system based on a time-series fusion forecasting model. Background Technology

[0002] As the global energy system accelerates its transformation towards both decarbonization and digitalization, achieving high-fidelity and physically consistent energy forecasting has become a key scientific issue for ensuring grid stability and improving energy efficiency. When faced with non-stationary operating conditions such as peak loads or extreme weather, purely data-driven models, lacking physical constraints, are prone to producing outputs that defy common sense and fail in predictions on out-of-distribution samples, severely restricting the implementation and reliability of these models in industrial applications.

[0003] To bridge the gap between statistical data and physical mechanisms, Physical Information Neural Networks (PINNs) have emerged. By embedding the control equations as regularization terms into the loss function, PINNs attempt to approximate the physical manifold within the parameter space of the neural network through soft constraints. The implementation process of this existing technique includes: constructing a probabilistic surrogate model using Bayesian optimization; iteratively searching with a small number of evaluations using a sampling function to find the optimal combination of hyperparameters that satisfies the validation set loss or physical constraints; designing a multi-layer fully connected network using the optimal hyperparameters obtained through Bayesian optimization, taking spatiotemporal coordinates or historical load data as input and outputting the physical quantity to be predicted; rewriting the partial differential equations of the control system behavior into residual form; calculating the derivative of the network output with respect to the input using automatic differentiation techniques; and evaluating the degree of violation of physical constraints at sampling points; weighted summing of the data fitting error and the physical residual term to form the total loss function; and simultaneously minimizing both data loss and physical loss using a gradient descent algorithm to approximate the physical manifold within the parameter space, ensuring that the network output takes into account both observed data and physical equation constraints.

[0004] However, reinforcement learning methods employ Bayesian optimization strategies in hyperparameter optimization, simplifying hyperparameters into numerical vectors lacking semantic information. This ignores the complex coupling and game-theoretic mechanisms between physical constraints and data-driven approaches, resulting in a significant reduction in the optimization efficiency of the algorithm in high-dimensional parameter spaces. It is difficult to effectively avoid physical violation patterns and degenerates into inefficient blind trial and error in extremely rugged non-convex physical landscapes. Summary of the Invention

[0005] Therefore, it is necessary to provide an energy forecasting method and system based on a time-series fusion forecasting model to address the aforementioned technical problems.

[0006] This invention provides an energy forecasting method based on a time-series fusion forecasting model, comprising: Acquire multi-source time-series data of the energy system to be predicted. The multi-source time-series data includes: historical observation variables that characterize the operating status of the energy system to be predicted, historical target variables that characterize the load of the energy system to be predicted, and time feature variables that characterize the time environment information of the corresponding prediction time step. The historical observed variables and historical target variables are dynamically weighted and screened to identify key driving variables that have a dynamic impact on system load, resulting in the first weighted feature. The first weighted feature is then subjected to bidirectional time-series modeling to capture the multi-scale time-series dependence of transient fluctuations and long-term trends in the energy sequence, resulting in multi-scale time-series features. Attention weighting is applied to the multi-scale time-series features to perform frequency domain recalibration in both channel and time dimensions, resulting in refined frequency-domain features. Finally, the refined frequency-domain features undergo a nonlinear transformation to obtain the encoder output features. The time-feature variables are dynamically weighted and filtered to select key variables that have a dynamic contribution to energy prediction, resulting in a second weighted feature. The second weighted feature is then modeled unidirectionally to capture the causal temporal dependence of historical states on future outputs in the energy sequence, resulting in the decoder hidden features. Using the decoder's hidden features as queries and the encoder's output features as values, multi-head attention weighted aggregation is performed to obtain context features; nonlinear transformation is applied to the context features and the decoder's hidden features to dynamically fuse historical context features with current decoding information to obtain the decoder's output features; The decoder output features are predicted, and the energy prediction result is obtained by quantile prediction.

[0007] Optionally, energy prediction results are obtained through a pre-trained temporal fusion prediction model, which includes an encoder, a decoder, and an output layer connected in sequence. The encoder includes: a first variable selection network, a bidirectional long short-term memory network with a first Mogrifier mechanism, a frequency domain channel attention module, and a first gated residual network; The decoder includes: a second variable selection network, a multi-head attention mechanism, a unidirectional long short-term memory network with a second Mogrifier mechanism, and a second gated residual network; both the first gated residual network and the second gated residual network incorporate a spectral normalization mechanism. Specifically, the first Mogrifier mechanism performs multiple rounds of mutual modulation before the first weighted feature enters the bidirectional long short-term memory network, and the second Mogrifier mechanism performs multiple rounds of mutual modulation before the second weighted feature enters the unidirectional long short-term memory network.

[0008] Optionally, multiple rounds of mutual modulation are performed using the first Mogrifier mechanism before the first weighted feature enters the bidirectional long short-term memory network, and bidirectional temporal modeling is performed on the modulated first weighted feature through the bidirectional long short-term memory network to obtain multi-scale temporal features, specifically including: The first Mogrifier mechanism includes: a first linear transformation layer and a second linear transformation layer; The hidden state of the previous time step is transformed by the first linear transformation layer and activated by the Sigmoid function to obtain the first modulation signal. The first modulation signal is multiplied element-wise with the first weighted feature to obtain the modulated first input. The modulated first input is transformed by the second linear transformation layer and activated by the Sigmoid function to obtain the second modulation signal. The second modulation signal is multiplied element-wise with the hidden state of the current time step to obtain the modulated first hidden state. Bidirectional long short-term memory networks include: forward long short-term memory networks and backward long short-term memory networks; Forward temporal modeling of the modulated first input and the modulated first hidden state is performed using a forward long short-term memory network to capture the multi-scale dependencies in the forward time dimension of the energy sequence, thus obtaining the forward hidden state at the current time step. Inverse temporal modeling of the modulated first input and the modulated first hidden state is performed using a backward long short-term memory network to capture the multi-scale dependencies in the backward time dimension of the energy sequence, thus obtaining the backward hidden state at the current time step. The forward hidden state and the backward hidden state are then concatenated in a dimensional manner to obtain the multi-scale temporal features.

[0009] Optionally, multiple rounds of mutual modulation are performed on the second weighted features before they enter the unidirectional long short-term memory network using the second mogrifier mechanism, and the modulated second weighted features are then modeled unidirectionally using the unidirectional long short-term memory network to obtain the decoder hidden features, specifically including: The second Mogrifier mechanism includes: a third linear transformation layer and a fourth linear transformation layer; The hidden state of the previous time step is transformed by the third linear transformation layer and activated by the Sigmoid function to obtain the third modulation signal. The third modulation signal is multiplied element-wise with the second weighted feature to obtain the modulated second input. The modulated second input is transformed by the second linear transformation layer and activated by the Sigmoid function to obtain the second modulation signal. The second modulation signal is multiplied element-wise with the hidden state of the current time step to obtain the modulated second hidden state. By using a unidirectional long short-term memory network to perform temporal modeling on the modulated second input and the modulated second hidden state, the causal transmission mechanism of energy history state to future load is modeled, and the hidden features of the decoder are obtained.

[0010] Optionally, training a temporal fusion prediction model specifically includes: Acquire historical time-series data of the energy system and the corresponding actual values ​​of the historical time-series data; Historical time-series data of the energy system are input into the time-series fusion prediction model to obtain energy prediction values; The quantile loss between the predicted and actual energy values ​​is used as the data loss term. The residuals are constructed based on the physical control equations of the energy system, and the mean square error of the residuals is used as the physical loss term. The data loss term and the physical loss term are then weighted and summed to obtain the hybrid loss function. This paper utilizes a Bayesian optimization framework guided by a large language model (LLM) to optimize the hyperparameters of a time-series fusion prediction model. The optimization process incorporates physical constraints, the gradient norm ratio between data loss and physical loss, and the trend of the loss curve into the large language model. The large language model then uses thought chain reasoning to diagnose the game state between data fitting and physical consistency, resulting in a refined hyperparameter search space. Within this refined search space, a tree-structured Parzen estimator is used for Bayesian optimization to obtain the optimal hyperparameter configuration. Based on the optimal hyperparameter configuration and the hybrid loss function, the model parameters of the time series fusion prediction model are updated through backpropagation to obtain the trained time series fusion prediction model.

[0011] Optionally, the physical loss term is constructed according to the type of energy system, specifically including: When the energy system is a household appliance energy consumption system, the residuals of the temperature change rate and heat flow term are constructed based on the thermodynamic conduction and energy conservation equations. When the energy system is a wind power generation system, static boundary constraint loss is constructed based on mechanical inertia constraints, and dynamic constraint loss between the rate of change of wind speed and the rate of change of power is constructed based on the transport partial differential equation. When the energy system is a solar power generation system, a dynamic constraint loss on the rate of power change is constructed based on the total differential theorem, driven by the rate of change of irradiance and the rate of change of temperature.

[0012] Optionally, historical observed variables and historical target variables are dynamically weighted and screened to identify key driving variables that have a dynamic impact on system load, resulting in the first weighted feature, which specifically includes: Flatten all historical observation variables and historical target variables at each time step into a vector to obtain the first input vector; For each variable in the first input vector, a nonlinear transformation is performed on the variable through its dedicated gated residual network to extract nonlinear features that are dynamically related to the system load, thereby obtaining the nonlinear feature representation of the variable. The first input vector and the nonlinear feature representation are then aggregated and weighted through a shared gated residual network to dynamically evaluate the contribution of each variable to the energy load, thereby obtaining the adaptive attention weight corresponding to the variable. The first weighted feature is obtained by summing the weighted sums of each variable and its corresponding adaptive attention weights. Dynamically weighted screening of time-related variables is performed to identify key variables that dynamically contribute to energy forecasting, resulting in a second weighted feature, which specifically includes: Flatten the time feature variables of each time step into a vector to obtain the second input vector; For each time feature variable in the second input vector, a nonlinear transformation is performed on the variable through its dedicated gated residual network to extract future variable features related to energy forecasting, and obtain the nonlinear feature representation corresponding to the variable; feature aggregation and weight generation are performed on the first input vector and the nonlinear feature representation through a shared gated residual network to dynamically evaluate the importance of each time feature variable to energy forecasting, and obtain the adaptive attention weight corresponding to the time feature variable. The second weighted feature is obtained by summing the time-specific feature variables and their corresponding adaptive attention weights.

[0013] Optionally, the multi-scale temporal features are sequentially weighted by channel attention and time attention using a frequency domain channel attention module to obtain refined frequency domain features, specifically including: The frequency domain channel attention module includes: a channel attention module and a time attention module; Based on the following formula, multi-scale temporal features are weighted by channel attention using a channel attention module to obtain a channel attention-weighted feature map: ; ; in, This represents the calculated channel attention weights. Indicates the input feature map, Indicates the channel reduction rate. This represents the feature map after channel attention weighting. It is the Sigmoid activation function. Represents the number of feature channels; Based on the following formula, the channel-attention-weighted feature map is subjected to temporal attention weighting using a temporal attention module to obtain refined features in the frequency domain: ; ; in, This represents the calculated temporal attention weights. This represents the refined features in the frequency domain.

[0014] Optionally, the energy prediction result is obtained by predicting the decoder output features through the output layer using a quantile prediction method, specifically including: The output layer employs a quantile regression mechanism to map the decoder output features, thereby constructing the uncertainty distribution boundary of the energy prediction results and obtaining a probabilistic prediction tensor containing multiple preset quantiles. The tensor slice corresponding to the median of the probabilistic prediction tensor is then subjected to inverse normalization to obtain the energy prediction results.

[0015] This invention provides an energy forecasting system based on a time-series fusion forecasting model, comprising: The data acquisition module is used to acquire multi-source time-series data of the energy system to be predicted. The multi-source time-series data includes: historical observation variables that characterize the operating status of the energy system to be predicted, historical target variables that characterize the load of the energy system to be predicted, and time feature variables that characterize the time environment information of the corresponding prediction time step. The first screening module dynamically weights and filters historical observed variables and historical target variables to identify key driving variables that have a dynamic impact on system load, resulting in the first weighted feature. It then performs bidirectional time-series modeling on the first weighted feature to capture the multi-scale time-series dependence of transient fluctuations and long-term trends in the energy sequence, resulting in multi-scale time-series features. Attention weighting is applied to the multi-scale time-series features to perform frequency domain recalibration in both channel and time dimensions, resulting in refined frequency-domain features. Finally, a nonlinear transformation is performed on the refined frequency-domain features to obtain the encoder output features. The second filtering module is used to dynamically weight and filter time feature variables to select key variables that have a dynamic contribution to energy prediction, thereby obtaining the second weighted feature; and to perform unidirectional time series modeling on the second weighted feature to capture the causal time series dependence of historical states on future outputs in the energy sequence, thereby obtaining the decoder hidden feature. The dynamic fusion module is used to perform multi-head attention weighted aggregation with decoder hidden features as queries and encoder output features as values ​​to obtain context features; and to perform nonlinear transformation on context features and decoder hidden features to dynamically fuse historical context features with current decoding information to obtain decoder output features. The prediction module is used to predict the output features of the decoder and obtain the energy prediction result by means of quantile prediction.

[0016] The energy forecasting method and system based on a time-series fusion forecasting model provided in this invention have the following advantages compared with the prior art: This invention combines the underlying time-frequency interaction mechanism of Long Short-Term Memory Network and Frequency Domain Channel Attention Reshaping with the semantic decision logic of Bayesian optimization framework guided by Large Language Model (LLM) to eliminate the structural mismatch between physical rigid constraints and neural network flexible fitting. This achieves deep self-consistency between statistical laws and physical conservation laws, significantly improves the dynamic adaptability between instantaneous power fluctuations and long-term historical memory, and endows the time-series fusion prediction model with the ability to adapt to dynamic environmental changes. This solves the dynamic bottleneck of traditional architectures that are difficult to capture non-stationary transient energy fluctuations. Attached Figure Description

[0017] Figure 1 This is a PFMT model architecture diagram of an energy forecasting method based on a time-series fusion forecasting model provided in one embodiment; Figure 2 This is a gated residual network architecture diagram of an energy forecasting method based on a time-series fusion forecasting model provided in one embodiment; Figure 3 This is a network architecture diagram of variable selection for an energy prediction method based on a time-series fusion prediction model, provided in one embodiment. Figure 4 This is a schematic diagram of the game equilibrium decision-making mechanism of an energy forecasting method based on a time-series fusion forecasting model provided in one embodiment; Figure 5 This is a flowchart illustrating the performance control and search space topology reconstruction of an energy prediction method based on a time-series fusion prediction model, as provided in one embodiment. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0019] This invention provides an energy forecasting method based on a time-series fusion forecasting model, the method comprising: Acquire multi-source time-series data of the energy system to be predicted. The multi-source time-series data includes: historical observation variables that characterize the operating status of the energy system to be predicted, historical target variables that characterize the load of the energy system to be predicted, and time feature variables that characterize the time environment information of the corresponding prediction time step.

[0020] When the energy system to be predicted is a household appliance energy consumption system: historical observation variables include: indoor temperature in various areas, outdoor temperature, outdoor humidity, wind speed, and solar radiation intensity, as well as the on / off status, power settings, and operating status of household appliances. The historical target variable is the total power consumption of the household appliances to be predicted or the energy consumption value of the main household appliances. Time characteristic variables include: the hour, day of the week, month, and whether it is a weekday or holiday corresponding to the prediction time step.

[0021] When the energy system to be predicted is a wind power system: historical observation variables include: wind speed, wind direction, air density, and turbulence intensity at hub height, as well as pitch angle, generator speed, nacelle temperature, and grid frequency. The historical target variable is the actual output power of the wind farm or a single turbine. Time characteristic variables include: the number of hours, months, and seasons corresponding to the prediction time step.

[0022] When the energy system to be predicted is a solar power system: historical observation variables include: total horizontal radiation, total tilted radiation, module backsheet temperature or ambient temperature, humidity, air pressure, as well as inverter efficiency, DC voltage / current, and AC output voltage / frequency. The historical target variable is the actual output power of the photovoltaic power plant or array. Time characteristic variables include: the hour corresponding to the prediction time step, the day of the year, or the solar hour angle.

[0023] A dynamic weighted selection process is applied to historical observed variables and historical target variables to identify key driving variables with dynamic impacts on system load, resulting in the first weighted feature. This first weighted feature is then subjected to bidirectional time-series modeling to capture the multi-scale time-series dependence of transient fluctuations and long-term trends in the energy sequence, yielding multi-scale time-series features. Attention weighting is then applied to these multi-scale time-series features for frequency domain recalibration in both channel and time dimensions, resulting in refined frequency-domain features. Finally, a nonlinear transformation is performed on these refined frequency-domain features to obtain the encoder output features.

[0024] Dynamic weighting and filtering of time-related variables are performed to identify key variables that dynamically contribute to energy forecasting, resulting in a second weighted feature. This second weighted feature is then modeled unidirectionally over time to capture the causal temporal dependence of historical states on future outputs in the energy sequence, yielding the decoder's hidden features.

[0025] Using decoder hidden features as queries and encoder output features as values, multi-head attention weighted aggregation is performed to obtain context features. A nonlinear transformation is then applied to the context features and decoder hidden features to dynamically fuse historical context features with current decoding information, resulting in decoder output features. Energy prediction is then performed on the decoder output features using a quantile prediction method.

[0026] Preferably, energy prediction results are obtained through a pre-trained temporal fusion prediction model. The pre-trained temporal fusion prediction model includes an encoder, a decoder, and an output layer connected sequentially. The encoder includes a first variable selection network, a bidirectional long short-term memory network incorporating a first mogrifier mechanism, a frequency domain channel attention module, and a first gated residual network. The decoder includes a second variable selection network, a multi-head attention mechanism, a unidirectional long short-term memory network incorporating a second mogrifier mechanism, and a second gated residual network. Both the first and second gated residual networks incorporate spectral normalization mechanisms.

[0027] Specifically, the first Mogrifier mechanism performs multiple rounds of mutual modulation before the first weighted feature enters the bidirectional long short-term memory network, and the second Mogrifier mechanism performs multiple rounds of mutual modulation before the second weighted feature enters the unidirectional long short-term memory network.

[0028] Preferably, multiple rounds of mutual modulation are performed using the first Mogrifier mechanism before the first weighted feature enters the bidirectional long short-term memory network, and bidirectional temporal modeling is performed on the modulated first weighted feature through the bidirectional long short-term memory network to obtain multi-scale temporal features, specifically including: The first Mogrifier mechanism includes: a first linear transformation layer and a second linear transformation layer. The first linear transformation layer transforms the hidden state of the previous time step, and after activation by the Sigmoid function, a first modulated signal is obtained. The first modulated signal is multiplied element-wise with a first weighted feature to obtain the modulated first input. The second linear transformation layer transforms the modulated first input, and after activation by the Sigmoid function, a second modulated signal is obtained. The second modulated signal is multiplied element-wise with the hidden state of the current time step to obtain the modulated first hidden state.

[0029] Bidirectional long short-term memory networks include forward long short-term memory networks and backward long short-term memory networks.

[0030] A forward temporal model is performed on the modulated first input and the modulated first hidden state using a forward Long Short-Term Memory (LSTM) network to capture the multi-scale dependencies in the forward time dimension of the energy sequence, yielding the forward hidden state at the current time step. A reverse temporal model is then performed on the modulated first input and the modulated first hidden state using a reverse LSM network to capture the multi-scale dependencies in the reverse time dimension of the energy sequence, yielding the reverse hidden state at the current time step. The forward and reverse hidden states are then concatenated dimensionally to obtain the multi-scale temporal features.

[0031] Preferably, the second mogrifier mechanism performs multiple rounds of mutual modulation on the second weighted features before they enter the unidirectional long short-term memory network, and the unidirectional long short-term memory network is used to perform unidirectional temporal modeling on the modulated second weighted features to obtain the decoder hidden features, specifically including: The second Mogrifier mechanism includes a third linear transformation layer and a fourth linear transformation layer. The third linear transformation layer transforms the hidden state from the previous time step, and after activation by the Sigmoid function, a third modulated signal is obtained. The third modulated signal is then multiplied element-wise with the second weighted feature to obtain the modulated second input. The second modulated input is then transformed by the second linear transformation layer, and after activation by the Sigmoid function, a second modulated signal is obtained. This second modulated signal is then multiplied element-wise with the hidden state from the current time step to obtain the modulated second hidden state.

[0032] By using a unidirectional long short-term memory network to perform temporal modeling on the modulated second input and the modulated second hidden state, the causal transmission mechanism of energy history state to future load is modeled, and the hidden features of the decoder are obtained.

[0033] Preferably, training the temporal fusion prediction model specifically includes: Historical time-series data of the energy system and the corresponding actual values ​​are obtained. The historical time-series data of the energy system is input into a time-series fusion prediction model to obtain energy prediction values. The quantile loss between the predicted and actual energy values ​​is used as the data loss term. Residuals are constructed based on the physical control equations of the energy system, and the mean square error of the residuals is used as the physical loss term. The data loss term and the physical loss term are then weighted and summed to obtain a hybrid loss function.

[0034] This paper optimizes the hyperparameters of a temporal fusion prediction model using a Bayesian optimization framework guided by a large language model (LLM). The physical constraint state, the gradient norm ratio between data loss and physical loss, and the trend of the loss curve are injected into the large language model during the optimization process. The large language model then uses thought chain reasoning to diagnose the game state between data fitting and physical consistency, resulting in a refined hyperparameter search space. Within this refined search space, Bayesian optimization is performed using a tree-structured Parzen estimator to obtain the optimal hyperparameter configuration. Based on the optimal hyperparameter configuration and the hybrid loss function, the model parameters of the temporal fusion prediction model are updated through backpropagation, resulting in the trained temporal fusion prediction model.

[0035] Preferably, historical observed variables and historical target variables are dynamically weighted and screened to identify key driving variables that have a dynamic impact on system load, resulting in a first weighted feature, which specifically includes: All historical observed variables and historical target variables at each time step are flattened into vectors to obtain the first input vector. For each variable in the first input vector, a nonlinear transformation is performed on the variable through its dedicated gated residual network to extract nonlinear features that are dynamically related to the system load, thus obtaining the corresponding nonlinear feature representation. Feature aggregation and weight generation are performed on the first input vector and the nonlinear feature representation through a shared gated residual network to dynamically evaluate the contribution of each variable to the energy load, thus obtaining the corresponding adaptive attention weight. The first weighted feature is obtained by weighting and summing all variables and their corresponding adaptive attention weights.

[0036] Dynamically weighted screening of time-related variables is performed to identify key variables that dynamically contribute to energy forecasting, resulting in a second weighted feature, which specifically includes: The temporal feature variables at each time step are flattened into vectors to obtain the second input vector. For each temporal feature variable in the second input vector, a nonlinear transformation is performed on the variable using its dedicated gated residual network to extract future variable features related to energy forecasting, resulting in the corresponding nonlinear feature representation. A shared gated residual network is used to aggregate features and generate weights from the first input vector and the nonlinear feature representation to dynamically evaluate the importance of each temporal feature variable to energy forecasting, obtaining the adaptive attention weight corresponding to that temporal feature variable. The weighted sum of each temporal feature variable and its corresponding adaptive attention weight is then obtained to obtain the second weighted feature.

[0037] Preferably, the energy prediction result is obtained by predicting the decoder output features through the output layer using a quantile prediction method. Specifically, this includes: the output layer employs a quantile regression mechanism to map the decoder output features, thereby constructing the uncertainty distribution boundary of the energy prediction result and obtaining a probabilistic prediction tensor containing multiple preset quantiles. The tensor slice corresponding to the median of the probabilistic prediction tensor is then subjected to inverse normalization to obtain the energy prediction result.

[0038] A specific embodiment of the present invention is provided: This method proposes a physically-informed, temporally-fused Transformer framework (PFMT), such as... Figure 1 As shown, the aim is to build an end-to-end energy prediction system that integrates physical sensing, time-frequency enhancement, and parameter adaptation.

[0039] 1. TFT basic architecture.

[0040] TFT is a deep learning architecture specifically designed for multi-step time series forecasting. Its core advantage lies in its ability to integrate heterogeneous data sources and simultaneously handle static covariates, time-varying historical observation variables, and historical target variables. It dynamically selects relevant features through VSN, captures long-term time dependencies using a multi-head attention mechanism, and relies on GRN as a basic module to ensure efficient nonlinear processing of information.

[0041] 1.1 Gated Residual Network (GRN).

[0042] GRN is a key component in TFT and a fundamental building block for many other advanced modules in the model. It combines residual connections with gated logic (GLU). The residual connection path facilitates information flow by allowing information to bypass the nonlinear transformation layer, while GLU gives the model an adaptive capability, enabling it to adapt to the main input. and optional context The extent of nonlinear transformation applied is dynamically determined. The internal architecture of GRN is shown in the diagram below. Figure 2 As shown. GRN and GLU are output using the following formulas:

[0043] (1) (2) (3) (4) in, It is layer normalization. and It is the middle layer of GRN. These are trainable weights. It is a trainable bias ( i =1,2,3,4,5). It is an exponential linear unit activation function. It is the Sigmoid activation function. Represents element-wise product.

[0044] 1.2 Variable Selection Network (VSN).

[0045] TFT employs VSN to dynamically select the most relevant input features. In multivariate time series prediction, the importance of different input features fluctuates with the time context. The core function of VSN is to apply a dynamic feature filter to the input variables in the initial stage of model data processing. It processes various features independently through a set of variable-specific GRNs and uses a GRN that integrates all features and static context to compute the softmax weights. This weight vector ultimately represents the contribution of the model to each input variable at a specific time point. The internal architecture diagram of VSN is as follows: Figure 3 As shown. The implementation of VSN can be summarized by the following formula:

[0046] (5) (6) In the formula, It is the total number of time series input variables. It is all Variables in time Flattened vectors It is the context of the static covariate encoder. It is the first Variables in time The weight, It is specific to the first GRN with 1 variable, It refers to the final Weight, For the first Variables in time The original value, This is the final output of VSN. Each input variable is processed by a dedicated GRN network, but its weights are shared across all time steps.

[0047] 1.3 Static covariate encoder.

[0048] The TFT architecture uses a static covariate encoder to handle static features that do not change over time. This encoder allows the same model instance to process and distinguish multiple distinct time series. The model learns a high-dimensional embedding for each static feature and then passes it through separate GRNs to generate multiple context vectors. ,in, Used to select relevant time features Used to provide static background information.

[0049] 1.4 Explainable multi-head attention.

[0050] Interpretable multi-head attention is key to TFT's ability to capture long-range temporal dependencies. When the decoder makes predictions for specific future time points, the TFT model utilizes this attention mechanism to backtrack the complete historical information sequence generated by the encoder. This mechanism dynamically assigns attention weights to each past time step by calculating the similarity between the query and the key. Subsequently, the decoder performs a weighted summation of past values ​​based on these weights, thereby generating an informative context vector. The standard multi-head attention mechanism is calculated as follows:

[0051] (7) (8) In the formula, These represent query, key, and value tensors, respectively. They represent the first The weights of the keys, queries, and values ​​in each attention head. This refers to the dimension of the attention head. The interpretable multi-head attention in TFT generates some variants through modified mechanisms, making all attention heads... They share the same value matrix, and the outputs of all heads are weighted and averaged, as shown in the following formula:

[0052] (9) (10) In the formula, Indicates shared weight values. Represents the final linear mapping. The weighted average of the outputs of all attention heads. The total number of attention heads.

[0053] 1.5 Quantile Prediction and Loss.

[0054] TFT employs quantile regression for probabilistic prediction, enabling the model to generate prediction intervals and thus quantify the uncertainty of its predictions. Quantile regression not only provides a median prediction representing central tendency but also defines the boundaries of the prediction distribution. In the model's standard output layer, a linear transformation maps the decoder's final representation to a set of predefined quantiles for prediction. Its loss function is defined by the following formula:

[0055] (11) in, It is the actual value. The model is for the first The predicted value of each quantile. The data loss is the sum of all losses for a target quantile set, and its value is calculated using the following formula:

[0056] (12) In the formula, It is the set of target quantiles.

[0057] 2. Deep capture and robustness optimization for complex temporal features.

[0058] To address the two core challenges of accurately decoupling multi-scale features in energy time series and the instability of model training caused by non-stationary noise, a targeted reconstruction and update were carried out on the standard TFT architecture. To achieve deep capture of complex time-series features, the model replaced the traditional recurrent layer with an iterative modulation unit possessing high-order interaction capabilities, and further introduced a global cross-dimensional perception mechanism to achieve accurate extraction of long-period patterns. Simultaneously, to optimize the model's robustness and ensure physical consistency, the architecture applied a spectral norm-based smoothing constraint strategy to the core computational layer, fundamentally suppressing gradient oscillations caused by data mutations.

[0059] 2.1 Improvement strategy for cyclic units with multi-scale dependence.

[0060] To address the multi-scale characteristics of energy data, which exhibit both instantaneous fluctuations and periodicity, a Mogrifier LSTM was used to upgrade the standard cyclic layer of a TFT. The core of this upgrade lies in introducing an iterative modulation mechanism to reconstruct the interaction pattern between the input and the state. To overcome the limitations of the standard LSTM in handling complex dynamics, the Mogrifier mechanism performs a series of gated iterative steps before the data is fed into the computation unit to achieve mutual modulation between the input and the hidden state from the previous time step. This deep nonlinear interaction accurately captures cross-scale temporal dependencies. The iterative update process is represented by the following formula:

[0061] (13) (14) In the formula, This is the current iteration step. and It is a trainable linear transformation layer. It is the Sigmoid activation function. It is an element-wise product. During the process... After one iteration, the modulated input is obtained. and hidden state Then it is fed into the LSTM unit, and expressed by the following formula:

[0062] (15) In the formula, This is the hidden state for the next moment. This represents the cell state at the next moment. This represents the cell state at the previous moment. Throughout the model, a bidirectional Mogrifier LSTM is used at the encoder, enabling the model to capture contextual dependencies from both the past and future when encoding historical data; a unidirectional Mogrifier LSTM is used at the decoder, ensuring that the model strictly adheres to the temporal order when generating future predictions.

[0063] 2.2 The leap from local perception to global periodic patterns in modeling.

[0064] Given that the Mogrifier LSTM is limited by the local receptive field of the recurrent network, making it difficult to fully capture global periodic patterns across different time scales, a FECAM module is introduced at the encoder backend. This module aims to decouple core time-frequency features from high-dimensional redundancy through a global attention mechanism. It transfers and adapts the spatial-channel attention paradigm from computer vision to a one-dimensional form suitable for time series, refining the feature map hierarchically by concatenating channel attention and temporal attention sub-modules. To address the heterogeneity of information between feature channels, the channel attention module first uses adaptive average pooling to compress the global temporal information of each channel into a scalar descriptor, and then learns the nonlinear importance weights of each channel through a lightweight multilayer perceptron. This is expressed by the following formula:

[0065] (16) (17) (18) In the formula, This represents the calculated channel attention weights. Indicates the input feature map, Indicates the channel reduction rate. This represents the feature map after channel attention weighting. This indicates that the tensor contains real numbers. Represents batch size. Represents sequence length or time step. Represents the number of feature channels, Conv stands for convolution, ReLU stands for corrected linear unit, and AvgPool stands for adaptive one-dimensional average pooling.

[0066] The temporal attention module captures local dependencies in the temporal dimension through a one-dimensional convolutional layer and generates attention weights across time steps, expressed by the following formula: (19) (20) (twenty one) In the formula, This represents the calculated temporal attention weights. This represents the final output feature after two attention weightings. The output after processing by the FECAM module is a double-refined encoder representation, which is then fed into the decoder-encoder attention layer of the TFT.

[0067] 2.3 Resolution of gradient drastic changes and realization of physical consistency.

[0068] To address the inherent high non-stationarity of energy time series and the problem of overfitting in stacked GRN modules within a TFT caused by sudden noise, a spectral normalization mechanism is introduced into the linear transform layer of all GRNs within the architecture. This strategy transforms the sensitivity to noise into an explicit constraint on the spectral norm of the weight matrix, effectively smoothing gradient fluctuations caused by data randomness using a bounded Lipschitz constant, thus simultaneously improving physical consistency and noise resistance. For a weight matrix, its spectral normalized form is expressed by the following formula:

[0069] (twenty two) In the formula, It is the normalized form of the original weight matrix spectrum. This is the original weight matrix. yes The spectral norm is obtained. The spectral norm is efficiently estimated during training using a power-law iteration method.

[0070] 3. Hybrid objective function optimization that incorporates physical mechanism constraints.

[0071] To overcome the shortcomings of purely data-driven models, such as lack of physical interpretability and the tendency to generate predictions that violate objective laws, a hybrid loss training strategy that integrates prior physical knowledge is proposed. This strategy draws inspiration from PINN and constructs a hybrid loss function that includes both data fitting and physical constraint terms. Specifically, the hybrid loss function consists of a weighted average of data loss and physical loss, which can be calculated using the following formula:

[0072] (twenty three) in, It is a hybrid loss function; It is a data loss function; It is the physical loss function; This is the weight hyperparameter of the physical loss, and its weight differs across the three datasets. The data loss employs the TFT standard quantile loss, a method applicable to datasets suitable for the TFT model, enabling the model to predict any specified quantile.

[0073] 3.1 Household appliance energy consumption: thermodynamic conduction and energy conservation constraints.

[0074] The home appliance energy consumption dataset not only contains high-frequency energy consumption data but also monitors in detail the temperature of different functional areas within the residence and the outdoor weather conditions. Given the natural physical coupling between these variables, the first law of thermodynamics and the principles of heat transfer are used to capture the underlying heat conduction mechanisms. Assuming that the temperature change in the kitchen area is jointly determined by heat diffusion from adjacent rooms, outdoor heat conduction, and the heat generated by the operation of home appliances, the governing equation is defined as follows:

[0075] (twenty four) In the formula, The temperature of the region to be modeled. The temperature of the adjacent area, The outdoor ambient temperature, The model predicts the energy consumption of household appliances. The internal thermal diffusivity is... The external thermal conductivity coefficient, To improve the heat production efficiency of household appliances. The research will... , , These coefficients are defined as learnable parameters, assigned initial values ​​consistent with physical priors during the initial training phase. Subsequently, they are adaptively iteratively optimized using backpropagation combined with real observation data, thereby achieving parameterized modeling of the implicit heat conduction mechanism. To integrate the above physical laws into the deep learning model, this governing equation is transformed into residual form. The physical residual is defined by calculating the difference between the rate of temperature change and the heat flow term at each time step. This is expressed by the following formula:

[0076] (25) In the formula, Using a first-order difference approximation typically accelerates model convergence. To ensure the neural network's predictions satisfy the aforementioned physical mechanism, the physical loss function is defined as the mean squared error of the residuals, expressed by the following formula:

[0077] (26) In the formula, This represents the total number of time steps for the batch of samples. This represents the heat conduction and heat generation terms on the right-hand side of the equation. The model not only learns the data distribution but also dynamically optimizes the physical parameters, ensuring that the predicted energy consumption curve is consistent at the physical thermodynamic level.

[0078] 3.2 Wind power generation: mechanical inertia and dynamic transport constraints.

[0079] A wind turbine is a complex dynamic system whose power output is not only limited by static physical boundaries but also must follow the dynamic transfer laws of wind energy conversion. To ensure that the predicted results conform to physical facts in both numerical range and trend, a physical loss function incorporating static boundary constraints and dynamic transport equation constraints is constructed. The output power should not violate the basic physical lower limit. This mechanism ensures the physical rationality of the output results by suppressing invalid predicted values ​​less than zero. This mechanism is expressed by the following formula:

[0080] (27) In the formula, This represents the index of a time step in a time series. Indicates the model at time step The predicted power value, This represents the total number of samples involved in the calculation. Represents the linear rectified function. This represents the negative power penalty. Meanwhile, the actual output power of the generator is limited by the unit's rated power and Betz limit, and should not significantly exceed the theoretical power curve given by the manufacturer. Considering the allowable error of the mechanical system, a tolerance threshold of 5% is set, and the over-limit penalty is expressed by the following formula:

[0081] (28) In the formula, Indicates at time step The theoretical power curve value, This represents the over-limit penalty term, with a coefficient of 1.05 as the relaxation factor. It is designed to address transient power overshoot caused by mechanical inertia and sensor measurement noise, preventing the model from over-penalizing small deviations within the physically permissible range.

[0082] To capture the driving effect of wind speed changes on power changes, a transport partial differential equation constraint is introduced. Physically, the rate of change of power over time should be equal to the product of the rate of change of wind speed over time and the power sensitivity under the current operating condition. The residuals of the partial differential equation can be expressed by the following formula:

[0083] (29) (30) In the formula, Indicates time step The actual wind speed; Represents the residual of a partial differential equation; This represents the rate of change of predicted power over time; This represents the rate of change of wind speed over time. The physical gradient, calculated using the theoretical power curve, is given by the following formula: Therefore, the dynamic constraint loss can be expressed by the following formula:

[0084] (31) In the formula, This represents the dynamic constraint loss. The above sub-penalty terms, weighted by coefficients, collectively constitute the total physical loss. It can be expressed by the following formula:

[0085] (32) In the formula, These are the weighting coefficients of static physical constraints; These are the weighting coefficients of the constraints in dynamic partial differential equations.

[0086] 3.3 Solar power generation: Total differential consistency and environmental driving constraints.

[0087] Photovoltaic power generation is a physical system strongly coupled with environmental and meteorological factors. To ensure that the prediction results of the deep learning model conform to the physical laws of energy conservation and photoelectric conversion, a physical constraint term is introduced into the loss function to suppress predictions that violate physical laws, thus ensuring the physical rationality of the output results. As an energy conversion device, the output power of a photovoltaic module is limited by the physical nonnegativity of predictions. This mechanism ensures physical rationality by suppressing invalid predictions less than zero, and is expressed by the following formula:

[0088] (33) In the formula, This represents the index of a time step in a time series. Indicates the model at time step The predicted power value, This represents the total number of samples involved in the calculation. Represents the linear rectified function. This represents a negative power penalty term. Meanwhile, the actual output power of a photovoltaic module is limited by the current solar irradiance and the module's physical conversion efficiency, and should not significantly exceed the theoretical maximum power calculated based on the physical equations. The following formula represents the penalty for all predicted values ​​exceeding the theoretical value:

[0089] (34) In the formula, Indicates at time step The theoretical maximum power curve value calculated based on irradiance. This represents the penalty term for exceeding limits. To constrain the dynamic characteristics of power variation over time, a physical consistency constraint based on the total differential theorem is introduced. Unlike the inertial lag of mechanical systems, the rate of change of photovoltaic power should be strictly driven by the rate of change of environmental factors and their corresponding partial derivatives. The partial derivatives of the model with respect to the input are calculated in real time using the numerical perturbation method, and the dynamic constraints are constructed using the following formula:

[0090] (35) (36) In the formula, , and These are the time differences for power, irradiance, and temperature, respectively. and These are the local partial derivatives of the model with respect to irradiance and temperature in the current state, respectively. As a tolerance factor, This indicates that the model's predicted trajectory is forced to follow a physical manifold driven by environmental changes. The total physical loss is composed of these three sub-penalties, where independent weighting coefficients are assigned to the partial differential constraint terms. This is expressed by the following formula:

[0091] (37) In the formula, Indicates the total physical loss; This represents the internal balance coefficient of the dynamic constraint, used to balance the contributions of static and dynamic constraints to the gradient.

[0092] 4. Data fitting and physical constraint game equilibrium decision-making based on physical intuition.

[0093] To address the complex non-cooperative game-theoretic relationship between data fitting accuracy and physical consistency constraints in hybrid architectures, traditional Bayesian optimization, while possessing efficient sequential decision-making capabilities, often struggles to find the optimal equilibrium point due to a lack of semantic understanding of the physical context. Therefore, a data fitting and physical constraint game equilibrium decision-making mechanism guided by physical intuition is established. This mechanism retains the core architecture of Bayesian optimization (BO) in its extensive exploration of the numerical space, but innovatively introduces a large language model as a high-level semantic guide to compensate for BO's cognitive limitations. The specific implementation process of this mechanism is as follows: Figure 4 As shown.

[0094] 4.1 Tree-structured Parzen estimator.

[0095] Bayesian optimization, as a powerful policy framework for global optimization, can provide the core driving force in solving computationally expensive black-box function extremum problems. Specifically, using the tree-structured Parzen estimator (TPE) as the basic sampling engine within this framework, it outperforms traditional Gaussian processes in handling high-dimensional conditional parameter spaces. The hyperparameter tuning problem is defined as finding the globally optimal configuration in a compact search space to minimize the objective function. This can be expressed by the following formula:

[0096] (38) In the formula, Represents the globally optimal hyperparameter configuration vector; This represents the domain consisting of all feasible combinations of hyperparameters. The objective function is the total loss of the model on the validation set.

[0097] The TPE algorithm guides hyperparameter optimization based on a nonparametric probabilistic modeling paradigm. This method abandons direct modeling of the posterior distribution of the objective function, instead employing a kernel density estimation strategy to capture the hyperparameter distribution shape at a given loss level. By introducing a loss threshold mechanism, TPE dynamically divides the historical observation set into two subdomains and fits corresponding density functions to each to drive subsequent sampling. The process of constructing the probabilistic model using the TPE algorithm can be represented by the following formula:

[0098] (39) In the formula, Represents the function value; Indicates hyperparameters; It represents the conditional probability density of hyperparameters given a value of the objective function; This represents the quantile threshold, which satisfies... ,in The quantile hyperparameter is set; Represents a potential optimal region; This represents the invalid region. During the iteration process, the algorithm determines the next hyperparameter configuration to be evaluated by maximizing the expected boost. Within the TPE framework, maximizing the expected boost is mathematically equivalent to maximizing the following likelihood ratio, which can be expressed by the following formula:

[0099] (40) In the formula, The expected improvement function measures the potential for improvement of the sampled points to the current optimal solution; symbol This indicates a direct proportional relationship. The optimizer tends to select points with higher likelihood, thus striking a balance between leveraging historical experience and exploring the unknown.

[0100] 4.2 Performance control based on LLM bootstrapping.

[0101] To address the inefficiency caused by complex dimensional relationships in high-dimensional spaces, an intermediate inference layer driven by LLM is embedded within the TPE algorithm loop. From a probabilistic perspective, the goal of LLM is to find a subspace that maximizes the probability of containing the global optimum, given historical observation data and pre-trained domain knowledge. This process can be represented by the following formula:

[0102] (41) In the formula, This represents the prior knowledge within the LLM regarding the training dynamics of the neural network; This represents historical experimental observation data accumulated during the exploration phase; This represents the refined search space generated after LLM inference; Indication in the initial coarse search space All possible subsets In the given information, we search for the subset that maximizes the posterior probability.

[0103] Addressing the game-theoretic relationship between data fitting terms and physical constraints, a typical feature of PINN training, LLM is introduced into the search interval using normalized regularization coefficients. Treating the training objective as an optimization process on a multi-objective Pareto front, LLM identifies failure regions through its powerful semantic context reasoning, thereby locking in the effective equilibrium interval. The calculation formula is expressed as follows:

[0104] (42) In the formula, Represents the effective physical equilibrium range. Balance coefficient representing the physical loss term; for The original domain; This indicates the exclusion of ill-conditioned regions where a single loss term dominates while another term is ignored. The optimization trajectory is constrained by applying the semantic prior of LLM, keeping it near the intersection of the data manifold and the physical manifold.

[0105] The LLM-guided spatial refinement process is mathematically formalized as a sensitivity-guided topological manifold reconstruction, such as... Figure 5As shown. First, LLM utilizes its pattern recognition capabilities to model the nonlinear response surface of the objective function. By analyzing historical trajectories, it quantifies the marginal sensitivity of each hyperparameter, thereby identifying and decoupling the key factors that dominate the model's convergence behavior. Based on this attribution analysis and the effective equilibrium interval determined in the physical-data collaboration, the original high-dimensional space is decomposed and reconstructed into a compact effective subspace. This process is achieved through hyperrectangular contraction based on sensitivity weights and manifold embedding based on physical architecture priors. The spatial refinement construction process is represented as follows:

[0106] (43) In the formula, The total dimension of the hyperparameters; This represents the structural manifold constraints induced by the prior knowledge inherent in the Transformer architecture; Indicates the first The effective domain of each dimension after eliminating inefficient intervals. This transformation not only alleviates the high-dimensional sparse sampling problem by significantly reducing the volume of the search space, but also strictly restricts the search process to physically valid and logically reasonable low-dimensional manifolds, ensuring the computational efficiency and theoretical feasibility of subsequent Bayesian optimization sampling.

[0107] 4.3 Prompt word engineering and semantic reasoning mechanism.

[0108] To translate the aforementioned search space reconstruction theory into an executable computational process, a standardized prompt word engineering framework was constructed. This framework is not a simple question-and-answer interaction, but a closed-loop feedback system designed based on the thought chain method. Its core lies in leveraging the powerful semantic understanding capabilities of LLMs to map unstructured training dynamic features into a structured hyperparameter space topology. To address the potential stochasticity challenge inherent in the generation process of large-scale language models (LLMs), the following technical strategies were implemented to ensure the reproducibility and transparency of the hyperparameter search space reconstruction:

[0109] (1) Parameter freezing: In all experimental steps, the sampling temperature of LLM was strictly set to T=0, and the kernel sampling parameter (Top-p) was set to 1.0. By eliminating the sampling randomness of the probability distribution, it was ensured that the model could output deterministic logical reasoning results under the same historical experimental data and prompt words.

[0110] (2) Standardized prompt word protocol: A set of versioned prompt word templates was constructed, including explicit role settings, dynamic context injection, and structured reasoning logic. This closed-loop feedback system guides the unstructured training state through the thought chain, mapping it to a structured hyperparameter topology, thus avoiding semantic drift in the LLM decision-making process.

[0111] (3) This invention uses a specific model version (such as Gemini 3.0-**) and records all interaction logs. Experiments show that by placing the LLM-driven logic inference layer in front of the TPE sampling engine, the optimizer can not only efficiently lock the physically consistent Pareto optimal solution, but also the refined search space it generates exhibits high robustness and consistency in multiple independent runs.

[0112] To address the multi-objective conflict problem unique to PINN training, the system prompts establish a dual role for both a physical information machine learning expert and a Bayesian optimization strategy manager. This design aims to activate the latent knowledge within LLM regarding nonlinear dynamical systems such as thermodynamic equations and deep learning training pathologies such as gradient anomalies. By establishing this expert tone, the model is forced to examine the optimization process from a physically consistent perspective rather than a purely data-fitting perspective, thereby avoiding the pseudo-local optimum trap that traditional optimizers are prone to fall into—physically invalid but with extremely low data error.

[0113] To enable LLM to accurately perceive the optimization state, a dynamic context injection mechanism is introduced. This mechanism is not limited to input scalar loss values, but instead encodes high-dimensional training telemetry data into semantic descriptions, focusing on three dimensions: physical constraint states, Pareto conflict features, and convergence trend semantics.

[0114] (1) Physical constraint state: The weight hyperparameters describing the current physical loss ( (and the corresponding degree of physical violation).

[0115] (2) Pareto conflict characteristics: Introducing gradient norm ratio As a key indicator, LLM can identify gradient ill-conditioned situations where the gradient of a data item completely dominates the optimization direction.

[0116] (3) Convergence trend semantics: transform the numerical fluctuations of the Loss curve into qualitative descriptions such as rapid decline, oscillation stagnation or tendency to zero, to help the model judge the rationality of the learning rate.

[0117] During the inference phase, LLM is constrained to follow a thought chain path that includes Pareto conflict diagnosis, physical validity pruning, and spatial reconstruction strategies. The model first analyzes whether the current state is underfitting, overfitting, or in a rigid local minimum state during the diagnosis phase. Then, based on physical intuition, it removes invalid parameter regions that prevent the physical loss function from converging effectively during the pruning phase. Finally, it outputs a clear suggested interval during the decision phase. This mechanism transforms LLM from a general text generator into a semantic optimization agent, dynamically adjusting the sampling boundaries of Bayesian optimization through logical reasoning, achieving a dual improvement in computational efficiency and physical interpretability.

[0118] 5. Experiment.

[0119] 5.1 Dataset.

[0120] To overcome the sample bias and overfitting risks that may arise from a single dataset, three heterogeneous energy datasets with significant differences (household appliance energy consumption dataset, wind power generation dataset, and solar power generation dataset) were selected for empirical testing to comprehensively evaluate the effectiveness and generalization ability of the model.

[0121] 5.2 Experimental Content.

[0122] 5.2.1 Comparative experiment.

[0123] Given the differences in key variables and physical characteristics across datasets, the data processing methods and PINN constraints were adjusted accordingly. Optimal hyperparameters were automatically determined through a combination of LLM and Bayesian optimization. To evaluate performance, different methods were used for processing performance metrics for each dataset; for example, all variables in the household appliance energy consumption dataset were scaled to a [0,1] scale. Furthermore, the proposed model was compared with several state-of-the-art models used for energy prediction on different datasets.

[0124] 5.2.2 Ablation experiment.

[0125] To quantify the marginal contribution of each proposed module to the overall prediction performance, a stepwise ablation experiment was conducted. Hyperparameter optimization in this experiment was based on LLM and Bayesian optimization. The following five different model configurations were constructed:

[0126] Model M1 (Baseline Model Standard TFT): This configuration employs a standard temporal fusion Transformer architecture. It uses standard LSTM for sequence encoding and decoding and minimizes quantile loss. It serves as a purely data-driven baseline for evaluating the necessity of structural enhancements.

[0127] Model M2 (TFT+Mogrifier): In this variant, the standard LSTM components are replaced with a Mogrifier-LSTM. This module introduces an iterative gating mechanism that allows the input and hidden states to modulate each other before standard LSTM gating computation, theoretically enhancing the model's ability to capture complex nonlinear time dependencies.

[0128] Model M3 (TFT+Mogrifier+FECAM): Building upon Model M2, this configuration integrates the Frequency Enhancement Channel Attention Module (FECAM) into the variable selection network. FECAM combines channel and spatial attention mechanisms, utilizing frequency domain analysis and adaptive pooling to generate channel and spatial weights, thereby recalibrating features in multiple dimensions, explicitly filtering high-frequency noise, and emphasizing the dominant periodic components in the energy sequence.

[0129] Model M4 (TFT+Mogrifier+FECAM+Spectral Normalization): This configuration builds upon Model M3 by applying spectral normalization to the main weight matrices. This technique constrains the model's complexity by limiting the Lipschitz constant of each layer, aiming to improve training stability and smooth predicted outputs, laying the foundation for the introduction of physical constraints.

[0130] Model M5 (Full Hybrid Model PFMT): This model incorporates a physical information loss function. By introducing physical information loss to ensure physical plausibility, it transforms the model from a purely data-driven approach to a total loss function resulting from a weighted aggregation of the physical information loss function and the data loss function. This allows the model to make more accurate predictions while remaining within the framework of physical reality.

[0131] In addition, in hyperparameter optimization, two ablation experiments were designed based on the complete architecture (PFMT). One set used only standard Bayesian optimization (TPE algorithm) for hyperparameter tuning without LLM guidance; while the other set was based on hyperparameter optimization combining LLM and Bayesian optimization.

[0132] 5.3 Evaluation Indicators.

[0133] To compare the performance of the PFMT model on energy forecasting systems with other contemporary state-of-the-art models and baseline models, root mean square error (RMSE), mean absolute error (MAE), and... R 2 RMSE is used as an evaluation metric. It measures the sample standard deviation of the difference between the predicted and actual values, and can be evaluated using the following formula:

[0134] ; In the formula, It is the total number of samples. It is the first The true value of each sample Model for the first The predicted value of each sample. RMSE amplifies the penalty for large errors by using squared errors. It assigns higher weights to larger errors and is therefore more sensitive to outliers. The smaller the RMSE value, the closer the model prediction is to the actual value.

[0135] MAE measures the average of the absolute differences between all individual predicted values ​​and the true values, directly reflecting the average magnitude of the prediction error. MAE is insensitive to outliers; a single extreme outlier will not have a significant impact on the total error. A smaller MAE value indicates better model performance. The RMSE value is calculated using the following formula:

[0136] ; R 2 It measures the relative goodness of a model's fit to the data. In complex nonlinear models, R 2 It still strongly reflects the closeness of the fit between the predicted trend and the actual trend. R 2 The closer the value is to 1, the better the model fits the data, and the better the prediction results.

[0137] ; ; In the formula, It is the average of all true values.

[0138] 5.4 Experimental Results.

[0139] 5.4.1 Comparative experimental analysis.

[0140] Table 1 details the precise performance metrics for all datasets and comparison models.

[0141] Table 1. Performance comparison of the PFMT model with other models under different energy scenarios. Specifically, in the performance evaluation of the home appliance energy consumption dataset, the PFMT model demonstrated a comprehensive accuracy advantage compared to other methods. Compared to the CNN-TFT model, the PFMT method successfully further narrowed the prediction error, significantly reducing RMSE and MAE by 31.39% and 41.10%, respectively, while increasing the coefficient of determination R² from 0.9535 to 0.9809, demonstrating its superior ability to capture complex nonlinear features. Compared to the VMD-Informer model, which incorporates a decomposition strategy, PFMT also maintained a significant lead, not only reducing RMSE and MAE by 53.31% and 44.87%, respectively, but also achieving a significant leap in goodness of fit from 0.9542 to 0.9809. Furthermore, even for the more advanced TKAT model

[41] , PFMT still established a clear upper bound on performance, optimizing RMSE and MAE by 9.62% and 28.03% respectively, and further increasing the R² score, which strongly demonstrates the synergistic gain effect of physical reinforcement backbone network and cognitive optimization mechanism in refined load forecasting.

[0142] For performance evaluation of wind power datasets, the PFMT model also established a comprehensive accuracy advantage compared to other methods. Compared to the classic CNN-TFT model, the PFMT method successfully further converged the prediction error, significantly reducing RMSE and MAE by 8.98% and 36.57%, respectively, while increasing the coefficient of determination R² from 96.93 to 97.62, demonstrating its superior ability to capture the uncertainty fluctuations of wind power. Compared to the deep decomposition model VMD-Informer, PFMT maintained a significant leading position, not only reducing RMSE and MAE by 16.05% and 38.81%, respectively, but also achieving steady improvement in goodness of fit.

[0143] Focusing on evaluations of solar power datasets, the PFMT model once again outperformed all benchmarks thanks to its robust generalization ability. Performance against the CNN-TFT framework showed that PFMT effectively curbed prediction bias, reducing RMSE and MAE by 13.18% and 17.16% respectively, and stabilizing the R² score at a high level of 98.87. This performance gap was particularly pronounced when compared to the EDM-Informer model; PFMT not only achieved an RMSE reduction of 18.96% and a MAE improvement of 31.74%, but also established a significant advantage in fitting accuracy.

[0144] Furthermore, even when facing the VMD-Informer method that integrates decomposition algorithms, this invention still demonstrates irreplaceable superiority in absolute error control, successfully reducing RMSE and MAE by 4.37% and 28.05% respectively, fully demonstrating the core value of the physical sensing architecture in dealing with the diurnal intermittent characteristics of photovoltaic sequences.

[0145] 5.4.2 Ablation experiment analysis.

[0146] The stepwise ablation experiments conducted on three datasets clearly verified the incremental contribution and collaborative mechanism of key components in the PFMT architecture. The specific quantitative results are detailed in Table 2.

[0147] Table 2 Ablation analysis of the effectiveness of each improved module of the PFMT model First, the evolution from standard TFT to M2 establishes a significant performance benchmark improvement across all datasets. This leap is essentially achieved by overcoming the dynamic adaptation challenge between transient abrupt changes and historical inertia patterns prevalent in energy time-series data. For non-stationary fluctuations caused by severe meteorological factors, traditional recurrent networks often exhibit a lag in response to sudden extreme values ​​due to the static input-state interaction mechanism. M2 utilizes the Mogrifier mechanism to iteratively reconstruct the input space and hidden state space through intermodulation, breaking the inductive bias of historical context in perceiving current sudden energy characteristics in traditional architectures. By forcing multiple rounds of nonlinear interaction before time-step updates, this mechanism significantly improves the dynamic adaptation between instantaneous power fluctuations and long-term historical memory, solving the dynamic bottleneck of traditional architectures' inability to sensitively capture non-stationary transient energy fluctuations.

[0148] The FECAM module integration strategy, which evolved to the M3 stage, aims to overcome the deep-seated problem of the difficulty in decoupling periodic patterns and sudden disturbances in energy time-series data within the time-frequency mixed domain. Addressing the ease with which high-frequency components in non-stationary sequences can be smoothed, this mechanism explicitly injects frequency-domain prior information, effectively mitigating the inherent spectral bias limitations of deep neural networks. This allows them to overcome over-reliance on low-frequency trends and accurately capture high-frequency fluctuations, thereby driving a significant convergence of the RMSE metric. However, the accompanying slight pullback in MAE and R2 scores profoundly reveals the interplay between high-dimensional feature representation and the endogenous randomness of energy data. While significantly improving the model's fidelity to high-frequency details, inherent acquisition noise and minute jitter in the data are simultaneously amplified. The surge in gradient variance disrupts the smoothness of the loss surface, causing the optimizer to fall into a local oscillation dilemma from which it cannot escape during refined parameter optimization.

[0149] To address the persistent optimization instability caused by the surge in feature sensitivity, leading to overfitting of models to endogenous random noise and outliers in energy data, M4 specifically integrates a spectral normalization mechanism. This module imposes a global smoothing constraint on the propagation of high-dimensional frequency domain features by strictly constraining the Lipschitz constant of the weight matrix. Experimental results show that M4 successfully reversed the performance decline of M3 and reversed the pullback in MAE and R2, strongly demonstrating that when processing noisy energy time-series data, global constraints on gradients are a prerequisite for ensuring a balance between releasing the potential of high-dimensional frequency domain features and maintaining robustness to random perturbations.

[0150] Finally, addressing the fundamental flaw of purely data-driven models in fitting high-entropy energy data, which easily falls into spurious correlations and generates predictions that violate the law of energy conservation, M5 deeply couples the PINN constraint mechanism on the robust foundation of M4. At this stage, the physical loss transcends the auxiliary role of the traditional regularization term, instead playing a crucial manifold guiding function, forcibly correcting the optimization trajectory that originally diverged in the unconstrained space to a feasible region that conforms to power balance and physical conservation.

[0151] Based on the same inventive concept, embodiments of the present invention provide an energy forecasting system based on a time-series fusion forecasting model, the system comprising: The data acquisition module is used to acquire multi-source time-series data of the energy system to be predicted. The multi-source time-series data includes: historical observation variables that characterize the operating status of the energy system to be predicted, historical target variables that characterize the load of the energy system to be predicted, and time feature variables that characterize the time environment information of the corresponding prediction time step.

[0152] The first screening module dynamically weights and filters historical observed variables and historical target variables to identify key driving variables with dynamic impacts on system load, resulting in the first weighted feature. This first weighted feature is then used for bidirectional time-series modeling to capture the multi-scale time-series dependence of transient fluctuations and long-term trends in the energy sequence, yielding multi-scale time-series features. Attention weighting is then applied to these multi-scale time-series features for frequency domain recalibration in both channel and time dimensions, resulting in refined frequency-series features. Finally, a nonlinear transformation is performed on these refined frequency-series features to obtain the encoder output features.

[0153] The second filtering module dynamically weights and filters time-related variables to identify key variables that dynamically contribute to energy prediction, resulting in a second weighted feature. This second weighted feature is then used for unidirectional time-series modeling to capture the causal temporal dependence of historical states on future outputs in the energy sequence, yielding the decoder's hidden features.

[0154] The dynamic fusion module performs multi-head attention weighted aggregation using decoder hidden features as queries and encoder output features as values ​​to obtain context features. A non-linear transformation is then applied to the context features and decoder hidden features to dynamically fuse historical context features with current decoding information, resulting in the decoder output features.

[0155] The prediction module is used to predict the output features of the decoder and obtain the energy prediction result by means of quantile prediction.

[0156] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.

Claims

1. An energy forecasting method based on a time-series fusion forecasting model, characterized in that, include: Acquire multi-source time-series data of the energy system to be predicted. The multi-source time-series data includes: historical observation variables that characterize the operating status of the energy system to be predicted, historical target variables that characterize the load of the energy system to be predicted, and time feature variables that characterize the time environment information of the corresponding prediction time step. The historical observed variables and historical target variables are dynamically weighted and screened to identify key driving variables that have a dynamic impact on system load, resulting in the first weighted feature. The first weighted feature is then subjected to bidirectional time-series modeling to capture the multi-scale time-series dependence of transient fluctuations and long-term trends in the energy sequence, resulting in multi-scale time-series features. Attention weighting is applied to the multi-scale time-series features to perform frequency domain recalibration in both channel and time dimensions, resulting in refined frequency-domain features. Finally, the refined frequency-domain features undergo a nonlinear transformation to obtain the encoder output features. The time-feature variables are dynamically weighted and filtered to select key variables that have a dynamic contribution to energy prediction, resulting in a second weighted feature. The second weighted feature is then modeled unidirectionally to capture the causal temporal dependence of historical states on future outputs in the energy sequence, resulting in the decoder hidden features. Using the decoder's hidden features as queries and the encoder's output features as values, multi-head attention weighted aggregation is performed to obtain context features; nonlinear transformation is applied to the context features and the decoder's hidden features to dynamically fuse historical context features with current decoding information to obtain decoder output features; The decoder output features are predicted, and the energy prediction result is obtained by quantile prediction.

2. The energy forecasting method based on a time-series fusion forecasting model as described in claim 1, characterized in that, Energy prediction results are obtained by using a pre-trained temporal fusion prediction model, which includes an encoder, a decoder, and an output layer connected in sequence. The encoder includes: a first variable selection network, a bidirectional long short-term memory network with a first Mogrifier mechanism, a frequency domain channel attention module, and a first gated residual network; The decoder includes: a second variable selection network, a multi-head attention mechanism, a unidirectional long short-term memory network with a second Mogrifier mechanism, and a second gated residual network; both the first gated residual network and the second gated residual network incorporate a spectral normalization mechanism. Specifically, the first Mogrifier mechanism performs multiple rounds of mutual modulation before the first weighted feature enters the bidirectional long short-term memory network, and the second Mogrifier mechanism performs multiple rounds of mutual modulation before the second weighted feature enters the unidirectional long short-term memory network.

3. The energy forecasting method based on a time-series fusion forecasting model as described in claim 2, characterized in that, The process involves multiple rounds of mutual modulation of the first weighted feature before it enters the bidirectional long short-term memory network (LSTM) via the first Mogrifier mechanism, followed by bidirectional temporal modeling of the modulated first weighted feature using the bidirectional LSTM network to obtain multi-scale temporal features. Specifically, this includes: The first Mogrifier mechanism includes: a first linear transformation layer and a second linear transformation layer; The hidden state of the previous time step is transformed by the first linear transformation layer and activated by the Sigmoid function to obtain the first modulation signal. The first modulation signal is multiplied element-wise with the first weighted feature to obtain the modulated first input. The modulated first input is transformed by the second linear transformation layer and activated by the Sigmoid function to obtain the second modulation signal. The second modulation signal is multiplied element-wise with the hidden state of the current time step to obtain the modulated first hidden state. The bidirectional long short-term memory network includes: a forward long short-term memory network and a backward long short-term memory network; Forward temporal modeling of the modulated first input and the modulated first hidden state is performed using a forward long short-term memory network to capture the multi-scale dependencies in the forward time dimension of the energy sequence, thus obtaining the forward hidden state at the current time step. Inverse temporal modeling of the modulated first input and the modulated first hidden state is performed using a reverse long short-term memory network to capture the multi-scale dependencies in the reverse time dimension of the energy sequence, thus obtaining the reverse hidden state at the current time step. The forward hidden state and the reverse hidden state are then concatenated dimensionally to obtain multi-scale temporal features.

4. The energy forecasting method based on a time-series fusion forecasting model as described in claim 2, characterized in that, The process involves multiple rounds of mutual modulation of the second weighted feature before it enters the unidirectional long short-term memory network via the second Mogrifier mechanism, followed by unidirectional temporal modeling of the modulated second weighted feature using the unidirectional long short-term memory network to obtain the decoder hidden features. Specifically, this includes: The second Mogrifier mechanism includes: a third linear transformation layer and a fourth linear transformation layer; The hidden state of the previous time step is transformed by the third linear transformation layer and activated by the Sigmoid function to obtain the third modulation signal; the third modulation signal is multiplied element-wise with the second weighted feature to obtain the modulated second input; the modulated second input is transformed by the second linear transformation layer and activated by the Sigmoid function to obtain the second modulation signal; the second modulation signal is multiplied element-wise with the hidden state of the current time step to obtain the modulated second hidden state; By using a unidirectional long short-term memory network to perform temporal modeling on the modulated second input and the modulated second hidden state, the causal transmission mechanism of energy history state to future load is modeled, and the hidden features of the decoder are obtained.

5. The energy forecasting method based on a time-series fusion forecasting model as described in claim 2, characterized in that, Training the time-series fusion prediction model specifically includes: Acquire historical time-series data of the energy system and the corresponding actual values ​​of the historical time-series data; Historical time-series data of the energy system are input into the time-series fusion prediction model to obtain energy prediction values; The quantile loss between the predicted and actual energy values ​​is used as the data loss term. The residuals are constructed based on the physical control equations of the energy system, and the mean square error of the residuals is used as the physical loss term. The data loss term and the physical loss term are then weighted and summed to obtain the hybrid loss function. The hyperparameters of a time-series fusion prediction model are optimized using a Bayesian optimization framework guided by a large language model (LLM). The physical constraint state, the gradient norm ratio between data loss and physical loss, and the trend of the loss curve are injected into the large language model during the optimization process. The large language model then uses thought chain reasoning to diagnose the game state between data fitting and physical consistency, resulting in a refined hyperparameter search space. Within this refined search space, a tree-structured Parzen estimator is used for Bayesian optimization to obtain the optimal hyperparameter configuration. Based on the optimal hyperparameter configuration and the hybrid loss function, the model parameters of the time series fusion prediction model are updated through backpropagation to obtain the trained time series fusion prediction model.

6. The energy forecasting method based on a time-series fusion forecasting model as described in claim 5, characterized in that, The physical loss term is constructed according to the type of energy system, and specifically includes: When the energy system is a household appliance energy consumption system, the residuals of the temperature change rate and heat flow term are constructed based on the thermodynamic conduction and energy conservation equations. When the energy system is a wind power generation system, static boundary constraint loss is constructed based on mechanical inertia constraints, and dynamic constraint loss between the rate of change of wind speed and the rate of change of power is constructed based on the transport partial differential equation. When the energy system is a solar power generation system, a dynamic constraint loss on the rate of power change driven by the rate of change of irradiance and the rate of change of temperature is constructed based on the total differential theorem.

7. The energy forecasting method based on a time-series fusion forecasting model as described in claim 1, characterized in that, The dynamic weighted screening of historical observed variables and historical target variables to identify key driving variables with dynamic impact on system load, resulting in the first weighted feature, specifically includes: Flatten all historical observation variables and historical target variables at each time step into a vector to obtain the first input vector; For each variable in the first input vector, a nonlinear transformation is performed on the variable through its dedicated gated residual network to extract nonlinear features that are dynamically related to the system load, thereby obtaining the nonlinear feature representation corresponding to the variable; a shared gated residual network is used to perform feature aggregation and weight generation on the first input vector and the nonlinear feature representation to dynamically evaluate the contribution of each variable to the energy load, thereby obtaining the adaptive attention weight corresponding to the variable. The first weighted feature is obtained by summing the weighted sums of each variable and its corresponding adaptive attention weights. The dynamic weighted screening of time-related variables to identify key variables that dynamically contribute to energy forecasting, resulting in a second weighted feature, specifically includes: Flatten the time feature variables of each time step into a vector to obtain the second input vector; For each time feature variable in the second input vector, a nonlinear transformation is performed on the variable through its dedicated gated residual network to extract future variable features related to energy prediction, thereby obtaining the nonlinear feature representation corresponding to the variable; feature aggregation and weight generation are performed on the first input vector and the nonlinear feature representation through a shared gated residual network to dynamically evaluate the importance of each time feature variable to energy prediction, thereby obtaining the adaptive attention weight corresponding to the time feature variable. The second weighted feature is obtained by summing the time-specific feature variables and their corresponding adaptive attention weights.

8. The energy forecasting method based on a time-series fusion forecasting model as described in claim 2, characterized in that, The frequency domain channel attention module performs attention weighting on multi-scale temporal features to recalibrate the channel and time dimensions of the multi-scale temporal features in the frequency domain, resulting in refined frequency domain features. Specifically, this includes: The frequency domain channel attention module includes: a channel attention module and a time attention module; Based on the following formula, multi-scale temporal features are weighted by channel attention using a channel attention module to obtain a channel attention-weighted feature map: ; ; in, This represents the calculated channel attention weights. Indicates the input feature map, Indicates the channel reduction rate. This represents the feature map after channel attention weighting. It is the Sigmoid activation function. Represents the number of characteristic channels; Based on the following formula, the channel-attention-weighted feature map is subjected to temporal attention weighting using a temporal attention module to obtain refined features in the frequency domain: ; ; in, This represents the calculated temporal attention weights. This represents the refined features in the frequency domain.

9. The energy forecasting method based on a time-series fusion forecasting model as described in claim 2, characterized in that, The output layer predicts the decoder output features to obtain energy prediction results using a quantile prediction method, specifically including: The output layer employs a quantile regression mechanism to map the decoder output features, thereby constructing the uncertainty distribution boundary of the energy prediction results and obtaining a probabilistic prediction tensor containing multiple preset quantiles. The tensor slice corresponding to the median of the probabilistic prediction tensor is then subjected to inverse normalization to obtain the energy prediction results.

10. An energy forecasting system based on a time-series fusion forecasting model, characterized in that, include: The data acquisition module is used to acquire multi-source time-series data of the energy system to be predicted. The multi-source time-series data includes: historical observation variables that characterize the operating status of the energy system to be predicted, historical target variables that characterize the load of the energy system to be predicted, and time feature variables that characterize the time environment information of the corresponding prediction time step. The first screening module dynamically weights and filters historical observed variables and historical target variables to identify key driving variables that have a dynamic impact on system load, resulting in the first weighted feature. It then performs bidirectional time-series modeling on the first weighted feature to capture the multi-scale time-series dependence of transient fluctuations and long-term trends in the energy sequence, resulting in multi-scale time-series features. Attention weighting is applied to the multi-scale time-series features to perform frequency domain recalibration in both channel and time dimensions, resulting in refined frequency-domain features. Finally, a nonlinear transformation is performed on the refined frequency-domain features to obtain the encoder output features. The second filtering module is used to dynamically weight and filter time feature variables to select key variables that have a dynamic contribution to energy prediction, thereby obtaining the second weighted feature; and to perform unidirectional time series modeling on the second weighted feature to capture the causal time series dependence of historical states on future outputs in the energy sequence, thereby obtaining the decoder hidden feature. The dynamic fusion module is used to perform multi-head attention weighted aggregation with the decoder hidden features as the query and the encoder output features as the value to obtain context features; and to perform nonlinear transformation on the context features and decoder hidden features to dynamically fuse historical context features and current decoding information to obtain decoder output features. The prediction module is used to predict the output features of the decoder and obtain the energy prediction result by means of quantile prediction.