[go: up one dir, main page]

CN119047651B - Community energy consumption prediction method, device and equipment based on Bayesian calibration - Google Patents

Community energy consumption prediction method, device and equipment based on Bayesian calibration Download PDF

Info

Publication number
CN119047651B
CN119047651B CN202411506336.5A CN202411506336A CN119047651B CN 119047651 B CN119047651 B CN 119047651B CN 202411506336 A CN202411506336 A CN 202411506336A CN 119047651 B CN119047651 B CN 119047651B
Authority
CN
China
Prior art keywords
data
prediction
energy consumption
historical
time interval
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202411506336.5A
Other languages
Chinese (zh)
Other versions
CN119047651A (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.)
Ningbo Zerui Environmental Protection Technology Co ltd
Original Assignee
Ningbo Zerui Environmental Protection 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 Ningbo Zerui Environmental Protection Technology Co ltd filed Critical Ningbo Zerui Environmental Protection Technology Co ltd
Priority to CN202411506336.5A priority Critical patent/CN119047651B/en
Publication of CN119047651A publication Critical patent/CN119047651A/en
Application granted granted Critical
Publication of CN119047651B publication Critical patent/CN119047651B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • 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/042Knowledge-based neural networks; Logical representations of neural 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/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/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

Landscapes

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

Abstract

The invention provides a community energy consumption prediction method, device and equipment based on Bayesian calibration, and relates to the technical field of energy consumption prediction, wherein the method comprises the steps of inputting historical energy consumption data and community energy influence data into a trained energy consumption prediction model, generating first prediction data, and determining difference data; extracting a time sequence histogram, determining the distribution characteristics of influence data and determining the prior distribution of an energy consumption prediction model, determining likelihood values according to difference data based on a Bayesian theorem, generating posterior distribution, inputting the posterior distribution and future community energy influence data into the trained energy consumption prediction model to generate second prediction data and prediction confidence, extracting a first similarity and a target time interval, respectively extracting historical similar energy consumption data and prediction similar energy consumption data, determining the second similarity, and generating a final energy consumption prediction result according to the second prediction data, the prediction confidence and the second similarity. The invention can improve the prediction precision.

Description

