Knowledge-enhanced representation method and system for power dispatching commands based on graph neural network

Through the knowledge-enhanced representation technology based on graph neural networks, the hierarchical context embedding of the power grid system text documents is extracted and integrated with the knowledge-aware representation to construct a power dispatch command graph, which solves the problem of insufficient accuracy of existing pre-trained models in the power dispatch system and achieves higher interpretability and accuracy.

CN117171356BActive Publication Date: 2025-09-19CHINA SOUTHERN POWER GRID COMPANY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311075906.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-24
Publication Date
2025-09-19
Estimated Expiration
2043-08-24

AI Technical Summary

Technical Problem

Existing pre-trained models lack common sense knowledge in power dispatching systems, are difficult to deeply understand and logically reason, and have poor robustness and interpretability, resulting in insufficient accuracy in representing the relationship between power dispatching commands.

Method used

By adopting the knowledge-enhanced representation technology based on graph neural network, we obtain text documents in the power grid system, extract global and sentence-level context embeddings, and use the knowledge base to retrieve semantic knowledge. We integrate hierarchical context embedding and knowledge-aware representation to construct a power dispatch command graph and obtain the relationship representation between each dispatch command.

Benefits of technology

It enhances the interpretability of interactions between power grid entities and dispatch commands, provides a reliable knowledge enhancement method for the construction of knowledge graphs in downstream tasks, and improves the accuracy and comprehensibility of rating prediction and explanation generation in power dispatch systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117171356B_ABST
    Figure CN117171356B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for knowledge-enhanced representation of electric power dispatching commands based on a graph neural network, which relates to the field of knowledge-enhanced semantic representation. The method comprises: obtaining hierarchical context embedding for relevant text documents in each power grid system; utilizing a knowledge base to retrieve semantic knowledge associated with each relevant text document, obtaining a knowledge-aware representation corresponding to each relevant text document, and then obtaining a high-level semantic representation of power grid entities, dispatching commands, and interactions; obtaining knowledge-enhanced semantic representations of power grid entities, dispatching commands, and interactions based on the high-level semantic representations, and constructing an electric power dispatching command graph; and obtaining a relationship representation between each dispatching command in the electric power dispatching command graph based on a graph neural network. The use of knowledge-enhanced representation technology based on a graph neural network enhances the interpretability of interactions between power grid entities and dispatching commands, and also provides a reliable knowledge-enhanced method for constructing knowledge graphs in downstream tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of knowledge-enhanced semantic representation, and in particular to a method and system for knowledge-enhanced representation of electric power dispatching commands based on graph neural networks. Background Art

[0002] Currently, pre-trained models for knowledge augmentation are primarily based on the Transformer-based BERT and GPT models. However, these models lack common sense, deep understanding, and logical reasoning capabilities. Furthermore, they suffer from poor robustness and interpretability. When applied to power dispatch systems to represent the relationships between dispatch commands, their accuracy needs to be improved. Summary of the Invention

[0003] The purpose of the present invention is to provide a method and system for knowledge enhancement representation of power dispatching commands based on graph neural networks. The knowledge enhancement representation technology based on graph neural networks is adopted to enhance the interpretability of the interaction between power grid entities and dispatching commands, and also provide a reliable knowledge enhancement method for the construction of knowledge graphs in downstream tasks.

[0004] To achieve the above object, the present invention provides the following solutions:

[0005] A method for enhancing the representation of electric power dispatching command knowledge based on a graph neural network, the method comprising:

[0006] Obtain relevant text documents in the power grid system; the relevant text documents include power grid entity text documents, dispatch command text documents and power grid-dispatching interaction text documents;

[0007] For each of the relevant text documents, extracting a global context embedding and a sentence-level context embedding to obtain a hierarchical context embedding;

[0008] Retrieving semantic knowledge associated with each of the relevant text documents using a knowledge base to obtain a knowledge-aware representation corresponding to each of the relevant text documents, and obtaining a high-level semantic representation of a power grid entity, a high-level semantic representation of a dispatch command, and a high-level semantic representation of a power grid-dispatcher interaction based on the hierarchical context embedding, the global context embedding, and the knowledge-aware representation;

[0009] Obtaining a knowledge-enhanced semantic representation of the grid entity, a knowledge-enhanced semantic representation of the dispatch command, and a knowledge-enhanced semantic representation of the grid-dispatching interaction based on the high-level semantic representation of the grid entity, the high-level semantic representation of the dispatch command, and the high-level semantic representation of the grid-dispatching interaction;

[0010] Constructing a power dispatch command graph based on the knowledge-enhanced semantic representation of the power grid entity, the knowledge-enhanced semantic representation of the dispatch command, and the knowledge-enhanced semantic representation of the power grid-dispatching interaction;

[0011] Based on the graph neural network, a relationship representation between each dispatching command in the power dispatching command graph is obtained.

[0012] Optionally, for each of the relevant text documents, extracting a global context embedding and a sentence-level context embedding to obtain a hierarchical context embedding, specifically comprising:

[0013] For each of the related text documents, construct a word embedding, using the word embedding as input and extracting the global context embedding using a first bidirectional long short-term memory network;

[0014] Obtaining sentence-level embedding information based on the word embedding, and extracting the sentence-level context embedding using a second bidirectional long short-term memory network with the sentence-level embedding information as input;

[0015] The global context embedding and the sentence-level context embedding are concatenated to obtain the hierarchical context embedding.

