Power grid dispatching method based on inverse reinforcement learning combined with multi-factor and multi-action fusion
Through the method of inverse reinforcement learning combined with multi-factor and multi-action fusion, multi-source data is used to construct a power grid dispatching knowledge graph and a multi-action dynamic combination mode is used to solve the problems of insufficient utilization of environmental information and neglect of dynamic combination actions in the existing technology, and achieve More flexible and accurate grid dispatch decisions.
Patent Information
- Application Number
- CN202210660941.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-13
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-06-13
AI Technical Summary
Existing power grid dispatching methods fail to effectively utilize environmental information in multi-source data, and reinforcement learning algorithms ignore the importance of dynamic combination actions in power grid dispatching, resulting in inflexible and inaccurate dispatch decisions.
The method of inverse reinforcement learning combined with multi-factor and multi-action fusion is used to encode power grid, environment, resource and operation data through autoencoders, build a power grid dispatching knowledge graph, define multi-hop scoring functions and scheduling meta-paths, and utilize reinforcement learning and inverse reinforcement learning. The strategy generates action paths, and the action space adopts a multi-action dynamic combination mode.
It improves the rationality and flexibility of power grid dispatching, improves the accuracy of instruction recommendations, can better consider the interaction between spatio-temporal information, and produces more ideal decision-making effects.
Smart Images

