CN117237005A - Green electricity demand intelligent prediction method and system considering multidimensional factors - Google Patents

Green electricity demand intelligent prediction method and system considering multidimensional factors Download PDF

Info

Publication number
CN117237005A
CN117237005A CN202311523511.7A CN202311523511A CN117237005A CN 117237005 A CN117237005 A CN 117237005A CN 202311523511 A CN202311523511 A CN 202311523511A CN 117237005 A CN117237005 A CN 117237005A
Authority
CN
China
Prior art keywords
matrix
green electricity
green
model
electricity demand
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311523511.7A
Other languages
Chinese (zh)
Inventor
周进
魏联滨
高毅
李娜
王彬
罗帅
王莹
徐晓萌
赵风松
雷铮
马剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
State Grid Tianjin Electric Power Co Ltd
Economic and Technological Research Institute of State Grid Tianjin Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
State Grid Tianjin Electric Power Co Ltd
Economic and Technological Research Institute of State Grid Tianjin Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, State Grid Tianjin Electric Power Co Ltd, Economic and Technological Research Institute of State Grid Tianjin Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202311523511.7A priority Critical patent/CN117237005A/en
Publication of CN117237005A publication Critical patent/CN117237005A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an intelligent green electricity demand prediction method and system considering multidimensional factors. Inputting the period to be measured into a green electricity demand prediction model to obtain a green electricity demand prediction value of each time point of the period to be measured; the green electricity demand prediction model is obtained by inputting a green electricity market history time sequence into an improved Tansformer model for training, wherein the green electricity market history time sequence comprises green electricity demand, carbon market transaction price, second industrial electricity consumption, coal transaction price and green license transaction price corresponding to a plurality of time points. According to the method, the market trade condition can be better fitted by considering various factors such as the carbon market trade price, the second industrial electricity consumption, the coal trade price and the green certificate trade price, and the green electricity demand is predicted, and meanwhile, an improved Tansformer model is adopted to build a green electricity demand prediction model, so that more accurate prediction can be realized compared with other machine learning models.

Description