[0016] Optionally, using a knowledge base to retrieve semantic knowledge associated with each of the related text documents to obtain a knowledge-aware representation corresponding to each of the related text documents specifically includes:

[0017] For each word in each of the relevant text documents, retrieve the top N knowledge concepts of each word from the knowledge base to obtain the embedding of the knowledge concept of each word; the embedding of the knowledge concept of each word includes N elements;

[0018] For each word in each of the relevant text documents, calculate a correlation coefficient of the knowledge concept using an attention mechanism based on the embedding of the knowledge concept, and calculate a knowledge concept-aware embedding based on the correlation coefficient of the knowledge concept;

[0019] The knowledge concept perception corresponding to each word in each of the related text documents is embedded as input, and the knowledge perception representation corresponding to each of the related text documents is extracted using a third bidirectional long short-term memory network.

[0020] Optionally, for each word in each of the relevant text documents, a correlation coefficient of the knowledge concept is calculated using an attention mechanism based on the embedding of the knowledge concept, and a knowledge concept-aware embedding is calculated based on the correlation coefficient of the knowledge concept, specifically including:

[0021] For each word in each of the relevant text documents, a linear relationship is established between each word and each element of the embedding of the knowledge concept, and activation processing data is obtained through a tanh activation function;

[0022] Applying a softmax function to the activation processing data corresponding to each word to obtain a correlation coefficient of the knowledge concept corresponding to each word;

[0023] The knowledge concept perception embedding corresponding to each word is calculated based on the knowledge concept embedding of each word and the correlation coefficient of the knowledge concept.

[0024] Optionally, obtaining a high-level semantic representation of a power grid entity, a high-level semantic representation of a dispatch command, and a high-level semantic representation of a power grid-dispatching interaction based on the hierarchical context embedding, the global context embedding, and the knowledge-aware representation specifically includes:

[0025] For each of the related text documents, fusing the knowledge-aware representation and the global context embedding to obtain a fused embedding;

[0026] The multi-head attention mechanism is applied with the fused embedding as the keys of the multi-head attention mechanism, the knowledge perception representation as the values ​​of the multi-head attention mechanism, and the hierarchical context embedding as the query of the multi-head attention mechanism to obtain a high-level semantic representation; the high-level semantic representation includes a high-level semantic representation of the power grid entity, a high-level semantic representation of the dispatch command, and a high-level semantic representation of the power grid-dispatching interaction.

[0027] Optionally, obtaining a knowledge-enhanced semantic representation of the grid entity, a knowledge-enhanced semantic representation of the dispatch command, and a knowledge-enhanced semantic representation of the grid-dispatching interaction based on the high-level semantic representation of the grid entity, the high-level semantic representation of the dispatch command, and the high-level semantic representation of the grid-dispatching interaction specifically includes:

[0028] Use one-hot encoding to represent the encoding of power grid entities and dispatch commands respectively, and use fully connected layer mapping to convert the sparse one-hot encoding representation of power grid entities and the sparse one-hot encoding representation of dispatch commands into dense representations respectively, to obtain the embedded representation of power grid entities and the embedded representation of dispatch commands;

[0029] Applying a series operation based on the embedded representation of the power grid entity and the high-level semantic representation of the power grid entity to obtain a knowledge-enhanced semantic representation of the power grid entity, and applying a series operation based on the embedded representation of the scheduling command and the high-level semantic representation of the scheduling command to obtain a knowledge-enhanced semantic representation of the scheduling command;

[0030] A knowledge-enhanced semantic representation of the power grid-dispatching interaction is obtained according to the high-level semantic representation of the power grid-dispatching interaction.

[0031] Optionally, constructing a power dispatch command graph according to the knowledge-enhanced semantic representation of the power grid entity, the knowledge-enhanced semantic representation of the dispatch command, and the knowledge-enhanced semantic representation of the power grid-dispatching interaction specifically includes:

[0032] According to the grid-dispatching interaction relationship in the power grid system, a power dispatching command behavior graph is constructed; the nodes in the power dispatching command behavior graph include grid entity nodes and dispatching command nodes, and the edges in the power dispatching command behavior graph represent the grid-dispatching interaction relationship;

[0033] The embedding of the grid entity node is initialized to the knowledge-enhanced semantic representation of the grid entity, the embedding of the dispatch command node is initialized to the knowledge-enhanced semantic representation of the dispatch command, and the grid-dispatch interaction relationship representing the edge is initialized to the knowledge-enhanced semantic representation of the grid-dispatch interaction to obtain the power dispatch command graph.

[0034] Optionally, obtaining a relationship representation between the dispatch commands in the power dispatch command graph based on a graph neural network specifically includes:

[0035] Inputting node information and edge information in the power dispatch command graph into the graph neural network;

[0036] Determining neighbor nodes of each node of the graph neural network, and determining an information propagation representation of each of the neighbor nodes;

[0037] Aggregate the current information representation of each node with the corresponding information propagation representation of the neighboring node to obtain the updated information of each node after the first information propagation;

[0038] Aggregate the updated information representation of each node with the updated information propagation representation of the corresponding neighboring node to obtain the updated information representation of each node after the lth information propagation; l = 2, ..., L; L is the preset number of information propagation iterations;

[0039] Determine whether the current number of information propagation iterations l reaches the preset number of information propagation iterations;

[0040] If so, output the updated information representation of each node after the l-th information propagation, and obtain the relationship representation between the dispatching commands in the power dispatching command graph according to the updated information representation of each node after the l-th information propagation and the edge relationship representation between the nodes;

