Multi-user power consumption feature prediction method based on upper and lower sampling convolutional layers and double prediction heads

By using up-down sampling convolutional layer and double prediction head method in multi-user power consumption sequence prediction, the problem of low accuracy in the prior art is solved, and more efficient time series mode capture and prediction accuracy improvement is achieved.

CN119623722APending Publication Date: 2025-03-14GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411691061.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing recurrent neural networks, Transformer models and convolutional neural networks have low accuracy in multi-user power consumption sequence prediction, making it difficult to effectively capture complex time series patterns.

Method used

Using a method based on up-down sampling convolution layer and dual prediction head, a multi-user power consumption characteristic prediction model is constructed through block sequence, linear transformation layer, downsampling layer, upsampling layer, residual connection layer and one-dimensional convolution layer.

Benefits of technology

Effectively capture the global features of long-term series, improve modeling capabilities, and significantly improve prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623722A_ABST
    Figure CN119623722A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-user power consumption feature prediction method based on upper and lower sampling convolutional layers and double prediction heads. The method sequentially comprises the following steps: firstly, dividing a power consumption time sequence into overlapped or non-overlapped block sequences; encoding the partitioned power consumption sequence through linear transformation so as to capture a dependency relationship between time blocks; then, predicting the coded power consumption time sequence by using a linear prediction head to obtain linear prediction output; secondly, processing the power consumption time sequence by using an upper sampling layer and a lower sampling layer so as to capture a long-term dependency relationship between the sequences; and predicting the processed power consumption time sequence by using a convolution prediction head to obtain convolution prediction output, and finally adding the convolution prediction output and linear prediction output to obtain a final prediction result. A new thought is provided for power consumption feature prediction, and experimental results show that the method has the advantages of efficient processing of a long-time sequence and low error rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of time series prediction, and in particular to a method for predicting multi-user power consumption characteristics based on up- and down-sampling convolutional layers and dual prediction heads, which realizes modeling and prediction of multi-user power consumption data with a long time span through block sequences, up- and down-sampling convolutional layers and dual prediction head mechanisms. Background Art

[0002] The prediction of multi-user electricity consumption characteristics is crucial to industrial production and power management. Existing recurrent neural network methods are insufficient in modeling long-term dependencies and are difficult to effectively capture complex time series patterns. Transformer-based models have the problem of losing important time series information of time series. While convolutional neural network-based models can handle sequence dependencies globally, they have the problem of low accuracy when directly applied to multi-user electricity consumption series prediction. Therefore, this patent proposes an improved method based on the combination of up- and down-sampling convolutional layers and dual prediction heads to improve prediction accuracy. Summary of the invention

[0003] The purpose of the present invention is to provide a multi-user power consumption feature prediction method based on up- and down-sampling convolutional layers and dual prediction heads, which is better in processing complex time dependencies and improving prediction accuracy. The technical solution is as follows:

[0004] Step 1: Suppose there are M users’ electricity consumption time series, where each time step represents the electricity consumption vector of these users within one hour. The time step of the look-back window is L. The electricity consumption time series is represented as an L×M input matrix

[0005] Step 2: Input the last value at the end of the look-back window for each user in the power consumption time series matrix Repeat filling S times;

[0006] Step 3: With a step size of S, each variable of the look-back window length in the electricity consumption time series is Divide into blocks of length P in is the number of generated blocks;

[0007] Step 4: Using Linear Transformation Layer The block sequence x p Transformed into the input sequence x d =x p W p +b p ,in Where D is the dimension of each input hidden layer;

[0008] Step 5: Input sequence Flatten After that, it is input into the linear prediction head The linear prediction output is obtained from Where T is the prediction step length, and the calculation process is:

[0009] h 0 =x 0 W 0 +b 0

[0010] Step 6: Sequence Input the downsampling layer and calculate the downsampling result x ds , the downsampling layer is a convolutional layer with N input channels, N output channels, a convolution kernel size of 3, a stride of 2, and a padding of 1. The specific formula is as follows:

[0011] x ds =DownSampleLayer(x d )

[0012] Among them, the downsampling result

[0013] Step 7: Subtract the downsampling result x ds Input upsampling layer and calculate upsampling result x us , the upsampling layer is a one-dimensional transposed convolution layer with N input channels, N output channels, a convolution kernel size of 3, a stride of 2, and a padding of 1. The specific formula is as follows:

[0014] x us =UpSampleLayer(x ds )

[0015] Among them, the upsampling result