Community energy consumption prediction method, device and equipment based on Bayesian calibration
Technical Field
The invention relates to the technical field of energy consumption prediction, in particular to a community energy consumption prediction method, device and equipment based on Bayesian calibration.
Background
The community energy consumption prediction is a key link for optimizing energy use, improving energy efficiency and formulating an effective energy-saving emission-reducing strategy. Community energy consumption prediction relates to data analysis and technical application of multiple layers, and aims to accurately estimate energy consumption conditions of communities in a future period of time. This not only contributes to the efficient allocation of resources, but also promotes the utilization of clean energy and the construction of environmentally friendly communities.
In the prior art, the energy consumption prediction at the community level is mainly carried out by depending on a statistical model and a rule-based method, and although prediction data can be given out by the method, the environment factors of nonlinearity and uncertainty exist in the energy consumption prediction of the community, so that the complex and changeable actual conditions which are difficult to process by the method in the prior art are caused, and the prediction precision is low.
Disclosure of Invention
The invention solves the problem of how to improve the accuracy of energy consumption prediction.
In order to solve the above problems, in a first aspect, the present invention provides a community energy consumption prediction method based on bayesian calibration, including:
Acquiring historical energy consumption data, historical community energy influence data and future community energy influence data;
Inputting the historical energy consumption data and the historical community energy influence data into a trained energy consumption prediction model, generating first prediction data, and determining difference data between the first prediction data and the historical energy consumption data;
Respectively extracting time sequence histograms of the historical energy consumption data and the historical community energy influence data, determining influence data distribution characteristics according to the time sequence histograms, and determining prior distribution of the energy consumption prediction model according to the influence data distribution characteristics and expert knowledge;
Based on a Bayesian theorem, determining likelihood values according to the difference data, and generating posterior distribution according to the prior distribution and the likelihood values;
Inputting the posterior distribution and the future community energy influence data in a plurality of different future time intervals into the trained energy consumption prediction model, and generating second prediction data and corresponding prediction confidence, wherein the second prediction data comprises prediction data in the future time intervals, the historical energy consumption data comprises energy consumption data in a plurality of different historical time intervals, the historical community energy influence data comprises influence data in a plurality of historical time intervals, and the historical time intervals are in one-to-one correspondence with the future time intervals;
Extracting first similarity between the influence data in each historical time interval and the corresponding future community energy influence data in the future time interval, and extracting a target time interval corresponding to the first similarity which is larger than a preset threshold, wherein the target time interval comprises a target historical time interval and a target future time interval;
Respectively extracting historical similar energy consumption data corresponding to the target historical time interval from the historical energy consumption data and predicted similar energy consumption data corresponding to the target future time interval from the second predicted data, and determining second similarity of the historical similar energy consumption data and the predicted similar energy consumption data;
And generating a final energy consumption prediction result according to the second prediction data, the prediction confidence and the second similarity.
Optionally, the generating a final energy consumption prediction result according to the second prediction data, the prediction confidence and the second similarity includes:
Extracting high-confidence prediction data with the prediction confidence degree larger than a preset confidence degree from the second prediction data;
The high confidence prediction data and the second similarity are associated, the high confidence prediction data is divided according to the second similarity and the second preset similarity, and a determination prediction result and a pending prediction result are generated;
extracting a pending future time interval of the pending prediction result and a pending history time interval corresponding to the pending future time interval, extracting future community energy influence data corresponding to the pending future time interval according to the pending future time interval, and extracting history energy consumption data corresponding to the pending history time interval according to the pending history time interval;
Inputting the historical energy consumption data corresponding to the undetermined historical time interval and the future community energy influence data corresponding to the undetermined future time interval into the trained energy consumption prediction model to generate a retest result;
And integrating the determined prediction result and the retest result to generate the final energy consumption prediction result.
Optionally, the trained energy consumption prediction model comprises an input layer, a feature extraction module, a multi-mode fusion module, an integrated learning module, an uncertainty quantization module and an output layer;
the input layer is used for acquiring the historical energy consumption data and the historical community energy influence data or acquiring the posterior distribution and the future community energy influence data;
The characteristic extraction module is used for respectively extracting a first long-term time characteristic and a first space characteristic of the historical energy consumption data and the historical community energy influence data or respectively extracting a second long-term time characteristic and a second space characteristic of the posterior distribution and the future community energy influence data;
The multi-mode fusion module is used for respectively fusing the corresponding first long-term time feature and the corresponding first space feature to generate a first comprehensive feature, or respectively fusing the corresponding second long-term time feature and the corresponding second space feature to generate a second comprehensive feature;
The integrated learning module is used for performing integrated learning on all the first comprehensive features to generate the first prediction data, or is used for performing integrated learning on all the second comprehensive features to generate the second prediction data;
The uncertainty quantization module is used for generating the corresponding prediction confidence according to the second comprehensive characteristics and the second prediction data;
The output layer is used for outputting the first prediction data or outputting the second prediction data and the prediction confidence.
Optionally, the feature extraction module comprises a convolutional neural network, a long-term and short-term memory network and a graph neural network;
The convolutional neural network is used for respectively extracting first local time features of the historical energy consumption data and the historical community energy influence data or extracting second local time features of the posterior distribution and the future community energy influence data;
The long-term and short-term memory network is used for generating the first long-term time characteristic according to the first local time characteristic or generating the second long-term time characteristic according to the second local time characteristic;
the graph neural network is used for respectively extracting first spatial features of the historical energy consumption data and the historical community energy influence data or extracting second spatial features of the posterior distribution and the future community energy influence data;
the multi-mode fusion module comprises an attention unit and a multi-mode feature fusion unit;
The attention unit is configured to convert the first long-term temporal feature and the first spatial feature into a first weighted temporal feature and a first weighted spatial feature, respectively, using a self-attention mechanism, and to convert the first weighted temporal feature and the first weighted spatial feature into a first cross-modal fusion feature, or to convert the second long-term temporal feature and the second spatial feature into a second weighted temporal feature and a second weighted spatial feature, respectively, using the self-attention mechanism, and to convert the second weighted temporal feature and the second weighted spatial feature into a second cross-modal fusion feature, using the cross-attention mechanism;
The multi-modal feature fusion unit is used for converting the first cross-modal fusion feature into the first comprehensive feature or converting the second cross-modal fusion feature into the second comprehensive feature by adopting a multi-layer perceptron.
Optionally, the integrated learning module includes a plurality of sub-prediction models, an integration unit, and a weighted average unit;
The sub-prediction model is used for generating a corresponding first sub-prediction result according to the first comprehensive characteristics or generating a corresponding second sub-prediction result according to the second comprehensive characteristics;
The integration unit is used for stacking all the first sub-prediction results to generate a first prediction result data set, or is used for stacking all the second sub-prediction results to generate a second prediction result data set;
the weighted average unit is used for generating the first prediction data according to the first prediction result data set and the weight data set, or generating the second prediction data according to the second prediction result data set and the weight data set;
the uncertainty quantization module comprises a Monte Carlo unit and a confidence interval unit;
The Monte Carlo unit is used for generating mean variance data corresponding to the second prediction data according to a Monte Carlo method and the second comprehensive characteristics;
the confidence interval unit is used for generating the prediction confidence according to the mean variance data.
Optionally, the determining likelihood values according to the difference data based on bayesian theorem includes:
based on the Bayesian theorem, determining the likelihood value by adopting a Gaussian likelihood function formula according to the difference data, wherein the Gaussian likelihood function formula comprises:
;
Wherein, For the likelihood value of the ith one of the first prediction data,As a parameter of the model, it is possible to provide,For said ith said first prediction data,For the input feature vector of the ith said first prediction data,For said ith said historical energy consumption data,Is the noise variance.
Optionally, the determining the prior distribution of the energy consumption prediction model according to the influence data distribution characteristics and expert knowledge includes:
and determining the prior distribution by adopting a weighted average method according to the influence data distribution characteristics and the expert knowledge.
In a second aspect, the present invention provides a community energy consumption prediction device based on bayesian calibration, to implement the community energy consumption prediction method based on bayesian calibration according to the first aspect, where the community energy consumption prediction device based on bayesian calibration includes:
the acquisition module is used for acquiring historical energy consumption data, historical community energy influence data and future community energy influence data;
The difference module is used for inputting the historical energy consumption data and the historical community energy influence data into a trained energy consumption prediction model, generating first prediction data and determining difference data of the first prediction data and the historical energy consumption data;
The distribution module is used for respectively extracting time sequence histograms of the historical energy consumption data and the historical community energy influence data, determining influence data distribution characteristics according to the time sequence histograms, and determining prior distribution of the energy consumption prediction model according to the influence data distribution characteristics and expert knowledge;
The calibration module is used for determining likelihood values according to the difference data based on a Bayesian theorem and generating posterior distribution according to the prior distribution and the likelihood values;
The prediction module is used for inputting the posterior distribution and the future community energy influence data in a plurality of different future time intervals into the trained energy consumption prediction model to generate second prediction data and corresponding prediction confidence, wherein the second prediction data comprises prediction data in the future time intervals, the historical energy consumption data comprises energy consumption data in a plurality of different historical time intervals, the historical community energy influence data comprises influence data in a plurality of historical time intervals, and the historical time intervals are in one-to-one correspondence with the future time intervals;
The interval module is used for extracting first similarity between the influence data in each historical time interval and the corresponding future community energy influence data in the future time interval, and extracting a target time interval corresponding to the first similarity which is larger than a preset threshold, wherein the target time interval comprises a target historical time interval and a target future time interval;
The similarity module is used for respectively extracting historical similar energy consumption data corresponding to the target historical time interval in the historical energy consumption data and predicted similar energy consumption data corresponding to the target future time interval in the second prediction data, and determining second similarity of the historical similar energy consumption data and the predicted similar energy consumption data;
And the result module is used for generating a final energy consumption prediction result according to the second prediction data, the prediction confidence and the second similarity.
In a third aspect, the present invention provides an electronic device comprising a memory and a processor;
the memory is used for storing a computer program;
The processor is configured to implement the community energy consumption prediction method based on bayesian calibration according to the first aspect when executing the computer program.
In a fourth aspect, the present invention provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the community energy consumption prediction method based on bayesian calibration according to the first aspect.
The community energy consumption prediction method and device based on Bayesian calibration, electronic equipment and storage medium have the beneficial effects that:
The obtained historical energy consumption data and community energy influence data are input into the trained energy consumption prediction model to generate first prediction data, difference data of the first prediction data and the historical energy consumption data are determined, the basic performance of the model can be evaluated, the prediction precision of the current energy consumption prediction model is determined, and follow-up Bayesian calibration is facilitated. And determining the distribution characteristics of the influence data through a time sequence histogram of the historical energy consumption data and the historical community energy influence data, setting reasonable prior distribution by combining expert knowledge, improving the accuracy of parameter estimation in the existing Bayesian method, and avoiding the subjectivity problem caused by the fact that the existing Bayesian method completely depends on expert experience. And then, based on the Bayesian theorem, determining likelihood values according to the difference data, taking the data observed by the model, namely the difference data, into consideration, and obtaining more accurate parameter estimation, namely posterior distribution, through a Bayesian updating process according to the prior distribution and the likelihood values, thereby carrying out first calibration to improve the adaptability and the prediction accuracy of the model. And predicting by using the updated parameter distribution and future input data, and simultaneously giving out corresponding confidence coefficient, so that the prediction result not only comprises point estimation but also comprises uncertainty information, the reliability of prediction is enhanced, and meanwhile, the second calibration is convenient, through the first similarity between the influence data in each historical time interval and the future community energy influence data in the corresponding future time interval, the target time interval with the first similarity larger than a preset threshold value is extracted, and meanwhile, the second similarity between the corresponding historical similar energy consumption data and the predicted similar energy consumption data in the target time interval is determined, so that the possible performance of energy consumption under similar conditions is identified, reliable information is provided for the second prediction calibration, and finally, the second calibration is performed according to the second prediction data, the prediction confidence coefficient and the second similarity, so that the accurate final energy consumption prediction result is obtained.
Drawings
FIG. 1 is a schematic flow chart of a community energy consumption prediction method based on Bayesian calibration provided by an embodiment of the invention;
FIG. 2 is a schematic diagram of an energy consumption prediction model according to an embodiment of the present invention;
FIG. 3 is a second schematic diagram of an energy consumption prediction model according to an embodiment of the present invention;
Fig. 4 is a schematic structural diagram of a community energy consumption prediction device based on bayesian calibration according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the invention will be readily understood, a more particular description of the invention will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. While the invention is susceptible of embodiment in the drawings, it is to be understood that the invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided to provide a more thorough and complete understanding of the invention. It should be understood that the drawings and embodiments of the invention are for illustration purposes only and are not intended to limit the scope of the present invention.
It should be understood that the various steps recited in the method embodiments of the present invention may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the invention is not limited in this respect.
The term "comprising" and variations thereof as used herein is meant to be open-ended, i.e., "including but not limited to," based at least in part on, "one embodiment" means "at least one embodiment," another embodiment "means" at least one additional embodiment, "some embodiments" means "at least some embodiments," and "optional" means "optional embodiment. Related definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this disclosure are only used to distinguish between different devices, modules or units, and are not intended to limit the order or interdependence of functions performed by these devices, modules or units.
It should be noted that references to "a" and "an" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Aiming at the problems of the related art, the embodiment provides a community energy consumption prediction method, device, electronic equipment and storage medium based on Bayesian calibration.
As shown in fig. 1, the community energy consumption prediction method based on bayesian calibration provided by the embodiment of the invention includes:
And acquiring historical energy consumption data, historical community energy influence data and future community energy influence data.
Specifically, the historical energy consumption data refers to energy consumption data of communities in a certain time in the past, the historical community energy influence data refers to data corresponding to factors influencing energy consumption in a certain time in the past, and the future community energy influence data refers to data corresponding to factors influencing energy consumption in a future expected time. Illustratively, the historical community energy impact data includes historical meteorological data, historical community activity level data, historical renewable energy power generation data, and historical policy impact data, and the future community energy impact data includes future meteorological data, future community activity level data, future renewable energy power generation data, and future policy impact data. The weather data comprise temperature, humidity, wind speed and the like, the weather data can be acquired based on sensors, community activity level data can be calculated based on population density, commercial activity intensity and the like, renewable energy generating capacity data comprise solar energy and wind energy, the renewable energy generating capacity data can be obtained through statistics, and policy influence data can be obtained according to statistics.
And inputting the historical energy consumption data and the historical community energy influence data into a trained energy consumption prediction model, generating first prediction data, and determining difference data between the first prediction data and the historical energy consumption data.
Specifically, the energy consumption prediction model may adopt a convolutional neural network model, a random forest model, an optimizing model and other neural network models. Firstly, historical energy consumption data and community energy influence data are input into a trained energy consumption prediction model to generate first prediction data, and difference data of the first prediction data and the historical energy consumption data are determined, so that the energy consumption prediction model is subjected to preliminary evaluation according to the difference data, and the follow-up verification is facilitated.
And respectively extracting time sequence histograms of the historical energy consumption data and the historical community energy influence data, determining influence data distribution characteristics according to the time sequence histograms, and determining prior distribution of the energy consumption prediction model according to the influence data distribution characteristics and expert knowledge.
Specifically, in the bayesian method in the prior art, expert knowledge is mainly adopted for determining prior distribution, because the subjectivity of the expert knowledge is strong and is independent of objective conditions, time sequence histograms of historical energy consumption data and historical community energy influence data are firstly extracted respectively, distribution characteristics of the influence data, such as normal distribution, gaussian distribution and the like, are determined through analysis of the time sequence histograms, and the subjectivity problem caused by the fact that the prior bayesian method completely depends on expert experience is avoided by combining the influence data distribution characteristics and the expert knowledge, so that the accuracy of a model is improved, the combination of subjective experience and objective facts is realized, prior distribution of an energy consumption prediction model is determined in a double-angle mode, and uncertainty of parameters is represented through the prior distribution, for example, normal distribution, uniform distribution or other suitable probability distribution can be used.
Based on the Bayesian theorem, likelihood values are determined according to the difference data, and posterior distribution is generated according to the prior distribution and the likelihood values.
Specifically, a suitable likelihood function is defined first, and likelihood values are determined according to the likelihood function and the difference data, so as to measure the matching degree between the model prediction result and the actual observation data under the given set of parameter conditions. And then calculating posterior distribution of the parameters by using a Bayesian formula of the Bayesian theorem and combining the prior distribution and likelihood values obtained by likelihood functions, wherein the step can be completed by a numerical method, for example, a Markov chain Monte Carlo MCMC or an analytic method.
Inputting the posterior distribution and the future community energy influence data in a plurality of different future time intervals into the trained energy consumption prediction model, and generating second prediction data and corresponding prediction confidence, wherein the second prediction data comprises a plurality of prediction data in the future time intervals, the historical energy consumption data comprises energy consumption data in a plurality of different historical time intervals, the historical community energy influence data comprises a plurality of influence data in the historical time intervals, and the historical time intervals are in one-to-one correspondence with the future time intervals.
Specifically, the historical time interval corresponds to a future time interval and has a plurality of historical time intervals, each historical time interval has corresponding historical energy consumption data and historical community energy influence data, and each future time interval has corresponding prediction data and future community energy influence data. The parameter values sampled from posterior distribution and future community energy influence data are used for prediction, so that a series of prediction results can be obtained, the possibility under different parameter combinations is reflected, and the second prediction data and the corresponding prediction confidence degree can be obtained by carrying out statistical analysis on the results, such as mean value calculation, variance calculation and the like. For example, at this time, the historical energy consumption data may be input into the trained energy consumption prediction model together with the future community energy impact data as an impact factor, because the historical energy consumption data may also affect the future energy consumption data, for example, the previous day and the yesterday energy consumption data may have a certain impact on the tomorrow energy consumption.
Extracting first similarity between the influence data in each historical time interval and the corresponding future community energy influence data in the future time interval, and extracting a target time interval corresponding to the first similarity which is larger than a preset threshold, wherein the target time interval comprises a target historical time interval and a target future time interval.
Specifically, in some cases, community energy influence data of a certain period of time and a certain period of time in the future are similar or even identical, so in this case, the same influence factors should be similar in terms of energy consumption, so that a first similarity of influence data in each historical time interval and future community energy influence data in a corresponding future time interval is extracted, and a target time interval corresponding to the first similarity greater than a preset threshold is extracted to determine a time period in which this situation exists, for example, monday through wednesday, friday through hexa, sunday through friday, and the like. The prediction threshold is set according to actual conditions, for example.
And respectively extracting historical similar energy consumption data corresponding to the target historical time interval from the historical energy consumption data and predicted similar energy consumption data corresponding to the target future time interval from the second predicted data, and determining second similarity of the historical similar energy consumption data and the predicted similar energy consumption data.
Specifically, the energy consumption data corresponding to a target time interval in which the historical community energy influence data is similar to the future community energy influence data, namely, the historical similar energy consumption data and the predicted similar energy consumption data are extracted, so that the predicted result of the energy consumption prediction model is judged to be similar to the actual similarity condition, namely, the second similarity under the similar influence factors, and the practicability and the accuracy of the energy consumption prediction model are further judged.
And generating a final energy consumption prediction result according to the second prediction data, the prediction confidence and the second similarity.
Specifically, according to the prediction confidence coefficient of the model on the second prediction data and the actual similarity condition of the prediction result and the second prediction data under the similar influence factors, under the condition that both the prediction confidence coefficient and the similarity are higher, the final energy consumption prediction result is obtained, and if both the similarity is lower, the prediction is carried out again.
In this embodiment, the obtained historical energy consumption data and community energy influence data are input into the trained energy consumption prediction model to generate the first prediction data, and difference data between the first prediction data and the historical energy consumption data is determined, so that the basic performance of the model can be evaluated, the prediction precision of the current energy consumption prediction model is determined, and the subsequent Bayesian calibration is facilitated. And determining the distribution characteristics of the influence data through a time sequence histogram of the historical energy consumption data and the historical community energy influence data, setting reasonable prior distribution by combining expert knowledge, improving the accuracy of parameter estimation in the existing Bayesian method, and avoiding the subjectivity problem caused by the fact that the existing Bayesian method completely depends on expert experience. And then, based on the Bayesian theorem, determining likelihood values according to the difference data, taking the data observed by the model, namely the difference data, into consideration, and obtaining more accurate parameter estimation, namely posterior distribution, through a Bayesian updating process according to the prior distribution and the likelihood values, thereby carrying out first calibration to improve the adaptability and the prediction accuracy of the model. Then the updated parameter distribution and future input data are utilized to predict, and corresponding confidence is given, so that the prediction result not only contains point estimation but also uncertainty information, the reliability of prediction is enhanced, and the second calibration is convenient, the first similarity of the historical community energy influence data and the future community energy influence data is extracted, through the first similarity of the influence data in each historical time interval and the future community energy influence data in the corresponding future time interval, and extracting a target time interval with the first similarity larger than a preset threshold, and simultaneously determining corresponding historical similar energy consumption data and second similarity of predicted similar energy consumption data in the target time interval to identify possible expression of energy consumption under similar conditions, providing reliable information for second prediction calibration, and finally performing second calibration according to the second prediction data, the prediction confidence and the second similarity to obtain an accurate final energy consumption prediction result.
Optionally, the generating a final energy consumption prediction result according to the second prediction data, the prediction confidence and the second similarity includes:
Extracting high-confidence prediction data with the prediction confidence degree larger than a preset confidence degree from the second prediction data;
The high confidence prediction data and the second similarity are associated, the high confidence prediction data is divided according to the second similarity and the second preset similarity, and a determination prediction result and a pending prediction result are generated;
extracting a pending future time interval of the pending prediction result and a pending history time interval corresponding to the pending future time interval, extracting future community energy influence data corresponding to the pending future time interval according to the pending future time interval, and extracting history energy consumption data corresponding to the pending history time interval according to the pending history time interval;
Inputting the historical energy consumption data corresponding to the undetermined historical time interval and the future community energy influence data corresponding to the undetermined future time interval into the trained energy consumption prediction model to generate a retest result;
And integrating the determined prediction result and the retest result to generate the final energy consumption prediction result.
Specifically, the prediction data with the highest confidence in the second prediction data, namely the high confidence prediction data, is selected, then the high confidence prediction data and the second similarity are associated, the high confidence prediction data is divided according to the second similarity and the second preset similarity, and a determined prediction result and a pending prediction result are generated. It should be understood that not all of the high confidence prediction data have the corresponding second similarity, and only the high confidence prediction data within the time interval is divided at this time, and the high confidence prediction data without the corresponding second similarity is directly used as the determination prediction result. For the undetermined prediction result, a time range corresponding to the undetermined prediction result, namely a undetermined future time interval, acquiring undetermined historical time intervals corresponding to the undetermined future time interval, inputting future community energy influence data corresponding to the undetermined future time interval and historical energy consumption data corresponding to the undetermined historical time interval into a trained energy consumption prediction model, and predicting the undetermined future time interval again to improve accuracy. It should be noted that, when the reconstruction is performed, the historical energy consumption data is input into the energy consumption prediction model as a priori knowledge, so as to correct the prediction data according to the historical energy consumption data, and obtain a more accurate result. For example, among all the high-confidence prediction data, the high-confidence prediction data having the second similarity greater than the second preset similarity may be used as the determination prediction result, and the high-confidence prediction data having the second similarity less than or equal to the second preset similarity may be used as the pending prediction result.
Optionally, the trained energy consumption prediction model comprises an input layer, a feature extraction module, a multi-mode fusion module, an integrated learning module, an uncertainty quantization module and an output layer;
the input layer is used for acquiring the historical energy consumption data and the historical community energy influence data or acquiring the posterior distribution and the future community energy influence data;
The characteristic extraction module is used for respectively extracting a first long-term time characteristic and a first space characteristic of the historical energy consumption data and the historical community energy influence data or respectively extracting a second long-term time characteristic and a second space characteristic of the posterior distribution and the future community energy influence data;
The multi-mode fusion module is used for respectively fusing the corresponding first long-term time feature and the corresponding first space feature to generate a first comprehensive feature, or respectively fusing the corresponding second long-term time feature and the corresponding second space feature to generate a second comprehensive feature;
The integrated learning module is used for performing integrated learning on all the first comprehensive features to generate the first prediction data, or is used for performing integrated learning on all the second comprehensive features to generate the second prediction data;
The uncertainty quantization module is used for generating the corresponding prediction confidence according to the second comprehensive characteristics and the second prediction data;
The output layer is used for outputting the first prediction data or outputting the second prediction data and the prediction confidence.
Specifically, as shown in fig. 2, the trained energy consumption prediction model includes an input layer, a feature extraction module, a multi-modal fusion module, an integrated learning module, an uncertainty quantization module, and an output layer, where the input layer, the feature extraction module, the multi-modal fusion module, the integrated learning module, the uncertainty quantization module, and the output layer are sequentially connected. The input layer is used for acquiring historical energy consumption data and historical community energy influence data or acquiring posterior distribution and future community energy influence data, the feature extraction module is used for respectively extracting first long-term time features and first space features of the historical energy consumption data and the historical community energy influence data or respectively extracting second long-term time features and second space features of the posterior distribution and the future community energy influence data, the multi-mode fusion module is used for respectively fusing the corresponding first long-term time features and the first space features to generate first comprehensive features or respectively fusing the corresponding second long-term time features and the second space features to generate second comprehensive features, the integrated learning module is used for performing integrated learning on all the first comprehensive features to generate first prediction data or performing integrated learning on all the second comprehensive features to generate second prediction data, the uncertainty quantization module is used for generating corresponding prediction confidence according to the second comprehensive features and the second prediction data, and the output layer is used for outputting the second prediction data and the confidence.
Optionally, the feature extraction module comprises a convolutional neural network, a long-term and short-term memory network and a graph neural network;
The convolutional neural network is used for respectively extracting first local time features of the historical energy consumption data and the historical community energy influence data or extracting second local time features of the posterior distribution and the future community energy influence data;
The long-term and short-term memory network is used for generating the first long-term time characteristic according to the first local time characteristic or generating the second long-term time characteristic according to the second local time characteristic;
the graph neural network is used for respectively extracting first spatial features of the historical energy consumption data and the historical community energy influence data or extracting second spatial features of the posterior distribution and the future community energy influence data;
the multi-mode fusion module comprises an attention unit and a multi-mode feature fusion unit;
The attention unit is configured to convert the first long-term temporal feature and the first spatial feature into a first weighted temporal feature and a first weighted spatial feature, respectively, using a self-attention mechanism, and to convert the first weighted temporal feature and the first weighted spatial feature into a first cross-modal fusion feature, or to convert the second long-term temporal feature and the second spatial feature into a second weighted temporal feature and a second weighted spatial feature, respectively, using the self-attention mechanism, and to convert the second weighted temporal feature and the second weighted spatial feature into a second cross-modal fusion feature, using the cross-attention mechanism;
The multi-modal feature fusion unit is used for converting the first cross-modal fusion feature into the first comprehensive feature or converting the second cross-modal fusion feature into the second comprehensive feature by adopting a multi-layer perceptron.
The characteristic extraction module comprises a convolutional neural network, a long-short-period memory network and a graph neural network, wherein the convolutional neural network is used for respectively extracting first local time characteristics of historical energy consumption data and historical community energy influence data or is used for respectively extracting second local time characteristics of posterior distribution and future community energy influence data, the long-short-period memory network is used for generating first long-period time characteristics according to the first local time characteristics or is used for generating second long-period time characteristics according to the second local time characteristics, the graph neural network is used for respectively extracting first spatial characteristics of historical energy consumption data and historical community energy influence data or is used for respectively extracting second spatial characteristics of posterior distribution and future community energy influence data, the attention unit and the multimode characteristic fusion unit are respectively used for converting the first long-period time characteristics and the first spatial characteristics into first weighted time characteristics and first weighted spatial characteristics by adopting a self-attention mechanism, the first weighted time characteristics and the first weighted spatial characteristics are respectively converted into first cross-span characteristics or is used for respectively converting the first weighted time characteristics and the second cross-temporal characteristics into second cross-temporal characteristics by adopting a self-attention mechanism, the second multi-modal fusion unit is used for respectively converting the first weighted time characteristics and the second cross-modal spatial characteristics into the second cross-weighted time characteristics and the first weighted time characteristics by adopting a cross-modal fusion mechanism, or for converting the second cross-modal fusion feature to a second integrated feature.
Optionally, the integrated learning module includes a plurality of sub-prediction models, an integration unit, and a weighted average unit;
The sub-prediction model is used for generating a corresponding first sub-prediction result according to the first comprehensive characteristics or generating a corresponding second sub-prediction result according to the second comprehensive characteristics;
The integration unit is used for stacking all the first sub-prediction results to generate a first prediction result data set, or is used for stacking all the second sub-prediction results to generate a second prediction result data set;
the weighted average unit is used for generating the first prediction data according to the first prediction result data set and the weight data set, or generating the second prediction data according to the second prediction result data set and the weight data set;
the uncertainty quantization module comprises a Monte Carlo unit and a confidence interval unit;
The Monte Carlo unit is used for generating mean variance data corresponding to the second prediction data according to a Monte Carlo method and the second comprehensive characteristics;
the confidence interval unit is used for generating the prediction confidence according to the mean variance data.
Specifically, as shown in fig. 3, the integrated learning module includes a plurality of sub-prediction models, an integration unit and a weighted average unit, the sub-prediction models include an LSTM model, a GRU model, a CNN model, a GNN model and the like, the specific models can be set according to practical situations, the sub-prediction models are used for generating corresponding first sub-prediction results according to first comprehensive features or generating corresponding second sub-prediction results according to second comprehensive features, the integration unit is used for stacking all the first sub-prediction results to generate a first prediction result data set or stacking all the second sub-prediction results to generate a second prediction result data set, the weighted average unit is used for generating first prediction data according to the first prediction result data set and the weight data set, or generating second prediction data according to the second prediction result data set and the weight data set, the uncertainty quantization module includes a monte-carlo unit and a confidence interval unit, the monte-carlo unit is used for generating mean variance data corresponding to the second prediction data according to the monte-carlo method and the second comprehensive features, and the confidence interval unit is used for generating prediction degree variance data according to the mean value variance.
Optionally, the determining likelihood values according to the difference data based on bayesian theorem includes:
based on the Bayesian theorem, determining the likelihood value by adopting a Gaussian likelihood function formula according to the difference data, wherein the Gaussian likelihood function formula comprises:
;
Wherein, For the likelihood value of the ith one of the first prediction data,As a parameter of the model, it is possible to provide,For said ith said first prediction data,For the input feature vector of the ith said first prediction data,For said ith said historical energy consumption data,Is the noise variance.
Specifically, through experimental calculation, the energy consumption data generally belongs to normal distribution, so a Gaussian likelihood function formula is adopted to determine the likelihood value.
Optionally, the determining the prior distribution of the energy consumption prediction model according to the influence data distribution characteristics and expert knowledge includes:
and determining the prior distribution by adopting a weighted average method according to the influence data distribution characteristics and the expert knowledge.
Specifically, the weighted average method is adopted to integrate the influence data distribution characteristics and expert knowledge so as to balance the advantages of the influence data distribution characteristics and the expert knowledge, and therefore more reasonable and accurate prior distribution is obtained.
As shown in fig. 4, the community energy consumption prediction device 400 based on bayesian calibration provided by the embodiment of the present invention implements the community energy consumption prediction method based on bayesian calibration as described above, and the community energy consumption prediction device 400 based on bayesian calibration includes:
An acquisition module 410, configured to acquire historical energy consumption data, historical community energy impact data, and future community energy impact data;
The difference module 420 is configured to input the historical energy consumption data and the historical community energy influence data into a trained energy consumption prediction model, generate first prediction data, and determine difference data between the first prediction data and the historical energy consumption data;
A distribution module 430, configured to extract time sequence histograms of the historical energy consumption data and the historical community energy impact data, determine impact data distribution characteristics according to the time sequence histograms, and determine prior distribution of the energy consumption prediction model according to the impact data distribution characteristics and expert knowledge;
A calibration module 440, configured to determine likelihood values according to the difference data based on bayesian theorem, and generate posterior distribution according to the prior distribution and the likelihood values;
A prediction module 450, configured to input the posterior distribution and the future community energy impact data in a plurality of different future time intervals into the trained energy consumption prediction model, and generate second prediction data and a corresponding prediction confidence, where the second prediction data includes prediction data in the future time intervals, the historical energy consumption data includes energy consumption data in a plurality of different historical time intervals, the historical community energy impact data includes impact data in a plurality of historical time intervals, and the historical time intervals are in one-to-one correspondence with the future time intervals;
An interval module 460, configured to extract a first similarity between the influence data in each historical time interval and the future community energy influence data in the corresponding future time interval, and extract a target time interval corresponding to the first similarity that is greater than a preset threshold, where the target time interval includes a target historical time interval and a target future time interval;
A similarity module 470, configured to extract, from the historical energy consumption data, historical similar energy consumption data corresponding to the target historical time interval, and predicted similar energy consumption data corresponding to the target future time interval, respectively, and determine a second similarity between the historical similar energy consumption data and the predicted similar energy consumption data;
A result module 480 for generating a final energy consumption prediction result according to the second prediction data, the prediction confidence and the second similarity.
As shown in fig. 5, an electronic device 500 according to an embodiment of the present invention includes a memory 510 and a processor 520, where the memory 510 is configured to store a computer program, and the processor 520 is configured to implement the community energy consumption prediction method based on bayesian calibration as described above when executing the computer program.
Alternatively stated, an electronic device 500 comprises a memory 510 and a processor 520 coupled to the memory 510, the memory 510 being configured to store a computer program, the processor 520 being configured to, when executing the computer program, perform the following:
Acquiring historical energy consumption data, historical community energy influence data and future community energy influence data;
Inputting the historical energy consumption data and the historical community energy influence data into a trained energy consumption prediction model, generating first prediction data, and determining difference data between the first prediction data and the historical energy consumption data;
Respectively extracting time sequence histograms of the historical energy consumption data and the historical community energy influence data, determining influence data distribution characteristics according to the time sequence histograms, and determining prior distribution of the energy consumption prediction model according to the influence data distribution characteristics and expert knowledge;
Based on a Bayesian theorem, determining likelihood values according to the difference data, and generating posterior distribution according to the prior distribution and the likelihood values;
Inputting the posterior distribution and the future community energy influence data in a plurality of different future time intervals into the trained energy consumption prediction model, and generating second prediction data and corresponding prediction confidence, wherein the second prediction data comprises prediction data in the future time intervals, the historical energy consumption data comprises energy consumption data in a plurality of different historical time intervals, the historical community energy influence data comprises influence data in a plurality of historical time intervals, and the historical time intervals are in one-to-one correspondence with the future time intervals;
Extracting first similarity between the influence data in each historical time interval and the corresponding future community energy influence data in the future time interval, and extracting a target time interval corresponding to the first similarity which is larger than a preset threshold, wherein the target time interval comprises a target historical time interval and a target future time interval;
Respectively extracting historical similar energy consumption data corresponding to the target historical time interval from the historical energy consumption data and predicted similar energy consumption data corresponding to the target future time interval from the second predicted data, and determining second similarity of the historical similar energy consumption data and the predicted similar energy consumption data;
And generating a final energy consumption prediction result according to the second prediction data, the prediction confidence and the second similarity.
Alternatively, a non-transitory computer readable storage medium having a computer program stored thereon, which when executed by a processor, causes the processor to:
Acquiring historical energy consumption data, historical community energy influence data and future community energy influence data;
Inputting the historical energy consumption data and the historical community energy influence data into a trained energy consumption prediction model, generating first prediction data, and determining difference data between the first prediction data and the historical energy consumption data;
Respectively extracting time sequence histograms of the historical energy consumption data and the historical community energy influence data, determining influence data distribution characteristics according to the time sequence histograms, and determining prior distribution of the energy consumption prediction model according to the influence data distribution characteristics and expert knowledge;
Based on a Bayesian theorem, determining likelihood values according to the difference data, and generating posterior distribution according to the prior distribution and the likelihood values;
Inputting the posterior distribution and the future community energy influence data in a plurality of different future time intervals into the trained energy consumption prediction model, and generating second prediction data and corresponding prediction confidence, wherein the second prediction data comprises prediction data in the future time intervals, the historical energy consumption data comprises energy consumption data in a plurality of different historical time intervals, the historical community energy influence data comprises influence data in a plurality of historical time intervals, and the historical time intervals are in one-to-one correspondence with the future time intervals;
Extracting first similarity between the influence data in each historical time interval and the corresponding future community energy influence data in the future time interval, and extracting a target time interval corresponding to the first similarity which is larger than a preset threshold, wherein the target time interval comprises a target historical time interval and a target future time interval;
Respectively extracting historical similar energy consumption data corresponding to the target historical time interval from the historical energy consumption data and predicted similar energy consumption data corresponding to the target future time interval from the second predicted data, and determining second similarity of the historical similar energy consumption data and the predicted similar energy consumption data;
And generating a final energy consumption prediction result according to the second prediction data, the prediction confidence and the second similarity.
An electronic device 500 that can be a server or a client of the present invention will now be described, which is an example of a hardware device that can be applied to aspects of the present invention. Electronic device 500 is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic device 500 may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
The electronic device 500 includes a computing unit that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) or a computer program loaded from a storage unit into a Random Access Memory (RAM). In the RAM, various programs and data required for the operation of the device may also be stored. The computing unit, ROM and RAM are connected to each other by a bus. An input/output (I/O) interface is also connected to the bus.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps 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 (Random Access Memory, RAM), or the like. In the present application, the units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment of the present application. In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
Although the invention is disclosed above, the scope of the invention is not limited thereto. Various changes and modifications may be made by one skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications will fall within the scope of the invention.