Green electricity demand intelligent prediction method and system considering multidimensional factors
Technical Field
The invention relates to the technical field of energy planning, in particular to an intelligent green electricity demand prediction method and system considering multidimensional factors.
Background
To promote clean energy consumption and utilization, the green electric power market scale will be increasing in the future. The green electricity demand is a core element of the green electricity market, and the accurate prediction of the green electricity demand is beneficial to scientifically making a green electricity market strategy and also beneficial to an electric power enterprise to acquire green electricity benefits through reasonable decisions in the green electricity market.
At present, research on power demand prediction is carried out at home and abroad, and the research is mainly focused on the prediction of the total power demand of the national, regional, urban and user levels, but the prediction technology of the green power demand is also deficient. The green electricity demand is taken as a market trading factor, the change of the green electricity demand is influenced by a plurality of factors, and the current prediction is insufficient in consideration of the green electricity demand influence factors, so that the accurate prediction of the green electricity demand is influenced.
Disclosure of Invention
In order to solve the above problems, the present invention has been made by the present inventors and provides, by way of specific embodiments, an intelligent green electricity demand prediction method, system, electronic device, and storage medium that take into consideration multi-dimensional factors.
In a first aspect, an embodiment of the present invention provides an intelligent green electricity demand prediction method considering multidimensional factors, including:
inputting the period to be measured into a green electricity demand prediction model to obtain a green electricity demand prediction value of each time point of the period to be measured;
the green electricity demand prediction model is obtained by inputting a green electricity market history time sequence into an improved Tansformer model for training, and the green electricity market history time sequence comprises green electricity demand, carbon market transaction price, second industrial electricity consumption, coal transaction price and green certificate transaction price corresponding to a plurality of time points.
In a second aspect, an embodiment of the present invention provides an intelligent green electricity demand prediction system considering multidimensional factors, which is configured to input a period to be measured into a green electricity demand prediction model to obtain a green electricity demand prediction value of each time point in the period to be measured; the green electricity demand prediction model is obtained by inputting a green electricity market history time sequence into an improved Tansformer model for training, and the green electricity market history time sequence comprises green electricity demand, carbon market transaction price, second industrial electricity consumption, coal transaction price and green certificate transaction price corresponding to a plurality of time points.
In a third aspect, an embodiment of the present invention provides a method for constructing a green electricity demand prediction model, including the steps of:
and inputting the green electricity market history time sequence into an improved Tansformer model, and training to obtain a green electricity demand prediction model, wherein the green electricity market history time sequence comprises green electricity demand, carbon market transaction price, second industrial electricity consumption, coal transaction price and green certificate transaction price corresponding to a plurality of time points.
Based on the same inventive concept, an embodiment of the present invention provides an electronic device, including: the intelligent green electricity demand prediction system comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor realizes the intelligent green electricity demand prediction method considering the multidimensional factors when executing the computer program.
Based on the same inventive concept, the embodiment of the invention provides a computer storage medium, wherein computer executable instructions are stored in the computer storage medium, and the computer executable instructions realize the intelligent green electricity demand prediction method considering the multi-dimensional factors when being executed.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
according to the method, the market trade condition can be better fitted by considering various factors such as the carbon market trade price, the second industrial electricity consumption, the coal trade price and the green certificate trade price, and the green electricity demand is predicted, and meanwhile, an improved Tansformer model is adopted to build a green electricity demand prediction model, so that more accurate prediction can be realized compared with other machine learning models.
Additional features and advantages of the invention will be set forth in the description which follows, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
The technical scheme of the invention is further described in detail through the drawings and the embodiments.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a flowchart of an intelligent green electricity demand prediction method taking into consideration multidimensional factors in an embodiment of the invention;
FIG. 2 is a flow chart of a modified Tansformer model data processing in accordance with an embodiment of the present invention;
FIG. 3 is a graph showing the comparison of the predicted effect of the green electricity demand prediction model and other machine learning models in accordance with an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to solve the problems in the prior art, the embodiment of the invention provides an intelligent green electricity demand prediction method, an intelligent green electricity demand prediction system, an electronic device and a storage medium considering multidimensional factors.
The embodiment of the invention provides an intelligent green electricity demand prediction method considering multidimensional factors, the flow of which is shown in figure 1, comprising the following steps:
step S1: and constructing a green electricity demand quantity prediction model.
The green electricity demand prediction model is obtained by inputting a green electricity market history time sequence into an improved Tansformer model for training, and the green electricity market history time sequence comprises green electricity demand, carbon market transaction price, second industrial electricity consumption, coal transaction price and green certificate transaction price corresponding to a plurality of time points.
Before inputting the green electricity market history time series into the improved tan former model, the method comprises the following steps:
the scale of the data range of the relevant influencing factors is different, if there is data with a very large scale range, the influence of the data with a small scale range on model training is easily ignored, and therefore normalization is needed. The green electricity market history time series is converted into logarithmic form by:
xfor green market history time series raw data, max () represents the maximum value function,x’the green electricity market historical time series data is subjected to logarithmic processing; the log normalization is the processing of each data using the following formula for converting the data into its log form in order to better meet the requirements of the model.
And smoothing the green electricity market history time series data through filtering. The collected data often has burrs and noise, and is directly used for predicting and analyzing the poor effect, the original sample data needs to be subjected to smoothing pretreatment, and a Savitzky-Golay filter formula can be used for data smoothing treatment. This can smooth the data while maintaining the data shape without introducing excessive phase delays, workflow is: first, parameters are chosen to configure the working mode of Savitzky-Golay filtering, including the degree of fitting the polynomial (typically 2 to 4) and the window size (typically odd). Second, the coefficients required for Savitzky-Golay filtering are calculated based on the selected parameters, and these coefficients are pre-calculated for weighted averaging of adjacent data points. Then, for each data point, the data points within the window (the number being the window size) are weighted averaged with the corresponding coefficients to generate a smoothed data sequence. Finally, a boundary process is performed to ensure that the boundary points are smoothed as well. The Savitzky-Golay filter formula can effectively remove noise in the original data set, so that the original data drawing curve becomes smooth, and the situation of over-fitting or under-fitting is avoided.
Specifically, the smoothing processing is performed on the green electricity market history time series data through filtering, and the method comprises the following steps:
by passing throughObtaining a filtered value matrixPBRepresenting a matrix of filtered valuesPData matrix after corresponding fitting with time pointsXRelation matrix between->TIndicating the time point corresponding to the data matrix to be fitted, and superscripttransRepresenting the transpose of the corresponding matrix. Obtain->The process of (1) is as follows: the data corresponding to 2n+1 time points before and after each time point of the green electricity market history time sequence is used for polynomial +.>Fitting to obtain 2n+1 polynomials,tindicating a point in timetThe corresponding data to be fitted is obtained,x t indicating a point in timetThe data after the fitting is used to determine,a 0 to the point ofa k-1 Is a parameter of a polynomial, and the method comprises the following steps of,k-1representing the highest order of the polynomial;
converting 2n+1 polynomials into matrix form to obtain
ε t-n To the point ofε t+n Respectively represent time pointst-nTo the point oft+nThe above matrix equation is reduced to +.>Representation->,/>Representation->,/>Representation->,/>Representation->
Least squares solution of matrix A corresponding to polynomial parametersDenoted as->SuperscripttransThe transpose is represented by the number,Trepresenting a data matrix to be fitted corresponding to the time points,Xrepresenting the fitted data matrix corresponding to the time points,Xcorresponding filter value matrixPRepresented as
BRepresenting a matrix of filtered valuesPPost-fitting data matrix corresponding to time pointsXThe relation matrix between them, get->. The above procedure is also called Savitzky-Golay filtering.
Specifically, the green electricity market history time series is input into an improved Tansformer model training, which comprises the following steps:
dividing the green electricity market history time sequence into a plurality of non-overlapping subsets, taking each subset as a test set, taking other subsets as training sets, inputting an improved Tansformer model for multi-round testing, and recording test performance indexes obtained by the corresponding test sets; determining the average value of the testing performance indexes of each subset as the improved testing performance index of the Tansformer model; the trained improved Tansformer model was determined as a green electricity demand prediction model. For example, q-fold cross-validation is used to divide the data set into q folds, each fold is used as a test set in turn, the remaining q-1 folds are used as training sets, and cross-validation is performed multiple times. The method comprises the following specific steps: first, the original dataset is divided into q non-overlapping subsets, each of which is called a fold. Second, for each fold r, the r-th fold is taken as the test set and the remaining q-1 folds are taken as the training set. The model is then trained on the training set and performance evaluations are performed on the test set. Then, calculating performance indexes of the model in the r-th cross verification, such as accuracy, precision, recall rate and the like. Repeating the above process until each fold is used as a test set, thereby finishing q times of cross validation, and averaging the performance indexes of each time of cross validation to obtain the average performance estimation of the model. When the test sample is used for verification, the root mean square error or the average absolute error can be used for measuring the prediction accuracy.
Through the data normalization processing, the data smoothing processing and the data set dividing method, data are converted into a format suitable for model input, a transducer model suitable for tasks is selected, preprocessed carbon market transaction price, second industrial electricity consumption, coal transaction price and green license transaction price data are transmitted to the model as input variables, green electricity demand is used as an output variable, and the model is used for predicting the green electricity demand.
As shown in fig. 2, the modified tan former model comprises the following steps: position coding is carried out on input data through a sine and cosine function, and the time sequence relation of the input data of a Tansformer model is increased; the method comprises the steps of inputting a sample input matrix of input data position codes, and obtaining a query matrix, a key matrix and a value matrix through three different linear transformations respectively; the query matrix, the key matrix and the value matrix are input into a multi-head causal attention module, the output of the multi-head causal attention module is input into a fully-connected feedforward neural network layer, and the output data of the fully-connected feedforward neural network layer is normalized through residual connection.
Specifically, the method for performing position coding on input data through a sine and cosine function and increasing the time sequence relation of the input data of a Tansformer model comprises the following steps:
position encoding of input data is performed by
And->Respectively represent +.>The elements of the position are in2iAnd2i+1position coding of dimensions>For element positions in the green electricity market history time series,ifor the dimension of elements in the green electricity market history time series,dis the dimension of the position vector in the improved tan former model.
Specifically, the sample input matrix of the input data position code is respectively subjected to three different linear transformations to obtain a query matrix, a key matrix and a value matrix, and the method comprises the following steps:
the sample input matrix corresponding to the green electricity market history time sequence position code is subjected to the following linear transformation to obtain a query matrix, a key matrix and a value matrix,
X’sample input matrix corresponding to time series position code representing green electricity market history, < >>、/>And->Three different linear transformation weight matrices,QKandVrepresenting a query matrix, a key matrix and a value matrix respectively,Linear() Representing a linear transformation function.
Specifically, the query matrix, key matrix and value matrix are input into a multi-head causal attention module, comprising the steps of:
the following equations for inputting query, key, and value matrices into the multi-headed causal attention module
Attention() Representing an attention function, softmax () representing a normalized exponential function, mask () representing a mask operation, the mask setting the upper triangle element of the matrix without diagonal to minus infinity, ensuring that the attention of a point can only be calculated by the element before the point, preventing information leakage, and enabling the correlation calculation to be calculated towards the history direction; meanwhile, the spatial characteristics of strong and weak correlation are enhanced/weakened, namely the spatial characteristics of strong correlation are stronger, the spatial characteristics of weak correlation are weaker, and the model is better focused on important information.QKAndVrespectively representing a query matrix, a key matrix and a value matrix, and superscripttransRepresenting the transpose of the corresponding matrix,d k’ as a gradient factor, the gradient factor is,、/>and->Respectively isQKAndVfirst, theiThe linear transformation weight matrix of the header,head i representation ofQKAndVfirst, theiThe head-causal attention matrix,Concatin order to splice the multi-head causal attention moment array, h represents the total number of the multi-head causal attention moment arrays,W 0 a linear transformation weight matrix spliced by the multi-head causal attention moment matrix,MultiHead() Representing the multi-headed causal attention module output function.
Specifically, the method inputs the output of the multi-head causal attention module into the fully-connected feedforward neural network layer, and comprises the following steps:
the output data Z of the multi-head causal attention module is input into a fully connected feedforward neural network layer to perform the following calculation
F FN () Representing a fully connected feed forward neural network layer function, max () representing a maximum function, Z representing the output data of the multi-headed causal attention module, W 1 And W is 2 Representing two weights in a fully connected feed forward neural network layer function,b 1 andb 2 representing the bias in the fully connected feed forward neural network layer function.
Specifically, the output data of the fully connected feedforward neural network layer is normalized through residual connection, and the method comprises the following steps:
inputting the output data of the fully connected feedforward neural network layer into the following formula
S Out Time series of green-containing demand predictions output for improved Tansformer model, LN () is a layer normalization function, ++>Is thatS Out To the last output data of (a)S Out Is initialized to the first output data of (a),/>Output data representing a fully connected feed forward neural network layer,/->Output data representing the j-th fully connected feed forward neural network layer,/th fully connected feed forward neural network layer>、/>Respectively mean and variance in layer normalization, < >>、/>The gain and bias in layer normalization, e represents the adjustment parameters, respectively.
Step S2: and inputting the period to be measured into a green electricity demand prediction model to obtain a green electricity demand prediction value of each time point of the period to be measured.
In a specific embodiment, a green electricity demand prediction model in the technical scheme is adopted to predict green electricity demand in a certain region, preprocessed carbon market trading price, second industrial electricity consumption, coal trading price and green certificate trading price data are used as input variables of an improved converter model, green electricity demand is used as output variables, and Python software is used for programming calculation. The modified transducer model parameters were set as follows: the multi-head number h is 4, the dimension d is 64, the total connection layer node number is 128, the hidden layer neuron number is 512, and the dropout is 0.2.dropout is the probability of randomly setting the output of some neurons to 0 during the training process. Setting dropout can reduce the dependency relationship among neurons, so that the network is more robust and has stronger generalization capability. But in the test phase dropout will be turned off and all neurons will participate in the calculation. 100 data sets are used as training samples to be brought into an improved transducer model for training, the optimal parameter values of the improved transducer model for green electricity demand prediction are obtained, the data sets are divided through a q-fold cross validation method, the first 67 data sets are selected as training sets, and the last 33 data sets are selected as test sets.
In order to demonstrate the improvement of the accuracy of the transducer model prediction, the green electricity demand prediction results are shown in fig. 3 using a green electricity demand prediction model and a linear regression, a ridge regression, and a gray prediction model. According to the calculation prediction results of fig. 3, the root mean square error and the average absolute error of the green electricity demand prediction model, the linear regression model, the ridge regression model and the gray prediction model are calculated respectively, wherein the root mean square error and the average absolute error of the green electricity demand prediction model are 9.75% and 1.23% respectively, the root mean square error and the average absolute error of the linear regression model are 25.94% and 9.81% respectively, the root mean square error and the average absolute error of the ridge regression model are 37.61% and 18.48% respectively, and the root mean square error and the average absolute error of the gray prediction model are 41.87% and 17.91% respectively. The method shows that the accuracy of the improved transducer model prediction through the multi-head causal attention and the feedforward neural network is higher, and the green electricity demand prediction model provided by the invention is used as a novel intelligent machine learning algorithm and has a larger application potential in the green electricity demand prediction problem.
In the method of the embodiment, the prediction of the green power demand considers a plurality of factors such as the carbon market trade price, the second industrial power consumption, the coal trade price and the green certificate trade price, so that the market trade situation can be better fitted, and meanwhile, an improved Tansformer model is adopted to build a green power demand prediction model, so that more accurate prediction can be realized compared with other machine learning models.
Those skilled in the art can change the order described above without departing from the scope of the present disclosure.
The invention further provides an intelligent green electricity demand prediction system considering multidimensional factors, which is used for inputting a period to be measured into a green electricity demand prediction model to obtain a green electricity demand prediction value of each time point of the period to be measured; the green electricity demand prediction model is obtained by inputting a green electricity market history time sequence into an improved Tansformer model for training, and the green electricity market history time sequence comprises green electricity demand, carbon market transaction price, second industrial electricity consumption, coal transaction price and green certificate transaction price corresponding to a plurality of time points.
The improved Tansformer model is particularly used for: position coding is carried out on input data through a sine and cosine function, and the time sequence relation of the input data of a Tansformer model is increased; the method comprises the steps of inputting a sample input matrix of input data position codes, and obtaining a query matrix, a key matrix and a value matrix through three different linear transformations respectively; the query matrix, the key matrix and the value matrix are input into a multi-head causal attention module, the output of the multi-head causal attention module is input into a fully-connected feedforward neural network layer, and the output data of the fully-connected feedforward neural network layer is normalized through residual connection.
The system in the above embodiments, the specific implementation of which has been described in detail in the embodiments related to the method, will not be described in detail here.
In this embodiment, the prediction of the green power demand considers a plurality of factors such as the carbon market trade price, the second industrial power consumption, the coal trade price, the green certificate trade price, and the like, so that the market trade situation can be better fitted, and meanwhile, an improved Tansformer model is adopted to build a green power demand prediction model, so that more accurate prediction can be realized compared with other machine learning models.
The invention further provides a green electricity demand prediction model construction method, which comprises the following steps:
and inputting the green electricity market history time sequence into an improved Tansformer model, and training to obtain a green electricity demand prediction model, wherein the green electricity market history time sequence comprises green electricity demand, carbon market transaction price, second industrial electricity consumption, coal transaction price and green certificate transaction price corresponding to a plurality of time points.
Specifically, the improved Tansformer model comprises the following steps: position coding is carried out on input data through a sine and cosine function, and the time sequence relation of the input data of a Tansformer model is increased; the method comprises the steps of inputting a sample input matrix of input data position codes, and obtaining a query matrix, a key matrix and a value matrix through three different linear transformations respectively; the query matrix, the key matrix and the value matrix are input into a multi-head causal attention module, the output of the multi-head causal attention module is input into a fully-connected feedforward neural network layer, and the output data of the fully-connected feedforward neural network layer is normalized through residual connection.
In the process of constructing the green electricity demand prediction model, the method considers a plurality of factors such as the carbon market transaction price, the second industrial electricity consumption, the coal transaction price and the green certificate transaction price, can better fit market transaction conditions, and meanwhile adopts an improved Tansformer model to establish the green electricity demand prediction model, so that more accurate prediction can be realized compared with other machine learning models.
Based on the same inventive concept, an embodiment of the present invention provides an electronic device, a structure of which is shown in fig. 4, including: the intelligent green electricity demand prediction system comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor realizes the intelligent green electricity demand prediction method considering the multidimensional factors when executing the computer program.
Based on the same inventive concept, the embodiment of the invention provides a computer storage medium, wherein computer executable instructions are stored in the computer storage medium, and the computer executable instructions realize the intelligent green electricity demand prediction method considering the multi-dimensional factors when being executed.
Any modifications, additions, and equivalents within the principles of the present invention shall fall within the scope of the patent coverage of this patent.