[0041] If not, set l=l+1 and return to the step of "aggregating the current update information representation of each node with the corresponding update information propagation representation of the neighboring node".

[0042] The present invention also provides a graph neural network-based power dispatch command knowledge enhancement representation system, the system comprising:

[0043] A data acquisition module is used to acquire relevant text documents in the power grid system; the relevant text documents include power grid entity text documents, dispatch command text documents and power grid-dispatching interaction text documents;

[0044] A hierarchical context embedding extraction module is used to extract a global context embedding and a sentence-level context embedding for each of the relevant text documents to obtain a hierarchical context embedding;

[0045] a high-level semantic representation module, configured to retrieve semantic knowledge associated with each of the relevant text documents using a knowledge base, obtain a knowledge-aware representation corresponding to each of the relevant text documents, and obtain a high-level semantic representation of a power grid entity, a high-level semantic representation of a dispatch command, and a high-level semantic representation of a power grid-dispatcher interaction based on the hierarchical context embedding, the global context embedding, and the knowledge-aware representation;

[0046] A knowledge-enhanced semantic representation module is configured to obtain a knowledge-enhanced semantic representation of a power grid entity, a knowledge-enhanced semantic representation of a dispatch command, and a knowledge-enhanced semantic representation of a power grid-dispatching interaction based on the high-level semantic representation of the power grid entity, the high-level semantic representation of the dispatch command, and the high-level semantic representation of the power grid-dispatching interaction;

[0047] a power dispatch command graph construction module, configured to construct a power dispatch command graph based on the knowledge-enhanced semantic representation of the power grid entity, the knowledge-enhanced semantic representation of the dispatch command, and the knowledge-enhanced semantic representation of the power grid-dispatching interaction;

[0048] The module for representing the relationship between dispatching commands is used to obtain the relationship representation between the dispatching commands in the power dispatching command graph based on the graph neural network.

[0049] The optional hierarchical context embedding extraction module specifically includes:

[0050] a global context embedding extraction unit, configured to construct a word embedding for each of the related text documents, and extract the global context embedding using a first bidirectional long short-term memory network with the word embedding as input;

[0051] a sentence-level context embedding extraction unit, configured to obtain sentence-level embedding information based on the word embedding, and extract the sentence-level context embedding using a second bidirectional long short-term memory network with the sentence-level embedding information as input;

[0052] A concatenation operation unit is configured to concatenate the global context embedding and the sentence-level context embedding to obtain the hierarchical context embedding.

[0053] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0054] The present invention provides a method and system for knowledge enhancement representation of electric power dispatching commands based on graph neural networks. The knowledge enhancement representation technology based on graph neural networks is adopted to enhance the interpretability of the interaction between power grid entities and dispatching commands, and also provides a knowledge enhancement method for the construction of knowledge graphs in downstream tasks. This method overcomes the problems of traditional pre-training models, enhances the ability to cope with common sense knowledge, and has good decoupling, which is conducive to the construction of electric power dispatching reasoning services. This solution performs well in downstream tasks, such as rating prediction and explanation generation of electric power dispatching systems. Compared with simple graph structures, the rating prediction after adopting the method in this article is more accurate, and the text generated by the explanation is more intuitive and easy for users to understand. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0056] Figure 1 A flowchart of a method for enhancing the representation of electric power dispatch command knowledge based on a graph neural network, provided in the first embodiment of the present invention;

[0057] Figure 2 This is a schematic diagram of the method of steps S1 to S4 provided in the first embodiment of the present invention. DETAILED DESCRIPTION

[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0059] The purpose of the present invention is to provide a method and system for knowledge enhancement representation of power dispatching commands based on graph neural networks. The knowledge enhancement representation technology based on graph neural networks is adopted to enhance the interpretability of the interaction between power grid entities and dispatching commands, and also provide a reliable knowledge enhancement method for the construction of knowledge graphs in downstream tasks.

[0060] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0061] Example 1

[0062] like Figure 1 and 2 As shown, this embodiment provides a method for enhancing the representation of power dispatch command knowledge based on a graph neural network, the method comprising:

[0063] S1: Obtain relevant text documents in the power grid system; the relevant text documents include power grid entity text documents, dispatch command text documents and power grid-dispatch interaction text documents.

[0064] To learn semantic representations of interactions between power grid entities and dispatchers, grid entity documents and dispatch command documents are sequentially pooled according to the execution time of dispatch commands, forming three types of text documents: grid entities, dispatch commands, and grid-dispatcher interactions. Since the aggregated documents have semantic sequential dependencies, further knowledge-enhanced semantic representation learning is performed on these three types of documents.

[0065] S2: For each of the relevant text documents, extract the global context embedding C g and sentence-level contextual embedding C s , and get the hierarchical context embedding C h .

[0066] Wherein, step S2 specifically includes:

[0067] (21) For each of the related text documents, construct a word embedding, take the word embedding as input, and use a first bidirectional long short-term memory network to extract the global context embedding.

[0068] (22) Acquire sentence-level embedding information based on the word embedding, and use the sentence-level embedding information as input to extract the sentence-level context embedding using a second bidirectional long short-term memory network.

[0069] (23) Concatenate the global context embedding and the sentence-level context embedding to obtain the hierarchical context embedding.

[0070] Furthermore, the more specific process of step S2 is:

[0071] For any type of document D, let the word embedding sequence be [w1,w2,···,w d ]. m ∈Rdw is generated by pre-training embedding, m=1,2,..,d; each w m Each corresponds to a vocabulary. dw represents the size of the word embedding. BiLSTM (bidirectional long short-term memory network) is used to obtain global context information, i.e. C g =BiLSTM([w1,w2,···,w d ]). At the same time, using Get sentence-level embedding information s d represents the total number of sentences in the document; q = 1, 2, ..., |s q |;|s q | indicates sentence s q The total number of words in the sentence is composed of words; z In the sentence s q The zth word in ;. Similarly, BiLSTM is used to obtain the sentence-level context embedding Cs=BiLSTM(S). The global context embedding and the sentence-level context embedding are concatenated to obtain the hierarchical context embedding C h =[C g , C s ].

[0072] S3: Using the knowledge base, retrieve the semantic knowledge associated with each of the relevant text documents, obtain the knowledge perception representation K corresponding to each of the relevant text documents, and embed C based on the hierarchical context h , the global context embedding C g The knowledge-aware representation K is used to obtain a high-level semantic representation of power grid entities, a high-level semantic representation of dispatch commands, and a high-level semantic representation of power grid-dispatch interactions.

[0073] In step S3, the semantic knowledge associated with each of the related text documents is retrieved using the knowledge base to obtain the knowledge perception representation corresponding to each of the related text documents, which specifically includes:

[0074] (301) For each word in each of the related text documents, the first N knowledge concepts of each word are retrieved from the knowledge base to obtain the embedding of the knowledge concept of each word; the embedding of the knowledge concept of each word includes N elements.

[0075] In this step, the knowledge base (KB) is used to enhance semantic representation learning. For each word w in the document m , retrieve the top N relevant concepts from the knowledge base.

[0076] (302) For each word in each of the related text documents, the correlation coefficient of the knowledge concept is calculated using the attention mechanism based on the embedding of the knowledge concept, and the knowledge concept perception embedding is calculated based on the correlation coefficient of the knowledge concept.

[0077] The attention mechanism is used to learn the correlation between these N concepts and obtain the word w according to the following algorithm i The knowledge-aware semantic representation ckm of word w is constructed. m and the mth retrieved knowledge concept c of the mth wordmn The linear relationship, n = 1, 2, ..., N; through the tanh activation function, and then normalized to the 0-1 space by the softmax function, where W w , W c is the learning parameter matrix of the attention mechanism, b k is the bias term.

[0078]

[0079] α mn =softmax(O mm )

[0080]

[0081] The output after the Attention mechanism is C k Since the top-1 concept is the original word, the knowledge perception is embedded in C k The sequence is fed into the BiLSTM layer C k =[c k 1, c k 2,…,c k d ], and obtain the knowledge perception representation K = BiLSTM (C k ).

[0082] Wherein, step (301) comprises:

[0083] 1) For each word in each of the related text documents, a linear relationship is established between each word and each element of the embedding of the knowledge concept, and activation processing data is obtained through a tanh activation function.

[0084] 2) Applying a softmax function to the activation processing data corresponding to each word obtains the correlation coefficient of the knowledge concept corresponding to each word.

[0085] 3) Calculate the knowledge concept perception embedding corresponding to each word based on the knowledge concept embedding of each word and the correlation coefficient of the knowledge concept.

[0086] (303) The knowledge concept perception corresponding to each word in each of the related text documents is embedded as input, and the knowledge perception representation K corresponding to each of the related text documents is extracted using a third bidirectional long short-term memory network.

[0087] In step S3, based on the hierarchical context embedding C h , the global context embedding C g The knowledge-aware representation K is used to obtain a high-level semantic representation of power grid entities, a high-level semantic representation of dispatch commands, and a high-level semantic representation of power grid-dispatch interactions.

[0088] The multi-head attention mechanism is used to further integrate the knowledge-aware embedding representation and the global context embedding representation C g , to obtain a semantic representation enhanced by deep knowledge. In which, the knowledge-aware representation K is embedded with the context C g The fusion is fused embedding, C f =sum(C g , K), which is used as the keys in the attention mechanism, the knowledge perception representation K as the values, and the hierarchical context embedding C h As the query. The enhanced semantic representation C is obtained through the multi-head attention mechanism:

[0089] C=W h [h1, h2, ..., h h ]

[0090] h t =Attention(C h W t Q , C f W t K , KW t V ).

[0091] Where W h , W t Q , W t K , W t V is the learning parameter of multi-head attention. W t represents the tth attention head h t The learning parameters are: the subscript h represents the number of heads, t = 1, 2, ..., h. Therefore, for the three types of text documents, the same semantic learning process is performed to obtain high-level semantic representations C, including the high-level semantic representation C of the grid entity u. u , the high-level semantic representation C of the scheduling command v v , High-level semantic representation of grid entity-dispatch command interaction uv .

[0092] Wherein, step (303) specifically includes:

[0093] (311) For each of the relevant text documents, embed the knowledge-aware representation K and the global context into C g Fusion gets fusion embedding C f .

[0094] (312) The fusion embedding is used as the keys of the multi-head attention mechanism, the knowledge perception representation K is used as the values ​​of the multi-head attention mechanism, and the hierarchical context embedding C is used as the h For the query of the multi-head attention mechanism, the multi-head attention mechanism is applied to obtain a high-level semantic representation; the high-level semantic representation includes a high-level semantic representation of the power grid entity, a high-level semantic representation of the dispatching command, and a high-level semantic representation of the power grid-dispatching interaction.

