Intention recognition method and system based on scheduling semantic knowledge graph and electronic device
By constructing a sentence tree diagram in the field of power dispatching and utilizing models such as ERNIE-BiLSTM, TextCNN, and MaskTransformer, combined with power dispatching knowledge graphs, the problem of low accuracy in existing intent recognition methods is solved, and higher intent recognition accuracy is achieved.
Patent Information
- Application Number
- CN202310833223.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2043-07-07
AI Technical Summary
Existing intent recognition methods in the power regulation field do not fully incorporate the needs of the regulation field, and general pre-trained language models lack professional knowledge, resulting in low accuracy of intent recognition.
An intent recognition method based on the scheduling semantic knowledge graph is adopted. By constructing a sentence tree diagram, entities in the power scheduling knowledge graph are connected with questions. Models such as ERNIE-BiLSTM, TextCNN and MaskTransformer are used to identify intent types, and an entity-relationship visibility matrix is constructed to reduce noise interference.
It improves the accuracy of intent recognition in the field of power regulation, reduces the interference of noise data, and enhances the model's recognition ability in complex power grid dispatching scenarios.
Smart Images

Figure CN116881813B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intent recognition in power dispatching scenarios, and in particular to an intent recognition method, system, and electronic device based on a dispatching semantic knowledge graph. Background Technology
[0002] With the accelerated construction of new power systems and the significant increase in the proportion of renewable energy integration, the volatility, randomness, and weak support of renewable energy have increased grid uncertainty, leading to increasingly complex control operations. Traditional control methods are no longer adequate for these new power systems. Furthermore, the interconnectedness among various sectors of the power industry is becoming increasingly close, with the multi-structure coupling of generation, transmission, transformation, distribution, and consumption forming a vast knowledge system that dispatching and operation personnel struggle to master. Currently, control methods rely primarily on the personal experience of dispatching and operation personnel, resulting in low efficiency. Therefore, building a human-machine dialogue system in the power grid control field, enabling intelligent control through dialogue, reduces the burden on dispatching and operation personnel, and improves the intelligence level of power grid dispatching. Intent recognition methods in the power control field provide crucial technical support for building intelligent human-machine dialogue systems.
[0003] The existing methods for intent recognition in the field of power regulation have the following problems: (1) Intent recognition and slot filling are performed separately, without considering the use of slot filling task feature information to improve the performance of intent recognition. (2) Existing methods do not fully integrate the needs of the regulation field, and the general pre-trained language model lacks professional knowledge of the regulation field, which makes it prone to errors in intent recognition in the regulation field. Summary of the Invention
[0004] The purpose of this invention is to provide an intent recognition method, system, and electronic device based on scheduling semantic knowledge graphs, so as to improve the accuracy of intent recognition in the field of power regulation.
[0005] To achieve the above objectives, the present invention provides the following solution:
[0006] An intent recognition method based on scheduling semantic knowledge graph, comprising:
[0007] The system acquires questions of the intent type to be determined and a power dispatch knowledge graph. The questions include: how is power flow transfer handled during a line fault? What are the voltage changes during a line fault? What is the power flow transfer information during a line fault? How should a switch be handled if an auxiliary A or B protection on a line trips due to overvoltage? What are the handling methods for remote tripping and receiving signals from auxiliary A or B protection on a line? Or what are the key points for handling a line fault? Each question includes multiple entities. The power dispatch knowledge graph includes ontologies and the relationships between them. Each ontology includes faulty equipment, indicator names, operating status, generator sets, transformers, busbars, switches, power plants, substations, converter stations, switching stations, series compensation stations, and equipment models. One entity corresponds to one ontology.
[0008] Based on the question type to be determined and the power dispatch knowledge graph, a sentence tree diagram is constructed; the sentence tree diagram consists of question sentences that label the ontology and the relationships between each ontology.
[0009] Based on the sentence tree diagram, an intent recognition model is used to determine the intent type of the question. The intent types include querying grid power, querying grid load, querying power flow transfer information, querying safety control tripping information, querying frequency information, querying equipment voltage, querying equipment model, and querying key points for equipment fault handling. The intent recognition model is obtained by training an initial model using a training dataset. The training dataset includes sentence tree diagrams labeled with intent types. The initial model includes an entity-relationship matrix calculation module, an ERNIE-BiLSTM layer, a TextCNN layer, a MaskTransformer layer, a fully connected layer, and a classifier. The ERNIE-BiLSTM layer and the TextCNN layer are connected. The entity-relationship matrix calculation module is connected to the Mask Transformer layer. The ERNIE-BiLSTM layer is also connected to the Mask Transformer layer. Both the TextCNN layer and the Mask Transformer layer are connected to the fully connected layer. The fully connected layer is connected to the classifier.
[0010] Optionally, based on the question of the intent type to be determined and the power dispatch knowledge graph, a sentence tree diagram is constructed, specifically including:
[0011] Based on the power dispatch knowledge graph, determine the ontology corresponding to each entity in the question of the intent type to be determined and the relationship between the ontology;
[0012] Based on the ontology corresponding to each entity and the relationships between the ontologies, the questions of the intent type to be determined are labeled to obtain a sentence tree diagram.
[0013] Optionally, based on the sentence tree diagram, an intent recognition model is used to determine the intent type of the question, specifically including:
[0014] Based on the sentence tree diagram, the global semantic feature vector of the sentence tree diagram is determined using the ERNIE-BiLSTM layer; the ERNIE-BiLSTM layer includes an ERNIE layer and a BiLSTM layer connected in sequence.
[0015] Based on the sentence tree diagram, the entity-relationship visibility matrix is determined using the entity-relationship matrix calculation module; the entity-relationship matrix calculation module is... Among them, wi and w j For entities in the sentence tree diagram, 1 represents w. i and w j There is a relationship between them, where 0 represents w. i and w j There is no relationship between them, but on the same branch, -∞ represents w. i and w j There is no relationship between them, and they are on the same branch;
[0016] Based on the global semantic feature vector and the entity-relationship visibility matrix, the global features of the sentence tree diagram are determined using the MaskTransformer layer;
[0017] Using the TextCNN layer, local features of the global semantic feature vector are determined;
[0018] The global features and the local features are fused to obtain a fused vector.
[0019] The fused vector is passed through the fully connected layer, and then the classifier is used to determine the intent type of the question.
[0020] Optionally, based on the sentence tree diagram, the global semantic feature vector of the sentence tree diagram is determined using the ERNIE-BiLSTM layer, specifically including:
[0021] Based on the ERNIE layer, the tag embedding vector of the sentence tree diagram is determined;
[0022] Determine the soft position embedding vector for each character in each sentence tree diagram;
[0023] The embedding vector of the sentence tree diagram is determined based on the labeled embedding vector and the soft position embedding vector.
[0024] Based on the embedding vector, the global semantic feature vector is determined using a BiLSTM layer.
[0025] Optionally, the TextCNN layer is used to determine the local features of the global semantic feature vector, specifically including:
[0026] The global semantic feature vector is convolved by the first, second, and third convolutional layers of the TextCNN layer to obtain the global semantic feature vector after the first convolution, the global semantic feature vector after the second convolution, and the global semantic feature vector after the third convolution.
[0027] Using the max pooling layer of the TextCNN layer, the global semantic feature vectors after the first convolution, the second convolution, and the third convolution are processed respectively to obtain the processed global semantic feature vectors after the first convolution, the processed global semantic feature vectors after the second convolution, and the processed global semantic feature vectors after the third convolution.
[0028] The global semantic feature vector after the first convolution, the global semantic feature vector after the second convolution, and the global semantic feature vector after the third convolution are mapped and fused to obtain the local features of the global semantic feature vector.
[0029] An intent recognition system based on scheduling semantic knowledge graph, comprising:
[0030] The data acquisition module is used to acquire questions of the intent type to be determined and a power dispatch knowledge graph. The questions include: how is the power flow transfer during a line fault? What are the voltage changes during a line fault? What is the power flow transfer information during a line fault? How should a switch be handled if an auxiliary A or B protection on a line trips due to overvoltage? What are the handling methods for remote tripping and receiving signals from auxiliary A or B protection on a line? Or what are the key points for handling a line fault? Each question includes multiple entities. The power dispatch knowledge graph includes ontologies and the relationships between them. Each ontology includes faulty equipment, indicator name, action status, generator set, transformer, busbar, switch, power plant, substation, converter station, switching station, series compensation station, and equipment model. One entity corresponds to one ontology.
[0031] The tree diagram construction module is used to construct a sentence tree diagram based on the question of the intent type to be determined and the power dispatch knowledge graph; the sentence tree diagram is a question that labels the ontology and the relationships between the ontology;
[0032] An intent determination module is used to determine the intent type of a question based on the sentence tree diagram and an intent recognition model. The intent types include querying grid power, querying grid load, querying power flow transfer information, querying safety control tripping information, querying frequency information, querying equipment voltage, querying equipment model, and querying key points for equipment fault handling. The intent recognition model is obtained by training an initial model using a training dataset. The training dataset includes sentence tree diagrams labeled with intent types. The initial model includes an entity-relationship matrix calculation module, an ERNIE-BiLSTM layer, a TextCNN layer, a Mask Transformer layer, a fully connected layer, and a classifier. The ERNIE-BiLSTM layer and the TextCNN layer are connected. The entity-relationship matrix calculation module is connected to the Mask Transformer layer. The ERNIE-BiLSTM layer is also connected to the Mask Transformer layer. Both the TextCNN layer and the Mask Transformer layer are connected to the fully connected layer. The fully connected layer is connected to the classifier.
[0033] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor runs the computer program to enable the electronic device to perform the above-described intent recognition method based on a scheduling semantic knowledge graph.
[0034] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned intent recognition method based on a scheduling semantic knowledge graph.
[0035] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0036] The present invention relates to an intent recognition method, system, and electronic device based on a scheduling semantic knowledge graph. First, the entities in the questions in each round of dialogue are linked with the ontology in the power scheduling knowledge graph to form a sentence tree diagram. Then, the intent recognition model is used to determine the intent type of the sentence tree diagram. In addition, during the recognition process, an entity-relationship visibility matrix is constructed to reduce noise data interference and improve the accuracy of intent recognition. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 The flowchart of the intent recognition method based on scheduling semantic knowledge graph provided by the present invention is shown below.
[0039] Figure 2 The sentence tree diagram constructed for this invention;
[0040] Figure 3 This is a structural diagram of the intent recognition model of the present invention. Detailed Implementation
[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] The purpose of this invention is to provide an intent recognition method, system, and electronic device based on scheduling semantic knowledge graphs, so as to improve the accuracy of intent recognition in the field of power regulation.
[0043] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0044] Unlike intent recognition in general domain scenarios, intent recognition in power dispatch scenarios is more complex. Pre-trained language models trained in general domains perform poorly in vertical domains. Therefore, it is necessary to combine power dispatch knowledge graphs to integrate domain knowledge into language representations to improve intent recognition performance.
[0045] like Figure 1 As shown, the intent recognition method based on scheduling semantic knowledge graph provided by the present invention includes:
[0046] Step 101: Obtain the question type to be determined and the power dispatch knowledge graph; the question is: how is the power flow transfer in a line fault?, the voltage change in a line fault?, power flow transfer information in a line fault?, overvoltage action of auxiliary A or auxiliary B protection on a line tripping a switch, how to handle it?, the handling method for remote tripping of auxiliary A or auxiliary B protection on a line?, or what are the key points for handling a line fault?; the question includes multiple entities; the power dispatch knowledge graph includes entities and the relationships between entities; the entities include faulty equipment, indicator name, action status, generator set, transformer, bus, switch, power plant, substation, converter station, switching station, series compensation station, and equipment model; one entity corresponds to one entity. The naming rule for lines is voltage level + location name + number; the naming rule for switches is voltage level + location name + line number + switch number.
[0047] In practical applications, given a question S = {w1, w2, ..., w...} n}, where n is the number of characters in the sentence.
[0048] In this embodiment, the questions are mainly divided into (1) query equipment information type, such as "How is the power flow transfer in a certain line fault", "Voltage change in a certain line fault" and "Power flow transfer information in a certain line fault", etc., and (2) fault handling key points type, such as "If the auxiliary A (B) protection of a certain line trips due to overvoltage, how should it be handled?", "How to handle the remote tripping of the auxiliary A (B) protection of a certain line?" and "What are the key points for handling a certain line fault?" etc.
[0049] Step 102: Construct a sentence tree diagram based on the question of the intent type to be determined and the power dispatch knowledge graph; the sentence tree diagram is a question that marks the ontology and the relationship between each ontology.
[0050] As an optional implementation, step 102 specifically includes:
[0051] Based on the power dispatch knowledge graph, the ontology corresponding to each entity in the question of the intent type to be determined and the relationship between the ontology are determined.
[0052] Based on the ontology corresponding to each entity and the relationships between the ontologies, the questions of the intent type to be determined are labeled to obtain a sentence tree diagram.
[0053] In practical applications, the triples (w) corresponding to all entities in S are searched from the power dispatch knowledge graph. i ,r ik ,w k ), where w i For the i-th entity or the i-th ontology, w k For the k-th entity or the k-th ontology, r ik This refers to the relationship between the two.
[0054] Taking the question "How does the power flow transfer work during a line fault?" as an example, in the power dispatch knowledge graph, "a line" corresponds to the "faulty equipment" ontology, "power flow" corresponds to the "index name" ontology, and "transfer" corresponds to the "action status" ontology. There is a relationship "inclusion" between "faulty equipment" and "index name". Therefore, we obtain the triple (faulty equipment, inclusion, index name) and the entity corresponding to the ontology "action status".
[0055] Add the triples and corresponding ontologies of all entities to the question S, and construct a sentence tree diagram t. Taking the question "How does the power flow transfer occur during a line fault?" as an example, the constructed sentence tree is as follows: Figure 2As shown, [CLS] is the initial label for the question, which can be used as a classification label. The vertical solid line represents the ontology corresponding to the entity, and the arrow represents the relationship between the ontology. The sentence tree constructed in step 1 is the basis for constructing the entity-relationship visibility matrix.
[0056] Step 103: Based on the sentence tree diagram, use the intent recognition model to determine the intent type of the question; the intent types include querying grid power, querying grid load, querying power flow transfer information, querying safety control tripping information, querying frequency information, querying equipment voltage, querying equipment model, and querying key points for equipment fault handling; wherein, the intent recognition model is obtained by training an initial model using a training dataset; the training dataset includes sentence tree diagrams with labeled intent types; such as Figure 3 As shown, the initial model includes an entity-relationship matrix calculation module, an ERNIE-BiLSTM layer, a TextCNN layer, a Mask Transformer layer, a fully connected layer, and a classifier. The ERNIE-BiLSTM layer and the TextCNN layer are connected; the entity-relationship matrix calculation module is connected to the Mask Transformer layer; the ERNIE-BiLSTM layer is also connected to the Mask Transformer layer; both the TextCNN layer and the Mask Transformer layer are connected to the fully connected layer; and the fully connected layer is connected to the classifier. After determining the intent type, it is handed over to the downstream model for subtasks, such as question answering or dialogue.
[0057] As an optional implementation, step 103 specifically includes:
[0058] Step 1031: Based on the sentence tree diagram, use the ERNIE-BiLSTM layer to determine the global semantic feature vector of the sentence tree diagram; the ERNIE-BiLSTM layer includes an ERNIE layer and a BiLSTM layer connected in sequence.
[0059] In practical applications, based on the sentence tree diagram, the global semantic feature vector of the sentence tree diagram for each round of dialogue is obtained through the ERNIE-BiLSTM layer.
[0060] As an optional implementation, step 1031 specifically includes:
[0061] Based on the ERNIE layer, the tag embedding vector of the sentence tree diagram is determined.
[0062] Determine the soft position embedding vector for each character in each sentence tree diagram.
[0063] The embedding vector of the sentence tree diagram is determined based on the labeled embedding vector and the soft position embedding vector.
[0064] Based on the embedding vector, the global semantic feature vector is determined using a BiLSTM layer.
[0065] Since ERNIE cannot directly parse tree structures, soft-position embedding is used instead of the original position embedding to preserve the structural information of the sentence tree diagram. The specific method for obtaining the global semantic representation of the sentence tree (the global semantic feature vector of the sentence tree diagram) is as follows:
[0066] (1) Obtain the token embedding representation (token embedding vector) of the sentence tree diagram t by querying the ERNIE vocabulary. Specifically, firstly, the branches of the sentence tree are concatenated to the corresponding tokens, and the original tokens are shifted sequentially; secondly, the flattened sentence tree tokens are input into the ERNIE layer; finally, the token embedding vector is obtained. Taking the question "How does the power flow transfer occur during a line fault?" as an example, the dimension of the obtained token embedding vector is [10, 768]. Here, 10 represents the number of tokens, and 768 represents the vector dimension.
[0067] (2) Calculate the soft-position embedding representation (soft position embedding vector) for each character in the sentence tree diagram t. Unlike position embedding, soft-position embedding encodes each branch, not the entire sequence. Taking the question "How does the power flow transfer occur during a line fault?" as an example, the encoded sequence is [0,1,2,2,3,4,5,5,6,6,7]. Inputting it into the ERNIE layer yields a soft position embedding vector with dimensions [10,768]. Here, 10 represents the number of tokens, and 768 represents the vector dimension.
[0068] (3) The token embedding and soft-position embedding of the sentence tree diagram t are added together to obtain the embedding representation (embedding vector) of the sentence tree diagram. Taking the question "How does the power flow transfer occur during a line fault?" as an example, the dimension of the obtained embedding vector is [2, 10, 768].
[0069] (4) The embedded representation of the sentence tree diagram of each round of dialogue is input into a Bidirectional Long Short-Term Memory (BiLSTM) network to obtain the context semantic representation vector sequence (global semantic feature vector) of the sentence tree of each round of dialogue E = (e1, e2, ..., e n ), where e i The dimension number is 768, where n is the sum of the length of the question tag and the length of its corresponding ontology tag. Taking the question "How does the power flow transfer occur during a line fault?" as an example, the dimension of the obtained global semantic feature vector is [10, 768]. Here, 10 represents the number of tokens, and 768 represents the vector width.
[0070] Step 1032: Based on the sentence tree diagram, use the entity-relationship matrix calculation module to determine the entity-relationship visibility matrix.
[0071] In practical applications, to prevent the triples in the sentence tree diagram generated in step 102 from affecting the semantics of other tokens, this invention calculates an entity-relation visibility matrix based on the sentence tree diagram described in step 102. This limits the mutual visibility of tokens in the sentence tree diagram. The core idea is that the word embedding of a word only comes from the context of its same branch or its corresponding entity-relation branch, while words in different branches do not affect each other. The entity-relation visibility matrix is calculated using the following formula:
[0072]
[0073] Among them, w i For words in the sentence tree, 1 represents w i and w j There is a relationship between them, where 0 represents w. i and w j There is no relationship between them, but on the same branch, -∞ represents w. i and w j There is no relationship between them, nor are they on the same branch.
[0074] Taking the question "How does the power flow transfer occur during a line fault?" as an example, the entity-relationship visible matrix is shown in Table 1.
[0075] Table 1. Results of the Entity-Relationship Visibility Matrix
[0076]
[0077] Step 1033: Based on the global semantic feature vector and the entity-relationship visibility matrix, use the MaskTransformer layer to determine the global features of the sentence tree diagram.
[0078] In practical applications, based on the contextual semantic representation E of the sentence tree obtained in step 1301 and the entity-relationship visibility matrix M calculated in step 1302, the global features of the sentence tree diagram are extracted using Mask Transformer.
[0079] To utilize the structured information in the sentence tree diagram, this invention uses an entity-relationship visibility matrix to limit the visible area of the self-attention mechanism, achieving mask-self-attention. Under the premise of embedding external knowledge, it determines the degree of association between different time points and different characters, thereby extracting global features of the sentence tree diagram while avoiding additional noise interference.
[0080] The specific steps are as follows: Input the context semantic representation vector sequence E of the sentence tree diagram into the MaskTransformer layer, calculate mask-self-attention based on the entity-relationship visibility matrix M, and obtain the global feature vector sequence H = (h1, h2, ..., h) of the sentence tree from the output of the last hidden layer. n The specific calculation formula is as follows:
[0081] Q i+1 ,K i+1 V i+1 =H i W q H i W k H i W v
[0082]
[0083] H i+1 =S i+1 V i+1
[0084] Among them W q W k W v H are trainable parameters. i Q is the output of the hidden layer of the i-th layer. i Let K be the query vector of the i-th layer. i V is the key vector of the i-th layer. i Let S be the value vector of the i-th layer, M be the entity-relationship visibility matrix, and S be the value vector of the i-th layer. i Let M be the attention score of the i-th layer. Therefore, M ij When it is -∞, the representative word is w i and w jInvisible, after Sofrmax, its attention score is 0. And M... ij When it is 1 or 0, it represents the word w. i and w j There is a certain correlation, therefore the attention score calculation method in the above formula is maintained.
[0085] Taking the question "How does the power flow transfer occur during a line fault?" as an example, the resulting global feature vector has dimensions [10, 768]. Here, 10 represents the number of tokens, and 768 represents the vector width.
[0086] Step 1034: Use the TextCNN layer to determine the local features of the global semantic feature vector.
[0087] In practical applications, TextCNN extracts features from text by using filters of different sizes, thereby extracting local features of varying sizes. First, convolutional kernels of sizes 3, 4, and 5 are applied to the contextual semantic representation E of the sentence tree. Second, max pooling is used to compress the vector after convolution, selecting the maximum value from the extracted feature vectors to replace the entire feature vector. Finally, the three local feature maps obtained from the three convolutional kernels are fused to obtain a local feature vector sequence C = (c1, c2, ..., c...). n Taking the question "How does the power flow transfer occur during a line fault?" as an example, the local feature dimensions are [1, 256, 768]. Here, 1 is a fixed value, 256 represents the text length (which is also a fixed value), and 768 represents the vector width.
[0088] As an optional implementation, step 1034 specifically includes:
[0089] The global semantic feature vector is convolved by the first, second, and third convolutional layers of the TextCNN layer to obtain the global semantic feature vector after the first convolution, the global semantic feature vector after the second convolution, and the global semantic feature vector after the third convolution.
[0090] Using the max pooling layer of the TextCNN layer, the global semantic feature vectors after the first convolution, the second convolution, and the third convolution are processed respectively to obtain the processed global semantic feature vectors after the first convolution, the processed global semantic feature vectors after the second convolution, and the processed global semantic feature vectors after the third convolution.
[0091] The global semantic feature vector after the first convolution, the global semantic feature vector after the second convolution, and the global semantic feature vector after the third convolution are mapped and fused to obtain the local features of the global semantic feature vector.
[0092] Step 1035: Perform feature fusion on the global features and the local features to obtain a fused vector. Taking the question "How does the power flow transfer occur during a line fault?" as an example, the dimensions of the fused vector are [2, 256, 768]. Here, 2 is a fixed value, 256 represents the text length (which is also a fixed value), and 768 represents the vector width.
[0093] Step 1036: After the fused vector passes through the fully connected layer, the classifier is used to determine the intent type of the question.
[0094] In practical applications, the global and local features of the sentence tree are fused and then input into a fully connected layer. A softmax classifier is then used to obtain the intent type recognition result.
[0095] After fusing the global feature vector T and the local feature vector C of the sentence tree, we can obtain a vector O = (o1, o2, ..., o3) representing all the features of the model. n The fused vector O is input into a fully connected layer, which then passes it through a Softmax classifier to obtain the intent recognition result. The probability of each intent class is as follows:
[0096]
[0097] Where y represents the intent type identified by the model, and n represents the total number of intent types to be identified.
[0098] Taking the question "What is the power flow transfer during a line fault?" as an example, the intent type obtained is "Query power flow transfer information".
[0099] Currently, in the field of power dispatching, only the transformation of intent recognition tasks into classification tasks is considered, without taking into account the strong correlation between slot filling tasks and intent recognition tasks, and the lack of general knowledge in general pre-trained language models.
[0100] Compared with current intent recognition tasks in the power dispatching field, using intent recognition technology based on dispatching semantic knowledge graphs can introduce domain knowledge into the intent recognition task, thereby improving the recognition effect by leveraging knowledge graphs. The main reason for this is:
[0101] 1. Imported professional knowledge from the scheduling semantic knowledge graph: Linked the entities in the questions in each round of dialogue with the entities in the knowledge graph, constructed knowledge triples, formed sentence trees, introduced power scheduling knowledge into the general model, which is more in line with the scheduling scenario and can improve the model's recognition performance.
[0102] 2. Joint training: By constructing a joint model, the slot filling task and the intent recognition task are trained simultaneously. Based on the strategy of mutual influence between the two tasks, the intent recognition effect is improved to a certain extent.
[0103] 3. Construct a visible entity-relationship matrix: By constructing a visible entity-relationship matrix, the visible area of the self-attention mechanism is limited, and information is obtained by focusing only on the context of the same branch or its corresponding entity-relationship branch, thus avoiding interference from noisy data.
[0104] Example 2
[0105] To execute the method corresponding to Embodiment 1 above and achieve the corresponding functions and technical effects, an intent recognition system based on scheduling semantic knowledge graph is provided below, including:
[0106] The data acquisition module is used to acquire questions of the intent type to be determined and a power dispatch knowledge graph. The questions include: how is the power flow transfer during a line fault? What are the voltage changes during a line fault? What is the power flow transfer information during a line fault? How should a switch be handled if an auxiliary A or B protection on a line trips due to overvoltage? What are the handling methods for remote tripping and receiving signals from auxiliary A or B protection on a line? Or what are the key points for handling a line fault? Each question includes multiple entities. The power dispatch knowledge graph includes ontologies and the relationships between them. Each ontology includes faulty equipment, indicator names, operating status, generator sets, transformers, busbars, switches, power plants, substations, converter stations, switching stations, series compensation stations, and equipment models. One entity corresponds to one ontology.
[0107] The tree diagram construction module is used to construct a sentence tree diagram based on the question of the intent type to be determined and the power dispatch knowledge graph; the sentence tree diagram is a question that labels the ontology and the relationship between each ontology.
[0108] An intent determination module is used to determine the intent type of a question based on the sentence tree diagram and an intent recognition model. The intent types include querying grid power, querying grid load, querying power flow transfer information, querying safety control tripping information, querying frequency information, querying equipment voltage, querying equipment model, and querying key points for equipment fault handling. The intent recognition model is obtained by training an initial model using a training dataset. The training dataset includes sentence tree diagrams labeled with intent types. The initial model includes an entity-relationship matrix calculation module, an ERNIE-BiLSTM layer, a TextCNN layer, a Mask Transformer layer, a fully connected layer, and a classifier. The ERNIE-BiLSTM layer and the TextCNN layer are connected. The entity-relationship matrix calculation module is connected to the Mask Transformer layer. The ERNIE-BiLSTM layer is also connected to the Mask Transformer layer. Both the TextCNN layer and the Mask Transformer layer are connected to the fully connected layer. The fully connected layer is connected to the classifier.
[0109] Example 3
[0110] An electronic device includes: a memory and a processor, wherein the memory stores a computer program, and the processor runs the computer program to cause the electronic device to perform the intent recognition method based on scheduling semantic knowledge graph of Embodiment 1.
[0111] Example 4
[0112] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the intent recognition method based on a scheduling semantic knowledge graph as described in Embodiment 1.
[0113] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0114] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An intent recognition method based on scheduling semantic knowledge graph, characterized in that, include: Obtain the question type to be determined and the power dispatch knowledge graph; The questions are: how does power flow transfer occur during a line fault? What are the voltage changes during a line fault? What is the power flow transfer information during a line fault? How should we handle the situation when auxiliary protection A or B trips a switch due to overvoltage? What are the handling methods for remote tripping of auxiliary protection A or B during a line fault? Or what are the key points for handling a line fault? Each question includes multiple entities. The power dispatch knowledge graph includes ontologies and the relationships between them. Each ontology includes faulty equipment, indicator names, operating status, generator sets, transformers, busbars, switches, power plants, substations, converter stations, switching stations, series compensation stations, and equipment models. One entity corresponds to one ontology. Based on the question type to be determined and the power dispatch knowledge graph, a sentence tree diagram is constructed; the sentence tree diagram consists of question sentences that label the ontology and the relationships between each ontology. Based on the sentence tree diagram, an intent recognition model is used to determine the intent type of the question. The intent types include querying grid power, querying grid load, querying power flow transfer information, querying safety control tripping information, querying frequency information, querying equipment voltage, querying equipment model, and querying key points for equipment fault handling. The intent recognition model is obtained by training an initial model using a training dataset. The training dataset includes sentence tree diagrams labeled with intent types. The initial model includes an entity-relationship matrix calculation module, an ERNIE-BiLSTM layer, a TextCNN layer, a Mask Transformer layer, a fully connected layer, and a classifier. The ERNIE-BiLSTM layer and the TextCNN layer are connected. The entity-relationship matrix calculation module is connected to the Mask Transformer layer. The ERNIE-BiLSTM layer is also connected to the Mask Transformer layer. Both the TextCNN layer and the Mask Transformer layer are connected to the fully connected layer. The fully connected layer is connected to the classifier. Based on the sentence tree diagram, an intent recognition model is used to determine the intent type of the question, specifically including: Based on the sentence tree diagram, the global semantic feature vector of the sentence tree diagram is determined using the ERNIE-BiLSTM layer; the ERNIE-BiLSTM layer includes an ERNIE layer and a BiLSTM layer connected in sequence. Based on the sentence tree diagram, the entity-relationship visibility matrix is determined using the entity-relationship matrix calculation module; the entity-relationship matrix calculation module is... ,in, and For entities in the sentence tree diagram, 1 represents and There is a relationship between them, 0 represents and There is no relationship between them, but they are on the same branch. represent and There is no relationship between them, nor are they on the same branch; Based on the global semantic feature vector and the entity-relationship visibility matrix, the global features of the sentence tree diagram are determined using the Mask Transformer layer; Using the TextCNN layer, local features of the global semantic feature vector are determined; The global features and the local features are fused to obtain a fused vector. The fused vector is passed through the fully connected layer, and then the classifier is used to determine the intent type of the question. Based on the sentence tree diagram, the global semantic feature vector of the sentence tree diagram is determined using the ERNIE-BiLSTM layer, specifically including: Based on the ERNIE layer, the tag embedding vector of the sentence tree diagram is determined; Determine the soft position embedding vector for each character in each sentence tree diagram; The embedding vector of the sentence tree diagram is determined based on the labeled embedding vector and the soft position embedding vector. Based on the embedding vector, the global semantic feature vector is determined using a BiLSTM layer.
2. The intent recognition method based on scheduling semantic knowledge graph according to claim 1, characterized in that, Based on the question type to be determined and the power dispatch knowledge graph, a sentence tree diagram is constructed, specifically including: Based on the power dispatch knowledge graph, determine the ontology corresponding to each entity in the question of the intent type to be determined and the relationship between the ontology; Based on the ontology corresponding to each entity and the relationships between the ontologies, the questions of the intent type to be determined are labeled to obtain a sentence tree diagram.
3. The intent recognition method based on scheduling semantic knowledge graph according to claim 1, characterized in that, Using the TextCNN layer, the local features of the global semantic feature vector are determined, specifically including: The global semantic feature vector is convolved by the first, second, and third convolutional layers of the TextCNN layer to obtain the global semantic feature vector after the first convolution, the global semantic feature vector after the second convolution, and the global semantic feature vector after the third convolution. Using the max pooling layer of the TextCNN layer, the global semantic feature vectors after the first convolution, the second convolution, and the third convolution are processed respectively to obtain the processed global semantic feature vectors after the first convolution, the processed global semantic feature vectors after the second convolution, and the processed global semantic feature vectors after the third convolution. The global semantic feature vector after the first convolution, the global semantic feature vector after the second convolution, and the global semantic feature vector after the third convolution are mapped and fused to obtain the local features of the global semantic feature vector.
4. An intent recognition system based on a scheduling semantic knowledge graph, characterized in that, The intent recognition system based on scheduling semantic knowledge graph is used to implement the intent recognition method based on scheduling semantic knowledge graph as described in any one of claims 1-3. The intent recognition system based on scheduling semantic knowledge graph includes: The data acquisition module is used to acquire questions of the intent type to be determined and a power dispatch knowledge graph. The questions include: how is the power flow transfer during a line fault? What are the voltage changes during a line fault? What is the power flow transfer information during a line fault? How should a switch be handled if an auxiliary A or B protection on a line trips due to overvoltage? What are the handling methods for remote tripping and receiving signals from auxiliary A or B protection on a line? Or what are the key points for handling a line fault? Each question includes multiple entities. The power dispatch knowledge graph includes ontologies and the relationships between them. Each ontology includes faulty equipment, indicator name, action status, generator set, transformer, busbar, switch, power plant, substation, converter station, switching station, series compensation station, and equipment model. One entity corresponds to one ontology. The tree diagram construction module is used to construct a sentence tree diagram based on the question of the intent type to be determined and the power dispatch knowledge graph; the sentence tree diagram is a question that labels the ontology and the relationships between the ontology; An intent determination module is used to determine the intent type of a question based on the sentence tree diagram and an intent recognition model. The intent types include querying grid power, querying grid load, querying power flow transfer information, querying safety control tripping information, querying frequency information, querying equipment voltage, querying equipment model, and querying key points for equipment fault handling. The intent recognition model is obtained by training an initial model using a training dataset. The training dataset includes sentence tree diagrams labeled with intent types. The initial model includes an entity-relationship matrix calculation module, an ERNIE-BiLSTM layer, a TextCNN layer, a Mask Transformer layer, a fully connected layer, and a classifier. The ERNIE-BiLSTM layer and the TextCNN layer are connected. The entity-relationship matrix calculation module is connected to the Mask Transformer layer. The ERNIE-BiLSTM layer is also connected to the Mask Transformer layer. Both the TextCNN layer and the Mask Transformer layer are connected to the fully connected layer. The fully connected layer is connected to the classifier.
5. An electronic device, characterized in that, include: A memory and a processor, the memory being used to store a computer program, the processor running the computer program to cause the electronic device to perform the intent recognition method based on scheduling semantic knowledge graph as described in any one of claims 1-3.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the intent recognition method based on a scheduling semantic knowledge graph as described in any one of claims 1-3.