Claims (16)

1. The intelligent green electricity demand prediction method taking multidimensional factors into consideration is characterized by comprising the following steps of:
inputting the period to be measured into a green electricity demand prediction model to obtain a green electricity demand prediction value of each time point of the period to be measured;
the green electricity demand prediction model is obtained by inputting a green electricity market history time sequence into an improved Tansformer model for training, and the green electricity market history time sequence comprises green electricity demand, carbon market transaction price, second industrial electricity consumption, coal transaction price and green certificate transaction price corresponding to a plurality of time points.
2. The method of claim 1, comprising the steps of, prior to inputting the green electricity market history time series into the modified tan former model:
the green electricity market history time series is converted into logarithmic form by:
xfor green market history time series raw data, max () represents the maximum value function,x’ the green electricity market historical time series data is subjected to logarithmic processing;
and smoothing the green electricity market history time series data through filtering.
3. The method of claim 2, wherein smoothing the green market history time-series data by filtering comprises the steps of:
by passing throughObtaining a filtered value matrixPBRepresenting a matrix of filtered valuesPData matrix after corresponding fitting with time pointsXRelation matrix between->TIndicating the time point corresponding to the data matrix to be fitted, and superscripttransRepresenting the transpose of the corresponding matrix.
4. The method of claim 1, wherein inputting the green electricity market history time series into a modified tan former model training comprises the steps of:
dividing the green electricity market history time sequence into a plurality of non-overlapping subsets, taking each subset as a test set, taking other subsets as training sets, inputting an improved Tansformer model for multi-round testing, and recording test performance indexes obtained by the corresponding test sets;
determining the average value of the testing performance indexes of each subset as the improved testing performance index of the Tansformer model;
the trained improved Tansformer model was determined as a green electricity demand prediction model.
5. The method of claim 1, wherein modifying the tan former model comprises the steps of:
position coding is carried out on input data through a sine and cosine function, and the time sequence relation of the input data of a Tansformer model is increased;
the method comprises the steps of inputting a sample input matrix of input data position codes, and obtaining a query matrix, a key matrix and a value matrix through three different linear transformations respectively;
the query matrix, the key matrix and the value matrix are input into a multi-head causal attention module, the output of the multi-head causal attention module is input into a fully-connected feedforward neural network layer, and the output data of the fully-connected feedforward neural network layer is normalized through residual connection.
6. The method of claim 5, wherein the position encoding of the input data by a sine-cosine function increases the timing relationship of the input data of the tan former model, comprising the steps of:
position encoding of input data is performed by
;/>And->Respectively represent +.>The elements of the position are in2iAnd2i+1position coding of dimensions>For element positions in the green electricity market history time series,ifor the dimension of elements in the green electricity market history time series,dis the dimension of the position vector in the improved tan former model.
7. The method of claim 5, wherein the sample input matrix of the input data position code is subjected to three different linear transformations to obtain a query matrix, a key matrix, and a value matrix, respectively, comprising the steps of:
the sample input matrix corresponding to the green electricity market history time sequence position code is subjected to the following linear transformation to obtain a query matrix, a key matrix and a value matrix,
X’sample input matrix corresponding to time series position code representing green electricity market history, < >>、/>And->Three different linear transformation weight matrices,QKandVrepresenting a query matrix, a key matrix and a value matrix respectively,Linear() Representing a linear transformation function.
8. The method of claim 5, wherein inputting the query matrix, the key matrix, and the value matrix into the multi-headed cause and effect attention module comprises the steps of:
the following equations for inputting query, key, and value matrices into the multi-headed causal attention module
;Attention() Representing the attention function, softmax () representing the normalized exponential function, mask () representing the mask operation, the mask setting the upper triangle element of the matrix without diagonal to minus infinity,QKandVrespectively representing a query matrix, a key matrix and a value matrix, and superscripttransRepresenting the transpose of the corresponding matrix,d k’ is a gradient factor->、/>And->Respectively isQKAndVfirst, theiThe linear transformation weight matrix of the header,head i representation ofQKAndVfirst, theiThe head-causal attention matrix,Concatin order to splice the multi-head causal attention moment array, h represents the total number of the multi-head causal attention moment arrays,W 0 a linear transformation weight matrix spliced by the multi-head causal attention moment matrix,MultiHead() Representing the multi-headed causal attention module output function.
9. The method of claim 5, wherein inputting the output of the multi-head causal attention module into the fully-connected feedforward neural network layer, comprises the steps of:
the output data Z of the multi-head causal attention module is input into a fully connected feedforward neural network layer to perform the following calculation
F FN () Representing a fully connected feed forward neural network layer function, max () representing a maximum function, Z representing the output data of the multi-headed causal attention module, W 1 And W is 2 Representing two weights in a fully connected feed forward neural network layer function,b 1 andb 2 representing the bias in the fully connected feed forward neural network layer function.
10. The method of claim 5, wherein normalizing the output data of the fully connected feedforward neural network layer by the residual connection comprises the steps of:
inputting the output data of the fully connected feedforward neural network layer into the following formula
S Out Time series of green-containing demand predictions output for improved Tansformer model, LN () is a layer normalization function, ++>Is thatS Out To the last output data of (a)S Out Is initialized to the first output data, +.>Output data representing a fully connected feed forward neural network layer,/->Output data representing the j-th fully connected feed forward neural network layer,/th fully connected feed forward neural network layer>、/>Respectively mean and variance in layer normalization, < >>、/>The gain and bias in layer normalization, e represents the adjustment parameters, respectively.
11. An intelligent green electricity demand prediction system considering multidimensional factors, which is characterized in that:
the system is used for inputting the period to be measured into a green electricity demand prediction model to obtain a green electricity demand prediction value of each time point of the period to be measured; the green electricity demand prediction model is obtained by inputting a green electricity market history time sequence into an improved Tansformer model for training, and the green electricity market history time sequence comprises green electricity demand, carbon market transaction price, second industrial electricity consumption, coal transaction price and green certificate transaction price corresponding to a plurality of time points.
12. The system of claim 11, wherein the modified tan former model is specifically configured to:
position coding is carried out on input data through a sine and cosine function, and the time sequence relation of the input data of a Tansformer model is increased; the method comprises the steps of inputting a sample input matrix of input data position codes, and obtaining a query matrix, a key matrix and a value matrix through three different linear transformations respectively; the query matrix, the key matrix and the value matrix are input into a multi-head causal attention module, the output of the multi-head causal attention module is input into a fully-connected feedforward neural network layer, and the output data of the fully-connected feedforward neural network layer is normalized through residual connection.
13. The green electricity demand prediction model construction method is characterized by comprising the following steps of:
and inputting the green electricity market history time sequence into an improved Tansformer model, and training to obtain a green electricity demand prediction model, wherein the green electricity market history time sequence comprises green electricity demand, carbon market transaction price, second industrial electricity consumption, coal transaction price and green certificate transaction price corresponding to a plurality of time points.
14. The method of claim 13, wherein modifying the tan former model comprises the steps of:
position coding is carried out on input data through a sine and cosine function, and the time sequence relation of the input data of a Tansformer model is increased;
the method comprises the steps of inputting a sample input matrix of input data position codes, and obtaining a query matrix, a key matrix and a value matrix through three different linear transformations respectively;
the query matrix, the key matrix and the value matrix are input into a multi-head causal attention module, the output of the multi-head causal attention module is input into a fully-connected feedforward neural network layer, and the output data of the fully-connected feedforward neural network layer is normalized through residual connection.
15. An electronic device, comprising: a memory, a processor and a computer program stored on the memory and running on the processor, which processor, when executing the computer program, implements the intelligent green electricity demand prediction method taking into account the multi-dimensional factors according to any one of claims 1 to 10.
16. A computer storage medium having stored therein computer executable instructions that when executed implement the intelligent green electricity demand prediction method of any one of claims 1 to 10 taking into account multi-dimensional factors.
CN202311523511.7A 2023-11-16 2023-11-16 Green electricity demand intelligent prediction method and system considering multidimensional factors Pending CN117237005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311523511.7A CN117237005A (en) 2023-11-16 2023-11-16 Green electricity demand intelligent prediction method and system considering multidimensional factors

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311523511.7A CN117237005A (en) 2023-11-16 2023-11-16 Green electricity demand intelligent prediction method and system considering multidimensional factors

