CN113762591A - Short-term electric quantity prediction method and system based on GRU and multi-core SVM counterstudy - Google Patents

Short-term electric quantity prediction method and system based on GRU and multi-core SVM counterstudy Download PDF

Info

Publication number
CN113762591A
CN113762591A CN202110820888.3A CN202110820888A CN113762591A CN 113762591 A CN113762591 A CN 113762591A CN 202110820888 A CN202110820888 A CN 202110820888A CN 113762591 A CN113762591 A CN 113762591A
Authority
CN
China
Prior art keywords
user
data
short
gru
term
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.)
Granted
Application number
CN202110820888.3A
Other languages
Chinese (zh)
Other versions
CN113762591B (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.)
State Grid Corp of China SGCC
Heze Power Supply Co of State Grid Shandong Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Heze Power Supply Co of State Grid Shandong 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, Heze Power Supply Co of State Grid Shandong Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202110820888.3A priority Critical patent/CN113762591B/en
Publication of CN113762591A publication Critical patent/CN113762591A/en
Application granted granted Critical
Publication of CN113762591B publication Critical patent/CN113762591B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/10Machine learning using kernel methods, e.g. support vector machines [SVM]
    • 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/044Recurrent networks, e.g. Hopfield networks
    • 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/047Probabilistic or stochastic networks
    • 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/048Activation functions
    • 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
    • G06N3/084Backpropagation, e.g. using gradient descent
    • 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/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Public Health (AREA)
  • Probability & Statistics with Applications (AREA)
  • Primary Health Care (AREA)
  • Water Supply & Treatment (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The invention discloses a user short-term electric quantity prediction method and a user short-term electric quantity prediction system based on GRU and multi-core SVM counterstudy, wherein the method comprises the following steps: acquiring historical electricity utilization data and current electricity utilization related data of a user to be predicted; the method comprises the following steps of predicting power consumption by adopting a pre-trained user short-term power prediction model, wherein the user short-term power prediction model training method comprises the following steps: based on historical electricity utilization data and electricity utilization related data, extracting influence factor characteristics and weights thereof; training generators constructed by bidirectional GRUs and a multi-head attention mechanism based on the characteristics and the weight of the influence factors, and outputting a power consumption state prediction vector of a user; and taking the comprehensive vector and the real data of the power consumption of the user as input, and updating parameters of the generator based on the judgment result of the multi-core SVM (support vector machine) discriminator to obtain a short-term power prediction model of the user. According to the invention, the prediction performance is improved through mutual game learning of the generator and the discriminator, and the accuracy of electric quantity prediction is improved.

Description

Short-term electric quantity prediction method and system based on GRU and multi-core SVM counterstudy
Technical Field
The invention relates to the technical field of intelligent power utilization, in particular to a short-term power forecasting method and system based on GRU and multi-core SVM counterstudy.
Background
The accurate prediction of the power consumption can ensure the accurate and reliable operation of the power grid system, avoid the resource waste in the power grid dispatching process and also contribute to making a more economic power generation plan.
The traditional electric quantity prediction method mainly comprises a regression analysis method, a time series analysis method and the like. Although these methods are widely used in some applications in the power industry, they still have the disadvantage of not considering some uncertain factors sufficiently, and at the same time, they also fail to make good use of the sequence data information. In order to improve the prediction performance, intelligent prediction methods (such as artificial neural networks, support vector machine prediction models, deep learning prediction methods, and the like) are gradually applied to electric quantity prediction research, and the method has the advantage that the association relation between various influence factors and electric quantity can be well mined. Currently, most studies are predictive modeling based on power consumption sequences, in which a Recurrent Neural Network (RNN) is widely used. Long Short-Term Memory networks (LSTM) and Gated-Loop units (GRU) are variants of RNN, which can effectively solve the problem of Long-Term dependence in RNN models and are relatively common models in electric quantity prediction research. In addition, Convolutional Neural Networks (CNNs) are also applied to load prediction studies. The inventor finds that although the methods have taken good effect, the methods ignore potential correlation relations among the electric quantity sequences and do not make full use of the existing information.
Disclosure of Invention
Based on the above problems, the first aspect of the present invention provides a method and a system for predicting short-term power of a user based on improved GRU and multi-core support vector machine counterlearning. Based on the main characteristic factors of the power consumption, the combination of the bidirectional GRU and the multi-head attention mechanism is used as a generator, the multi-core SVM is used as a discriminator, a generation-based confrontation network model is constructed to realize the short-term power prediction of the user, the prediction performance is improved through the mutual game learning of the generator and the discriminator, and the accuracy of the power prediction is improved.
In order to achieve the above object, one or more embodiments of the present invention provide the following technical solutions:
a user short-term electric quantity prediction method based on GRU and multi-core SVM counterstudy is characterized by comprising the following steps:
acquiring historical electricity utilization data and current electricity utilization related data of a user to be predicted;
the method comprises the following steps of predicting power consumption by adopting a pre-trained user short-term power prediction model, wherein the user short-term power prediction model training method comprises the following steps:
based on historical electricity utilization data and electricity utilization related data, extracting influence factor characteristics and weights thereof;
training generators constructed by bidirectional GRUs and a multi-head attention mechanism based on the characteristics and the weight of the influence factors, and outputting a power consumption state prediction vector of a user;
and taking the comprehensive vector and the real data of the power consumption of the user as input, and updating parameters of the generator based on the judgment result of the multi-core SVM (support vector machine) discriminator to obtain a short-term power prediction model of the user.
Further, after the power consumption data and the power consumption related data of the user are obtained, data cleaning is carried out, and the data cleaning comprises the steps of deleting repeated data, complementing missing data and deleting error data.
Further, the influence factor characteristics and the weight thereof are extracted based on a grey correlation analysis method.
Further, the method for extracting the influence factor features based on the grey correlation analysis method comprises the following steps:
calculating feature related statistics by using a grey correlation analysis method;
and setting a related statistic threshold value as a preset relevance threshold value, and screening out characteristics related to the power consumption behavior of the user as influence factor characteristics.
Further, training the bidirectional GRU and multi-head attention mechanism built generators includes:
acquiring context information through bidirectional GRU learning based on the influence factor characteristics and the weight thereof;
performing multiple self-attention calculations, splicing the calculation results of each time, and finally obtaining a multi-head attention score through a linear mapping function to obtain a comprehensive vector of the power consumption of the user;
and calculating a loss function by adopting the comprehensive vector of the power consumption of the user according to a softmax prediction function, and training the learning parameters of the bidirectional GRU by adopting a back propagation algorithm to finish the training of the generator.
Further, learning to obtain context information via a bidirectional GRU includes:
mapping the characteristic sequence vector of the influence factors into a low-dimensional vector set;
learning the low-dimensional vector set through a forward GRU and a backward GRU respectively;
and splicing the features obtained by the bidirectional GRU learning through a splicing function to obtain context information.
And further, calculating a root mean square error according to the actual power consumption and the generated predicted power consumption, and updating parameters of the generator by taking the root mean square error as a target function.
One or more embodiments provide a user short-term power prediction system based on GRU and multi-core SVM counterlearning, including:
a data acquisition module configured to: acquiring historical electricity utilization data and current electricity utilization related data of a user to be predicted;
a power usage prediction module configured to: the method comprises the following steps of predicting power consumption by adopting a pre-trained user short-term power prediction model, wherein the user short-term power prediction model training method comprises the following steps:
based on historical electricity utilization data and electricity utilization related data, extracting influence factor characteristics and weights thereof;
training generators constructed by bidirectional GRUs and a multi-head attention mechanism based on the characteristics and the weight of the influence factors, and outputting a power consumption state prediction vector of a user;
and taking the comprehensive vector and the real data of the power consumption of the user as input, and updating parameters of the generator based on the judgment result of the multi-core SVM (support vector machine) discriminator to obtain a short-term power prediction model of the user.
One or more embodiments provide an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the GRU and multi-core SVM countermeasure learning based user short term power prediction method when executing the program.
One or more embodiments provide a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method for predicting short-term power of a user based on GRU and multi-core SVM counter learning.
One or more of the technical schemes have the following beneficial effects:
the method is based on historical user power consumption data and power consumption related data, a bidirectional GRU and a multi-head attention mechanism are combined to serve as a generator, a multi-core SVM is used as a discriminator, a generation-based confrontation network model is constructed to realize user short-term power prediction, and the prediction performance is improved through the mutual confrontation learning of the generator and the discriminator.
According to the method, a bidirectional GRU is adopted to predict the future power consumption condition aiming at the characteristics that the historical power consumption data of a user has time sequence and long-term dependence; in addition, in order to capture the internal structure of the electric quantity sequence and learn the dependency relationship among the data information in the sequence, the idea of a multi-head attention mechanism is introduced, the characteristic information is represented from different dimensions and different subspaces, and the accuracy of model prediction is improved.
The invention provides a method for adjusting a generator by using the root mean square error of real data and generated data as a part of a target function, thereby reducing the error probability of a model and improving the stability of the model.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the invention and together with the description serve to explain the invention and not to limit the invention.
Fig. 1 is a flowchart of an overall method for predicting short-term power of a user based on GRU and multi-core SVM counterlearning according to one or more embodiments of the present invention;
FIG. 2 is a flow diagram of a data preprocessing method provided in one or more embodiments of the invention;
fig. 3 is a general schematic diagram of a user short-term power prediction method based on improved GRU and multi-core SVM counterlearning according to one or more embodiments of the present invention;
FIG. 4 is an architectural diagram of a multi-head attention mechanism provided in accordance with one or more embodiments of the present invention;
fig. 5 is a diagram illustrating the effect of a user short-term power prediction method based on GRU and multi-core SVM counterlearning according to one or more embodiments of the present invention.
Detailed Description
It is to be understood that the following detailed description is exemplary and is intended to provide further explanation of the invention as claimed. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
As shown in fig. 1, a method for predicting short-term power consumption of a user based on improved GRU and multi-core SVM counterlearning of the embodiment includes the following steps:
step 1: acquiring historical electricity utilization data and current electricity utilization related data of a user to be predicted;
step 2: the method comprises the following steps of predicting power consumption by adopting a pre-trained user short-term power prediction model, wherein the user short-term power prediction model training method comprises the following steps:
s1: acquiring historical electricity utilization data and electricity utilization related data, and extracting influence factor characteristics and weights thereof; the method specifically comprises the following steps:
A. the method includes acquiring relevant power consumption data of mass power information, wherein the relevant power consumption data includes historical power consumption data and power consumption relevant data, the power consumption relevant data includes weather data, holiday data and the like, and the weather data are only taken as an example for explanation in the embodiment. And performing data preprocessing on the acquired electricity consumption data and weather data, including data cleaning, missing data completion, data definition and storage.
Specifically, electricity consumption data acquired from an electricity consumption information acquisition system of a certain provincial power grid company in China are acquired once per hour, 24 time point data are acquired per day, and the electricity consumption data comprise 334656 pieces of electricity consumption data from 996 users in 2019 in 9 and 1 month to 2019 in 9 and 14 months. It should be noted that the present embodiment uses data collected at each time point as a piece of electricity consumption data. In addition, weather data of corresponding time of the corresponding city is obtained from the Chinese weather data service center website.
B. The method comprises the steps of carrying out standardization processing on mass electric quantity data, carrying out feature selection influencing electric quantity on weather conditions based on a Grey correlation Analysis (GRA), eliminating feature redundancy and extracting features influencing high correlation degree of electric quantity.
The data preprocessing is carried out on the acquired data, the missing value processing and the data normalization are included, the chi-square test is adopted for carrying out simple correlation analysis, the randomness of repeated influence factors and factor selection is eliminated, the complexity of the problem is reduced, the redundancy of the characteristics is eliminated, and more information variables are selected to improve the accuracy and the efficiency of the prediction model.
In the process of predicting the electricity consumption of the user, the weather condition has important influence on the prediction of the electricity consumption. For the acquired electric quantity data sample, the result of judging feature selection according to the grey correlation analysis method is shown as follows. Table 1 shows that the correlation statistics between weather factors and user behavior are calculated by the GRA algorithm and sorted from high to low in statistics, a threshold value (═ 0.5) is set to exclude some uninformative features. In the experiment, it can be concluded that the two weather factors, temperature and humidity, have a large influence on the prediction of the power consumption.
TABLE 1 weather factor Association analysis
Factors of the fact Degree of association
Maximum air temperature 0.9819
Lowest air temperature 0.9707
Humidity 0.9674
Mean temperature 0.9199
Total amount of precipitation 0.8651
Wind speed 0.8470
Air pressure 0.6895
B. Specifically, as shown in fig. 2, a general generation process of performing weather factor Analysis based on a Grey correlation Analysis (GRA) in step B is as follows:
B1. normalizing historical electric quantity data and corresponding weather data, and normalizing original data X by adopting a min-max standardization method, wherein the value of characteristic data is [0, 1 ];
B2. assuming that the power consumption reference sequence of each feature data in the original sample after the feature data are subjected to averaging change is X0=(x0(1),x0(2),......,x0(n)), the historical power data including the characteristics of various factors is set as a comparison sequence Xk=(xk(1),xk(2),......,xk(n)), i ═ 1, 2. Then X0And XkThe correlation coefficient of (a) is calculated as follows:
Figure BDA0003171891730000061
in the formula, deltai(k) Denotes xiFor x0Correlation coefficient over K data. ρ represents a resolution coefficient (ρ ═ 0.5);
B3. calculating the correlation degree theta between each factor and the electricity consumption of the user
Figure BDA0003171891730000071
Finally, the relevance theta is sequenced, a main feature set influencing hospitalizing migration is selected according to the sequencing size, and the screened feature set is output, so that basic support is provided for construction of a subsequent electric quantity prediction model.
S2: training generators constructed by bidirectional GRUs and a multi-head attention mechanism based on the characteristics and the weight of the influence factors, and outputting a power consumption state prediction vector of a user; specifically, a bidirectional GRU is constructed based on the acquired factor feature set and corresponding weights thereof, so that the electricity utilization information of the user can be learned from the positive direction and the negative direction; then combining a multi-head attention mechanism to construct a generator; updating the weight value of the information state prediction data of each user power consumption sequence in the bidirectional GRU, and outputting a user power consumption state prediction vector; constructing a softmax prediction function by utilizing the prediction vector of the power consumption state of the user; and calculating a loss function of the output value of the softmax prediction function, and training the learning parameters of the bidirectional GRU by adopting a back propagation algorithm to finish the training of the generator.
Step S2 specifically includes the following steps:
C. and B, based on the data preprocessed in the step B and the acquired characteristic factor set, a generator is constructed by combining bidirectional GRUs and multi-head attention, and electric quantity prediction is achieved, as shown in fig. 3.
C1. Input sequence { x) of model construction based on obtained factor set influencing electricity consumption of user1,x2,...,xtAnd mapping the high-dimensional sparse sequence vectors into a low-dimensional dense vector set { e } through an Embedding layer operation1,e2,...et}。
ei=WTxi(i=1,2,...,t) (3)
Wherein W ∈ R|t|*dThe feature matrix is represented, | t | represents the length of the sequence, and K represents the Embedding dimension of the Embedding layer.
C2. Based on the obtained low-dimensional dense set of vectors, the GRU uses the input e for each time ttAnd a previous state ht-1Calculate htThe following are:
rt=σ(Wret+Urht-1) (4)
nt=σ(Wπet+Uπht-1) (5)
Figure BDA0003171891730000072
Figure BDA0003171891730000073
wherein h ist,rt and πtThe reset gate and the update gate are hidden states of d dimension, respectively. Wr,Wπ,WcAnd Ur,UπAnd U is a parameter of GRU. σ is a sigmoid function.
The Bi-GRU consists of a forward GRU and a backward GRU, and context information of sequence data is acquired better through learning in the forward direction and the backward direction. Finally, splicing through a Concat function to obtain a final hidden state HtAs follows:
Figure BDA0003171891730000081
wherein the content of the first and second substances,
Figure BDA0003171891730000082
indicating a hidden state learned by a forward GRU
Figure BDA0003171891730000083
Figure BDA0003171891730000084
Indicating a hidden state learned from the opposite direction
Figure BDA0003171891730000085
C3. In order to capture the internal structure of the sequence, the dependency relationship between the internal data information of the sequence is learned, a multi-head attention mechanism is introduced, multiple self-attention calculations are performed, the calculation results of each time are spliced, and finally, a multi-head attention score is obtained through a linear mapping function, as shown in fig. 4.
First, self-attention scoring is performed
Figure BDA00031718917300000811
And calculating as follows:
Figure BDA0003171891730000086
Figure BDA0003171891730000087
wherein H ═ { H ═ H1,H2,....,HtDenotes a matrix, which consists of the output vectors at all time instants of the bidirectional GRU layer. Wl,γ,
Figure BDA00031718917300000810
Representing a vector of parameters.
Through self-attention calculation, the characteristic value of single attention output can be obtained as follows:
Figure BDA0003171891730000088
then, K times of calculation were performed using equations (9) to (11). The result H*And splicing and linear mapping are carried out to obtain a final result:
Figure BDA0003171891730000089
C4. and finally, inputting the attention feature sequence obtained by the multi-head attention mechanism into a Softmax layer for power consumption prediction, wherein the prediction result is as follows:
Y=Softmax(WrHfinal+br) (13)
s3: and taking the comprehensive vector and the real data of the power consumption of the user as input, and updating parameters of the generator based on the judgment result of the multi-core SVM (support vector machine) discriminator to obtain a short-term power prediction model of the user. Specifically, a discriminator is constructed by utilizing a multi-core SVM (support vector machine) based on the obtained user power consumption state prediction vector and real data, and whether the result predicted by a generator belongs to the real data is judged; and feeding back and updating data information in the generator based on a discrimination result obtained by the discriminator, and continuously improving the power consumption prediction of the user by mutually confronting and continuously optimizing a data weight value in the model.
Step S3 specifically includes the following steps:
D. and C, based on the user power consumption state prediction vector obtained in the step C, combining the real data, and constructing a discriminator by using the multi-core SVM to judge whether the result predicted by the generator belongs to the real data.
The multi-kernel SVM is an extension of the single-kernel SVM, and its objective is to determine an optimal combination of M kernel functions so that the distance is maximum, which can be represented by the following optimization problem:
Figure BDA0003171891730000091
where Δ ═ { θ ∈ R + | θTeM1 represents the coefficients of the convex combinations of M kernel functions; e.g. of the typeMThe vector with M elements all being 1 is represented;
Figure BDA0003171891730000092
represents the final kernel function, where kj(-) is the jth kernel.
The lagrange multiplier method is used for equation (14) to convert to the optimized form:
Figure BDA0003171891730000093
wherein Kj∈RN×N,Ω={α|α∈[0,C]Nα is Lagrange multiplier; "" is defined as the dot product of the vector.
E. And D, feeding back and updating data information in the generator based on the judgment result obtained in the step D, and continuously improving the power consumption prediction of the user by mutually confronting and continuously optimizing the data weight value in the model. And (3) adopting cross entropy as a loss function, and if y is a real class distribution, defining the loss function as follows:
Figure BDA0003171891730000094
wherein S ispositiveAnd SnegativePositive and negative sample data are shown separately. Pdiscriminator(YtX) denotes a sample (Y)tAnd x) the probability of belonging to the real data.
In the model training process, the objective function of the generator is irrelevant to the real data, and the parameters of the generator are adjusted only by the output of the discriminator. When the discriminator discriminates that there is a mistake, the data generated by the generator may be biased, resulting in an unstable model. Thus, in this implementation, the mean square error of the true samples and the generated samples is taken as part of the generator objective function. When the discriminator has errors, the generator can be adjusted by the root mean square error, the probability of the errors of the model can be reduced, and the stability of the model is improved.
Figure BDA0003171891730000101
And predicting the power consumption of a sample to be predicted, pushing a prediction result, comparing the result with actual data, and performing method analysis by using two evaluation indexes, namely Root Mean Square Error (RMSE) and Mean Absolute Percentage Error (MAPE). The initial settings of the model parameters of this embodiment are shown in table 2.
Figure BDA0003171891730000102
Figure BDA0003171891730000103
Wherein, ytRepresenting the true value at time t; y'tThe predicted value is shown; n represents the number of data.
TABLE 2 model parameter settings
Parameter index Number of
Embedding dimension 100
Number of nodes of bidirectional GRU hidden layer 64
The number of the multiple heads 8
Learning rate 0.001
Dropout 0.5
Number of multi-core SVM cores 5
Number of iterations (Epoch) 100
Table 3 describes a comparison of the performance of the method in the prediction of the amount of electricity used: based on the results in table 3, the prediction performance of the power consumption prediction model proposed in this embodiment is superior to other prediction methods.
TABLE 3 comparison of Performance of different prediction methods
Figure BDA0003171891730000104
Figure BDA0003171891730000111
Example two
The embodiment aims to provide a short-term electric quantity prediction system based on GRU and multi-core SVM counterlearning.
Based on the above purpose, the present embodiment provides a short-term power prediction system based on GRU and multi-core SVM counterlearning, including:
a data acquisition module configured to: acquiring historical electricity utilization data and current electricity utilization related data of a user to be predicted;
a power usage prediction module configured to: the method comprises the following steps of predicting power consumption by adopting a pre-trained user short-term power prediction model, wherein the user short-term power prediction model training method comprises the following steps:
based on historical electricity utilization data and electricity utilization related data, extracting influence factor characteristics and weights thereof;
training generators constructed by bidirectional GRUs and a multi-head attention mechanism based on the characteristics and the weight of the influence factors, and outputting a power consumption state prediction vector of a user;
and taking the comprehensive vector and the real data of the power consumption of the user as input, and updating parameters of the generator based on the judgment result of the multi-core SVM (support vector machine) discriminator to obtain a short-term power prediction model of the user.
EXAMPLE III
The embodiment aims at providing an electronic device.
In view of the above, the present embodiment provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in the first embodiment.
Example four
An object of the present embodiment is to provide a computer-readable storage medium.
In view of the above, the present embodiment provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method as described in the first embodiment.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (10)

1. A user short-term electric quantity prediction method based on GRU and multi-core SVM counterstudy is characterized by comprising the following steps:
acquiring historical electricity utilization data and current electricity utilization related data of a user to be predicted;
the method comprises the following steps of predicting power consumption by adopting a pre-trained user short-term power prediction model, wherein the user short-term power prediction model training method comprises the following steps:
based on historical electricity utilization data and electricity utilization related data, extracting influence factor characteristics and weights thereof;
training generators constructed by bidirectional GRUs and a multi-head attention mechanism based on the characteristics and the weight of the influence factors, and outputting a power consumption state prediction vector of a user;
and taking the comprehensive vector and the real data of the power consumption of the user as input, and updating parameters of the generator based on the judgment result of the multi-core SVM (support vector machine) discriminator to obtain a short-term power prediction model of the user.
2. The method for predicting the short-term electric quantity of the user based on the GRU and the multi-core SVM counterlearning as claimed in claim 1, wherein after the electric consumption data and the electric consumption related data of the user are obtained, data cleaning is further performed, and the data cleaning comprises the steps of deleting repeated data, complementing missing data and deleting wrong data.
3. The method for predicting the short-term electric quantity of the user based on GRU and multi-core SVM counterlearning as claimed in claim 1, wherein the characteristics of the influencing factors and the weights thereof are extracted based on a grey correlation analysis method.
4. The method for predicting the short-term electric quantity of the user based on GRU and multi-core SVM counterlearning as claimed in claim 3, wherein the extracting of the influence factor characteristics based on the gray correlation analysis method comprises:
calculating feature related statistics by using a grey correlation analysis method;
and setting a related statistic threshold value as a preset relevance threshold value, and screening out characteristics related to the power consumption behavior of the user as influence factor characteristics.
5. The method of claim 1, wherein training bidirectional GRUs and multi-core SVM based generators for counterlearning comprises:
acquiring context information through bidirectional GRU learning based on the influence factor characteristics and the weight thereof;
performing multiple self-attention calculations, splicing the calculation results of each time, and finally obtaining a multi-head attention score through a linear mapping function to obtain a comprehensive vector of the power consumption of the user;
and calculating a loss function by adopting the comprehensive vector of the power consumption of the user according to a softmax prediction function, and training the learning parameters of the bidirectional GRU by adopting a back propagation algorithm to finish the training of the generator.
6. The method of claim 5, wherein the obtaining of context information through bidirectional GRU learning comprises:
mapping the characteristic sequence vector of the influence factors into a low-dimensional vector set;
learning the low-dimensional vector set through a forward GRU and a backward GRU respectively;
and splicing the features obtained by the bidirectional GRU learning through a splicing function to obtain context information.
7. The method as claimed in claim 1, wherein the method for predicting the short-term electricity consumption of the user based on the GRU and the multi-core SVM counterlearning comprises calculating a root mean square error according to an actual electricity consumption and a generated electricity consumption predicted value, and updating parameters of the generator by using the root mean square error as an objective function.
8. A user short-term electric quantity prediction system based on GRU and multi-core SVM confrontation learning is characterized by comprising the following steps:
a data acquisition module configured to: acquiring historical electricity utilization data and current electricity utilization related data of a user to be predicted;
a power usage prediction module configured to: the method comprises the following steps of predicting power consumption by adopting a pre-trained user short-term power prediction model, wherein the user short-term power prediction model training method comprises the following steps:
based on historical electricity utilization data and electricity utilization related data, extracting influence factor characteristics and weights thereof;
training generators constructed by bidirectional GRUs and a multi-head attention mechanism based on the characteristics and the weight of the influence factors, and outputting a power consumption state prediction vector of a user;
and taking the comprehensive vector and the real data of the power consumption of the user as input, and updating parameters of the generator based on the judgment result of the multi-core SVM (support vector machine) discriminator to obtain a short-term power prediction model of the user.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the method for user short term power prediction based on GRU and multi-core SVM counterlearning of any of claims 1-7.
10. A computer-readable storage medium having stored thereon a computer program, wherein the program, when executed by a processor, implements a method for predicting a user's short-term capacity based on GRU and multi-core SVM counterlearning according to any one of claims 1 to 7.
CN202110820888.3A 2021-07-20 2021-07-20 Short-term electric quantity prediction method and system based on GRU and multi-core SVM countermeasure learning Active CN113762591B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110820888.3A CN113762591B (en) 2021-07-20 2021-07-20 Short-term electric quantity prediction method and system based on GRU and multi-core SVM countermeasure learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110820888.3A CN113762591B (en) 2021-07-20 2021-07-20 Short-term electric quantity prediction method and system based on GRU and multi-core SVM countermeasure learning

Publications (2)

Publication Number Publication Date
CN113762591A true CN113762591A (en) 2021-12-07
CN113762591B CN113762591B (en) 2024-04-05

Family

ID=78787793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110820888.3A Active CN113762591B (en) 2021-07-20 2021-07-20 Short-term electric quantity prediction method and system based on GRU and multi-core SVM countermeasure learning

Country Status (1)

Country Link
CN (1) CN113762591B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114707817A (en) * 2022-03-16 2022-07-05 国网湖南省电力有限公司 Adjustable load prediction method and system participating in ordered power utilization users
CN115808944A (en) * 2023-02-09 2023-03-17 国能大渡河枕头坝发电有限公司 Stator temperature rise test control method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170372200A1 (en) * 2016-06-23 2017-12-28 Microsoft Technology Licensing, Llc End-to-end memory networks for contextual language understanding
CN109508642A (en) * 2018-10-17 2019-03-22 杭州电子科技大学 Ship monitor video key frame extracting method based on two-way GRU and attention mechanism
CN109711620A (en) * 2018-12-26 2019-05-03 浙江大学 A kind of Short-Term Load Forecasting Method based on GRU neural network and transfer learning
CN110516831A (en) * 2019-06-18 2019-11-29 国网(北京)节能设计研究院有限公司 A kind of short-term load forecasting method based on MWOA algorithm optimization SVM
US20200053591A1 (en) * 2018-08-10 2020-02-13 Verizon Patent And Licensing Inc. Systems and methods for wireless low latency traffic scheduler
CN110942205A (en) * 2019-12-05 2020-03-31 国网安徽省电力有限公司 Short-term photovoltaic power generation power prediction method based on HIMVO-SVM
CN112270454A (en) * 2020-11-19 2021-01-26 国网北京市电力公司 Method and device for predicting short-term load of power system under influence of extreme factors

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170372200A1 (en) * 2016-06-23 2017-12-28 Microsoft Technology Licensing, Llc End-to-end memory networks for contextual language understanding
US20200053591A1 (en) * 2018-08-10 2020-02-13 Verizon Patent And Licensing Inc. Systems and methods for wireless low latency traffic scheduler
CN109508642A (en) * 2018-10-17 2019-03-22 杭州电子科技大学 Ship monitor video key frame extracting method based on two-way GRU and attention mechanism
CN109711620A (en) * 2018-12-26 2019-05-03 浙江大学 A kind of Short-Term Load Forecasting Method based on GRU neural network and transfer learning
CN110516831A (en) * 2019-06-18 2019-11-29 国网(北京)节能设计研究院有限公司 A kind of short-term load forecasting method based on MWOA algorithm optimization SVM
CN110942205A (en) * 2019-12-05 2020-03-31 国网安徽省电力有限公司 Short-term photovoltaic power generation power prediction method based on HIMVO-SVM
CN112270454A (en) * 2020-11-19 2021-01-26 国网北京市电力公司 Method and device for predicting short-term load of power system under influence of extreme factors

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114707817A (en) * 2022-03-16 2022-07-05 国网湖南省电力有限公司 Adjustable load prediction method and system participating in ordered power utilization users
CN114707817B (en) * 2022-03-16 2024-06-04 国网湖南省电力有限公司 Adjustable load prediction method and system for participating in ordered electricity utilization users
CN115808944A (en) * 2023-02-09 2023-03-17 国能大渡河枕头坝发电有限公司 Stator temperature rise test control method
CN115808944B (en) * 2023-02-09 2023-06-02 国能大渡河枕头坝发电有限公司 Stator temperature rise test control method

Also Published As

Publication number Publication date
CN113762591B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN111738512B (en) Short-term power load prediction method based on CNN-IPSO-GRU hybrid model
CN112508275B (en) Power distribution network line load prediction method and equipment based on clustering and trend indexes
CN110751318B (en) Ultra-short-term power load prediction method based on IPSO-LSTM
CN108009674A (en) Air PM2.5 concentration prediction methods based on CNN and LSTM fused neural networks
CN111861013B (en) Power load prediction method and device
CN112884008B (en) Prediction evaluation method and device for running state of power information acquisition system
CN113554466B (en) Short-term electricity consumption prediction model construction method, prediction method and device
CN107506865A (en) A kind of load forecasting method and system based on LSSVM optimizations
CN112633604A (en) Short-term power consumption prediction method based on I-LSTM
CN113344288B (en) Cascade hydropower station group water level prediction method and device and computer readable storage medium
CN110987436B (en) Bearing fault diagnosis method based on excitation mechanism
CN113449919B (en) Power consumption prediction method and system based on feature and trend perception
CN113762591B (en) Short-term electric quantity prediction method and system based on GRU and multi-core SVM countermeasure learning
CN114462718A (en) CNN-GRU wind power prediction method based on time sliding window
CN116187835A (en) Data-driven-based method and system for estimating theoretical line loss interval of transformer area
CN114119273A (en) Park comprehensive energy system non-invasive load decomposition method and system
CN112288157A (en) Wind power plant power prediction method based on fuzzy clustering and deep reinforcement learning
CN112836876B (en) Power distribution network line load prediction method based on deep learning
CN113033898A (en) Electrical load prediction method and system based on K-means clustering and BI-LSTM neural network
CN115481788B (en) Phase change energy storage system load prediction method and system
Wang et al. Cloud computing and extreme learning machine for a distributed energy consumption forecasting in equipment-manufacturing enterprises
CN116307139A (en) Wind power ultra-short-term prediction method for optimizing and improving extreme learning machine
CN111310974A (en) Short-term water demand prediction method based on GA-ELM
Lv et al. Research on short-term load forecasting approach for smart grid
CN115796327A (en) Wind power interval prediction method based on VMD (vertical vector decomposition) and IWOA-F-GRU (empirical mode decomposition) -based models

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