A method, system, and storage medium for understanding power grid dispatching behavior based on cold start

By converting the regular expression of grid scheduling intention into finite state automata and building a finite state automata recurrent neural network, the problem of poor recognition effect when grid scheduling intention recognition and large-scale data processing is solved, and efficient intention recognition and generalization capabilities are achieved.

CN114819532BActive Publication Date: 2025-06-10STATE GRID JIANGSU ELECTRIC POWER CO LTD +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210347685.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-01
Publication Date
2025-06-10
Estimated Expiration
2042-04-01

AI Technical Summary

Technical Problem

The prior art has the problem of poor identification results in the identification of grid scheduling intentions, especially when processing small sample data and large-scale data. The rule template is highly dependent, and deep learning methods require a large amount of training data.

Method used

A cold start-based method is adopted to convert the regular expression of the grid scheduling intention into a finite state automaton (FSA), and a finite state automaton recurrent neural network (FSA-RNN) is constructed through matrix rank decomposition and word vectors to realize the recognition of the grid scheduling intention.

Benefits of technology

The method has similar accuracy as the rule template-based approach without training and has the training and generalization capabilities of deep learning methods, especially when small sample data and large-scale data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114819532B_ABST
    Figure CN114819532B_ABST
Patent Text Reader

Abstract

The present invention provides a method, a system and a storage medium for understanding power grid dispatching behavior based on cold start. The method includes the following steps: determining regular expressions for writing power grid dispatching intentions of each category; converting the regular expressions into finite state automata for power grid dispatching intention recognition; converting the finite state automata for power grid dispatching intention recognition into recognition weighted finite state automata for power grid dispatching intentions, and constructing a finite state automata recurrent neural network; training the finite state automata recurrent neural network using power grid dispatching intention recognition corpus data; and using the trained finite state automata recurrent neural network to recognize the power grid dispatching intentions of the input power grid dispatching text. The present invention can effectively recognize power grid dispatching intention texts of samples of all orders of magnitude, and improves the overall performance of power grid dispatching intention recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of natural language processing and power grid dispatching intention understanding, and particularly relates to a power grid dispatching behavior understanding method, system and storage medium based on cold start. Background Art

[0002] With the formation of the AC / DC hybrid large power grid in China, the power grid structure has become increasingly complex and the operation mode has become flexible and changeable, resulting in increasingly complex regulation services. On the one hand, in key scenarios such as power grid accidents and abnormalities, it is required that the dispatching control system has a faster information retrieval and function operation response speed. On the other hand, the amount of information in the power grid regulation system has increased significantly, the regulation screens have increased day by day, the functions have become more abundant, and the difficulty of function operation has increased. Therefore, building a voice-based human-machine dialogue system in the regulation field is of great significance for changing the existing dispatching work mode and improving the effect of dispatchers' handling of business. As the core technology of the human-machine dialogue system, power grid dispatching behavior understanding needs to be further studied.

[0003] In the prior art, the focus of power grid dispatching behavior understanding is dispatching intention recognition. The methods for dispatching intention recognition in the prior art mainly include semantic recognition methods based on rule templates and classification algorithms based on data annotation. The intention recognition method based on rule templates generally requires artificial construction of rule templates and category information to classify dispatching intention texts. The classification method based on data annotation requires extraction of key features from corpus texts and then realizes intention classification by training a classifier.

[0004] Using rule templates for power grid dispatching intention recognition completely depends on template formulation and cannot learn automatically from data. For small sample data, this method has good effects, but as the amount of data grows, the difficulty of using rule templates will also increase.

[0005] Using feature learning methods such as neural networks or deep learning methods often requires the support of large-scale training data to achieve high recognition effects. For some dispatching scenarios with small samples and multiple intentions, the recognition effect of using this method is poor. Summary of the Invention

[0006] The purpose of the present invention is to solve the deficiencies existing in the above background art, and provide a power grid dispatching behavior understanding method, system and storage medium based on cold start, which can effectively recognize power grid dispatching intention texts of various order-of-magnitude samples, and thus improve the overall performance of power grid dispatching intention recognition.

[0007] The technical solution adopted by the present invention is: a power grid dispatching behavior understanding method based on cold start, including the following steps:

[0008] Determine the regular expressions for formulating the power grid dispatching intentions of each category; wherein the regular expressions are used to identify the power grid dispatching intentions according to the corpus content in the pre-set power grid dispatching intention recognition corpus;

[0009] Convert the regular expressions into finite state automata for power grid dispatching intention recognition, so that the rule text representation of the regular expressions is transformed into a matrix form representation;

[0010] Convert the finite state automata into weighted finite state automata for power grid dispatching intention recognition, and construct a finite state automata recurrent neural network through matrix rank decomposition and adding word vectors;

[0011] Use the power grid dispatching intention recognition corpus data to train the finite state automata recurrent neural network;

[0012] Adopt the trained finite state automata recurrent neural network to identify the power grid dispatching intentions of the input power grid dispatching text.

[0013] In the above technical solution, the process of formulating the regular expressions for the power grid dispatching intentions of each category includes:

[0014] Classify the power grid dispatching corpus in the power grid dispatching intention recognition corpus according to the power grid dispatching intention categories, summarize the relationship between the keywords in the power grid dispatching corpus and the power grid dispatching intentions, and formulate regular expressions. The regular expressions express the corresponding logical relationship between the keywords and the power grid dispatching intentions through the combination of specific characters and key texts.

[0015] In the above technical solution, the process of converting the regular expressions for power grid dispatching intention recognition into finite state automata for power grid dispatching intention recognition includes:

[0016] The finite state automata first enter the starting state and input multiple regular expressions for power grid dispatching intention recognition; the finite state automata read each regular expression in turn; the finite state automata return to the starting state every time after reading a single regular expression;

[0017] The process of the finite state automata reading a single regular expression includes: the finite state automata read each character in the regular expression in turn; when reading the content of the keyword to be matched, the state of the finite state automata changes, and when reading other content, the state of the finite state automata does not change; when reading all the characters in the regular expression, the finite state automata reach the termination state;