Publications (1)

Publication Number Publication Date
CN117237005A true CN117237005A (en) 2023-12-15

Family

ID=89084798

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311523511.7A Pending CN117237005A (en) 2023-11-16 2023-11-16 Green electricity demand intelligent prediction method and system considering multidimensional factors

Country Status (1)

Country Link
CN (1) CN117237005A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112653142A (en) * 2020-12-18 2021-04-13 武汉大学 Wind power prediction method and system for optimizing depth transform network
CN113988449A (en) * 2021-11-05 2022-01-28 国家电网有限公司西北分部 Wind power prediction method based on Transformer model
CN116258057A (en) * 2022-12-28 2023-06-13 山西省能源互联网研究院 Method for carrying out photovoltaic power generation predictive analysis based on Transformer
CN116596139A (en) * 2023-05-17 2023-08-15 国网四川省电力公司德阳供电公司 Short-term load prediction method and system based on Elman neural network
CN116680540A (en) * 2023-06-19 2023-09-01 成都理工大学 Wind power prediction method based on deep learning
CN116911442A (en) * 2023-06-27 2023-10-20 太原科技大学 Wind power generation amount prediction method based on improved transducer model
CN116957131A (en) * 2023-05-17 2023-10-27 贵州电网有限责任公司 Power generation power prediction method based on hierarchical time sequence and Informier model fusion

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112653142A (en) * 2020-12-18 2021-04-13 武汉大学 Wind power prediction method and system for optimizing depth transform network
CN113988449A (en) * 2021-11-05 2022-01-28 国家电网有限公司西北分部 Wind power prediction method based on Transformer model
CN116258057A (en) * 2022-12-28 2023-06-13 山西省能源互联网研究院 Method for carrying out photovoltaic power generation predictive analysis based on Transformer
CN116596139A (en) * 2023-05-17 2023-08-15 国网四川省电力公司德阳供电公司 Short-term load prediction method and system based on Elman neural network
CN116957131A (en) * 2023-05-17 2023-10-27 贵州电网有限责任公司 Power generation power prediction method based on hierarchical time sequence and Informier model fusion
CN116680540A (en) * 2023-06-19 2023-09-01 成都理工大学 Wind power prediction method based on deep learning
CN116911442A (en) * 2023-06-27 2023-10-20 太原科技大学 Wind power generation amount prediction method based on improved transducer model

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
汪惟源 等: "考虑新电改及绿证交易的中长期负荷预测方法", 《电气自动化》, vol. 42, no. 02, pages 64 - 66 *
蒋良吉: "基于深度神经网络的多元时间序列预测方法研究", 《中国优秀硕士学位论文全文数据库基础科学辑》, no. 10, pages 14 - 16 *

