CN117114056B - Power load prediction model, construction method and device thereof and application - Google Patents

Power load prediction model, construction method and device thereof and application Download PDF

Info

Publication number
CN117114056B
CN117114056B CN202311387481.1A CN202311387481A CN117114056B CN 117114056 B CN117114056 B CN 117114056B CN 202311387481 A CN202311387481 A CN 202311387481A CN 117114056 B CN117114056 B CN 117114056B
Authority
CN
China
Prior art keywords
sub
trend
period
periodic
components
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.)
Active
Application number
CN202311387481.1A
Other languages
Chinese (zh)
Other versions
CN117114056A (en
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.)
CCI China Co Ltd
Original Assignee
CCI China 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 CCI China Co Ltd filed Critical CCI China Co Ltd
Priority to CN202311387481.1A priority Critical patent/CN117114056B/en
Publication of CN117114056A publication Critical patent/CN117114056A/en
Application granted granted Critical
Publication of CN117114056B publication Critical patent/CN117114056B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J3/00Circuit arrangements for ac mains or ac distribution networks
    • H02J3/003Load forecast, e.g. methods or systems for forecasting future load demand
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Abstract

The application provides a power load prediction model, and a construction method, a device and application thereof, wherein the method comprises the following steps: creating a power load prediction model comprising input, encoding and output layers; taking time sequence data as input, and preprocessing by an input layer to obtain trend and periodic components; the coding layer comprises a trend coder and a period coder, the trend coder and the period coder process the trend component and the period component to obtain a trend coding result and a period coding result, the trend coding result and the period coding result are added to form a fusion coding result, and a prediction result is generated through the output layer. The scheme predicts the trend and the periodicity of the power data through a model, so that a power load prediction result in a long time in the future can be obtained.

Description