[0095] S4: Based on the high-level semantic representation of the power grid entity, the high-level semantic representation of the dispatch command and the high-level semantic representation of the power grid-dispatching interaction, the knowledge-enhanced semantic representation of the power grid entity, the knowledge-enhanced semantic representation of the dispatch command and the knowledge-enhanced semantic representation of the power grid-dispatching interaction are obtained.

[0096] Wherein, step S4 specifically includes:

[0097] (41) One-hot encoding is used to represent the encoding of power grid entities and dispatch commands respectively, and a fully connected layer mapping is used to convert the sparse one-hot encoding representation of power grid entities and the sparse one-hot encoding representation of dispatch commands into dense representations respectively, to obtain the embedded representation of power grid entities and the embedded representation of dispatch commands.

[0098] One-hot representation is used to encode the grid entity / dispatching command, and a fully connected layer mapping is used to convert the sparse one-hot representation into a dense representation as the inherent representation u / v of the grid entity / dispatching command.

[0099] (42) A knowledge-enhanced semantic representation of the power grid entity is obtained by applying a series operation based on the embedded representation of the power grid entity and the high-level semantic representation of the power grid entity, and a knowledge-enhanced semantic representation of the scheduling command is obtained by applying a series operation based on the embedded representation of the scheduling command and the high-level semantic representation of the scheduling command.

[0100] (43) Obtaining a knowledge-enhanced semantic representation of the power grid-dispatching interaction based on the high-level semantic representation of the power grid-dispatching interaction.

[0101] For a power grid entity u, its high-level semantic representation C u Combined with the inherent representation u of the power grid entity, the knowledge-enhanced semantic representation x is obtained u Similarly, x v is the knowledge-enhanced semantic representation of the corresponding scheduling command v, x uv It is a knowledge-enhanced semantic representation of the interaction between power grid entities and dispatch commands. These knowledge-enhanced semantic representations will be used to initialize the power dispatch command graph in the next step.

[0102] S5: Constructing a power dispatch command graph according to the knowledge-enhanced semantic representation of the power grid entity, the knowledge-enhanced semantic representation of the dispatch command, and the knowledge-enhanced semantic representation of the power grid-dispatching interaction.

[0103] Wherein, step S5 specifically includes:

[0104] (51) Based on the grid-dispatching interaction relationship in the power grid system, a power dispatching command behavior graph is constructed; the nodes in the power dispatching command behavior graph include grid entity nodes and dispatching command nodes, and the edges in the power dispatching command behavior graph represent the grid-dispatching interaction relationship.

[0105] (52) Initializing the embedding of the power grid entity node to the knowledge-enhanced semantic representation of the power grid entity, initializing the embedding of the dispatch command node to the knowledge-enhanced semantic representation of the dispatch command, and initializing the power grid-dispatch interaction relationship represented by the edge to the knowledge-enhanced semantic representation of the power grid-dispatch interaction, thereby obtaining the power dispatch command graph.

[0106] S6: Obtain a relationship representation between each dispatching command in the power dispatching command graph based on a graph neural network.

[0107] Wherein, step S6 specifically includes:

[0108] (61) Input the node information and edge information in the power dispatch command graph into the graph neural network.

[0109] (62) Determine the neighbor nodes of each node of the graph neural network, and determine the information propagation representation of each of the neighbor nodes.

[0110] (63) Aggregate the current information representation of each node with the corresponding information propagation representation of the neighboring node to obtain the updated information of each node after the first information propagation.

[0111] (64) Aggregate the updated information representation of each node with the updated information propagation representation of the corresponding neighboring node to obtain the updated information representation of each node after the lth information propagation. l = 2, ..., L; L is the preset number of information propagation iterations.

[0112] (65) Determine whether the current number of information propagation iterations l reaches the preset number of information propagation iterations.

[0113] (651) If so, then the updated information representation of each node after the lth information propagation is output, and the relationship representation between each dispatching command in the power dispatching command graph is obtained based on the updated information representation of each node after the lth information propagation and the edge relationship representation between nodes.

[0114] (652) If not, let l=l+1 and return to the step of "aggregating the update information representation of each current node with the update information propagation representation of the corresponding neighbor node."

[0115] Among them, the process of information dissemination based on graph neural network (GNN) is as follows:

[0116] First, for each node in the graph neural network, find the neighbors of each node and consider the first-order information propagation between the self-networks. The self-network is represented by Ne i ={(e i , r ij , e j )|(e i , r ij , e j )∈G}, G represents a graph neural network, where e i is the head node. In order to characterize the node e i The first-order neighbor structure of the ego network is calculated as follows:

[0117]

[0118]

[0119]