[0016] Step 8: Through the residual connection layer, x us and input x d Add together to get the residual input x r =x us +x d ,in

[0017] Step 9: Input the residual into x r Input into the one-dimensional convolution layer to get the convolution result x c , the input channel of the one-dimensional convolution layer is N, the output channel is N, the convolution kernel is 1, and the calculation process is:

[0018] x c=Conv1D(x r )

[0019] Among them, the convolution output result

[0020] Step 10: Flatten After that, it is input into the linear transformation layer Calculate the transformation result x 1 =x L W L +b L ,in

[0021] Step 11: Transform the result After that, it is input into the linear prediction head The convolution prediction output is obtained The calculation process is:

[0022] h 1 =x 1 W 1 +b 1

[0023] Step 11: Output the linear prediction h 0 And the convolution prediction output h 1 Add together to generate prediction results for the next T time steps

[0024] Step 12: Use the mean square error (MSE) loss function to calculate the loss of each channel using the following formula:

[0025]

[0026] in, represents the predicted value of the i-th time series, Represents the true value of the i-th time series, M represents the number of users in the power consumption time series, and the losses between the predicted values ​​and the true values ​​of the M users are summarized. The summarized losses are averaged to obtain the overall target loss, and the prediction results are evaluated.

[0027] The technical solution provided by the present invention has the following beneficial effects: the global features of long time series are effectively captured by up- and down-sampling convolutional layers, and the modeling capability is improved by using dual prediction heads, thereby performing better in processing complex time dependencies and improving prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0029] Figure 1 A flowchart of a method for predicting multi-user power consumption characteristics based on up- and down-sampling convolutional layers and dual prediction heads provided in an embodiment of the present invention;

[0030] Figure 2 A schematic diagram of a model of a multi-user power consumption feature prediction method based on up- and down-sampling convolutional layers and dual prediction heads provided in an embodiment of the present invention;

[0031] Figure 3 This is the internal process structure diagram of the up and down sampling convolution layer;

[0032] Figure 4 The comparison results of this patent and the mainstream time series prediction model in multi-user power consumption prediction; DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings;

[0034] like Figure 2 As shown, an embodiment of the present invention provides a method for predicting multi-user power consumption characteristics based on up- and down-sampling convolution layers and dual prediction heads, comprising:

[0035] Step 1: Select the public dataset electricity, which contains hourly electricity consumption data of 321 customers from 2012 to 2014. Use the historical data of the specified lookback window length of the dataset to predict the electricity consumption data of 321 customers in the future with the specified output step length. Therefore, there are 321 users' electricity consumption time series, where each time step represents the electricity consumption vector of these users within one hour. The time step of the lookback window is 336. The electricity consumption time series is represented as a 336×321 input matrix

[0036] Step 2: Input the last value at the end of the look-back window for each user in the power consumption time series matrix Perform 8 repeated fillings;

[0037] Step 3: With a step size of 8, each variable in the electricity consumption time series with a look-back window length Divide into blocks of length 21 each Among them, 41 is the number of generated blocks;

[0038] Step 4: Using Linear Transformation Layer The block sequence x p Transformed into the input sequence x d =x p W p +b p ,in Where 512 is the dimension of each input hidden layer;

[0039] Step 5: Input sequence Flatten After that, it is input into the linear prediction head The linear prediction output is obtained from Among them, 96 is the prediction step length, and the calculation process is:

[0040] h 0 =x 0 W 0 +b 0

[0041] Step 6: Figure 3 This is the internal flow diagram of the up- and down-sampling convolutional layer, corresponding to steps 6 to 9. First, the sequence Input the downsampling layer and calculate the downsampling result x ds , the downsampling layer is a convolutional layer with 41 input channels, 41 output channels, a convolution kernel size of 3, a stride of 2, and a padding of 1. The specific formula is as follows:

[0042] x ds =DownSampleLayer(x d )

[0043] Among them, the downsampling result

[0044] Step 7: Subtract the downsampling result x ds Input upsampling layer and calculate upsampling result x us , the upsampling layer is a one-dimensional transposed convolution layer with 41 input channels, 41 output channels, a convolution kernel size of 3, a stride of 2, and a padding of 1. The specific formula is as follows:

[0045] x us =UpSampleLayer(x ds )

[0046] Among them, the upsampling result

[0047] Step 8: Through the residual connection layer, x us and input x dAdd together to get the residual input x r =x us +x d ,in