Power load prediction model, construction method and device thereof and application
Technical Field
The present invention relates to the field of algorithms, and in particular, to a power load prediction model, and a construction method, a device and an application thereof.
Background
The time series model is a method for predicting future data, which finds rules and trends of the data based on analysis of the past data, and then predicts the future data using the information, and the time prediction model can be divided into two main categories: linear models, which assume that there is a linear relationship between data, such as an autoregressive model (AR), a moving average Model (MA), an autoregressive moving average model (ARMA), an autoregressive integrated moving average model (ARIMA), etc., and nonlinear models, which assume that there is a nonlinear relationship between data, such as a neural network model (NN), a support vector machine model (SVM), a random forest model (RF), a long-short term memory network model (LSTM), etc., which are commonly used to predict data of stock prices, air temperatures, sales, etc.
However, the current time prediction model on the market usually only concerns one of time information and frequency information, and the size of a period is confirmed in advance when making period prediction, and power data is very specific, and the existing time prediction model only predicts power load in a short period when predicting the power data, and cannot predict the overall trend of the power load by the time prediction model because a plurality of periodic changes occur in a single time sequence of the power data, and the existing time prediction model cannot make accurate predictions for such power data.
Disclosure of Invention
The embodiment of the application provides a power load prediction model, a construction method, a construction device and application thereof, wherein a trend encoder and a period encoder are constructed in one model, so that the model can capture potential trends and periods simultaneously, and the power load situation in a long time in the future is predicted based on the captured potential trends and periods.
In a first aspect, an embodiment of the present application provides a method for constructing a power load prediction model, where the method includes:
constructing a power load prediction model, wherein the power load prediction model is formed by sequentially connecting an input layer, a coding layer and an output layer in series;
Acquiring time sequence data representing the power load condition as a training sample and inputting the training sample into the input layer, wherein the input layer pre-processes the time sequence data to obtain a trend component and a periodic component;
the coding layer comprises trend encoders and periodic encoders which are connected in parallel, wherein each trend encoder comprises at least two sub-trend encoders, each sub-trend encoder is provided with multi-scale sliding windows with different sizes, each periodic encoder comprises at least two sub-periodic encoders, each sub-periodic encoder is provided with multi-scale sliding windows with different sizes, and the number of the sub-periodic encoders is the same as that of the sub-trend encoders;
acquiring sub-trend components of at least two corresponding window sizes in the trend components based on each multi-scale sliding window, and acquiring sub-period components of at least two corresponding window sizes in the period components based on each multi-scale sliding window;
coding sub-trend components with corresponding window sizes by using each sub-trend coder to obtain at least two sub-trend coding results, integrating a plurality of sub-trend coding results to obtain trend coding results, coding sub-period components with corresponding window sizes by using each sub-period coder to obtain at least two sub-period coding results, integrating a plurality of sub-period coding results to obtain period coding results, and adding the trend coding results and the period coding results to obtain a fusion coding result;
And inputting the fusion coding result to an output layer for outputting to obtain a prediction result, constructing a loss function according to the prediction result, and completing model training when the loss function meets the set condition to obtain a trained power load prediction model.
In a second aspect, embodiments of the present application provide a power load prediction method, including:
and acquiring historical data representing the power load condition, and inputting the historical data into the power load prediction model constructed in the first aspect to obtain a prediction result.
In a third aspect, an embodiment of the present application provides a device for constructing a power load prediction model, including:
the construction module comprises: constructing a power load prediction model, wherein the power load prediction model is formed by sequentially connecting an input layer, a coding layer and an output layer in series;
the acquisition module is used for: acquiring time sequence data representing the power load condition as a training sample and inputting the training sample into the input layer, wherein the input layer pre-processes the time sequence data to obtain a trend component and a periodic component;
a first encoding module: the coding layer comprises trend encoders and periodic encoders which are connected in parallel, wherein each trend encoder comprises at least two sub-trend encoders, each sub-trend encoder is provided with multi-scale sliding windows with different sizes, each periodic encoder comprises at least two sub-periodic encoders, each sub-periodic encoder is provided with multi-scale sliding windows with different sizes, and the number of the sub-periodic encoders is the same as that of the sub-trend encoders;
And a second encoding module: acquiring sub-trend components of at least two corresponding window sizes in the trend components based on each multi-scale sliding window, and acquiring sub-period components of at least two corresponding window sizes in the period components based on each multi-scale sliding window;
and a third encoding module: coding sub-trend components with corresponding window sizes by using each sub-trend coder to obtain at least two sub-trend coding results, integrating a plurality of sub-trend coding results to obtain trend coding results, coding sub-period components with corresponding window sizes by using each sub-period coder to obtain at least two sub-period coding results, integrating a plurality of sub-period coding results to obtain period coding results, and adding the trend coding results and the period coding results to obtain a fusion coding result;
and an output module: and inputting the fusion coding result to an output layer for outputting to obtain a prediction result, constructing a loss function according to the prediction result, and completing model training when the loss function meets the set condition to obtain a trained power load prediction model.
In a fourth aspect, embodiments of the present application provide an electronic device comprising a memory and a processor, the memory having stored therein a computer program, the processor being arranged to run the computer program to perform a method of constructing a power load prediction model or a method of predicting a power load.
In a fifth aspect, embodiments of the present application provide a readable storage medium having a computer program stored therein, the computer program including program code for controlling a process to execute a process including a method of constructing a power load prediction model or a method of predicting a power load.
The main contributions and innovation points of the invention are as follows:
according to the scheme, the trend encoder and the period encoder are simultaneously built in one model, so that the model can capture the potential trend and the period of a long term and a short term simultaneously, and the prediction is made based on the factors of the trend and the period, and the power load condition of a long time in the future can be predicted because the scheme predicts based on the potential trend and the period; according to the scheme, the trend component and the periodic component are processed by setting the multi-scale sliding window, so that the model can automatically determine the period length without manually confirming before the data is input into the model; the scheme designs the periodic time-frequency block with the weight shared by a plurality of cores, and can extract different periodic characteristics by using different channels.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the other features, objects, and advantages of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a flow chart of a method of constructing a power load prediction model according to an embodiment of the present application;
FIG. 2 is a block diagram of a power load prediction model according to an embodiment of the present application;
FIG. 3 is a block diagram of a sub-trend encoder in an embodiment of the present application;
FIG. 4 is a schematic diagram of a trend time-frequency block processing sub-frequency domain trend components in an embodiment of the present application;
FIG. 5 is a block diagram of a sub-period encoder in an embodiment of the present application;
FIG. 6 is a schematic diagram of a single-core periodic time-frequency block processing sub-frequency domain periodic components in an embodiment of the present application;
FIG. 7 is a schematic diagram of a multi-core periodic time-frequency block processing sub-frequency domain periodic components in an embodiment of the present application;
FIG. 8 is a block diagram of a power load prediction model building apparatus according to an embodiment of the present application;
fig. 9 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with aspects of one or more embodiments of the present description as detailed in the accompanying claims.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
To facilitate an understanding of the present solution, the technology presented in the present solution is explained here:
short-term fourier transform (Short-Time Fourier Transform, STFT): is a method for analyzing non-stationary signals. The basic idea is to divide the signal into several small segments and then fourier transform each small segment to obtain the energy distribution of the signal at different times and frequencies. The short term fourier transform can be represented by the following formula:
where x (t) is the signal to be analyzed, w (t) is the window function, τ is the time parameter, ω is the frequency parameter. The function of the window is to localize the signal, i.e. only the characteristics of the signal over a certain period of time are of interest. Different window functions affect the result of the short-term fourier transform and therefore require the selection of an appropriate window function depending on the characteristics of the signal and the purpose of the analysis.
Example 1
The embodiment of the application provides a method for constructing a power load prediction model, and specifically referring to fig. 1, the method includes:
constructing a power load prediction model, wherein the power load prediction model is formed by sequentially connecting an input layer, a coding layer and an output layer in series;
acquiring time sequence data representing the power load condition as a training sample and inputting the training sample into the input layer, wherein the input layer pre-processes the time sequence data to obtain a trend component and a periodic component;
the coding layer comprises trend encoders and periodic encoders which are connected in parallel, wherein each trend encoder comprises at least two sub-trend encoders, each sub-trend encoder is provided with multi-scale sliding windows with different sizes, each periodic encoder comprises at least two sub-periodic encoders, each sub-periodic encoder is provided with multi-scale sliding windows with different sizes, and the number of the sub-periodic encoders is the same as that of the sub-trend encoders;
acquiring sub-trend components of at least two corresponding window sizes in the trend components based on each multi-scale sliding window, and acquiring sub-period components of at least two corresponding window sizes in the period components based on each multi-scale sliding window;
coding sub-trend components with corresponding window sizes by using each sub-trend coder to obtain at least two sub-trend coding results, integrating a plurality of sub-trend coding results to obtain trend coding results, coding sub-period components with corresponding window sizes by using each sub-period coder to obtain at least two sub-period coding results, integrating a plurality of sub-period coding results to obtain period coding results, and adding the trend coding results and the period coding results to obtain a fusion coding result;
And inputting the fusion coding result to an output layer for outputting to obtain a prediction result, constructing a loss function according to the prediction result, and completing model training when the loss function meets the set condition to obtain a trained power load prediction model.
Specifically, the present solution selects the power load situation as time series data, the power load value at each time point is arranged according to the time series to obtain the time series data, the time series data obtained in the present solution is a historical time series x= [ X1, X2, ], where L is the length of a backtracking window, each time vector xt represents a multivariate time point of D dimension (number of channels in a multivariate time series) at time T, because the time series data in the present solution includes multidimensional data of weather situation, temperature, humidity, etc., each time vector represents a multivariate time point of multiple dimensions, which correspond to different dimensions in the time series data, in the present solution xt represents the power load value at time T, the objective of the present solution is to predict a time series Xhat time T (T > 1) according to the historical time series X representing the power load situation, i.e., the prediction result in the present solution is that Xhat time T times x= [ xhatl+1, xhatl+t ], xhat e R T ×d, xhat time.
In some embodiments, as shown in fig. 2, in the step of preprocessing the time series data by the input layer to obtain a trend component and a periodic component, the time series data is subjected to reversible normalization processing to obtain a normalized sequence, and then the normalized sequence is subjected to moving average operation to obtain a trend component, and the normalized sequence subtracts the trend component to obtain the periodic component.
Specifically, the time sequence data is a historical time sequence, and the distribution offset effect between the training data and the test data can be reduced by carrying out reversible normalization on the time sequence data, wherein the reversible normalization is expressed as follows:
since x= [ [ X1, X2 ], xL]So that the standard deviation of the mean value of each single variable time series xi in the time series data X representing the electric power is 0, X no Is a normalization sequence.
Specifically, the normalized sequence is decomposed by a sequence decomposition block to extract different information of the period part and the trend part so as to obtain a trend component and a period component, and the specific formula is as follows:
wherein, in the sequence dividing block, a trend part in the time sequence is obtained through moving average operation, and the rest part is a period part in the time sequence, X tr Representing trend components, X se Representing the periodic component, padding is the Padding of the time data for alignment, avgPool represents a moving average operation for smoothing the periodic concealment variable that does not change the length of the sequence. In this embodiment, the trend component refers to long-term trend information in the power load data, and the period component refers to information of each period in the power load data.
Specifically, since the periodic signal can satisfy dirichlet conditions, the normalized sequence subtracts the trend component to obtain the periodic component.
According to the scheme, the multi-scale sliding window is constructed, so that the period size is not required to be confirmed in advance, the period length can be automatically determined, and the period is not required to be confirmed before the model is input.
In the step of using each sub-trend encoder to encode sub-trend components with corresponding window sizes to obtain at least two sub-trend encoding results, the structure of the sub-trend encoder is shown in fig. 3, the sub-trend encoder is formed by sequentially connecting a short-term fourier transform layer, a trend time-frequency block, a frequency feedforward network and an inverse short-term fourier transform layer in series, the short-term fourier transform layer performs fourier transform on the sub-trend components to obtain sub-frequency domain trend components, the sub-frequency domain trend components are input into the trend time-frequency block to obtain sub-frequency trend components, the sub-frequency trend components are input into the frequency feedforward network to obtain sub-frequency trend components, and the sub-frequency trend components are combined and then are input into the inverse short-term fourier transform layer to obtain sub-trend encoding results.
It should be noted that, each sub-trend encoder corresponds to a multi-scale sliding window size of one size, and the window size of the short-term fourier transform layer in the corresponding sub-trend encoder is adjusted by using the multi-scale sliding window size to analyze the time domain frequency.
In this scheme, the content of each sub-trend component is the same, but the size of the sliding window corresponding to each sub-trend component is different.
Specifically, the present scheme analyzes the frequency of an unsteady state signal and observes its time evolution using an STFT (short-term fourier transform) in the short-term fourier transform layer, the STFT converting a time sequence from a time domain to a time-frequency domain, dividing an input time sequence into overlapping frames, and performing a discrete fourier transform on each frame, the STFT being expressed as:
wherein Window (Window function) represents the size combined after Fourier transform, the Window function corresponds to the size of a multi-scale sliding Window of the current sub-trend encoder, m represents index values (0, 1,2,3, …) in the Window, n is a Window number, l is the distance between two windows, and can be understood as the step size of Window movement, m+nl means the index value of the whole input, the value when entering the Window range is 1 or 0, The complex number of units with an argument of 2πmω/S is represented, j is an imaginary unit, m is a frequency index, ω is an angular frequency, and S is a window length.
The sub-frequency domain trend component is processed by a short-term Fourier transform layer, the shape of the sub-frequency domain trend component serving as an output matrix is D multiplied by M multiplied by N, D is an input characteristic dimension, and is determined by the input dimension which is made during input, M is sampling distribution in a single window, and M= (S/2) +1 is met. N is the number of windows, satisfying n= (L/1) +1, L is the length of a single timing input x.
For example, assuming that the multi-scale sliding Window size of a sub-trend encoder is 5, the input length of the sub-trend component representing the power load condition is 20, the Window step l is 3, M is 3, n is 7, let M be 0 at this time, i.e., the first index in a single Window, n be 1 be the first Window, because s=5, m=3 (where m=3 means that 5 positions are drawn in a Window according to the distribution), the resulting distribution vector of the Window function is Window [0] = [1,0,1,0,1], the matrix shape is [1,5], where X [ m+nl ] = X [3], a 5 (S) long segment starting with the 4 th value of X is assumed, and then Window [0] X3 ] = [2,0,4,0,6], after removing the 0 portion is [2,4,6].
Further, the schematic diagram of the trend time-frequency block processing sub-frequency domain trend components is shown in fig. 4, and the trend time-frequency blocks in all sub-trend encoders use the same kernel to learn the potential trend in the corresponding sub-frequency domain trend components.
That is, the training parameters used by the trending time-frequency block in all the sub-trending encoders in this scheme are the same.
Specifically, the trend time-frequency block learns each univariate time sequence on the ith channel by using a shared kernel to obtain a potential trend, and the formula is as follows:
wherein,time-frequency block representing trend, < >>Representing each one-dimensional time sequence on the ith channel, the final output of the trending time-frequency block is +.>Different channels refer to features of different dimensions, in this scheme the different channels are the output of the short-term fourier transform layer in each trending encoder.
Further, the frequency feedforward network is a full-connection layer, and the full-connection layer in the frequency feedforward network accumulates time-frequency information of a frequency side in the sub-frequency trend component in a time step through an activation function to obtain the sub-frequency trend component.
Specifically, the activation function in the fully connected layer is a Tanh activation function.
Further, the inverse short-term Fourier transform layer performs inverse discrete Fourier transform on the vector obtained by combining the sub-frequency trend component and the sub-frequency trend component, and adds the inverse signals in an overlapping manner to obtain a sub-trend coding result.
The specific calculation formula of the inverse short-term fourier transform layer is as follows:
wherein X [ n ]]The result is encoded for the sub-trend,and the vector is formed by combining the sub-frequency trend component and the sub-frequency trend component.
In the step of encoding the sub-period components with the corresponding window sizes by the sub-period encoder to obtain at least two sub-period encoding results, the structure of the sub-period encoder is shown in fig. 5, the sub-period encoder is formed by sequentially connecting a short-term fourier transform layer, a period time-frequency block, a frequency feedforward network and an inverse short-term fourier transform layer in series, the short-term fourier transform layer performs fourier transform on the sub-period components to obtain sub-frequency domain periodic components, the sub-frequency domain periodic components are input into the period time-frequency block to obtain sub-frequency periodic components, the sub-frequency periodic components are input into the frequency feedforward network to obtain sub-frequency periodic components, and the sub-frequency periodic components are combined and then are input into the inverse short-term fourier transform layer to obtain the sub-period encoding results.
Specifically, the structure of the sub-period encoder and the structure of the sub-trend encoder in the scheme are all the same except for the period time-frequency block, so the scheme is not repeated here, and only the structure and the function of the period time-frequency block are introduced.
In this scheme, the multi-scale sliding window sizes of the sub-trend encoder and the sub-period encoder of the same hierarchy are the same and share a backbone structure other than the trend time-frequency block and the period time-frequency block.
Specifically, the content of each sub-period component is the same, but the size of the sliding window corresponding to each sub-period component is different.
Further, a schematic diagram of processing sub-frequency domain periodic components by a single-core periodic time-frequency block is shown in fig. 6, a single core is set in each periodic time-frequency block, and the periodic time-frequency block performs periodic learning based on the sub-periodic components by disassembling the single core into two core matrices.
Specifically, a single core W ind Disassembled into two kernel matrixes respectivelyWherein the dimension of I is less than or equal to the dimension of D, and +.>The learning process of the periodic time-frequency block of the single kernel is expressed by a common expression:
wherein,for the sub-frequency periodic component of the ith channel, is >For the sub-frequency domain periodic component of the ith channel, is->For the corresponding kernel of the ith channel, the output of the short-term fourier transform layer in each sub-trend encoder is different from the other channel, that is, the time sequence of the different channels is the same but the sliding window is different in size, and the effect of reducing the calculation amount can be achieved by using the periodic time-frequency block of the single kernel.
Further, a schematic diagram of processing sub-frequency domain periodic components by using a multi-core periodic time-frequency block is shown in fig. 7, at least two cores are set in each periodic time-frequency block, and periodic learning is performed between different cores based on the sub-periodic components by sharing weights.
Specifically, when a strong periodic correlation is involved and each sub-periodic component includes a plurality of periodic feature mashups, at least two kernels may be set in the periodic time-frequency block.
Specifically, if there are k cores in the ith channel, the calculation result of each core is as follows:
wherein,for the calculation of the kth kernel in the ith channel, the number of kernels in the k-period time-frequency block,for the sub-frequency domain periodic component of the ith channel, is->The k-th kernel in the periodic time-frequency block is subjected to the above formula to obtain a multi-core result set of the periodic time-frequency blocks of the multiple kernels >
Firstly, calculating a core fusion vector of each core in a periodic time-frequency block, and fusing a calculation result of each core by using the core fusion vector of each core to obtain a sub-frequency periodic component, wherein the calculation of the core fusion vector of each core is shown in the following formula:
wherein,the kernel fusion vector of the kth kernel, the kernel fusion vector and the kernel have a shape of 1×M, wherein +.>For learning parameters->The calculation formula for fusing the calculation result of each core by using the core fusion vector of each core is as follows:
in this scheme, by setting up a trend encoder and a period encoder to capture potential time and frequency laws in training data periods and trend components, respectively, the process of the trend encoder and the period encoder can be represented by the following formulas:
Z se = Linear(SeasonEncoder(X se , S 1 ), . . . , SeasonEncoder(X se , S s ))
Z tr = Linear(TrendEncoder(X tr , S 1 ), . . . , TrendEncoder(X tr , S s ))
wherein Z is se For periodic coding results, Z tr S is the trend encoding result 1 , . . . S s Representing sliding window lengths of different sizes, linear represents a Linear layer for integrating the sub-period coding result and the sub-trend coding result.
In the scheme, the output layer firstly carries out linear projection on the fusion coding result to obtain a projection result, and then carries out inverse normalization on the projection result to obtain a prediction result.
Specifically, a trend encoder and a period encoder are simultaneously built in one model, so that the model automatically determines the period length without confirmation before inputting the model, the trend encoder and the period encoder respectively process a trend component and a time-frequency block of the period component, different rules can be extracted under multiple resolutions, the multiple resolutions refer to window sizes with different lengths, and the scheme is used for adapting to the condition of relatively complex periodicity by arranging a plurality of kernels in the time-frequency block of the period, and different periodic characteristics are extracted by utilizing different channels.
In some embodiments, the present approach combines the square loss and the absolute loss as a function of the loss of the power load prediction model.
Specifically, the loss function of the scheme is shown in the following formula:
where alpha is used to control the weights of the absolute and relative losses,refer to model reasoning results, Y refers to actual results, and I is an absolute value 2 Referring to square, i refers to the i-th dimension of the D dimensions. Tanh is the hyperbolic tangent function.
Because the labels in the scheme are numerical values, the predicted result of the model cannot be completely equal to the true numerical value, so that the accuracy of the model which is referred to in training is not right or wrong, but the numerical value is bad, and when the loss value is reduced to a certain range, the predicted numerical value is shown to be within an acceptable range, and the training is finished.
Example two
A method of power load prediction, comprising:
and acquiring historical data representing the power load condition, and inputting the historical data into the power load prediction model constructed in the first embodiment to obtain a prediction result.
Example III
Based on the same conception, referring to fig. 8, the application further provides a device for constructing a power load prediction model, which comprises:
The construction module comprises: constructing a power load prediction model, wherein the power load prediction model is formed by sequentially connecting an input layer, a coding layer and an output layer in series;
the acquisition module is used for: acquiring time sequence data representing the power load condition as a training sample and inputting the training sample into the input layer, wherein the input layer pre-processes the time sequence data to obtain a trend component and a periodic component;
a first encoding module: the coding layer comprises trend encoders and periodic encoders which are connected in parallel, wherein each trend encoder comprises at least two sub-trend encoders, each sub-trend encoder is provided with multi-scale sliding windows with different sizes, each periodic encoder comprises at least two sub-periodic encoders, each sub-periodic encoder is provided with multi-scale sliding windows with different sizes, and the number of the sub-periodic encoders is the same as that of the sub-trend encoders;
and a second encoding module: acquiring sub-trend components of at least two corresponding window sizes in the trend components based on each multi-scale sliding window, and acquiring sub-period components of at least two corresponding window sizes in the period components based on each multi-scale sliding window;
and a third encoding module: coding sub-trend components with corresponding window sizes by using each sub-trend coder to obtain at least two sub-trend coding results, integrating a plurality of sub-trend coding results to obtain trend coding results, coding sub-period components with corresponding window sizes by using each sub-period coder to obtain at least two sub-period coding results, integrating a plurality of sub-period coding results to obtain period coding results, and adding the trend coding results and the period coding results to obtain a fusion coding result;
And an output module: and inputting the fusion coding result to an output layer for outputting to obtain a prediction result, constructing a loss function according to the prediction result, and completing model training when the loss function meets the set condition to obtain a trained power load prediction model.
Example IV
This embodiment also provides an electronic device, referring to fig. 9, comprising a memory 404 and a processor 402, the memory 404 having stored therein a computer program, the processor 402 being arranged to run the computer program to perform the steps of any of the method embodiments described above.
In particular, the processor 402 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
The memory 404 may include, among other things, mass storage 404 for data or instructions. By way of example, and not limitation, memory 404 may comprise a Hard Disk Drive (HDD), floppy disk drive, solid State Drive (SSD), flash memory, optical disk, magneto-optical disk, tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Memory 404 may include removable or non-removable (or fixed) media, where appropriate. Memory 404 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 404 is a Non-Volatile (Non-Volatile) memory. In particular embodiments, memory 404 includes Read-only memory (ROM) and Random Access Memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or FLASH memory (FLASH) or a combination of two or more of these. The RAM may be Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM) where appropriate, and the DRAM may be fast page mode dynamic random access memory 404 (FPMDRAM), extended Data Output Dynamic Random Access Memory (EDODRAM), synchronous Dynamic Random Access Memory (SDRAM), or the like.
Memory 404 may be used to store or cache various data files that need to be processed and/or used for communication, as well as possible computer program instructions for execution by processor 402.
The processor 402 implements the method of constructing the power load prediction model of any of the above embodiments by reading and executing computer program instructions stored in the memory 404.
Optionally, the electronic apparatus may further include a transmission device 406 and an input/output device 408, where the transmission device 406 is connected to the processor 402 and the input/output device 408 is connected to the processor 402.
The transmission device 406 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through the base station to communicate with the internet. In one example, the transmission device 406 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
The input-output device 408 is used to input or output information. In this embodiment, the input information may be time series data representing the power load condition, and the output information may be a prediction result or the like.
Alternatively, in the present embodiment, the above-mentioned processor 402 may be configured to execute the following steps by a computer program:
s101, constructing a power load prediction model, wherein the power load prediction model is formed by sequentially connecting an input layer, a coding layer and an output layer in series;
s102, acquiring time sequence data representing the power load condition as a training sample and inputting the training sample into the input layer, wherein the input layer preprocesses the time sequence data to obtain a trend component and a period component;
s103, the coding layer comprises a trend coder and a period coder which are connected in parallel, wherein the trend coder comprises at least two sub-trend coders, each sub-trend coder is provided with multi-scale sliding windows with different sizes, the period coder comprises at least two sub-period coders, each sub-period coder is provided with multi-scale sliding windows with different sizes, and the number of the sub-period coders is the same as that of the sub-trend coders;
s104, acquiring sub-trend components of at least two corresponding window sizes in the trend components based on each multi-scale sliding window, and acquiring sub-period components of at least two corresponding window sizes in the period components based on each multi-scale sliding window;
S105, coding sub-trend components with corresponding window sizes by using each sub-trend coder to obtain at least two sub-trend coding results, integrating a plurality of sub-trend coding results to obtain trend coding results, coding sub-period components with corresponding window sizes by using each sub-period coder to obtain at least two sub-period coding results, integrating a plurality of sub-period coding results to obtain period coding results, and adding the trend coding results and the period coding results to obtain a fusion coding result;
s106, inputting the fusion coding result to an output layer for outputting to obtain a prediction result, constructing a loss function according to the prediction result, and completing model training when the loss function meets the set condition to obtain a trained power load prediction model.
It should be noted that, specific examples in this embodiment may refer to examples described in the foregoing embodiments and alternative implementations, and this embodiment is not repeated herein.
In general, the various embodiments may be implemented in hardware or special purpose circuits, software, logic or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device, although the invention is not limited thereto. While various aspects of the invention may be illustrated and described as block diagrams, flow charts, or using some other pictorial representation, it is well understood that these blocks, apparatus, systems, techniques or methods described herein may be implemented in, as non-limiting examples, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controller or other computing devices, or some combination thereof.
Embodiments of the invention may be implemented by computer software executable by a data processor of a mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets, and/or macros can be stored in any apparatus-readable data storage medium and they include program instructions for performing particular tasks. The computer program product may include one or more computer-executable components configured to perform embodiments when the program is run. The one or more computer-executable components may be at least one software code or a portion thereof. In this regard, it should also be noted that any block of the logic flow as in fig. 9 may represent a procedure step, or interconnected logic circuits, blocks and functions, or a combination of procedure steps and logic circuits, blocks and functions. The software may be stored on a physical medium such as a memory chip or memory block implemented within a processor, a magnetic medium such as a hard disk or floppy disk, and an optical medium such as, for example, a DVD and its data variants, a CD, etc. The physical medium is a non-transitory medium.
It should be understood by those skilled in the art that the technical features of the above embodiments may be combined in any manner, and for brevity, all of the possible combinations of the technical features of the above embodiments are not described, however, they should be considered as being within the scope of the description provided herein, as long as there is no contradiction between the combinations of the technical features.
The foregoing examples merely represent several embodiments of the present application, the description of which is more specific and detailed and which should not be construed as limiting the scope of the present application in any way. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (13)

