Power transaction decision generation method and device, medium and equipment

By obtaining historical transaction data and market information, and using deep learning models to generate power transaction coefficients, it solves the problem of unreasonable decision-making by small-scale power generators in distributed power transactions and improves the accuracy and profitability of transactions.

CN118537164APending Publication Date: 2024-08-23KUNMING POWER EXCHANGE CENT CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410562573.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-08
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In distributed power trading, managers of small-scale power generators such as household rooftop photovoltaic power generation lack professional knowledge in power trading, resulting in unreasonable and inaccurate power trading decisions.

Method used

By obtaining the marginal clearing price of historical bidding transactions, transaction power, market power supply and demand ratio and the monthly remaining power generation of the target power generator, the pre-trained target deep learning model is used to generate power trading coefficients, and then formulate reasonable and accurate trading strategies.

Benefits of technology

It improves the rationality and accuracy of power trading decisions, helps generators increase profits in the distributed power market, lowers participation thresholds, and promotes the healthy development of the market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537164A
    Figure CN118537164A
Patent Text Reader

Abstract

The invention discloses a power transaction decision generation method and device, a medium and equipment, and the method comprises the steps: obtaining the marginal clearing price of each historical bidding transaction and the transaction electric quantity of a target power generation party in each historical bidding transaction based on the transaction information of a plurality of historical bidding transactions; obtaining the current power supply-demand ratio of the market and the monthly residual power generation amount of the target power generation party; based on each marginal clearing price, each transaction electric quantity of a target power generation party, an electric quantity supply-demand ratio and a monthly residual power generation amount of the target power generation party, generating a target power transaction coefficient by using a target deep learning model obtained by pre-training; and generating a target transaction strategy based on the target power transaction coefficient. The method can reasonably and accurately generate the transaction decision, and facilitates the improvement of the earnings of the power generation party.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of power trading data processing, and in particular to a method, device, medium and equipment for generating power trading decisions. Background Art

[0002] Distributed power generation refers to small and medium-sized power generation facilities that are connected to the distribution network and consume power nearby. Compared with centralized power generation and supply, distributed power generation is located at or adjacent to the power consumption site, and energy production and consumption are completed nearby, which has the advantages of reducing power loss, high energy utilization rate, and low pollution emissions. Distributed power trading methods are usually used for distributed power generation. Specifically, distributed power trading means that distributed power generation projects and nearby power users in the distribution network directly trade power through bidding. Distributed power trading can promote the decentralization of energy production and consumption, enable more energy producers and consumers to participate, enhance market competitiveness, break the monopoly characteristics of the power industry, and give play to the decisive role of the market in resource allocation.

[0003] However, in the existing distributed electricity trading process, the managers of small-scale power generators such as household rooftop photovoltaic power generation are generally not professionals in the power industry, do not have professional knowledge of electricity trading, and lack guidance when making quotations, which leads to the problem that the electricity trading decisions made are not reasonable and accurate. Summary of the invention

[0004] In view of this, the present invention provides a method, device, medium and equipment for generating power trading decisions, the main purpose of which is to solve the problem that the current formulation or generation of power trading decisions is not reasonable and accurate enough.

[0005] To solve the above problems, the present application provides a method for generating power trading decisions, comprising:

[0006] Based on the transaction information of several historical bidding transactions, the marginal clearing price of each historical bidding transaction and the transaction power of the target power generation party in each historical bidding transaction are obtained;

[0007] Obtain the current electricity supply and demand ratio in the market, as well as the monthly remaining power generation of the target power generator;

[0008] Based on the marginal clearing prices, the transaction power of the target power generation party, the power supply and demand ratio, and the monthly surplus power generation of the target power generation party, a target power transaction coefficient is generated using a pre-trained target deep learning model;

[0009] A target trading strategy is generated based on the target power trading coefficient.

[0010] In order to solve the above problems, the present application provides a power trading decision-making device, comprising:

[0011] The first acquisition module is used to acquire the marginal clearing price of each historical bidding transaction and the transaction quantity of the target power generation party in each historical bidding transaction based on the transaction information of a plurality of historical bidding transactions;

[0012] The second acquisition module is used to obtain the current power supply and demand ratio in the market and the monthly remaining power generation of the target power generator;

[0013] A trading coefficient generation module is used to generate a target power trading coefficient based on the marginal clearing prices, the transaction quantities of the target power generators, the power supply and demand ratio, and the monthly surplus power generation of the target power generators, using a pre-trained target deep learning model;

[0014] A decision generation module is used to generate a target trading strategy based on the target power trading coefficient.

[0015] In order to solve the above problems, the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned methods for generating power trading decisions are implemented.

[0016] To solve the above problems, the present application provides an electronic device, comprising at least a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above-mentioned methods for generating power trading decisions when executing the computer program on the memory.

[0017] The power trading decision generation method, device, medium and equipment in the present application obtain the marginal clearing price of each historical bidding transaction, the transaction power of the target power generation party in each historical bidding transaction, the current power supply and demand ratio of the market, and the monthly remaining power generation of the target power generation party, and then use the above-mentioned acquired data as the input of the target deep learning model, so as to reasonably and accurately generate the target power trading coefficient of the target power generation party by using the target deep learning model, and then the target trading decision can be reasonably and accurately generated based on the target power trading coefficient.