Figure CN114997672B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power grid dispatching, and in particular relates to a power grid dispatching method based on inverse reinforcement learning combined with multi-factor and multi-action fusion. Background Art
[0002] Most of the existing power grid dispatch cognitive graph generation methods only consider the node feature information assigned by the source data when representing the node information in the knowledge graph, and do not utilize the environmental information brought by multi-source data, resulting in waste of environmental information.
[0003] Most of the existing algorithmic frameworks that use reinforcement learning for power grid dispatching technology often only consider that each decision corresponds to an action behavior, ignoring the existence of combined action behaviors. Especially in the case of multi-time and space collaboration such as power grid dispatching, dynamic combined actions are even less important. Summary of the invention
[0004] The purpose of the present invention is to provide a power grid dispatching method based on inverse reinforcement learning combined with multi-factor multi-action fusion, which is conducive to improving the rationality and flexibility of power grid dispatching.
[0005] To achieve the above object, the technical solution adopted by the present invention is: a power grid dispatching method based on inverse reinforcement learning combined with multi-factor multi-action fusion, comprising the following steps:
[0006] 1) Input data sets related to power grid dispatching, including power grid data, environmental data, resource data and operation data, as well as dispatching instruction action sets;
[0007] 2) Encode the power grid data, environmental data, resource data and operation data using an autoencoder, then connect and fuse the autoencoding results to construct the power grid state, and sample the action instruction code of the relevant resource scheduling from the resource data code;
[0008] 3) Using the prior knowledge of power grid dispatching and combining the entity states and corresponding dispatching actions related to power grid dispatching in the power grid data set to construct the corresponding power grid dispatching knowledge graph, and then using the state information and action instruction encoding obtained in step 2) to update the power grid dispatching knowledge graph into a power grid dispatching cognitive graph;
[0009] 4) According to the power grid dispatch cognitive graph obtained in step 3), a multi-hop scoring function is defined based on the current source power grid state to the target power grid state;
[0010] 5) After defining the multi-hop scoring function, the state-based scheduling meta-path is constructed using prior knowledge;
[0011] 6) Using the state-based scheduling meta-path obtained in step 5) as a priori guidance in the reinforcement learning decision-making process, generating scheduling action selection constraints, generating a path from the source grid state to the target grid state, using a multi-hop scoring function to calculate the score evaluation of the multi-hop nodes in the path, and generating the first part of the reinforcement learning reward function;
[0012] 7) Based on the empirical state transition path extracted from the offline historical data of power grid dispatch obtained in step 1) and the state transition path learned based on the reinforcement learning strategy, a reward function is generated, and the first part of the reward function obtained in step 6) is combined to generate a total reward function;
[0013] 8) Based on the reward function obtained in step 7), define the Markov process of inverse reinforcement learning and the inverse reinforcement learning strategy update framework based on actor-critic;
[0014] 9) Input the offline historical data set of power grid dispatching. First, based on the embedding set of power grid state and dispatching action obtained in step 2) and the knowledge graph of power grid dispatching instance obtained in step 3), construct a knowledge graph of power grid dispatching instance with practical significance. Then, use the Dijkstra algorithm to calculate the shortest state transition path based on the offline historical data of power grid dispatching. Then, in the Markov process and inverse reinforcement learning strategy update framework defined in step 8), input the node state and dynamic combination of multiple actions in the offline historical data set of power grid dispatching into the inverse reinforcement learning model, use the inverse reinforcement learning strategy to guide the generation of actions and action paths, and then use the shortest state transition path based on the offline historical data of power grid dispatching as a supervisory constraint to generate a reward function, drive the strategy update, and finally train to generate a power grid dispatching strategy based on inverse reinforcement learning combined with multi-factor and multi-behavior fusion.
[0015] Compared with the prior art, the present invention has the following beneficial effects: the method of the present invention obtains the state information of the power grid nodes in the power grid dispatching based on the effective fusion of external information including the power grid itself and resources, operations, and environment, and uses an autoencoder to extract features from these data. Unlike the previous learning through graph representation, the present invention can directly fuse the spatiotemporal correlation information. In addition, when the present invention uses reinforcement learning to obtain the power grid dispatching strategy, the construction of the action space adopts a mode based on the dynamic combination of multiple actions, that is, each action in the action space corresponding to each power grid state is composed of two actions. On the one hand, it is more in line with the means of power grid dispatching, that is, most of them adopt multi-faceted coordinated dispatching, and on the other hand, the dynamic combination of actions also makes the dispatching decision changes more flexible. Based on the above improvements, the present invention realizes a power grid dispatching strategy framework based on inverse reinforcement learning combined with multi-factor multi-behavior fusion. This method can effectively improve the accuracy and rationality of instruction recommendations, thereby considering more the mutual influence between the spatiotemporal information of power grid dispatching, and ultimately making the resulting decision effect more ideal. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a schematic diagram of the method implementation principle of the embodiment of the present invention.
[0017] Figure 2 It is a schematic diagram of the node information generation principle of the power grid dispatch cognitive graph in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0019] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0020] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0021] like Figure 1 As shown, this embodiment provides a power grid dispatching method based on inverse reinforcement learning combined with multi-factor multi-action fusion, including the following steps:
[0022] 1) Input data sets related to power grid dispatching, including relevant data information such as power grid data, environmental data, resource data, and operation data, as well as dispatching instruction action sets;
[0023] 2) Encode the power grid data, environmental data, resource data and operation data using an autoencoder, then connect and fuse the autoencoding results to construct the power grid state, and sample the action instruction code of the relevant resource scheduling from the resource data code;
[0024] 3) Using the prior knowledge of power grid dispatching and combining the entity states and corresponding dispatching actions related to power grid dispatching in the power grid data set to construct the corresponding power grid dispatching knowledge graph, and then using the state information and action instruction encoding obtained in step 2) to update the power grid dispatching knowledge graph into a power grid dispatching cognitive graph;
[0025] 4) According to the power grid dispatch cognitive graph obtained in step 3), a multi-hop scoring function is defined based on the current source power grid state to the target power grid state;
[0026] 5) After defining the multi-hop scoring function, the state-based scheduling meta-path is constructed using prior knowledge;
[0027] 6) Using the state-based scheduling meta-path obtained in step 5) as a priori guidance in the reinforcement learning decision-making process, generating scheduling action selection constraints, generating a path from the source grid state to the target grid state, using a multi-hop scoring function to calculate the score evaluation of the multi-hop nodes in the path, and generating the first part of the reinforcement learning reward function;
[0028] 7) Based on the empirical state transition path extracted from the offline historical data of power grid dispatch obtained in step 1) and the state transition path learned based on the reinforcement learning strategy, a reward function is generated, and the first part of the reward function obtained in step 6) is combined to generate a total reward function;
[0029] 8) Based on the reward function obtained in step 7), define the Markov process of inverse reinforcement learning and the inverse reinforcement learning strategy update framework based on actor-critic;
[0030] 9) Input the offline historical data set of power grid dispatching. First, based on the embedding set of power grid state and dispatching action obtained in step 2) and the knowledge graph of power grid dispatching instance obtained in step 3), construct a knowledge graph of power grid dispatching instance with practical significance. Then, use the Dijkstra algorithm to calculate the shortest state transition path based on the offline historical data of power grid dispatching. Then, in the Markov process and inverse reinforcement learning strategy update framework defined in step 8), input the node state and dynamic combination of multiple actions in the offline historical data set of power grid dispatching into the inverse reinforcement learning model, use the inverse reinforcement learning strategy to guide the generation of actions and action paths, and then use the shortest state transition path based on the offline historical data of power grid dispatching as a supervisory constraint to generate a reward function, drive the strategy update, and finally train to generate a power grid dispatching strategy based on inverse reinforcement learning combined with multi-factor and multi-behavior fusion.
[0031] In step 2), according to the relevant data information such as power grid data, environmental data, resource data and operation data contained in the power grid data set obtained in step 1), an autoencoder is defined to self-encode the above data information, and at the same time, the action instruction code of the relevant resource scheduling is sampled from the resource data code. The specific method is:
[0032] 201) obtaining relevant data information such as power grid data, environmental data, resource data and operation data, and extracting dispatch instruction records in combination with resource data;
[0033] 202) define the self-encoding network Encoder();
[0034] 203) encoding various information in the power grid dispatching historical data through an autoencoder;
[0035] 204) The state of each power grid node is taken as an entity node in the knowledge graph, wherein the information of each entity node is fused by the self-encoded information of four parts: power grid data, environmental data, resource data and operation data; the instruction action made for each power grid node state is taken as the associated edge between the entity nodes, and the edge information can be sampled from the resource data.
[0036] In step 3), the prior knowledge of power grid dispatch is combined with the entity states and corresponding dispatch actions related to power grid dispatch in the power grid data set to construct the corresponding power grid dispatch knowledge graph, and then the state information and action instruction encoding obtained in step 2) are used to update the power grid dispatch knowledge graph into a power grid dispatch cognitive graph. The specific method is:
[0037] 301) According to the power grid dispatch history data set, the power grid state in the entire power grid data set is associated according to the edges corresponding to the dispatch actions, and finally a power grid dispatch knowledge graph including the power grid state and dispatch actions in the data set is formed;
[0038] 302) The power grid dispatch knowledge graph is updated in combination with the node state coding information in step 2) to generate a power grid dispatch cognitive graph. The process of generating node information of the power grid dispatch cognitive graph in this embodiment is as follows: Figure 2 shown.
[0039] In step 4), according to the power grid dispatch cognitive graph obtained in step 3), a multi-hop scoring function is defined based on the situation from the current power grid state to the target power grid state. The specific method is:
[0040] 401) First, define the entities in the multi-hop path. The first entity of the path is defined as e0, and the last entity is defined as e t , based on the knowledge graph of power grid dispatch, if e0 and e t There is a series of entities {e0,e1,...,e t-1} and the t relations between them, namely {r1,r2,...,r t}, then a certain effective multi-hop path is defined based on the cognitive graph
[0041] 402) After the definition of the multi-hop path is completed, a scoring function of the multi-hop path is defined. For two entities and in the multi-hop path, the scoring function is defined as:
[0042]
[0043] Among them, j represents the subscript of any entity node in the multi-hop path, which is the bias value set here; when t = 0 and j = 0, the scoring function represents the similarity between two entity vectors, that is:
[0044]
[0045] When t=1 and j=1, the scoring function represents the similarity between the head entity plus the relationship and the tail entity, that is:
[0046]
[0047] This completes the definition of a multi-hop scoring function based on the knowledge graph, which is used to evaluate the correlation between two states.
[0048] In step 5), after defining the multi-hop scoring function, the state-based scheduling meta-path is constructed using prior knowledge. The specific method is as follows:
[0049] 501) generating a series of triples according to the power grid state type and the dispatch action type contained in the cognitive graph;
[0050] 502) Based on prior knowledge, the triplets with existing relationships are associated, and finally multiple meta-paths with prior guiding significance are abstracted, which can effectively guide the reinforcement learning agent to select scheduling actions under the corresponding state.
[0051] In step 6), the meta-path obtained in step 5) is used to constrain the search path of the reinforcement learning agent. The specific method is:
[0052] 601) defining multiple meta-paths based on expert prior knowledge;
[0053] 602) In the process of path exploration and trial of the intelligent agent in reinforcement learning, the current power grid state is guided to select the dispatch action according to the defined meta-path, so that the current state is transferred to the next state, and so on until the end of the cycle, and finally a state transfer path from the source power grid state to the target power grid state is generated;
[0054] 603) The correlation between the source power grid state and the target power grid state is calculated through the defined multi-hop scoring function to obtain the first part of the reward function of reinforcement learning.
[0055] The first part of the reward function obtained in step 6 is used to update the strategy of the reinforcement learning network, and its constraint drive is insufficient. Therefore, in step 7), we first obtain the power grid dispatch cognitive graph based on the embedding of entities and edges in step 2 and the embedding and power grid dispatch knowledge graph in step 3; then use the Dijkstra algorithm to obtain the shortest state transition path from the source node to the target node in the power grid dispatch cognitive graph as the supervision constraint of the state transition path generated by the reinforcement learning strategy, and use the error loss as the second part of the reward function. Finally, the two parts of the reward function are combined as the reward function of reinforcement learning to drive the update of the strategy;
[0056] In step 7), based on the offline historical data constraints obtained in steps 2) and 3) and the first part of the reward function obtained in step 6), a total reward function is generated. The specific method is:
[0057] 701) Based on the power grid state representation and dispatch action representation obtained after processing the offline data in step 2) and the power grid dispatch knowledge graph extracted from the offline historical data in step 3), a power grid dispatch cognitive graph with practical significance is obtained;
[0058] 702) Based on the cognitive graph of power grid dispatch, the Dijkstra algorithm is used to calculate the shortest state transfer path from the source node to the target node, which is used as the supervision information of offline historical data to compete with the state transfer path generated by the inverse reinforcement learning strategy to generate the second part of the reward function;
[0059] 703) The two parts of the reward function are superimposed to generate a reward function for driving the entire inverse reinforcement learning strategy update.
[0060] In step 8), based on the reward function obtained in step 7), the Markov process of inverse reinforcement learning and the inverse reinforcement learning strategy update framework based on actor-critic are defined. The specific method is:
[0061] 801) Select an actor-critic based inverse reinforcement learning network framework;
[0062] 802) State definition: at time t, state s t Defined as a triple (u,e t ,h t ), where u belongs to the entity set U of the power grid state type, refers to the starting point of the decision-making process, and e t It represents the entity that the agent reaches after t steps, h t Represents the historical records before t steps; they constitute the current state;
[0063] According to the above definition, the initialization state is expressed as:
[0064]
[0065] The state at the termination time T is expressed as:
[0066] s T =(u,e T ,h T )
[0067] 803) Action definition: In the state at time t, the agent has a corresponding action space, which contains the set of all out-degree edges of the entity at time t, and the entity does not contain the entity that exists in the history, that is:
[0068]
[0069] When each state node makes an action decision, a pair dynamically combines the actions into a scheduling behavior;
[0070] 804) Definition of soft reward for reinforcement learning: The soft reward mechanism is obtained based on the multi-hop scoring function, and the reward obtained from the corresponding state at the termination time T is defined as:
[0071]
[0072] 805) The state transition probability is that in the Markov decision process, assuming that the state at the current time t is known, and in the current state, according to the path search strategy, and then performing actions, the agent will reach the next state; in the process of performing an action to the next state, there is a definition of the state transition probability, which is defined here as:
[0073]
[0074] The initial state is determined by the initial power grid state;
[0075] 806) Discount factor means that in the Markov decision process, in order to obtain more rewards, the agent will not only consider the immediate rewards currently obtained, but also refer to the immediate rewards obtained in the future state; in a given cycle of a certain Markov decision process, the total reward at a certain time t corresponding to the state is defined as:
[0076] G t =R t+1 +γR t+2 +γ 2 R t+3 +…+γ T-t-1 R T
[0077] That is, the superposition of the current timely reward and the discounted future reward value, where T represents the terminal state; because the environment is often random, performing a specific action does not necessarily result in a specific state, so for future rewards, they should be attenuated compared to the rewards in the current state, which is the purpose of using the discount factor γ, where γ belongs to [0, 1], indicating that the farther the reward is from the current state, the more discounts need to be made; the final task is to train a strategy to maximize the final reward R;
[0078] 807) Obtain the reward function R under the offline historical data supervision mechanism at time t offline,t , defined as follows:
[0079] R offline,t =log(D p (s t , a t ))-log(1-D p (s t , a t ))
[0080] Among them, s t represents the state at time t, a t represents the action generated by the inverse reinforcement learning strategy at time t, D p is a method for obtaining the value of (st , a t ) is a discriminator of probability from historical experience data;
[0081] 808) At time t, a reward function is generated under the offline historical data supervision mechanism. In the Markov decision process, our goal is to learn an excellent search strategy so that any starting grid state can obtain the maximum cumulative return within the search cycle. The formula is defined as:
[0082]
[0083] 809) Perform gradient update of inverse reinforcement learning strategy, gradient update The definition is as follows:
[0084]
[0085] Among them, R all Represents the transition from state s to the final state s T Get the discount of the reward plus R corresponding to the state s at time t offline,t The cumulative sum of
[0086] 810) Finally, a trainable actor-critic based inverse reinforcement learning model framework is obtained.
[0087] In step 9), the inverse reinforcement learning is implemented based on the orator-critic algorithm framework. The specific method is as follows:
[0088] 901) First, input the offline historical data set of power grid dispatching, and construct a practical power grid dispatching knowledge graph based on the embedding set of power grid state and dispatching action obtained in step 2) and the power grid dispatching knowledge graph obtained in step 3); then, based on the cognitive graph, use the Dijkstra algorithm to calculate the shortest state transition path based on the offline historical data of power grid dispatching; secondly, define the orator network actor network, which is used to learn a path search strategy to calculate the probability distribution of each action being selected in the valid action space corresponding to the node in the current state; the input of the actor network is the action space owned by the current node and the corresponding state at this time. Each action contained in the input action space is synthesized by a dynamically combined pair of actions. The output of the actor network is the probability distribution of each action in the action space, and then use the mask operation to delete invalid actions, and input the result into the softmax to generate the final action probability distribution; then define the critic network critic network, which is used to evaluate the value of the current state. Its input is the state of the current node at this time, and its output is the value evaluation of the state;
[0089] 902) Set the number of training iterations epochs, and start training when epochs equals 1;
[0090] 903) obtaining the state data in the overall power grid dispatching data set and the action space after the dynamic combination of multiple actions in step 3), and then inputting them into the actor network and the critic network in batches, respectively, to obtain the probability distribution (fault handling) of each action in the action space and the value evaluation of the state (good or bad state);
[0091] 904) Calculate the estimated value of the state by the critic network and the superposition value of the two parts of the reward obtained in this state to minimize the loss function, and calculate the product maximization operation of the current action probability and the reward brought by the current action, and define an entropy that ensures the balance between exploration and development of the model to maximize the entropy;
[0092] 905) Repeat steps 903) and 904) within the value range defined by epochs, and finally complete the training of inverse reinforcement learning to obtain a power grid dispatching strategy based on inverse reinforcement learning combined with multi-factor and multi-behavior fusion.
[0093] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A power grid dispatching method based on inverse reinforcement learning combined with multi-factor and multi-action fusion, characterized in that: The following steps are involved: 1) Input data sets related to power grid dispatching, including power grid data, environmental data, resource data and operation data, as well as dispatching instruction action sets; 2) Encode the power grid data, environmental data, resource data and operation data using an autoencoder, then connect and fuse the autoencoding results to construct the power grid state, and sample the action instruction code of the relevant resource scheduling from the resource data code; 3) Using the prior knowledge of power grid dispatching and combining the entity states and corresponding dispatching actions related to power grid dispatching in the power grid data set to construct the corresponding power grid dispatching knowledge graph, and then using the state information and action instruction encoding obtained in step 2) to update the power grid dispatching knowledge graph into a power grid dispatching cognitive graph; 4) According to the power grid dispatch cognitive graph obtained in step 3), a multi-hop scoring function is defined based on the current source power grid state to the target power grid state; 5) After defining the multi-hop scoring function, the state-based scheduling meta-path is constructed using prior knowledge; 6) Using the state-based scheduling meta-path obtained in step 5) as a priori guidance in the reinforcement learning decision-making process, generating scheduling action selection constraints, generating a path from the source grid state to the target grid state, using a multi-hop scoring function to calculate the score evaluation of the multi-hop nodes in the path, and generating the first part of the reinforcement learning reward function; 7) Based on the empirical state transition path extracted from the offline historical data of power grid dispatch obtained in step 1) and the state transition path learned based on the reinforcement learning strategy, a reward function is generated, and the first part of the reward function obtained in step 6) is combined to generate a total reward function; 8) Based on the reward function obtained in step 7), define the Markov process of inverse reinforcement learning and the inverse reinforcement learning strategy update framework based on actor-critic; 9) Input the offline historical data set of power grid dispatching. First, based on the embedding set of power grid state and dispatching action obtained in step 2) and the knowledge graph of power grid dispatching instance obtained in step 3), construct a knowledge graph of power grid dispatching instance with practical significance. Then, use the Dijkstra algorithm to calculate the shortest state transition path based on the offline historical data of power grid dispatching. Then, in the Markov process and inverse reinforcement learning strategy update framework defined in step 8), input the node state and dynamic combination of multiple actions in the offline historical data set of power grid dispatching into the inverse reinforcement learning model, use the inverse reinforcement learning strategy to guide the generation of actions and action paths, and then use the shortest state transition path based on the offline historical data of power grid dispatching as a supervisory constraint to generate a reward function, drive the strategy update, and finally train to generate a power grid dispatching strategy based on inverse reinforcement learning combined with multi-factor and multi-behavior fusion. In step 4), according to the power grid dispatch cognitive graph obtained in step 3), a multi-hop scoring function is defined based on the situation from the current power grid state to the target power grid state. The specific method is: 401) First, define the entities in the multi-hop path. The first entity of the path is defined as e0, and the last entity is defined as e t , based on the knowledge graph of power grid dispatch, if e0 and e t There is a series of entities {e0,e1,...,e t-1 } and the t relations between them, namely {r1,r2,...,r t }, then a certain effective multi-hop path is defined based on the cognitive graph 402) After the definition of the multi-hop path is completed, a scoring function of the multi-hop path is defined. For two entities and in the multi-hop path, the scoring function is defined as: Where j represents any entity node in the multi-hop path; when t = 0 and j = 0, the scoring function represents the similarity between two entity vectors, that is: When t=1 and j=1, the scoring function represents the similarity between the head entity plus the relationship and the tail entity, that is: This completes the definition of a multi-hop scoring function based on the knowledge graph, which is used to evaluate the correlation between two states; In step 5), after defining the multi-hop scoring function, the state-based scheduling meta-path is constructed using prior knowledge. The specific method is as follows: 501) generating a series of triples according to the power grid state type and the dispatch action type contained in the cognitive graph; 502) According to the prior knowledge, the triplets with existing relationships are associated, and finally multiple meta-paths with prior guiding significance are abstracted to guide the reinforcement learning agent to select scheduling actions in the corresponding state; In step 6), the meta-path obtained in step 5) is used to constrain the search path of the reinforcement learning agent. The specific method is: 601) defining multiple meta-paths based on expert prior knowledge; 602) In the process of path exploration and trial of the intelligent agent in reinforcement learning, the current power grid state is guided to select the dispatch action according to the defined meta-path, so that the current state is transferred to the next state, and so on until the end of the cycle, and finally a state transfer path from the source power grid state to the target power grid state is generated; 603) calculating the correlation between the source power grid state and the target power grid state through a defined multi-hop scoring function to obtain the first part of the reward function of reinforcement learning; In step 7), based on the offline historical data constraints obtained in steps 2) and 3) and the first part of the reward function obtained in step 6), a total reward function is generated. The specific method is: 701) Based on the power grid state representation and dispatch action representation obtained after processing the offline data in step 2) and the power grid dispatch knowledge graph extracted from the offline historical data in step 3), a power grid dispatch cognitive graph with practical significance is obtained; 702) Based on the cognitive graph of power grid dispatch, the Dijkstra algorithm is used to calculate the shortest state transfer path from the source node to the target node, which is used as the supervision information of offline historical data to compete with the state transfer path generated by the inverse reinforcement learning strategy to generate the second part of the reward function; 703) superimposing the two reward functions to generate a reward function for driving the entire inverse reinforcement learning strategy update; In step 8), based on the reward function obtained in step 7), the Markov process of inverse reinforcement learning and the inverse reinforcement learning strategy update framework based on actor-critic are defined. The specific method is: 801) Select an actor-critic based inverse reinforcement learning network framework; 802) State definition: at time t, state s t Defined as a triple (u,e t ,h t ), where u belongs to the entity set U of the power grid state type, refers to the starting point of the decision-making process, and e t It represents the entity that the agent reaches after t steps, h t Represents the historical records before t steps; they constitute the current state; According to the above definition, the initialization state is expressed as: The state at the termination time T is expressed as: s T =(u,e T ,h T ) 803) Action definition: In the state at time t, the agent has a corresponding action space, which contains the set of all out-degree edges of the entity at time t, and the entity does not contain the entity that exists in the history, that is: When each state node makes an action decision, a pair dynamically combines the actions into a scheduling behavior; 804) Definition of soft reward for reinforcement learning: The soft reward mechanism is obtained based on the multi-hop scoring function, and the reward obtained from the corresponding state at the termination time T is defined as: 805) The state transition probability is that in the Markov decision process, assuming that the state at the current time t is known, and in the current state, according to the path search strategy, and then performing actions, the agent will reach the next state; in the process of performing an action to the next state, there is a definition of the state transition probability, which is defined here as: The initial state is determined by the initial power grid state; 806) The discount factor means that in the Markov decision process, the agent not only considers the immediate reward obtained at present, but also refers to the immediate reward obtained in the future state; in a given cycle of a certain Markov decision process, the total reward in the corresponding state at a certain time t is defined as: G t =R t+1 +γR t+2 +g 2 R t+3 +…+c T-t-1 R T That is, the superposition of the current immediate reward and the future reward value discount, where T represents the terminal state; the discount factor γ belongs to [0,1], which means that the farther the reward is from the current state, the more discount is needed; the final task is to train a strategy to maximize the final reward R; 807) Obtain the reward function R under the offline historical data supervision mechanism at time t offline,t , defined as follows: R offline,t =log(D p (s t ,a t ))-log(1-D p (s t ,a t )) Among them, s t represents the state at time t, a t represents the action generated by the inverse reinforcement learning strategy at time t, D p is a method for obtaining the value of (s t ,a t ) is a discriminator of probability from historical experience data; At time 808, a reward function is generated under the offline historical data supervision mechanism. Strategy optimization is to learn an excellent search strategy in the Markov decision process so that the maximum cumulative return can be obtained within the search cycle with any starting power grid state. The formula is defined as: 809) Perform gradient update of inverse reinforcement learning strategy, gradient update The definition is as follows: Among them, R all Represents the transition from state s to the final state s T Get the discount of the reward plus R corresponding to the state s at time t offline,t The cumulative sum of 810) Finally, a trainable actor-critic based inverse reinforcement learning model framework is obtained; In step 9), the inverse reinforcement learning is implemented based on the orator-critic algorithm framework. The specific method is as follows: 901) First, input the offline historical data set of power grid dispatching, and construct a practical power grid dispatching knowledge graph based on the embedding set of power grid state and dispatching action obtained in step 2) and the power grid dispatching knowledge graph obtained in step 3); then, based on the cognitive graph, use the Dijkstra algorithm to calculate the shortest state transition path based on the offline historical data of power grid dispatching; secondly, define the orator network actor network, which is used to learn a path search strategy to calculate the probability distribution of each action being selected in the valid action space corresponding to the node in the current state; the input of the actor network is the action space owned by the current node and the corresponding state at this time. Each action contained in the input action space is synthesized by a dynamically combined pair of actions. The output of the actor network is the probability distribution of each action in the action space, and then use the mask operation to delete invalid actions, and input the result into the softmax to generate the final action probability distribution; then define the critic network critic network, which is used to evaluate the value of the current state. Its input is the state of the current node at this time, and its output is the value evaluation of the state; 902) Set the number of training iterations epochs, and start training when epochs equals 1; 903) obtaining the state data in the overall power grid dispatching data set and the action space after the dynamic combination of multiple actions in step 3), and then inputting them into the actor network and the critic network in batches, respectively, to obtain the probability distribution of each action in the action space and the value evaluation of the state; 904) Calculate the estimated value of the state by the critic network and the superposition value of the two parts of the reward obtained in this state to minimize the loss function, and calculate the product maximization operation of the current action probability and the reward brought by the current action, and define an entropy that ensures the balance between exploration and development of the model to maximize the entropy; 905) Repeat steps 903) and 904) within the value range defined by epochs, and finally complete the training of inverse reinforcement learning to obtain a power grid dispatching strategy based on inverse reinforcement learning combined with multi-factor and multi-behavior fusion.
2. The power grid dispatching method based on inverse reinforcement learning combined with multi-factor and multi-action fusion according to claim 1 is characterized in that: In step 2), according to the power grid data, environmental data, resource data and operation data contained in the power grid data set obtained in step 1), an autoencoder is defined to autoencode the above data information, and at the same time, the action instruction code of the relevant resource scheduling is sampled from the resource data code. The specific method is: 201) obtaining power grid data, environmental data, resource data and operation data, and extracting dispatch instruction records in combination with resource data; 202) define the self-encoding network Encoder(); 203) encoding various information in the power grid dispatching historical data through an autoencoder; 204) The state of each power grid node is taken as an entity node in the knowledge graph, wherein the information of each entity node is fused by the self-encoded information of four parts: power grid data, environmental data, resource data and operation data; the instruction action made for each power grid node state is taken as the associated edge between the entity nodes, and the edge information can be sampled from the resource data.
3. The power grid dispatching method based on inverse reinforcement learning combined with multi-factor and multi-action fusion according to claim 1 is characterized in that: In step 3), the prior knowledge of power grid dispatch is combined with the entity states and corresponding dispatch actions related to power grid dispatch in the power grid data set to construct the corresponding power grid dispatch knowledge graph, and then the state information and action instruction encoding obtained in step 2) are used to update the power grid dispatch knowledge graph into a power grid dispatch cognitive graph. The specific method is: 301) According to the power grid dispatch history data set, the power grid state in the entire power grid data set is associated according to the edges corresponding to the dispatch actions, and finally a power grid dispatch knowledge graph including the power grid state and dispatch actions in the data set is formed; 302) In combination with the node status coding information in step 2), the power grid dispatching knowledge graph is updated to generate a power grid dispatching cognitive graph.