Similar Documents

Publication Publication Date Title
Liu et al. Remaining useful life prediction using a novel feature-attention-based end-to-end approach
CN111339712A (en) Method for predicting residual life of proton exchange membrane fuel cell
CN114399032B (en) Method and system for predicting metering error of electric energy meter
CN111079989B (en) DWT-PCA-LSTM-based water supply amount prediction device for water supply company
CN112289391B (en) Anode aluminum foil performance prediction system based on machine learning
CN110222830B (en) Deep feed-forward network fault diagnosis method based on adaptive genetic algorithm optimization
CN115146700B (en) Runoff prediction method based on transform sequence-to-sequence model
CN102680646A (en) Method of soft measurement for concentration of reactant in unsaturated polyester resin reacting kettle
CN117056874A (en) Unsupervised electricity larceny detection method based on deep twin autoregressive network
CN116975645A (en) Industrial process soft measurement modeling method based on VAE-MRCNN
CN114239949A (en) Website access amount prediction method and system based on two-stage attention mechanism
CN117172589A (en) Industry typical user power demand response potential evaluation method
CN117237005A (en) Green electricity demand intelligent prediction method and system considering multidimensional factors
CN111863153A (en) Method for predicting total amount of suspended solids in wastewater based on data mining
CN115809725A (en) Multi-factor short-term electric quantity prediction method and device
Wang A new variable selection method for soft sensor based on deep learning
Hu et al. Optimized convolutional neural networks for fault diagnosis in wastewater treatment processes
CN116106430B (en) Acoustic emission technology-based refractory material cracking diagnosis method for casting
CN113205174B (en) Summer peak load prediction method and system based on feature decoupling deep neural network model
CN113283533B (en) Borrowable sample screening method and system for performance decline time series data
CN117577981B (en) Photovoltaic power generation energy storage control method and system
CN117590267A (en) Early warning method and system for performance degradation of energy storage battery
CN117009752A (en) Power consumption demand prediction method based on POA-VMD-SSA-KELM model
CN115905955A (en) Rotary machine fault diagnosis method based on prior wavelet group strategy fusion
CN117217351A (en) High-precision learning electric power auxiliary decision-making method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination