CN116245209A - Electric energy prediction method, system, storage medium and computing device - Google Patents

Electric energy prediction method, system, storage medium and computing device Download PDF

Info

Publication number
CN116245209A
CN116245209A CN202211535918.7A CN202211535918A CN116245209A CN 116245209 A CN116245209 A CN 116245209A CN 202211535918 A CN202211535918 A CN 202211535918A CN 116245209 A CN116245209 A CN 116245209A
Authority
CN
China
Prior art keywords
user
component
electricity consumption
time
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211535918.7A
Other languages
Chinese (zh)
Inventor
黄福兴
陶晓峰
孙萌
韦昊辰
陆春艳
武文广
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NARI Group Corp
Nari Technology Co Ltd
Original Assignee
NARI Group Corp
Nari Technology 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 NARI Group Corp, Nari Technology Co Ltd filed Critical NARI Group Corp
Priority to CN202211535918.7A priority Critical patent/CN116245209A/en
Publication of CN116245209A publication Critical patent/CN116245209A/en
Pending legal-status Critical Current

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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • 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
    • 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)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Business, Economics & Management (AREA)
  • Mathematical Physics (AREA)
  • Economics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Tourism & Hospitality (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Operations Research (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Algebra (AREA)
  • Evolutionary Biology (AREA)
  • Water Supply & Treatment (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Public Health (AREA)
  • Probability & Statistics with Applications (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)

Abstract

The invention discloses an electric energy prediction method, a system, a storage medium and a computing device, wherein the electric energy prediction method adopts a Bayesian regression model to predict the electric energy consumption, in the Bayesian regression model, a user electric energy consumption sequence is regarded as an addition combination of a local trend component, a seasonal period change component and an additional regression component, each component is adaptively matched with a corresponding kernel function, and compared with the existing method, the electric energy prediction method is applicable to scenes with long period and large data change amplitude, has good fitting effect and remarkably improves prediction precision.

Description

Electric energy prediction method, system, storage medium and computing device
Technical Field
The invention relates to an electric energy prediction method, an electric energy prediction system, a storage medium and computing equipment, and belongs to the technical field of electric energy prediction.
Background
The novel power system has obvious characteristics and advantages in the field of reducing carbon emission, but the power grid structure and the operation mode face new problems due to uncertainty of power supply load and low-carbon requirements. Therefore, the method has important significance in research and analysis of electric energy load prediction, and at present, numerous students at home and abroad develop research on electric energy prediction.
Existing power prediction methods can be largely divided into two categories, namely, conventional methods and modern methods. Traditional methods include regression analysis, time series and gray model methods. Most of the methods used are conventional models, such as support vector regression (Support Vector Regression, SVR), linear regression, logistic regression, etc. In modern methods, however, artificial neural networks, fuzzy control, support vector machines, and combined models are included, which mainly include Long short-term memory (LSTM), neural networks, multiple linear regression (Machine Learning Regression, MLR), and the like.
In summary, from the application scenario of the existing research, the existing electric energy prediction method is applied to the electric power change data in a short period, and is usually the load data of a certain area in several months. Such data is typically short in periodicity and small in magnitude of variation, often yielding good results when fitted using existing methods. However, if the period of the power data becomes long and the amplitude of variation in which the peak is underestimated becomes large, the effects of many methods existing are reduced.
Meanwhile, the kernel functions used in most of the existing methods are often preset, the design depends on stronger priori knowledge and larger data volume, a single kernel function cannot be well matched with variable application conditions, only data which are well matched with preset parameters of the kernel function can be well matched, the situation of over-fitting or under-fitting is easy to occur in the rest content, and the fitting effect is also reduced if the application scene is changed.
Disclosure of Invention
The invention provides an electric energy prediction method, an electric energy prediction system, a storage medium and a computing device, and solves the problems disclosed in the background art.
In order to solve the technical problems, the invention adopts the following technical scheme:
a method of power prediction comprising:
acquiring a power consumption sequence of a user;
inputting the user electricity consumption sequence into a pre-trained Bayesian regression model to obtain future electricity consumption of the user; in the Bayesian regression model, the user electricity consumption sequence is regarded as an addition combination of a local trend component, a seasonal period change component and an additional regression component, and each component adopts an adaptive kernel function to calculate a time change coefficient; the local trend component is data with a change trend in a time area in the user electricity consumption sequence, and the time area is not divided by seasons; the seasonal period variation component is data which is changed in a seasonal period in the electricity consumption sequence of the user; the additional regression component is a correction amount to the user abnormal electricity consumption data.
The user power consumption sequence further comprises a preprocessing step before the Bayesian regression model is input, and the preprocessing step comprises the following steps:
replacing the wrong electricity consumption in the user electricity consumption sequence with 0;
if the missing power consumption in the power consumption sequence of the user is smaller than the threshold value, filling the missing power consumption by using the first power consumption behind the missing power consumption;
carrying out logarithmic processing on the power consumption with the variation amplitude larger than the average variation amplitude;
and correcting the abnormal electricity consumption in the electricity consumption sequence of the user by adopting an average value correction method.
And correcting the abnormal electricity consumption in the electricity consumption sequence of the user by adopting an average value correction method, wherein the formula is as follows:
Figure BDA0003977649470000031
wherein ,xmn For the power consumption of the mth user on the nth day, a (x m ) Is the average power consumption of the mth user, s (x m ) Standard deviation of electricity consumption for mth user, x mn >a(x m )+2s(x m ) Represents x mn Abnormality, f 2 (x mn ) And the corrected electricity consumption is used.
The adaptive kernel function of the local trend component and the seasonal period variation component is:
Figure BDA0003977649470000032
wherein ,klev (t,t j ) Is a time zone t j ,t j+1 ]Kernel function, t j As the start time of the time zone,
Figure BDA0003977649470000033
at t j Corresponding data, t j+1 For the end time of the time zone, +.>
Figure BDA0003977649470000034
At t j+1 Corresponding data, X t And the data corresponding to t.
The adaptive kernel function of the additional regression component is:
Figure BDA0003977649470000035
wherein ,kreg (t,t j The method comprises the steps of carrying out a first treatment on the surface of the ρ) is the time zone [ t ] j ,t j+1 ]Kernel function, t j For the start time of the time zone, ρ is the scale parameter,
Figure BDA0003977649470000036
at t j Corresponding data, t j+1 X is the end time of the time zone t And the data corresponding to t.
When the Bayesian regression model is trained, time-based cross-validation is adopted for super-parameter selection.
A power prediction system, comprising:
the acquisition module is used for acquiring a power consumption sequence of a user;
the prediction module inputs the power consumption sequence of the user into a pre-trained Bayesian regression model to obtain future power consumption of the user; in the Bayesian regression model, the user electricity consumption sequence is regarded as an addition combination of a local trend component, a seasonal period change component and an additional regression component, and each component adopts an adaptive kernel function to calculate a time change coefficient; the local trend component is data with a change trend in a time area in the user electricity consumption sequence, and the time area is not divided by seasons; the seasonal period variation component is data which is changed in a seasonal period in the electricity consumption sequence of the user; the additional regression component is a correction amount to the user abnormal electricity consumption data.
In the Bayesian regression model of the prediction module, the self-adaptive kernel functions of the local trend component and the seasonal periodical change component are as follows:
Figure BDA0003977649470000041
wherein ,klev (t,t j ) Is a time zone t j ,t j+1 ]Kernel function, t j As the start time of the time zone,
Figure BDA0003977649470000042
at t j Corresponding data, t j+1 For the end time of the time zone, +.>
Figure BDA0003977649470000043
At t j+1 Corresponding data, X t Data corresponding to t;
the adaptive kernel function of the additional regression component is:
Figure BDA0003977649470000044
wherein ,kreg (t,t j The method comprises the steps of carrying out a first treatment on the surface of the ρ) is the time zone [ t ] j ,t j+1 ]ρ is scale parameter.
A computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform a power prediction method.
A computing device comprising one or more processors, one or more memories, and one or more programs, wherein one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing a power prediction method.
The invention has the beneficial effects that: the invention adopts the Bayesian regression model to predict the electricity consumption, in the Bayesian regression model, the electricity consumption sequence of the user is regarded as the addition combination of the local trend component, the seasonal period change component and the additional regression component, and each component is adaptively matched with the corresponding kernel function.
Drawings
FIG. 1 is a flow chart of a method of electrical energy prediction;
FIG. 2 is a flow chart of preprocessing;
FIG. 3 is a flow chart of a super-parameter optimization selection based on time cross-validation.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for more clearly illustrating the technical aspects of the present invention, and are not intended to limit the scope of the present invention.
As shown in fig. 1, a method for predicting electric energy includes the following steps:
step 1, acquiring a power consumption sequence of a user;
step 2, inputting a user electricity consumption sequence into a pre-trained Bayesian regression model to obtain future electricity consumption of the user; in the Bayesian regression model, the user electricity consumption sequence is regarded as an addition combination of a local trend component, a seasonal period change component and an additional regression component, and each component adopts an adaptive kernel function to calculate a time change coefficient;
the local trend component is data with a change trend in a time area in the user electricity consumption sequence, and the time area is not divided by seasons; the seasonal period variation component is data which is changed in a seasonal period in the electricity consumption sequence of the user; the additional regression component is a correction amount to the user abnormal electricity consumption data.
According to the method, the Bayesian regression model is adopted for power consumption prediction, in the Bayesian regression model, the power consumption sequence of the user is regarded as the addition combination of the local trend component, the seasonal period change component and the additional regression component, and each component is adaptively matched with the corresponding kernel function.
Before implementing the method, a Bayesian regression model needs to be constructed and trained, the core of the Bayesian regression model is a Kernel-based Time-varying Regression Model (KTR) regression model, on the basis of Kernel regression, a Time sequence is used as an independent variable parameter so as to better acquire the Time-varying relation of the dependent variable, and in order to better combine the result of a parameter adjustment experiment, the relation between the dependent variable and the Time independent variable is interpreted, and the Bayesian modeling and the Kernel regression are combined.
The form of the reduction function of the predicted value and the independent variable parameter of the regression function is shown as formula (1), and the regression function is obtained by
Figure BDA0003977649470000065
To describe the value of the electrical energy load prediction:
Figure BDA0003977649470000061
wherein ,xt,p For regression variables, different measurement dates are indicated,
Figure BDA0003977649470000062
is the predicted value of the electric energy load, g (t) is a function taking time as an independent variable, f t,p (. Cndot.) is the trend function, P is the number of regression variables, and T is the number of time points.
During fitting, f is required t,p (. Cndot.) is selected so that
Figure BDA0003977649470000063
And can be broken down into different driving factors.
Formula (1) is rewritten as formula (2):
Figure BDA0003977649470000064
wherein ,
Figure BDA0003977649470000071
is a non-periodic trend of change +.>
Figure BDA0003977649470000072
As a periodical change trend, beta t,p Is the time coefficient of variation for a particular channel.
The bayesian regression model is a kernel-based time-varying regression model under a bayesian framework, the core of which is to represent the regression coefficients as weighted sums of local latent variables, using the latent variables to define a smoothed time-varying representation of the model coefficients, and these smoothed representations are kernel-smoothed. The bayesian regression model has fewer parameters and therefore faster computation speed than a typical dynamic linear model.
Taking the logarithm of both sides of the formula (2) at the same time, the method can be changed into the form of the formula (3):
Figure BDA0003977649470000073
wherein ,rt To add regression component, l t S is a local trend component t Is a seasonal period variation component.
The sequence of user power usage may be considered as an additive combination of local trend components, seasonal period variation components, and additional regression components. Taking the example of additional regression components, the model defines a latent variable b jp At time t as the p-th regression quantity j Is a time-varying coefficient of (1), p=1, P, j=1,..j, t j E { 1., where, T }. For each regression quantity, there are J potential variables in total, and ∈ { 1.. j A node at the same time.
Thus, the regression coefficient of the p-th regression quantity can be expressed as a weighted sum of J local latent variables, i.e., the regression coefficient of the p-th regression quantity is:
Figure BDA0003977649470000074
for the weight function, a time-based weight function is used, t and t are used j The weighting function of the distance can better acquire t and t j Relationship of data at time points:
Figure BDA0003977649470000081
wherein k (·, ·) is a kernel function, the denominator is a weight of the standardized node,
Figure BDA0003977649470000082
at t j Corresponding data, X t And the data corresponding to t.
The kernel function selected according to different data characteristics in the actual data set may be different, that is, different components adopt adaptive kernel functions, which are specifically as follows:
the adaptive kernel function of the local trend component and the seasonal period variation component is:
Figure BDA0003977649470000083
wherein ,klev (t,t j ) Is a time zone t j ,t j+1 ]Kernel function, t j Is the start time of the time zone, t j+1 As the end time of the time zone,
Figure BDA0003977649470000084
at t j+1 Corresponding data.
The adaptive kernel function of the additional regression component is a gaussian kernel, and the formula can be expressed as:
Figure BDA0003977649470000085
wherein ,kreg (t,t j The method comprises the steps of carrying out a first treatment on the surface of the ρ) is the time zone [ t ] j ,t j+1 ]ρ is scale parameter.
The formula (4) can be changed into a matrix form:
β=Kb (8)
wherein beta is a coefficient matrix of T multiplied by P, and the elements are beta t,p K is a kernel matrix of T×P, and the element is w j (T), b is a node matrix of T×P, and the elements are b j,p
The formula for the additional regression component is therefore:
Figure BDA0003977649470000086
wherein ,βt =(β t,1 ,…,β t,p ),X t Is row t of the regression or covariate matrix.
The formula for the local trend component is:
β lev =K lev b lev (10)
l t =β t,lev (11)
wherein ,Klev B is a matrix with standardized weights lev Is a node matrix of the same weight.
The seasonal period variation component is formulated as:
β seas =K seas b seas (12)
Figure BDA0003977649470000091
wherein ,Kseas B is a matrix with seasonal features seas X is a node matrix with the same characteristics t,seas A seasonal covariate matrix for line t, the matrix derived from a fourier series.
In addition to time-varying coefficient regression, the model also uses a Bayesian framework and settable posterior to perform posterior sampling to estimate local node parameters (i.e., b lev 、b seas ) The method aims at quantitatively evaluating the possibility of the fitting result, so that the prediction in long-term data is more accurate, and the occurrence of over-fitting is avoided.
For trend and periodicity components, neighboring nodes are modeled using the laplace prior of equation (14) (15):
b j,lev ~Laplace(b j-1,levlev )(14)
b j,seas ~Laplace(b j-1,seasseas )(15)
wherein ,bj,lev At time t in the local trend component j Potential variable of b j,seas At time t in the seasonal period variation component j Potential variable, sigma lev Sigma, the variance in the Laplace sample based on the local trend component seas Initial value b is the variance in Laplace sampling based on seasonal period variation component 0,lev and b0,seas Samples may be taken from a laplace distribution with a mean value of 0.
For regression, a two-layer hierarchical result was designed to obtain more robust samples, namely equation (16) (17):
Figure BDA0003977649470000101
Figure BDA0003977649470000102
μ reg for mathematical expectations in normal distributions based on additional regression components,
Figure BDA0003977649470000103
indicating that the two-layer hierarchical structure has a pooling effect on the additional regression component, mu pool ,
Figure BDA0003977649470000104
Respectively represent the mathematical expectation and variance therein, b reg Mu, as potential variable in additional regression component reg ,
Figure BDA0003977649470000105
For mathematical expectations and variances in the additional regression components, superscript + denotes normal distribution of the fold.
In the model training process, 10 groups of sequences are selected from the power consumption sequences of all users, 80% of the sequences are divided into training sets, and the rest 20% of the sequences are used as test sets. Rather than first sampling the latent variable prior to obtain a latent variable sample, then using random variation inference (Stochastic Variational IThe potential variable posterior is estimated by nference, SVI, then the node coefficient posterior is obtained by continuing the sampling estimation, and finally the time change coefficient (l) can be obtained by using the formulas (6) to (7) t 、s t 、r t ) And finally checked on the test set.
The training sequence needs to be preprocessed before use, specifically including error data substitution, missing value supplementation, anomaly correction and normalization, as shown in fig. 2, and the specific process is as follows:
(1) Replacing the wrong electricity consumption in the user electricity consumption sequence with 0;
in the original power consumption sequence, error data caused by recording errors exist, and the existence of the data influences the change of overall data trend, so that the error power consumption needs to be deleted, and the data of the positions are set to 0, so that the error power consumption can be ensured not to be influenced by error extreme data in the fitting process.
(2) If the missing power consumption in the power consumption sequence of the user is smaller than the threshold value, filling the missing power consumption by using the first power consumption behind the missing power consumption;
in the recording process of the original electricity consumption, some electricity consumption is not recorded due to equipment faults and other reasons, so that the electricity consumption is lost. If there are many missing values, the prediction effect is greatly affected, and thus it is necessary to fill the missing values.
In the process of filling missing data, a method for filling the postamble data is selected, because the electricity consumption of each period in the application scene changes greatly and the correlation is smaller, and the data continuity can be reflected by applying the latter data to the front. If the number of the power consumption long time sequence series of each user is smaller than 10 after traversing and has a missing value, the first power consumption behind the missing value is used for filling, and the formula can be expressed as:
T i =T i+1 (i=1,...,N-1) (18)
wherein ,Ti Is at default valuePosition, T i+1 Is the latter bit of data of the default value.
If the number of missing values is not less than 10, the surface sample is not available.
(3) Carrying out logarithmic processing on the power consumption with the variation amplitude larger than the average variation amplitude;
in the existing sequence, the variation amplitude of the electricity consumption in some time periods is higher than the average variation amplitude, so that the prediction of the overall trend is influenced; in order to reduce the absolute value of the electricity consumption, avoid pseudo regression, eliminate variance, make the electricity consumption more in line with normal distribution, and carry out logarithmic processing on the electricity consumption. The operation has the significance that the fluctuation of the power consumption is reduced, the degree of variance of the sample is reduced, the absolute value of the power consumption is reduced, the calculation is convenient, and meanwhile, the subsequent complex multiplication operation can be converted into addition operation, so that the operation difficulty is reduced.
(4) Correcting abnormal electricity consumption in the electricity consumption sequence of the user by adopting an average value correction method;
the abnormal electricity consumption is checked by adopting a 3 sigma principle method, and the abnormal electricity consumption is corrected by adopting the following formula:
Figure BDA0003977649470000111
wherein ,xmn For the power consumption of the mth user on the nth day, a (x m ) Is the average power consumption of the mth user, s (x m ) Standard deviation of electricity consumption for mth user, x mn >a(x m )+2s(x m ) Represents x mn Abnormality, f 2 (x mn ) And the corrected electricity consumption is used.
(5) In order to solve the influence of data in different dimensions on the result, the power consumption needs to be standardized. Considering that the maximum and minimum power consumption of each user in the used data set is well determined, the data set is standardized by adopting a maximum and minimum standardization (min-max) method, and the calculation formula is as follows:
Figure BDA0003977649470000121
wherein ,xmmax 、x mmin Respectively x i Maximum power consumption and minimum power consumption of f 3 (x mn ) Is x mn The values after the treatment are normalized.
When the Bayesian regression model is trained, the time-based cross verification is adopted to carry out super-parameter selection, and compared with the traditional cross verification mode, the time-based cross verification is adopted to select parameters, so that the model can learn the trend of data changing along with time, and the data fitting is facilitated.
Because of the time-sequential problem, the time series cannot simply use cross-validation, and to avoid some time sequence feature cross-over, time-based cross-validation is used to perform super-parameter selection. The invention selects an expansion window, namely, the training starting date is fixed, and the ending date is expanded forwards. For other parameters, a start window 380 (in days) is set, each time expansion 120 predicts 20.
Parameters of model training include number of segments (level segments) and number of iterations (steps); wherein the parameter range, the number of segments are selected (10, 20, 30, 40), and the number of iterations are selected (301, 601, 901, 1201). And then performing super-parameter optimization selection by using a backtracking test.
According to the method, the user electricity consumption sequence is regarded as the addition combination of the local trend component, the seasonal period change component and the additional regression component, the kernel regression is used for generating the time change coefficient, the Bayesian framework is used for simulating electricity consumption data, and the super-parameter optimization is carried out through the backtracking test based on time cross verification, so that the effective prediction of the electric energy load of electricity consumption is realized.
Based on the same technical scheme, the invention also discloses a software system corresponding to the method, and an electric energy prediction system comprises:
and the acquisition module acquires a power consumption sequence of the user.
The prediction module inputs the power consumption sequence of the user into a pre-trained Bayesian regression model to obtain future power consumption of the user; the local trend component is data with a change trend in a time area in the user electricity consumption sequence, and the time area is not divided by seasons; the seasonal period variation component is data which is changed in a seasonal period in the electricity consumption sequence of the user; the additional regression component is a correction amount to the user abnormal electricity consumption data.
In the Bayesian regression model of the prediction module, the self-adaptive kernel functions of the local trend component and the seasonal periodical change component are as follows:
Figure BDA0003977649470000131
wherein ,klev (t,t j ) Is a time zone t j ,t j+1 ]Kernel function, t j As the start time of the time zone,
Figure BDA0003977649470000132
at t j Corresponding data, t j+1 For the end time of the time zone, +.>
Figure BDA0003977649470000133
At t j+1 Corresponding data, X t Data corresponding to t;
the adaptive kernel function of the additional regression component is:
Figure BDA0003977649470000134
wherein ,kreg (t,t j The method comprises the steps of carrying out a first treatment on the surface of the ρ) is the time zone [ t ] j ,t j+1 ]ρ is scale parameter.
The data processing flow of each module of the software system is consistent with the steps of the corresponding method, and the description is not repeated here.
Based on the same technical solution, the present invention also discloses a computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform a power prediction method.
Based on the same technical scheme, the invention also discloses a computing device, which comprises one or more processors, one or more memories and one or more programs, wherein the one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs comprise instructions for executing the electric energy prediction method.
It will be appreciated by those skilled in the art that 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 an entirely hardware embodiment, an entirely 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, CD-ROM, 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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.
The foregoing is illustrative of the present invention and is not to be construed as limiting thereof, but rather as providing for the use of additional embodiments and advantages of all such modifications, equivalents, improvements and similar to the present invention are intended to be included within the scope of the present invention as defined by the appended claims.

Claims (10)

1. A method of predicting electrical energy, comprising:
acquiring a power consumption sequence of a user;
inputting the user electricity consumption sequence into a pre-trained Bayesian regression model to obtain future electricity consumption of the user; in the Bayesian regression model, the user electricity consumption sequence is regarded as an addition combination of a local trend component, a seasonal period change component and an additional regression component, and each component adopts an adaptive kernel function to calculate a time change coefficient; the local trend component is data with a change trend in a time area in the user electricity consumption sequence, and the time area is not divided by seasons; the seasonal period variation component is data which is changed in a seasonal period in the electricity consumption sequence of the user; the additional regression component is a correction amount to the user abnormal electricity consumption data.
2. The method of claim 1, wherein the sequence of user power usage further comprises a preprocessing step prior to entering the bayesian regression model, the step comprising:
replacing the wrong electricity consumption in the user electricity consumption sequence with 0;
if the missing power consumption in the power consumption sequence of the user is smaller than the threshold value, filling the missing power consumption by using the first power consumption behind the missing power consumption;
carrying out logarithmic processing on the power consumption with the variation amplitude larger than the average variation amplitude;
and correcting the abnormal electricity consumption in the electricity consumption sequence of the user by adopting an average value correction method.
3. The method for predicting electric energy according to claim 2, wherein an average value correction method is adopted to correct abnormal electric energy consumption in the electric energy consumption sequence of the user, and the formula is as follows:
Figure FDA0003977649460000011
wherein ,xmn For the power consumption of the mth user on the nth day, a (x m ) Is the average power consumption of the mth user, s (x m ) Standard deviation of electricity consumption for mth user, x mn >a(x m )+2s(x m ) Represents x mn Abnormality, f 2 (x mn ) And the corrected electricity consumption is used.
4. The method of claim 1, wherein the adaptive kernel function of the local trend component and the seasonal period variation component is:
Figure FDA0003977649460000021
wherein ,
Figure FDA0003977649460000022
is a time zone t j ,t j+1 ]Kernel function, t j For the start time of the time zone, +.>
Figure FDA0003977649460000023
At t j Corresponding data, t j+1 For the end time of the time zone, +.>
Figure FDA0003977649460000024
At t j+1 Corresponding data, X t And the data corresponding to t.
5. The method of claim 1, wherein the adaptive kernel of the additional regression component is:
Figure FDA0003977649460000025
wherein ,kreg (t,t j The method comprises the steps of carrying out a first treatment on the surface of the ρ) is the time zone [ t ] j ,t j+1 ]Kernel function, t j For the start time of the time zone, ρ is the scale parameter,
Figure FDA0003977649460000026
at t j Corresponding data, t j+1 X is the end time of the time zone t And the data corresponding to t.
6. The method of claim 1, wherein the super-parametric selection is performed using time-based cross-validation when training a bayesian regression model.
7. A power prediction system, comprising:
the acquisition module is used for acquiring a power consumption sequence of a user;
the prediction module inputs the power consumption sequence of the user into a pre-trained Bayesian regression model to obtain future power consumption of the user; in the Bayesian regression model, the user electricity consumption sequence is regarded as an addition combination of a local trend component, a seasonal period change component and an additional regression component, and each component adopts an adaptive kernel function to calculate a time change coefficient; the local trend component is data with a change trend in a time area in the user electricity consumption sequence, and the time area is not divided by seasons; the seasonal period variation component is data which is changed in a seasonal period in the electricity consumption sequence of the user; the additional regression component is a correction amount to the user abnormal electricity consumption data.
8. The power prediction system of claim 7, wherein the adaptive kernel of the local trend component and the seasonal periodic variation component in the bayesian regression model of the prediction module is:
Figure FDA0003977649460000031
wherein ,klev (t,t j ) Is a time zone t j ,t j+1 ]Kernel function, t j As the start time of the time zone,
Figure FDA0003977649460000032
at t j Corresponding data, t j+1 For the end time of the time zone, +.>
Figure FDA0003977649460000033
At t j+1 Corresponding data, X t Data corresponding to t;
the adaptive kernel function of the additional regression component is:
Figure FDA0003977649460000034
wherein ,kreg (t,t j The method comprises the steps of carrying out a first treatment on the surface of the ρ) is the time zone [ t ] j ,t j+1 ]ρ is scale parameter.
9. A computer readable storage medium storing one or more programs, wherein the one or more programs comprise instructions, which when executed by a computing device, cause the computing device to perform any of the methods of claims 1-6.
10. A computing device, comprising:
one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing any of the methods of claims 1-6.
CN202211535918.7A 2022-12-02 2022-12-02 Electric energy prediction method, system, storage medium and computing device Pending CN116245209A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211535918.7A CN116245209A (en) 2022-12-02 2022-12-02 Electric energy prediction method, system, storage medium and computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211535918.7A CN116245209A (en) 2022-12-02 2022-12-02 Electric energy prediction method, system, storage medium and computing device

