Methods, devices, and electronic equipment for predicting user electricity usage data
By collecting and analyzing the electricity data of target users, an autoregressive and mapping model is constructed, a recurrent neural network is trained, and the prediction model parameters are optimized. This solves the problem of low prediction accuracy of neural network models, realizes accurate prediction and uncertainty reflection of users' electricity consumption, and improves the operating efficiency and stability of the power system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, the accuracy of predictions is low when using neural network models to predict a user's ability to adjust power supply in response to a power dispatch request due to high sample acquisition costs and limited training sample capacity.
Collect target electricity data from target users, construct autoregressive and mapping models, train the target prediction model through recurrent neural networks and multiple feedforward neural networks, calculate the target probability distribution of electricity usage data after the target user responds to the power regulation request, and optimize the model parameters using a loss function.
It enables personalized prediction of target user response behavior, accurately reflects the uncertainty of changes in user electricity usage, improves the reliability of prediction, helps power companies optimize power resource dispatch, and improves the operating efficiency and stability of the power system.
Smart Images

Figure CN119539184B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and more specifically, to a method, apparatus, and electronic device for predicting user electricity usage data. Background Technology
[0002] In the actual operation of the power system, electricity consumption on the user side is affected by various factors and has considerable uncertainty. To alleviate the supply and demand pressure of the power system, the State Grid Corporation of China has carried out demand response work, using economic incentives to mobilize the user-side regulation capacity to achieve flexible control of the generation and consumption sides. Therefore, probabilistic prediction of demand response regulation capacity will play an important supporting role in the implementation of demand response. The uncertainty of demand response regulation capacity mainly stems from user behavior. Currently, researchers mostly use historical data fitting to construct predictive models of demand response regulation capacity. However, prediction models based on historical data fitting often only provide a predicted value and cannot reflect the uncertainty of user regulation capacity.
[0003] There is currently no effective solution to the problem of low prediction accuracy caused by high sample acquisition costs and limited training sample capacity in the process of predicting the power adjustment capacity of users in response to power dispatch requests using neural network models in related technologies. Summary of the Invention
[0004] The main objective of this application is to provide a method, apparatus, and electronic device for predicting user power usage data, in order to solve the problem of low prediction accuracy in the process of predicting the ability of users to adjust power when responding to power dispatch requests through neural network models, due to the high cost of sample acquisition and the limited capacity of training samples.
[0005] To achieve the above objectives, according to one aspect of this application, a method for predicting user electricity usage data is provided. The method includes: collecting target electricity data of a target user, wherein the target electricity data is electricity usage data generated by the target user in the past after responding to power regulation requests and making power adjustments; inputting the target electricity data into a target prediction model, calculating a target probability distribution of the target user's electricity usage data after responding to power regulation requests, wherein the target prediction model is a model obtained by training a preset prediction model, and the model parameters of the preset prediction model are constructed based on the target electricity data; and predicting the target user's electricity usage data based on the target probability distribution.
[0006] Further, the target prediction model is trained by the following steps: constructing a sample dataset based on the historical electricity data and historical behavior data of historical users; constructing an autoregressive model and a mapping model based on the sample dataset, wherein the autoregressive model represents the mapping relationship between the historical behavior data and current behavior data of historical users, and the mapping model represents the mapping relationship between the historical electricity data and the historical behavior data; inputting the output of the autoregressive model and the output of the mapping model into a preset prediction model to obtain the conditional probability distribution of the electricity usage data of historical users after responding to power dispatch requests, wherein the conditional probability distribution includes probability distribution parameters; constructing a loss function for the probability distribution parameters, and using the loss function to optimize the model parameters of the preset prediction model to obtain the target prediction model.
[0007] Further, a sample dataset is constructed based on the historical electricity data and historical behavior data of historical users, including: acquiring historical electricity data and historical behavior data, wherein the historical behavior data is the behavior data of historical users responding to power dispatch requests within a preset time period, and the historical electricity data is the electricity usage data generated after the historical users respond to power adjustment requests and make power adjustments; dividing the historical electricity data into a first data set and a second data set according to a preset time, wherein the first data set represents known data, and the second data set represents data to be predicted; and constructing the sample dataset based on the historical behavior data, the first data set, and the second data set.
[0008] Furthermore, the preset prediction model includes at least a recurrent neural network and multiple feedforward neural networks. The output of the autoregressive model and the output of the mapping model are input into the preset prediction model to obtain the conditional probability distribution of the power usage data after the historical user responds to the power dispatch request. This includes: constructing a second hidden layer state based on the recurrent structure in the recurrent neural network, according to the first hidden layer state, the first data set, and the historical behavior data, wherein there is a temporal order between the second hidden layer state and the first hidden layer state; mapping the second hidden layer state in the recurrent neural network to the probability distribution parameters through the multiple feedforward neural networks; and determining the conditional probability distribution based on the probability distribution parameters.
[0009] Furthermore, constructing an autoregressive model and a mapping model based on the sample dataset includes: constructing the autoregressive model based on the mapping relationship between the first data set and the second data set; and constructing the mapping model based on the mapping relationship between the historical behavioral data and the second data set.
[0010] Further, a loss function is constructed based on the probability distribution parameters, and the model parameters of the preset prediction model are optimized using the loss function to obtain the target prediction model. This includes: constructing the loss function based on the probability distribution parameters and the negative log-likelihood loss function; calculating the loss function value based on the historical behavior data and the loss function; iteratively optimizing the model parameters of the preset prediction model based on the gradient optimization algorithm and the loss function value until the loss function value is within a preset numerical range, thereby obtaining the target prediction model.
[0011] Further, predicting the target user's electricity usage data based on the target probability distribution includes: determining the probability distribution parameters corresponding to the target user based on the target probability distribution; determining the confidence level and significance level of the target user's response to the power dispatch request; and calculating the target user's electricity usage data based on the probability distribution parameters corresponding to the target user, the confidence level, and the significance level.
[0012] Furthermore, the historical behavioral data includes at least one of the following: demand response period, incentive price, outdoor temperature, and user preference information.
[0013] To achieve the above objectives, according to another aspect of this application, a device for predicting user electricity usage data is provided. The device includes: a data acquisition unit for acquiring target electricity data of a target user, wherein the target electricity data is electricity usage data generated by the target user in the past after responding to power regulation requests and making power adjustments; a first calculation unit for inputting the target electricity data into a target prediction model and calculating a target probability distribution of the target user's electricity usage data after responding to power regulation requests, wherein the target prediction model is a model obtained by training a preset prediction model, and the model parameters of the preset prediction model are constructed based on the target electricity data; and a prediction unit for predicting the target user's electricity usage data based on the target probability distribution.
[0014] Furthermore, the device further includes: a first construction unit, configured to construct a sample dataset based on the historical electricity data and historical behavior data of the historical users; a second construction unit, configured to construct an autoregressive model and a mapping model based on the sample dataset, wherein the autoregressive model represents the mapping relationship between the historical behavior data and current behavior data of the historical users, and the mapping model represents the mapping relationship between the historical electricity data and the historical behavior data; a second calculation unit, configured to input the output of the autoregressive model and the output of the mapping model into a preset prediction model to obtain the conditional probability distribution of the electricity usage data of the historical users after responding to power dispatch requests, wherein the conditional probability distribution includes probability distribution parameters; and a third construction unit, configured to construct a loss function for the probability distribution parameters and use the loss function to optimize the model parameters of the preset prediction model to obtain the target prediction model.
[0015] Further, the first construction unit includes: an acquisition subunit, used to acquire historical energy data and historical behavior data, wherein the historical behavior data is the behavior data of historical users responding to power dispatch requests within a preset time period, and the historical energy data is the energy usage data generated after the historical users respond to power adjustment requests and make power adjustments; a division subunit, used to divide the historical energy data into a first data set and a second data set according to a preset time, wherein the first data set represents known data, and the second data set represents data to be predicted; and a first construction subunit, used to construct the sample dataset based on the historical behavior data, the first data set, and the second data set.
[0016] Furthermore, the preset prediction model includes at least: a recurrent neural network and multiple feedforward neural networks. The second computing unit includes: a second construction subunit, used to construct a second hidden layer state based on the recurrent structure in the recurrent neural network, according to the first hidden layer state, the first data set, and the historical behavior data, wherein there is a temporal order between the second hidden layer state and the first hidden layer state; a mapping subunit, used to map the second hidden layer state in the recurrent neural network to the probability distribution parameters through the multiple feedforward neural networks; and a first determination subunit, used to determine the conditional probability distribution based on the probability distribution parameters.
[0017] Furthermore, the second construction unit includes: a third construction subunit, used to construct the autoregressive model based on the mapping relationship between the first data set and the second data set; and a fourth construction subunit, used to construct the mapping model based on the mapping relationship between the historical behavior data and the second data set.
[0018] Furthermore, the third construction unit includes: a fifth construction subunit, used to construct the loss function based on the probability distribution parameters and the negative log-likelihood loss function; a first calculation subunit, used to calculate the loss function value based on the historical behavior data and the loss function; and an optimization subunit, used to iteratively optimize the model parameters of the preset prediction model based on the gradient optimization algorithm and the loss function value until the loss function value is within a preset numerical range, thereby obtaining the target prediction model.
[0019] Furthermore, the prediction unit includes: a second determining subunit, used to determine the probability distribution parameters corresponding to the target user based on the target probability distribution; a third determining subunit, used to determine the confidence level and significance level of the target user's response to the power dispatch request; and a second calculation subunit, used to calculate the target user's power usage data based on the probability distribution parameters corresponding to the target user, the confidence level, and the significance level.
[0020] Furthermore, the historical behavioral data includes at least one of the following: demand response period, incentive price, outdoor temperature, and user preference information.
[0021] To achieve the above objectives, according to one aspect of this application, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method for predicting user power usage data as described in any of the above claims, and the computer program, when executed by a processor, implements the steps of the method for predicting user power usage data as described in various embodiments of this application.
[0022] To achieve the above objectives, according to one aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including stored computer instructions, wherein, when the computer instructions are executed by a processor, the method for predicting user power usage data described in any one of the above claims is implemented.
[0023] To achieve the above objectives, according to one aspect of this application, an electronic device is provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the user power usage data prediction method described in any of the above claims.
[0024] This application employs the following steps: collecting target power data from a target user, wherein the target power data is power usage data generated by the target user in the past after responding to power regulation requests and adjusting power usage; inputting the target power data into a target prediction model to calculate the target probability distribution of the power usage data of the target user after responding to power regulation requests, wherein the target prediction model is a model obtained by training a preset prediction model, and the model parameters of the preset prediction model are constructed based on the target power data; and predicting the power usage data of the target user based on the target probability distribution. This solves the problem in related technologies where, due to high sample acquisition costs and limited training sample capacity, prediction accuracy is low when using neural network models to predict a user's ability to adjust power usage in response to power dispatch requests. By collecting target energy data of target users in historical demand response events, personalized predictions of target user response behavior can be achieved, more accurately reflecting the energy usage data of target users in response to power dispatch requests. Simultaneously, by training a pre-set prediction model using the target energy data, the target probability distribution of energy usage data is calculated using the trained model. This allows the model to better fit the patterns of user energy usage changes, more accurately reflecting the user's demand response potential. It also quantifies the uncertainty of energy usage changes when users respond to power regulation requests, improving prediction reliability. This enables power companies to more effectively dispatch power resources, smooth supply and demand fluctuations, and ultimately improve the operational efficiency and stability of the power system. Attached Figure Description
[0025] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0026] Figure 1 This is a flowchart of a method for predicting user electricity usage data according to Embodiment 1 of this application;
[0027] Figure 2 This is a schematic diagram of the process of predicting the power usage data of target users in response to power dispatching needs, according to Embodiment 1 of this application.
[0028] Figure 3 This is a schematic diagram of a device for predicting user electricity usage data according to Embodiment 2 of this application;
[0029] Figure 4 This is a schematic diagram of a predictive electronic device for user power usage data provided in Embodiment 5 of this application. Detailed Implementation
[0030] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0031] It should be noted that the user information (including but not limited to user device information, user personal information, collected data, used data, generated data, processed data, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, collected information, used information, generated information, processed information, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, and necessary confidentiality measures have been taken. These measures do not violate public order and good morals, and corresponding operation entry points are provided for users to choose to authorize or refuse. For example, this system has interfaces with relevant users or organizations. Before obtaining relevant information, a request to obtain the information needs to be sent to the aforementioned user or organization through the interface, and the relevant information is obtained only after receiving consent from the aforementioned user or organization.
[0032] It should be noted that this application provides users with a corresponding entry point for choosing to agree to or reject the automated decision-making results; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0033] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0034] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0035] Example 1
[0036] The present invention will now be described in conjunction with preferred implementation steps. Figure 1 This is a flowchart of a method for predicting user electricity usage data according to Embodiment 1 of this application, as shown below. Figure 1 As shown, the method includes the following steps:
[0037] Step S101: Collect target power data of the target user, wherein the target power data is the power usage data generated by the target user in response to power regulation requests and after making power adjustments in the past.
[0038] Currently, when the power system faces an imbalance between supply and demand, power companies initiate demand response plans (i.e., the aforementioned power regulation requests) to users, inviting them to respond. Users who respond to the demand response plan will adjust their electricity usage according to the power company's instructions, such as reducing electricity consumption, reducing the use of high-power appliances, or utilizing renewable energy sources.
[0039] In this first embodiment, it is necessary to collect data on the target users' past adjustments to their electricity usage based on power company regulation requests. Power companies or other data collection agencies record the users' actual electricity usage, and this data constitutes the target electricity data. Here, target electricity data refers to the specific numerical records of changes in electricity usage when users respond to power regulation requests (e.g., reducing electricity consumption during peak hours or increasing electricity consumption during off-peak hours). Target users refer to those users who have responded to power company regulation requests and whose electricity usage data is to be predicted in response to such requests.
[0040] For example, suppose a power company issues a power adjustment request to a user, asking the user to reduce electricity consumption between 2 PM and 4 PM, and offering a reward of 20 yuan to users who respond to the request. The user responds to this power adjustment request by turning up the air conditioner temperature and turning off some unnecessary lights and appliances. In this case, the actual reduction in electricity consumption by the user between 2 PM and 4 PM (which could be relative to the baseline electricity consumption before responding to the power adjustment request or the average electricity consumption over a specific time period) is the collected target electricity data.
[0041] By collecting target power data, it is possible to reflect the actual degree of user response to power regulation requests, including changes in power usage under different incentive conditions, time periods, and external environmental factors. This allows the model to learn patterns in user response behavior and predict user power usage in future power demand response events, thereby helping power companies to more accurately estimate demand response potential and optimize power dispatch and resource allocation.
[0042] Step S102: Input the target power data into the target prediction model and calculate the target probability distribution of power usage data after the target user responds to the power regulation request. The target prediction model is a model obtained by training a preset prediction model. The model parameters of the preset prediction model are constructed based on the target power data.
[0043] In this first embodiment, the target prediction model is a model used to predict the probability distribution of changes in user electricity usage, obtained by training a preset prediction model based on target electricity data and other covariates related to the target user's response behavior. The preset prediction model can be a sequence model such as a recurrent neural network (RNN), a long short-term memory network (LSTM), or a gated recurrent unit (GRU), or it can be combined with other machine learning algorithms. The goal of training is to adjust the model parameters so that the model can accurately fit the probability distribution of changes in the target user's electricity usage after responding to a power regulation request.
[0044] The target probability distribution output by the target prediction model provides multiple possible values for the change in electricity use and their corresponding probabilities. For example, if the target prediction model predicts that the change in electricity use follows a normal distribution, then this distribution will include the mean (representing the most likely change in electricity use) and the variance (representing the uncertainty of the change). This provides not only a single predicted value for electricity use, but also the range of variation and the level of uncertainty.
[0045] By integrating target electricity usage data and user response behavior into a predictive model, the model is trained to learn user demand response patterns and is used to predict the distribution of electricity usage changes under future power regulation requests, providing data support and decision-making basis for power demand management.
[0046] Step S103: Predict the target user's electricity usage data based on the target probability distribution.
[0047] In this first embodiment, predictions of electricity usage data can be generated based on a target probability distribution. Specifically, predicted electricity usage values can be obtained from the target probability distribution through sampling (such as Monte Carlo sampling), or directly by calculating the expected value (i.e., mean) of the probability distribution. Furthermore, different confidence levels can be set, and confidence intervals for changes in electricity usage at those confidence levels can be calculated. This helps power companies understand the possible range of user electricity usage at a specific confidence level.
[0048] In power system dispatching, predicting the electricity usage data of target users (especially changes in their electricity usage after responding to power regulation requests) plays a crucial role in optimizing the balance between power supply and demand, improving system stability, and promoting the consumption of renewable energy. Through predictions based on target probability distributions, power companies can more accurately estimate the potential for demand response, rationally allocate power resources, reduce the operational risks of the power system, and improve the efficiency and flexibility of dispatching.
[0049] In summary, the user electricity usage data prediction method provided in Embodiment 1 of this application collects target electricity data of target users, wherein the target electricity data is the electricity usage data generated by the target users in response to power regulation requests and making power adjustments in the past; the target electricity data is input into a target prediction model to calculate the target probability distribution of the electricity usage data of the target users after responding to power regulation requests, wherein the target prediction model is a model obtained by training a preset prediction model, and the model parameters of the preset prediction model are constructed based on the target electricity data; the method predicts the target user's electricity usage data based on the target probability distribution, which solves the problem of low prediction accuracy in related technologies when predicting the user's ability to adjust electricity when responding to power dispatch requests using neural network models, due to high sample acquisition costs and limited training sample capacity. By collecting target energy data of target users in historical demand response events, personalized predictions of target user response behavior can be achieved, more accurately reflecting the energy usage data of target users in response to power dispatch requests. Simultaneously, by training a pre-defined prediction model using the target energy data, the target probability distribution of energy usage data is calculated using the trained model. This allows the model to better fit the patterns of user energy usage changes, more accurately reflecting the user's demand response potential. It also quantifies the uncertainty of energy usage changes when users respond to power regulation requests, improving prediction reliability. Ultimately, this enables power companies to dispatch power resources more effectively, thereby improving the operational efficiency and stability of the power system.
[0050] Optionally, in the user electricity usage data prediction method provided in Embodiment 1 of this application, the above-mentioned target prediction model is trained by the following steps: constructing a sample dataset based on the historical electricity data and historical behavior data of historical users; constructing an autoregressive model and a mapping model based on the sample dataset, wherein the autoregressive model represents the mapping relationship between the historical behavior data and the current behavior data of historical users, and the mapping model represents the mapping relationship between historical electricity data and historical behavior data; inputting the output of the autoregressive model and the output of the mapping model into a preset prediction model to obtain the conditional probability distribution of the electricity usage data of historical users after responding to power dispatch requests, wherein the conditional probability distribution includes probability distribution parameters; constructing a loss function for the probability distribution parameters, and using the loss function to optimize the model parameters of the preset prediction model to obtain the target prediction model.
[0051] In one optional embodiment, to train the target prediction model, it is first necessary to collect and organize historical electricity consumption data and historical behavior data of historical users. Historical electricity consumption data refers to the electricity usage records of multiple users over a past period, while historical behavior data includes the response of multiple users to power dispatch requests, such as demand response periods, incentive prices, outdoor temperature, user preferences, and other covariate information that influence users' electricity usage decisions. This historical electricity consumption data and historical behavior data are integrated into a sample dataset, which serves as the input for subsequent training of the target prediction model.
[0052] Then, based on the sample dataset, two models were constructed to capture different relationships in the historical data. The autoregressive model aims to learn the mapping relationship between users' historical behavior data and current behavior data, that is, to predict their current or future response behavior based on their past response behavior. The mapping model, on the other hand, aims to establish the connection between historical electricity data and historical behavior data, and to predict specific behavioral changes in users' response to power dispatch demands through users' past historical electricity data, such as increases or decreases in users' electricity consumption.
[0053] Secondly, the outputs of the autoregressive model and the mapping model are input into a pre-defined prediction model. A preferred prediction model is a recurrent neural network (RNN), but it can also be a long short-term memory network (LSTM) or other suitable models. The purpose of this model fusion is to obtain a conditional probability distribution, which is the probability distribution of a user's electricity usage data after responding to a power dispatch request, given the user's historical electricity and behavioral data. The conditional probability distribution contains multiple possible values for predicting changes in electricity usage data and their corresponding probabilities. This distribution is described by model parameters such as mean and variance.
[0054] Finally, to enable the pre-defined prediction model to more accurately fit the changes in electricity usage data after users respond to power dispatch requests, a loss function needs to be constructed. The loss function measures the difference between the probability distribution parameters predicted by the model and the actual electricity usage data; minimizing this difference optimizes the model parameters. During model training, gradient descent or other optimization algorithms are typically used to update the model parameters to minimize the loss function value, thereby obtaining the target prediction model described above.
[0055] By integrating users' historical electricity and behavioral data, and employing a fusion of autoregressive and mapping models, the target prediction model can learn the complex patterns of user demand response behavior. It accurately predicts the changes in electricity usage that users may make under future power dispatch requests, including descriptions of the uncertainties in these changes. This not only improves the accuracy of predictions but also takes into account the uncertainties of predictions, providing power companies with a comprehensive and reliable tool for predicting demand response capabilities. This helps optimize power dispatch strategies and improve the operational efficiency and stability of the power system.
[0056] Optionally, in the user electricity usage data prediction method provided in Embodiment 1 of this application, a sample dataset is constructed based on the historical electricity data and historical behavior data of historical users, including: acquiring historical electricity data and historical behavior data, wherein the historical behavior data is the behavior data of historical users responding to power dispatch requests within a preset time period, and the historical electricity data is the electricity usage data generated after historical users respond to power adjustment requests and make power adjustments; dividing the historical electricity data into a first data set and a second data set according to a preset time, wherein the first data set represents known data, and the second data set represents data to be predicted; and constructing a sample dataset based on the historical behavior data, the first data set, and the second data set.
[0057] In one optional embodiment, firstly, historical users' electricity usage data over a preset time period (e.g., 1 year, 3 years, 5 years) is extracted. This data records the actual electricity consumption of historical users at different points in time. Simultaneously, behavioral data on historical users' responses to power dispatch requests during this period is collected, including but not limited to: demand response time periods, incentive prices, external environmental conditions (such as weather), and user preferences. This behavioral data reflects users' response behavior under different conditions and is crucial information for the predictive model to understand user demand response patterns.
[0058] For example, for a user A who has performed a demand response N times, obtain a sample D of their demand response adjustment capability for each time. n n = 1, ..., N, forming a regulation capacity sample set, i.e., the historical electrical energy data mentioned above, denoted as Among them, Dn This represents the power consumption data of a user responding to the nth power dispatch request. It also obtains covariate data X related to the user's response behavior each time they execute a request response. n This forms a covariate dataset, namely the historical behavioral data mentioned above, denoted as... X n ∈R M Among them, X n The covariates related to the user's nth response to power dispatch demand include demand response time period, incentive price, outdoor temperature, user preferences obtained from the questionnaire, etc., and M is the dimension of the covariates.
[0059] Then, the acquired historical electricity data is divided into a first data set and a second data set according to the characteristics of the time series. For example, for a user A who has performed N demand responses, the first data set contains the electricity usage data of user A from the 1st to the (n-1th)th power dispatch response, denoted as... n0 is an integer greater than 1 and less than N. The first dataset is considered as known data and is used to build the model and train the model parameters. The second dataset contains the electricity usage data of user A from the n0th to the Nth time in response to power dispatch, denoted as . The second dataset is used for model validation and testing to evaluate the model's ability to predict future data, i.e., the data to be predicted.
[0060] Finally, a sample dataset is constructed based on historical behavioral data, the first dataset, and the second dataset. The construction of the sample dataset is crucial for model training; it associates historical behavioral data with corresponding electricity usage data to form training samples. For example, for each historical demand response event, the sample dataset may include the event's time, incentive price, external environmental conditions, user preferences (historical behavioral data), and the change in electricity usage after the user's response to the event (historical electricity data). These sample datasets will be used for subsequent model training, helping the model learn the mapping relationship between user demand response behavior and changes in electricity usage.
[0061] Through the steps described above, the constructed sample dataset comprehensively reflects the historical electricity usage behavior and its changing patterns under power regulation requests. This time-series data-based segmentation method helps improve the generalization ability and prediction accuracy of the prediction model. The constructed sample dataset provides ample information for model training, enabling the model to learn users' electricity consumption patterns and demand response behaviors based on historical data. This allows the model to accurately predict changes in user electricity usage when faced with new power regulation requests, supporting optimized power system scheduling and resource management.
[0062] Optionally, in the user electricity usage data prediction method provided in Embodiment 1 of this application, constructing an autoregressive model and a mapping model based on the sample dataset includes: constructing an autoregressive model based on the mapping relationship between a first data set and a second data set; and constructing a mapping model based on the mapping relationship between historical behavior data and a second data set.
[0063] Autoregressive models are a statistical forecasting method that uses historical electricity usage data (the first dataset) to predict future electricity usage data (the second dataset). Autoregressive models construct their predictive models by analyzing the dynamic relationship between the first and second datasets—that is, the autocorrelation characteristics of electricity usage data over time. Autoregressive models attempt to capture and learn the inherent patterns in the evolution of electricity usage data over time, thereby enabling the prediction of future electricity usage given historical data. This method is particularly suitable for processing data with time-series properties, such as electricity load data.
[0064] The mapping model establishes the relationship between historical behavioral data and a second dataset (i.e., the electricity usage data to be predicted). Historical behavioral data contains various information about users' responses to electricity regulation requests, such as incentive prices, demand response periods, external environmental conditions, and user preferences. The purpose of the mapping model is to learn the mapping relationship between this behavioral data and changes in user electricity usage—that is, how to predict future electricity usage based on current incentive conditions and user behavior. This model can transform covariate information into predictions of electricity usage data, thus taking into account the diversity of user behavior and the influence of the external environment in the prediction process.
[0065] For example, when predicting the demand response adjustment capability of an individual user for the n0th time, the known historical demand response adjustment capabilities (i.e., the first data set) are utilized. ) and the adjustment capability of the nth demand response An autoregressive model is constructed using the covariates corresponding to the demand response adjustment capacity at the n0th time. With the n0th demand response adjustment capability A mapping model is constructed between the two models, and the two models are fused to obtain the conditional probability distribution of the demand response adjustment capability for the n0th time, denoted as . At this point, for all the demand response potential to be predicted The relationship shown in Formula 1 exists.
[0066]
[0067] in, This represents the conditional probability of a user's electricity usage data in the nth response to a power dispatch request, based on known data (i.e., the first data set) and historical behavior data, where n ∈ (n0, N). This represents the conditional probability distribution of power usage data for the user's n0th response to a power dispatch request.
[0068] By combining autoregressive and mapping models, the autoregressive model learns the time-series characteristics of electricity usage data, while the mapping model considers the impact of user behavior and external conditions on electricity usage. This fusion approach allows the predictive model to capture both historical patterns of user electricity usage and incorporate real-time changes in user behavior and environmental conditions, thereby improving the comprehensiveness and accuracy of predictions. The constructed autoregressive and mapping models analyze user electricity usage data from the perspectives of time-series characteristics and covariate relationships, respectively. Finally, by fusing the outputs of these two models, a probabilistic prediction of user electricity usage data after receiving a power dispatch request is obtained, providing power dispatching departments with more accurate and comprehensive demand response potential prediction information. These prediction results can be used to guide the optimization of power system operation, including load management, resource allocation, and the formulation of power supply and demand balance strategies, thereby improving the operating efficiency of the power system and its ability to cope with complex market conditions.
[0069] Optionally, in the user electricity usage data prediction method provided in Embodiment 1 of this application, the aforementioned preset prediction model includes at least: a recurrent neural network and multiple feedforward neural networks. The output of the autoregressive model and the output of the mapping model are input into the preset prediction model to obtain the conditional probability distribution of the electricity usage data after the historical user responds to the power dispatch request. This includes: constructing a second hidden layer state based on the recurrent structure in the recurrent neural network, according to the first hidden layer state, the first data set, and historical behavior data, wherein there is a temporal order between the second hidden layer state and the first hidden layer state; mapping the second hidden layer state in the recurrent neural network to probability distribution parameters through multiple feedforward neural networks; and determining the conditional probability distribution based on the probability distribution parameters.
[0070] In the prior art, recurrent neural networks (RNNs) are a type of neural network capable of processing sequential data. They are very effective when processing time-series data because they can remember information from previous inputs and combine that information with the current input. This is especially important for predicting electricity usage, as electricity usage typically exhibits time-series characteristics.
[0071] In this first embodiment, the recurrent structure of the RNN is used to construct hidden layer states containing time-series information, thereby reflecting the dynamic changes in historical user electricity usage habits and demand response behavior. Through the recurrent units in the RNN, the first hidden layer state (i.e., the hidden state at the previous moment, or the electricity usage data of the n0-1th user demand response), the first data set (i.e., known data in historical electricity data), and historical behavior data (including demand response time periods, incentive prices, outdoor temperature, user preferences, etc.) are used as inputs to construct the second hidden layer state (i.e., the hidden state at the current moment, or the electricity usage data of the n0th user demand response). There is a temporal order between the first and second hidden layer states; the latter depends on the former, reflecting the changes and impacts of user electricity usage behavior over time.
[0072] For example, the conditional part of the above conditional probability can be expressed using the recurrent structure of a recurrent neural network. The hidden state is transformed into the hidden state of the RNN, as shown in Equations 2 and 3.
[0073]
[0074] Among them, h n This represents the current hidden state of the RNN network, which depends on the energy usage data D from the (n-1)th user demand response. n-1 The covariate X corresponding to the demand response adjustment capability in the nth time. n And the previous hidden state h n-1 . The network function representing the RNN recurrent structure (or unit), θ RNN This represents the model parameters of the RNN unit.
[0075] Then, after establishing the hidden state of the recurrent neural network, multiple feedforward neural networks are used to map these states to probability distribution parameters, such as the mean and variance of a normal distribution. The feedforward neural networks can directly map input data to output, extracting statistical features describing changes in electricity usage—that is, parameters of the probability distribution—from the hidden state of the recurrent neural network.
[0076] For example, two feedforward neural networks are constructed, and the above hidden layer states h are... n The probability distribution parameter μ mapped to the nth demand response adjustment capability n and σ n As shown in Formulas 4 and 5,
[0077]
[0078] in, and Let θ represent the network functions of the two feedforward neural networks respectively. FC1 and θ FC2 This represents the parameters of two feedforward neural networks.
[0079] Finally, the obtained probability distribution parameters are used to determine the conditional probability distribution of historical users' energy usage data after power dispatch requests. The conditional probability distribution refers to the possible values of energy usage data and their probabilities given certain conditions (e.g., users' historical behavior data and historical energy data). This distribution incorporates the uncertainty of changes in user energy usage into the prediction model, ensuring that the prediction results not only include the most likely change in energy usage but also provide the possible range and probability of this change, thus allowing for the provision of confidence intervals.
[0080] By integrating the memory capabilities of recurrent neural networks and the mapping capabilities of multiple feedforward neural networks, a pre-defined prediction model can capture the time-series characteristics and conditional probability distribution information of user electricity consumption behavior, achieving accurate predictions of user demand response potential, including its uncertainty description. This method not only improves the accuracy and reliability of predictions but also provides power dispatching departments with confidence interval predictions of changes in user electricity consumption, helping them make better dispatching decisions to cope with fluctuations and uncertainties in power supply and demand, and optimize the operational efficiency and stability of the power system.
[0081] Optionally, in the user electricity usage data prediction method provided in Embodiment 1 of this application, a loss function of probability distribution parameters is constructed, and the model parameters of the preset prediction model are optimized using the loss function to obtain the target prediction model. This includes: constructing a loss function based on probability distribution parameters and a negative log-likelihood loss function; calculating the loss function value based on historical behavior data and the loss function; iteratively optimizing the model parameters of the preset prediction model based on a gradient optimization algorithm and the loss function value until the loss function value is within a preset numerical range, thereby obtaining the target prediction model.
[0082] In this first embodiment, the negative log-likelihood (NLL) loss function is used to construct the loss function. The NLL loss function is suitable for probability distribution prediction; its core function is to evaluate the degree of matching between the probability distribution generated by the model and the actual observed data. By comparing the probability distribution parameters predicted by the model with the actual electricity usage data in historical data, the loss function can quantify the deviation between the prediction uncertainty and the actual result. For example, the loss function can be as shown in Equation 6.
[0083]
[0084] Where L represents the loss function, θ RNN θ represents the model parameters of an RNN unit.FC1 and θ FC2 D represents the parameters of two feedforward neural networks. n Represents historical electricity data, μ n ,σ n This represents the probability distribution parameters.
[0085] After constructing the loss function, its value needs to be calculated based on historical behavioral and electricity usage data. This involves substituting historical user electricity usage data into the probability distribution predicted by the model, calculating the log-likelihood of the actual data under the predicted probability distribution, and then taking its negative value. This negative value represents the degree of mismatch between the model's prediction and the actual data. The magnitude of the loss function reflects the accuracy of the model's prediction; a smaller value indicates a higher degree of match between the model's prediction and the actual data.
[0086] Secondly, gradient optimization algorithms (e.g., gradient descent, stochastic gradient descent) are used to iteratively update the model parameters of the preset prediction model based on the calculated loss function value. The goal of gradient optimization algorithms is to find model parameters that minimize the loss function value. This process typically involves calculating the gradient of the loss function with respect to the model parameters, and then adjusting the parameters in the opposite direction of the gradient to gradually reduce the value of the loss function until it converges to a local minimum or reaches a preset numerical range. The parameter optimization process is the core of model training. Through this process, the model can learn the optimal parameter settings extracted from historical data, enabling the model to more accurately predict users' electricity usage under specific conditions.
[0087] Finally, when the model parameters reach the preset convergence criterion, i.e., the loss function value stabilizes within a preset numerical range, the training process ends, and the resulting target prediction model is the optimal model trained on historical data and optimized for parameters. The model parameters of the optimal model can be expressed as follows: in, This represents the optimal parameters for an RNN network. Let represent the optimal parameters of the two feedforward neural networks, and L represent the loss function value. This model can predict the probability distribution of a user's future response energy usage data after receiving a power dispatch request, based on the user's historical energy usage and behavioral data, including the confidence interval of the prediction results, providing crucial information for power dispatch and demand-side management.
[0088] By constructing and optimizing the loss function, the model parameters were effectively adjusted, thereby improving the prediction accuracy of the forecast model regarding user demand response capabilities. This not only helps reduce uncertainty and risk in the electricity market but also provides power dispatching departments with more accurate forecasts of user electricity usage, supporting more efficient and robust power resource allocation and dispatching decisions.
[0089] Optionally, in the method for predicting user electricity usage data provided in Embodiment 1 of this application, predicting the target user's electricity usage data based on the target probability distribution includes: determining the probability distribution parameters corresponding to the target user based on the target probability distribution; determining the confidence level and significance level of the target user's response to the power dispatch request; and calculating the target user's electricity usage data based on the probability distribution parameters, confidence level, and significance level corresponding to the target user.
[0090] In this first embodiment, a pre-trained target prediction model is used. The target user's target electricity data is input into the target prediction model, and the target prediction model outputs probability distribution parameters of the target user's electricity usage data, such as the mean and variance of a normal distribution. These parameters describe the possible distribution of the user's future electricity usage, rather than just a single predicted value, which provides a mathematical description of the uncertainty of the prediction results.
[0091] Next, determine the confidence level and significance level. The confidence level is the probability that the predicted result will cover the true value, usually expressed as a percentage. For example, a 95% confidence level means that the predicted confidence interval has a 95% probability of containing the true value. The significance level is the complement of the confidence level and is the reciprocal of the confidence level. For example, if the confidence level is 95%, then the significance level is 5%. Determining the confidence level and significance level is to provide a probability confidence interval for prediction, reflecting the uncertainty of the prediction. For example, setting the significance level α, where α ≤ 1, corresponds to a confidence level of (1-α)%.
[0092] Secondly, based on the probability distribution parameters, confidence level, and significance level of the target user's target electricity consumption data, the confidence interval for the target user's electricity usage data in response to power dispatch demands is calculated. For example, a standard normal distribution table (or Z-score table) is used to find the Z-score value corresponding to the confidence level, and then, combined with the parameters of the probability distribution (such as mean and standard deviation), the upper and lower limits of the confidence interval are calculated. The confidence interval provides the possible range of the user's electricity consumption and the probability that this range covers the true value.
[0093] For example, when predicting electricity usage data after a target user responds to a power dispatch request, a confidence interval can tell the dispatching department that the user's electricity consumption may fluctuate within a certain range. The range and probability of this fluctuation are determined by both the model's predictive power and the uncertainty of the data. This allows the dispatching department to more comprehensively consider the complexity and uncertainty of user behavior when planning grid load, allocating generation resources, and formulating demand response strategies, thereby avoiding the potential risks of over-reliance on a single forecast. This approach improves the stability and efficiency of power system operation and helps to better cope with the volatility of renewable energy and the uncertainty of electricity demand.
[0094] For example, in the z-score table, the corresponding lookup... The corresponding z-score is denoted as At this point, the prediction interval for individual users' energy usage data in response to power dispatch requests at a confidence level of (1-α)% is...
[0095] The above steps not only provide an estimate of the electricity consumption of the target user after responding to the power dispatch request, but more importantly, they also provide a description of the uncertainty of this estimate, namely, the confidence interval. The prediction of the confidence interval not only increases the practicality of the forecast but also provides decision support for power dispatching departments, helping them to consider the uncertainty of the forecast results when making dispatching decisions, thereby formulating more flexible and adaptive dispatching strategies.
[0096] Optionally, in the method for predicting user electricity usage data provided in Embodiment 1 of this application, the aforementioned historical behavior data includes at least one of the following: demand response period, incentive price, outdoor temperature, and user preference information.
[0097] In this first embodiment, historical behavioral data refers to a series of related behavioral data performed by users in response to power dispatch demands. This historical behavioral data is crucial for understanding how users respond to power dispatch requests and predicting their future electricity usage patterns. Specifically, historical behavioral data includes, but is not limited to, data such as demand response time periods, incentive prices, outdoor temperatures, and user preference information.
[0098] Demand response time refers to the specific time during which a user responded to power dispatch demands in the past, such as a day of a week, a certain time of day, a season, or a special event (e.g., a holiday). Demand response time is crucial for forecasting because user electricity usage patterns and response behaviors are often time-related; different time periods may trigger different electricity demands or responses to stimuli.
[0099] Incentive prices refer to the price signals or economic incentives offered by power companies to encourage users to change their electricity usage behavior during demand response activities. The level of incentive prices directly affects whether and how users participate in demand response activities, and is a key covariate in predictive models.
[0100] Outdoor temperature refers to the outdoor temperature at which users have historically responded to power dispatch demands. Weather conditions, especially outdoor temperature, have a significant impact on users' electricity demand. For example, high or low temperatures may increase the use of air conditioning or heating equipment, thus affecting electricity consumption. Therefore, outdoor temperature is one of the external environmental conditions that takes into account users' electricity usage behavior.
[0101] User preference information includes, but is not limited to: user preferences for electricity usage habits, sensitivity to electricity prices, and willingness to participate in demand response activities. User preference information reflects the characteristics and behavioral tendencies of individual users and is an indispensable factor in predicting their demand response capabilities.
[0102] Combining this historical behavioral data with historical electricity usage data allows for the construction of more comprehensive and detailed user behavior models. By analyzing users' past demand response behavior, the pre-set model can learn the changing patterns of users' electricity usage under specific conditions (such as specific time periods and specific incentive prices), thereby predicting users' future response behavior and possible electricity usage when receiving power dispatch requests. This historical data-based analysis method helps improve the accuracy and practicality of predictions, providing solid data support for power dispatch and demand-side management.
[0103] Optionally, in this first embodiment, a schematic diagram illustrates the process of predicting the electricity usage data of a target user in response to power dispatching demands. For example... Figure 2As shown, historical electricity data from users' past participation in demand response activities is collected. This data includes electricity usage records under different conditions (such as different incentive prices, weather conditions, time periods, etc.). The historical electricity data is divided into electricity usage data from the 1st to the n0-1th user response to power dispatch requests and electricity usage data from the n0th to the Nth response to power dispatch requests. Based on the historical electricity data and historical behavioral data, an autoregressive model and a mapping model are constructed, respectively. The autoregressive model is mainly used to capture the time-series characteristics of electricity usage data, while the mapping model is used to study the relationship between behavioral data (such as incentive prices, outdoor temperature, etc.) and electricity usage data. The introduction of a recurrent neural network (RNN) achieves the fusion of the autoregressive and mapping models, enabling the model to simultaneously consider the time-series dependence of electricity usage and the influence of behavioral data, improving the comprehensiveness and accuracy of predictions. Two feedforward neural networks are constructed to transform the hidden state of the RNN into probability distribution parameters of electricity usage data, namely the mean and variance. The feedforward neural network maps the hidden state to probability distribution parameters through multiple layers of nonlinear transformation, providing a mathematical basis for subsequent probabilistic predictions. The loss function of a pre-defined model (i.e., a recurrent neural network and two feedforward neural networks) is constructed based on the negative log-likelihood loss function. The parameters of this model are iteratively updated using optimization algorithms such as gradient descent to determine the optimal parameter settings, maximizing the match between the predicted results and actual historical data. This yields a target prediction model capable of probabilistic prediction. Once the target prediction model is trained, the electricity usage data of the target user to be predicted can be input. The trained model then predicts the probability distribution parameters of the target user's electricity usage data, i.e., the possible mean and variance of electricity usage under current conditions. Finally, with the probability distribution parameters, statistical methods (such as confidence interval calculation) can be used to determine the probability range of the target user's electricity usage data when receiving the current power dispatch request. This step provides the power dispatching department with a confidence level prediction of electricity usage, helping them to more accurately assess users' responsiveness and make reasonable dispatching decisions.
[0104] entire Figure 2 The process clearly illustrates the entire process from data collection to model building, training, and finally confidence interval prediction, demonstrating the systematic and scientific nature of the prediction method. This method can help power dispatching departments improve the stability and efficiency of power grid operation by making more accurate probabilistic predictions when facing complex and ever-changing power market conditions.
[0105] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0106] Example 2
[0107] This application's second embodiment also provides a device for predicting user electricity usage data. It should be noted that the user electricity usage data prediction device of this application's second embodiment can be used to execute the user electricity usage data prediction method provided in this application's first embodiment. The user electricity usage data prediction device provided in this application's second embodiment is described below.
[0108] Figure 3 This is a schematic diagram of a device for predicting user electricity usage data according to Embodiment 2 of this application. Figure 3 As shown, the device includes: a data acquisition unit 301, a first calculation unit 302, and a prediction unit 303.
[0109] Specifically, the acquisition unit 301 is used to acquire the target power data of the target user, wherein the target power data is the power usage data generated by the target user in response to power regulation requests and after making power adjustments in the past.
[0110] The first calculation unit 302 is used to input the target power data into the target prediction model and calculate the target probability distribution of power usage data after the target user responds to the power regulation request. The target prediction model is a model obtained by training a preset prediction model, and the model parameters of the preset prediction model are constructed based on the target power data.
[0111] Prediction unit 303 is used to predict the electricity usage data of the target user based on the target probability distribution.
[0112] The user power usage data prediction device provided in Embodiment 2 of this application collects target power data of the target user through the acquisition unit 301. The target power data is the power usage data generated by the target user in the past after responding to power regulation requests and adjusting the power. The first calculation unit 302 inputs the target power data into the target prediction model and calculates the target probability distribution of the power usage data of the target user after responding to the power regulation request. The target prediction model is a model obtained by training a preset prediction model, and the model parameters of the preset prediction model are constructed based on the target power data. The prediction unit 303 predicts the power usage data of the target user based on the target probability distribution. This solves the problem of low prediction accuracy in the process of predicting the user's ability to adjust power when responding to power dispatch requests using a neural network model in related technologies, due to the high cost of sample acquisition and the limited training sample capacity. By collecting target energy data of target users in historical demand response events, personalized predictions of target user response behavior can be achieved, more accurately reflecting the energy usage data of target users in response to power dispatch requests. Simultaneously, by training a pre-set prediction model using the target energy data, the target probability distribution of energy usage data is calculated using the trained model. This allows the model to better fit the patterns of user energy usage changes, more accurately reflecting the user's demand response potential. It also quantifies the uncertainty of energy usage changes when users respond to power regulation requests, improving prediction reliability. This enables power companies to more effectively dispatch power resources, smooth supply and demand fluctuations, and ultimately improve the operational efficiency and stability of the power system.
[0113] Optionally, in the user electricity usage data prediction device provided in Embodiment 2 of this application, the device further includes: a first construction unit, used to construct a sample dataset based on historical electricity data and historical behavior data of historical users; a second construction unit, used to construct an autoregressive model and a mapping model based on the sample dataset, wherein the autoregressive model represents the mapping relationship between historical behavior data and current behavior data of historical users, and the mapping model represents the mapping relationship between historical electricity data and historical behavior data; a second calculation unit, used to input the output of the autoregressive model and the output of the mapping model into a preset prediction model to obtain the conditional probability distribution of electricity usage data after historical users respond to power dispatch requests, wherein the conditional probability distribution includes probability distribution parameters; and a third construction unit, used to construct a loss function for the probability distribution parameters and use the loss function to optimize the model parameters of the preset prediction model to obtain a target prediction model.
[0114] Optionally, in the user electricity usage data prediction device provided in Embodiment 2 of this application, the first construction unit includes: an acquisition subunit, used to acquire historical electricity data and historical behavior data, wherein the historical behavior data is historical user behavior data in response to power dispatch requests within a preset time period, and the historical electricity data is electricity usage data generated after historical users respond to power adjustment requests and make power adjustments; a division subunit, used to divide the historical electricity data into a first data set and a second data set according to a preset time, wherein the first data set represents known data, and the second data set represents data to be predicted; and a first construction subunit, used to construct a sample dataset based on the historical behavior data, the first data set, and the second data set.
[0115] Optionally, in the user electricity usage data prediction device provided in Embodiment 2 of this application, the aforementioned preset prediction model includes at least: a recurrent neural network and multiple feedforward neural networks. The second calculation unit includes: a second construction subunit, used to construct a second hidden layer state based on the recurrent structure in the recurrent neural network, according to the first hidden layer state, the first data set, and historical behavior data, wherein there is a temporal order between the second hidden layer state and the first hidden layer state; a mapping subunit, used to map the second hidden layer state in the recurrent neural network to probability distribution parameters through multiple feedforward neural networks; and a first determination subunit, used to determine the conditional probability distribution based on the probability distribution parameters.
[0116] Optionally, in the user electricity usage data prediction device provided in Embodiment 2 of this application, the second construction unit mentioned above includes: a third construction subunit, used to construct an autoregressive model based on the mapping relationship between the first data set and the second data set; and a fourth construction subunit, used to construct a mapping model based on the mapping relationship between historical behavior data and the second data set.
[0117] Optionally, in the user electricity usage data prediction device provided in Embodiment 2 of this application, the aforementioned third construction unit includes: a fifth construction subunit, used to construct a loss function based on probability distribution parameters and a negative log-likelihood loss function; a first calculation subunit, used to calculate the loss function value based on historical behavior data and the loss function; and an optimization subunit, used to iteratively optimize the model parameters of the preset prediction model based on a gradient optimization algorithm and the loss function value until the loss function value is within a preset numerical range, thereby obtaining the target prediction model.
[0118] Optionally, in the user power usage data prediction device provided in Embodiment 2 of this application, the prediction unit 303 includes: a second determining subunit, used to determine the probability distribution parameters corresponding to the target user based on the target probability distribution; a third determining subunit, used to determine the confidence level and significance level of the target user's response to the power dispatch request; and a second calculation subunit, used to calculate the target user's power usage data based on the probability distribution parameters, confidence level, and significance level corresponding to the target user.
[0119] Optionally, in the user electricity usage data prediction device provided in Embodiment 2 of this application, the aforementioned historical behavior data includes at least one of the following: demand response period, incentive price, outdoor temperature, and user preference information.
[0120] The user power usage data prediction device includes a processor and a memory. The acquisition unit 301, the first calculation unit 302 and the prediction unit 303 mentioned above are all stored in the memory as program units. The processor executes the program units stored in the memory to realize the corresponding functions.
[0121] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can improve the accuracy of power companies' predictions of user energy usage data in response to power dispatch demands.
[0122] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0123] Embodiment 3 of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements a method for predicting user power usage data.
[0124] Embodiment 4 of the present invention provides a processor for running a program, wherein the program executes a method for predicting user power usage data during runtime.
[0125] like Figure 4As shown, Embodiment 5 of the present invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: collecting target power data of a target user, wherein the target power data is power usage data generated by the target user in response to power regulation requests and after making power adjustments; inputting the target power data into a target prediction model, calculating the target probability distribution of the power usage data of the target user after responding to power regulation requests, wherein the target prediction model is a model obtained by training a preset prediction model, and the model parameters of the preset prediction model are constructed based on the target power data; and predicting the power usage data of the target user based on the target probability distribution.
[0126] The processor also performs the following steps when executing the program: The target prediction model mentioned above is trained by the following steps: Constructing a sample dataset based on the historical electricity data and historical behavior data of historical users; Constructing an autoregressive model and a mapping model based on the sample dataset, wherein the autoregressive model represents the mapping relationship between the historical behavior data and the current behavior data of historical users, and the mapping model represents the mapping relationship between historical electricity data and historical behavior data; Inputting the output of the autoregressive model and the output of the mapping model into the preset prediction model to obtain the conditional probability distribution of the electricity usage data of historical users after responding to power dispatch requests, wherein the conditional probability distribution includes probability distribution parameters; Constructing a loss function for the probability distribution parameters, and using the loss function to optimize the model parameters of the preset prediction model to obtain the target prediction model.
[0127] When the processor executes the program, it also performs the following steps: constructing a sample dataset based on historical users' historical energy data and historical users' historical behavior data, including: acquiring historical energy data and historical behavior data, wherein historical behavior data is the behavior data of historical users responding to power dispatch requests within a preset time period, and historical energy data is the energy usage data generated after historical users respond to power adjustment requests and make power adjustments; dividing the historical energy data into a first data set and a second data set according to a preset time, wherein the first data set represents known data, and the second data set represents data to be predicted; and constructing a sample dataset based on historical behavior data, the first data set, and the second data set.
[0128] When the processor executes the program, it also performs the following steps: The aforementioned preset prediction model includes at least: a recurrent neural network and multiple feedforward neural networks. The output of the autoregressive model and the output of the mapping model are input into the preset prediction model to obtain the conditional probability distribution of power usage data after historical users respond to power dispatch requests. This includes: constructing a second hidden layer state based on the recurrent structure in the recurrent neural network, according to the first hidden layer state, the first data set, and historical behavior data, wherein there is a temporal order between the second hidden layer state and the first hidden layer state; mapping the second hidden layer state in the recurrent neural network to probability distribution parameters through multiple feedforward neural networks; and determining the conditional probability distribution based on the probability distribution parameters.
[0129] When the processor executes the program, it also performs the following steps: constructing an autoregressive model and a mapping model based on the sample dataset, including: constructing an autoregressive model based on the mapping relationship between the first data set and the second data set; and constructing a mapping model based on the mapping relationship between historical behavioral data and the second data set.
[0130] When the processor executes the program, it also performs the following steps: constructing a loss function based on probability distribution parameters, and using the loss function to optimize the model parameters of the preset prediction model to obtain the target prediction model, including: constructing a loss function based on probability distribution parameters and negative log-likelihood loss function; calculating the loss function value based on historical behavior data and the loss function; iteratively optimizing the model parameters of the preset prediction model based on gradient optimization algorithm and loss function value until the loss function value is within a preset numerical range to obtain the target prediction model.
[0131] When the processor executes the program, it also performs the following steps: predicting the target user's electricity usage data based on the target probability distribution, including: determining the probability distribution parameters corresponding to the target user based on the target probability distribution; determining the confidence level and significance level of the target user's response to the power dispatch request; and calculating the target user's electricity usage data based on the probability distribution parameters, confidence level, and significance level corresponding to the target user.
[0132] When the processor executes the program, it also performs the following steps: The historical behavior data mentioned above includes at least one of the following: demand response period, incentive price, outdoor temperature, and user preference information.
[0133] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0134] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: collecting target power data of a target user, wherein the target power data is power usage data generated by the target user in response to power regulation requests and after making power adjustments; inputting the target power data into a target prediction model, calculating the target probability distribution of the power usage data of the target user after responding to power regulation requests, wherein the target prediction model is a model obtained by training a preset prediction model, and the model parameters of the preset prediction model are constructed based on the target power data; and predicting the power usage data of the target user based on the target probability distribution.
[0135] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: The target prediction model described above is trained by the following steps: constructing a sample dataset based on historical electricity data and historical behavior data of historical users; constructing an autoregressive model and a mapping model based on the sample dataset, wherein the autoregressive model represents the mapping relationship between historical behavior data and current behavior data of historical users, and the mapping model represents the mapping relationship between historical electricity data and historical behavior data; inputting the output of the autoregressive model and the output of the mapping model into a preset prediction model to obtain the conditional probability distribution of electricity usage data after historical users respond to power dispatch requests, wherein the conditional probability distribution includes probability distribution parameters; constructing a loss function for the probability distribution parameters, and using the loss function to optimize the model parameters of the preset prediction model to obtain the target prediction model.
[0136] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: constructing a sample dataset based on historical user's historical energy data and historical user's historical behavior data, including: acquiring historical energy data and historical behavior data, wherein historical behavior data is the behavior data of historical users responding to power dispatch requests within a preset time period, and historical energy data is the energy usage data generated after historical users respond to power adjustment requests and make power adjustments; dividing the historical energy data into a first data set and a second data set according to a preset time, wherein the first data set represents known data, and the second data set represents data to be predicted; constructing a sample dataset based on historical behavior data, the first data set, and the second data set.
[0137] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: the aforementioned preset prediction model includes at least: a recurrent neural network and multiple feedforward neural networks. The output of the autoregressive model and the output of the mapping model are input into the preset prediction model to obtain the conditional probability distribution of power usage data after historical users respond to power dispatch requests. This includes: constructing a second hidden layer state based on the recurrent structure in the recurrent neural network, according to the first hidden layer state, the first data set, and historical behavior data, wherein there is a temporal order between the second hidden layer state and the first hidden layer state; mapping the second hidden layer state in the recurrent neural network to probability distribution parameters through multiple feedforward neural networks; and determining the conditional probability distribution based on the probability distribution parameters.
[0138] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: constructing an autoregressive model and a mapping model based on a sample dataset, including: constructing an autoregressive model based on the mapping relationship between a first dataset and a second dataset; and constructing a mapping model based on the mapping relationship between historical behavioral data and a second dataset.
[0139] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: constructing a loss function for probability distribution parameters, and using the loss function to optimize the model parameters of a preset prediction model to obtain a target prediction model, including: constructing a loss function based on probability distribution parameters and a negative log-likelihood loss function; calculating the loss function value based on historical behavioral data and the loss function; iteratively optimizing the model parameters of the preset prediction model based on a gradient optimization algorithm and the loss function value until the loss function value is within a preset numerical range, thereby obtaining the target prediction model.
[0140] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: predicting the electricity usage data of a target user based on a target probability distribution, including: determining the probability distribution parameters corresponding to the target user based on the target probability distribution; determining the confidence level and significance level of the target user's response to the power dispatch request; and calculating the electricity usage data of the target user based on the probability distribution parameters, confidence level, and significance level corresponding to the target user.
[0141] When executed on a data processing device, it is also suitable to execute an initialization procedure with the following method steps: the aforementioned historical behavioral data includes at least one of the following: demand response period, incentive price, outdoor temperature, and user preference information.
[0142] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0143] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0144] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0145] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0146] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0147] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0148] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0149] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0150] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0151] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for predicting user electricity usage data, characterized in that, include: Collect target power data of target users, wherein the target power data is the power usage data generated by the target users in response to power regulation requests and after making power adjustments in the past; The target electrical energy data is input into the target prediction model to calculate the target probability distribution of the electrical energy usage data after the target user responds to the power regulation request. The target prediction model is a model obtained by training a preset prediction model, and the model parameters of the preset prediction model are constructed based on the target electrical energy data. Predict the target user's electricity usage data based on the target probability distribution; The target prediction model is trained using the following steps: A sample dataset is constructed based on the historical electricity data and historical behavior data of historical users, wherein the historical behavior data includes at least one of the following: demand response period, incentive price, outdoor temperature, and user preference information; An autoregressive model and a mapping model are constructed based on the sample dataset. The autoregressive model represents the mapping relationship between the historical behavior data and the current behavior data of the historical users, and the mapping model represents the mapping relationship between the historical energy data and the historical behavior data. The output of the autoregressive model and the output of the mapping model are input into a preset prediction model to obtain the conditional probability distribution of the power usage data of the historical user after responding to the power dispatch request, wherein the conditional probability distribution includes probability distribution parameters; Construct a loss function for the probability distribution parameters, and use the loss function to optimize the model parameters of the preset prediction model to obtain the target prediction model; Predicting the target user's electricity usage data based on the target probability distribution includes: The probability distribution parameters corresponding to the target user are determined based on the target probability distribution; Determine the confidence level and significance level of the target user's response to the power dispatch request; The electricity usage data of the target user are calculated based on the probability distribution parameters corresponding to the target user, the confidence level, and the significance level.
2. The method according to claim 1, characterized in that, A sample dataset is constructed based on the historical electricity data and historical behavior data of historical users, including: Acquire historical energy data and historical behavior data, wherein the historical behavior data is the behavior data of the historical user responding to power dispatch requests within a preset time period, and the historical energy data is the energy usage data generated after the historical user responds to power adjustment requests and makes power adjustments; The historical electrical energy data is divided into a first data set and a second data set according to a preset time. The first data set represents known data, and the second data set represents data to be predicted. The sample dataset is constructed based on the historical behavior data, the first data set, and the second data set.
3. The method according to claim 2, characterized in that, The preset prediction model includes at least: a recurrent neural network and multiple feedforward neural networks. The output of the autoregressive model and the output of the mapping model are input into the preset prediction model to obtain the conditional probability distribution of the historical user's electricity usage data after responding to power dispatch requests, including: Based on the recurrent structure in the recurrent neural network, a second hidden layer state is constructed according to the first hidden layer state, the first data set, and the historical behavior data, wherein there is a temporal order between the second hidden layer state and the first hidden layer state; The second hidden layer state in the recurrent neural network is mapped to the probability distribution parameters through the multiple feedforward neural networks; The conditional probability distribution is determined based on the probability distribution parameters.
4. The method according to claim 2, characterized in that, Based on the aforementioned sample dataset, an autoregressive model and a mapping model are constructed, including: The autoregressive model is constructed based on the mapping relationship between the first data set and the second data set. The mapping model is constructed based on the mapping relationship between the historical behavior data and the second data set.
5. The method according to claim 1, characterized in that, Constructing a loss function for the probability distribution parameters and using the loss function to optimize the model parameters of the preset prediction model to obtain the target prediction model includes: The loss function is constructed based on the probability distribution parameters and the negative log-likelihood loss function; The loss function value is calculated based on the historical behavior data and the loss function. The model parameters of the preset prediction model are iteratively optimized based on the gradient optimization algorithm and the loss function value until the loss function value is within a preset numerical range, thus obtaining the target prediction model.
6. A device for predicting user electricity usage data, characterized in that, include: The data acquisition unit is used to acquire target power data of the target user, wherein the target power data is the power usage data generated by the target user in response to power regulation requests and after making power adjustments in the past; The first calculation unit is used to input the target power data into the target prediction model and calculate the target probability distribution of the power usage data of the target user after responding to the power regulation request. The target prediction model is a model obtained by training a preset prediction model, and the model parameters of the preset prediction model are constructed based on the target power data. The prediction unit is used to predict the electricity usage data of the target user based on the target probability distribution; The device further includes: a first construction unit, configured to construct a sample dataset based on historical electricity data and historical behavior data of historical users, wherein the historical behavior data includes at least one of the following: demand response period, incentive price, outdoor temperature, and user preference information; a second construction unit, configured to construct an autoregressive model and a mapping model based on the sample dataset, wherein the autoregressive model represents the mapping relationship between the historical behavior data and current behavior data of the historical users, and the mapping model represents the mapping relationship between the historical electricity data and the historical behavior data; a second calculation unit, configured to input the output of the autoregressive model and the output of the mapping model into a preset prediction model to obtain a conditional probability distribution of the electricity usage data of the historical users after responding to power dispatch requests, wherein the conditional probability distribution includes probability distribution parameters; and a third construction unit, configured to construct a loss function for the probability distribution parameters and use the loss function to optimize the model parameters of the preset prediction model to obtain the target prediction model. The prediction unit includes: a second determining subunit, used to determine the probability distribution parameters corresponding to the target user based on the target probability distribution; a third determining subunit, used to determine the confidence level and significance level of the target user's response to the power dispatch request; and a second calculation subunit, used to calculate the target user's power usage data based on the probability distribution parameters corresponding to the target user, the confidence level, and the significance level.
7. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method for predicting user energy usage data as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method of determining user electricity consumption behavior features, method of predicting user electricity consumption load and device
CN105989420A
Power system short-term load prediction method and prediction device under influence of extreme factors
CN112270454A