1. The construction method of the power load prediction model is characterized by comprising the following steps of:
constructing a power load prediction model, wherein the power load prediction model is formed by sequentially connecting an input layer, a coding layer and an output layer in series;
acquiring time sequence data representing the power load condition as a training sample and inputting the training sample into the input layer, wherein the input layer pre-processes the time sequence data to obtain a trend component and a periodic component;
The coding layer comprises trend encoders and periodic encoders which are connected in parallel, wherein each trend encoder comprises at least two sub-trend encoders, each sub-trend encoder is provided with multi-scale sliding windows with different sizes, each periodic encoder comprises at least two sub-periodic encoders, each sub-periodic encoder is provided with multi-scale sliding windows with different sizes, and the number of the sub-periodic encoders is the same as that of the sub-trend encoders;
acquiring sub-trend components of at least two corresponding window sizes in the trend components based on each multi-scale sliding window, and acquiring sub-period components of at least two corresponding window sizes in the period components based on each multi-scale sliding window;
coding sub-trend components with corresponding window sizes by using each sub-trend coder to obtain at least two sub-trend coding results, integrating a plurality of sub-trend coding results to obtain trend coding results, coding sub-period components with corresponding window sizes by using each sub-period coder to obtain at least two sub-period coding results, integrating a plurality of sub-period coding results to obtain period coding results, and adding the trend coding results and the period coding results to obtain a fusion coding result;
And inputting the fusion coding result to an output layer for outputting to obtain a prediction result, constructing a loss function according to the prediction result, and completing model training when the loss function meets the set condition to obtain a trained power load prediction model.
2. The method according to claim 1, wherein in the step of preprocessing the time series data by the input layer to obtain a trend component and a periodic component, the time series data is subjected to reversible normalization processing to obtain a normalized sequence, and then the normalized sequence is subjected to a moving average operation to obtain a trend component, and the normalized sequence subtracts the trend component to obtain a periodic component.
3. The method for constructing a power load prediction model according to claim 1, wherein in the step of encoding sub-trend components with corresponding window sizes by using each sub-trend encoder to obtain at least two sub-trend encoding results, the sub-trend encoder is formed by sequentially connecting a short-term fourier transform layer, a trend time-frequency block, a frequency feedforward network and an inverse short-term fourier transform layer in series, the short-term fourier transform layer performs fourier transform on the sub-trend components to obtain sub-frequency domain trend components, the sub-frequency domain trend components are input into the trend time-frequency block to obtain sub-frequency trend components, the sub-frequency trend components are input into the frequency feedforward network to obtain sub-frequency trend components, and the sub-frequency trend components are combined and then input into the inverse fourier transform layer to obtain sub-trend encoding results.
4. A method of constructing a power load prediction model according to claim 3, wherein the trending time-frequency blocks in all sub-trending encoders use the same kernel to learn potential trends in the corresponding sub-frequency domain trending components.
5. The method for constructing a power load prediction model according to claim 1, wherein in the step of encoding sub-period components with corresponding window sizes by a sub-period encoder to obtain at least two sub-period encoding results, the sub-period encoder is formed by sequentially connecting a short-term fourier transform layer, a period time-frequency block, a frequency feedforward network and an inverse short-term fourier transform layer in series, the short-term fourier transform layer performs fourier transform on the sub-period components to obtain sub-frequency domain periodic components, the sub-frequency domain periodic components are input into the period time-frequency block to obtain sub-frequency periodic components, the sub-frequency periodic components are input into the frequency feedforward network to obtain sub-frequency periodic components, and the sub-frequency periodic components are combined and then input into the inverse short-term fourier transform layer to obtain the sub-period encoding results.
6. The method according to claim 5, wherein a single kernel is set in each of the periodic time-frequency blocks, and the periodic time-frequency blocks are periodically learned by disassembling the single kernel into two kernel matrices and based on the sub-periodic components.
7. The method for constructing a power load prediction model according to claim 5, wherein at least two kernels are set in each periodic time-frequency block, and periodic learning is performed between different kernels based on the sub-periodic components by sharing weights.
8. The method of claim 1, wherein the multi-scale sliding window sizes of the sub-trend encoders and the sub-period encoders of the same hierarchy are the same and share a backbone structure other than the trend time-frequency blocks and the period time-frequency blocks.
9. The method for constructing a power load prediction model according to claim 1, wherein the output layer performs linear projection on the fusion encoding result to obtain a projection result, and performs inverse normalization on the projection result to obtain a prediction result.
10. A method of predicting an electrical load, comprising:
historical data representing the power load condition is obtained, and the historical data is input into a power load prediction model constructed in claim 1 to obtain a prediction result.
11. An apparatus for constructing a power load prediction model, comprising:
The construction module comprises: constructing a power load prediction model, wherein the power load prediction model is formed by sequentially connecting an input layer, a coding layer and an output layer in series;
the acquisition module is used for: acquiring time sequence data representing the power load condition as a training sample and inputting the training sample into the input layer, wherein the input layer pre-processes the time sequence data to obtain a trend component and a periodic component;
a first encoding module: the coding layer comprises trend encoders and periodic encoders which are connected in parallel, wherein each trend encoder comprises at least two sub-trend encoders, each sub-trend encoder is provided with multi-scale sliding windows with different sizes, each periodic encoder comprises at least two sub-periodic encoders, each sub-periodic encoder is provided with multi-scale sliding windows with different sizes, and the number of the sub-periodic encoders is the same as that of the sub-trend encoders;
and a second encoding module: acquiring sub-trend components of at least two corresponding window sizes in the trend components based on each multi-scale sliding window, and acquiring sub-period components of at least two corresponding window sizes in the period components based on each multi-scale sliding window;
and a third encoding module: coding sub-trend components with corresponding window sizes by using each sub-trend coder to obtain at least two sub-trend coding results, integrating a plurality of sub-trend coding results to obtain trend coding results, coding sub-period components with corresponding window sizes by using each sub-period coder to obtain at least two sub-period coding results, integrating a plurality of sub-period coding results to obtain period coding results, and adding the trend coding results and the period coding results to obtain a fusion coding result;
And an output module: and inputting the fusion coding result to an output layer for outputting to obtain a prediction result, constructing a loss function according to the prediction result, and completing model training when the loss function meets the set condition to obtain a trained power load prediction model.
12. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, the processor being arranged to run the computer program to perform a method of constructing a power load prediction model according to any one of claims 1-9 or a method of predicting a power load according to claim 10.
13. A readable storage medium, characterized in that the readable storage medium has stored therein a computer program comprising program code for controlling a process to execute the process, the process comprising a method of constructing a power load prediction model according to any one of claims 1-9 or a power load prediction method according to claim 10.
CN202311387481.1A 2023-10-25 2023-10-25 Power load prediction model, construction method and device thereof and application Active CN117114056B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311387481.1A CN117114056B (en) 2023-10-25 2023-10-25 Power load prediction model, construction method and device thereof and application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311387481.1A CN117114056B (en) 2023-10-25 2023-10-25 Power load prediction model, construction method and device thereof and application