[0018] The finite state automaton generates a finite state automaton state transition matrix after reading all regular expressions; the finite state automaton state transition matrix is used to judge the state transition situation generated by the finite state automaton for each input power grid dispatching corpus; the finite state automaton state transition matrix combines with the power grid dispatching corpus character table to generate a finite state automaton for power grid dispatching intention recognition.

[0019] The power grid dispatching corpus character table is composed of non-repeated characters included in the power grid dispatching corpus, and the power grid dispatching corpus character table is formed by screening out non-repeated characters through traversing the power grid dispatching corpus.

[0020] In the above technical solution, the finite state automaton for power grid dispatching intention recognition includes a starting state, multiple ending states and several other intermediate states, and the number of its states is determined by the number of regular expressions and the keywords to be matched in the regular expressions.

[0021] In the above technical solution, the finite state automaton for power grid dispatching intention recognition is represented by a three-dimensional matrix and two vectors. The first dimension of the three-dimensional matrix is the size of the power grid dispatching corpus character table, and the other two dimensions of the three-dimensional matrix are both the number of states of the finite state automaton. The two vectors respectively represent the initial state and the ending state of the finite state automaton.

[0022] In the above technical solution, the weighted finite state machine for power grid dispatching intention recognition is used to assign a weight to each state transition of the finite state automaton for power grid dispatching intention recognition;

[0023] The weighted finite state machine for power grid dispatching intention recognition adopts a 5-tuple A, A=(V, S, T, α 0 , α ∞ ) to represent, where V represents the power grid dispatching corpus character table; S represents the number of states of the weighted finite state automaton; T represents the state transition matrix of the weighted finite state automaton; α 0 represents the starting state of the weighted finite state automaton, and α ∞ represents the ending state of the weighted finite state automaton; the value of ∞ is determined by the number of keywords in the regular expression.

[0024] In the above technical solution, the process of constructing a finite state automaton recurrent neural network through matrix rank decomposition and adding word vectors includes:

[0025] Using the tensor rank decomposition technology to decompose the state transition matrix T of the weighted finite state automaton into three second-order matrices, namely the word vector matrix E of the power grid dispatching corpus character table, the current state matrix D 1 and the next moment state matrix D 2 ;

[0026] Perform word embedding on the word vector matrix E of the power grid dispatching corpus character table and the pre-trained word vectors with word information, so that the word vector matrix of the power grid dispatching corpus character table obtains the semantic information of words;

[0027] The pre-trained word vectors with word information are the weight parameters of the word2vec language model obtained by training the word2vec language model using the power grid dispatching corpus as the vectorized representation of the characters in the power grid dispatching corpus character table;

[0028] Let the pre-trained word vector matrix be W, set the hyperparameter β, and use the hyperparameter to determine the weight size of the word embedding vector; the word embedding vector is obtained by adding the word vector matrix E and the 5-tuple A;

[0029] Use the following formula to calculate all path scores of the state transition matrix accessed during the reading process of the power grid dispatching statement:

[0030] z t = βv t +(1 - β)W t

[0031]

[0032] where z t represents the concatenated word vector matrix, v t represents the word vector corresponding to the character of the power grid dispatching statement input at time t in the word vector matrix E, and W t represents the word vector corresponding to the character of the power grid dispatching statement input at time t in the pre-trained word vector matrix W; f represents the score before the state transition of the character of the power grid dispatching statement input at time t; h t represents the forward score vector at time t during the reading process of the power grid dispatching statement;

[0033] Take h t as the hidden state vector in the finite state automaton recurrent neural network, add the softmax function, and convert the score of each path of the power grid dispatching statement into the probability size corresponding to each power grid dispatching intention; finally, select the power grid dispatching intention with the largest probability as the output result.

[0034] In the above technical solution, the process of training the finite state automaton recurrent neural network using the power grid dispatching intention recognition corpus data includes:

[0035] Mark the power grid dispatching corpus in the power grid dispatching intention recognition corpus to generate a training set of power grid dispatching text and dispatching intention pairs for the training set, is the text of the qth power grid dispatching corpus corresponding to the ith power grid dispatching intention category, y iis the i-th power grid dispatching intention; j*q ∈ (1, N), where N is the number of training set examples;

[0036] Convert the word vector matrix of the text data in the training set and the power grid dispatching corpus character table to obtain character vectors; then input the character vectors into a finite state automaton recurrent neural network for training.

[0037] The present invention also provides a power grid dispatching behavior understanding system based on cold start, including a regular expression construction module for power grid dispatching intentions, a finite state automaton generation module for power grid dispatching intention recognition, a finite state automaton recurrent neural network construction module, and a finite state automaton recurrent neural network model training module;

[0038] The regular expression construction module for power grid dispatching intentions is used to determine the regular expressions for power grid dispatching intentions of each category; the regular expressions are used to identify power grid dispatching intentions according to the corpus content in the power grid dispatching intention recognition corpus;

[0039] The finite state automaton generation module for power grid dispatching intention recognition is used to convert the regular expressions into a finite state automaton for power grid dispatching intention recognition, so that the rule text representation of the regular expressions is transformed into a matrix form representation;

[0040] The finite state automaton recurrent neural network construction module is used to convert the finite state automaton into a weighted finite state automaton for power grid dispatching intention recognition, and construct a finite state automaton recurrent neural network through matrix rank decomposition and adding word vectors;

[0041] The finite state automaton recurrent neural network model training module is used to train the finite state automaton recurrent neural network using the power grid dispatching intention recognition corpus data, and use the trained finite state automaton recurrent neural network to identify the power grid dispatching intentions of the input power grid dispatching text.

[0042] The present invention also provides a computer-readable storage medium, on which a program for the power grid dispatching behavior understanding method based on cold start is stored. When the program for the power grid dispatching behavior understanding method based on cold start is executed by a processor, the steps of the power grid dispatching behavior understanding method based on cold start are implemented.