[0018] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0020] Figure 1 This is a flow chart of a method for generating power trading decisions according to an embodiment of the present application;

[0021] Figure 2 This is an architecture diagram of the target deep learning Q network model in the embodiment of the present application;

[0022] Figure 3 This is a structural block diagram of a power trading decision-making device according to another embodiment of the present application;

[0023] Figure 4 This is a structural block diagram of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION

[0024] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0025] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0026] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0027] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0028] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0029] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0030] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0031] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0032] The present application embodiment provides a method for generating a power trading decision, which can be applied to electronic devices such as terminals and servers. Figure 1 As shown, the specific steps include:

[0033] Step S101, based on the transaction information of several historical bidding transactions, obtaining the marginal clearing price of each historical bidding transaction and the transaction amount of the target power generation party in each historical bidding transaction;

[0034] In this step, the transaction information of the past 5 historical bidding transactions can be obtained, or the transaction information of the past 10 historical bidding transactions can be obtained. The number of historical bidding transactions obtained can be adjusted according to actual needs. Taking the transaction information of the past 6 historical bidding transactions as an example, when obtaining the marginal clearing price of each historical bidding transaction, the declared price difference of each buyer and seller can be determined based on the transaction information of each historical bidding transaction, that is, the declared price difference = the declared price of the power buyer / demand party-the declared price of the power seller / power generator. Then, the buyer and seller corresponding to the minimum declared price difference are determined as the target buyer and seller; finally, the marginal clearing price is determined based on the declared electricity price of the power buyer and the declared electricity price of the power generator in the target buyer and seller. In this step, the power generator also refers to the power seller, and the power buyer can also be understood as the power demander. After determining the declared electricity price of the power buyer and the declared electricity price of the power generator in the target buyer and seller, the declared electricity price of the power buyer and the declared electricity price of the power generator can be averaged to obtain the marginal clearing price of this historical bidding transaction. That is, the effective declared electricity and price of both parties can be used to form the price difference between the buyer and seller. Then the transaction is carried out in order from large to small price difference to determine the transaction volume and transaction price. If the price difference is negative, the transaction cannot be completed. Finally, the transaction price is determined based on the last transaction matching pair between the power buyer and the power seller, and the average price of the declared prices of the demand party (power buyer) and the power generation party (power seller) of the transaction is used as the marginal clearing price.

[0035] Step S102: Obtain the current market power supply and demand ratio R and the target power generation party's monthly remaining power generation Q l ;

[0036] In this step, since the power trading agency will publish the total monthly electricity demand in the distribution network and the remaining maximum power generation capacity of each power generator before the centralized bidding transaction is carried out, the remaining maximum power generation capacity Q of each power generator can be obtained. l , and at the same time obtain the current total market demand Q from the market public information D ; Then determine the total supply power Q based on the remaining maximum power generation of each power generator S ; Among them, the total power supply Q S The calculation formula is as follows:

[0037]

[0038] Where i represents the number of power generators.

[0039] After obtaining the total power supply Q S Afterwards, based on the total supply power Q S And the current total market demand Q D , determine the current power supply and demand ratio R in the market; the power supply and demand ratio calculation formula is as follows:

[0040]

[0041] Step S103, based on the marginal clearing prices, the traded electricity of the target power generation party, the electricity supply-demand ratio, and the monthly surplus power generation of the target power generation party, a target power transaction coefficient is generated using a pre-trained target deep learning model;

[0042] In the specific implementation process of this step, taking the transaction information of the past six historical auction transactions as an example, each marginal clearing price can be expressed as: where p i represents the marginal clearing price of the i-th / 6th historical bidding transaction. At the same time, the transaction power of each target power generation party can be expressed as: where q i Indicates the transaction volume of the ith / sixth historical bidding transaction. Therefore, the above-mentioned marginal clearing prices, transaction volumes, power supply and demand ratios, and the monthly surplus power generation of the target power generator can be used as state s i Input to the target deep learning model, and use the target deep learning model to Generate and state i The corresponding action a i, that is, generating the target power trading coefficient, laying the foundation for the subsequent reasonable and accurate generation of target trading decisions based on the target power trading coefficient.

[0043] Step S104: generating a target trading strategy based on the target power trading coefficient.

[0044] In this step, after generating the target power trading coefficient, the declared power quantity and / or declared electricity price can be calculated based on the power quantity coefficient and / or electricity price coefficient in the target power trading coefficient, and then the target trading decision can be determined based on the declared power quantity and / or declared electricity price.

[0045] That is, the power coefficient k in the target power transaction coefficient can be q , using the predetermined power calculation formula, calculate the target power generation party's declared power Q b ; The power calculation formula is:

[0046] Q b =k q ×Q l (3)