[0120] π{e i , r ij , e j}Measure from the head node e i Propagate to neighboring nodes e j Information, conditional on the relationship r ij .e i represents the current node; e j represents the neighbor node; r ij represents the relationship between the current node and the corresponding neighbor node; W t 、W a 、W b 、W c are weights respectively; b is bias; N ei is the neighborhood structure representation of node i, σ represents the nonlinear activation function, such as tanh, ReLU. β is the activation function of node e. i Normalize all triples in the ego network π{e i , r ij , e j Finally, by aggregating the information representation of the neighbors in the ego network with β, the information representation E propagated from the ego network is obtained. NeiAfter obtaining the first-order information propagation, the next step is to use the aggregation function φ(e i , E Nei ) Aggregation node represents e i and its ego network representation E Nei Due to the superior performance of the sum aggregator, the sum aggregator is used to sum the two representations, and the following nonlinear transformation is used to obtain the updated information representation of each node after one information propagation:

[0121]

[0122] Where W1 and b1 are the trainable weights and biases of the graph neural network.

[0123] To explore high-order proximities, multi-hop reasoning is performed by stacking multiple propagation layers and recursively collecting information passed from multi-hop neighbors. In the lth iteration, the node representation is defined as follows.

[0124]

[0125] Among them, e l-1 is the node e obtained after the previous information propagation i Information representation collects messages passed from l-1 hop neighbors. After multi-hop reasoning, the node (grid / dispatch) and relationship representations are obtained from the last iteration of information propagation. The relationship representation between each dispatch command in the power dispatch command graph is obtained and will be further used for downstream tasks such as rating prediction and explanation generation.

[0126] During multiple information dissemination processes, each node will update its information after each dissemination, and then proceed to the next information dissemination based on the updated information of each node. Information dissemination here refers to updating each node's information by aggregating its current self-information with the current information of its neighboring nodes.

[0127] In this embodiment, in the current power grid system, various deep learning models contain deeply nested network structures and lack interpretability and decoupling. However, interpretable and decoupled models are more transparent and trustworthy, and have better application performance. Compared with common knowledge enhancement representation technologies, the addition of graph neural network models enables the model to:

[0128] (1) Enhance model interpretability through graph reasoning paths;

[0129] (2) learning knowledge-enhanced semantic embedding from aspects of grid-dispatching interactions;

[0130] (3) further used for downstream tasks in power dispatch, such as rating prediction and explanation generation;

[0131] Overall, compared with the traditional pre-trained knowledge enhancement model, this knowledge enhancement representation technology makes the interaction between power grid entities and dispatch commands more explainable and credible.

[0132] In this embodiment, (1) a bidirectional long short-term memory network is used to obtain a hierarchical contextual embedding representation; (2) a power dispatch command graph is constructed, and the hierarchical embedding representation is semantically enhanced based on a graph neural network; (3) high-order connection information in the graph structure is constructed to provide good interpretability and decoupling for downstream tasks; these methods use knowledge enhancement representation technology based on graph neural networks to enhance the interpretability of the interaction between power grid entities and dispatch commands, and also provide a knowledge enhancement method for the construction of knowledge graphs in downstream tasks. This method overcomes the problems of traditional pre-training models, enhances the ability to cope with common sense knowledge, and has good decoupling, which is conducive to the construction of power dispatch reasoning services. This solution performs well in downstream tasks, such as rating prediction and explanation generation of power dispatch systems. Compared with simple graph structures, the rating prediction after using the method in this paper is more accurate, and the text generated by the explanation is more intuitive and easy for users to understand.

[0133] Example 2

[0134] This embodiment provides a knowledge-enhanced representation system for power dispatching commands based on a graph neural network, the system comprising:

[0135] The data acquisition module is used to acquire relevant text documents in the power grid system; the relevant text documents include power grid entity text documents, dispatch command text documents and power grid-dispatch interaction text documents.

[0136] The hierarchical context embedding extraction module is used to extract the global context embedding and the sentence-level context embedding for each of the relevant text documents to obtain a hierarchical context embedding.

[0137] The hierarchical context embedding extraction module specifically includes:

[0138] A global context embedding extraction unit is used to construct a word embedding for each of the related text documents, take the word embedding as input, and use a first bidirectional long short-term memory network to extract the global context embedding.

[0139] A sentence-level context embedding extraction unit is used to obtain sentence-level embedding information based on the word embedding, and to extract the sentence-level context embedding using a second bidirectional long short-term memory network with the sentence-level embedding information as input.

[0140] A concatenation operation unit is configured to concatenate the global context embedding and the sentence-level context embedding to obtain the hierarchical context embedding.

[0141] A high-level semantic representation module is used to use a knowledge base to retrieve semantic knowledge associated with each of the relevant text documents, obtain a knowledge-aware representation corresponding to each of the relevant text documents, and obtain a high-level semantic representation of power grid entities, a high-level semantic representation of dispatch commands, and a high-level semantic representation of power grid-dispatch interactions based on the hierarchical context embedding, the global context embedding, and the knowledge-aware representation.

[0142] A knowledge-enhanced semantic representation module is used to obtain the knowledge-enhanced semantic representation of the power grid entity, the knowledge-enhanced semantic representation of the dispatch command and the knowledge-enhanced semantic representation of the power grid-dispatching interaction based on the high-level semantic representation of the power grid entity, the high-level semantic representation of the dispatch command and the high-level semantic representation of the power grid-dispatching interaction.

[0143] The power dispatch command graph construction module is used to construct a power dispatch command graph based on the knowledge-enhanced semantic representation of the power grid entity, the knowledge-enhanced semantic representation of the dispatch command, and the knowledge-enhanced semantic representation of the power grid-dispatching interaction.

[0144] The module for representing the relationship between dispatching commands is used to obtain the relationship representation between the dispatching commands in the power dispatching command graph based on the graph neural network.

[0145] Example 3

[0146] This embodiment provides an electronic device, including a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the power dispatch command knowledge enhancement representation method based on graph neural network in embodiment one.

[0147] Optionally, the above-mentioned electronic device may be a server.

[0148] In addition, an embodiment of the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the graph neural network-based power dispatch command knowledge enhancement representation method of embodiment one.

[0149] Embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0150] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0151] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0152] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0153] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0154] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only intended to help understand the method and core concept of the present invention. At the same time, those skilled in the art will find that the specific implementation methods and application scopes may vary based on the concept of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.