Publications (1)

Publication Number Publication Date
CN116245209A true CN116245209A (en) 2023-06-09

Family

ID=86630287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211535918.7A Pending CN116245209A (en) 2022-12-02 2022-12-02 Electric energy prediction method, system, storage medium and computing device

Country Status (1)

Country Link
CN (1) CN116245209A (en)

Similar Documents

Publication Publication Date Title
CN111815053B (en) Prediction method and system for industrial time sequence data
WO2020176295A1 (en) Artificial neural network compression via iterative hybrid reinforcement learning approach
CN111860982A (en) Wind power plant short-term wind power prediction method based on VMD-FCM-GRU
EP3380948B1 (en) Environmental monitoring systems, methods and media
CN110471276B (en) Apparatus for creating model functions for physical systems
CN111694714B (en) Method, device and equipment for estimating power consumption of many-core chip and readable storage medium
CN112884236B (en) Short-term load prediction method and system based on VDM decomposition and LSTM improvement
CN111125964B (en) Sewage treatment process proxy model construction method based on Kriging interpolation method
CN110413657B (en) Average response time evaluation method for seasonal non-stationary concurrency
CN116306798A (en) Ultra-short time wind speed prediction method and system
CN113983646A (en) Air conditioner interaction end energy consumption prediction method based on generation countermeasure network and air conditioner
CN112737463A (en) Multi-objective optimization method and device for permanent magnet linear synchronous motor
CN114694379B (en) Traffic flow prediction method and system based on self-adaptive dynamic graph convolution
CN112379274A (en) Method for predicting residual life of power battery
CN109540089B (en) Bridge deck elevation fitting method based on Bayes-Kriging model
CN118536646A (en) Prediction method, system and equipment for long-term dynamic carbon emission factor in region
CN117077327A (en) Bearing life prediction method and system based on digital twin
Liu et al. Robust global identification of LPV errors-in-variables systems with incomplete observations
CN114897274A (en) Method and system for improving time sequence prediction effect
CN112685900B (en) Power load simulation method for representing impact load power characteristics
CN112232570A (en) Forward active total electric quantity prediction method and device and readable storage medium
Zou et al. Reliability analysis of Digital Instrumentation and Control software system
CN116245209A (en) Electric energy prediction method, system, storage medium and computing device
CN115907192A (en) Method and device for generating wind power fluctuation interval prediction model and electronic equipment
CN115828441A (en) Fan output scene generation and reduction method based on condition generation countermeasure network

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