[0047] Among them, Q l k is the target power generation party’s monthly remaining trading capacity / monthly remaining power generation; q It is the electricity coefficient, ranging from {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}, including 10 values, indicating that the electricity reported by the power generation party is greater than or equal to 0 and does not exceed the monthly remaining trading capacity of the month.

[0048] Based on the electricity price coefficient k in the target power transaction coefficient p , using the predetermined electricity price calculation formula, calculate the target power generation party's declared electricity price; the electricity price calculation formula is:

[0049] p b =k p ×C a (4)

[0050] Among them, C a is the average marginal power generation cost of the target power generator in that month; k p It is the electricity price coefficient, ranging from {1.0, 1.1, 1.2, 1.3, 1.4}, including 4 values, indicating that the electricity price declared by the power generation party is greater than or equal to the average marginal power generation cost, and does not exceed 1.4 times the average marginal power generation cost.

[0051] The target transaction strategy is generated based on the reported power quantity and the reported power price

[0052] The method for generating power trading decisions in the present application obtains the marginal clearing price of each historical bidding transaction, the transaction power of the target power generation party in each historical bidding transaction, the current power supply and demand ratio in the market, and the monthly remaining power generation of the target power generation party, and then uses the above-mentioned acquired data as the input of the target deep learning model, so as to use the target deep learning model to reasonably and accurately generate the target power trading coefficient of the target power generation party, and then the target trading decision can be reasonably and accurately generated based on the target power trading coefficient.

[0053] Another embodiment of the present application provides a method for generating power trading decisions. In this embodiment, the target deep learning model is a target deep learning Q network model, that is, a target DQN network model (full name: Deep Q-network). The historical transaction volume, historical transaction electricity price, market power supply and demand ratio, and remaining transaction capacity are used as the state input s of the DQN algorithm. i , and then the Q network is based on s i Output action a i , according to each action a i The Q value Q(s i ,a1), take the action with the largest Q value, calculate the electricity volume and electricity price reported for the transaction, and maximize the revenue of the power generation party. The power transaction decision-making method in this embodiment includes the following steps:

[0054] Step S201, performing model training on the initial deep learning Q network model to obtain the target deep learning Q network model;

[0055] In this embodiment, the model architecture of the target deep learning Q network model (target DQN network model) can be as follows: Figure 2 As shown, it includes: a target first Q network model (i.e., an evaluation Q network) and a target second Q network model (i.e., a target Q network) with the same model structure and different model parameters. The two Q networks respectively include an input layer, a hidden layer, and an output layer. The input layer of the Q network is processed using a 1-dimensional CNN. Among them, the model parameters of the target second Q network model are obtained by copying the historical model parameters of the target first Q network model based on a predetermined time step. In this embodiment, during the DQN training process, the first Q network model (i.e., the evaluation Q network) is responsible for generating a predicted Q value (i.e., a first value score), while the second Q network model (i.e., the target Q network) is used to generate a target Q value (i.e., a second value score), so as to calculate the loss value Loss of the first Q network model based on the target Q value (second value score), thereby training the first Q network model to obtain a target first Q network model, so as to facilitate the subsequent use of the target first Q network model to generate the target power trading coefficient of the target power generation party.

[0056] Specifically, the training process of the target deep learning Q network model in this step is as follows:

[0057] Step S201-1, using the experience playback method to obtain a number of sample data, each of which includes: a current state sample and a next state sample corresponding to the current state sample; the state sample includes: a number of sample marginal clearing prices, a number of sample transaction quantities of power generation parties, a sample power supply and demand ratio, and a sample monthly remaining power generation of a sample power generation party;

[0058] In this step, the training data / sample data can be obtained through the experience playback mechanism, that is, a number of training samples / sample data are obtained by interacting with the environment. Each training sample / sample data can be expressed as [s i ,a i ,r i ,s i+1 ], where s i As the input of the first Q network model, the output of the first Q network model is the state s i Take different actions a i The Q value Q(s i ,a i ). Q(s i ,a i ) refers to action a i The value score can be understood as the value of i Take action a i After that, the expected value of the reward that can be obtained. In this embodiment, the current state sample s in the sample data can be first i Input into the initial deep learning Q network model, the initial first Q network model, and then output s i All actions under a i Then, an action a is selected according to a predetermined selection strategy (e.g., epsilon greedy selection method or random selection method). i And input it into the environment to obtain the updated state / next state sample s i+1 .

[0059] Step S201-2, using the initial first Q network model in the initial deep learning Q network model, according to the current state sample s in the sample data i , generate several initial first power trading coefficients a i , and the initial first value score Q (i.e., predicted Q value) of each initial first power trading coefficient;

[0060] In this step, the first power transaction coefficient a i , that is, action a i Including electricity coefficient and electricity price coefficient.

[0061] Step S201-3, using the initial second Q network model in the initial deep learning Q network model, according to the next state sample s in the sample data i+1 , generate several initial second power trading coefficients a i+1 and the initial second value score Q′ (i.e., the state value Q′) corresponding to each initial second power trading coefficient, so as to determine the initial reference value score Q corresponding to each initial first value score Q at least based on each initial second value score Q′ target (i.e. target Q value); target Q value / reference value score Q in this step target Can be understood as: i In the state, take i Rewards i Add Q′(s i+1 ,a i+1 )’s maximum value.

