Multi-element load prediction method and device, storage medium and program product
By using the multi-load prediction network model in an integrated energy system, focusing on the correlation characteristics of multi-load and influencing factors based on the cross-attention mechanism, the problem of poor load prediction accuracy in the prior art is solved, and accurate prediction of multi-load and energy scheduling support is achieved.
Patent Information
- Application Number
- CN202510251192.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-03-04
AI Technical Summary
In the prior art, independent load prediction models are used to predict various energy loads separately, and there is a problem that the accuracy of load prediction is poor.
By obtaining the load sequences of each element load within the recent historical time and the influencing factor sequences, the multivariate load prediction network model is used to predict multivariate loads. Based on the cross attention mechanism in the encoder, the model focuses on the strong correlation characteristics between multiple loads and influencing factors, extracts the fusion characteristics, and makes independent predictions through the decoder.
Accurate prediction of multiple loads is achieved, the coupling relationship between various loads and influencing factors is fully taken into account, the accuracy of energy load prediction is improved, and reasonable energy scheduling is supported in the integrated energy system.
Smart Images

Figure CN120067995A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of energy systems, and in particular, to a multi-load prediction method, device, storage medium, and program product. Background Art
[0002] An integrated energy system (IES) efficiently integrates and flexibly schedules various energy forms such as electricity, heat, cold, and gas. Through various technical means such as equipment planning and configuration, system optimal operation, energy storage and new energy application, carbon capture and utilization, etc., it promotes multi-energy parks to achieve the carbon neutrality goal. Compared with traditional energy systems, IES pays more attention to multi-energy complementarity, collaborative and intelligent management, and is an important solution to cope with the growth of energy demand, improve energy utilization efficiency, and reduce carbon emissions. Load forecasting technology is an important basic topic for the scientific planning and efficient operation of IES, and is closely related to scenarios such as real-time energy scheduling management and demand response management.
[0003] In related technologies, independent load forecasting models are used to forecast various energy loads respectively, resulting in the problem of poor accuracy of load forecasting. Summary of the Invention
[0004] Embodiments of the present application provide a multi-load prediction method, device, storage medium, and program product, so as to achieve the effect of fully considering the coupling relationship between multi-loads and influencing factors and accurately predicting multi-loads.
[0005] In a first aspect, an embodiment of the present application provides a multi-load prediction method, including:
[0006] Obtain the load sequence data within the most recent historical duration corresponding to each primary load and the influencing factor sequence data within the most recent historical duration corresponding to the multi-load, where the multi-load includes an electric load, a heat load, and a cold load;
[0007] Concatenate the load sequence data and the influencing factor sequence data corresponding to each load to obtain comprehensive sequence data;
[0008] Input the load sequence data and the comprehensive sequence data of each load into the encoder of the multi-load prediction network model. In the encoder, based on the cross-attention mechanism, according to the load sequence data and the comprehensive sequence data of each load, focus on the strong correlation features between the multi-load and the influencing factors, and extract the fusion features;
[0009] According to the fusion features, perform independent prediction of the multi-load through the decoder of the multi-load prediction network model to obtain the load prediction results corresponding to each load.
[0010] In a possible implementation, 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, where:
[0011] The first temporal feature extraction layer is used to extract the temporal features of the load sequence data corresponding to the load, and obtain the load temporal features corresponding to the load;
[0012] The second temporal feature extraction layer is used to extract the temporal features of the comprehensive sequence data, and obtain the comprehensive temporal features;
[0013] The feature focusing layer is used to focus on obtaining the strong association features between the multi-load and influencing factors based on the cross-attention mechanism according to the load temporal features and the comprehensive temporal features;
[0014] The feature splicing layer is used to splice the load temporal features and the strong association features to obtain the spliced temporal features;
[0015] The first feature mapping layer is used to perform a non-linear mapping of the temporal distribution of the spliced temporal features to obtain the fused features.
[0016] In a possible implementation, the feature focusing layer is specifically used for:
[0017] Splice the load temporal features corresponding to each load to obtain the multi-load temporal features;
[0018] In the cross-attention mechanism calculation, according to the multi-load temporal features and the comprehensive temporal features, determine the association feature weights between each load and the target load; perform dot-product scaling on the association feature weights to prevent the gradient from saturating in the normalization function; perform non-linear mapping on the dot-product scaled weights through the normalization function; multiply the non-linear mapped weights by the comprehensive temporal features to focus on obtaining the strong association features between the multi-load and influencing factors.
[0019] In a possible implementation, according to the fused features, perform independent prediction of the multi-load through the decoder of the multi-load prediction network model to obtain the load prediction results corresponding to each load, including:
[0020] Input the final hidden state and the fused features when the first temporal feature extraction layer extracts the temporal features of each meta-load into the decoder of the multi-load prediction network model to perform independent prediction of the multi-load, and obtain the load prediction results corresponding to each load.
[0021] In a possible implementation, the decoder includes a temporal prediction layer corresponding to the load and a second feature mapping layer, where:
[0022] A time series prediction layer, configured to use the final hidden state when extracting time series features of the corresponding load as the initial state information, and perform load prediction according to the fused features to obtain load prediction data of the corresponding load;
[0023] A second feature mapping layer, configured to perform non-linear feature mapping on the feature time series distribution of the load prediction data to obtain the load prediction result of the corresponding load.
[0024] In a possible implementation manner, the first time series feature extraction layer, the second time series feature extraction layer, and the time series prediction layer are all based on GRU.
[0025] In a possible implementation manner, the loss function for training the multi-load prediction network model reflects the prediction loss of the electrical load, the prediction loss of the thermal load, and the prediction loss of the cooling load.
[0026] In a second aspect, an embodiment of the present application provides a multi-load prediction device, including:
[0027] An acquisition module, configured to acquire load sequence data within the most recent historical duration corresponding to each meta-load and influence factor sequence data of the multi-load within the most recent historical duration, where the multi-load includes an electrical load, a thermal load, and a cooling load;
[0028] A splicing module, configured to perform feature splicing on the load sequence data and the influence factor sequence data respectively corresponding to each load to obtain comprehensive sequence data;
[0029] A fused feature extraction module, configured to input the load sequence data of each load and the comprehensive sequence data into the encoder of the multi-load prediction network model. In the encoder, based on the cross-attention mechanism, according to the load sequence data of each load and the comprehensive sequence data, focus on the strong correlation features between the multi-load and the influence factors, and extract the fused features;
[0030] A prediction module, configured to perform independent prediction of the multi-load through the decoder of the multi-load prediction network model according to the fused features, and obtain the load prediction result corresponding to each load.
[0031] In a third aspect, an embodiment of the present application provides a multi-load prediction device, including: a memory, a processor;
[0032] The memory stores computer execution instructions;
[0033] The processor executes the computer execution instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementation manners of the first aspect.
[0034] Fourthly, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect and / or various possible implementation manners of the first aspect as described above.
[0035] Fifthly, an embodiment of the present application provides a computer program product, including a computer program, which when executed by a processor implements the first aspect and / or various possible implementation manners of the first aspect as described above.
[0036] The multi-load prediction method, device, storage medium and program product provided by the embodiments of the present application obtain the load sequence and the influence factor sequence of each load within the most recent historical period, and use the multi-load prediction network model to predict the multi-load. The load sequence data is used as one input of the multi-load, and the load sequence and the influence factor sequence are spliced as the other input. In this way, not only can the correlation features between the multi-load pre-influence factors be obtained, but also the features of the multi-load can be focused on. In the encoder of the multi-load prediction network, the cross-attention mechanism is used to focus on the strong correlation features between the multi-load and the influence factors to obtain the fusion features. The decoder independently predicts the multi-load based on the fusion features to obtain the prediction results of each load, achieving the effect of fully considering the coupling relationship between each load and the influence factors, accurately predicting each load, and then realizing the reasonable scheduling of energy in the integrated energy system. Description of the Drawings
[0037] The drawings here are incorporated into the description and form a part of this description, showing the embodiments that conform to the present application, and are used together with the description to explain the principles of the present application.
[0038] Figure 1 It is a schematic flowchart of the multi-load prediction method provided by the embodiment of the present application;
[0039] Figure 2 It is a schematic structural diagram of the encoder in the multi-load prediction network model provided by the present application;
[0040] Figure 3 It is a schematic structural diagram of the decoder in the multi-load prediction network model provided by the present application;
[0041] Figure 4 It is a schematic structural diagram of the multi-load prediction device provided by the present application;
[0042] Figure 5 It is a schematic structural diagram of the multi-load prediction device provided by the present application.
[0043] Through the above-mentioned drawings, specific embodiments of the present application have been shown, and will be described in more detail hereinafter. These drawings and the textual description are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by reference to specific embodiments. Detailed Description of the Embodiments
[0044] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0045] The energy load forecasting technology is an important basic topic for the scientific planning and efficient operation of IES, and is closely related to scenarios such as energy real-time scheduling management and demand response management. The energy load forecasting of IES mainly includes three methods: simulation-based solution methods, statistical methods, and artificial intelligence methods. Among them, artificial intelligence methods, with their powerful non-linear fitting ability, automatic feature extraction ability, scenario generalization ability, and efficient real-time computing performance, have been widely used in fields such as financial economy, autonomous driving, and speech signal processing, and have become the technological trend to promote the intelligent development of future industries. Artificial intelligence technology also plays a great role in the problem of load forecasting.
[0046] In related technologies, in the multi-load forecasting method based on artificial intelligence, in terms of the multi-load forecasting strategy, multiple models are usually established for electric load, heat load, and cooling load respectively; in terms of the design framework of the forecasting model, time series feature information is usually extracted by using feature engineering technology, and then 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), Gated Recurrent Unit (GRU) are used for forecasting modeling, and ensemble learning or hybrid models are used to improve the model forecasting performance.
[0047] With the development of the multi - energy complementary and collaborative regulation technology of the IES system, the strong coupling correlation among multi - energy loads has become increasingly significant, and the correlation relationships among various variables change dynamically with the 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 - variable loads and meteorological and user behavior data has dynamic characteristics, and such dynamic correlation characteristics are not effectively captured. These limitations have significantly affected the accuracy and time - advance degree of the IES system in ultra - short - term load forecasting.
[0048] In response to this, the present application provides a multi - variable load forecasting method. By obtaining the load sequences and influencing factor sequences of each variable load within the most recent historical period, a multi - variable load forecasting network model is used to forecast the multi - variable load. The load sequence data is used as one input of the multi - variable load, and the concatenation of the load sequence and the influencing factor sequence is used as another input. In this way, both the correlation features between the multi - variable load and the influencing factors can be obtained, and the features of the multi - variable load can be focused on. In the encoder of the multi - variable load forecasting network, a cross - attention mechanism is used to focus on the strong correlation features between the multi - variable load and the influencing factors to obtain a fused feature. The decoder independently forecasts the multi - variable load based on the fused feature to obtain the forecasting results of each load, achieving the effect of fully considering the coupling relationship between each load and the influencing factors, accurately forecasting each load, and then realizing the reasonable scheduling of energy in the integrated energy system.
[0049] The following uses specific embodiments to elaborate in detail on the technical solutions of the present application and how the technical solutions of the present application solve the above - mentioned technical problems. These several specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0050] The multi - variable load forecasting method provided by the embodiments of the present application can be applied to the IES and run on devices such as processors with data - processing capabilities. Figure 1 It is a schematic flowchart of the multi - variable load forecasting method provided by the embodiments of the present application. As Figure 1 shown, the multi - variable load forecasting method provided by the embodiments of the present application includes the following processes:
[0051] S101. Obtain the load sequence data of each variable load within the most recent historical period and the influencing factor sequence data of the multi - variable load within the most recent historical period. The multi - variable load includes an electric load, a heat load, and a cold load.
[0052] In some embodiments, in addition to the supply of electric energy, thermal energy, and cooling energy, the IES can also realize the supply and dispatching of energy such as natural gas, hydrogen energy, renewable energy, and biomass energy. Therefore, the multi-load prediction method provided by the embodiments of the present application can also predict the energy loads such as the above-mentioned natural gas, hydrogen energy, renewable energy, and biomass energy. Specifically, the load sequence data and the influencing factor sequence data of the above energy in the most recent historical period are collected respectively, and the load of the above energy is predicted based on the load sequence data and the influencing factors sequence.
[0053] Among them, the influencing factor refers to the factor that will affect the load of each energy, such as climate factors and user behavior. It can be understood that in the IES, there is a coupling and correlation relationship between the loads of each energy. For example, in a possible scenario, when the thermal load is large, the cooling load is generally small. In addition, the load of each energy will also be affected by other factors. For example, in some possible scenarios, when the climate data indicates that the temperature drops, the thermal load in the IES usually increases. Therefore, the present application collects the load data of each energy in the historical period to obtain the load sequence data, and at the same time collects the influencing factor data in the historical period to obtain the influencing factor sequence data, so as to comprehensively consider the correlation relationship between the loads of each energy and the influencing factors, and realize the accurate prediction of the multi-load.
[0054] In some embodiments, the influencing factors need to be screened through correlation analysis to obtain the influencing factor data that is truly related to each load.
[0055] Optionally, the load sequence data and the influencing factor sequence data are obtained in the following manner: obtain the cooling, heating, and power loads, meteorology, and user behavior data from various sources (such as databases, APIs, files, etc.) and initially integrate them; delete invalid or redundant information from the original data set through data cleaning and transformation; resample the signals with different sampling rates through data transformation; analyze the data distribution and correlation through exploratory data analysis (EDA) and feature engineering operations, and screen out highly correlated variables; perform normalization operations after the data set is divided to avoid the influence of the dimension difference between different features on model training and prevent data leakage.
[0056] S102. Concatenate the load sequence data and the influencing factor sequence data corresponding to each load to obtain comprehensive sequence data.
[0057] Exemplarily, assume that it is necessary to predict the electric load, thermal load, and cooling load in the IES, and the collected electric load sequence data is , the thermal load sequence data is , the cooling load sequence data is , the meteorological data sequence is meteorological data , the user behavior data sequence is , the comprehensive sequence data is .
[0058] S103. Input the load sequence data of each load and the comprehensive sequence data into the encoder of the multi-load prediction network model. In the encoder, based on the cross-attention mechanism, according to the load sequence data and the comprehensive sequence data of each load, focus on the strong correlation features between the multi-load and the influencing factors, and extract the fusion features.
[0059] Among them, the multi-load prediction network is a model based on neural network for predicting multi-load, which consists of an encoder part and a decoder part. In the encoder part, feature extraction is performed on the input data of the model, and the cross-attention mechanism is used to focus and fuse the input data to obtain the strong correlation features between the multi-load and the influencing factors, and focus on the features related to the prediction target in the strong correlation features to obtain the fusion features that can not only reflect the correlation features between the multi-load and the influencing factors, but also focus on representing the multi-load features.
[0060] The cross-attention mechanism is improved from the self-attention mechanism, but there is a key difference: in the self-attention mechanism, the query matrix, the key matrix, and the value matrix all come from the same input sequence; while in the cross-attention mechanism, the query matrix and the key matrix / value matrix come from different input sequences, and the key matrix and the value matrix come from the same input sequence. This enables the cross-attention mechanism to establish associations between different inputs and capture their interactions.
[0061] The calculation 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, which is usually achieved by calculating the inner product of the query matrix and the key matrix, and then divide the inner product result by a scaling factor (usually the square root of the dimension of the query matrix or the key matrix vector) to reduce the numerical range; Next, normalize the similarity, usually using the softmax function, so as to ensure that all weight values are between 0 and 1 and the sum is equal to 1, thereby 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 regarded as a context-related summary of the value matrix, where the attention weights determine the contribution degree of each value. In the embodiment of the present application, in the encoder part, feature extraction is first performed on the load sequence data and the comprehensive sequence data, and the features of the load sequence data are used as the query matrix, and the features of the comprehensive sequence data are used as the key matrix and the value matrix, and finally the fusion features are obtained.
[0062] S104. According to the fusion features, perform independent prediction of the multi-load through the decoder of the multi-load prediction network model to obtain the load prediction results corresponding to each load.
[0063] In one implementation, multiple independent prediction networks are used in the decoder part. Taking the fused features as input, independent predictions are made for each load to obtain the load prediction results corresponding to each load, such as the values of electrical load, heat load, and cooling load.
[0064] The multi-load prediction method provided by the embodiments of the present application fully collects the load sequence data within the most recent historical period and the sequence data of influencing factors corresponding to the multi-load within the most recent historical period. Using the multi-load prediction network model, in the encoder, the features of the multi-load and the features of the comprehensive data are focused and fused through the cross-attention mechanism to obtain the fused features that can not only reflect the relationship between the multi-load and the influencing factors but also highlight the features of the multi-load. In the decoder, the multi-load is predicted based on the fused features, avoiding the problem of inaccurate prediction caused by not considering the correlation between multi-loads and / or not considering the correlation between multi-loads and influencing factors, and improving the prediction accuracy of the multi-load.
[0065] In a possible implementation, the encoder structure of the multi-load prediction network model is as Figure 2 shown. The encoder includes a first time-series feature extraction layer, a second time-series feature extraction layer, a feature focusing layer, a feature splicing layer, and a first feature mapping layer, where: The first time-series feature extraction layer is used to extract the time-series features of the load sequence data corresponding to the load to obtain the load time-series features corresponding to the load; The second time-series feature extraction layer is used to extract the time-series features of the comprehensive sequence data to obtain the comprehensive time-series features; The feature focusing layer is used to focus on obtaining the strong correlation features between the multi-load and the 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 strong correlation features to obtain the spliced time-series features; The first feature mapping layer is used to perform a non-linear mapping of the feature time-series distribution on the spliced time-series features to obtain the fused features.
[0066] As Figure 2 shown, the encoder provided by the embodiments of the present 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 the load sequence data corresponding to the multi-load, aiming to enable the model to focus more on the internal laws of the target variables; The second channel is connected to the second time-series feature extraction layer and is used to input the comprehensive sequence data spliced by the load sequence data and the influencing factor sequence data to capture the comprehensive effects of other influencing factors.
[0067] The functions of the first time-series feature extraction layer and the second time-series feature extraction layer are to extract features from the input sequence data in terms of time series, which can be implemented by models such as GRU, LSTM, and Transformer.
[0068] Feature extraction is performed on the load sequence data in the first time series feature extraction layer to obtain load time series features. Exemplarily, the electrical load sequence data is , the thermal load sequence data is , and the cooling load sequence data is . The above three load sequence data are input into the first time series feature extraction layer to obtain the electrical load time series feature , the thermal load time series feature , and the cooling load time series feature . The second time series feature extraction layer performs feature extraction on the comprehensive sequence data to obtain the comprehensive time series feature , which is used as an input to the feature focusing layer.
[0069] In the feature focusing layer, multiple load time series features and the comprehensive time series feature are used as inputs. Based on the cross-attention mechanism, strongly correlated features that can not only reflect the relationship between multiple loads and influencing factors but also highlight the features of multiple loads are obtained.
[0070] In the feature concatenation layer, to enhance feature representation and fuse multiple load time series features and cross-variable correlation features, the strongly correlated features obtained through cross-attention focusing and multiple load features are concatenated to obtain concatenated time series features.
[0071] Finally, the concatenated time series features are input into the first feature mapping layer for feature mapping to obtain fused features. Specifically, the feature mapping has the following functions: 1. Dimension conversion: The feature mapping layer can map the 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 particularly important when dealing with complex data. Through the feature mapping layer, these data can be converted into one-dimensional features more suitable for processing by the encoder or decoder. 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 while removing redundancy and noise, thereby improving the performance and accuracy of the entire system. 3. 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 the data can be reduced while maintaining the main information of the data unchanged. This is particularly important for resource-constrained environments (such as embedded systems). 4. 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 requires an input one-dimensional feature vector, and the feature mapping layer can ensure that the input data meets this requirement, thereby providing high-quality input for the decoder.
[0072] The multi-load prediction method provided by the embodiments of this application uses the encoder in the multi-load prediction network to generate a fusion feature that can represent both the correlation between multi-load and influencing factors and focus on the prediction target. It uses a dual-input channel mode, enabling the model to focus more on the internal laws of the target variable while capturing the comprehensive effects of other influencing factors. It uses a cross-attention mechanism to fuse and focus the results after temporal feature extraction to obtain strongly correlated features. The strongly correlated features after cross-attention focusing and the multi-load features are concatenated to enhance feature representation and fuse the multi-load temporal features and cross-variable correlation features. Finally, the concatenated temporal features are subjected to feature mapping to obtain fusion features. Compared with methods such as the multi-head self-attention mechanism of Transformer, a cutting-edge hot method, the present invention combines a dual-channel input structure with a cross-attention mechanism to implement functional design at the bottom layer of the model structure, focuses on the target variable, efficiently captures the dynamic correlation between input variables, thereby significantly improving the prediction performance of the model, saving the consumption of data processing computing resources, and improving the scene adaptability.
[0073] In a possible implementation manner, the feature focusing layer is specifically used for:
[0074] Perform feature concatenation on the load temporal features corresponding to each load to obtain multi-load temporal features.
[0075] Exemplarily, the electrical load sequence data is , the thermal load sequence data is , the cooling load sequence data is . The above three load sequence data are input into the first temporal feature extraction layer to respectively obtain the electrical load temporal feature , the thermal load temporal feature , and the cooling load temporal feature . , and are input into the feature focusing layer, and the three load temporal features are concatenated to obtain the multi-load feature { }. The comprehensive temporal feature serves as one input to the feature focusing layer.
[0076] In the cross-attention mechanism calculation, according to the multi-load temporal features and the comprehensive temporal features, determine the correlation feature weights between each load and the target load; perform dot-product scaling on the correlation feature weights to prevent the gradient from saturating in the normalization function; perform non-linear mapping on the weights after dot-product scaling through the normalization function; multiply the non-linearly mapped weights by the comprehensive temporal features to focus and obtain the strongly correlated features between the multi-load and the influencing factors.
[0077] Specifically, the above features can be represented by operations among the query matrix Q, the key matrix K, and the value matrix V. Set the query matrix Q = , the key matrix K = the value matrix V = , then the strongly correlated features can be obtained according to the following formula
[0078]
[0079] where A is the strongly correlated feature, and is the number of columns of the key matrix K, is the normalized exponential function.
[0080] First, calculate the similarity between the query matrix Q and all key matrices by taking the dot product of the query matrix Q and the key matrix K, and then divide the dot product result by a scaling factor, where the scaling factor refers to the square root of the number of columns of the key matrix K to reduce the numerical range to prevent entering the gradient saturation region of the normalized exponential function softmax; next, use the softmax function to normalize the similarity, which can ensure that all weight values are between 0 and 1 and the sum is equal to 1, so as to obtain the attention weights; finally, perform a weighted average of the attention weights and the value matrix V to obtain the final output. This can be regarded as a context-related summary of the value matrix V, where the attention weights determine the contribution degree of each value.
[0081] The multi-load prediction method provided by the embodiments of this application uses a cross-attention mechanism to dynamically calculate the attention weights between the multi-load features and the comprehensive time-series features, enabling the model to adaptively focus on important features, thereby better adapting to the changes in variable relationships in different scenarios and improving the accuracy of multi-load prediction.
[0082] In a possible implementation manner, according to the fusion features, independent predictions of the multi-load are performed through the decoder of the multi-load prediction network model to obtain the load prediction results corresponding to each load, including:
[0083] Input the final hidden state and the fusion features when the first time-series feature extraction layer extracts the time-series features of each meta-load into the decoder of the multi-load prediction network model to perform independent predictions of the multi-load, and obtain the load prediction results corresponding to each load.
[0084] In one embodiment, the first temporal feature extraction layer uses GRU to extract temporal features for each meta-load. The final hidden state of GRU refers to the state information saved inside the network after processing the last time step of the sequence data. This state information is the encoding or summary of the entire sequence data. The final hidden state contains important information in the sequence data, and this information can be used for subsequent tasks such as classification, regression, or sequence generation. In the embodiments of the present application, the final hidden state of the first temporal feature extraction layer is directly passed to the decoder as the initial state of each decoder temporal prediction network, avoiding information loss caused by deep networks.
[0085] In the multi-load prediction method provided by the embodiments of the present application, the first temporal feature extraction layer outputs the final hidden state, and the decoder uses the final hidden state as the initial state to independently predict the multi-load based on the fusion feature. In the decoder part, an independent prediction structure is constructed for each load respectively to achieve accurate prediction of each variable. According to the residual network idea, a direct transmission mechanism of the initial state is introduced between the encoder and the decoder to improve the information transmission efficiency and avoid the risk of gradient explosion caused by an overly deep network.
[0086] In a possible embodiment, the decoder includes a temporal prediction layer corresponding to the load and a second feature mapping layer, where:
[0087] The temporal prediction layer is used to use the final hidden state when extracting temporal features of the corresponding load as the initial state information, and perform load prediction based on the fusion feature to obtain the load prediction data of the corresponding load.
[0088] In one embodiment, the structure of the decoder is as Figure 3 shown. The temporal prediction layer consists of multiple temporal prediction networks. Exemplarily, it includes an electric load temporal prediction network, a heat load temporal prediction network, and a cold load temporal prediction network, which are used to independently predict each meta-load. The electric load temporal prediction network is used to use the final hidden state related to the electric load as the initial state and predict the electric load based on the fusion feature; the electric load temporal prediction network is used to use the final hidden state related to the heat load as the initial state and predict the heat load based on the fusion feature; the cold load temporal prediction network is used to use the final hidden state related to the cold load as the initial state and predict the cold load based on the fusion feature.
[0089] The second feature mapping layer includes multiple independent feature mapping layers, which are used to perform non-linear feature mapping on the feature temporal distribution of each load prediction data to obtain the load prediction result of the corresponding load. Exemplarily, as Figure 3As shown, the second feature mapping layer includes an electrical load feature mapping layer, a thermal load feature mapping layer, and a cooling load feature mapping layer. The electrical load feature mapping layer is used to perform non-linear feature mapping of the feature time series distribution of electrical load prediction data to obtain the electrical load prediction result; the thermal load feature mapping layer is used to perform non-linear feature mapping of the feature time series distribution of thermal load prediction data to obtain the thermal load prediction result; the cooling load feature mapping layer is used to perform non-linear feature mapping of the feature time series distribution of cooling load prediction data to obtain the cooling load prediction result.
[0090] In the decoder, each feature mapping layer in the second feature mapping layer plays the following roles: 1. Dimension conversion. The decoder usually receives the 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 the dimensions and spaces suitable for the subsequent processing of the decoder. For example, in some autoencoder architectures, the encoder compresses the input data into a low-dimensional representation, and the decoder needs to reconstruct this low-dimensional representation back to the dimension of the original data. The feature mapping layer plays a bridging role here to ensure the dimensional consistency of the data. 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 means such as linear transformation and non-linear activation functions. 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 expression ability of the features and introducing sparsity, etc., the representation ability of the features can be enhanced.
[0091] The multi-load prediction method provided by the embodiments of this application is based on the idea of multi-task learning, and the decoder adopts the fusion features learned by the shared encoder part. On the other hand, an independent prediction structure is constructed for each load in the decoder part to achieve accurate prediction of each variable. At the same time, according to the residual network idea, a direct transmission mechanism of the initial state is introduced between the encoder and the decoder to improve the information transmission efficiency and avoid the risk of gradient explosion caused by the network being too deep.
[0092] In a possible implementation manner, the first time series feature extraction layer, the second time series feature extraction layer, and the time series prediction layer are all based on GRU.
[0093] GRU is a deep learning model commonly used to process sequential data. The GRU model controls the flow of information by introducing a gating mechanism, solving the problems of vanishing gradients and exploding gradients. It consists of two gating units: the reset gate and the update gate. These two gating units allow the model to selectively remember or ignore information in the input data, thus better capturing important patterns in the sequence. Compared with LSTM, GRU has a simpler structure but can equally effectively capture long-term dependencies in sequential data. The gating mechanism of GRU enables gradients to be effectively transmitted during backpropagation, thus avoiding the problems of vanishing gradients and exploding gradients.
[0094] The multi-load prediction method provided by the embodiments of this application uses GRU to extract the temporal features of the sequence in the encoder, capturing long-term dependencies in time series data. In the decoder part, GRU is used to learn the predicted values of the multi-load based on the fusion features. Moreover, according to the residual network idea, a direct transmission mechanism of the initial state is introduced between the GRU in the encoder and the GRU in the decoder to improve the information transmission efficiency and avoid the risk of exploding gradients caused by the network being too deep.
[0095] In a possible implementation manner, the loss function for training the multi-load prediction network model reflects the prediction loss of the electrical load, the prediction loss of the thermal load, and the prediction loss of the cooling load.
[0096] The specific construction process of the multi-load prediction network model is as follows:
[0097] Obtain the model input sample set, including the training set, the test set, and the validation set. Specifically, obtain the cooling, heating, and electrical load, meteorological, and user behavior data from various sources (such as databases, APIs, files, etc.) and initially integrate them; delete invalid or redundant information from the original data set through data cleaning and transformation; resample signals with different sampling rates through data transformation; analyze the data distribution and correlation, and screen out highly correlated variables through exploratory data analysis (EDA) and feature engineering operations; perform normalization operations after dataset division to avoid the impact of dimensional differences between different features on model training and prevent data leakage; form the model input sample set, including the training set, the test set, and the validation set;
[0098] Determine the hyperparameter search range ℝ and initialize the parameter configuration where the 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] Select appropriate loss functions and evaluation metrics;
[0100] Adopt the Tree-structured Parzen Estimator (TPE) algorithm to search for and select the optimal hyperparameters ;
[0101] Use the optimization algorithm to train the model on the training set until the loss function stabilizes;
[0102] Evaluate the model performance on the validation set, compare the performance of the model on the training set and the validation set, and determine whether the model has overfitting or underfitting;
[0103] And adjust the model structure and hyperparameters according to the performance on the validation set and retrain the model until the model performance meets the requirements.
[0104] During the above model training process, the loss function can be set according to the following formula:
[0105]
[0106] Among them, is the total loss, is the loss of the electric load prediction task, is the loss of the heat load prediction task, is the loss of the cooling load prediction task, is the loss weight of the electric load prediction task, is the loss weight of the heat load prediction task, is the loss weight of the cooling load prediction task.
[0107] The multi-load prediction method provided by the embodiments of this application uses the loss function to train the multi-load prediction network model. The loss function is formed by weighting the electric load loss function sub-item, the heat load loss function sub-item, and the cooling load loss function sub-item, realizing the collaborative optimization of each load prediction task.
[0108] Figure 4 is the structural schematic diagram of the multi-load prediction device provided by this application, as Figure 4 shown. The multi-load prediction device 40 provided in this embodiment includes:
[0109] An acquisition module 401, configured to acquire the load sequence data within the most recent historical duration corresponding to each meta-load and the influencing factor sequence data of the multi-load within the most recent historical duration, where the multi-load includes an electric load, a heat load, and a cooling load;
[0110] A splicing module 402, configured 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 configured to input the load sequence data of each of the loads and the comprehensive sequence data into the encoder of the multi-load prediction network model. In the encoder, based on the cross-attention mechanism, according to the load sequence data of each of the loads and the comprehensive sequence data, the strong correlation features between the multi-load and the influencing factors are focused, and the fusion features are extracted;
[0112] The prediction module 404 is configured to perform independent prediction of the multi-load through the decoder of the multi-load prediction network model according to the fusion features, and obtain the load prediction results corresponding to each of the loads.
[0113] Optionally, the encoder includes a first time series feature extraction layer, a second time series feature extraction layer, a feature focusing layer, a feature splicing layer, and a first feature mapping layer, where:
[0114] The first time series feature extraction layer is configured to extract the time series features of the load sequence data of the corresponding load, and obtain the load time series features of the corresponding load;
[0115] The second time series feature extraction layer is configured to extract the time series features of the comprehensive sequence data, and obtain the comprehensive time series features;
[0116] The feature focusing layer is configured to focus on the strong correlation features between the multi-load and the influencing factors based on the cross-attention mechanism according to the load time series features and the comprehensive time series features;
[0117] The feature splicing layer is configured to splice the load time series features and the strong correlation features to obtain the spliced time series features;
[0118] The first feature mapping layer is configured to perform a non-linear mapping of the feature time series distribution of the spliced time series features to obtain the fusion features.
[0119] Further, the feature focusing layer is specifically configured to:
[0120] Splice the load time series features corresponding to each load to obtain the multi-load time series features;
[0121] In the cross-attention mechanism calculation, according to the multi-load time series features and the comprehensive time series features, determine the correlation feature weights of each load and the target load; perform dot product scaling on the correlation feature weights to prevent the gradient from saturating in the normalization function; perform non-linear mapping on the dot product scaled weights through the normalization function; multiply the non-linear mapping weights by the comprehensive time series features to focus on the strong correlation features between the multi-load and the influencing factors.
[0122] As a possible implementation, the prediction module is specifically configured to: input the final hidden state and the fusion feature when the first time-series feature extraction layer extracts time-series features from each meta-load into the decoder of the multi-load prediction network model for independent prediction of the multi-load, and obtain the load prediction results corresponding to each load respectively.
[0123] Optionally, the decoder includes a time-series prediction layer corresponding to the load and a second feature mapping layer, where:
[0124] The time-series prediction layer is used to use the final hidden state when extracting time-series features of the corresponding load as the initial state information, and perform load prediction according to the fusion feature to obtain the load prediction data of the corresponding load;
[0125] The second feature mapping layer is used to perform non-linear feature mapping on the feature time-series distribution of the load prediction data to obtain the load prediction result of the corresponding load.
[0126] Exemplarily, the first time-series feature extraction layer, the second time-series feature extraction layer, and the time-series prediction layer are all based on GRU.
[0127] Exemplarily, the loss function for training the multi-load prediction network model reflects the prediction loss of the electrical load, the prediction loss of the thermal load, and the prediction loss of the cooling load.
[0128] The multi-load prediction device provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, and will not be elaborated here in this embodiment.
[0129] Figure 5 It is a schematic structural diagram of the multi-load prediction device provided in this application. As Figure 5 shown, the multi-load prediction 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. Among them, the processor 501, the memory 502, and the communication component 503 are connected through a bus 504.
[0130] In the specific implementation process, at least one processor 501 executes the computer execution instructions stored in the memory 502, so that at least one processor 501 executes the above method.
[0131] The specific implementation process of the processor 501 can refer to the above method embodiment, and its implementation principle and technical effect are similar, and will not be elaborated here in this embodiment.
[0132] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly implemented by the execution of the hardware processor, or can be implemented by the combination of hardware and software modules in the processor.
[0133] The memory may include a random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk memory.
[0134] The bus may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0135] This application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0136] This application also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the above method is implemented.
[0137] The above-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 memory, flash memory, a magnetic disk or an optical disk. The readable storage medium can be any available medium accessible by 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 be located in an Application Specific Integrated Circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in a device.
[0139] The division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed between each other can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0140] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0141] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0142] If the function is implemented in the form of 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 the present invention, in essence, or the part that contributes to the prior art or part of this 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 for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disks or optical discs that can store program codes.
[0143] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned storage medium includes: various media such as ROM, RAM, magnetic disks, or optical discs that can store program codes.
[0144] Finally, it should be noted that: After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present invention. The present invention is intended to cover any variations, uses, or adaptations of the present invention, which follow the general principles of the present invention and include common general knowledge or conventional technical means in the technical field not disclosed in the present invention. It is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.
Claims
1. A multivariate load forecasting method, characterized in that: include: Obtaining load sequence data corresponding to each element load in the most recent historical time period and influencing factor sequence data corresponding to the multi-element load in the most recent historical time period, wherein the multi-element load includes electric load, heat load and cooling load; splicing the load sequence data and the influencing factor sequence data respectively corresponding to each of the loads to obtain comprehensive sequence data; The load sequence data of each load and the comprehensive sequence data are input into an encoder of a multivariate load forecasting network model, and in the encoder, based on a cross attention mechanism, the strong correlation features between the multivariate loads and the influencing factors are focused on according to the load sequence data of each load and the comprehensive sequence data, and fusion features are extracted; According to the fusion characteristics, the decoder of the multi-element load prediction network model is used to perform independent prediction of the multi-element loads, and the load prediction results corresponding to each of the loads are obtained.
2. The multivariate load forecasting method according to claim 1, characterized in that: The encoder comprises 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 corresponding to the load, and obtain the load time series features of the corresponding load; The second time series feature extraction layer is used to extract the time series features of the comprehensive sequence data to obtain comprehensive time series features; The feature focusing layer is used to focus on obtaining strong correlation features between the multivariate load and the 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 perform feature splicing on the load time series feature and the strong correlation feature to obtain a spliced time series feature; The first feature mapping layer is used to perform nonlinear mapping of feature time series distribution on the spliced time series features to obtain the fused features.
3. The multivariate load forecasting method according to claim 2, characterized in that: The feature focusing layer is specifically used for: The load time series characteristics corresponding to each load are spliced to obtain multivariate load time series characteristics; In the cross-attention mechanism calculation, the weight of the associated features of each load and the target load is determined according to the multi-load time series features and the comprehensive time series features; The weights of the associated features are dot-product scaled to prevent them from entering the gradient saturation region of the normalization function; the weights after dot-product scaling are nonlinearly mapped through the normalization function; the nonlinear mapping weights are multiplied by the comprehensive time series features to focus on obtaining the strong correlation features between the multivariate loads and the influencing factors.
4. The multivariate load forecasting method according to claim 2, characterized in that: The method of performing independent prediction of multiple loads through a decoder of the multiple load prediction network model according to the fusion feature to obtain load prediction results corresponding to each of the loads includes: The final hidden state when the first time series feature extraction layer extracts time series features for each meta-load and the fusion features are input into the decoder of the multi-element load prediction network model to perform independent prediction of the multi-element loads, so as to obtain the load prediction results corresponding to each of the loads.
5. The multivariate load forecasting method according to claim 4, characterized in that: The decoder comprises a temporal prediction layer and a second feature mapping layer corresponding to the load, wherein: The time series prediction layer is used to use the final hidden state when extracting the time series features of the corresponding load as the initial state information, perform load prediction according to the fusion features, and obtain load prediction data of the corresponding load; The second feature mapping layer is used to perform nonlinear feature mapping of feature time series distribution on the load forecast data to obtain a load forecast result of the corresponding load.
6. The multivariate load forecasting method according to claim 5, characterized in that: The first temporal feature extraction layer, the second temporal feature extraction layer and the temporal prediction layer are all based on a gated recurrent unit GRU.
7. The multivariate load forecasting method according to any one of claims 1 to 6, characterized in that: The loss function of training the multivariate load forecasting network model reflects the predicted loss of electric load, the predicted loss of thermal load and the predicted loss of cooling load.
8. A multivariate load forecasting device, characterized in that: include: An acquisition module, used to acquire load sequence data corresponding to each element load in the most recent historical time period and sequence data of influencing factors corresponding to the multi-element load in the most recent historical time period, wherein the multi-element load includes electric load, heat load and cooling load; A splicing module, used for performing feature splicing on the load sequence data and the influencing factor sequence data respectively corresponding to each of the loads to obtain comprehensive sequence data; A fusion feature extraction module, used for inputting the load sequence data of each load and the comprehensive sequence data into an encoder of a multivariate load forecasting network model, wherein the encoder focuses on the strong correlation features between the multivariate loads and the influencing factors based on the load sequence data of each load and the comprehensive sequence data based on a cross attention mechanism, and extracts fusion features; The prediction module is used to perform independent prediction of multiple loads through the decoder of the multiple load prediction network model according to the fusion characteristics, and obtain the load prediction results corresponding to each of the loads.
9. A multivariate load forecasting device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.
Citation Information
Patent Citations
Ship track prediction method and system fusing data quality control and Transform network
CN116541708A
Time series data reconstruction method based on multi-head attention mechanism
CN116992224A
Spinning workshop detection method and device, electronic equipment and storage medium
CN117726990A
Charging station cluster load prediction method and system based on deep fusion of exogenous variables
CN118504792A
Blood glucose prediction method based on LSTM encoder-decoder architecture
CN118942719A
Cited By
Temperature regulation demand prediction method and device, electronic equipment and storage medium
CN120671089A
Time sequence prediction method and system based on multi-source feature fusion
CN120705813A
Multi-element load hybrid prediction method, system and equipment of integrated energy system and medium
CN120855331A
Comprehensive energy system multi-element load hybrid prediction method, system, device and medium
CN120855331B
Scheduling method of hydrogen-containing integrated energy system considering long-term plan parameters
CN121562388A