Power load and electricity price joint prediction method and system based on multi-task learning
By performing time-series decomposition and deep fusion of power load and electricity price sequences, and utilizing learnable channel attention and cross-task interactive gating units, the gradient conflict and negative transfer problems in the power load and electricity price prediction model are solved, thereby improving the accuracy and consistency of the prediction results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHAANXI HYDROPOWER DEVELOPMENT GROUP CO LTD
- Filing Date
- 2026-01-30
- Publication Date
- 2026-05-08
AI Technical Summary
Existing power load and electricity price prediction models suffer from gradient conflicts and negative migration, which cannot guarantee that the prediction results are consistent with the actual situation at the relational level, and they have weak ability to extract complex features.
By performing time-series decomposition on historical power load and electricity price sequences, a multi-scale joint input feature vector is constructed. A learnable channel attention module is used to generate task-biased shared features, which are then deeply fused through a cross-task interactive gating unit. Finally, a joint total loss function is constructed by combining load prediction loss, electricity price prediction loss, and relationship consistency loss.
It improves the model's ability to extract complex features, alleviates task conflicts and negative transfer problems, and ensures that the prediction results are consistent with the real situation in terms of trends and relationships, thereby improving prediction accuracy.
Smart Images

Figure CN121638591B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of joint forecasting technology. More specifically, this invention relates to a method and system for joint forecasting of power load and electricity price based on multi-task learning. Background Technology
[0002] Electricity load reflects users' electricity demand, while electricity prices are affected by various factors such as supply and demand, generation costs, and market strategies. Electricity load and electricity prices show a mutual influence relationship over time.
[0003] When studying the problem of electricity load and price forecasting, researchers often treat it as two independent single-task forecasting problems, that is, they build forecasting models for two separate tasks. However, this approach severs the inherent connection between electricity load and electricity price, and fails to fully utilize their interaction mechanism over time.
[0004] To leverage the correlation between electricity load and electricity price, existing technologies employ a multi-task learning framework for joint prediction of these two factors. In terms of specific network structure, a low-level network structure with shared hard parameters is typically used, where two tasks share a single feature extractor before connecting to their respective independent prediction heads. This method attempts to improve prediction accuracy by sharing information between different tasks to some extent through the shared low-level feature extraction network.
[0005] However, while the multi-task learning framework can link electricity load and electricity price through information sharing, it still has significant shortcomings. First, the hard parameter sharing structure forces all tasks to use the same feature representation, making it difficult to distinguish the different preferences of different tasks for shared features. This can easily lead to gradient conflicts and negative transfer between tasks, thus affecting the training effect of the joint prediction model. Second, existing joint prediction models usually construct the joint loss by simply adding the loss functions of each task. This approach lacks modeling and constraints on the correlation structure between the electricity load and electricity price prediction sequences, and cannot guarantee that the prediction results are consistent with the actual situation at the relational level. In addition, directly using the original time series containing various complex patterns such as trends, periodicity, and random fluctuations as input to the joint prediction model increases the difficulty of network learning and distinguishing features at different scales, limiting the joint prediction model's ability to extract features from complex time series. Summary of the Invention
[0006] The purpose of this invention is to propose a method and system for joint prediction of power load and electricity price based on multi-task learning, in order to solve the problems in the prior art that easily lead to gradient conflicts and negative transfer phenomena between different tasks, cannot guarantee that the prediction results are consistent with the actual situation at the relational level, and the joint prediction model has weak ability to extract complex features; to this end, this invention provides solutions in the following two aspects.
[0007] In a first aspect, the present invention provides a method for joint forecasting of power load and electricity price based on multi-task learning, comprising:
[0008] Historical power load sequences, historical electricity price sequences, meteorological data, and calendar data are acquired. Time-series decomposition is performed on the historical power load sequences and historical electricity price sequences to obtain their respective trend components, periodic components, and residual components. The decomposed components are concatenated with the meteorological and calendar data to construct a multi-scale joint input feature vector sequence. This multi-scale joint input feature vector sequence is input into a shared feature extraction network to obtain a shared feature representation. A learnable channel attention module is used to adjust the channel weights of the shared feature representation to generate task-biased shared features. The task-biased shared features are then input into… Preliminary power load characteristics and preliminary electricity price characteristics are obtained from the dedicated networks for power load tasks and electricity price tasks. These characteristics are then fused using a cross-task interaction gating unit to generate deeply fused load task characteristics and electricity price task characteristics. Based on these deeply fused characteristics, the predicted power load and electricity price values for the target time are generated through a prediction head network. Load prediction loss, electricity price prediction loss, and relationship consistency loss are calculated, and the three are weighted and summed to obtain a joint total loss function. The network parameters are then updated based on this joint total loss function.
[0009] Preferably, the step of performing time-series decomposition on the historical power load sequence and the historical electricity price sequence to obtain their respective trend components, periodic components and residual components includes: using a decomposition algorithm based on local weighted regression scatter smoothing; decomposing the historical power load sequence input to the decomposition algorithm into load trend components, load periodic components and load residual components; and decomposing the historical electricity price sequence input to the decomposition algorithm into electricity price trend components, electricity price periodic components and electricity price residual components.
[0010] Preferably, the step of inputting the multi-scale joint input feature vector sequence into a shared feature extraction network to obtain a shared feature representation includes: the shared feature extraction network adopting a bidirectional gated recurrent unit network; inputting the multi-scale joint input feature vector sequence into the bidirectional gated recurrent unit network, extracting temporal features from both positive and negative directions through forward and backward gated recurrent unit layers respectively, and concatenating the forward and backward hidden layer states to form a shared feature representation.
[0011] Preferably, the step of adjusting the channel weights of the shared feature representation using a learnable channel attention module to generate task-biased shared features includes: squeezing the shared feature representation through a global average pooling layer to obtain channel representations; inputting the channel representations into a bottleneck structure consisting of two fully connected layers for activation to learn the weight coefficients of each channel; and multiplying the learned weight coefficients by the shared feature representation by channel to generate task-biased shared features.
[0012] Preferably, the step of inputting the shared features of the task bias into the dedicated network for power load tasks and the dedicated network for electricity price tasks to obtain preliminary power load features and preliminary electricity price features includes: inputting the shared features of the task bias into the first fully connected layer, which serves as the dedicated network for power load tasks, and the second fully connected layer, which serves as the dedicated network for electricity price tasks, to obtain preliminary power load features and preliminary electricity price features.
[0013] Preferably, the step of fusing the preliminary power load characteristics and preliminary electricity price characteristics using a cross-task interactive gating unit to generate deeply fused load task characteristics and electricity price task characteristics includes: generating a load gating signal by passing the preliminary electricity price characteristics through a third fully connected layer and a Sigmoid activation function; performing element-wise multiplication of the load gating signal and the preliminary power load characteristics to obtain load characteristics modulated by electricity price information; generating an electricity price gating signal by passing the preliminary power load characteristics through a fourth fully connected layer and a Sigmoid activation function; performing element-wise multiplication of the electricity price gating signal and the preliminary electricity price characteristics to obtain electricity price characteristics modulated by load information; adding the preliminary power load characteristics and the load characteristics modulated by electricity price information to generate deeply fused load task characteristics; and adding the preliminary electricity price characteristics and the electricity price characteristics modulated by load information to generate deeply fused electricity price task characteristics.
[0014] Preferably, the step of generating the target time's power load forecast and power price forecast values through a prediction head network based on the deeply fused load task characteristics and power price task characteristics includes: the prediction head network being a first multilayer perceptron and a second multilayer perceptron with identical structures, the multilayer perceptron consisting of two fully connected layers and a linear output layer; inputting the deeply fused load task characteristics into the first multilayer perceptron and outputting the target time's power load forecast value; inputting the deeply fused power price task characteristics into the second multilayer perceptron and outputting the target time's power price forecast value.
[0015] Preferably, the method for calculating the relationship consistency loss is as follows: calculate the Pearson correlation coefficient between the predicted power load sequence and the predicted electricity price sequence; calculate the Pearson correlation coefficient between the actual power load sequence and the actual electricity price sequence; and take the absolute value of the difference between the two Pearson correlation coefficients as the relationship consistency loss.
[0016] Preferably, both the load forecast loss and the electricity price forecast loss are calculated using the mean absolute error function.
[0017] In the second aspect, the power load and electricity price joint forecasting system based on multi-task learning includes:
[0018] The processor and memory, wherein the memory stores computer program instructions for joint forecasting of power load and electricity price based on multi-task learning, and when the computer program instructions are executed by the processor, the above-described joint forecasting method of power load and electricity price based on multi-task learning is implemented.
[0019] The beneficial effects of this invention are as follows: First, by performing time-series decomposition on historical power load sequences and historical electricity price sequences respectively, this invention constructs a multi-scale joint input feature vector sequence, reducing the difficulty of network learning and improving the model's ability to extract complex features. Second, in the sharing layer, this invention utilizes a learnable channel attention module to generate task-biased shared features, alleviating the task conflict and negative transfer problems existing in traditional hard parameter sharing mechanisms, enabling shared information to serve their respective prediction tasks. Furthermore, this invention utilizes a cross-task interaction gating unit to deeply fuse information between two task-specific networks, uncovering the deep-seated mutual influence relationship between power load and electricity price. Finally, this invention introduces a relationship consistency loss to construct a joint total loss function based on load prediction loss and electricity price prediction loss, ensuring that the prediction results remain consistent with the actual situation in terms of trends and interrelationships. Attached Figure Description
[0020] Figure 1 The flowchart illustrating the steps of the power load and electricity price joint forecasting method based on multi-task learning in this embodiment is shown in the schematic diagram.
[0021] Figure 2 The schematic diagram illustrates the structural block diagram of the power load and electricity price joint prediction system based on multi-task learning in this embodiment. Detailed Implementation
[0022] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0023] like Figure 1As shown, the power load and electricity price joint forecasting method based on multi-task learning in this embodiment includes steps S1 to S4:
[0024] Step S1: Obtain historical power load sequence, historical electricity price sequence, meteorological data, and calendar data; perform time-series decomposition on the historical power load sequence and historical electricity price sequence respectively to obtain their respective trend components, periodic components, and residual components; concatenate the decomposed components with the meteorological data and calendar data to construct a multi-scale joint input feature vector sequence.
[0025] In this embodiment, historical power load sequences and historical electricity price sequences, along with corresponding meteorological and calendar data for the same time period, are obtained from the power company's database or public datasets, with sampling intervals of hours. Specifically, temperature, humidity, and wind speed can be selected as meteorological data; and day of the week and holiday status can be selected as calendar data.
[0026] In one embodiment, performing time-series decomposition on the historical power load series and the historical electricity price series to obtain their respective trend components, periodic components, and residual components includes:
[0027] A decomposition algorithm based on local weighted regression scatter smoothing is adopted; the historical power load sequence input to the decomposition algorithm is decomposed into load trend component, load cycle component and load residual component; the historical electricity price sequence input to the decomposition algorithm is decomposed into electricity price trend component, electricity price cycle component and electricity price residual component.
[0028] Specifically, a decomposition algorithm based on local weighted regression scatter smoothing, also known as the STL time series decomposition algorithm, is adopted. This algorithm iteratively separates the original time series data into three components that are easy for the model to learn. For example, the historical power load series composed of power load data from the past week is decomposed as follows: Power load data from the past week is obtained, forming a sequence of length... The historical power load sequence is input into the STL time series decomposition algorithm, and a smooth long-term trend line is fitted through local regression. The length of this trend line is... This reflects the overall increase or decrease in load over a week; if the trend line appears as a smooth curve sequence with values slowly rising from 110MW to 140MW, then this sequence represents the load trend component. Subsequently, from a length of... Subtracting the load trend component from the historical power load sequence yields the detrended sequence. The STL time series decomposition algorithm identifies recurring patterns in the detrended sequence, such as daily peak-and-trough patterns on a 24-hour basis, forming the load cycle component, where the load is lower in the early morning and peaks in the afternoon. Subtracting the load cycle component again from the detrended sequence removes both the load trend component and the load cycle component, leaving a sequence containing random noise, i.e., the load residual component. The decomposition algorithm then decomposes the sequence into a length of... Historical power load sequences are decomposed into three components of length: load trend component, load cycle component, and load residual component. subsequence.
[0029] Similarly, the same decomposition steps are performed on the historical electricity price series to obtain the electricity price trend component, electricity price cycle component, and electricity price residual component, which have the same length as the historical electricity price series.
[0030] One-hot encoding is performed on the day of the week and whether it is a holiday in the calendar data. At each time step, the load trend component, load cycle component, load residual component, electricity price trend component, electricity price cycle component, electricity price residual component, temperature, humidity, wind speed, and the one-hot encoded day of the week and whether it is a holiday are concatenated along the feature dimension to obtain a multi-scale joint input feature vector, which in turn forms a high-dimensional multi-scale joint input feature vector sequence.
[0031] Step S2: Input the multi-scale joint input feature vector sequence into the shared feature extraction network to obtain the shared feature representation; use the learnable channel attention module to adjust the channel weights of the shared feature representation to generate task-biased shared features.
[0032] In one embodiment, the step of inputting the multi-scale joint input feature vector sequence into a shared feature extraction network to obtain a shared feature representation includes:
[0033] The shared feature extraction network adopts a bidirectional gated recurrent unit network. The multi-scale joint input feature vector sequence is input into the bidirectional gated recurrent unit network, and temporal features are extracted from both the forward and backward directions through the forward and backward gated recurrent unit layers, respectively. The forward and backward hidden layer states are then concatenated to form a shared feature representation.
[0034] Specifically, the multi-scale joint input feature vector sequence is a time series containing multiple features. The bidirectional gated recurrent unit (BiGRU) network comprises a forward network and a backward network. For an input feature sequence covering the past week (168 hours), i.e., the multi-scale joint input feature vector sequence, the forward network processes data sequentially from the first hour to the 168th hour. At the 168th hour node, it generates a hidden state vector summarizing all past information, resulting in a 128-dimensional vector. Simultaneously, the backward network processes data in reverse chronological order from the 168th hour back to the first hour. At the first hour node, it generates a hidden state vector summarizing all future information, also a 128-dimensional vector, where "future" refers to the future relative to the input multi-scale joint input feature vector sequence. The 128-dimensional vector generated by the forward network and the 128-dimensional vector generated by the backward network are concatenated to form a 256-dimensional shared feature representation. This shared feature representation simultaneously contains a summary of past and future information at a single point in time.
[0035] In an optional embodiment, the shared feature extraction network may also employ a multi-layer long short-term memory network.
[0036] Specifically, the constructed multi-scale joint input feature vector sequence is input into a shared feature extraction network composed of a multi-layer long short-term memory network (LSTM). The LSTM network encodes the temporal features of the input and outputs a shared feature representation containing the common patterns of power load and electricity price.
[0037] In one embodiment, adjusting the channel weights of the shared feature representation using a learnable channel attention module to generate task-biased shared features includes:
[0038] The shared feature representation is squeezed by a global average pooling layer to obtain channel representations; the channel representations are input into a bottleneck structure consisting of two fully connected layers for activation to learn the weight coefficients of each channel; the learned weight coefficients are multiplied by the shared feature representation by channel to generate task-biased shared features.
[0039] Specifically, the 256-dimensional shared feature representation formed above has 256 channels. This shared feature representation is fed into two independent, learnable channel attention modules. Each channel attention module consists of a global average pooling layer and two fully connected layers, learning channel weights for different tasks. Further, global average pooling is performed on the values of each channel across all time steps, compressing the time-series information of each channel into a single value. For example, when the input shared feature representation has 168 time steps, the 168 values of the first channel are averaged to obtain a single value. The same operation is performed on the second channel until all channels are processed, resulting in a channel representation containing 256 values. This 256-dimensional channel representation is input into the bottleneck structure. A fully connected layer compresses the dimension from 256 to a smaller value, which can be 16. Another fully connected layer restores the dimension to 256, and a sigmoid activation function is used to restrict the output value to between 0 and 1, ultimately generating a 256-dimensional weight coefficient. Each weight coefficient represents the importance of the corresponding channel. The 256-dimensional weight coefficients are multiplied by the original 256-dimensional shared feature representation channel by channel to generate task-biased shared features. High-importance channel features are amplified, while less important channels are suppressed. Furthermore, the channel attention module corresponding to the power load task learns the weight coefficients for each channel specific to the power load task, enhancing beneficial feature channels and suppressing irrelevant or harmful feature channels, thus generating power load task-biased shared features. Similarly, the channel attention module corresponding to the electricity price task learns the weight coefficients for each channel specific to the electricity price task, generating electricity price task-biased shared features.
[0040] Step S3: Input the shared features of the task bias into the dedicated network for power load task and the dedicated network for electricity price task respectively to obtain preliminary power load features and preliminary electricity price features; use the cross-task interaction gating unit to fuse the preliminary power load features and preliminary electricity price features to generate deeply fused load task features and electricity price task features.
[0041] In one embodiment, the step of inputting the shared features of the task bias into the dedicated network for power load tasks and the dedicated network for electricity price tasks, respectively, to obtain preliminary power load features and preliminary electricity price features, includes:
[0042] The shared features of the task bias are input into the first fully connected layer, which is the dedicated network for power load tasks, and the second fully connected layer, which is the dedicated network for electricity price tasks, respectively, to obtain preliminary power load features and preliminary electricity price features.
[0043] Specifically, the first fully connected layer serves as a dedicated network for power load tasks, and the second fully connected layer serves as a dedicated network for electricity price tasks. The generated shared features biased towards power load tasks are input into the first fully connected layer to extract preliminary power load features. Similarly, the shared features biased towards electricity price tasks are input into the second fully connected layer to extract preliminary electricity price features. Both the preliminary power load features and the preliminary electricity price features can be 128-dimensional.
[0044] In an optional embodiment, both the dedicated network for power load tasks and the dedicated network for electricity price tasks can be composed of a single-layer long short-term memory network (LSTM).
[0045] In one embodiment, the process of fusing preliminary power load characteristics and preliminary electricity price characteristics using a cross-task interaction gating unit to generate deeply fused load task characteristics and electricity price task characteristics includes: generating a load gating signal by passing the preliminary electricity price characteristics through a third fully connected layer and a Sigmoid activation function; performing element-wise multiplication of the load gating signal and the preliminary power load characteristics to obtain load characteristics modulated by electricity price information; generating an electricity price gating signal by passing the preliminary power load characteristics through a fourth fully connected layer and a Sigmoid activation function; performing element-wise multiplication of the electricity price gating signal and the preliminary electricity price characteristics to obtain electricity price characteristics modulated by load information; adding the preliminary power load characteristics and the load characteristics modulated by electricity price information to generate deeply fused load task characteristics; and adding the preliminary electricity price characteristics and the electricity price characteristics modulated by load information to generate deeply fused electricity price task characteristics.
[0046] Specifically, the 128-dimensional preliminary electricity price feature vector is input into a gating unit consisting of a fully connected layer (the third fully connected layer) and a Sigmoid activation function for processing, generating a 128-dimensional load gating signal as an interactive gating weight, with a value between 0 and 1. The load gating signal is then multiplied element-wise with the preliminary power load features to amplify or reduce certain dimensions of the load features, resulting in a load feature modulated by electricity price information. Through residual connections, the load feature modulated by electricity price information is added back to the original preliminary power load features to generate a deeply fused load task feature. This allows the information from the preliminary electricity price features to be integrated into the preliminary power load features, enabling load forecasting to reference electricity price information.
[0047] Similarly, the 128-dimensional preliminary electricity load characteristics are input into a gating unit consisting of a fourth fully connected layer and a Sigmoid activation function for processing, generating a 128-dimensional electricity price gating signal, which also serves as an interactive gating weight; this value is between 0 and 1. The electricity price gating signal is then multiplied element-wise with the preliminary electricity price characteristics to obtain an electricity price characteristic modulated by the load information. This load-modulated electricity price characteristic is then added back to the preliminary electricity price characteristic to generate a deeply fused electricity price task characteristic, which integrates the information from the preliminary electricity load characteristics into the preliminary electricity price characteristic. Through deep fusion of information from two different tasks, each task's feature contains its own original information as well as auxiliary modulation information from the other task.
[0048] Step S4: Based on the deeply fused load task characteristics and electricity price task characteristics, generate the target time's power load forecast value and electricity price forecast value through the prediction head network; calculate the load forecast loss, electricity price forecast loss, and relationship consistency loss, and sum the three by weight to obtain the joint total loss function; update the network parameters based on the joint total loss function.
[0049] In one embodiment, generating the target time's power load forecast and electricity price forecast values through a prediction head network based on the deeply fused load task characteristics and electricity price task characteristics includes:
[0050] The prediction head network consists of a first multilayer perceptron and a second multilayer perceptron with the same structure. The multilayer perceptron consists of two fully connected layers and a linear output layer.
[0051] The deeply fused load task features are input into the first multilayer sensor, which outputs the predicted power load value at the target time; the deeply fused electricity price task features are input into the second multilayer sensor, which outputs the predicted electricity price value at the target time.
[0052] Specifically, a first multilayer perceptron, consisting of two fully connected layers and a linear output layer, serves as the power load prediction head network. The deeply fused load task features are input into the first multilayer perceptron to predict the power load. The output dimension is consistent with the prediction step size, thus obtaining the predicted power load value for the future target time. Similarly, a second multilayer perceptron, consisting of two fully connected layers and a linear output layer, serves as the electricity price prediction head network. The deeply fused electricity price task features are input into the second multilayer perceptron to predict the electricity price, generating the predicted electricity price value for the target time. Understandably, taking a 128-dimensional vector as an example of the generated deeply fused load task features, when input into the first multilayer perceptron, the 128-dimensional load task feature vector is transformed into a 64-dimensional intermediate vector through the first fully connected layer, and then transformed into a 32-dimensional vector through the second fully connected layer. During the above transformation process, activation functions are typically used to enhance the model's expressive power. A linear output layer converts the 32-dimensional vector into a single numerical value, which is the predicted power load value for the target time, in MW. Similarly, the generated deep fusion electricity price task feature is also a 128-dimensional vector. When it is input into the second multilayer perceptron, the 128-dimensional electricity price task feature vector is also processed by two fully connected layers for dimensionality reduction. It is then mapped to a single numerical value through a linear output layer. This numerical value is the predicted value of the electricity price at the target time, in yuan per kilowatt-hour.
[0053] Through the above process, it can be ensured that each task can learn the optimal mapping relationship from features to results based on the feature distribution, and map the high-dimensional task features after deep fusion to the prediction results.
[0054] In one embodiment, both the load forecasting loss and the electricity price forecasting loss are calculated using the mean absolute error function.
[0055] The formula for calculating the load forecast loss is as follows: ;
[0056] In the formula, For load forecasting losses, , The first The actual and predicted power load values for each sample. It is the absolute value symbol. The total number of samples.
[0057] The formula for calculating the electricity price forecast loss is as follows: ;
[0058] In the formula, Forecasting losses for electricity prices, , The first The actual and predicted electricity prices for each sample. It is the absolute value symbol. The total number of samples.
[0059] Specifically, For the power load, the difference between the predicted and actual power load values is calculated using the mean absolute error function as the load prediction loss. For electricity prices, the difference between the predicted and actual electricity prices is calculated using the mean absolute error function (MAE) as the electricity price prediction loss. For example, the actual electricity load values for three samples are 150MW, 200MW, and 180MW, while the predicted electricity load values at the target time are 155MW, 190MW, and 182MW. The absolute values of their differences are 5, 10, and 2, respectively. The average of these three values is 5.67, and this average value is the load prediction loss for this batch of samples. Similarly, the electricity price prediction loss can be calculated using the exact same method.
[0060] In one embodiment, the method for calculating the relationship consistency loss is as follows:
[0061] Calculate the Pearson correlation coefficient between the predicted power load series and the predicted electricity price series; calculate the Pearson correlation coefficient between the actual power load series and the actual electricity price series; and take the absolute value of the difference between the two Pearson correlation coefficients as the consistency loss.
[0062] The formula for calculating the relationship consistency loss is as follows: ;
[0063] In the formula, For relationship consistency loss, For the predicted power load sequence, For the predicted electricity price series, For the predicted power load sequence With the predicted electricity price series The Pearson correlation coefficient between them For the actual power load sequence, For the true electricity price series, For the actual power load sequence With the real electricity price series The Pearson correlation coefficient between them It is the absolute value symbol.
[0064] Specifically, the difference between the correlation between predicted sequences and the correlation between actual sequences is calculated, and this difference is taken as the consistency loss. In essence, the Pearson correlation coefficient between the actual power load sequence and the actual electricity price sequence over a given time period is calculated; the Pearson correlation coefficient between the predicted power load sequence and the predicted electricity price sequence over the same time period is also calculated; the consistency loss is the absolute value of the difference between the two Pearson correlation coefficient values. This consistency loss constrains the correlation between the predicted sequences, ensuring that power load and electricity prices are not only numerically reliable but also consistent with reality in their interaction over time, thus improving the overall accuracy and reasonableness of the joint forecast.
[0065] After calculating the load forecasting loss, electricity price forecasting loss, and relationship consistency loss, a joint total loss function is constructed by weighted summation of the three. During model training, the Adam optimizer is used, and the gradient of the joint total loss function with respect to all learnable parameters in the network is calculated using the backpropagation algorithm. The parameters are then updated in the reverse direction of the gradient until the joint total loss function converges.
[0066] This invention also provides a joint forecasting system for power load and electricity price based on multi-task learning. For example... Figure 2 As shown, the system includes a processor and a memory. The memory stores computer program instructions for joint forecasting of power load and electricity price based on multi-task learning. When the computer program instructions are executed by the processor, the joint forecasting method for power load and electricity price based on multi-task learning according to the present invention is implemented.
[0067] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and therefore will not be described in detail here.
[0068] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented by computer-readable / executable instructions stored or otherwise maintained on such a computer-readable medium.
[0069] In the description of this specification, "multiple" means at least two, such as two, three or more, etc., unless otherwise expressly and specifically defined.
[0070] While various embodiments of the invention have been shown and described in this specification, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention.
Claims
1. A method for joint forecasting of power load and electricity price based on multi-task learning, characterized in that, include: Acquire historical power load sequences, historical electricity price sequences, meteorological data, and calendar data; Time series decomposition was performed on the historical power load series and the historical electricity price series to obtain their respective trend components, periodic components and residual components; the decomposed components were then concatenated with meteorological data and calendar data to construct a multi-scale joint input feature vector sequence. The multi-scale joint input feature vector sequence is input into the shared feature extraction network to obtain the shared feature representation; By utilizing a learnable channel attention module to adjust the channel weights of shared feature representations, task-biased shared features can be generated. The shared features of the task bias are input into the dedicated networks for power load tasks and electricity price tasks, respectively, to obtain preliminary power load features and preliminary electricity price features. The preliminary power load features and preliminary electricity price features are then fused using a cross-task interaction gating unit to generate deeply fused load task features and electricity price task features. This process includes: passing the preliminary electricity price features through a third fully connected layer and a Sigmoid activation function to generate a load gating signal; performing element-wise multiplication of the load gating signal and the preliminary power load features to obtain load features modulated by electricity price information; passing the preliminary power load features through a fourth fully connected layer and a Sigmoid activation function to generate an electricity price gating signal; performing element-wise multiplication of the electricity price gating signal and the preliminary electricity price features to obtain electricity price features modulated by load information; adding the preliminary power load features and the load features modulated by electricity price information to generate deeply fused load task features; and adding the preliminary electricity price features and the electricity price features modulated by load information to generate deeply fused electricity price task features. Based on the deeply fused load and electricity price characteristics, the power load and electricity price forecasts for the target time are generated through the prediction head network; the load forecast loss, electricity price forecast loss, and relationship consistency loss are calculated, and the three are weighted and summed to obtain the joint total loss function; the network parameters are updated based on the joint total loss function. The method for calculating the relationship consistency loss is as follows: calculate the Pearson correlation coefficient between the predicted power load series and the predicted electricity price series; calculate the Pearson correlation coefficient between the actual power load series and the actual electricity price series; and take the absolute value of the difference between the two Pearson correlation coefficients as the relationship consistency loss.
2. The method for joint forecasting of power load and electricity price based on multi-task learning according to claim 1, characterized in that, The process of performing time-series decomposition on historical power load sequences and historical electricity price sequences to obtain their respective trend components, periodic components, and residual components includes: A decomposition algorithm based on local weighted regression scatter smoothing is adopted; the historical power load sequence input to the decomposition algorithm is decomposed into load trend component, load cycle component and load residual component; the historical electricity price sequence input to the decomposition algorithm is decomposed into electricity price trend component, electricity price cycle component and electricity price residual component.
3. The method for joint forecasting of power load and electricity price based on multi-task learning according to claim 1, characterized in that, The step of inputting the multi-scale joint input feature vector sequence into a shared feature extraction network to obtain a shared feature representation includes: The shared feature extraction network adopts a bidirectional gated recurrent unit network. The multi-scale joint input feature vector sequence is input into the bidirectional gated recurrent unit network, and temporal features are extracted from both the forward and backward directions through the forward and backward gated recurrent unit layers, respectively. The forward and backward hidden layer states are then concatenated to form a shared feature representation.
4. The method for joint forecasting of power load and electricity price based on multi-task learning according to claim 1, characterized in that, The step of adjusting the channel weights of the shared feature representation using a learnable channel attention module to generate task-biased shared features includes: The shared feature representation is squeezed by a global average pooling layer to obtain channel representations; the channel representations are input into a bottleneck structure consisting of two fully connected layers for activation to learn the weight coefficients of each channel; the learned weight coefficients are multiplied by the shared feature representation by channel to generate task-biased shared features.
5. The method for joint forecasting of power load and electricity price based on multi-task learning according to claim 1, characterized in that, The shared features of the task bias are input into the dedicated network for power load tasks and the dedicated network for electricity price tasks, respectively, to obtain preliminary power load features and preliminary electricity price features, including: The shared features of the task bias are input into the first fully connected layer, which is the dedicated network for power load tasks, and the second fully connected layer, which is the dedicated network for electricity price tasks, respectively, to obtain preliminary power load features and preliminary electricity price features.
6. The method for joint forecasting of power load and electricity price based on multi-task learning according to claim 5, characterized in that, The process of generating target-time power load and electricity price forecasts using a prediction head network based on the deeply fused load and electricity price characteristics includes: The prediction head network consists of a first multilayer perceptron and a second multilayer perceptron with the same structure. The multilayer perceptron consists of two fully connected layers and a linear output layer. The deeply fused load task features are input into the first multilayer sensor, which outputs the predicted power load value at the target time; the deeply fused electricity price task features are input into the second multilayer sensor, which outputs the predicted electricity price value at the target time.
7. The method for joint forecasting of power load and electricity price based on multi-task learning according to claim 1, characterized in that, Both the load forecast loss and the electricity price forecast loss are calculated using the mean absolute error function.
8. A power load and electricity price joint forecasting system based on multi-task learning, characterized in that, include: A processor and a memory, the memory storing computer program instructions for joint forecasting of power load and electricity price based on multi-task learning, which, when executed by the processor, implement the joint forecasting method for power load and electricity price based on multi-task learning according to any one of claims 1-7.
Citation Information
Patent Citations
Power load prediction method, system and device and storage medium
CN114861967A
Source-load-price multi-task medium and long term prediction method and system based on small sample learning
CN119863140A