[0062] Q target =γmax(Q′(s i+1 ,a i+1 ))+r i (5)

[0063] Among them, γ is the discount factor used to measure the value of future rewards in reinforcement learning; r i Indicates i The action a output by the first Q network model in the state i The reward value of max(Q′(s i+1 ,a i+1 )) means s i+1 In this state, the second Q network model outputs each action a i+1 The largest Q′ value among the Q′.

[0064] The reward value r in this step i is the profit obtained by the power generation party in this monthly centralized bidding transaction. i , the corresponding profit can be calculated as a i The corresponding reward r i The reward value calculation formula is:

[0065] r i =Q t ×p t -C (6)

[0066] Among them, Q t is the transaction volume of power generation in the monthly centralized bidding transaction; tis the transaction price of the power generation party in the monthly centralized bidding transaction; C is the power generation cost of the power generation party in the monthly centralized bidding transaction (the cost is known). That is, for any action / power transaction coefficient a i , can be based on this a i The power coefficient in the calculation formula is used to calculate the transaction power Q t ; and, based on this a o The electricity price coefficient in the calculation formula is used to calculate the transaction price p t , and then according to the transaction volume Q t And the transaction price p t , calculate the a i Corresponding profit value r i , thus obtaining the reward value r i .

[0067] In this embodiment, the optimization goal of the DQN algorithm is: in each monthly centralized bidding transaction, select the most appropriate action (electricity coefficient and electricity price coefficient) to obtain the highest reward value (profit of the power generator), and the formula is as follows:

[0068]

[0069] Step S201-4, based on each of the initial first value scores and the initial reference value scores corresponding to each of the initial first value scores, adjusting the model parameters of the initial first Q network model to obtain the current first Q network model, and based on a predetermined training time interval, copying the historical model parameters of the first Q network model to the second Q network model to obtain the current second Q network model; until each of the current first value scores generated based on the current first Q network model and the current reference value scores corresponding to each of the current first value scores meet a predetermined training stop condition, obtaining the target first Q network model based on the current first Q network model;

[0070] In this step, the mean square error can be calculated based on each initial first value score and the initial reference value score corresponding to each initial first value score to obtain the loss value Loss, so as to adjust the model parameters of the initial first Q network model according to the loss value Loss to obtain the current first Q network model. The calculation formula of the loss value Loss is:

[0071]

[0072] Among them, Q represents the initial first value score, Q target Indicates reference value score / target value score.

[0073] In this embodiment, after calculating the Loss value, the parameters of the Q network are updated using the stochastic gradient descent method, and the parameters of the target network remain unchanged; then after each T steps of training the first Q network model, the parameters of the first Q network model are copied to the second Q network model target network; the above steps are executed repeatedly until the model converges to obtain the target first Q network model and the target second Q network model, that is, the target Q network model is obtained, and the target first Q network model in the target Q network model can be used subsequently to reasonably and accurately predict / generate the target power trading coefficient.

[0074] Step S202, obtaining transaction information of several historical bidding transactions, determining the bid price difference of each buyer and seller based on the transaction information of each historical bidding transaction; determining the buyer and seller corresponding to the minimum bid price difference as the target buyer and seller; determining the marginal clearing price based on the bid electricity price of the power purchaser and the bid electricity price of the power generation party among the target buyer and seller, so as to obtain the marginal clearing price of each historical bidding transaction;

[0075] Step S203, obtaining the remaining maximum power generation of each power generator; determining the total power supply based on the remaining maximum power generation of each power generator; determining the current power supply and demand ratio of the market based on the total power supply and the current total power demand of the market;

[0076] Step S204, based on the marginal clearing prices, the traded electricity of the target power generator, the electricity supply-demand ratio, and the monthly surplus electricity generation of the target power generator, a target first Q network model in the target deep learning model is used to generate a target electricity trading coefficient;

[0077] Step S205, based on the electricity coefficient in the target power trading coefficient, using a predetermined electricity calculation formula, calculate the declared electricity quantity of the target power generation party; based on the electricity price coefficient in the target power trading coefficient, using a predetermined electricity price calculation formula, calculate the declared electricity price of the target power generation party; generate the target trading strategy based on the declared electricity quantity and the declared electricity price.

[0078] The DQN network used in this application is the key to achieve the prediction / generation of power trading coefficients in this application. The DQN network is designed to improve the stability of the learning process. In DQN, in addition to the main Q network (first Q network), there is also a network with the same structure but different parameters, called the target network (second Q network).

[0079] The parameters of the target network are initially copied from the Q network, but in the subsequent learning process, its update speed will be slower than that of the Q network. Specifically, the weights of the target network will be copied and updated from the Q network after a certain time step. The purpose of this is to make the output of the target network (i.e., the target Q value) relatively stable and reduce its fluctuation over time.