[0043] The beneficial effects of the present invention are as follows: converting the power grid intention recognition regular expression into a neural network and applying it to the power grid dispatching intention recognition and classification task, so that the converted network has a similar accuracy rate to the regular expression intention recognition and classification method without being trained. At the same time, the converted network has the advantages of being trainable and generalizable such as deep learning methods. In the case of zero samples or a small number of samples, due to the incorporation of rule knowledge, it has obvious advantages compared with general machine learning or deep learning methods. In the case of sufficient sample size, the converted network also has performance comparable to other deep learning methods, and supports integrating new regular expressions into the trained network model. Through the present invention, not only can the intention recognition accuracy rate of small sample data be significantly improved, but also the model convergence speed during large-scale data training can be accelerated, while ensuring its intention recognition accuracy rate, thereby comprehensively improving the overall performance of power grid dispatching intention recognition. The regular expression written by the present invention is used for the preliminary intention discrimination of power grid dispatching corpus, which is a necessary prerequisite for the generation of the finite state automaton for subsequent power grid dispatching intention recognition, and can improve the efficiency of forming the finite state automaton. Through the generation of the finite state automaton, the present invention can convert the literal expression form of the regular expression into the matrix expression form of the finite state automaton, improving the calculation efficiency during intention recognition. The finite state automaton form adopted by the present invention can not only represent the regular expression, but also change the state only when the keyword is matched, which can reduce the space complexity to a certain extent; at the same time, it can completely represent a finite state automaton, and the above matrix can also be dimension-reduced by matrix decomposition, with flexible representation. Through the generation of the weighted finite state machine, each power grid dispatching corpus text can calculate the score corresponding to each power grid dispatching intention in a quantitative manner, and the intention corresponding to the maximum score can be obtained, improving the accuracy rate of its intention recognition. By constructing the finite state automaton recurrent neural network through matrix rank decomposition and adding word vectors, the matrix rank decomposition reduces the high-dimensional state transition matrix to a low-dimensional one, which can reduce the time complexity of power grid dispatching intention recognition inference. After adding semantic information through word vectors, the accuracy rate of intention recognition can be further improved. The constructed finite state automaton recurrent neural network endows the originally untrainable weighted finite state machine with training ability, and can improve the recognition efficiency through learning. By training the finite state automaton recurrent neural network, the intention recognition accuracy of the finite state automaton recurrent neural network is further enhanced, and the network has stronger generalization ability and can recognize more power grid dispatching intentions. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a schematic flowchart of the method of the present invention;

[0045] Figure 2Schematic diagram of the conversion process of the finite state automaton for specific embodiments. Detailed implementation mode

[0046] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, which is convenient for clearly understanding the present invention, but they do not limit the present invention.

[0047] Embodiment 1

[0048] Embodiment 1 of the present invention provides a power grid dispatching behavior understanding system based on cold start, including a power grid dispatching intention recognition corpus construction module, a regular expression construction module for power grid dispatching intention, a finite state automaton generation module for power grid dispatching intention recognition, a finite state automaton recurrent neural network construction module, and a finite state automaton recurrent neural network model training module.

[0049] The power grid dispatching intention recognition corpus construction module is used to associate each category of power grid dispatching intention with each dispatching professional language expression text in the power grid dispatching corpus to construct a power grid dispatching intention recognition corpus.

[0050] Specifically, according to the business requirements of power grid dispatching, the power grid dispatching intention is determined. According to the habit of the dispatcher's business language expression method, the power grid dispatching intention recognition corpus construction module generalizes the power grid dispatching intention into different dispatching professional language expressions as the power grid dispatching corpus, and associates each power grid dispatching intention with the corresponding dispatching professional language expression to generate a power grid dispatching intention corpus set.

[0051] The regular expression construction module for power grid dispatching intention is used to write the regular expression for each category of power grid dispatching intention; the regular expression is used to identify the power grid dispatching intention according to the corpus content in the power grid dispatching intention recognition corpus.

[0052] Specifically, the regular expression construction module for power grid dispatching intention classifies the corpus content in the power grid dispatching intention recognition corpus according to the power grid dispatching intention category, summarizes the relationship between the key components in the corpus and the power grid dispatching intention, writes a regular expression that can identify the dispatching intention according to the key components, and establishes a corresponding relationship between the regular expression and the power grid dispatching intention.

[0053] The above regular expression is a logical formula for string operations, that is, using some predefined specific characters and combinations of these specific characters to form a "rule string", and this "rule string" is used to express a filtering logic for strings.

[0054] The finite state automaton generation module for power grid dispatching intention recognition is used to convert the regular expression for power grid dispatching intention recognition into a finite state automaton for power grid dispatching intention recognition, so that the rule text representation of the regular expression is transformed into a matrix form representation.

[0055] Specifically, the finite state automaton for power grid dispatching intention recognition includes a starting state, multiple ending states, and several other intermediate states. Its number of states is determined by the number of regular expressions for power grid dispatching intention recognition and the keywords to be matched in the regular expressions.

[0056] The state transition matrix of the finite state automaton is used to judge the state transition situation generated by the finite state automaton for each input power grid dispatching corpus. Before the finite state automaton recurrent neural network is trained, some power grid dispatching corpora cannot have their power grid intentions predicted by this neural network. The possible reasons for these unpredicted intentions are that it is impossible to reach the ending state from the starting state through the state transition matrix at the finite state automaton stage.

[0057] When the finite state automaton has entered all the regular expressions, a state transition matrix is generated. This state transition matrix records the state transition situation of the finite state automaton for each input power grid dispatching corpus; and in combination with the power grid dispatching corpus character table, a finite state automaton for power grid dispatching intention recognition is generated. The state transition matrix is used to judge the state transition situation generated by the finite state automaton for each input power grid dispatching corpus.

[0058] The power grid dispatching corpus character table is composed of non-repeated characters included in the power grid dispatching corpus, and the power grid dispatching corpus character table is formed by screening out non-repeated characters through traversing the power grid dispatching corpus.