[0048] Step 9: Input the residual into x r Input into the one-dimensional convolution layer to get the convolution result x c , the input channel of the one-dimensional convolution layer is 41, the output channel is 41, the convolution kernel is 1, and the calculation process is:

[0049] x c =Conv1D(x r )

[0050] Among them, the convolution output result

[0051] Step 10: Flatten After that, it is input into the linear transformation layer Calculate the transformation result x 1 =x L W L +b L ,in

[0052] Step 11: Transform the result After that, it is input into the linear prediction head The convolution prediction output is obtained The calculation process is:

[0053] h 1 =x 1 W 1 +b 1

[0054] Step 11: Output the linear prediction h 0 And the convolution prediction output h 1 Add together and get the prediction results for the next 96 time steps

[0055] Step 12: Use the mean square error (MSE) loss function to calculate the loss of each channel using the following formula:

[0056]

[0057] in, represents the predicted value of the i-th time series, represents the true value of the i-th time series, 321 represents the number of time series, 321 represents the number of users in the power consumption time series, the losses of the predicted values ​​and the true values ​​of 321 users are summarized, the summarized losses are averaged to obtain the overall target loss, and the prediction results are evaluated. Figure 4 By comparing the results of the method proposed in this patent with other mainstream time series prediction models in multi-user power consumption prediction, it can be seen that the MSE (mean square error) value and MAE (mean absolute error) value calculated by the power consumption prediction value and the actual power consumption value of the method proposed in this patent are the smallest compared with other mainstream time series prediction models. This fully demonstrates that the method proposed in this patent can accurately predict power consumption within a long time step, and can help enterprises and managers understand the changing pattern of power demand, optimize energy management, reduce resource waste, and improve power supply efficiency. In addition, by accurately predicting power consumption, this patent can also help power companies to manage loads and ensure sufficient power supply capacity during peak periods.

Claims

1. A method for predicting multi-user power consumption features based on up- and down-sampling convolutional layers and dual prediction heads, characterized in that The following steps are involved: Step 1: Suppose there are M users’ electricity consumption time series, where each time step represents the electricity consumption of these users in one hour. The time step of the look-back window is L. The electricity consumption time series is represented as an L×M input matrix Step 2: Input the last value at the end of the look-back window for each user in the power consumption time series matrix Repeat filling S times; Step 3: With a step size of S, each variable of the look-back window length in the electricity consumption time series is Divide into blocks of length P in is the number of generated blocks; Step 4: Using Linear Transformation Layer The block sequence x p Transformed into input sequence x d =x p W p +b p ,in Where D is the dimension of each input hidden layer; Step 5: Input sequence Flatten After that, it is input into the linear prediction head The linear prediction output is obtained from Where T is the prediction step length, and the calculation process is: h0=x0W0+b0 Step 6: Sequence Input the downsampling layer and calculate the downsampling result x ds , the downsampling layer is a convolutional layer with N input channels, N output channels, a convolution kernel size of 3, a stride of 2, and a padding of 1. The specific formula is as follows: x ds =DownSampleLayer(x d ) Among them, the downsampling result Step 7: Subtract the downsampled result x ds Input upsampling layer and calculate upsampling result x us , the upsampling layer is a one-dimensional transposed convolution layer with N input channels, N output channels, a convolution kernel size of 3, a stride of 2, and a padding of 1. The specific formula is as follows: x us =UpSampleLayer(x ds ) Among them, the upsampling result Step 8: Through the residual connection layer, x us and input x d Add together to get the residual input x r =x us +x d ,in Step 9: Input the residual into x r Input into the one-dimensional convolution layer to get the convolution result x c , the input channel of the one-dimensional convolution layer is N, the output channel is N, the convolution kernel is 1, and the calculation process is: x c =Conv1D(x r ) Among them, the convolution output result Step 10: Flatten After that, it is input into the linear transformation layer The calculated transformation result x1=x L W L +b L ,in Step 11: Transform the result After that, it is input into the linear prediction head The convolution prediction output is obtained The calculation process is: h1=x1W1+b1 Step 11: Add the linear prediction output h0 and the convolution prediction output h1 to generate the prediction results for the next T time steps Step 12: Use the mean square error (MSE) loss function to calculate the loss of each channel using the following formula: in, represents the predicted value of the i-th time series, Represents the true value of the i-th time series, M represents the number of users in the power consumption time series, and the losses between the predicted values ​​and the true values ​​of the M users are summarized. The summarized losses are averaged to obtain the overall target loss, and the prediction results are evaluated.