[0080] During the training process of DQN, the Q network is responsible for generating the predicted Q value (the first value score Q), while the target network is used to generate the target Q value. The target Q value is based on the target network's prediction of the next state s. i+1 Due to the stability of the target network, it provides a relatively fixed reference point, helping the prediction Q network (first Q network) to learn how to improve its predictions more effectively.

[0081] The target network mechanism helps prevent overfitting and unstable behavior during training. Without the target network, the Q network's predictions and target values ​​change frequently with each update, which can cause the learning process to become unstable. The target network smooths these changes, making the learning process smoother, thereby improving the performance and generalization ability of the algorithm.

[0082] In this application, the core idea of ​​the experience replay mechanism is to store the experience data generated by the agent during the exploration of the environment, and reuse this data in a random sampling manner in the subsequent training process.

[0083] The main purpose of experience replay is to break the temporal correlation between data and improve the stability and efficiency of learning. Without experience replay, the data generated by the agent is often continuous and highly correlated, which can cause the gradient update direction to change frequently during the learning process, making the learning unstable. With experience replay, the agent can use historical data that is "decoupled" in time and can therefore provide more diverse and extensive experience, helping the agent to better generalize to different states and situations.

[0084] In addition, in this application, by adopting experience replay, it helps to prevent catastrophic forgetting, which is a common problem in the learning process of neural networks, that is, the network forgets old knowledge while learning new knowledge. By replaying past experiences, the agent can continuously review and consolidate previously learned knowledge, thereby maintaining long-term memory.

[0085] In practical applications, experience replay is usually implemented through a data structure called a replay buffer. Whenever the agent interacts with the environment and generates new experience, this experience (including the current state, actions taken, rewards obtained, and next state) will be stored in the memory. When training a neural network, instead of directly using the latest experience data, a batch of past experiences are randomly extracted from the memory for learning. This method allows the agent to learn from a series of discontinuous experiences, thereby improving the robustness and efficiency of the learning process.

[0086] Based on the above embodiments, the power trading decision generation method in this application is explained and illustrated in combination with specific application scenarios. Specifically, it includes the following process:

[0087] Step 1: Train the target deep learning Q network model.

[0088] 1. Obtain training data through the experience replay mechanism: obtain a series of training samples by interacting with the environment [s i ,a i ,r i ,s i+1 ], as the training data of the Q network (first Q network model) and the target network (second Q network model), these training data are stored in the memory bank, and a batch of training samples are randomly extracted from the memory bank as the input data of the neural network during training. Among them, is a vector containing the marginal clearing prices of the centralized auction market in the past is a vector that contains the past several centralized bidding market transaction volumes: R represents the ratio of electricity supply to demand. l Indicates the monthly remaining power generation of the power generator.

[0089] 2. Calculate the loss:

[0090] (1) Calculate the predicted Q value and target Q value Q target :The output of the Q network (first Q network) is the predicted Q value Q(s i ,a i ). The target network (second Q network model) outputs s i+1 The state value Q′(s i+1 ,a i+1 ), the target Q value is equal to s i Take action a in state i Rewards i Add Q′(s i+1 ,a i+1 ):

[0091] Q target =γmax(Q′(s i+1 ,a i+1 ))+r i

[0092] where γ is a discount factor used to measure the value of future rewards in reinforcement learning.

[0093] In this step, action a i Indicates the power transaction coefficient, including the power coefficient kq and the electricity price coefficient k p , so action a i is a two-dimensional vector, i.e. i =(k p ,k q ).

[0094] (2) Calculate the Loss value: The calculation method is to calculate Q and Q target The mean square error is:

[0095]

[0096] 3. Train the Q network (first Q network model) through the Loss value, use the stochastic gradient descent method to update the parameters of the Q network (first Q network model), and keep the parameters of the target network unchanged.

[0097] 4. After every T steps of training of the Q network (first Q network model), the parameters of the Q network (first Q network model) are copied to the target network (second Q network model).

[0098] 5. Repeat the above steps until the model converges and obtains the target deep learning Q network model.

[0099] Step 2: A DQN-based power generation bidding algorithm model (target deep learning Q network model) that can be used in the production environment of a distributed power market trading platform is obtained, that is, the Q network in the target deep learning Q network model (target first Q network model). It is deployed in the distributed power market trading platform as a power generation bidding suggestion module, and provides bidding suggestions for power generation parties at each monthly centralized bidding transaction quotation. The specific process is as follows:

[0100] 1. The power generation user logs in to the distributed power market trading platform;

[0101] 2. Get the Q network input state parameters and 4 state parameters;

[0102] (a) The marginal clearing price of the past six auctions Obtained by querying the system database;

[0103] (b) The electricity volume traded in the centralized bidding market in the past six times Obtained by querying the system database;

[0104] (c) Market electricity supply and demand ratio R:

[0105] ① Calculate the total power generation capacity of all power generators:

[0106]

[0107] ② Query the total electricity demand Q from the public transaction information released by the power trading agency D ,Calculate the power supply and demand ratio:

[0108]

[0109] (d) Monthly maximum remaining generating capacity (monthly maximum remaining generating capacity) Q l : It can be obtained by querying the system database;