Claims (9)

1. A community energy consumption prediction method based on Bayesian calibration is characterized by comprising the following steps:
Acquiring historical energy consumption data, historical community energy influence data and future community energy influence data;
Inputting the historical energy consumption data and the historical community energy influence data into a trained energy consumption prediction model, generating first prediction data, and determining difference data between the first prediction data and the historical energy consumption data;
Respectively extracting time sequence histograms of the historical energy consumption data and the historical community energy influence data, determining influence data distribution characteristics according to the time sequence histograms, and determining prior distribution of the energy consumption prediction model according to the influence data distribution characteristics and expert knowledge;
Based on a Bayesian theorem, determining likelihood values according to the difference data, and generating posterior distribution according to the prior distribution and the likelihood values;
Inputting the posterior distribution and the future community energy influence data in a plurality of different future time intervals into the trained energy consumption prediction model, and generating second prediction data and corresponding prediction confidence, wherein the second prediction data comprises prediction data in the future time intervals, the historical energy consumption data comprises energy consumption data in a plurality of different historical time intervals, the historical community energy influence data comprises influence data in a plurality of historical time intervals, and the historical time intervals are in one-to-one correspondence with the future time intervals;
Extracting first similarity between the influence data in each historical time interval and the corresponding future community energy influence data in the future time interval, and extracting a target time interval corresponding to the first similarity which is larger than a preset threshold, wherein the target time interval comprises a target historical time interval and a target future time interval;
Respectively extracting historical similar energy consumption data corresponding to the target historical time interval from the historical energy consumption data and predicted similar energy consumption data corresponding to the target future time interval from the second predicted data, and determining second similarity of the historical similar energy consumption data and the predicted similar energy consumption data;
generating a final energy consumption prediction result according to the second prediction data, the prediction confidence and the second similarity;
The generating a final energy consumption prediction result according to the second prediction data, the prediction confidence and the second similarity includes:
Extracting high-confidence prediction data with the prediction confidence degree larger than a preset confidence degree from the second prediction data;
The high confidence prediction data and the second similarity are associated, the high confidence prediction data is divided according to the second similarity and the second preset similarity, and a determination prediction result and a pending prediction result are generated;
extracting a pending future time interval of the pending prediction result and a pending history time interval corresponding to the pending future time interval, extracting future community energy influence data corresponding to the pending future time interval according to the pending future time interval, and extracting history energy consumption data corresponding to the pending history time interval according to the pending history time interval;
Inputting the historical energy consumption data corresponding to the undetermined historical time interval and the future community energy influence data corresponding to the undetermined future time interval into the trained energy consumption prediction model to generate a retest result;
And integrating the determined prediction result and the retest result to generate the final energy consumption prediction result.
2. The community energy consumption prediction method based on Bayesian calibration according to claim 1, wherein the trained energy consumption prediction model comprises an input layer, a feature extraction module, a multi-modal fusion module, an ensemble learning module, an uncertainty quantization module and an output layer;
the input layer is used for acquiring the historical energy consumption data and the historical community energy influence data or acquiring the posterior distribution and the future community energy influence data;
The characteristic extraction module is used for respectively extracting a first long-term time characteristic and a first space characteristic of the historical energy consumption data and the historical community energy influence data or respectively extracting a second long-term time characteristic and a second space characteristic of the posterior distribution and the future community energy influence data;
The multi-mode fusion module is used for respectively fusing the corresponding first long-term time feature and the corresponding first space feature to generate a first comprehensive feature, or respectively fusing the corresponding second long-term time feature and the corresponding second space feature to generate a second comprehensive feature;
The integrated learning module is used for performing integrated learning on all the first comprehensive features to generate the first prediction data, or is used for performing integrated learning on all the second comprehensive features to generate the second prediction data;
The uncertainty quantization module is used for generating the corresponding prediction confidence according to the second comprehensive characteristics and the second prediction data;
The output layer is used for outputting the first prediction data or outputting the second prediction data and the prediction confidence.
3. The community energy consumption prediction method based on Bayesian calibration according to claim 2, wherein the feature extraction module comprises a convolutional neural network, a long-term and short-term memory network and a graph neural network;
The convolutional neural network is used for respectively extracting first local time features of the historical energy consumption data and the historical community energy influence data or extracting second local time features of the posterior distribution and the future community energy influence data;
The long-term and short-term memory network is used for generating the first long-term time characteristic according to the first local time characteristic or generating the second long-term time characteristic according to the second local time characteristic;
the graph neural network is used for respectively extracting first spatial features of the historical energy consumption data and the historical community energy influence data or extracting second spatial features of the posterior distribution and the future community energy influence data;
the multi-mode fusion module comprises an attention unit and a multi-mode feature fusion unit;
The attention unit is configured to convert the first long-term temporal feature and the first spatial feature into a first weighted temporal feature and a first weighted spatial feature, respectively, using a self-attention mechanism, and to convert the first weighted temporal feature and the first weighted spatial feature into a first cross-modal fusion feature, or to convert the second long-term temporal feature and the second spatial feature into a second weighted temporal feature and a second weighted spatial feature, respectively, using the self-attention mechanism, and to convert the second weighted temporal feature and the second weighted spatial feature into a second cross-modal fusion feature, using the cross-attention mechanism;
The multi-modal feature fusion unit is used for converting the first cross-modal fusion feature into the first comprehensive feature or converting the second cross-modal fusion feature into the second comprehensive feature by adopting a multi-layer perceptron.
4. The bayesian calibration based community energy consumption prediction method of claim 3, wherein the ensemble learning module comprises a plurality of sub-prediction models, an ensemble unit and a weighted average unit;
The sub-prediction model is used for generating a corresponding first sub-prediction result according to the first comprehensive characteristics or generating a corresponding second sub-prediction result according to the second comprehensive characteristics;
The integration unit is used for stacking all the first sub-prediction results to generate a first prediction result data set, or is used for stacking all the second sub-prediction results to generate a second prediction result data set;
the weighted average unit is used for generating the first prediction data according to the first prediction result data set and the weight data set, or generating the second prediction data according to the second prediction result data set and the weight data set;
the uncertainty quantization module comprises a Monte Carlo unit and a confidence interval unit;
The Monte Carlo unit is used for generating mean variance data corresponding to the second prediction data according to a Monte Carlo method and the second comprehensive characteristics;
the confidence interval unit is used for generating the prediction confidence according to the mean variance data.
5. The bayesian-calibration-based community energy consumption prediction method according to claim 1, wherein the determining likelihood values based on bayesian theorem from the difference data comprises:
based on the Bayesian theorem, determining the likelihood value by adopting a Gaussian likelihood function formula according to the difference data, wherein the Gaussian likelihood function formula comprises:
;
Wherein, For the likelihood value of the ith one of the first prediction data,As a parameter of the model, it is possible to provide,For said ith said first prediction data,For the input feature vector of the ith said first prediction data,For said ith said historical energy consumption data,Is the noise variance.
6. The bayesian calibration based community energy consumption prediction method according to claim 1, wherein the determining the prior distribution of the energy consumption prediction model according to the influence data distribution characteristics and expert knowledge comprises:
and determining the prior distribution by adopting a weighted average method according to the influence data distribution characteristics and the expert knowledge.
7. A bayesian calibration-based community energy consumption prediction apparatus, wherein the bayesian calibration-based community energy consumption prediction method according to any one of claims 1 to 6 is implemented, the bayesian calibration-based community energy consumption prediction apparatus comprising:
the acquisition module is used for acquiring historical energy consumption data, historical community energy influence data and future community energy influence data;
The difference module is used for inputting the historical energy consumption data and the historical community energy influence data into a trained energy consumption prediction model, generating first prediction data and determining difference data of the first prediction data and the historical energy consumption data;
The distribution module is used for respectively extracting time sequence histograms of the historical energy consumption data and the historical community energy influence data, determining influence data distribution characteristics according to the time sequence histograms, and determining prior distribution of the energy consumption prediction model according to the influence data distribution characteristics and expert knowledge;
The calibration module is used for determining likelihood values according to the difference data based on a Bayesian theorem and generating posterior distribution according to the prior distribution and the likelihood values;
The prediction module is used for inputting the posterior distribution and the future community energy influence data in a plurality of different future time intervals into the trained energy consumption prediction model to generate second prediction data and corresponding prediction confidence, wherein the second prediction data comprises prediction data in the future time intervals, the historical energy consumption data comprises energy consumption data in a plurality of different historical time intervals, the historical community energy influence data comprises influence data in a plurality of historical time intervals, and the historical time intervals are in one-to-one correspondence with the future time intervals;
The interval module is used for extracting first similarity between the influence data in each historical time interval and the corresponding future community energy influence data in the future time interval, and extracting a target time interval corresponding to the first similarity which is larger than a preset threshold, wherein the target time interval comprises a target historical time interval and a target future time interval;
The similarity module is used for respectively extracting historical similar energy consumption data corresponding to the target historical time interval in the historical energy consumption data and predicted similar energy consumption data corresponding to the target future time interval in the second prediction data, and determining second similarity of the historical similar energy consumption data and the predicted similar energy consumption data;
The result module is used for generating a final energy consumption prediction result according to the second prediction data, the prediction confidence and the second similarity;
The generating a final energy consumption prediction result according to the second prediction data, the prediction confidence and the second similarity includes:
Extracting high-confidence prediction data with the prediction confidence degree larger than a preset confidence degree from the second prediction data;
The high confidence prediction data and the second similarity are associated, the high confidence prediction data is divided according to the second similarity and the second preset similarity, and a determination prediction result and a pending prediction result are generated;
extracting a pending future time interval of the pending prediction result and a pending history time interval corresponding to the pending future time interval, extracting future community energy influence data corresponding to the pending future time interval according to the pending future time interval, and extracting history energy consumption data corresponding to the pending history time interval according to the pending history time interval;
Inputting the historical energy consumption data corresponding to the undetermined historical time interval and the future community energy influence data corresponding to the undetermined future time interval into the trained energy consumption prediction model to generate a retest result;
And integrating the determined prediction result and the retest result to generate the final energy consumption prediction result.
8. An electronic device comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to implement the community energy consumption prediction method based on bayesian calibration as claimed in any one of claims 1 to 6 when executing the computer program.
9. A computer readable storage medium, wherein a computer program is stored on the storage medium, which when executed by a processor, implements the bayesian calibration based community energy consumption prediction method of any of claims 1 to 6.
CN202411506336.5A 2024-10-28 2024-10-28 Community energy consumption prediction method, device and equipment based on Bayesian calibration Active CN119047651B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411506336.5A CN119047651B (en) 2024-10-28 2024-10-28 Community energy consumption prediction method, device and equipment based on Bayesian calibration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411506336.5A CN119047651B (en) 2024-10-28 2024-10-28 Community energy consumption prediction method, device and equipment based on Bayesian calibration