Claims

1. A knowledge-enhanced representation method for power dispatching commands based on graph neural networks, characterized in that: The method comprises: Obtain relevant text documents in the power grid system; the relevant text documents include power grid entity text documents, dispatch command text documents and power grid-dispatching interaction text documents; For each of the relevant text documents, extracting a global context embedding and a sentence-level context embedding to obtain a hierarchical context embedding; Retrieving semantic knowledge associated with each of the relevant text documents using a knowledge base to obtain a knowledge-aware representation corresponding to each of the relevant text documents, and obtaining a high-level semantic representation of a power grid entity, a high-level semantic representation of a dispatch command, and a high-level semantic representation of a power grid-dispatcher interaction based on the hierarchical context embedding, the global context embedding, and the knowledge-aware representation; Obtaining a knowledge-enhanced semantic representation of the grid entity, a knowledge-enhanced semantic representation of the dispatch command, and a knowledge-enhanced semantic representation of the grid-dispatching interaction based on the high-level semantic representation of the grid entity, the high-level semantic representation of the dispatch command, and the high-level semantic representation of the grid-dispatching interaction; Constructing a power dispatch command graph based on the knowledge-enhanced semantic representation of the power grid entity, the knowledge-enhanced semantic representation of the dispatch command, and the knowledge-enhanced semantic representation of the power grid-dispatching interaction; Obtaining a relationship representation between each dispatch command in the power dispatch command graph based on a graph neural network; The relationship representation between the dispatching commands in the power dispatching command graph is obtained based on the graph neural network, specifically including: Inputting node information and edge information in the power dispatch command graph into the graph neural network; Determining neighbor nodes of each node of the graph neural network, and determining an information propagation representation of each of the neighbor nodes; Aggregate the current information representation of each node with the corresponding information propagation representation of the neighboring node to obtain the updated information of each node after the first information propagation; Aggregate the updated information representation of each current node with the updated information propagation representation of the corresponding neighbor node to obtain the first l The updated information representation of each node after the information propagation; l =2,...,L; L is the preset number of information propagation iterations; Determine the current number of information propagation iterations l Whether the preset number of information propagation iterations has been reached; If so, output l The updated information of each node after the information propagation is represented by l The updated information representation of each node after the information propagation and the edge relationship representation between nodes are used to obtain the relationship representation between the dispatching commands in the power dispatching command graph; If not, then l = l +1, and return to step "aggregating the update information representation of each current node with the update information propagation representation of the corresponding neighbor node".

2. The method according to claim 1, characterized in that For each of the relevant text documents, extract the global context embedding and sentence-level context embedding to obtain a hierarchical context embedding, specifically including: For each of the related text documents, construct a word embedding, using the word embedding as input and extracting the global context embedding using a first bidirectional long short-term memory network; Obtaining sentence-level embedding information based on the word embedding, and extracting the sentence-level context embedding using a second bidirectional long short-term memory network with the sentence-level embedding information as input; The global context embedding and the sentence-level context embedding are concatenated to obtain the hierarchical context embedding.

3. The method according to claim 1, characterized in that Using the knowledge base, retrieving semantic knowledge associated with each of the related text documents to obtain a knowledge perception representation corresponding to each of the related text documents, specifically including: For each word in each of the relevant text documents, retrieve the top N knowledge concepts of each word from the knowledge base to obtain the embedding of the knowledge concept of each word; the embedding of the knowledge concept of each word includes N elements; For each word in each of the relevant text documents, calculate a correlation coefficient of the knowledge concept using an attention mechanism based on the embedding of the knowledge concept, and calculate a knowledge concept-aware embedding based on the correlation coefficient of the knowledge concept; The knowledge concept perception corresponding to each word in each of the related text documents is embedded as input, and the knowledge perception representation corresponding to each of the related text documents is extracted using a third bidirectional long short-term memory network.

4. The method according to claim 3, characterized in that For each word in each of the relevant text documents, a correlation coefficient of the knowledge concept is calculated using an attention mechanism based on the embedding of the knowledge concept, and a knowledge concept-aware embedding is calculated based on the correlation coefficient of the knowledge concept, specifically including: For each word in each of the relevant text documents, a linear relationship is established between each word and each element of the embedding of the knowledge concept, and activation processing data is obtained through a tanh activation function; Applying a softmax function to the activation processing data corresponding to each word to obtain a correlation coefficient of the knowledge concept corresponding to each word; The knowledge concept perception embedding corresponding to each word is calculated based on the knowledge concept embedding of each word and the correlation coefficient of the knowledge concept.

5. The method according to claim 1, wherein Based on the hierarchical context embedding, the global context embedding and the knowledge-aware representation, a high-level semantic representation of a power grid entity, a high-level semantic representation of a dispatch command and a high-level semantic representation of a power grid-dispatching interaction are obtained, specifically including: For each of the related text documents, fusing the knowledge-aware representation and the global context embedding to obtain a fused embedding; The multi-head attention mechanism is applied with the fused embedding as the keys of the multi-head attention mechanism, the knowledge perception representation as the values ​​of the multi-head attention mechanism, and the hierarchical context embedding as the query of the multi-head attention mechanism to obtain a high-level semantic representation; the high-level semantic representation includes a high-level semantic representation of the power grid entity, a high-level semantic representation of the dispatch command, and a high-level semantic representation of the power grid-dispatching interaction.