[0059] The finite state automaton recurrent neural network construction module is used to convert the finite state automaton for power grid dispatching intention recognition into a weighted finite state automaton for power grid dispatching intention recognition, and construct a finite state automaton recurrent neural network through matrix rank decomposition and adding word vectors.

[0060] Specifically, the weighted finite state machine for power grid dispatching intention recognition is in the form of a 5-tuple A = (V, S, T, α 0 , α ∞ ), where V represents the power grid dispatching corpus character table, and its size is determined by the size of the power grid dispatching corpus; S represents the number of states of the weighted finite state automaton. The number of states of the weighted finite state automaton is the same as that of the finite state automaton, and is determined by the number of regular expressions for power grid dispatching intention recognition constructed and the number of keywords to be matched in the regular expressions; T represents the state transition matrix of the weighted finite state automaton; α 0Denotes the starting state of the weighted finite state automaton, α ∞ Denotes the ending state of the weighted finite state automaton; the value of n is determined by the number of keywords in the regular expression.

[0061] In the 5-tuple that composes the weighted finite state machine, S, α 0 , α ∞ Is obtained directly from the state transition of the finite state automaton. The dimension of T is also consistent with the state transition matrix of the finite state automaton, only its assignment has changed, and the weight of those with more state transitions will become larger.

[0062] The weighted finite state machine can assign a weight to each state transition. Set the initial value of the state transition matrix T to 0, and read a certain character x in the regular expression for identifying the power grid dispatching intention i When, if the state s of the weighted finite state automaton i Can transition to state s j Then add 1 to the corresponding position value in the state transition matrix. After finally entering all the regular expressions, normalize the state transition matrix to generate the state transition matrix of the weighted finite state automaton; α 0 Denotes the starting state of the weighted permission state automaton, and initialize it to 1, α ∞ Denotes the ending state of the weighted finite state automaton, and initialize it to 1.

[0063] After the above-mentioned weighted finite state machine for identifying the power grid dispatching intention is constructed, the number of paths of each power grid dispatching corpus passing through the weighted finite state machine and the score of each path can be calculated. Each path of the weighted finite state machine means that after inputting a power grid dispatching corpus, it can reach the final ending state from the starting state, which indicates that the power grid dispatching corpus can match the corresponding regular expression.

[0064] The state transition matrix T in the above-mentioned weighted finite state machine for identifying the power grid dispatching intention is a three-dimensional matrix, and the number of calculation parameters is too large when calculating. Use the tensor rank decomposition technology to decompose the state transition matrix T into three second-order matrices to represent the original state transition matrix and reduce the calculation amount. They are the word vector matrix E of the power grid dispatching corpus character table and two state matrices D 1 and D 2 , D 1 and D 2 Then represent the current state and the next moment state matrix. After this step of processing, the above-mentioned score calculation process is expressed as follows:

[0065] The obtained character table word vector matrix E only contains rule information. The pre-trained word vectors with word information are subjected to word embedding processing with the word vector matrix E of the power grid dispatching corpus character table, so that the word vector matrix of the power grid dispatching corpus character table obtains the semantic information of the words. The pre-trained word vectors are obtained through the modeling process of the word2vec language model. Using the power grid dispatching corpus as the training set, when modeling the word2vec language model, the weight parameters of the word2vec language model are continuously adjusted through self-learning, so that the word2vec language model can better adapt to the power grid dispatching corpus, and the weight parameters of the trained word2vec language model are used as the vector representation of the characters in the power grid dispatching corpus character table.

[0066] Let the pre-trained word vector matrix be W, and set the hyperparameter β. This parameter is used to determine the weight of the embedded word vector. The larger β is, the smaller the weight of the embedded word vector. When β approaches 0, we can integrate more external vocabulary information into the model. The calculation formula for all path scores is rewritten as:

[0067] z t =βv t +(1 - β)W t

[0068]

[0069] Among them, z t represents the concatenated word vector matrix, v t represents the word vector corresponding to the character of the power grid dispatching statement input at time t in the word vector matrix E, and W t represents the word vector corresponding to the character of the power grid dispatching statement input at time t in the pre-trained word vector matrix W; f represents the score before the state transition of the character of the power grid dispatching statement input at time t; h t represents the forward score vector at time t during the reading process of the power grid dispatching statement;

[0070] Taking h t as the hidden state vector in the finite state automaton recurrent neural network, adding the softmax function, converting the score of each path of the power grid dispatching statement into the probability size of the corresponding power grid dispatching intention; finally, selecting the power grid dispatching intention with the largest probability as the output result.

[0071] The above process can be regarded as the forward calculation process of the recurrent neural network (Rerrent Neural Network, RNN), h tis the hidden state vector in the RNN. After adding the softmax function in this forward calculation process, the score of each path is converted into the probability of the corresponding label. Furthermore, through the training of the neural network, the accuracy of intent recognition can be further improved.

[0072] Through the above process, the Finite State Automaton Recurrent Neural Network (FSA-RNN) is obtained. Since it is first converted from a regular expression to a finite state automaton and then transformed by the finite state automaton, without training, directly using this network for intent recognition prediction also has a certain ability to recognize intents. The finite state automaton recurrent neural network model training module is used to train the finite state automaton recurrent neural network using the power grid dispatching intent recognition corpus data, and use the trained finite state automaton recurrent neural network to recognize the power grid dispatching intent of the input power grid dispatching text.

[0073] Specifically, construct the FSA-RNN neural network training data set, label the corpus in the dispatching intent corpus, and generate the training set of the power grid dispatching text and dispatching intent pairs of is the text of the q-th dispatching professional language expression corresponding to the i-th power grid dispatching intent category, y i is the i-th power grid dispatching intent; j*q ∈ (1, N), where N is the number of training set samples.