[0110] (3) Input the above four state parameters into the trained Q network (target first Q network model), obtain the Q value of each action (candidate power trading coefficient), and determine the action with the largest Q value as the target action a i =(k p ,k q ), thereby obtaining the target electricity trading coefficient.

[0111] (4) Based on the electricity price coefficient k in the target power transaction coefficient p and the electric power coefficient k q , calculate the recommended declared electricity volume and declared electricity price of the power generator in this transaction:

[0112] Q b =k q ×Q l

[0113] p b =k p ×C a

[0114] (5) The power generator can submit the recommended electricity quantity and electricity price calculated by the DQN algorithm, or further adjust the electricity quantity and electricity price according to the specific situation and then submit the report.

[0115] The method in this embodiment defines the three elements of the reinforcement learning algorithm according to the distributed power market scenario: state, action, and reward, and establishes a simulation environment according to the marginal clearing rules of monthly centralized bidding transactions, so that the DQN algorithm can be pre-trained in the simulation environment and directly deployed in the production environment after training, which greatly reduces the time cost and technical difficulty of model training.

[0116] During the DQN algorithm training process, the target network and experience replay mechanism are used to improve the stability and efficiency of training. The target network provides a stable learning target by slowing down parameter updates, reducing oscillations during the learning process. The experience replay mechanism breaks the temporal correlation between data by randomly sampling historical experience data for training, enhances the generalization ability of the agent to the environment, and effectively avoids overfitting. The combination of these two mechanisms enables DQN to effectively handle complex problems with a large state space.

[0117] Because, in the distributed power market, the managers of power generation parties are generally not professionals in the power industry, do not have professional knowledge of power trading, and lack guidance when quoting. If the traditional cost-plus-based quotation method is used, the market supply and demand situation cannot be taken into account, and it can only ensure that the power generation party does not lose money, but cannot guarantee a higher profit. Therefore, by training the target DQN model using the method in this application, and predicting / generating the electricity coefficient and electricity price coefficient based on the target DQN model, the declared electricity quantity and declared electricity price can be determined based on the electricity coefficient and electricity price coefficient, thereby generating a trading decision, which can increase the income of power generation parties in the distributed power market, lower the threshold for participating in distributed power transactions, encourage more enterprises and individuals to join the distributed power market, and promote the development of the distributed power market and the popularization of distributed power generation projects.

[0118] Another embodiment of the present application provides a power trading decision-making device, such as Figure 3 As shown, including:

[0119] The first acquisition module 11 is used to acquire the marginal clearing price of each historical bidding transaction and the transaction quantity of the target power generation party in each historical bidding transaction based on the transaction information of a plurality of historical bidding transactions;

[0120] The second acquisition module 12 is used to obtain the current power supply and demand ratio in the market and the monthly remaining power generation of the target power generator;

[0121] The trading coefficient generating module 13 is used to generate a target power trading coefficient based on the marginal clearing prices, the traded power of the target power generation party, the power supply and demand ratio, and the monthly surplus power generation of the target power generation party using the pre-trained target deep learning model;

[0122] The decision generation module 14 is used to generate a target trading strategy based on the target power trading coefficient.

[0123] In the specific implementation process of this embodiment, the first acquisition module is specifically used to: determine the declared price difference of each buyer and seller based on the transaction information of each historical bidding transaction; determine the buyers and sellers corresponding to the minimum declared price difference as the target buyers and sellers; determine the marginal clearing price based on the declared electricity price of the electricity buyer and the declared electricity price of the power generator among the target buyers and sellers, so as to obtain the marginal clearing price of each historical bidding transaction.

[0124] In the specific implementation process of this embodiment, the second acquisition module is specifically used to: obtain the remaining maximum power generation of each power generator; determine the total supply power based on the remaining maximum power generation of each power generator; and determine the current power supply and demand ratio of the market based on the total supply power and the current total power demand of the market.

[0125] During the specific implementation of this embodiment, the target deep learning model is a target deep learning Q network model; the trading coefficient generation module is specifically used to: based on each of the marginal clearing prices, the transaction power of the target power generation party, the power supply and demand ratio and the monthly surplus power generation of the target power generation party, using the pre-trained target deep learning Q network model, generate a number of candidate power trading coefficients and value scores corresponding to each candidate power trading coefficient, each of the candidate power trading coefficients includes a power coefficient and an electricity price coefficient; determine the candidate power trading coefficient with the highest value score from each candidate power trading coefficient as the target power trading coefficient.

[0126] In the specific implementation process of this embodiment, the decision generation module is specifically used to: calculate the declared electricity quantity of the target power generation party based on the electricity quantity coefficient in the target power trading coefficient by using a predetermined electricity quantity calculation formula; calculate the declared electricity price of the target power generation party based on the electricity price coefficient in the target power trading coefficient by using a predetermined electricity price calculation formula; generate the target trading strategy based on the declared electricity quantity and the declared electricity price.

[0127] In the specific implementation process of this embodiment, the target deep learning Q network model includes: a target first Q network model and a target second Q network model with the same model structure and different model parameters; wherein the model parameters of the target second Q network model are copied from the historical model parameters of the target first Q network model based on a predetermined time step.