Publications (2)

Publication Number Publication Date
CN117114056A CN117114056A (en) 2023-11-24
CN117114056B true CN117114056B (en) 2024-01-09

Family

ID=88809626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311387481.1A Active CN117114056B (en) 2023-10-25 2023-10-25 Power load prediction model, construction method and device thereof and application

Country Status (1)

Country Link
CN (1) CN117114056B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117893361A (en) * 2024-03-15 2024-04-16 广东工业大学 Offshore wind power prediction method based on multi-scale analyzer

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200109196A (en) * 2019-03-12 2020-09-22 한국전력공사 Apparatus for estimating power supply of microgrid and method thereof
CN112736902A (en) * 2020-12-24 2021-04-30 国网山西省电力公司 STL decomposition-based time series short-term power load prediction method
CN113360848A (en) * 2021-06-04 2021-09-07 北京工商大学 Time sequence data prediction method and device
CN113592185A (en) * 2021-08-05 2021-11-02 四川大学 Power load prediction method based on Transformer
CN114529051A (en) * 2022-01-17 2022-05-24 杭州电子科技大学 Long-term power load prediction method based on hierarchical residual self-attention neural network
CN115409259A (en) * 2022-08-30 2022-11-29 华东师范大学 Power load probability prediction method
CN116845874A (en) * 2023-07-06 2023-10-03 固德威技术股份有限公司 Short-term prediction method and device for power load

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112653142B (en) * 2020-12-18 2022-09-02 武汉大学 Wind power prediction method and system for optimizing depth transform network
US20230105970A1 (en) * 2021-10-06 2023-04-06 Salesforce.Com, Inc. Systems and methods for time-series forecasting

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200109196A (en) * 2019-03-12 2020-09-22 한국전력공사 Apparatus for estimating power supply of microgrid and method thereof
CN112736902A (en) * 2020-12-24 2021-04-30 国网山西省电力公司 STL decomposition-based time series short-term power load prediction method
CN113360848A (en) * 2021-06-04 2021-09-07 北京工商大学 Time sequence data prediction method and device
CN113592185A (en) * 2021-08-05 2021-11-02 四川大学 Power load prediction method based on Transformer
CN114529051A (en) * 2022-01-17 2022-05-24 杭州电子科技大学 Long-term power load prediction method based on hierarchical residual self-attention neural network
CN115409259A (en) * 2022-08-30 2022-11-29 华东师范大学 Power load probability prediction method
CN116845874A (en) * 2023-07-06 2023-10-03 固德威技术股份有限公司 Short-term prediction method and device for power load

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Short-term Load Forecasting of Power User Based on EWA Algorithm;Li ZaiZhong等;IEEE Xplore;全文 *
基于RNN的短时电力负荷预测;赵佳琪;袁晓丹;徐仕威;;数码世界(第08期);全文 *
基于季节调整和趋势分解的水文序列小波周期分析模型及其应用;王红瑞;刘达通;王成;高雄;;应用基础与工程科学学报(第05期);全文 *
节气负荷预测方法研究;刘亚, 张国忠, 何飞;电力自动化设备(第07期);全文 *