Publications (2)

Publication Number Publication Date
CN119047651A CN119047651A (en) 2024-11-29
CN119047651B true CN119047651B (en) 2025-02-14

Family

ID=93585389

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411506336.5A Active CN119047651B (en) 2024-10-28 2024-10-28 Community energy consumption prediction method, device and equipment based on Bayesian calibration

Country Status (1)

Country Link
CN (1) CN119047651B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115564155A (en) * 2022-10-11 2023-01-03 云南电网有限责任公司电力科学研究院 A distributed wind turbine power prediction method and related equipment
CN118228201A (en) * 2024-05-23 2024-06-21 陕西高速电子工程有限公司 Service area electric energy consumption intelligent monitoring method based on Internet of things

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060115145A1 (en) * 2004-11-30 2006-06-01 Microsoft Corporation Bayesian conditional random fields
JP5745388B2 (en) * 2011-11-17 2015-07-08 日本電信電話株式会社 Content recommendation apparatus, method, and program
CN103871021B (en) * 2014-02-27 2017-10-17 电子科技大学 A kind of targetpath initial method cooperated by CPU and GPU
EP3722894B1 (en) * 2019-04-09 2022-08-10 Robert Bosch GmbH Control and monitoring of physical system based on trained bayesian neural network
CN118072132A (en) * 2024-03-19 2024-05-24 江苏海洋大学 Method for improving priori knowledge reliability in small sample learning
CN118133161B (en) * 2024-05-08 2024-07-12 武汉新电电气股份有限公司 Power system inertia interval probability prediction method based on variable decibel leaf inference
CN118445277A (en) * 2024-05-10 2024-08-06 大连众泽瑞兴科技有限公司 Big data security management method and system
CN118693818B (en) * 2024-08-23 2024-12-06 北京理工大学 Data-driven demand-side load forecasting and uncertainty estimation method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115564155A (en) * 2022-10-11 2023-01-03 云南电网有限责任公司电力科学研究院 A distributed wind turbine power prediction method and related equipment
CN118228201A (en) * 2024-05-23 2024-06-21 陕西高速电子工程有限公司 Service area electric energy consumption intelligent monitoring method based on Internet of things