[0128] In the specific implementation process of this embodiment, the power trading decision generation device also includes a training module, which is used to: before generating the target power trading coefficient, perform model training on the initial deep learning Q network model to obtain the target deep learning Q network model, and the training module is specifically used to:

[0129] A number of sample data are obtained by using an experience playback method, each of which includes: a current state sample, an action sample under the current state sample, a reward value, and a next state sample corresponding to the current state sample; the state sample includes: a number of sample marginal clearing prices, a number of sample transaction quantities of power generation parties, a sample power supply and demand ratio, and a sample monthly remaining power generation of a sample power generation party;

[0130] Using the initial first Q network model in the initial deep learning Q network model, according to the current state sample in the sample data, a number of initial first power trading coefficients and initial first value scores of the initial first power trading coefficients are generated;

[0131] Using the initial second Q network model in the initial deep learning Q network model, according to the next state sample in the sample data, a number of initial second power trading coefficients and initial second value scores corresponding to each initial second power trading coefficient are generated, so as to determine an initial reference value score corresponding to each initial first value score at least based on each initial second value score;

[0132] Based on each of the initial first value scores and the initial reference value scores corresponding to each of the initial first value scores, the model parameters of the initial first Q network model are adjusted to obtain the current first Q network model, and based on a predetermined training time interval, the historical model parameters of the first Q network model are copied to the second Q network model to obtain the current second Q network model; until each current first value score generated based on the current first Q network model and the current reference value score corresponding to each current first value score meet a predetermined training stop condition, the target first Q network model is obtained based on the current first Q network model.

[0133] A power trading decision generating device in this embodiment obtains the marginal clearing price of each historical bidding transaction, the transaction power of the target power generation party in each historical bidding transaction, the current power supply and demand ratio in the market, and the monthly remaining power generation of the target power generation party, and then uses the above-obtained data as the input of the target deep learning model, so as to use the target deep learning model to reasonably and accurately generate the target power trading coefficient of the target power generation party, and then can reasonably and accurately generate the target trading decision based on the target power trading coefficient.

[0134] Another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented:

[0135] Step 1: Based on the transaction information of several historical bidding transactions, obtain the marginal clearing price of each historical bidding transaction and the transaction power of the target power generation party in each historical bidding transaction;

[0136] Step 2: Obtain the current electricity supply and demand ratio in the market and the monthly remaining power generation of the target power generator;

[0137] Step 3: Based on the marginal clearing prices, the transaction power of the target power generation party, the power supply and demand ratio, and the monthly surplus power generation of the target power generation party, the target power transaction coefficient is generated by using the pre-trained target deep learning model;

[0138] Step 4: Generate a target trading strategy based on the target power trading coefficient.

[0139] The specific implementation process of the above method steps can be found in the embodiments of any of the above-mentioned power trading decision-making methods, and this embodiment will not be repeated here.

[0140] The storage medium in the present application obtains the marginal clearing price of each historical bidding transaction, the transaction electricity of the target power generation party in each historical bidding transaction, the current electricity supply and demand ratio in the market, and the monthly remaining power generation of the target power generation party, and then uses the above-obtained data as the input of the target deep learning model, so as to use the target deep learning model to reasonably and accurately generate the target power trading coefficient of the target power generation party, and then the target trading decision can be reasonably and accurately generated based on the target power trading coefficient.

[0141] Another embodiment of the present application provides an electronic device, such as Figure 4 As shown, at least a memory 1 and a processor 2 are included, the memory 1 stores a computer program, and the processor 2 implements the following method steps when executing the computer program on the memory 1:

[0142] Step 1: Based on the transaction information of several historical bidding transactions, obtain the marginal clearing price of each historical bidding transaction and the transaction power of the target power generation party in each historical bidding transaction;

[0143] Step 2: Obtain the current electricity supply and demand ratio in the market and the monthly remaining power generation of the target power generator;

[0144] Step 3: Based on the marginal clearing prices, the transaction power of the target power generation party, the power supply and demand ratio, and the monthly surplus power generation of the target power generation party, the target power transaction coefficient is generated by using the pre-trained target deep learning model;

[0145] Step 4: Generate a target trading strategy based on the target power trading coefficient.

[0146] The specific implementation process of the above method steps can be found in the embodiments of any of the above-mentioned power trading decision-making methods, and this embodiment will not be repeated here.

[0147] The electronic device in the present application obtains the marginal clearing price of each historical bidding transaction, the transaction electricity of the target power generation party in each historical bidding transaction, the current electricity supply and demand ratio in the market, and the monthly remaining power generation of the target power generation party, and then uses the above-obtained data as the input of the target deep learning model, so as to use the target deep learning model to reasonably and accurately generate the target power trading coefficient of the target power generation party, and then can reasonably and accurately generate the target trading decision based on the target power trading coefficient.