Also Published As

Publication number Publication date
CN117114056A (en) 2023-11-24

Similar Documents

Publication Publication Date Title
CN117114056B (en) Power load prediction model, construction method and device thereof and application
CN112364975B (en) Terminal running state prediction method and system based on graph neural network
WO2021129086A1 (en) Traffic prediction method, device, and storage medium
TW202004658A (en) Self-tuning incremental model compression method in deep neural network
CN112215442B (en) Method, system, device and medium for predicting short-term load of power system
CN112396231B (en) Modeling method and device for space-time data, electronic equipment and readable medium
CN113657668A (en) Power load prediction method and system based on LSTM network
CN116494816A (en) Charging management system and method for charging pile
CN114707772B (en) Power load prediction method and system based on multi-feature decomposition and fusion
CN114282648A (en) Flow prediction method, device and storage medium
CN116502692A (en) Model training method, photovoltaic power generation power prediction method and device
CN110874635B (en) Deep neural network model compression method and device
CN110543869A (en) Ball screw service life prediction method and device, computer equipment and storage medium
CN115496285B (en) Power load prediction method and device and electronic equipment
CN116842447A (en) Post-processing method, device and system for classified data and electronic device
JPH11175503A (en) Time-sequential data predicting device
CN116346640A (en) Network index prediction method and device, electronic equipment and storage medium
CN114239983A (en) Target area population flow prediction method and related device
CN112835771A (en) Traffic prediction method, device, equipment and storage medium
WO2022156743A1 (en) Feature construction method and apparatus, model training method and apparatus, and device and medium
CN113408425B (en) Cluster control method and system for biological language analysis
CN117333241A (en) Live pig price prediction model modeling and live pig price prediction method and device
EP3748555A1 (en) Method and system for low sampling rate electrical load disaggregation
CN117952283A (en) Short-term load prediction method, system, terminal and medium based on membership degree
CN117056709A (en) Training method and device of time sequence prediction model, storage medium and electronic equipment

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
GR01 Patent grant
GR01 Patent grant