[0074] During the training of the FSA-RNN network, the text data in the training set is converted with the character table word vector matrix E to obtain character vectors, and then the vectorized data is input into the FSA-RNN network model. Since the FSA-RNN network parameters are matrix parameters obtained through regular expression conversion, the network can converge quickly during the training process. After training, the FSA-RNN network model can recognize the intent of the power grid dispatching corpus.

[0075] In the case of a small number of training samples, since the neural network FSA-RNN itself contains rule knowledge, it can still effectively achieve good recognition results. In the case of sufficient sample size, this network has a recognition effect similar to that of other machine learning or deep learning models, thereby improving the power grid dispatching intent recognition effect as a whole and enhancing the power grid dispatching behavior understanding ability.

[0076] The so-called cold start means that after constructing the finite state automaton recurrent neural network, for the power grid dispatching text, without network training, directly using the constructed network for intent recognition has a certain recognition ability, and this situation is called cold start.

[0077] Embodiment 2

[0078] Such asFigure 1 As shown in Figure 1 , Embodiment 2 of the present invention provides a method for understanding power grid dispatching behavior based on cold start, including the following steps:

[0079] In the first step, associate the power grid dispatching intention of each category with the text of each dispatching professional language expression in the power grid dispatching corpus, and construct a power grid dispatching intention recognition corpus.

[0080] Specifically, according to the business requirements of power grid dispatching, determine the power grid dispatching intention. Based on the habit of the dispatcher's business language expression method, generalize the power grid dispatching intention into different dispatching professional language expressions as the power grid dispatching corpus, and associate each power grid dispatching intention with the corresponding dispatching professional language expression to generate a power grid dispatching intention corpus set.

[0081] In the second step, write a regular expression for the power grid dispatching intention of each category; the regular expression is used to identify the power grid dispatching intention according to the corpus content in the power grid dispatching intention recognition corpus.

[0082] Specifically, classify the corpus content in the power grid dispatching intention recognition corpus according to the power grid dispatching intention category, summarize the relationship between the key components in the corpus and the power grid dispatching intention, write a regular expression that can identify the dispatching intention according to the key components, and establish a corresponding relationship between the regular expression and the power grid dispatching intention.

[0083] The above regular expression is a logical formula for string operations, that is, using some predefined specific characters and combinations of these specific characters to form a "rule string", and this "rule string" is used to express a filtering logic for strings.

[0084] Based on the power grid dispatching intention recognition corpus, a case of a regular expression is shown in the following table. Among them, in the regular expression, "$" represents a wildcard character that can match any character, and "*" represents that it can appear any number of times. <bos>”Text start flag," <eos>”Text end flag bit.

[0085] Intention label Open the substation diagram Regular expression $*(open)$*(substation diagram)$* Matched text <bos>Open the Three Gorges Left Bank Power Station Map <eos> < / eos> < / bos>

[0086] In the third step, convert the regular expression for power grid dispatching intention recognition into a finite state automaton (FSA) for power grid dispatching intention recognition, so that the rule text representation of the regular expression is transformed into a matrix form representation.

[0087] The finite state automaton for power grid dispatching intention recognition includes a starting state, multiple ending states, and several other intermediate states. Its number of states is determined by the number of regular expressions for power grid dispatching intention recognition and the keywords to be matched in the regular expressions.

[0088] In the process of generating the finite state automaton, the finite state automaton first enters the starting state, and the input content is multiple regular expressions for power grid dispatching intention recognition. The finite state automaton reads each regular expression in turn. After each single regular expression is read, the finite state automaton returns to the starting state. The finite state automaton reads one character in the regular expression each time. When the keyword content to be matched is read, the state of the finite state automaton changes. When other content is read, the state of the finite state automaton does not change. When all characters in the regular expression are read, the finite state automaton reaches the ending state.

[0089] The state transition matrix of the finite state automaton is used to judge the state transition situation of the finite state automaton for each input power grid dispatching corpus. Before the finite state automaton recurrent neural network is trained, some power grid dispatching corpora cannot have their power grid intentions predicted by this neural network. The possible reasons for these unpredicted intentions are that it is impossible to reach the ending state from the starting state through the state transition matrix in the finite state automaton stage.

[0090] When the finite state automaton has entered all the regular expressions, a state transition matrix is generated. This state transition matrix records the state transition situation of the finite state automaton for each input power grid dispatching corpus; and in combination with the power grid dispatching corpus character table, a finite state automaton for power grid dispatching intention recognition is generated. The state transition matrix is used to judge the state transition situation of the finite state automaton for each input power grid dispatching corpus.

[0091] The power grid dispatching corpus character table is composed of non-repeated characters included in the power grid dispatching corpus. The power grid dispatching corpus character table is formed by screening out non-repeated characters through traversing the power grid dispatching corpus.