[0148] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A method for generating power trading decisions, characterized in that: include: Based on the transaction information of several historical bidding transactions, the marginal clearing price of each historical bidding transaction and the transaction power of the target power generation party in each historical bidding transaction are obtained; Obtain the current electricity supply and demand ratio in the market, as well as the monthly remaining power generation of the target power generator; Based on the marginal clearing prices, the transaction power of the target power generation party, the power supply and demand ratio, and the monthly surplus power generation of the target power generation party, a target power transaction coefficient is generated using a pre-trained target deep learning model; A target trading strategy is generated based on the target power trading coefficient.

2. The method according to claim 1, characterized in that Based on the transaction information of several historical auction transactions, the marginal clearing price of each of the historical auction transactions is obtained, specifically including: Based on the transaction information of each historical auction transaction, determine the bid price difference between the buyer and the seller; Determine the buyer and seller corresponding to the minimum declared price difference as the target buyer and seller; Based on the electricity price declared by the electricity purchaser and the electricity price declared by the electricity generator among the target buyers and sellers, the marginal clearing price is determined to obtain the marginal clearing price of each historical bidding transaction.

3. The method according to claim 1, characterized in that The obtaining of the current electricity supply and demand ratio in the market specifically includes: Obtain the remaining maximum power generation of each power generator; Determine the total supply power based on the remaining maximum power generation of each power generator; Based on the total power supply and the current total power demand in the market, a current power supply and demand ratio in the market is determined.

4. The method according to claim 1, characterized in that The target deep learning model is a target deep learning Q network model; The target power transaction coefficient is generated based on the marginal clearing prices, the transaction power of the target power generation party, the power supply and demand ratio, and the monthly surplus power generation of the target power generation party, using the pre-trained target deep learning model, specifically including: Based on the marginal clearing prices, the transaction quantities of the target power generators, the power supply and demand ratio, and the monthly surplus power generation of the target power generators, a target deep learning Q network model obtained by pre-training is used to generate a number of candidate power trading coefficients and value scores corresponding to the candidate power trading coefficients, wherein the candidate power trading coefficients include a power coefficient and a power price coefficient; The candidate power trading coefficient with the highest value score is determined from among the candidate power trading coefficients as the target power trading coefficient.

5. The method according to claim 1, characterized in that The generating of a target trading strategy based on the target power trading coefficient specifically includes: Based on the power coefficient in the target power transaction coefficient, a predetermined power calculation formula is used to calculate the declared power of the target power generation party; Based on the electricity price coefficient in the target power transaction coefficient, using a predetermined electricity price calculation formula, calculate the declared electricity price of the target power generation party; The target transaction strategy is generated based on the reported power volume and the reported electricity price.

6. The method according to claim 4, characterized in that The target deep learning Q network model includes: a target first Q network model and a target second Q network model with the same model structure and different model parameters; wherein the model parameters of the target second Q network model are copied from the historical model parameters of the target first Q network model based on a predetermined time step.

7. The method according to claim 6, characterized in that Before generating the target power trading coefficient, the method further includes: performing model training on the initial deep learning Q network model to obtain the target deep learning Q network model, specifically including: A number of sample data are obtained by using an experience playback method, each of which includes: a current state sample, an action sample under the current state sample, a reward value, and a next state sample corresponding to the current state sample; the state sample includes: a number of sample marginal clearing prices, a number of sample transaction quantities of power generation parties, a sample power supply and demand ratio, and a sample monthly remaining power generation of a sample power generation party; Using the initial first Q network model in the initial deep learning Q network model, according to the current state sample in the sample data, a number of initial first power trading coefficients and initial first value scores of the initial first power trading coefficients are generated; Using the initial second Q network model in the initial deep learning Q network model, according to the next state sample in the sample data, a number of initial second power trading coefficients and initial second value scores corresponding to each initial second power trading coefficient are generated, so as to determine an initial reference value score corresponding to each initial first value score at least based on each initial second value score; Based on each of the initial first value scores and the initial reference value scores corresponding to each of the initial first value scores, the model parameters of the initial first Q network model are adjusted to obtain the current first Q network model, and based on a predetermined training time interval, the historical model parameters of the first Q network model are copied to the second Q network model to obtain the current second Q network model; until each current first value score generated based on the current first Q network model and the current reference value score corresponding to each current first value score meet a predetermined training stop condition, the target first Q network model is obtained based on the current first Q network model.

8. A power trading decision-making device, characterized in that: include: The first acquisition module is used to acquire the marginal clearing price of each historical bidding transaction and the transaction quantity of the target power generation party in each historical bidding transaction based on the transaction information of a plurality of historical bidding transactions; The second acquisition module is used to obtain the current power supply and demand ratio in the market and the monthly remaining power generation of the target power generator; A trading coefficient generation module is used to generate a target power trading coefficient based on the marginal clearing prices, the transaction quantities of the target power generators, the power supply and demand ratio, and the monthly surplus power generation of the target power generators, using a pre-trained target deep learning model; A decision generation module is used to generate a target trading strategy based on the target power trading coefficient.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating a power trading decision according to any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: The method comprises at least a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for generating power trading decisions according to any one of claims 1 to 7 when executing the computer program on the memory.

Citation Information

Cited By

  • Power-assisted transaction decision support method and system

    CN119171424A