Also Published As

Publication number Publication date
CN119047651A (en) 2024-11-29

Similar Documents

Publication Publication Date Title
US20230169230A1 (en) Probabilistic wind speed forecasting method and system based on multi-scale information
Yu et al. Improved convolutional neural network‐based quantile regression for regional photovoltaic generation probabilistic forecast
CN115936180A (en) Photovoltaic power generation power prediction method and device and computer equipment
CN112651534B (en) Method, device and storage medium for predicting resource supply chain demand
CN118427702B (en) Data mining method and system applied to meteorological service
CN113177652A (en) Photovoltaic output prediction method
CN116739172B (en) A method and device for ultra-short-term offshore wind power power prediction based on slope recognition
CN117748482A (en) Method and device for predicting generated power, electronic equipment and storage medium
CN117744916A (en) Method and device for predicting energy storage capacity, computer equipment and readable storage medium
CN116777213B (en) Carbon transaction market risk early warning system and method based on big data
CN112069039A (en) Monitoring and predicting alarm method and device for artificial intelligence development platform and storage medium
CN113902187A (en) Time-of-use electricity price forecasting method, device and terminal equipment
CN115564155A (en) A distributed wind turbine power prediction method and related equipment
CN116316617A (en) Multi-station intelligent fusion new energy generation power region prediction method and system
CN112365033A (en) Wind power interval prediction method, system and storage medium
CN118199061B (en) Short-term power prediction method and system for renewable energy sources
CN119047651B (en) Community energy consumption prediction method, device and equipment based on Bayesian calibration
CN113011674A (en) Photovoltaic power generation prediction method and device, electronic equipment and storage medium
CN118761507A (en) A meteorologically driven new energy power generation prediction method and system
CN118399378A (en) Method, apparatus, device, storage medium and program product for predicting generated power
CN118153766A (en) A method, device and medium for predicting wind power output under extreme weather scenarios
CN117892099A (en) Wind turbine generator service efficiency evaluation method and system based on probabilistic neural network
Lee et al. Uncertainty‐aware forecast interval for hourly PV power output
CN117713238A (en) Stochastic optimization operation strategy combining photovoltaic power generation and energy storage microgrid
CN117150326A (en) New energy node output power prediction method, device, equipment and storage medium

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