6. The method according to claim 1, characterized in that Based on the high-level semantic representation of the power grid entity, the high-level semantic representation of the dispatch command, and the high-level semantic representation of the power grid-dispatching interaction, a knowledge-enhanced semantic representation of the power grid entity, a knowledge-enhanced semantic representation of the dispatch command, and a knowledge-enhanced semantic representation of the power grid-dispatching interaction are obtained, specifically including: Use one-hot encoding to represent the encoding of power grid entities and dispatch commands respectively, and use fully connected layer mapping to convert the sparse one-hot encoding representation of power grid entities and the sparse one-hot encoding representation of dispatch commands into dense representations respectively, to obtain the embedded representation of power grid entities and the embedded representation of dispatch commands; Applying a series operation based on the embedded representation of the power grid entity and the high-level semantic representation of the power grid entity to obtain a knowledge-enhanced semantic representation of the power grid entity, and applying a series operation based on the embedded representation of the scheduling command and the high-level semantic representation of the scheduling command to obtain a knowledge-enhanced semantic representation of the scheduling command; A knowledge-enhanced semantic representation of the power grid-dispatching interaction is obtained according to the high-level semantic representation of the power grid-dispatching interaction.

7. The method according to claim 1, characterized in that Constructing a power dispatch command graph according to the knowledge-enhanced semantic representation of the power grid entity, the knowledge-enhanced semantic representation of the dispatch command, and the knowledge-enhanced semantic representation of the power grid-dispatching interaction specifically includes: According to the grid-dispatching interaction relationship in the power grid system, a power dispatching command behavior graph is constructed; the nodes in the power dispatching command behavior graph include grid entity nodes and dispatching command nodes, and the edges in the power dispatching command behavior graph represent the grid-dispatching interaction relationship; The embedding of the grid entity node is initialized to the knowledge-enhanced semantic representation of the grid entity, the embedding of the dispatch command node is initialized to the knowledge-enhanced semantic representation of the dispatch command, and the grid-dispatch interaction relationship representing the edge is initialized to the knowledge-enhanced semantic representation of the grid-dispatch interaction to obtain the power dispatch command graph.

8. A knowledge-enhanced representation system for power dispatching commands based on graph neural networks, characterized in that: The system comprises: A data acquisition module is used to acquire relevant text documents in the power grid system; the relevant text documents include power grid entity text documents, dispatch command text documents and power grid-dispatching interaction text documents; A hierarchical context embedding extraction module is used to extract a global context embedding and a sentence-level context embedding for each of the relevant text documents to obtain a hierarchical context embedding; a high-level semantic representation module, configured to retrieve semantic knowledge associated with each of the relevant text documents using a knowledge base, obtain a knowledge-aware representation corresponding to each of the relevant text documents, and obtain a high-level semantic representation of a power grid entity, a high-level semantic representation of a dispatch command, and a high-level semantic representation of a power grid-dispatcher interaction based on the hierarchical context embedding, the global context embedding, and the knowledge-aware representation; A knowledge-enhanced semantic representation module is configured to obtain a knowledge-enhanced semantic representation of a power grid entity, a knowledge-enhanced semantic representation of a dispatch command, and a knowledge-enhanced semantic representation of a power grid-dispatching interaction based on the high-level semantic representation of the power grid entity, the high-level semantic representation of the dispatch command, and the high-level semantic representation of the power grid-dispatching interaction; a power dispatch command graph construction module, configured to construct a power dispatch command graph based on the knowledge-enhanced semantic representation of the power grid entity, the knowledge-enhanced semantic representation of the dispatch command, and the knowledge-enhanced semantic representation of the power grid-dispatching interaction; A dispatch command relationship representation module, configured to obtain a relationship representation between each dispatch command in the power dispatch command graph based on a graph neural network; The relationship representation between the dispatching commands in the power dispatching command graph is obtained based on the graph neural network, specifically including: Inputting node information and edge information in the power dispatch command graph into the graph neural network; Determining neighbor nodes of each node of the graph neural network, and determining an information propagation representation of each of the neighbor nodes; Aggregate the current information representation of each node with the corresponding information propagation representation of the neighboring node to obtain the updated information of each node after the first information propagation; Aggregate the updated information representation of each current node with the updated information propagation representation of the corresponding neighbor node to obtain the first l The updated information representation of each node after the information propagation; l =2,...,L; L is the preset number of information propagation iterations; Determine the current number of information propagation iterations l Whether the preset number of information propagation iterations has been reached; If so, output l The updated information of each node after the information propagation is represented by l The updated information representation of each node after the information propagation and the edge relationship representation between nodes are used to obtain the relationship representation between the dispatching commands in the power dispatching command graph; If not, then l = l +1, and return to step "aggregating the update information representation of each current node with the update information propagation representation of the corresponding neighbor node".

9. The system according to claim 8, characterized in that The hierarchical context embedding extraction module specifically includes: a global context embedding extraction unit, configured to construct a word embedding for each of the related text documents, and extract the global context embedding using a first bidirectional long short-term memory network with the word embedding as input; a sentence-level context embedding extraction unit, configured to obtain sentence-level embedding information based on the word embedding, and extract the sentence-level context embedding using a second bidirectional long short-term memory network with the sentence-level embedding information as input; A concatenation operation unit is configured to concatenate the global context embedding and the sentence-level context embedding to obtain the hierarchical context embedding.

Citation Information

Patent Citations

  • Knowledge enhancement recommendation method and system

    CN113158049A

  • Document-level entity relationship extraction method based on adaptive entity path perception

    CN114818682A