Method and device for predicting the regulation boundary of adjustable resources of power users based on deep learning
Based on deep learning prediction methods, establishment of adjustable capacity boundaries and use trend prediction models, combined with power transaction preference coefficients, solve the problem of difficulty predicting the adjustable load regulating boundary between industrial and commercial power users, and realized more efficient power demand response and response and Power system management.
Patent Information
- Application Number
- CN202410280863.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-12
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-03-12
AI Technical Summary
It is difficult for industrial and commercial electricity users to accurately predict the adjustment boundary of adjustable loads, which affects their efficiency in participating in power demand response services.
Adopt a predictive method based on deep learning, classify and train deep learning algorithms to classify the historical data of adjustable resources to establish a predictive model and use trend prediction model of adjustable capabilities. Combine the current operating conditions and use scenarios, predict the future to predict the future can be Calculate the boundaries of power transaction preferences to calculate the total adjustable boundary combined with the power transaction preference coefficient.
The precise prediction of the adjustment of the border with the adjustment of load adjustment of industrial and commercial electricity users, improved the efficiency of participating in the power response service of power demand, helping the power grid operator to better manage the balance of power supply and demand, and improve the flexibility and stability of the power system.
Smart Images

Figure CN118350565B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and device for predicting an adjustable resource regulation boundary of an electric power user based on deep learning. Background Art
[0002] Industrial and commercial electricity users (such as office buildings or shopping malls) participating in power demand response services (including spot transactions, virtual power plants, etc.) need to control and adjust the adjustable resources of industrial and commercial electricity users, such as cutting off some interruptible loads, reducing the operating power of the central air-conditioning system, adjusting the energy storage operation mode and operating power, etc. However, the adjustable boundaries of each adjustable load are different in different time periods (such as seasons, daytime and nighttime, weekdays and weekends), and are also closely related to the user's current production situation. As a result, it is difficult for users to determine how many resources can participate in the demand response service in the next hour or the next 24 hours, and how much power response quota to apply for. Summary of the invention
[0003] The embodiments of the present invention provide a method and device for predicting the regulation boundary of adjustable resources of power users based on deep learning, which can reasonably predict the regulation boundary of adjustable loads of industrial and commercial power users in the current and future period, so as to more reasonably participate in power demand response and achieve greater benefits with more precise control.
[0004] An embodiment of the present invention provides a method for predicting an adjustable resource adjustment boundary of an electric power user based on deep learning, comprising:
[0005] Classifying the adjustable resources of the industrial and commercial electricity users according to the usage frequency and adjustable power of the adjustable resources of the industrial and commercial electricity users;
[0006] Acquire classified historical data of various adjustable resources, the historical data including: historical operating conditions, and historical usage scenario information associated with the historical conditions;
[0007] Based on the first deep learning algorithm, the historical data of the classified various adjustable resources are trained to obtain an adjustable capacity boundary prediction model of the various adjustable resources of the industrial and commercial electricity users;
[0008] Based on the second deep learning algorithm, the historical data of the classified various adjustable resources are trained to obtain a usage trend prediction model of the classified various adjustable resources;
[0009] Obtaining current operating conditions and current usage scenario information of various adjustable resources of the industrial and commercial electricity users, and inputting the information into the usage trend prediction model of the classified various adjustable resources accordingly, and predicting the future operating conditions and future usage scenario information of various adjustable resources of the industrial and commercial electricity users within a future predetermined time period;
[0010] Input the current operating conditions, current usage scenario information, future operating conditions and future usage scenario information of various adjustable resources of the industrial and commercial electricity users into the adjustable capacity boundary prediction model of various adjustable resources of the industrial and commercial electricity users, and predict the adjustable capacity boundary of various adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods;
[0011] Based on the electricity trading preference coefficient obtained in advance by analysis of the industrial and commercial electricity users and the adjustable capacity boundaries of various adjustable resources of the industrial and commercial electricity users in the current and future scheduled time periods, the total adjustable boundaries of the adjustable resources of the industrial and commercial electricity users in the current and future scheduled time periods are calculated.
[0012] As an improvement of the above scheme, after inputting the current operating conditions, current usage scenario information, future operating conditions and future usage scenario information of various adjustable resources of the industrial and commercial electricity users into the adjustable capacity boundary prediction model of various adjustable resources of the industrial and commercial electricity users, and predicting the adjustable capacity boundaries of various adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods, and before calculating the total adjustable boundaries of the adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods based on the power trading preference coefficients pre-analyzed by the industrial and commercial electricity users and the adjustable capacity boundaries of various adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods, the method further includes:
[0013] Obtain historical transaction records and historical questionnaire data of each industrial and commercial electricity user participating in power demand response;
[0014] Based on historical transaction records and historical questionnaire survey data, a dataset of feature vectors reflecting user transaction preferences is constructed. The feature vectors include: the average response degree of users during peak electricity price periods; the median of user response delay time; the correlation coefficient between the increase in electricity prices and the amount of load reduction; the price sensitivity score expressed by users in the questionnaire; and the user's willingness level for temporary adjustment of adjustable resources.
[0015] Divide the dataset of feature vectors into training set and validation set;
[0016] Initialize the logistic regression model, the weight vector β and the intercept term θ are initialized to zero or random decimals, use the likelihood function of logistic regression as the loss function, and select the gradient descent optimizer to minimize the loss function;
[0017] Traverse the data of the training set, calculate the probability value corresponding to each data sample, and update the model parameters of the logistic regression model according to the actual label; in each iteration, calculate the gradient of the loss function with respect to the model parameters through back propagation, and then adjust the model parameters along the gradient direction to reduce the loss; stop training when the preset number of iterations is reached;
[0018] Using the validation set to evaluate the performance indicators of the logistic regression model, the performance indicators include calculating accuracy, precision, recall and F1 score; and adjusting the model hyperparameters according to the evaluation results to obtain a trained logistic regression model of power trading preference;
[0019] Obtaining historical transaction records and historical questionnaire survey data of the current industrial and commercial electricity users participating in power demand response;
[0020] Based on the historical transaction records and historical questionnaire survey data of the industrial and commercial electricity users participating in the power demand response, and using the trained logistic regression model of power transaction preference, mining the power transaction preference indicators of the industrial and commercial electricity users, the power transaction preference indicators include: price sensitivity and power response speed;
[0021] According to the preset weights of the power trading preference indicators, various power trading preference indicators are weighted and summed to obtain the power trading preference coefficient.
[0022] As an improvement of the above-mentioned scheme, the industrial and commercial electricity users are commercial electricity users, and the historical usage scenario information includes: historical seasons, historical times, historical dates, historical weather and historical flow of people at commercial user venues; the current usage scenario information includes: five parameters: current season, current time, current date, current weather and current flow of people at commercial user venues.
[0023] As an improvement of the above solution, the historical data of the classified various adjustable resources are trained based on the first deep learning algorithm to obtain an adjustable capacity boundary prediction model of the various adjustable resources of the industrial and commercial electricity users, including:
[0024] The historical operating conditions are arranged in chronological order to form continuous time series data, and the historical usage scenario information is discretized or encoded. The season is mapped to a four-dimensional vector representation, the time and date are converted into continuous features of hours and days of the week, the weather is expressed by one-hot encoding or word embedding, and the flow of people is directly used as input;
[0025] The processed time series data is divided into a training set and a validation set according to a preset ratio;
[0026] In the Transformer architecture, the self-attention mechanism is used to process the time series data of each step in the training set, where the vectors of query Q, key K, and value V are calculated; through the multi-head attention mechanism, these Q, K, and V vectors are passed through multiple linear transformation matrices respectively to form different attention heads;
[0027] The attention weight is calculated independently for each attention head, and the correlation between each time step and all other time steps is measured through the dot product operation, and normalized into a probability distribution through the softmax function, so that the feature of each time step can be represented by a weighted average according to its correlation with the features of other time steps;
[0028] The results of each attention head are concatenated and then integrated through a fully connected layer for linear transformation to obtain the final attention output, which is the weighted feature representation of the time step; this process is repeated until the multi-head attention calculation is completed for the entire time series, generating a new spatiotemporal feature sequence;
[0029] The GRU network with attention mechanism is used as the basic structure. The input layer receives the spatiotemporal feature sequence extracted based on the multi-head attention mechanism. The encoder part reads and encodes the information of the input sequence time by time step, and the decoder part gradually generates the future trend prediction sequence based on the hidden state of the encoder and its own hidden state. When predicting, the decoder introduces self-attention or cross-attention mechanism based on its own internal state to refer to the prediction results generated in the past and all the historical information of the encoder in the process of generating the next time step prediction.
[0030] The loss function is set to measure the difference between the predicted sequence and the true target sequence. The difference calculation formula of the loss function is: Among them, yi represents the true value, represents the predicted value, n is the sequence length;
[0031] The gradient is calculated through the back-propagation algorithm, and the model parameters are updated using the Adam optimizer. The iteration continues until the loss function converges or the preset maximum number of training rounds is reached.
[0032] After the training is completed, the model prediction effect is evaluated on the test set, the consistency of the predicted sequence and the actual observation sequence is compared, and the model parameters are adjusted accordingly to obtain the adjustable capacity boundary prediction model of various adjustable resources of the commercial electricity users; the model parameters include: learning rate, number of hidden layer units and number of attention heads.
[0033] As an improvement of the above solution, the historical data of the classified various adjustable resources are trained based on the second deep learning algorithm to obtain a usage trend prediction model of the classified various adjustable resources, including:
[0034] The historical operating conditions are arranged in chronological order to form continuous time series data, and the historical usage scenario information is discretized or encoded to represent the current state of the environment in which the agent is located. Among them, the season is mapped to a four-dimensional vector representation, the time and date are converted into continuous features of hours and days of the week, the weather is expressed by one-hot encoding or word embedding, and the flow of people is directly used as input;
[0035] The processed time series data is divided into a training set and a validation set according to a preset ratio;
[0036] Set the set of actions that the agent can perform, including adjusting the load level, and design a reward function to quantify the effect of the agent taking a certain action. The action effect includes: energy saving degree, user satisfaction and grid stability index; the reward function is:
[0037] Rt=w1*EnergySavedt-w2*UserDiscomfortt+w3*GridStabilityt; where EnergySavedt is the amount of energy saved at time step t; UserDiscomfortt is the degree of inconvenience felt by the user due to load adjustment at that moment, which is related to the change in passenger flow; GridStabilityt is an indicator reflecting the stability of the power grid; w1, w2, w3 are the weights of the corresponding items, which are used to balance the importance of different objectives;
[0038] A neural network is used as an approximator of the Q function. The current state is input and the value estimate Q(s, a) corresponding to all possible actions is output to construct a Q network. The network structure of the Q network includes the following network layers: input layer, 5 features: historical season, historical time, historical date, historical weather and historical flow of people; hidden layer 1 is a fully connected layer, containing multiple nodes, and the activation function is set to ReLU; hidden layer 2 is a fully connected layer, also containing multiple nodes, and the activation function is also set to ReLU; output layer is a fully connected layer, the dimension is equal to the size of the action space, no activation function or linear activation is used;
[0039] Create an experience replay buffer to store the s, a, r, s′ tuples generated during the interaction between the agent and the environment, which are the old state, action, reward and new state respectively;
[0040] The agent selects the action with the highest estimated value according to the preset ε-greedy strategy and randomly selects actions to explore unknown areas. It samples a batch of data from the experience replay buffer, uses these samples to update the Q network, and approximates the optimal Q function by minimizing the Bellman error; the Bellman error is the difference between the target Q value and the current Q value. The agent continuously accumulates experience and updates the Q network until convergence or the preset number of learning steps is reached.
[0041] Define the Actor network and the Critic network, whose output is the probability distribution of the action that the agent should take in a given state; ActorActor is used to generate strategies, and its network structure includes the following network layers: input layer, the same as the input layer of the Q network; hidden layer 1-Actor, which is a multi-layer fully connected layer, and the activation function is set to the Tanh function; output layer-Actor, the activation function is set to the softmax function to generate the action vector of the probability distribution; the Critic network is a value function network, which is used to evaluate the value of the action generated by the Actor, and its network structure includes the following network layers: input layer, the same as the input layer of the Q network, plus the action vector output by the Actor network as an additional input; hidden layer 1-Critic, which is a fully connected layer, and the activation function is set to the ReLU function; hidden layer 2-Critic, which is multi-layer; output layer-Critic, which is a single node, and no activation function is set;
[0042] Set the initial weights of the Actor and Critic networks respectively and start the iterative training process;
[0043] The agent performs actions based on the output of the Actor network and obtains new states and rewards. The Critic network updates its value function estimate based on the received new states and rewards. The value function is: V(s; θv)≈Q(s,a; θq), where V(s) is the value function estimate of state s, Q(s,a) is the state-action value function, and θv and θq are the parameters of the Critic network and the Q network, respectively.
[0044] The Actor network uses the policy gradient algorithm to guide the policy update of the Critic network based on the action evaluation gradient provided by the Critic network. For the update of the Critic network, the TD-error algorithm is used for back propagation update parameters. The algorithm formula is as follows: t =R t+1 +γ·Q(s t+1 , a t+1 ;θ)-Q(s t , a t; θ); where δt is the TD-error at time step t; Rt+1 is the immediate reward received by the agent at time step t+1; γ is a discount factor between 0 and 1, which is used to balance the importance of current rewards and future potential rewards; Q(St,at;θ) is the estimate of the state-action value function for the current state st and the action at taken, and θ represents the parameters of the Q network; Q(St+1,at+1;θ) is the value function estimate of the action at+1 performed in the next state St+1; based on the TD-error, the parameters of the Q network are updated according to the following algorithm: α is the learning rate, which is a positive number between 0 and 1, and is used to control the degree to which the weights are adjusted in the direction of the gradient at each step of parameter update; θ represents the parameter set of the Q network (also called the Q function approximator), which determines the weights and biases of the Q network; δ t is the TD-error at time step t, which is the key indicator for updating the Q value and is usually defined as the difference between the immediate reward plus the future discounted reward and the current Q value; represents the gradient of the Q function with respect to the parameter θ, that is, at a given state s t and action a t The sensitivity of the Q function to small changes in its parameters θ in the case of
[0045] In Actor-Critic, the advantage function provided by the Critic network is used to guide the strategy to update the Actor network: The function formula of the advantage function is: A(s t ,at)=Q(s t , a t )-V(s t ); where A(st,at) is the advantage function value of executing action at in state st; Q(st,at) is the Q value of executing action at in this state, that is, the expected cumulative return; V(st) is the value function value of state st, that is, the expected cumulative return starting from state st without considering the specific action;
[0046] The above steps are repeated iteratively, allowing the Actor network to continuously update strategies and the Critic network to continuously evaluate the quality of these strategies until the model performance is stable or the predetermined training rounds are reached.
[0047] As an improvement of the above scheme, the total adjustable boundary of the adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods is calculated based on the power trading preference coefficient obtained by pre-analysis of the industrial and commercial electricity users and the adjustable capacity boundary of various adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods, including:
[0048] The power transaction preference coefficient obtained by pre-analysis of the industrial and commercial power user and the adjustable capacity boundary of various adjustable resources of the industrial and commercial power user in the current and future scheduled time periods are input into the following calculation formula to calculate the total adjustable boundary T of the adjustable resources of the industrial and commercial power user in the current and future scheduled time periods:
[0049]
[0050] Where F(P) is the power trading preference coefficient of industrial and commercial electricity users; C t W represents the sum of the original capacity boundaries of various adjustable resources of industrial and commercial electricity users at time t; t represents the weight value of the importance of the adjustable resource at the tth time; D t It is the discount factor for the tth time, reflecting the discount of the future adjustment boundary relative to the current value.
[0051] As an improvement of the above scheme, the ratio of the training set and the validation set is 4:1.
[0052] As an improvement of the above scheme, the classification categories of the adjustable resources include: three categories: high adjustable capacity category, medium adjustable capacity category and low adjustable capacity category, among which adjustable resources with high usage frequency and low adjustable power are classified into the low adjustable capacity category, adjustable resources with high usage frequency and high adjustable power, or medium usage frequency and high adjustable power, or high usage frequency and medium adjustable power are classified into the medium adjustable capacity category, and adjustable resources with low usage frequency and high adjustable power are classified into the high adjustable capacity category.
[0053] Another embodiment of the present invention provides a prediction device for adjusting the adjustment boundary of adjustable resources of power users based on deep learning, including:
[0054] A classification module, configured to classify the adjustable resources of the industrial and commercial electricity users according to the usage frequency and adjustable power of the adjustable resources of the industrial and commercial electricity users;
[0055] A first acquisition module is used to acquire classified historical data of various adjustable resources, wherein the historical data includes: historical operating conditions, and historical usage scenario information associated with the historical operating conditions;
[0056] A first model training module is used to train the historical data of the classified various adjustable resources based on a first deep learning algorithm to obtain an adjustable capacity boundary prediction model of the various adjustable resources of the industrial and commercial electricity users;
[0057] A second model training module is used to train the historical data of the classified various adjustable resources based on a second deep learning algorithm to obtain a usage trend prediction model of the classified various adjustable resources;
[0058] The second acquisition module is used to obtain the current operating conditions and current usage scenario information of various adjustable resources of the industrial and commercial electricity users, and input them into the usage trend prediction model of the classified various adjustable resources to predict the future operating conditions and future usage scenario information of various adjustable resources of the industrial and commercial electricity users within a future predetermined time period;
[0059] The first prediction module is used to input the current operating conditions, current usage scenario information, future operating conditions and future usage scenario information of various adjustable resources of the industrial and commercial electricity users into the adjustable capacity boundary prediction model of various adjustable resources of the industrial and commercial electricity users, and predict the adjustable capacity boundary of various adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods;
[0060] The second prediction module is used to calculate the total adjustable boundaries of the adjustable resources of the industrial and commercial electricity users in the current and future scheduled time periods based on the power trading preference coefficients obtained in advance by analysis of the industrial and commercial electricity users and the adjustable capacity boundaries of various adjustable resources of the industrial and commercial electricity users in the current and future scheduled time periods.
[0061] Another embodiment of the present invention provides a prediction device for regulating boundaries of adjustable resources of power users based on deep learning, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the prediction method for regulating boundaries of adjustable resources of power users based on deep learning as described in the above-mentioned embodiment of the invention is implemented.
[0062] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0063] First, the user's adjustable resources are classified according to their usage frequency and adjustable power, so as to deal with different types of resources in a targeted manner; the adjustable capacity boundary prediction model and the usage trend prediction model are trained respectively for the historical data (operating conditions and related scenario information) of each category of adjustable resources using different deep learning models; the trained trend prediction model is used in combination with the current operating conditions and usage scenario information to predict the operating conditions and scenario changes in the future; the predicted current and future states are input into the corresponding adjustable capacity boundary prediction model to calculate the adjustable capacity boundaries of various resources in the current and future time periods; the total adjustable boundary is calculated in combination with the power trading preference coefficient obtained by the pre-analysis. The embodiment of the present invention automatically identifies and accurately predicts the adjustable load adjustment boundary of industrial and commercial electricity users, provides users with more accurate and real-time demand response decision-making basis, helps power grid operators or power market participants to better manage the balance of power supply and demand, improves the flexibility and stability of the power system, realizes the effective management of the adjustable load of industrial and commercial electricity users and optimizes the ability to participate in power demand response, improves the efficiency of demand-side management, and enables users to implement more refined and profitable operation strategies in the power market. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a flowchart of a method for predicting the adjustment boundary of adjustable resources of power users based on deep learning provided by an embodiment of the present invention;
[0065] Figure 2 It is a structural schematic diagram of a prediction device for adjusting the adjustment boundary of adjustable resources of power users based on deep learning provided by an embodiment of the present invention;
[0066] Figure 3 It is a structural schematic diagram of a device for predicting the adjustment boundary of adjustable resources of power users based on deep learning provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0067] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0068] See also Figure 1 , is a flowchart of a method for predicting the adjustment boundary of adjustable resources of power users based on deep learning provided by an embodiment of the present invention. The method for predicting the adjustment boundary of adjustable resources of power users based on deep learning comprises steps S10 to S16:
[0069] S10, classifying the adjustable resources of the industrial and commercial electricity users according to the usage frequency and adjustable power of the adjustable resources of the industrial and commercial electricity users.
[0070] As an example, the classification categories of the adjustable resources include: a high adjustable capability category, a medium adjustable capability category and a low adjustable capability category, wherein adjustable resources with high usage frequency and low adjustable power are classified into the low adjustable capability category, adjustable resources with high usage frequency and high adjustable power, or medium usage frequency and high adjustable power, or high usage frequency and medium adjustable power are classified into the medium adjustable capability category, and adjustable resources with low usage frequency and high adjustable power are classified into the high adjustable capability category.
[0071] Among them, industrial and commercial electricity users can be industrial electricity users or commercial electricity users. Commercial electricity users can be office buildings or shopping malls, etc. The adjustable resources of commercial electricity users can be central air conditioners, building lamps, energy storage equipment or charging piles of commercial electricity users, etc., which can participate in the power dispatch of virtual power plants. Industrial electricity users can be processing and manufacturing enterprises. The adjustable resources of industrial electricity users can be air conditioning systems, production line loads or industrial heating and cooling equipment of industrial electricity users, etc., which can participate in the power dispatch of virtual power plants.
[0072] S11, obtaining classified historical data of various adjustable resources, wherein the historical data includes: historical operating conditions, and historical usage scenario information associated with the historical conditions.
[0073] S12: Training the historical data of the classified various types of adjustable resources based on the first deep learning algorithm to obtain an adjustable capacity boundary prediction model for the various types of adjustable resources of the industrial and commercial electricity users.
[0074] S13, training the historical data of the classified various adjustable resources based on the second deep learning algorithm to obtain a usage trend prediction model of the classified various adjustable resources.
[0075] S14, obtaining the current operating conditions and current usage scenario information of various adjustable resources of the industrial and commercial electricity users, and inputting them into the usage trend prediction model of various classified adjustable resources accordingly, to predict the future operating conditions and future usage scenario information of various adjustable resources of the industrial and commercial electricity users within a future predetermined time period.
[0076] S15, input the current operating conditions, current usage scenario information, future operating conditions and future usage scenario information of various types of adjustable resources of the industrial and commercial electricity users into the adjustable capacity boundary prediction model of various types of adjustable resources of the industrial and commercial electricity users, and predict the adjustable capacity boundaries of various types of adjustable resources of the industrial and commercial electricity users in the current and future scheduled time periods.
[0077] S16, calculating the total adjustable boundaries of the adjustable resources of the industrial and commercial electricity users in the current and future scheduled time periods based on the power trading preference coefficients pre-analyzed by the industrial and commercial electricity users and the adjustable capacity boundaries of various adjustable resources of the industrial and commercial electricity users in the current and future scheduled time periods.
[0078] In an embodiment of the present invention, the user's adjustable resources are first classified according to their usage frequency and adjustable power so as to deal with different types of resources in a targeted manner; the adjustable capacity boundary prediction model and the usage trend prediction model are trained respectively for the historical data (operating conditions and related scenario information) of each category of adjustable resources using different deep learning models; the trained trend prediction model is used in combination with the current operating conditions and usage scenario information to predict the operating conditions and scenario changes in the future; the predicted current and future states are input into the corresponding adjustable capacity boundary prediction model to calculate the adjustable capacity boundaries of various resources in the current and future time periods; the total adjustable boundary is calculated in combination with the power trading preference coefficient obtained by the pre-analysis. The embodiment of the present invention automatically identifies and accurately predicts the adjustable load adjustment boundaries of industrial and commercial electricity users, provides users with more accurate and real-time demand response decision-making basis, helps power grid operators or power market participants to better manage the balance of power supply and demand, improves the flexibility and stability of the power system, realizes the effective management of the adjustable loads of industrial and commercial electricity users and optimizes the ability to participate in power demand response, improves the efficiency of demand-side management, and enables users to implement more refined and profitable operation strategies in the power market.
[0079] As an example, after inputting the current operating conditions, current usage scenario information, future operating conditions and future usage scenario information of various types of adjustable resources of the industrial and commercial electricity users into the adjustable capacity boundary prediction model of various types of adjustable resources of the industrial and commercial electricity users, and predicting the adjustable capacity boundaries of various types of adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods, and before calculating the total adjustable boundaries of the adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods based on the power trading preference coefficients pre-analyzed by the industrial and commercial electricity users and the adjustable capacity boundaries of various types of adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods, the method further includes:
[0080] Obtain historical transaction records and historical questionnaire data of each industrial and commercial electricity user participating in power demand response;
[0081] Based on historical transaction records and historical questionnaire survey data, a dataset of feature vectors reflecting user transaction preferences is constructed. The feature vectors include: the average response degree of users during peak electricity price periods; the median of user response delay time; the correlation coefficient between the increase in electricity prices and the amount of load reduction; the price sensitivity score expressed by users in the questionnaire; and the user's willingness level for temporary adjustment of adjustable resources.
[0082] Divide the dataset of feature vectors into training set and validation set;
[0083] Initialize the logistic regression model, the weight vector β and the intercept term θ are initialized to zero or random decimals, use the likelihood function of logistic regression as the loss function, and select the gradient descent optimizer to minimize the loss function;
[0084] Traverse the data of the training set, calculate the probability value corresponding to each data sample, and update the model parameters of the logistic regression model according to the actual label; in each iteration, calculate the gradient of the loss function with respect to the model parameters through back propagation, and then adjust the model parameters along the gradient direction to reduce the loss; stop training when the preset number of iterations is reached;
[0085] Using the validation set to evaluate the performance indicators of the logistic regression model, the performance indicators include calculating accuracy, precision, recall and F1 score; and adjusting the model hyperparameters according to the evaluation results to obtain a trained logistic regression model of power trading preference;
[0086] Obtaining historical transaction records and historical questionnaire survey data of the current industrial and commercial electricity users participating in power demand response;
[0087] Based on the historical transaction records and historical questionnaire survey data of the industrial and commercial electricity users participating in the power demand response, and using the trained logistic regression model of power transaction preference, mining the power transaction preference indicators of the industrial and commercial electricity users, the power transaction preference indicators include: price sensitivity and power response speed;
[0088] According to the preset weights of the power trading preference indicators, various power trading preference indicators are weighted and summed to obtain the power trading preference coefficient.
[0089] In this embodiment, the power trading preferences of industrial and commercial power users are mined and analyzed, and combined with the prediction of the adjustment boundary of adjustable resources to optimize the power demand response decision. The specific analysis is as follows: First, the historical transaction records and historical questionnaire survey data of each industrial and commercial power user participating in the power demand response are collected to construct a feature vector reflecting the user's trading preference, including key indicators such as the degree of response during peak hours, response delay time, correlation between electricity price and load reduction, price sensitivity score and adjustment willingness level. Then, the feature vector data set is divided into a training set and a validation set, the logistic regression model is initialized, and the loss function is set to the likelihood function, and the gradient descent method is used for parameter optimization. The model parameters are updated by traversing the training set, and the gradient is calculated and the weight is adjusted by back propagation. The training is stopped after reaching the preset number of iterations, and the model performance (such as accuracy, precision, recall and F1 score) is evaluated using the validation set. The model hyperparameters are adjusted according to the evaluation results, and finally a trained power trading preference logistic regression model is obtained. Next, based on the historical transaction records and questionnaire data of the current industrial and commercial electricity users, the trained logistic regression model is used to mine the power trading preference indicators such as the price sensitivity and power response speed of the users. Then, the weighted sum of each preference indicator is calculated according to the preset weight to obtain the power trading preference coefficient of the industrial and commercial electricity user. Finally, after predicting the adjustable capacity boundaries of various adjustable resources in the current and future predetermined time periods, the total adjustable boundaries of industrial and commercial electricity users in the current and future period are calculated in combination with the power trading preference coefficients obtained above. This embodiment can accurately capture the core factors affecting the user's power trading preference by extracting key information from a large amount of historical data. Among them, a trading preference prediction model based on logistic regression is constructed. The model can effectively learn and simulate the behavioral laws of users in power trading, and its output results help power grid operators understand and predict the user's behavioral tendencies in future demand response activities. By reasonably weighting multiple trading preference indicators, the overall power trading preference intensity of users is quantified, which is convenient for comprehensive consideration of the influence of multiple factors in actual operation and improves the pertinence and effectiveness of demand response strategies. In this way, by integrating the power trading preference coefficient and the adjustment boundary prediction results of adjustable resources, a comprehensive and dynamic demand response management framework is formed, which can formulate supply and demand balance strategies more scientifically and flexibly, help the power grid system to achieve efficient operation, and at the same time improve the enthusiasm and benefit level of users participating in demand response. Among them, the training of the model can also refer to the existing methods.
[0090] As an example, the industrial and commercial electricity users are commercial electricity users, and the historical usage scenario information includes: historical seasons, historical times, historical dates, historical weather, and historical traffic volume at commercial user locations; the current usage scenario information includes: five parameters: current season, current time, current date, current weather, and current traffic volume at commercial user locations. Among them, the information about current season, current time, current date, and current weather can be obtained online, and the current traffic volume at commercial user locations can be obtained by performing a headcount analysis based on indoor images uploaded in real time at commercial user locations.
[0091] As an example, the historical data of the classified various adjustable resources are trained based on the first deep learning algorithm to obtain the adjustable capacity boundary prediction model of the various adjustable resources of the industrial and commercial electricity users, including:
[0092] The historical operating conditions are arranged in chronological order to form continuous time series data, and the historical usage scenario information is discretized or encoded. The season is mapped to a four-dimensional vector representation, the time and date are converted into continuous features of hours and days of the week, the weather is expressed by one-hot encoding or word embedding, and the flow of people is directly used as input;
[0093] The processed time series data is divided into a training set and a validation set according to a preset ratio;
[0094] In the Transformer architecture, the self-attention mechanism is used to process the time series data of each step in the training set, wherein the vectors of query Q, key K, and value V are calculated; through the multi-head attention mechanism, these Q, K, and V vectors are respectively passed through multiple linear transformation matrices to form different attention heads; specifically, first, for each step of the time series data in the training set, it is mapped into three vectors - query (Question), key (Key), and value (Value), and the original input sequence is usually linearly transformed using a fully connected layer with shared weights to obtain Q, K, and V vectors. Then, using the multi-head attention mechanism, the Q, K, and V vectors are respectively passed through multiple different linear transformation matrices to form H different attention heads. For example, the query matrix Q = XW is calculated through linear transformation Q , key matrix K = XW K , value matrix V = XW V .
[0095] The attention weight is calculated independently for each attention head, and the correlation between each time step and all other time steps is measured by the dot product operation, and normalized to a probability distribution by the softmax function, so that the feature of each time step can be represented by a weighted average according to its correlation with the features of other time steps; specifically, for the hth attention head, the attention weight is calculated: in, and are the projections of the query matrix and the key matrix on the attention head h, respectively. k is the dimension of the key vector. Use the obtained attention weights to perform weighted summation on the corresponding value vectors to obtain the context vector of the current time step t under the attention head h: is the projection of the value vector at the hth attention head, is the context vector corresponding to time step t; where h is the number of attention heads;
[0096] The results of each attention head are concatenated and then integrated through a fully connected layer for linear transformation to obtain the final attention output, which is the weighted feature representation of the time step; this process is repeated until the multi-head attention calculation is completed for the entire time series, generating a new spatiotemporal feature sequence; specifically, the context vectors of all attention heads are concatenated and passed through the fully connected layer to obtain the final attention output vector: W O is the weight matrix of the combination layer; repeat the above process for each time step in the time series to generate a new spatiotemporal feature sequence: C = {C 1 , C 2 , ..., C t ,...}; "Concat" indicates a concatenation operation;
[0097] The GRU network with attention mechanism is used as the basic structure. The input layer receives the spatiotemporal feature sequence extracted based on the multi-head attention mechanism. The encoder part reads and encodes the information of the input sequence time by time step, and the decoder part gradually generates the future trend prediction sequence based on the hidden state of the encoder and its own hidden state. Among them, the decoder introduces self-attention or cross-attention mechanism based on its own internal state when predicting, so as to refer to the prediction results generated in the past and all the historical information of the encoder in the process of generating the next time step prediction. Specifically, for the GRU encoder, its hidden state update formula is: For the GRU decoder, when predicting the output of time step t, assume that the generated prediction sequence is Y <t , then, the self-attention mechanism: Cross-Attention Mechanism: Update the decoder's hidden state and generate predictions: “SelfAttn” represents the self-attention mechanism calculation, “CrossAttn” represents the cross-attention mechanism calculation, and “DecoderOutputLayer” represents the nonlinear transformation of the decoder output layer; Represents the concatenation or combination operation of vectors;
[0098] The loss function is set to measure the difference between the predicted sequence and the true target sequence. The difference calculation formula of the loss function is: Among them, yi represents the true value, represents the predicted value, n is the sequence length;
[0099] The gradient is calculated through the back-propagation algorithm, and the model parameters are updated using the Adam optimizer. The iteration continues until the loss function converges or the preset maximum number of training rounds is reached.
[0100] After the training, the model prediction effect is evaluated on the test set, the consistency of the predicted sequence and the actual observation sequence is compared, and the model parameters are adjusted accordingly to obtain the adjustable capacity boundary prediction model of various adjustable resources of the industrial and commercial electricity users; the model parameters include: learning rate, number of hidden layer units and number of attention heads.
[0101] In an embodiment of the present invention, for various adjustable resources of industrial and commercial electricity users, a prediction model is constructed using historical data and real-time scenario information to predict its future adjustable capacity boundary. Among them, deep learning is used to construct a model that can predict the adjustable capacity boundary of various adjustable resources (such as air conditioning, lighting, etc.) of industrial and commercial electricity users, so that smart grids or energy management systems can better perform demand-side management. This embodiment fully combines time series analysis, feature engineering, and sequence-to-sequence learning methods, and adopts Transformer and GRU network structures to make full use of historical usage scenario information and current real-time data. Specifically: First, by converting non-numerical information such as historical seasons, time, date, weather, and traffic into a form that can be understood by machine learning algorithms, such as four-dimensional vectors representing seasons, continuous features representing time and date, and unique hot encoding or word embedding to express weather, the model's learning ability and prediction accuracy for complex environmental factors are improved. The problem of unstructured data is solved, and multiple influencing factors are quantified and integrated into the model to provide effective input for subsequent deep learning training. Second, by arranging the historical operating conditions in chronological order to form continuous time series data, and reasonably dividing it into training sets and validation sets according to the preset ratio, the model is ensured to have generalization ability during the training process. Simulating the resource usage that changes over time in the real environment makes it easier for the model to capture the dynamic laws in the time series. Third, through the self-attention mechanism, the model can simultaneously consider the data of all time steps, calculate the correlation weight of each time step with all other time steps, generate a spatiotemporal feature sequence, and thus extract the global dependency in the time series data. Solve the problem that traditional recurrent neural networks are difficult to handle long-distance dependencies, and improve the model's learning ability for long-term trends and periodic patterns. Fourth, the encoder part captures the information of the input sequence and gradually generates the future trend prediction sequence through the decoder. The decoder introduces a self-attention or cross-attention mechanism, which can refer to the prediction results generated in the past and the historical information of the entire encoder when predicting, achieving more accurate sequence prediction. Using the recursive structure and attention mechanism, an effective mapping from the input sequence to the output sequence is established to achieve a refined prediction of future changes in the boundary of adjustable resources. Fifth, define the loss function to measure the difference between the predicted sequence and the actual target sequence, use the back-propagation algorithm to calculate the gradient, and use the Adam optimizer to update the model parameters so that the model can continuously approach the optimal state during the iteration process. Guide the model training process to ensure that the model performance gradually improves with the increase in the number of training rounds and avoid overfitting. Sixth, evaluate the prediction effect of the model on the test set, and fine-tune the model parameters (such as learning rate, number of hidden layer units, and number of attention heads) by comparing the consistency between the predicted sequence and the actual observation sequence, so that the model performs best on new samples. Ensure that the model still has good prediction performance on new data that has not been seen, and improve the generalization ability and practicality of the model.
[0102] To sum up, the technical concept of this embodiment is to build a prediction model that integrates deep learning and time series analysis technology. Through the efficient use of historical and real-time scenario information, it can accurately predict the adjustable capacity boundaries of various adjustable resources of industrial and commercial electricity users in different time periods in the future, thereby helping to realize the intelligent dispatch of the power system and the formulation of demand response strategies.
[0103] It should be noted that specific technical means such as calculating gradients through the back-propagation algorithm and updating model parameters using the Adam optimizer can refer to the existing principles of calculating gradient algorithms. The principles are not elaborated here. These individual technical points are not the focus of this embodiment. The focus of this embodiment is the combination and innovation of the technologies described above.
[0104] As an example, the historical data of the classified various adjustable resources are trained based on the second deep learning algorithm to obtain the usage trend prediction model of the classified various adjustable resources, including:
[0105] The historical operating conditions are arranged in chronological order to form continuous time series data, and the historical usage scenario information is discretized or encoded to represent the current state of the environment in which the agent is located. Among them, the season is mapped to a four-dimensional vector representation, the time and date are converted into continuous features of hours and days of the week, the weather is expressed by one-hot encoding or word embedding, and the flow of people is directly used as input;
[0106] The processed time series data is divided into a training set and a validation set according to a preset ratio;
[0107] Set the set of actions that the agent can perform, including adjusting the load level, and design a reward function to quantify the effect of the agent taking a certain action. The action effect includes: energy saving degree, user satisfaction and grid stability index; the reward function is:
[0108] Rt=w1*EnergySavedt-w2*UserDiscomfortt+w3*GridStabilityt; where EnergySavedt is the amount of energy saved at time step t; UserDiscomfortt is the degree of inconvenience felt by the user due to load regulation at that moment, reflecting the user discomfort that may be caused by load regulation, such as reduced comfort caused by excessive temperature changes. This value is related to the change in passenger flow, because under different passenger flow conditions, the same load regulation may bring different degrees of user dissatisfaction; GridStabilityt is an indicator reflecting the stability of the power grid; w1, w2, and w3 are the weights of the corresponding items, which are used to balance the importance of different goals; specifically, the set of actions that the agent can choose to perform refers to a series of adjustable load levels, for example, it can determine how much percentage of electricity load is reduced at a certain moment; the designed reward function is used to quantify the benefits brought by the agent after performing a certain action; the calculation of UserDiscomfortt can be dynamically calculated according to specific situations and conditions, and the specific calculation formula can be:
[0109]
[0110] Temperature change is an important factor affecting comfort. The PMV (Predicted Mean Vote) comfort model can be used to quantify the impact of temperature change on user comfort. For example, if load regulation causes indoor temperature changes, such a model can be used to calculate the comfort reduction index associated with temperature changes. Among them, PMV still uses the Predicted Mean Vote proposed by ASHRAE. The comfort index calculated by the Vote (predicted average vote) model reflects the impact of temperature changes on comfort. It is usually a negative number, and the smaller the value, the more uncomfortable it is. PeopleDensity is the density of human traffic. The attenuation factor λ is introduced here to simulate the marginal diminishing effect of the environmental impact on a single person when the human traffic is larger. InterruptionScore represents the score of service interruption or quality degradation caused by load regulation. It may be calculated by combining factors such as interruption duration, frequency, and impact range. It can be a pre-calculated value, and InterruptibilityFunction is a function based on the severity and time of the interruption. For example, the discomfort caused by service interruption during busy hours may be stronger. The function can be the existing TimeOfDay function. IndividualSensitivityDistribution(Users) is an individual sensitivity distribution value about the user group. It can be set in advance by conducting a questionnaire based on user categories (such as age, health status, etc.), or the sensitivity distribution of different groups of people can be calculated in advance through big data analysis. β temp , β int , β ind The weight factors correspond to the relative importance of each of the above parts, and need to be calibrated according to the actual application scenario and data. This solution fully considers the interaction between multiple factors and individual differences, and incorporates the marginal effect of traffic density and the dynamic impact of service interruption on user discomfort.
[0111] A neural network is used as an approximator of the Q function. The current state is input and the value estimate Q(s, a) corresponding to all possible actions is output to construct a Q network. The network structure of the Q network includes the following network layers: input layer, 5 features: historical season, historical time, historical date, historical weather and historical flow of people; hidden layer 1 is a fully connected layer, containing multiple nodes, and the activation function is set to ReLU; hidden layer 2 is a fully connected layer, also containing multiple nodes, and the activation function is also set to ReLU; output layer is a fully connected layer, the dimension is equal to the size of the action space, no activation function or linear activation is used;
[0112] Create an experience replay buffer to store the s, a, r, s′ tuples generated during the interaction between the agent and the environment, which are the old state, action, reward and new state respectively;
[0113] The agent selects the action with the highest estimated value according to the preset ε-greedy strategy and randomly selects actions to explore unknown areas. It samples a batch of data from the experience replay buffer, uses these samples to update the Q network, and approximates the optimal Q function by minimizing the Bellman error; the Bellman error is the difference between the target Q value and the current Q value. The agent continuously accumulates experience and updates the Q network until convergence or the preset number of learning steps is reached.
[0114] Define the Actor network and the Critic network, whose output is the probability distribution of the action that the agent should take in a given state; ActorActor is used to generate strategies, and its network structure includes the following network layers: input layer, the same as the input layer of the Q network; hidden layer 1-Actor, which is a multi-layer fully connected layer, and the activation function is set to the Tanh function; output layer-Actor, the activation function is set to the softmax function to generate the action vector of the probability distribution; the Critic network is a value function network, which is used to evaluate the value of the action generated by the Actor, and its network structure includes the following network layers: input layer, the same as the input layer of the Q network, plus the action vector output by the Actor network as an additional input; hidden layer 1-Critic, which is a fully connected layer, and the activation function is set to the ReLU function; hidden layer 2-Critic, which is multi-layer; output layer-Critic, which is a single node, and no activation function is set;
[0115] Set the initial weights of the Actor and Critic networks respectively and start the iterative training process;
[0116] The agent performs actions based on the output of the Actor network and obtains new states and rewards. The Critic network updates its value function estimate based on the received new states and rewards. The value function is: V(s; θv)≈Q(s,a; θq), where V(s) is the value function estimate of state s, Q(s,a) is the state-action value function, and θv and θq are the parameters of the Critic network and the Q network, respectively.
[0117] The Actor network uses the policy gradient algorithm to guide the policy update of the Critic network based on the action evaluation gradient provided by the Critic network. For the update of the Critic network, the TD-error algorithm is used for back propagation update parameters. The algorithm formula is as follows: t =R t+1 +γ·Q(s t+1 , a t+1 ;θ)-Q(s t , a t; θ); where δt is the TD-error at time step t; Rt+1 is the immediate reward received by the agent at time step t+1; γ is a discount factor between 0 and 1, which is used to balance the importance of current rewards and future potential rewards; Q(St,at;θ) is the estimate of the state-action value function for the current state st and the action at taken, and θ represents the parameters of the Q network; Q(St+1,at+1;θ) is the value function estimate of the action at+1 performed in the next state St+1; based on the TD-error, the parameters of the Q network are updated according to the following algorithm: α is the learning rate, which is a positive number between 0 and 1. It is used to control the degree to which the weights are adjusted in the direction of the gradient at each step of parameter update. A smaller learning rate can make the training process more stable, but the convergence speed is slower. A larger learning rate may accelerate convergence, but it may also cause training instability or skip the optimal solution. θ represents the parameter set of the Q network (also called the Q function approximator), which determines the weight and bias of the Q network. δ t is the TD-error at time step t, which is the key indicator for updating the Q value and is usually defined as the difference between the immediate reward plus the future discounted reward and the current Q value; represents the gradient of the Q function with respect to the parameter θ, that is, at a given state s t and action a t The sensitivity of the Q function to small changes in its parameters θ in the case of
[0118] In Actor-Critic, the advantage function provided by the Critic network is used to guide the strategy to update the Actor network: The function formula of the advantage function is: A(s t , a t )=Q(s t , a t )-V(s t ); where A(st,at) is the advantage function value of executing action at in state st; Q(st,at) is the Q value of executing action at in this state, that is, the expected cumulative return; V(st) is the value function value of state st, that is, the expected cumulative return starting from state st without considering the specific action;
[0119] The above steps are repeated iteratively, allowing the Actor network to continuously update strategies and the Critic network to continuously evaluate the quality of these strategies until the model performance is stable or the predetermined training rounds are reached.
[0120] In this embodiment, based on the framework of Deep Reinforcement Learning (DRL), the usage trends of various adjustable resources in commercial user places are predicted and regulated through agent learning and optimization strategies. The model uses historical and current usage scenario information as environmental state, and combines the Actor-Critic algorithm to realize the value evaluation and strategy update of action selection. Specifically, this embodiment integrates the following technical means: First, convert unstructured data such as historical seasons, time, date, weather and traffic into discrete or continuous forms that can be understood by machine learning models, so that the model can capture the resource usage rules in different scenarios. Effectively extract and integrate environmental state features to provide accurate state input for subsequent reinforcement learning. Second, construct continuous time series data, and reasonably divide the training set and verification set to simulate the time series characteristics of resource use in the real environment. Establish the model's learning ability for dynamic changes in time to ensure that the model can adapt to future changes during the training process. Third, define a reward function that comprehensively considers three key indicators: energy saving, user satisfaction and grid stability, and quantify the effect of the agent's execution of actions. Guide the agent to take actions that are beneficial to the global optimal goal in the exploration process and balance the trade-offs between multiple goals. Fourth, use a neural network to approximate the Q function, output the value estimates of all possible actions, and build a Q network. Feature extraction and value prediction are performed through a multi-layer fully connected network structure and a ReLU activation function. Estimate the expected cumulative return that the agent can obtain after performing a specific action in any state, and guide the agent to make decisions. Fifth, store the state transition data generated by the interaction between the agent and the environment. The agent finds a balance between exploration and utilization according to the ε-greedy strategy, and updates the Q network parameters through samples in the sampling buffer. Promote the agent to learn from past experience and gradually improve its behavior strategy. Sixth, build an Actor network to generate action strategies for probability distribution, and the Critic network is responsible for evaluating the value of these actions. The two work together to optimize the strategy. The Actor network adjusts the action strategy based on the value feedback provided by the Critic network, and the Critic network updates the value estimate through TD-error, forming a closed-loop feedback mechanism, making strategy iteration more efficient. Seventh, the Actor network guides the strategy update according to the advantage function provided by the Critic network; the Critic network uses the TD-error algorithm to back-propagate and update parameters, so that the Q value approaches the optimal solution. Through continuous iterative updates, the intelligent agent learns to choose the optimal action strategy in a complex environment and realizes the effective prediction and control of the usage trends of various adjustable resources. Within the preset number of learning steps, the Actor and Critic networks are continuously trained until the performance is stable or the predetermined training rounds are reached.Ensure that the model eventually converges to a strategy that can achieve good results in actual application scenarios, thereby realizing real-time and efficient resource scheduling management.
[0121] In summary, the technical concept of this embodiment mainly relies on deep reinforcement learning theory, and by constructing a time series model containing historical and real-time environmental information, supplemented by a carefully designed reward function and Actor-Critic architecture, it can achieve accurate prediction and intelligent regulation of the usage trends of various adjustable resources in industrial and commercial electricity user sites. Through continuous environmental interaction and learning processes, the intelligent agent can gradually optimize its decision-making strategy, thereby effectively managing resource usage while meeting multiple goals such as energy saving, user comfort, and grid stability.
[0122] It should be noted that the specific technical process of the intelligent agent selecting the action with the highest estimated value at present according to the preset ε-greedy strategy and randomly selecting actions to explore unknown areas can refer to the existing ε-greedy strategy. The principle will not be elaborated here. These individual technical points are not the focus of this embodiment. The focus of this embodiment is the technical combination and innovation as described above.
[0123] As an example, the total adjustable boundary of the adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods is calculated based on the power trading preference coefficient obtained by pre-analysis of the industrial and commercial electricity users and the adjustable capacity boundary of various adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods, including:
[0124] The power transaction preference coefficient obtained by pre-analysis of the industrial and commercial power user and the adjustable capacity boundary of various adjustable resources of the industrial and commercial power user in the current and future scheduled time periods are input into the following calculation formula to calculate the total adjustable boundary T of the adjustable resources of the industrial and commercial power user in the current and future scheduled time periods:
[0125]
[0126] Where F(P) is the power trading preference coefficient of industrial and commercial electricity users; C t W represents the sum of the original capacity boundaries of various adjustable resources of industrial and commercial electricity users at time t; t represents the weight value of the importance of the adjustable resource at the tth time; D t It is the discount factor for the tth time, reflecting the discount of the future adjustment boundary relative to the current value.
[0127] In this embodiment, the user's power trading preference coefficient, the actual capacity boundary of various adjustable resources, and the discount of future time value are taken into account. The following is a detailed description: By introducing the power trading preference coefficient F(P) of industrial and commercial electricity users, the model can reflect the user's enthusiasm and flexibility in participating in power market transactions, thereby adjusting the utilization strategy of its adjustable resources according to the market-oriented behavior characteristics of the user, ensuring that resource allocation is more in line with the user's actual needs and wishes, and improving resource allocation efficiency. By counting and summarizing the sum of the original capacity boundaries of all adjustable resources of industrial and commercial electricity users at different time points t, that is, the cumulative value of their respective maximum or minimum adjustable amounts, the total amount of power resources that can be dispatched by the user at a certain moment can be quantified, providing basic data support for subsequent optimization decisions. By assigning different weight values wt to each time point t, the difference in the importance of adjustable resources in different time periods is reflected, such as the peak period may have a higher weight, so that the allocation of adjustable resources can be dynamically adjusted according to the changes in the supply and demand relationship of the power system in different time periods to meet the needs of power grid balance and market demand changes. By introducing the discount factor dt to measure the value discount of the adjustable resource boundary at a certain point in the future t relative to the current time, the concept of time value in the economic field is reflected. This can encourage users to pay more attention to the management of adjustable resources in the near term while taking into account long-term plans, achieve balanced allocation of resources in time and space dimensions, and reduce the risk of long-term planning.
[0128] In summary, a comprehensive calculation formula is constructed through the above parameters to calculate the total adjustable boundary T of industrial and commercial electricity users in the future predetermined time period. This makes power dispatching or market trading decisions more accurate and scientific, which not only meets the personalized needs of users, but also can effectively cooperate with the needs of power grid operation, achieve power supply and demand balance, and promote the realization of energy conservation and emission reduction goals. Therefore, the core of this embodiment is to establish a multi-dimensional evaluation system that combines user behavior preferences, adjustable resource capacity boundaries and time value considerations, aiming to accurately calculate the overall dispatching potential of adjustable resources of industrial and commercial electricity users in the future, so as to better guide the trading activities of the power market and the real-time dispatching decisions of the smart grid.
[0129] As a further example of the above embodiment, the ratio of the training set to the validation set is 4:1.
[0130] See also Figure 2 , is a schematic diagram of a structure of a prediction device for adjusting the boundary of adjustable resources of power users based on deep learning provided by an embodiment of the present invention. The prediction device for adjusting the boundary of adjustable resources of power users based on deep learning comprises:
[0131] A classification module 10, configured to classify the adjustable resources of the industrial and commercial electricity users according to the usage frequency and adjustable power of the adjustable resources of the industrial and commercial electricity users;
[0132] A first acquisition module 11 is used to acquire classified historical data of various adjustable resources, wherein the historical data includes: historical operating conditions, and historical usage scenario information associated with the historical operating conditions;
[0133] A first model training module 12 is used to train the historical data of the classified various adjustable resources based on a first deep learning algorithm to obtain an adjustable capacity boundary prediction model of the various adjustable resources of the industrial and commercial electricity users;
[0134] A second model training module 13 is used to train the historical data of the classified various adjustable resources based on a second deep learning algorithm to obtain a usage trend prediction model of the classified various adjustable resources;
[0135] The second acquisition module 14 is used to obtain the current operating conditions and current usage scenario information of various adjustable resources of the industrial and commercial electricity users, and input them into the usage trend prediction model of various adjustable resources after classification, so as to predict the future operating conditions and future usage scenario information of various adjustable resources of the industrial and commercial electricity users within a future predetermined time period;
[0136] The first prediction module 15 is used to input the current operating conditions, current usage scenario information, future operating conditions and future usage scenario information of various adjustable resources of the industrial and commercial electricity users into the adjustable capacity boundary prediction model of various adjustable resources of the industrial and commercial electricity users, and predict the adjustable capacity boundary of various adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods;
[0137] The second prediction module 16 is used to calculate the total adjustable boundaries of the adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods based on the power trading preference coefficients obtained by pre-analysis of the industrial and commercial electricity users and the adjustable capacity boundaries of various adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods.
[0138] In an embodiment of the present invention, the user's adjustable resources are first classified according to their usage frequency and adjustable power so as to deal with different types of resources in a targeted manner; the adjustable capacity boundary prediction model and the usage trend prediction model are trained respectively for the historical data (operating conditions and related scenario information) of each category of adjustable resources using different deep learning models; the trained trend prediction model is used in combination with the current operating conditions and usage scenario information to predict the operating conditions and scenario changes in the future; the predicted current and future states are input into the corresponding adjustable capacity boundary prediction model to calculate the adjustable capacity boundaries of various resources in the current and future time periods; the total adjustable boundary is calculated in combination with the power trading preference coefficient obtained by the pre-analysis. The embodiment of the present invention automatically identifies and accurately predicts the adjustable load adjustment boundaries of industrial and commercial electricity users, provides users with more accurate and real-time demand response decision-making basis, helps power grid operators or power market participants to better manage the balance of power supply and demand, improves the flexibility and stability of the power system, realizes the effective management of the adjustable loads of industrial and commercial electricity users and optimizes the ability to participate in power demand response, improves the efficiency of demand-side management, and enables users to implement more refined and profitable operation strategies in the power market.
[0139] It should be noted that the relevant scheme contents of the implementation scheme of the device for predicting the regulation boundary of adjustable resources of power users based on deep learning can correspond to the implementation scheme contents of the method for predicting the regulation boundary of adjustable resources of power users based on deep learning mentioned above, which will not be elaborated here.
[0140] See also Figure 3 , is a schematic diagram of a prediction device for regulating boundaries of adjustable resources for power users based on deep learning provided by an embodiment of the present invention. The prediction device for regulating boundaries of adjustable resources for power users based on deep learning of this embodiment includes: a processor 100, a memory 101, and a computer program stored in the memory 101 and executable on the processor 100, such as a prediction program for regulating boundaries of adjustable resources for power users based on deep learning. When the processor 100 executes the computer program, the steps in the above-mentioned various embodiments of the prediction method for regulating boundaries of adjustable resources for power users based on deep learning are implemented. Alternatively, when the processor 100 executes the computer program, the functions of the modules / units in the above-mentioned various device embodiments are implemented.
[0141] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the prediction device for adjusting the boundary of adjustable resources of power users based on deep learning.
[0142] The prediction device for adjusting the boundary of adjustable resources for power users based on deep learning can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The prediction device for adjusting the boundary of adjustable resources for power users based on deep learning can include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the schematic diagram is only an example of a prediction device for adjusting the boundary of adjustable resources for power users based on deep learning, and does not constitute a limitation on the prediction device for adjusting the boundary of adjustable resources for power users based on deep learning. It can include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the prediction device for adjusting the boundary of adjustable resources for power users based on deep learning can also include input and output devices, network access devices, buses, etc.
[0143] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the prediction device for adjusting the boundary of adjustable resources for power users based on deep learning, and uses various interfaces and lines to connect various parts of the prediction device for adjusting the boundary of adjustable resources for power users based on deep learning.
[0144] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the prediction device of the adjustable resource adjustment boundary of the power user based on deep learning by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0145] Wherein, if the module / unit integrated by the prediction device of the adjustable resource adjustment boundary of the power user based on deep learning is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electrical carrier signals and telecommunication signals.
[0146] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0147] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for predicting the adjustment boundary of adjustable resources of power users based on deep learning, characterized in that: include: Classifying the adjustable resources of the industrial and commercial electricity users according to the usage frequency and adjustable power of the adjustable resources of the industrial and commercial electricity users; Acquire classified historical data of various adjustable resources, the historical data including: historical operating conditions, and historical usage scenario information associated with the historical conditions; Based on the first deep learning algorithm, the historical data of the classified various adjustable resources are trained to obtain an adjustable capacity boundary prediction model of the various adjustable resources of the industrial and commercial electricity users; Based on the second deep learning algorithm, the historical data of the classified various adjustable resources are trained to obtain a usage trend prediction model of the classified various adjustable resources; Obtaining current operating conditions and current usage scenario information of various adjustable resources of the industrial and commercial electricity users, and inputting the information into the usage trend prediction model of the classified various adjustable resources accordingly, and predicting the future operating conditions and future usage scenario information of various adjustable resources of the industrial and commercial electricity users within a future predetermined time period; Input the current operating conditions, current usage scenario information, future operating conditions and future usage scenario information of various adjustable resources of the industrial and commercial electricity users into the adjustable capacity boundary prediction model of various adjustable resources of the industrial and commercial electricity users, and predict the adjustable capacity boundary of various adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods; According to the power trading preference coefficient obtained by pre-analysis of the industrial and commercial power user and the adjustable capacity boundary of various adjustable resources of the industrial and commercial power user in the current and future predetermined time periods, the total adjustable boundary of the adjustable resources of the industrial and commercial power user in the current and future predetermined time periods is calculated; Wherein, the industrial and commercial electricity users are commercial electricity users, the historical usage scenario information includes: historical seasons, historical times, historical dates, historical weather, and historical flow of people at commercial user locations; the current usage scenario information includes: five parameters: current season, current time, current date, current weather, and current flow of people at commercial user locations; The first deep learning algorithm is used to train the historical data of the classified various adjustable resources to obtain an adjustable capacity boundary prediction model of the various adjustable resources of the industrial and commercial electricity users, including: The historical operating conditions are arranged in chronological order to form continuous time series data, and the historical usage scenario information is discretized or encoded. The season is mapped to a four-dimensional vector representation, the time and date are converted into continuous features of hours and days of the week, the weather is expressed by one-hot encoding or word embedding, and the flow of people is directly used as input; The processed time series data is divided into a training set and a validation set according to a preset ratio; In the Transformer architecture, the self-attention mechanism is used to process the time series data of each step in the training set, where the vectors of query Q, key K, and value V are calculated; through the multi-head attention mechanism, these Q, K, and V vectors are passed through multiple linear transformation matrices respectively to form different attention heads; The attention weight is calculated independently for each attention head, and the correlation between each time step and all other time steps is measured through the dot product operation, and normalized into a probability distribution through the softmax function, so that the feature of each time step can be represented by a weighted average according to its correlation with the features of other time steps; The results of each attention head are concatenated and then integrated through a fully connected layer for linear transformation to obtain the final attention output, which is the weighted feature representation of the time step; this process is repeated until the multi-head attention calculation is completed for the entire time series, generating a new spatiotemporal feature sequence; The GRU network with attention mechanism is used as the basic structure. The input layer receives the spatiotemporal feature sequence extracted based on the multi-head attention mechanism. The encoder part reads and encodes the information of the input sequence time by time step, and the decoder part gradually generates the future trend prediction sequence based on the hidden state of the encoder and its own hidden state. When predicting, the decoder introduces self-attention or cross-attention mechanism based on its own internal state to refer to the prediction results generated in the past and all the historical information of the encoder in the process of generating the next time step prediction. The loss function is set to measure the difference between the predicted sequence and the true target sequence. The difference calculation formula of the loss function is: Among them, yi represents the true value, represents the predicted value, n is the sequence length; The gradient is calculated through the back-propagation algorithm, and the model parameters are updated using the Adam optimizer. The iteration continues until the loss function converges or the preset maximum number of training rounds is reached. After the training is completed, the prediction effect of the model is evaluated on the test set, the consistency of the prediction sequence and the actual observation sequence is compared, and the model parameters are adjusted accordingly, so as to obtain the adjustable capacity boundary prediction model of various adjustable resources of the industrial and commercial electricity users; the model parameters include: learning rate, number of hidden layer units and number of attention heads; The historical data of the classified various adjustable resources are trained based on the second deep learning algorithm to obtain a usage trend prediction model of the classified various adjustable resources, including: The historical operating conditions are arranged in chronological order to form continuous time series data, and the historical usage scenario information is discretized or encoded to represent the current state of the environment in which the agent is located. Among them, the season is mapped to a four-dimensional vector representation, the time and date are converted into continuous features of hours and days of the week, the weather is expressed by one-hot encoding or word embedding, and the flow of people is directly used as input; The processed time series data is divided into a training set and a validation set according to a preset ratio; Set the set of actions that the agent can perform, including adjusting the load level, and design a reward function to quantify the effect of the agent taking a certain action. The action effect includes: energy saving degree, user satisfaction and grid stability index; the reward function is: Rt=w1*EnergySavedt-w2*UserDiscomfortt+w3*GridStabilityt; where EnergySavedt is the amount of energy saved at time step t; UserDiscomfortt is the degree of inconvenience felt by the user due to load adjustment at that moment, which is related to the change in passenger flow; GridStabilityt is an indicator reflecting the stability of the power grid; w1, w2, w3 are the weights of the corresponding items, which are used to balance the importance of different objectives; A neural network is used as an approximator of the Q function. The current state is input and the value estimate Q(s, a) corresponding to all possible actions is output to construct a Q network. The network structure of the Q network includes the following network layers: input layer, 5 features: historical season, historical time, historical date, historical weather and historical flow of people; hidden layer 1 is a fully connected layer, containing multiple nodes, and the activation function is set to ReLU; hidden layer 2 is a fully connected layer, also containing multiple nodes, and the activation function is also set to ReLU; output layer is a fully connected layer, the dimension is equal to the size of the action space, no activation function or linear activation is used; Create an experience replay buffer to store the s, a, r, s′ tuples generated during the interaction between the agent and the environment, which are the old state, action, reward and new state respectively; The agent selects the action with the highest estimated value according to the preset ε-greedy strategy and randomly selects actions to explore unknown areas. It samples a batch of data from the experience replay buffer, uses these samples to update the Q network, and approximates the optimal Q function by minimizing the Bellman error; the Bellman error is the difference between the target Q value and the current Q value; the agent continuously accumulates experience and updates the Q network until convergence or the preset number of learning steps is reached; Define the Actor network and the Critic network, whose output is the probability distribution of the action that the agent should take in a given state; ActorActor is used to generate strategies, and its network structure includes the following network layers: input layer, the same as the input layer of the Q network; hidden layer 1-Actor, which is a multi-layer fully connected layer, and the activation function is set to the Tanh function; output layer-Actor, the activation function is set to the softmax function to generate the action vector of the probability distribution; the Critic network is a value function network, which is used to evaluate the value of the action generated by the Actor, and its network structure includes the following network layers: input layer, the same as the input layer of the Q network, plus the action vector output by the Actor network as an additional input; hidden layer 1-Critic, which is a fully connected layer, and the activation function is set to the ReLU function; hidden layer 2-Critic, which is multi-layer; output layer-Critic, which is a single node, and no activation function is set; Set the initial weights of the Actor and Critic networks respectively and start the iterative training process; The agent performs actions based on the output of the Actor network and obtains new states and rewards. The Critic network updates its value function estimate based on the received new states and rewards. The value function is: V(s; θv)≈Q(s, a; θq), where V(s) is the value function estimate of state s, Q(s, a) is the state-action value function, and θv and θq are the parameters of the Critic network and the Q network, respectively. The Actor network uses the policy gradient algorithm to guide the policy update of the Critic network based on the action evaluation gradient provided by the Critic network. For the update of the Critic network, the TD-error algorithm is used for back propagation update parameters. The algorithm formula is as follows: t =R t+1 +γ·Q(s t+1 , a t+1 ;θ)-Q(s t , a t ;θ); where δ t is the TD-error at time step t; Rt+1 is the immediate reward received by the agent at time step t+1; γ is a discount factor between 0 and 1, which is used to balance the importance of current rewards and future potential rewards; Q(St,at;θ) is the estimate of the state-action value function for the current state st and the action at taken, and θ represents the parameters of the Q network; Q(St+1,at+1;θ) is the value function estimate of the action at+1 performed in the next state St+1; according to the TD-error, the parameters of the Q network are updated according to the following algorithm: α is the learning rate, which is a positive number between 0 and 1, and is used to control the degree to which the weights are adjusted in the direction of the gradient at each step of parameter update; θ represents the set of parameters of the Q network (also known as the Q function approximator), which determines the weights and biases of the Q network; δt is the TD-error at time step t, which is a key indicator for updating the Q value, usually defined as the difference between the immediate reward plus the future discounted reward and the current Q value; represents the gradient of the Q function with respect to the parameter θ, that is, at a given state s t and action a t The sensitivity of the Q function to small changes in its parameters θ in the case of In Actor-Critic, the advantage function provided by the Critic network is used to guide the strategy to update the Actor network: The function formula of the advantage function is: A(s t , a t )=Q(s t , a t )-V(s t ); where A(st, at) is the advantage function value of executing action at in state st; Q(st, at) is the Q value of executing action at in this state, that is, the expected cumulative return; V(st) is the value function value of state st, that is, the expected cumulative return starting from state st without considering the specific action; The above steps are repeated iteratively, allowing the Actor network to continuously update strategies and the Critic network to continuously evaluate the quality of these strategies until the model performance is stable or the predetermined training rounds are reached.
2. The method for predicting the adjustment boundary of adjustable resources of power users based on deep learning according to claim 1, characterized in that: After inputting the current operating conditions, current usage scenario information, future operating conditions and future usage scenario information of various adjustable resources of the industrial and commercial power users into the adjustable capacity boundary prediction model of various adjustable resources of the industrial and commercial power users, and predicting the adjustable capacity boundaries of various adjustable resources of the industrial and commercial power users in the current and future predetermined time periods, and before calculating the total adjustable boundaries of the adjustable resources of the industrial and commercial power users in the current and future predetermined time periods based on the power trading preference coefficients pre-analyzed by the industrial and commercial power users and the adjustable capacity boundaries of various adjustable resources of the industrial and commercial power users in the current and future predetermined time periods, the method further includes: Obtain historical transaction records and historical questionnaire data of each industrial and commercial electricity user participating in power demand response; Based on historical transaction records and historical questionnaire survey data, a dataset of feature vectors reflecting user transaction preferences is constructed. The feature vectors include: the average response degree of users during peak electricity price periods; the median of user response delay time; the correlation coefficient between the increase in electricity prices and the amount of load reduction; the price sensitivity score expressed by users in the questionnaire; and the user's willingness level for temporary adjustment of adjustable resources. Divide the dataset of feature vectors into training set and validation set; Initialize the logistic regression model, the weight vector β and the intercept term θ are initialized to zero or random decimals, use the likelihood function of logistic regression as the loss function, and select the gradient descent optimizer to minimize the loss function; Traverse the data of the training set, calculate the probability value corresponding to each data sample, and update the model parameters of the logistic regression model according to the actual label; in each iteration, calculate the gradient of the loss function with respect to the model parameters through back propagation, and then adjust the model parameters along the gradient direction to reduce the loss; stop training when the preset number of iterations is reached; Using the validation set to evaluate the performance indicators of the logistic regression model, the performance indicators include calculating accuracy, precision, recall and F1 score; and adjusting the model hyperparameters according to the evaluation results to obtain a trained logistic regression model of power trading preference; Obtaining historical transaction records and historical questionnaire survey data of the current industrial and commercial electricity users participating in power demand response; Based on the historical transaction records and historical questionnaire survey data of the industrial and commercial electricity users participating in the power demand response, and using the trained logistic regression model of power transaction preference, mining the power transaction preference indicators of the industrial and commercial electricity users, the power transaction preference indicators include: price sensitivity and power response speed; According to the preset weights of the power trading preference indicators, various power trading preference indicators are weighted and summed to obtain the power trading preference coefficient.
3. The method for predicting the adjustment boundary of adjustable resources of power users based on deep learning according to claim 1, characterized in that: The total adjustable boundary of the adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods is calculated based on the power transaction preference coefficient obtained by pre-analysis of the industrial and commercial electricity users and the adjustable capacity boundary of various adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods, including: The power transaction preference coefficient obtained by pre-analysis of the industrial and commercial power user and the adjustable capacity boundary of various adjustable resources of the industrial and commercial power user in the current and future scheduled time periods are input into the following calculation formula to calculate the total adjustable boundary T of the adjustable resources of the industrial and commercial power user in the current and future scheduled time periods: Where F(P) is the power trading preference coefficient of industrial and commercial electricity users; C t W represents the sum of the original capacity boundaries of various adjustable resources of industrial and commercial electricity users at time t; t represents the weight value of the importance of the adjustable resource at the tth time; D t It is the discount factor for the tth time, reflecting the discount of the future adjustment boundary relative to the current value.
4. The method for predicting the adjustment boundary of adjustable resources of power users based on deep learning as claimed in claim 2, characterized in that: The ratio of training set to validation set is 4:
1.
5. The method for predicting the adjustment boundary of adjustable resources of power users based on deep learning according to claim 1, characterized in that: The classification categories of the adjustable resources include: high adjustable capacity category, medium adjustable capacity category and low adjustable capacity category, among which adjustable resources with high usage frequency and low adjustable power are classified into low adjustable capacity category, adjustable resources with high usage frequency and high adjustable power, or medium usage frequency and high adjustable power, or high usage frequency and medium adjustable power are classified into medium adjustable capacity category, and adjustable resources with low usage frequency and high adjustable power are classified into high adjustable capacity category.
6. A prediction device for adjusting the adjustment boundary of adjustable resources of power users based on deep learning, characterized in that: include: A classification module, configured to classify the adjustable resources of the industrial and commercial electricity users according to the usage frequency and adjustable power of the adjustable resources of the industrial and commercial electricity users; The first acquisition module is used to acquire the classified historical data of various adjustable resources, wherein the historical data includes: historical operating conditions, and historical usage scenario information associated with the historical operating conditions; the industrial and commercial electricity users are commercial electricity users, and the historical usage scenario information includes: historical seasons, historical times, historical dates, historical weather, and historical flow of people at commercial user locations; the current usage scenario information includes: five parameters: current season, current time, current date, current weather, and current flow of people at commercial user locations; The first model training module is used to train the historical data of the classified various adjustable resources based on the first deep learning algorithm to obtain the adjustable capacity boundary prediction model of the various adjustable resources of the industrial and commercial electricity users; specifically used to: arrange the historical operating conditions in chronological order to form continuous time series data, and discretize or encode the historical usage scenario information, wherein the season is mapped into a four-dimensional vector representation, the time and date are converted into continuous features of hours and days of the week, the weather is expressed by one-hot encoding or word embedding, and the flow of people is directly used as input; The processed time series data is divided into a training set and a validation set according to a preset ratio; In the Transformer architecture, the self-attention mechanism is used to process the time series data of each step in the training set, where the vectors of query Q, key K, and value V are calculated; through the multi-head attention mechanism, these Q, K, and V vectors are passed through multiple linear transformation matrices respectively to form different attention heads; The attention weight is calculated independently for each attention head, and the correlation between each time step and all other time steps is measured through the dot product operation, and normalized into a probability distribution through the softmax function, so that the feature of each time step can be represented by a weighted average according to its correlation with the features of other time steps; The results of each attention head are concatenated and then integrated through a fully connected layer for linear transformation to obtain the final attention output, which is the weighted feature representation of the time step; this process is repeated until the multi-head attention calculation is completed for the entire time series, generating a new spatiotemporal feature sequence; The GRU network with attention mechanism is used as the basic structure. The input layer receives the spatiotemporal feature sequence extracted based on the multi-head attention mechanism. The encoder part reads and encodes the information of the input sequence time by time step, and the decoder part gradually generates the future trend prediction sequence based on the hidden state of the encoder and its own hidden state. When predicting, the decoder introduces self-attention or cross-attention mechanism based on its own internal state to refer to the prediction results generated in the past and all the historical information of the encoder in the process of generating the next time step prediction. The loss function is set to measure the difference between the predicted sequence and the true target sequence. The difference calculation formula of the loss function is: Among them, yi represents the true value, represents the predicted value, n is the sequence length; The gradient is calculated through the back-propagation algorithm, and the model parameters are updated using the Adam optimizer. The iteration continues until the loss function converges or the preset maximum number of training rounds is reached. After the training is completed, the prediction effect of the model is evaluated on the test set, the consistency of the prediction sequence and the actual observation sequence is compared, and the model parameters are adjusted accordingly, so as to obtain the adjustable capacity boundary prediction model of various adjustable resources of the industrial and commercial electricity users; the model parameters include: learning rate, number of hidden layer units and number of attention heads; The second model training module is used to train the historical data of the classified various adjustable resources based on the second deep learning algorithm to obtain the usage trend prediction model of the classified various adjustable resources; specifically used to: arrange the historical operating conditions in chronological order to form continuous time series data, and discretize or encode the historical usage scenario information to represent the current environment state of the intelligent agent; wherein the season is mapped into a four-dimensional vector representation, the time and date are converted into continuous features of hours and days of the week, the weather is expressed by one-hot encoding or word embedding, and the flow of people is directly used as input; The processed time series data is divided into a training set and a validation set according to a preset ratio; Set the set of actions that the agent can perform, including adjusting the load level, and design a reward function to quantify the effect of the agent taking a certain action. The action effect includes: energy saving degree, user satisfaction and grid stability index; the reward function is: Rt=w1*EnergySavedt-w2*UserDiscomfortt+w3*GridStabilityt; where EnergySavedt is the amount of energy saved at time step t; UserDiscomfortt is the degree of inconvenience felt by the user due to load adjustment at that moment, which is related to the change in passenger flow; GridStabilityt is an indicator reflecting the stability of the power grid; w1, w2, w3 are the weights of the corresponding items, which are used to balance the importance of different objectives; A neural network is used as an approximator of the Q function. The current state is input and the value estimate Q(s, a) corresponding to all possible actions is output to construct a Q network. The network structure of the Q network includes the following network layers: input layer, 5 features: historical season, historical time, historical date, historical weather and historical flow of people; hidden layer 1 is a fully connected layer, containing multiple nodes, and the activation function is set to ReLU; hidden layer 2 is a fully connected layer, also containing multiple nodes, and the activation function is also set to ReLU; output layer is a fully connected layer, the dimension is equal to the size of the action space, no activation function or linear activation is used; Create an experience replay buffer to store the s, a, r, s′ tuples generated during the interaction between the agent and the environment, which are the old state, action, reward and new state respectively; The agent selects the action with the highest estimated value according to the preset ε-greedy strategy and randomly selects actions to explore unknown areas. It samples a batch of data from the experience replay buffer, uses these samples to update the Q network, and approximates the optimal Q function by minimizing the Bellman error; the Bellman error is the difference between the target Q value and the current Q value. The agent continuously accumulates experience and updates the Q network until convergence or the preset number of learning steps is reached. Define the Actor network and the Critic network, whose output is the probability distribution of the action that the agent should take in a given state; ActorActor is used to generate strategies, and its network structure includes the following network layers: input layer, the same as the input layer of the Q network; hidden layer 1-Actor, which is a multi-layer fully connected layer, and the activation function is set to the Tanh function; output layer-Actor, the activation function is set to the softmax function to generate the action vector of the probability distribution; the Critic network is a value function network, which is used to evaluate the value of the action generated by the Actor, and its network structure includes the following network layers: input layer, the same as the input layer of the Q network, plus the action vector output by the Actor network as an additional input; hidden layer 1-Critic, which is a fully connected layer, and the activation function is set to the ReLU function; hidden layer 2-Critic, which is multi-layer; output layer-Critic, which is a single node, and no activation function is set; Set the initial weights of the Actor and Critic networks respectively and start the iterative training process; The agent performs actions based on the output of the Actor network and obtains new states and rewards. The Critic network updates its value function estimate based on the received new states and rewards. The value function is: V(s; θv)≈Q(s, a; θq), where V(s) is the value function estimate of state s, Q(s, a) is the state-action value function, and θv and θq are the parameters of the Critic network and the Q network, respectively. The Actor network uses the policy gradient algorithm to guide the policy update of the Critic network based on the action evaluation gradient provided by the Critic network. For the update of the Critic network, the TD-error algorithm is used for back propagation update parameters. The algorithm formula is as follows: t =R t+1 +γ·Q(s t+1 , a t+1 ;θ)-Q(s t , a t ; θ); where δt is the TD-error at time step t; Rt+1 is the immediate reward received by the agent at time step t+1; γ is a discount factor between 0 and 1, which is used to balance the importance of current rewards and future potential rewards; Q(St,at;θ) is the estimate of the state-action value function for the current state st and the action at taken, and θ represents the parameters of the Q network; Q(St+1,at+1;θ) is the value function estimate of the action at+1 performed in the next state St+1; based on the TD-error, the parameters of the Q network are updated according to the following algorithm: α is the learning rate, which is a positive number between 0 and 1, and is used to control the degree to which the weights are adjusted in the direction of the gradient at each step of parameter update; θ represents the set of parameters of the Q network (also called the Q function approximator), which determines the weights and biases of the Q network; δ t is the TD-error at time step t, which is the key indicator for updating the Q value and is usually defined as the difference between the immediate reward plus the future discounted reward and the current Q value; represents the gradient of the Q function with respect to the parameter θ, that is, at a given state s t and action a t The sensitivity of the Q function to small changes in its parameters θ in the case of In Actor-Critic, the advantage function provided by the Critic network is used to guide the strategy to update the Actor network: The function formula of the advantage function is: A(s t , a t )=Q(s t , a t )-V(s t ); where A(st, at) is the advantage function value of executing action at in state st; Q(st, at) is the Q value of executing action at in this state, that is, the expected cumulative return; V(st) is the value function value of state st, that is, the expected cumulative return starting from state st without considering the specific action; Repeat the above steps iteratively, allowing the Actor network to continuously update strategies while the Critic network continuously evaluates the quality of these strategies until the model performance is stable or the predetermined training rounds are reached; The second acquisition module is used to obtain the current operating conditions and current usage scenario information of various adjustable resources of the industrial and commercial electricity users, and input them into the usage trend prediction model of the classified various adjustable resources to predict the future operating conditions and future usage scenario information of various adjustable resources of the industrial and commercial electricity users within a future predetermined time period; The first prediction module is used to input the current operating conditions, current usage scenario information, future operating conditions and future usage scenario information of various adjustable resources of the industrial and commercial electricity users into the adjustable capacity boundary prediction model of various adjustable resources of the industrial and commercial electricity users, and predict the adjustable capacity boundary of various adjustable resources of the industrial and commercial electricity users in the current and future predetermined time periods; The second prediction module is used to calculate the total adjustable boundaries of the adjustable resources of the industrial and commercial electricity users in the current and future scheduled time periods based on the power trading preference coefficients obtained in advance by analysis of the industrial and commercial electricity users and the adjustable capacity boundaries of various adjustable resources of the industrial and commercial electricity users in the current and future scheduled time periods.
7. A prediction device for adjusting the boundary of adjustable resources of power users based on deep learning, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the deep learning-based prediction method for the adjustment boundary of the adjustable resource of the power user as described in any one of claims 1 to 5.
Citation Information
Patent Citations
SQL statement construction method based on actor-reviewer network
CN110059100A
Industrial Internet-of-Things edge resource intelligent scheduling system and method based on deep learning
CN111245950A