[0092] The finite state automaton for identifying the power grid dispatching intention is represented by a three-dimensional matrix and two vectors. The first dimension of the three-dimensional matrix is the size \(L\) of the power grid dispatching corpus character table. V , and the other two dimensions of the three-dimensional matrix are the number of states \(S'\) of the finite state automaton. The two vectors respectively represent the initial state \(\alpha\) 0 ' and the end state \(\alpha\) ∞ '.

[0093] For the use cases in the table, as Figure 2 shown, the process of converting them into a finite state automaton is as follows:

[0094] Input regular expression: "$*(Open)$*(Substation diagram)$*"

[0095] Set the starting state of the finite state automaton to \(\alpha\) 0 ';

[0096] When reading "$", the state does not change to \(\alpha\) 0 ';

[0097] When reading "Da", the state changes from \(\alpha\) 0 ' to \(\alpha\) 1 ';

[0098] When reading "Kai", the state changes from \(\alpha\) 1 ' to \(\alpha\) 2 ';

[0099] When reading "$", the state does not change to \(\alpha\) 2 ';

[0100] When reading "Chang", the state changes from \(\alpha\) 2 ' to \(\alpha\) 3 ';

[0101] When reading "Zhan", the state changes from \(\alpha\) 3 ' to \(\alpha\) 4 ';

[0102] When reading "Tu", the state changes from \(\alpha\) 4 ' to \(\alpha\) 5 '.

[0103] The constructed finite state automaton can be equivalently represented with the regular expression.

[0104] The original function of the finite state automaton is as follows: starting from the initial state, the finite state automaton receives a sequence of power grid dispatching corpora. For each input character, it can transfer to a new state according to the current state and finally reach the end state, indicating that the finite state can accept this corpus and this corpus conforms to a certain regular expression. If it cannot reach the end state, it means that the finite state automaton cannot accept this corpus and this corpus does not conform to any regular expression.

[0105] In the fourth step, convert the finite state automaton for power grid dispatching intention recognition into a weighted finite state automaton for power grid dispatching intention recognition, and construct a finite state automaton recurrent neural network through matrix rank decomposition and adding word vectors.

[0106] Specifically, the weighted finite state machine for power grid dispatching intention recognition is in the form of a 5-tuple A = (V, S, T, α 0 , α ∞ ), where V represents the character table of power grid dispatching corpora, and its size is determined by the size of the power grid dispatching corpus; S represents the number of states of the weighted finite state automaton. The number of states of the weighted finite state automaton is the same as that of the finite state automaton, and is determined by the number of regular expressions for power grid dispatching intention recognition and the number of keywords to be matched in the regular expressions; T represents the state transition matrix of the weighted finite state automaton; α 0 represents the initial state of the weighted finite state automaton, and α ∞ represents the end state of the weighted finite state automaton; the value of n is determined by the number of keywords in the regular expression.

[0107] In the 5-tuple composition of the weighted finite state machine, S, α 0 , α ∞ are directly migrated from the finite state automaton. The dimension of T is also the same as that of the state transition matrix of the finite state automaton, only its assignment has changed, and the weight of those with more state transitions will become larger.

[0108] The weighted finite state machine can assign a weight to each state transition. Set the initial value of the state transition matrix T to 0. When reading a certain character x i in the regular expression for power grid dispatching intention recognition, if the state s i of the weighted finite state automaton can transfer to the state s j , then add 1 to the corresponding position value in the state transition matrix. After finally entering all the regular expressions, normalize the state transition matrix to generate the state transition matrix of the weighted finite state automaton; α 0 represents the initial state of the weighted state automaton with permissions, and initialize it to 1. α ∞ represents the end state of the weighted finite state automaton, and initialize it to 1.

[0109] After the weighted finite state machine for identifying the power grid dispatching intention is constructed, the number of paths of each power grid dispatching corpus passing through the weighted finite state machine and the score of each path can be calculated.

[0110] Each path of the weighted finite state machine indicates that after inputting a power grid dispatching corpus, it can reach the final end state from the starting state, which means that the power grid dispatching corpus can match the corresponding regular expression.

[0111] For a power grid dispatching statement x, the index path of the state transition matrix accessed during the reading process is p = (u 1 , …, u n ). For the path p, the following formula is used to calculate the score that the weighted finite state machine can accept x:

[0112]

[0113] x i represents the character input at the i-th moment, u i is the index path of the state at the i-th moment, T[x i , u i , u i+1 represents the corresponding value of the state transition matrix at the i-th moment, α 0 [u 1 represents the state value at the initial moment, and α ∞ [u n represents the state value at the end moment. This formula is to multiply the scores of the paths passed from the initial state to the termination state.

[0114] Using the forward algorithm to calculate the intention recognition statement x starting from the initial state α 0 and reaching the state α ∞ , where n is the length of the input statement; writing all the path score calculation processes in a loop form, the calculation process is as follows:

[0115]

[0116] h t = h t-1 ·T[x t , 1 ≤ t ≤ n

[0117]

[0118] Among them, h t represents the forward score vector of the intention recognition statement x at the t-th moment during the reading process; h t Each dimension represents the number of paths that can reach the automaton state corresponding to the current dimension after reading t characters; Y represents the score of each final path. The number of paths determines the number of intent labels that the statement x matches, and the score of each path represents the likelihood of the corresponding power grid scheduling intent; x t represents that at time t, the character read is x; T[x t represents the value of the corresponding state transition matrix obtained when reading the character x t character.

[0119] The state transition matrix T in the above power grid scheduling intent recognition weighted finite state automaton is a three-dimensional matrix. When calculating, the number of parameters is too large. The tensor rank decomposition technology is used to decompose the state transition matrix T into three second-order matrices to represent the original state transition matrix and reduce the calculation amount. They are the word vector matrix E of the power grid scheduling corpus character table and two state matrices D 1 and D 2 , D 1 and D 2 represent the current state and the next moment state matrix respectively. After this step of processing, the above score calculation process is expressed as follows:

[0120] The obtained character table word vector matrix E only contains rule information. The pre-trained word vector with word information is subjected to word embedding processing with the word vector matrix E of the power grid scheduling corpus character table, so that the word vector matrix of the power grid scheduling corpus character table obtains the semantic information of the word. The pre-trained word vector is obtained through the modeling process of the word2vec language model. Using the power grid scheduling corpus as the training set, when modeling the word2vec language model, by continuously self-learning and adjusting the weight parameters of the word2vec language model, the word2vec language model can better adapt to the power grid scheduling corpus, and the weight parameters of the trained word2vec language model are used as the vector representation of the characters in the power grid scheduling corpus character table.

[0121] Let the pre-trained word vector matrix be W, and set the hyperparameter β, which is used to determine the weight of the embedded word vector. The larger β is, the smaller the weight of the embedded word vector is. When β is close to 0, we can integrate more external vocabulary information into the model. The calculation formula for the scores of all paths is rewritten as:

[0122] z t =βv t +(1 - β)W t

[0123]

[0124] Among them, z t represents the concatenated word vector matrix, v t denotes the word vector corresponding to the character of the power grid scheduling statement input at time t in the word vector matrix E, W t denotes the word vector corresponding to the character of the power grid scheduling statement input at time t in the pre-trained word vector matrix W; f denotes the score before the character state transition of the power grid scheduling statement input at time t; h t denotes the forward score vector at time t during the reading process of the power grid scheduling statement;

[0125] Take h t As the hidden state vector in the finite state automaton recurrent neural network, add the softmax function to convert the score of each path of the power grid scheduling statement into the probability size corresponding to the power grid scheduling intention; finally, select the power grid scheduling intention with the largest probability as the output result.

[0126] The above process can be regarded as the forward calculation process of the recurrent neural network (Rerrent Neural Network, RNN). h t Is the hidden state vector in the RNN. After adding the softmax function after this forward calculation process, the score of each path is converted into the probability size corresponding to the label, and then through the training of the neural network, the accuracy of intention recognition can be further improved.

[0127] Through the above process, the finite state automaton recurrent neural network (FSA-RNN) is obtained. Since it is first converted from a regular expression to a finite state automaton and then obtained through the transformation of the finite state automaton, without training, directly using this network for intention recognition prediction also has a certain intention recognition ability.

[0128] Step 5: Use the power grid scheduling intention recognition corpus data to train the finite state automaton recurrent neural network; use the trained finite state automaton recurrent neural network to recognize the power grid scheduling intention of the input power grid scheduling text.

[0129] Specifically, construct the FSA-RNN neural network training data set, label the corpus in the scheduling intention corpus, and generate the training set of the power grid scheduling text and scheduling intention pair of, is the text of the qth scheduling professional language expression corresponding to the ith power grid scheduling intention category, y i is the ith power grid scheduling intention; j*q∈(1, N), and N is the number of training set examples.

[0130] When training the FSA-RNN network, the text data in the training set and the character table word vector matrix E are converted to obtain character vectors, and then the vectorized data is input into the FSA-RNN network model. Since the FSA-RNN network parameters are matrix parameters obtained through the transformation of regular expressions, the network can converge quickly during training. After training, the FSA-RNN network model can perform intent recognition on power grid dispatching corpora.

[0131] In the case of a small number of training samples, due to the fact that the neural network FSA-RNN itself contains rule knowledge, it can still achieve effective and good recognition results. In the case of sufficient sample size, this network has a recognition effect similar to that of other machine learning or deep learning models, thereby improving the power grid dispatching intent recognition effect as a whole and enhancing the power grid dispatching behavior understanding ability.

[0132] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0133] The present invention is described with reference to the 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 flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices produce means for realizing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0134] These computer program instructions can 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, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that realizes the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are executed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions for implementing the functions specified in one process or multiple processes and / or blocks Figure 1 one process or multiple processes and / or blocks Figure 1 steps for implementing the functions specified in one block or multiple blocks.

[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the scope of its protection. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that after reading the present invention, various changes, modifications or equivalent replacements can still be made to the specific implementation manners of the invention. However, these changes, modifications or equivalent replacements are all within the scope of the protection of the pending claims of the invention.

[0137] The content not described in detail in this specification belongs to the prior art well known to those of ordinary skill in the art.< / eos> < / bos>

Claims

1. A method for understanding power grid dispatching behavior based on cold start, characterized in that: It includes the following steps: Determine the regular expressions for writing the power grid dispatching intentions of each category; wherein the regular expressions are used to identify the power grid dispatching intentions according to the corpus content in the pre-set power grid dispatching intention recognition corpus; Convert the regular expressions into finite state automata for power grid dispatching intention recognition, so that the rule text representation of the regular expressions is transformed into a matrix form representation; Convert the finite state automata into weighted finite state automata for power grid dispatching intention recognition, and construct a finite state automata recurrent neural network through matrix rank decomposition and adding word vectors; Use the power grid dispatching intention recognition corpus data to train the finite state automata recurrent neural network; Adopt the trained finite state automata recurrent neural network to identify the power grid dispatching intentions of the input power grid dispatching text; The process of converting the regular expressions for power grid dispatching intention recognition into finite state automata for power grid dispatching intention recognition includes: The finite state automata first enter the starting state and input multiple regular expressions for power grid dispatching intention recognition; the finite state automata sequentially read each regular expression; the finite state automata return to the starting state every time after reading a single regular expression; The process of the finite state automata reading a single regular expression includes: the finite state automata sequentially read each character in the regular expression; when the keyword content to be matched is read, the state of the finite state automata changes, and when other content is read, the state of the finite state automata does not change; when all the characters in the regular expression are read, the finite state automata reach the termination state; After the finite state automata read all the regular expressions, a finite state automata state transition matrix is generated; the finite state automata state transition matrix is used to judge the state transition situation of the finite state automata for each input power grid dispatching corpus; the finite state automata state transition matrix combines with the power grid dispatching corpus character table to generate a finite state automata for power grid dispatching intention recognition; The power grid dispatching corpus character table is composed of non-repeated characters included in the power grid dispatching corpus, and the power grid dispatching corpus character table is formed by screening non-repeated characters through traversing the power grid dispatching corpus.

2. The method according to claim 1, characterized in that: The process of writing the regular expressions for the power grid dispatching intentions of each category includes: Classify the power grid dispatching corpus in the power grid dispatching intention recognition corpus according to the power grid dispatching intention categories, summarize the relationship between the keywords in the power grid dispatching corpus and the power grid dispatching intentions, and write regular expressions. The regular expressions express the corresponding logical relationship between the keywords and the power grid dispatching intentions through the combination of specific characters and key texts.

3. The method according to claim 2, characterized in that: The power grid dispatching intention recognition finite state automata include a starting state, multiple termination states and several other intermediate states, and the number of its states is determined by the number of regular expressions and the keywords to be matched in the regular expressions.

4. The method according to claim 3, characterized in that: The finite state automaton for power grid dispatching intention recognition is represented by a three-dimensional matrix and two vectors. The first dimension of the three-dimensional matrix is the size of the power grid dispatching corpus character table, and the other two dimensions of the three-dimensional matrix are both the number of states of the finite state automaton. The two vectors represent the initial state and the end state of the finite state automaton respectively.

5. According to the method described in claim 4, it is characterized in that: The weighted finite state machine for power grid dispatching intention recognition is used to assign a weight to each state transition of the finite state automaton for power grid dispatching intention recognition; The weighted finite state machine for power grid dispatching intention recognition adopts a 5-tuple A, A = (V, S, T, α 0 , α ∞ ), where V represents the character table of power grid dispatching corpus; S represents the number of states of the weighted finite state automaton; T represents the state transition matrix of the weighted finite state automaton; α 0 represents the starting state of the weighted finite state automaton, and α ∞ represents the ending state of the weighted finite state automaton; the value of ∞ is determined by the number of keywords in the regular expression.

6. According to the method described in claim 5, it is characterized in that: The process of constructing a finite state automaton recurrent neural network through matrix rank decomposition and adding word vectors includes: The state transition matrix T of the weighted finite state automaton is decomposed into three second-order matrices by using the tensor rank decomposition technique, namely, the word vector matrix E of the character table of the power grid dispatching corpus, the current state matrix D 1 and the next moment state matrix D 2 ; Performing word embedding processing on the word vector matrix E of the power grid dispatching corpus character table and the pre-trained word vectors with word information, so that the word vector matrix of the power grid dispatching corpus character table obtains the semantic information of words; The pre-trained word vectors with word information are the weight parameters of the word2vec language model obtained by training the word2vec language model using the power grid dispatching corpus as the vectorized representation of the characters in the power grid dispatching corpus character table; Let the pre-trained word vector matrix be W, set the hyperparameter β, and use the hyperparameter to determine the weight size of the word embedding vector; the word embedding vector is obtained by adding the word vector matrix E and the 5-tuple A; The following formula is used to calculate all path scores of the state transition matrix accessed during the reading process of the power grid dispatching statement: z t = βv t + (1 - β)W t Among them, z t represents the concatenated word vector matrix, v t represents the word vector corresponding to the character of the power grid dispatching statement input at time t in the word vector matrix E, W t represents the word vector corresponding to the character of the power grid dispatching statement input at time t in the pre-trained word vector matrix W; f represents the score before the character state transition of the power grid dispatching statement input at time t; h t represents the forward score vector at time t during the reading process of the power grid dispatching statement; Take h t As the hidden state vector in the finite state automaton recurrent neural network, add the softmax function to convert the score of each path of the power grid dispatching statement into the probability of each power grid dispatching intention; finally, select the power grid dispatching intention with the highest probability as the output result.

7. According to the method described in claim 6, it is characterized in that: The process of training the finite state automaton recurrent neural network using the power grid dispatching intention recognition corpus data includes: Mark the power grid dispatching corpus in the power grid dispatching intention recognition corpus to generate a training set of power grid dispatching texts and dispatching intention pairs of For the text of the q-th power grid dispatching corpus corresponding to the i-th power grid dispatching intention category, y i is the i-th power grid dispatching intention; j*q ∈ (1, N), where N is the number of training set examples; Converting the text data in the training set and the word vector matrix of the power grid dispatching corpus character table to obtain character vectors; then inputting the character vectors into the finite state automaton recurrent neural network for training.

8. A power grid dispatching behavior understanding system based on cold start, it is characterized in that: It includes a regular expression construction module for power grid dispatching intention, a finite state automaton generation module for power grid dispatching intention recognition, a finite state automaton recurrent neural network construction module, and a finite state automaton recurrent neural network model training module; The regular expression construction module for power grid dispatching intention is used to determine the regular expressions for each category of power grid dispatching intention; the regular expressions are used to identify power grid dispatching intentions according to the corpus content in the power grid dispatching intention recognition corpus; The finite state automaton generation module for power grid dispatching intention recognition is used to convert the regular expressions into a finite state automaton for power grid dispatching intention recognition, so that the rule text representation of the regular expressions is transformed into a matrix form representation; The finite state automaton recurrent neural network construction module is used to convert the finite state automaton into a weighted finite state machine for power grid dispatching intention recognition, and construct a finite state automaton recurrent neural network through matrix rank decomposition and adding word vectors; The finite state automaton recurrent neural network model training module is used to train the finite state automaton recurrent neural network using the power grid dispatching intention recognition corpus data, and use the trained finite state automaton recurrent neural network to recognize the power grid dispatching intention of the input power grid dispatching text; The process of converting the regular expression for power grid dispatching intention recognition into a finite state automaton for power grid dispatching intention recognition includes: The finite state automaton first enters the starting state and inputs multiple regular expressions for power grid dispatching intention recognition; the finite state automaton reads each regular expression in turn; the finite state automaton returns to the starting state every time it finishes reading a single regular expression; The process of the finite state automaton reading a single regular expression includes: the finite state automaton reads each character in the regular expression in turn; when the keyword content to be matched is read, the state of the finite state automaton transfers, and when other content is read, the state of the finite state automaton does not transfer; when all characters in the regular expression are read, the finite state automaton reaches the termination state; After the finite state automaton reads all the regular expressions, a finite state automaton state transition matrix is generated; the finite state automaton state transition matrix is used to judge the state transition situation of the finite state automaton for each input power grid dispatching corpus; the finite state automaton state transition matrix combines with the power grid dispatching corpus character table to generate a finite state automaton for power grid dispatching intention recognition; The power grid dispatching corpus character table is composed of non-repeated characters included in the power grid dispatching corpus, and the power grid dispatching corpus character table is formed by screening out non-repeated characters through traversing the power grid dispatching corpus.

9. A computer-readable storage medium, on which a program for the power grid dispatching behavior understanding method based on cold start is stored, and when the program for the power grid dispatching behavior understanding method based on cold start is executed by a processor, the steps of the power grid dispatching behavior understanding method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Intelligent voice auxiliary system for dispatching

    CN111489748A

  • Power distribution network information physical element modeling method and system based on finite-state machine

    CN112966375A