Method, device, storage medium and program product for multivariate load forecasting
By using a multi-load forecasting network model and leveraging the cross-attention mechanism to focus on the correlation characteristics between multi-loads and influencing factors, the accuracy problem of multi-load forecasting in integrated energy systems is solved, achieving higher-precision load forecasting and energy dispatching.
Patent Information
- Application Number
- CN202510251192.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2045-03-04
AI Technical Summary
In existing technologies, the accuracy of multi-load forecasting in integrated energy systems is poor, failing to fully consider the coupling relationships between multi-loads and the dynamic correlation characteristics of influencing factors.
A multivariate load prediction network model is adopted. By obtaining the historical load sequence and influencing factor sequence of each multivariate load, the cross-attention mechanism is used to focus the strong correlation features between multivariate loads and influencing factors in the encoder, and independent prediction is performed in the decoder to obtain accurate prediction results for each load.
It improves the accuracy of multi-variable load forecasting, enables rational energy scheduling, enhances the model's predictive performance and scenario adaptability, and saves data processing and computing resources.
Smart Images

Figure CN120067995B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of energy systems, and more particularly to a multi-source load forecasting method, device, storage medium, and program product. Background Technology
[0002] Integrated Energy Systems (IES) efficiently integrate and flexibly dispatch multiple energy forms such as electricity, heat, cooling, and gas. Through various technologies including equipment planning and configuration, optimized system operation, energy storage and renewable energy applications, and carbon capture and utilization, IES promotes carbon neutrality in multi-energy parks. Compared to traditional energy systems, IES places greater emphasis on multi-energy complementarity, synergy, and intelligent management, making it a crucial solution for addressing growing energy demand, improving energy efficiency, and reducing carbon emissions. Load forecasting technology is a fundamental aspect of the scientific planning and efficient operation of IES, closely related to scenarios such as real-time energy dispatch management and demand response management.
[0003] In related technologies, using independent load forecasting models to forecast various energy loads separately results in poor load forecasting accuracy. Summary of the Invention
[0004] This application provides a method, device, storage medium, and program product for predicting multiple loads, so as to achieve the effect of accurately predicting multiple loads by fully considering the coupling relationship between multiple loads and influencing factors.
[0005] In a first aspect, embodiments of this application provide a multivariate load forecasting method, including:
[0006] Obtain the load sequence data within the most recent historical period corresponding to each element load and the influencing factor sequence data within the most recent historical period corresponding to the multi-element load. The multi-element load includes electrical load, heat load and cooling load.
[0007] The load sequence data and influencing factor sequence data corresponding to each load are spliced together to obtain the composite sequence data.
[0008] The load sequence data of each load and the composite sequence data are input into the encoder of the multivariate load prediction network model. In the encoder, based on the cross-attention mechanism, the strong correlation features between the multivariate loads and influencing factors are focused on according to the load sequence data of each load and the composite sequence data, and the fusion features are extracted.
[0009] Based on the fusion characteristics, the decoder of the multivariate load forecasting network model performs independent forecasting of multivariate loads, and obtains the load forecasting results corresponding to each load.
[0010] In one possible implementation, the encoder includes a first temporal feature extraction layer, a second temporal feature extraction layer, a feature focusing layer, a feature concatenation layer, and a first feature mapping layer, wherein:
[0011] The first time-series feature extraction layer is used to extract the time-series features of the corresponding load sequence data to obtain the load time-series features of the corresponding load.
[0012] The second temporal feature extraction layer is used to extract the temporal features of the comprehensive sequence data to obtain the comprehensive temporal features.
[0013] The feature focusing layer is used to focus on the strong correlation features between multiple loads and influencing factors based on the cross-attention mechanism and the load time series features and the comprehensive time series features.
[0014] The feature splicing layer is used to splice load time-series features and strongly correlated features to obtain spliced time-series features.
[0015] The first feature mapping layer is used to perform nonlinear mapping of the feature temporal distribution on the spliced temporal features to obtain fused features.
[0016] In one possible implementation, the feature focusing layer is specifically used for:
[0017] The time-series characteristics of each load are concatenated to obtain multi-dimensional load time-series characteristics;
[0018] In the cross-attention mechanism calculation, the correlation feature weights between each load and the target load are determined based on the multivariate load time series characteristics and the comprehensive time series characteristics. The correlation feature weights are scaled by a dot product to prevent them from entering the gradient saturation region of the normalization function. The dot product scaled weights are then nonlinearly mapped by the normalization function. The nonlinearly mapped weights are multiplied by the comprehensive time series characteristics to focus on the strong correlation features between the multivariate loads and influencing factors.
[0019] In one possible implementation, based on the fusion characteristics, the decoder of the multivariate load forecasting network model performs independent forecasting of the multivariate loads to obtain load forecasting results corresponding to each load, including:
[0020] The final hidden state and fused features of the first time-series feature extraction layer when extracting time-series features for each load are input into the decoder of the multi-load prediction network model to perform independent prediction of multi-loads, and obtain the load prediction results corresponding to each load.
[0021] In one possible implementation, the decoder includes a temporal prediction layer corresponding to the payload and a second feature mapping layer, wherein:
[0022] The time-series prediction layer is used to take the final hidden state when extracting time-series features of the corresponding load as the initial state information, and perform load prediction based on the fused features to obtain the load prediction data of the corresponding load.
[0023] The second feature mapping layer is used to perform nonlinear feature mapping on the characteristic time series distribution of the load forecast data to obtain the load forecast results for the corresponding load.
[0024] In one possible implementation, the first temporal feature extraction layer, the second temporal feature extraction layer, and the temporal prediction layer are all based on GRU.
[0025] In one possible implementation, the loss function for training the multivariate load prediction network model reflects the prediction loss of electrical load, the prediction loss of thermal load, and the prediction loss of cooling load.
[0026] Secondly, embodiments of this application provide a multi-source load forecasting device, comprising:
[0027] The acquisition module is used to acquire the load sequence data within the most recent historical period corresponding to each element load and the influencing factor sequence data within the most recent historical period corresponding to the element load. The element load includes electrical load, heat load and cooling load.
[0028] The splicing module is used to perform feature splicing on the load sequence data and the influencing factor sequence data corresponding to each load to obtain comprehensive sequence data.
[0029] The fusion feature extraction module is used to input the load sequence data of each load and the comprehensive sequence data into the encoder of the multivariate load prediction network model. In the encoder, based on the cross attention mechanism, the module focuses on the strong correlation features between the multivariate loads and influencing factors according to the load sequence data of each load and the comprehensive sequence data, and extracts the fusion features.
[0030] The prediction module is used to perform independent prediction of multiple loads based on the fusion features through the decoder of the multi-load prediction network model, so as to obtain the load prediction results corresponding to each load.
[0031] Thirdly, embodiments of this application provide a multi-source load forecasting device, including: a memory and a processor;
[0032] The memory stores computer-executed instructions;
[0033] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0034] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0035] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0036] The multi-load forecasting method, device, storage medium, and program product provided in this application obtain the load sequence and influencing factor sequence of each multi-load within the most recent historical time period. A multi-load forecasting network model is used to forecast the multi-load. The load sequence data is used as one input for the multi-load, and the load sequence and influencing factor sequence are concatenated as another input. This approach obtains both the correlation characteristics between the multi-load and influencing factors and focuses on the characteristics of the multi-load. In the encoder of the multi-load forecasting network, a cross-attention mechanism is used to focus on the strong correlation characteristics between the multi-load and influencing factors, obtaining fused characteristics. The decoder independently forecasts the multi-load based on the fused characteristics, obtaining the forecast results for each load. This achieves a comprehensive consideration of the coupling relationship between each load and influencing factor, enabling accurate forecasting of each load. This, in turn, allows for the rational scheduling of energy in an integrated energy system. Attached Figure Description
[0037] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0038] Figure 1 A flowchart illustrating the multivariate load forecasting method provided in the embodiments of this application;
[0039] Figure 2 A schematic diagram of the encoder structure in the multivariate load prediction network model provided in this application;
[0040] Figure 3 A schematic diagram of the decoder structure in the multivariate load forecasting network model provided in this application;
[0041] Figure 4 A schematic diagram of the multi-element load forecasting device provided in this application;
[0042] Figure 5 A schematic diagram of the structure of the multi-element load forecasting device provided in this application.
[0043] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0044] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0045] Energy load forecasting technology is a crucial foundational topic for the scientific planning and efficient operation of Energy Systems (IES), closely related to scenarios such as real-time energy dispatch management and demand response management. IES energy load forecasting primarily encompasses three methods: simulation-based solutions, statistical methods, and artificial intelligence (AI) methods. Among these, AI methods, with their powerful nonlinear fitting capabilities, automatic feature extraction capabilities, scenario generalization capabilities, and high-efficiency real-time computing performance, have been widely applied in fields such as finance, autonomous driving, and speech signal processing, becoming a technological trend driving the intelligent development of future industries. AI technology has also played a significant role in load forecasting.
[0046] In related technologies, artificial intelligence-based multivariate load forecasting methods typically establish multiple models for electrical load, thermal load, and cooling load in terms of multivariate load forecasting strategies. Regarding the design framework of the forecasting models, feature engineering techniques are usually used to extract time-series feature information, followed by machine learning methods such as Support Vector Machine (SVM), or ensemble learning methods such as Extreme Gradient Boosting (XGBoost), Light Gradient Boosting Machine (LightGBM), or deep learning models such as Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) for predictive modeling. Ensemble learning or hybrid models are then used to improve the model's predictive performance.
[0047] With the development of multi-energy complementarity and coordinated control technologies in IES systems, the strong coupling correlation between multi-energy loads is becoming increasingly significant, and the relationships between various variables are dynamically changing with different scenarios. However, the existing load forecasting methods have the following limitations: the training processes of each model are independent, and the coupling characteristics of multi-energy complementarity are not fully modeled; the correlation between multi-energy loads and meteorological and user behavior data has dynamic event characteristics, and these dynamic correlation characteristics are not effectively captured. These limitations significantly affect the accuracy and lead time of IES systems in ultra-short-term load forecasting.
[0048] To address this issue, this application provides a multi-dimensional load forecasting method. By acquiring the load sequence and influencing factor sequence of each multi-dimensional load within the most recent historical timeframe, a multi-dimensional load forecasting network model is used to forecast the multi-dimensional load. The load sequence data is used as one input for the multi-dimensional load, and the load sequence and influencing factor sequence are concatenated as another input. This approach obtains both the correlation characteristics between the pre-influencing factors of the multi-dimensional load and focuses on the characteristics of the multi-dimensional load itself. In the encoder of the multi-dimensional load forecasting network, a cross-attention mechanism is used to focus on the strong correlation characteristics between the multi-dimensional load and influencing factors, obtaining fused characteristics. The decoder independently forecasts the multi-dimensional load based on these fused characteristics, obtaining the forecast results for each load. This method fully considers the coupling relationship between each load and influencing factor, accurately forecasting each load and thus enabling the rational scheduling of energy in a comprehensive energy system.
[0049] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0050] The multivariate load forecasting method provided in this application can be applied in IES and run on devices such as processors with data processing capabilities. Figure 1 This is a flowchart illustrating the multivariate load forecasting method provided in the embodiments of this application, as shown below. Figure 1 As shown, the multivariate load forecasting method provided in this application includes the following process:
[0051] S101. Obtain the load sequence data within the most recent historical period corresponding to each element load and the influencing factor sequence data within the most recent historical period corresponding to the multi-element load. The multi-element load includes electrical load, heat load and cooling load.
[0052] In some implementations, in addition to the supply of electricity, heat, and cold energy, the IES can also supply and dispatch energy sources such as natural gas, hydrogen, renewable energy, and biomass energy. Therefore, the multi-source load forecasting method provided in this application can also forecast the loads of the aforementioned energy sources such as natural gas, hydrogen, renewable energy, and biomass energy. Specifically, load sequence data and influencing factor sequence data for the most recent historical period of the aforementioned energy sources are collected respectively, and the load of the aforementioned energy sources is predicted based on the load sequence data and influencing factor sequence.
[0053] In this context, influencing factors refer to factors that affect various energy loads, such as climate factors and user behavior. It is understandable that there are coupled relationships between different energy loads within an Energy Equivalent System (IES). For example, in one possible scenario, a higher heat load typically leads to a lower cooling load. Furthermore, energy loads are also affected by other factors; for instance, in some scenarios, when climate data indicates a decrease in temperature, the heat load in the IES usually increases. Therefore, this application collects energy load data over a historical period to obtain load sequence data, and simultaneously collects influencing factor data over the same period to obtain influencing factor sequence data. This allows for a comprehensive consideration of the relationships between different energy loads and influencing factors, enabling accurate prediction of multi-dimensional loads.
[0054] In some implementations, influencing factors need to be screened through correlation analysis to obtain data on influencing factors that are truly relevant to each load.
[0055] Optionally, load sequence data and influencing factor sequence data can be obtained through the following methods: acquiring cooling, heating, and power load, meteorological, and user behavior data from various sources (such as databases, APIs, and files) and initially integrating them; removing invalid or redundant information from the original dataset through data cleaning and transformation; resampling signals with different sampling rates through data transformation; analyzing data distribution and correlation through exploratory data analysis (EDA) and feature engineering operations, and screening highly correlated variables; and performing normalization operations after dataset partitioning to avoid the impact of dimensional differences between different features on model training, while also preventing data leakage.
[0056] S102. The load sequence data and influencing factor sequence data corresponding to each load are spliced together to obtain the comprehensive sequence data.
[0057] For example, suppose we want to predict the electrical load, heat load, and cooling load in an IES, and the collected electrical load sequence data is as follows: The heat load sequence data is The cooling load sequence data is Meteorological data series are meteorological data User behavior data sequence is The combined sequence data is .
[0058] S103. Input the load sequence data and composite sequence data of each load into the encoder of the multivariate load prediction network model. In the encoder, based on the cross-attention mechanism, focus on the strong correlation features between multivariate loads and influencing factors according to the load sequence data and composite sequence data of each load, and extract the fusion features.
[0059] The multivariate load prediction network is a neural network-based model used to predict multivariate loads. It consists of an encoder and a decoder. In the encoder, features are extracted from the model's input data, and a cross-attention mechanism is used to focus and fuse the input data to obtain strong correlation features between multivariate loads and influencing factors. Furthermore, features relevant to the prediction target are focused from these strong correlation features, resulting in a fused feature that reflects both the correlation between multivariate loads and influencing factors and highlights the multivariate load characteristics.
[0060] Cross-attention is an improvement on self-attention, but with a key difference: in self-attention, the query matrix, key matrix, and value matrix all come from the same input sequence; while in cross-attention, the query matrix and key / value matrices come from different input sequences, while the key matrix and value matrix come from the same input sequence. This allows cross-attention to establish associations between different inputs and capture their interactions.
[0061] The computational process of the cross-attention mechanism can be divided into the following steps: First, calculate the similarity between the query matrix and all key matrices. This is usually achieved by calculating the inner product of the query matrix and the key matrix, and then dividing the inner product result by a scaling factor (usually the square root of the dimension of the query matrix or key matrix vector) to reduce the numerical range. Next, normalize the similarity, usually using the softmax function, to ensure that all weight values are between 0 and 1 and their sum equals 1, thus obtaining the attention weights. Finally, perform a weighted average of the attention weights and the value matrix to obtain the final output. This can be seen as a context-dependent summary of the value matrix, where the attention weights determine the contribution of each value. In this embodiment, the encoder first extracts features from the load sequence data and the composite sequence data, using the features of the load sequence data as the query matrix and the features of the composite sequence data as the key matrix and value matrix, ultimately obtaining the fused features.
[0062] S104. Based on the fusion characteristics, the multi-load forecasting network model's decoder performs independent forecasting of multi-loads, obtaining the load forecasting results corresponding to each load.
[0063] In one implementation, multiple independent prediction networks are used in the decoder section to independently predict each load using fused features as input, thereby obtaining load prediction results for each load, such as the values of electrical load, thermal load, and cooling load.
[0064] The multivariate load forecasting method provided in this application fully collects load sequence data within the most recent historical time period and the sequence data of influencing factors corresponding to the multivariate load within the most recent historical time period. Using a multivariate load forecasting network model, the encoder focuses and fuses the features of the multivariate load with the features of the comprehensive data through a cross-attention mechanism, resulting in a fused feature that reflects both the relationship between the multivariate load and the influencing factors and highlights the features of the multivariate load. The decoder then forecasts the multivariate load based on the fused feature, avoiding the problem of inaccurate forecasting caused by not considering the correlation between multivariate loads and / or the correlation between multivariate load and influencing factors, thus improving the forecasting accuracy of the multivariate load.
[0065] In one possible implementation, the encoder structure of the multivariate load forecasting network model is as follows: Figure 2 As shown, the encoder includes a first temporal feature extraction layer, a second temporal feature extraction layer, a feature focusing layer, a feature concatenation layer, and a first feature mapping layer. Specifically: the first temporal feature extraction layer extracts the temporal features of the corresponding load sequence data to obtain the corresponding load temporal features; the second temporal feature extraction layer extracts the temporal features of the comprehensive sequence data to obtain comprehensive temporal features; the feature focusing layer, based on a cross-attention mechanism, focuses on the strong correlation features between multiple loads and influencing factors according to the load temporal features and the comprehensive temporal features; the feature concatenation layer concatenates the load temporal features and the strong correlation features to obtain concatenated temporal features; and the first feature mapping layer performs a nonlinear mapping of the temporal distribution of the concatenated temporal features to obtain fused features.
[0066] like Figure 2 As shown, the encoder provided in this embodiment of the application has a dual-input channel structure. The first input channel is connected to the first time-series feature extraction layer and is used to input load sequence data corresponding to multiple loads, so as to enable the model to focus more on the inherent laws of the target variable. The second channel is connected to the second time-series feature extraction layer and is used to input comprehensive sequence data composed of load sequence data and influencing factor sequence data to capture the combined effect of other influencing factors.
[0067] The first and second temporal feature extraction layers are used to extract temporal features from the input sequence data. This can be achieved using models such as GRU, LSTM, and Transformer.
[0068] In the first time-series feature extraction layer, features are extracted from the load sequence data to obtain load time-series features. For example, the electrical load sequence data is... The heat load sequence data is The cooling load sequence data is The three load sequence data mentioned above are input into the first time-series feature extraction layer to obtain the electrical load time-series features. Heat load time sequence characteristics and the time-series characteristics of cooling load The second temporal feature extraction layer extracts features from the comprehensive sequence data to obtain comprehensive temporal features. , which serves as an input to the feature focusing layer.
[0069] In the feature focusing layer, multiple load time-series features and comprehensive time-series features are used. Using the cross-attention mechanism as input, we obtain strong correlation features that can reflect the relationship between multivariate loads and influencing factors, and highlight the characteristics of multivariate loads.
[0070] In the feature splicing layer, to enhance feature representation and integrate multivariate load time-series features and cross-variable correlation features, the strongly correlated features and multivariate load features that have been focused by cross attention are spliced together to obtain spliced time-series features.
[0071] Finally, the concatenated temporal features are input into the first feature mapping layer for feature mapping to obtain fused features. Specifically, feature mapping has the following functions: 1. Dimension transformation: The feature mapping layer can map input data from a high-dimensional space to a low-dimensional space, or from one dimension to another dimension more suitable for subsequent processing. This is especially important when processing complex data. Through the feature mapping layer, these data can be transformed into one-dimensional features more suitable for encoders or decoders; 2. Feature extraction: The feature mapping layer can extract key features from the input data. These features are crucial for subsequent classification, recognition, and other tasks. Through feature mapping, the most useful information in the data can be retained. 1. Remove redundancy and noise to improve the overall system performance and accuracy; 2. Data compression: In some cases, the feature mapping layer can also play a role in data compression. By mapping high-dimensional data to a low-dimensional space, the storage and transmission costs of data can be reduced while keeping the main information of the data unchanged. This is especially important for resource-constrained environments (such as embedded systems); 3. Data preparation: The data format output by the feature mapping layer is usually more suitable for subsequent processing by the encoder or decoder. For example, in some models, the decoder needs to input a one-dimensional feature vector. The feature mapping layer can ensure that the input data meets this requirement, thereby providing high-quality input for the decoder.
[0072] The multivariate load forecasting method provided in this application uses an encoder in a multivariate load forecasting network to generate fusion features that can both represent the correlation between multivariate loads and influencing factors and focus on the forecast target. It employs a dual-input channel mode, enabling the model to focus more on the intrinsic laws of the target variable while capturing the combined effects of other influencing factors. A cross-attention mechanism is used to fuse and focus the results of time-series feature extraction, resulting in strongly correlated features. These strongly correlated features, focused by cross-attention, are then concatenated with the multivariate load features to enhance feature representation and fuse multivariate load time-series features and cross-variable correlation features. Finally, the concatenated time-series features are feature-mapped to obtain the fusion features. Compared to cutting-edge methods such as the Transformer's multi-head self-attention mechanism, this invention, by combining a dual-input structure with a cross-attention mechanism, implements functional design at the model's underlying structure, focusing on the target variable and efficiently capturing the dynamic correlation between input variables. This significantly improves the model's forecasting performance, saves data processing and computational resources, and enhances scenario adaptability.
[0073] In one possible implementation, the feature focusing layer is specifically used for:
[0074] The load time-series characteristics corresponding to each load are spliced together to obtain multi-variable load time-series characteristics.
[0075] For example, the electrical load sequence data is The heat load sequence data is The cooling load sequence data is The three load sequence data mentioned above are input into the first time-series feature extraction layer to obtain the electrical load time-series features. Heat load time sequence characteristics and the time-series characteristics of cooling load , , as well as After being input into the feature focusing layer, the three load time-series features are concatenated to obtain multivariate load features. { Comprehensive time series characteristics , which serves as an input to the feature focusing layer.
[0076] In the cross-attention mechanism calculation, the correlation feature weights between each load and the target load are determined based on the multivariate load time series characteristics and the comprehensive time series characteristics. The correlation feature weights are scaled by a dot product to prevent them from entering the gradient saturation region of the normalization function. The dot product scaled weights are then nonlinearly mapped by the normalization function. The nonlinearly mapped weights are multiplied by the comprehensive time series characteristics to focus on the strong correlation features between the multivariate loads and influencing factors.
[0077] Specifically, the above features can be represented by operations between the query matrix Q, the key matrix K, and the value matrix V, where the query matrix Q = Key matrix K = Value matrix V = Then, the strong correlation feature can be obtained according to the following formula.
[0078]
[0079] Where A represents a strongly correlated feature, Let K be the number of columns in the key matrix. It is a normalized exponential function.
[0080] First, the similarity between the query matrix Q and all key matrices is calculated by performing a dot product between the query matrix Q and the key matrix K. Then, the dot product result is divided by a scaling factor, where the scaling factor refers to the number of columns in the key matrix K. The square root of the similarity is used to reduce the numerical range and prevent it from entering the gradient saturation region of the normalized exponential function softmax. Next, the similarity is normalized using the softmax function, ensuring that all weight values are between 0 and 1 and their sum equals 1, thus obtaining the attention weights. Finally, the attention weights are weighted and averaged with the value matrix V to obtain the final output. This can be seen as a context-dependent summary of the value matrix V, where the attention weights determine the contribution of each value.
[0081] The multivariate load forecasting method provided in this application uses a cross-attention mechanism to dynamically calculate the attention weights between multivariate load features and comprehensive time-series features, enabling the model to adaptively focus on important features, thereby better adapting to changes in variable relationships under different scenarios and improving the accuracy of multivariate load forecasting.
[0082] In one possible implementation, based on the fusion characteristics, the decoder of the multivariate load forecasting network model performs independent forecasting of the multivariate loads to obtain load forecasting results corresponding to each load, including:
[0083] The final hidden state and fused features of the first time-series feature extraction layer when extracting time-series features for each load are input into the decoder of the multi-load prediction network model to perform independent prediction of multi-loads, and obtain the load prediction results corresponding to each load.
[0084] In one implementation, the first temporal feature extraction layer uses a GRU to extract temporal features from each metadata load. The final hidden state of the GRU refers to the state information stored within the network after processing the last time step of the sequence data. This state information is an encoding or summary of the entire sequence data. The final hidden state contains important information from the sequence data, which can be used for subsequent tasks such as classification, regression, or sequence generation. In this embodiment, the final hidden state of the first temporal feature extraction layer is directly passed to the decoder as the initial state of each decoder's temporal prediction network, avoiding information loss caused by deep networks.
[0085] The multivariate load prediction method provided in this application involves a first temporal feature extraction layer outputting the final hidden state. The decoder uses the final hidden state as the initial state and performs independent predictions of the multivariate loads based on fused features. In the decoder, an independent prediction structure is constructed for each type of load to achieve accurate prediction of each variable. Based on the residual network concept, a direct transfer mechanism of the initial state is introduced between the encoder and decoder to improve information transfer efficiency while avoiding the risk of gradient explosion caused by excessively deep networks.
[0086] In one possible implementation, the decoder includes a temporal prediction layer corresponding to the payload and a second feature mapping layer, wherein:
[0087] The time-series prediction layer is used to take the final hidden state when extracting time-series features of the corresponding load as the initial state information, and perform load prediction based on the fused features to obtain the load prediction data of the corresponding load.
[0088] In one implementation, the decoder is structured as follows: Figure 3 As shown, the time-series prediction layer consists of multiple time-series prediction networks, exemplarily including an electrical load time-series prediction network, a heat load time-series prediction network, and a cooling load time-series prediction network, used to independently predict each element load. The electrical load time-series prediction network is used to predict the electrical load based on the final hidden state related to the electrical load as the initial state and according to the fusion characteristics. The electrical load time-series prediction network is used to predict the heat load based on the final hidden state related to the heat load as the initial state and according to the fusion characteristics. The cooling load time-series prediction network is used to predict the cooling load based on the final hidden state related to the cooling load as the initial state and according to the fusion characteristics.
[0089] The second feature mapping layer contains multiple independent feature mapping layers, used to perform nonlinear feature mapping on the characteristic time-series distribution of each load forecast data to obtain the load forecast result for the corresponding load. For example, as shown... Figure 3As shown, the second feature mapping layer includes an electrical load feature mapping layer, a heat load feature mapping layer, and a cold load feature mapping layer. The electrical load feature mapping layer is used to perform nonlinear feature mapping on the characteristic time-series distribution of the electrical load prediction data to obtain the electrical load prediction result; the heat load feature mapping layer is used to perform nonlinear feature mapping on the characteristic time-series distribution of the heat load prediction data to obtain the heat load prediction result; and the cold load feature mapping layer is used to perform nonlinear feature mapping on the characteristic time-series distribution of the cold load prediction data to obtain the cold load prediction result.
[0090] In the decoder, the feature mapping layers in the second feature mapping layer play the following roles: 1. Dimensional transformation: The decoder typically receives encoded features from the encoder as input. These encoded features may have specific dimensions and structures. One of the roles of the feature mapping layer in the decoder is to map these encoded features to dimensions and spaces suitable for subsequent processing by the decoder. For example, in some autoencoder architectures, the encoder compresses the input data into a low-dimensional representation, while the decoder needs to reconstruct this low-dimensional representation back to the original data dimensions. The feature mapping layer acts as a bridge here, ensuring the consistency of data in terms of dimensions. 2. Key feature extraction: Although the main task of the decoder is to reconstruct the data, in some cases, it also needs to extract key information from the encoded features to guide the decoding process. The feature mapping layer can extract these key features through linear transformations, non-linear activation functions, etc. 3. Feature enhancement: The feature mapping layer can also enhance the extracted features to improve the performance and accuracy of the decoder. For example, by increasing the non-linear expressive power of the features and introducing sparsity, the representational power of the features can be enhanced.
[0091] The multivariate load prediction method provided in this application is based on the multi-task learning concept. The decoder uses the fusion features learned by the shared encoder part. On the other hand, the decoder part constructs an independent prediction structure for each type of load to achieve accurate prediction of each variable. At the same time, based on the residual network concept, a direct transfer mechanism of the initial state is introduced between the encoder and decoder to improve information transfer efficiency and avoid the risk of gradient explosion caused by excessive network depth.
[0092] In one possible implementation, the first temporal feature extraction layer, the second temporal feature extraction layer, and the temporal prediction layer are all based on GRU.
[0093] GRU is a deep learning model commonly used for processing sequential data. It addresses the vanishing and exploding gradient problems by introducing a gating mechanism to control the flow of information. It consists of two gating units: a reset gate and an update gate. These gating units allow the model to selectively memorize or ignore information from the input data, thus better capturing important patterns in the sequence. Compared to LSTM, GRU has a simpler structure but is equally effective at capturing long-term dependencies in sequential data. GRU's gating mechanism ensures that gradients are efficiently propagated during backpropagation, thus avoiding the vanishing and exploding gradient problems.
[0094] The multivariate load prediction method provided in this application uses GRU in the encoder to extract the temporal features of the sequence and capture the long-term dependencies in the time series data. In the decoder, GRU is used to learn the predicted values of multivariate loads based on fused features. Furthermore, based on the residual network concept, a direct transfer mechanism of the initial state is introduced between the GRU of the encoder and the GRU of the decoder to improve the information transfer efficiency and avoid the risk of gradient explosion caused by excessive network depth.
[0095] In one possible implementation, the loss function for training the multivariate load prediction network model reflects the prediction loss of electrical load, the prediction loss of thermal load, and the prediction loss of cooling load.
[0096] The specific process of building the multivariate load forecasting network model is as follows:
[0097] The process involves acquiring the model input sample set, including training, testing, and validation sets. Specifically, data on heating, cooling, and electrical loads, meteorological conditions, and user behavior are obtained from various sources (such as databases, APIs, and files) and initially integrated. Data cleaning and transformation are performed to remove invalid or redundant information from the original dataset. Signals with different sampling rates are resampled through data transformation. Exploratory data analysis (EDA) and feature engineering are used to analyze data distribution and correlation, and highly correlated variables are selected. After partitioning the dataset, normalization is performed to avoid the impact of differences in the units of measurement between different features on model training and to prevent data leakage. This process forms the model input sample set, including the training, testing, and validation sets.
[0098] Determine the hyperparameter search range ℝ and initialize parameter configuration. Among them, hyperparameters include: model structure hyperparameters (number of network layers, activation function, number of neurons, etc.), training hyperparameters (learning rate decay strategy, maximum number of iterations, batch size, optimization algorithm, etc.) and other hyperparameters (early stopping strategy, etc.).
[0099] Choose an appropriate loss function and evaluation metric;
[0100] The optimal hyperparameters are selected by using a tree-based Bayesian optimization algorithm (TPE). ;
[0101] The model is trained on the training set using an optimization algorithm until the loss function tends to stabilize;
[0102] Evaluate model performance on the validation set, compare the model’s performance on the training set and the validation set, and determine whether the model is overfitted or underfitted.
[0103] Based on the performance on the validation set, the model structure and hyperparameters are adjusted and the model is retrained until the model performance meets the requirements.
[0104] During the training of the above model, the loss function can be set according to the following formula:
[0105]
[0106] in, For the total loss, Losses due to electricity load forecasting tasks Losses in heat load forecasting tasks Losses due to cold load forecasting tasks For the loss weight of the electricity load forecasting task, As the loss weight for the heat load forecasting task, The loss weights for the cold load forecasting task.
[0107] The multivariate load forecasting method provided in this application uses a loss function to train the multivariate load forecasting network model. The loss function is formed by weighting the electrical load loss function sub-items, the heat load loss function sub-items, and the cooling load loss function sub-items, thereby achieving collaborative optimization of each load forecasting task.
[0108] Figure 4 A schematic diagram of the structure of the multi-element load forecasting device provided in this application is shown below. Figure 4 As shown, the multi-element load forecasting device 40 provided in this embodiment includes:
[0109] The acquisition module 401 is used to acquire the load sequence data within the most recent historical period corresponding to each element load and the influencing factor sequence data within the most recent historical period corresponding to the element load. The element load includes electrical load, heat load and cooling load.
[0110] The splicing module 402 is used to perform feature splicing on the load sequence data and the influencing factor sequence data corresponding to each load to obtain comprehensive sequence data;
[0111] The fusion feature extraction module 403 is used to input the load sequence data of each load and the comprehensive sequence data into the encoder of the multivariate load prediction network model. In the encoder, based on the cross attention mechanism, the strong correlation features between the multivariate load and the influencing factors are focused on according to the load sequence data of each load and the comprehensive sequence data to extract the fusion features.
[0112] The prediction module 404 is used to perform independent prediction of multiple loads through the decoder of the multi-load prediction network model based on the fusion features, so as to obtain the load prediction results corresponding to each load.
[0113] Optionally, the encoder includes a first temporal feature extraction layer, a second temporal feature extraction layer, a feature focusing layer, a feature concatenation layer, and a first feature mapping layer, wherein:
[0114] The first time-series feature extraction layer is used to extract the time-series features of the corresponding load sequence data to obtain the load time-series features of the corresponding load.
[0115] The second temporal feature extraction layer is used to extract the temporal features of the comprehensive sequence data to obtain the comprehensive temporal features.
[0116] The feature focusing layer is used to focus on the strong correlation features between multiple loads and influencing factors based on the cross-attention mechanism and the load time series features and the comprehensive time series features.
[0117] The feature splicing layer is used to splice load time-series features and strongly correlated features to obtain spliced time-series features.
[0118] The first feature mapping layer is used to perform nonlinear mapping of the feature temporal distribution on the spliced temporal features to obtain fused features.
[0119] Furthermore, the feature focusing layer is specifically used for:
[0120] The time-series characteristics of each load are concatenated to obtain multi-dimensional load time-series characteristics;
[0121] In the cross-attention mechanism calculation, the correlation feature weights between each load and the target load are determined based on the multivariate load time series characteristics and the comprehensive time series characteristics. The correlation feature weights are scaled by a dot product to prevent them from entering the gradient saturation region of the normalization function. The dot product scaled weights are then nonlinearly mapped by the normalization function. The nonlinearly mapped weights are multiplied by the comprehensive time series characteristics to focus on the strong correlation features between the multivariate loads and influencing factors.
[0122] As one possible implementation, the prediction module is specifically used to: input the final hidden state and fused features of the first time-series feature extraction layer when extracting time-series features of each element load into the decoder of the multi-element load prediction network model to perform independent prediction of the multi-element loads, and obtain the load prediction results corresponding to each load.
[0123] Optionally, the decoder includes a temporal prediction layer corresponding to the load and a second feature mapping layer, wherein:
[0124] The time-series prediction layer is used to take the final hidden state when extracting time-series features of the corresponding load as the initial state information, and perform load prediction based on the fused features to obtain the load prediction data of the corresponding load.
[0125] The second feature mapping layer is used to perform nonlinear feature mapping on the characteristic time series distribution of the load forecast data to obtain the load forecast results for the corresponding load.
[0126] For example, the first temporal feature extraction layer, the second temporal feature extraction layer, and the temporal prediction layer are all based on GRU.
[0127] For example, the loss function for training a multivariate load forecasting network model reflects the forecasting loss of electrical load, the forecasting loss of thermal load, and the forecasting loss of cooling load.
[0128] The multi-element load forecasting device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0129] Figure 5 This is a structural schematic diagram of the multi-element load forecasting device provided in this application. Figure 5 As shown, the multi-source load forecasting device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.
[0130] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.
[0131] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0132] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0133] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0134] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0135] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0136] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0137] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0138] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0139] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0140] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0141] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0142] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0143] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0144] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A multivariate load forecasting method, characterized in that, include: Obtain the load sequence data within the most recent historical period corresponding to each element load and the influencing factor sequence data within the most recent historical period corresponding to the element load. The element load includes electrical load, heat load and cooling load. The load sequence data and the influencing factor sequence data corresponding to each load are spliced together to obtain comprehensive sequence data. The load sequence data of each load and the composite sequence data are input into the encoder of the multivariate load prediction network model. In the encoder, based on the cross-attention mechanism, the strong correlation features between the multivariate loads and influencing factors are focused according to the load sequence data of each load and the composite sequence data to extract the fused features. The encoder includes a first temporal feature extraction layer, a second temporal feature extraction layer, a feature focusing layer, a feature splicing layer and a first feature mapping layer. The final hidden state of the first time-series feature extraction layer when extracting time-series features for each element load and the fused features are input into the decoder of the multi-element load prediction network model to perform independent prediction of the multi-element loads, thereby obtaining the load prediction results corresponding to each element load. Wherein: the first time-series feature extraction layer is used to extract the time-series features of the load sequence data of the corresponding load to obtain the load time-series features of the corresponding load; The second temporal feature extraction layer is used to extract the temporal features of the comprehensive sequence data to obtain comprehensive temporal features; The feature focusing layer is used to focus on the strong correlation features between the multivariate loads and influencing factors based on the cross-attention mechanism, according to the load time series features and the comprehensive time series features; The feature splicing layer is used to splice the load time-series features and the strongly correlated features to obtain spliced time-series features. The first feature mapping layer is used to perform a nonlinear mapping of the feature temporal distribution on the spliced temporal features to obtain the fused features.
2. The multi-variable load forecasting method according to claim 1, characterized in that, The feature focusing layer is specifically used for: The time-series characteristics of each load are concatenated to obtain multi-dimensional load time-series characteristics; In the cross-attention mechanism calculation, the association feature weights between each load and the target load are determined based on the multivariate load time-series characteristics and the comprehensive time-series characteristics. The weights of the associated features are scaled by a dot product to prevent them from entering the gradient saturation region of the normalization function; the scaled weights are then nonlinearly mapped using the normalization function; the nonlinearly mapped weights are multiplied by the comprehensive time-series features to focus on obtaining the strong correlation features between the multivariate loads and influencing factors.
3. The multi-variable load forecasting method according to claim 1, characterized in that, The decoder includes a temporal prediction layer corresponding to the load and a second feature mapping layer, wherein: The time-series prediction layer is used to take the final hidden state when extracting time-series features of the corresponding load as the initial state information, and perform load prediction based on the fused features to obtain the load prediction data of the corresponding load. The second feature mapping layer is used to perform nonlinear feature mapping on the load forecast data to obtain the load forecast result corresponding to the load.
4. The multi-variable load forecasting method according to claim 3, characterized in that, The first temporal feature extraction layer, the second temporal feature extraction layer, and the temporal prediction layer are all based on gated recurrent units (GRUs).
5. The multi-variable load forecasting method according to any one of claims 1 to 4, characterized in that, The loss function used to train the multivariate load prediction network model reflects the predicted loss of electrical load, the predicted loss of heat load, and the predicted loss of cooling load.
6. A multi-element load forecasting device, characterized in that, include: The acquisition module is used to acquire the load sequence data within the most recent historical period corresponding to each element load and the influencing factor sequence data within the most recent historical period corresponding to the element load. The element load includes electrical load, heat load and cooling load. The splicing module is used to perform feature splicing on the load sequence data and the influencing factor sequence data corresponding to each load to obtain comprehensive sequence data. A fusion feature extraction module is used to input the load sequence data of each load and the comprehensive sequence data into the encoder of the multivariate load prediction network model. In the encoder, based on the cross-attention mechanism, the strong correlation features between the multivariate loads and influencing factors are focused according to the load sequence data of each load and the comprehensive sequence data to extract fusion features. The encoder includes a first temporal feature extraction layer, a second temporal feature extraction layer, a feature focusing layer, a feature splicing layer, and a first feature mapping layer. Wherein: the first time-series feature extraction layer is used to extract the time-series features of the load sequence data of the corresponding load to obtain the load time-series features of the corresponding load; The second temporal feature extraction layer is used to extract the temporal features of the comprehensive sequence data to obtain comprehensive temporal features; The feature focusing layer is used to focus on the strong correlation features between the multivariate loads and influencing factors based on the cross-attention mechanism, according to the load time series features and the comprehensive time series features; The feature splicing layer is used to splice the load time-series features and the strongly correlated features to obtain spliced time-series features. The first feature mapping layer is used to perform a nonlinear mapping of the feature temporal distribution on the spliced temporal features to obtain the fused features; The prediction module is used to input the final hidden state of the first time-series feature extraction layer when extracting time-series features for each element load and the fused features into the decoder of the multi-element load prediction network model to perform independent prediction of the multi-element loads, thereby obtaining the load prediction results corresponding to each load.
7. A multi-element load forecasting device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-5.
9. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-5.
Citation Information
Patent Citations
Charging station cluster load prediction method and system based on deep fusion of exogenous variables
CN118504792A