Power grid field problem intelligent retrieval method, device and terminal equipment

By performing word and character segmentation on power grid issues, and combining character, word, and phrase information, a joint feature model is established using BMES annotation and SoftLexicon technology. This solves the problem of information loss in NER methods in the power grid field and achieves more accurate solution acquisition.

CN116226329BActive Publication Date: 2026-05-15STATE GRID HEBEI ELECTRIC POWER CO LTD +2
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID HEBEI ELECTRIC POWER CO LTD
Filing Date
2023-01-04
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing Chinese named entity recognition methods perform poorly in the power grid field. In particular, character-based NER methods lose word information, while word-based NER methods suffer from incorrect word segmentation boundaries, leading to inaccurate matching of power grid-related texts.

Method used

By performing word and character segmentation on power grid issues, and combining character, word, and phrase information, a joint feature model is established using BMES annotation and SoftLexicon technology. The Bi-LSTM model is then used to process character vectors, and matching is performed in the power grid knowledge database to achieve precise or fuzzy matching to obtain solutions.

Benefits of technology

It improves the accuracy of matching problems in the power grid field, avoids information loss caused by incorrect word segmentation boundaries, and ensures that users can accurately obtain solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116226329B_ABST
    Figure CN116226329B_ABST
Patent Text Reader

Abstract

The application is suitable for the field of power grid intelligent retrieval technology, and provides a power grid field problem intelligent retrieval method, device and terminal equipment. The method comprises the following steps: acquiring a power grid knowledge database and a power grid field problem proposed by a user; performing word segmentation and character segmentation on the power grid field problem proposed by the user to obtain a plurality of characters, a plurality of words and a plurality of word groups, wherein the plurality of word groups are composed of any word in the plurality of words and the word adjacent to the any word; obtaining a first theme entity based on the plurality of characters, the plurality of words, the plurality of word groups and a power grid field high-frequency word dictionary, wherein the power grid field high-frequency word dictionary is constructed based on a plurality of power grid field problems and a plurality of problem solutions; and matching the first theme entity based on the power grid knowledge database to obtain a solution to the power grid field problem proposed by the user. The application can improve the accuracy of intelligent retrieval of power grid field related problems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of intelligent power grid retrieval technology, and in particular relates to intelligent retrieval methods, devices and terminal equipment for power grid issues. Background Technology

[0002] The intelligent customer service system related to electricity is based on Named Entity Recognition (NER). Existing Chinese NER methods are mainly character-based or word-based methods.

[0003] For character-based NER methods alone, vectorizing each character directly avoids errors in word segmentation boundaries. However, segmenting the text into character-level sequences will discard most of the information contained in the words.

[0004] For word-based NER methods alone, although the performance of current Chinese word segmentation tools is very powerful, some word segmentation boundary errors are still inevitable, which will lead to a series of problems in subsequent training and prediction.

[0005] There are currently some attempts to combine word-based NER methods with character-based NER methods, but they cannot achieve good matching when dealing with text related to the power grid field, resulting in the loss of relevant lexical information for certain characters, which affects the performance of NER. Summary of the Invention

[0006] This application provides an intelligent retrieval method, apparatus, and terminal device for power grid issues, in order to address the problem that the NER method performs poorly in power grid-related issues.

[0007] This application is achieved through the following technical solution:

[0008] In a first aspect, embodiments of this application provide an intelligent retrieval method for problems in the power grid field, including:

[0009] Access power grid knowledge databases and power grid-related questions raised by users;

[0010] The system performs word segmentation and character segmentation on the power grid-related questions raised by users, resulting in multiple characters, multiple words, and multiple word groups. Each word group consists of any one of the multiple words and a word adjacent to that one word.

[0011] Based on multiple characters, multiple words, multiple phrases, and a high-frequency word dictionary in the power grid field, the first topic entity is obtained. The high-frequency word dictionary in the power grid field is constructed based on multiple power grid field issues and multiple issue solutions.

[0012] Based on the power grid knowledge database, the first topic entity is matched to obtain the solution to the power grid problem proposed by the user.

[0013] In conjunction with the first aspect, among some possible implementation methods, the process of constructing a high-frequency word dictionary for the power grid domain includes: obtaining multiple power grid domain questions and multiple problem solutions based on a power grid knowledge database; filtering out invalid power grid domain questions and invalid problem solutions from the multiple power grid domain questions and multiple problem solutions to obtain a first problem set and a first solution set; combining the first problem set and the first solution set accordingly to obtain a question-and-answer dataset; using the HanLP tool to identify the topic entities in the question-and-answer dataset to obtain second topic entities; using the BIO annotation method to annotate, verify, and modify the second topic entities to obtain a third topic entity; and establishing a high-frequency word dictionary for the power grid domain based on a preset number of topic entities with the highest frequency of occurrence in the third topic entity.

[0014] In conjunction with the first aspect, in some possible implementations, invalid power grid problems are problems that will no longer occur in the power grid system; invalid problem solutions are solutions that cannot solve the corresponding problems or solutions that will no longer occur in the power grid system.

[0015] In conjunction with the first aspect, in some possible implementations, the first topic entity is obtained based on multiple characters, multiple words, multiple phrases, and a high-frequency word dictionary in the power grid field. Specifically, this includes: obtaining multiple word set vectors based on the BMES annotation method and multiple characters, where the multiple word set vectors include B word set vectors, M word set vectors, E word set vectors, and S word set vectors; obtaining forward word set vectors and backward word set vectors based on multiple words and multiple phrases; obtaining character vectors based on multiple word set vectors, forward word set vectors, and backward word set vectors; establishing a joint feature model based on a high-frequency word dictionary in the power grid field and SoftLexicon technology; and inputting the character vectors into the joint feature model to obtain the first topic entity.

[0016] In conjunction with the first aspect, in some possible implementations, the joint feature model includes: an input layer, an encoding layer, a decoding layer, and an output layer; the input layer is used to obtain the character vectors input to the joint feature model; the encoding layer is used to process the input character vectors using a Bi-LSTM model to obtain first processed information; the decoding layer is used to predict the corresponding labels based on the first processed information using a normalized exponential function, and obtain the first topic entity based on the labels; the output layer is used to output the first topic entity.

[0017] In conjunction with the first aspect, in some possible implementations, the character vector is: Where c is any character, Let c be the forward word vector. Let be the backward word vector of character 'c'. The formula for the word vector of a character is: , L A dictionary of high-frequency terms in the power grid field. This represents the vector of the words in the phrase; , , , ,in, , For words The number of times it appears in the third topic entity, It is the vector of words in the word set.

[0018] In conjunction with the first aspect, in some possible implementations, the solution to the power grid domain problem proposed by the user is obtained by matching the first topic entity based on the power grid knowledge database. Specifically, this includes: when the first topic entity is precisely matched with the entity in the power grid knowledge database, the solution to the power grid domain problem proposed by the user is directly obtained; when the first topic entity cannot be precisely matched with the entity in the power grid knowledge database, fuzzy matching is performed on the first topic entity to obtain a set of similar entities, and the solution to the power grid domain problem proposed by the user is obtained based on the set of similar entities and the entities in the power grid knowledge database.

[0019] Secondly, embodiments of this application provide an intelligent problem retrieval device in the field of power grids, comprising:

[0020] The acquisition module is used to acquire power grid knowledge databases and power grid-related questions raised by users.

[0021] The processing module is used to perform word segmentation and character segmentation on the power grid-related questions raised by users, resulting in multiple characters, multiple words, and multiple word groups. Each word group consists of any one of the multiple words and the word adjacent to that one word.

[0022] The identification module is used to obtain the first topic entity based on multiple characters, multiple words, multiple phrases and a high-frequency word dictionary in the power grid field. The high-frequency word dictionary in the power grid field is constructed based on multiple power grid field issues and multiple issue solutions.

[0023] The results module is used to match the first topic entity based on the power grid knowledge database to obtain solutions to the power grid problems proposed by the user.

[0024] Thirdly, embodiments of this application provide a terminal device, including: a processor and a memory, the memory being used to store a computer program, wherein the processor executes the computer program to implement the intelligent retrieval method for power grid issues as described in any of the first aspects.

[0025] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the intelligent retrieval method for power grid issues as described in any of the first aspects.

[0026] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the intelligent retrieval method for power grid issues as described in any of the first aspects above.

[0027] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.

[0028] The beneficial effects of the embodiments in this application compared with the prior art are:

[0029] This application performs word segmentation on user-proposed power grid-related questions, resulting in multiple characters, words, and phrases. Based on these characters, words, and phrases, a first topic entity for the user's proposed power grid-related question is obtained. This first topic entity is then matched with a power grid knowledge database to obtain a solution to the user's question. The multiple characters in obtaining the first topic entity prevent information loss due to incorrect word segmentation boundaries. The multiple words prevent the loss of information from the original words after segmentation into characters. The multiple phrases represent the mutual information between the multiple words. Therefore, this application's solution combines character information, word information, and phrase information, resulting in more accurate matching results and enabling users to obtain accurate solutions.

[0030] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a schematic diagram illustrating an application scenario of the intelligent problem retrieval method in the power grid field provided in an embodiment of this application;

[0033] Figure 2 This is a flowchart illustrating an embodiment of the intelligent problem retrieval method in the power grid field provided in this application;

[0034] Figure 3 This is a schematic diagram of word set vectors, forward word group vectors, and backward word group vectors provided in an embodiment of this application;

[0035] Figure 4 This is a schematic diagram of the first subject entity recognition process provided in an embodiment of this application;

[0036] Figure 5 This is a schematic diagram of intelligent retrieval of problems in the power grid field provided in an embodiment of this application;

[0037] Figure 6 This is a schematic diagram of an objective employee evaluation process provided in an embodiment of this application;

[0038] Figure 7 This is a schematic diagram of the structure of an intelligent problem retrieval device in the field of power grids provided in an embodiment of this application;

[0039] Figure 8 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation

[0040] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0041] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0042] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0043] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0044] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0045] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0046] For example, embodiments of this application can be applied to, for example... Figure 1 In the exemplary scenario shown, the problem acquisition device 10 acquires a power grid-related problem raised by a user and sends it to the power grid-related problem intelligent retrieval device 20. The power grid-related problem intelligent retrieval device 20 calculates the solution corresponding to the power grid-related problem raised by the user.

[0047] The following combination Figure 1 This application provides a detailed description of the intelligent retrieval method for power grid-related issues.

[0048] Figure 2 This is a schematic flowchart of an intelligent problem retrieval method in the power grid field provided in an embodiment of this application, with reference to... Figure 2 The intelligent retrieval method for problems in the power grid field is described in detail below:

[0049] Step 101: Obtain the power grid knowledge database and power grid-related questions raised by users.

[0050] For example, the power grid knowledge database contains knowledge content related to the power grid field, such as multiple problems in the power grid field and solutions to these problems.

[0051] Step 102: Perform word segmentation and character segmentation on the power grid-related questions raised by the user to obtain multiple characters, multiple words, and multiple word groups. Each word group consists of any one of the multiple words and a word adjacent to that word.

[0052] Step 103: Based on multiple characters, multiple words, multiple phrases and a high-frequency word dictionary in the power grid field, the first topic entity is obtained. The high-frequency word dictionary in the power grid field is constructed based on multiple power grid field issues and multiple issue solutions.

[0053] For example, the process of constructing a high-frequency word dictionary for the power grid domain includes: obtaining multiple power grid domain questions and multiple problem solutions based on a power grid knowledge database; filtering out invalid power grid domain questions and invalid problem solutions from the multiple power grid domain questions and multiple problem solutions to obtain a first set of questions and a first set of solutions; combining the first set of questions and the first set of solutions accordingly to obtain a question-and-answer dataset; using the HanLP tool to identify the topic entities in the question-and-answer dataset to obtain a second set of topic entities; using the BIO annotation method to annotate, verify, and modify the second set of topic entities to obtain a third set of topic entities; and building a high-frequency word dictionary for the power grid domain based on a preset number of topic entities with the highest frequency in the third set of topic entities.

[0054] For example, an invalid problem in the power grid field is a problem that will no longer occur in the power grid system; an invalid solution is a solution that cannot solve the corresponding problem or a solution that will no longer occur in the power grid system.

[0055] For example, based on multiple characters, multiple words, multiple phrases, and a high-frequency word dictionary in the power grid field, a first topic entity is obtained, specifically including: obtaining multiple word set vectors based on the BMES annotation method and multiple characters, wherein the multiple word set vectors include B word set vectors, M word set vectors, E word set vectors, and S word set vectors; obtaining forward word set vectors and backward word set vectors based on multiple words and multiple phrases; obtaining character vectors based on multiple word set vectors, forward word set vectors, and backward word set vectors; establishing a joint feature model based on a high-frequency word dictionary in the power grid field and SoftLexicon technology; and inputting the character vectors into the joint feature model to obtain the first topic entity.

[0056] Specifically, Figure 3 This is a diagram illustrating the word set vector, forward word group vector, and backward word group vector, as shown below. Figure 3 As shown in the figure, for the sentence "Where is the power outage application form?", the word set vector, forward word vector, and backward word vector of some characters are shown in the figure.

[0057] Specifically, the formula for word set vectors is: , , , Where L is a high-frequency word dictionary, For characters arrive The words formed For characters arrive The words formed For characters arrive The words formed , and are characters in a sentence , and for parts of the sentence where the word set vector fails to match a word, "None" is used to replace them.

[0058] Specifically, for a sentence 's characters , we will first search in the matching dictionary for the longest word in the sentence that contains the character. If no relevant word is found, that is, the character is a single character, such as words like "in", "which", "already", etc., w will be recorded as None. w The longest word in the forward direction is , w The longest word in the backward direction is , then the forward phrase vector is , and the backward phrase vector is . For some boundary conditions, such as the beginning or end of a sentence, where words cannot be successfully retrieved before and after the word and will be recorded as None. If the characters before and after the current word w are single characters, both the word and the single character will be added to and .

[0059] Specifically, the forward phrase vector is: , and the backward phrase vector is: .

[0060] Exemplarily, the joint feature model includes: an input layer, an encoding layer, a decoding layer, and an output layer; the input layer is used to obtain the character vector input to the joint feature model; the encoding layer is used to process the input character vector using a Bi-LSTM model to obtain the first processed information; the decoding layer is used to predict its corresponding label based on the first processed information using the softmax function and obtain the first topic entity according to the label; the output layer is used to output the first topic entity.

[0061] Specifically, the Bi-LSTM model is composed of a forward LSTM network and a backward LSTM network combined.

[0062] Specifically, Figure 4 is a schematic diagram of the first topic entity recognition process. As Figure 4 shown, for the four characters "Yangtze River Bridge", it needs to be divided into multiple characters, multiple words, and multiple phrases and then obtain the character vector xC1 x C2 x C3 and x C4 The character vector is input into the encoding layer for processing to obtain multiple first-processed information. The multiple first-processed information is input into the decoding layer, and the corresponding label is predicted using the normalized exponential function Softmax. Based on the label, the first topic entity "Yangtze River Bridge" is obtained.

[0063] Specifically, the expression for the normalized exponential function Softmax is: ,in, Each sample belongs to a category The probability, For the first The output value of each node, M is the number of label classification categories. This invention uses the BIO annotation method, i.e., M=3.

[0064] For example, the character vector is: Where c is any character, Let c be the forward word vector. Let be the backward word vector of character 'c'. The formula for the word vector of a character is: , L A dictionary of high-frequency terms in the power grid field. This represents the vector of the words in the phrase; , , , ,in, , For words The number of times it appears in the third topic entity, It is the vector of words in the word set.

[0065] Step 104: Match the first topic entity based on the power grid knowledge database to obtain a solution to the power grid problem proposed by the user.

[0066] For example, matching the first topic entity based on the power grid knowledge database to obtain a solution to the power grid domain problem proposed by the user specifically includes: when the first topic entity is precisely matched with the entity in the power grid knowledge database, the solution to the power grid domain problem proposed by the user is directly obtained; when the first topic entity cannot be precisely matched with the entity in the power grid knowledge database, fuzzy matching is performed on the first topic entity to obtain a set of similar entities, and the solution to the power grid domain problem proposed by the user is obtained based on the set of similar entities and the entities in the power grid knowledge database.

[0067] Specifically, exact matching means a complete match with the content in the power grid knowledge database (for example, a certain entity in the power grid knowledge database is exactly the same as the first topic entity). However, in actual operations, many situations may occur. For example: 1. The query entered by the user contains typos. 2. The query entered by the user contains rare Chinese characters. 3. Incorrect entity recognition occurs in the joint feature model. 4. The problem of synonyms. 5. The information in the knowledge base is not rich enough. For the above situation 4, a synonym dictionary can be established to solve the problem. When the word cannot be retrieved, its synonyms can be retrieved; for the above situation 5, the knowledge content of the power grid knowledge database needs to be expanded; for the above situations 1, 2, and 3, fuzzy matching needs to be performed on the first topic entity mentioned above.

[0068] Specifically, the similar entity set contains multiple entities similar to the first topic entity. Select N entities with relatively high similarity and record their triple IDs. The triple IDs can be directly obtained from the power grid knowledge database. Use the Chinese word segmentation tool Jieba to segment the N entities with relatively high similarity, record the segmentation results, and record the ID number of the triple where the entity of each word before segmentation is located. Merge the repeated words to form a new data set, that is, the fuzzy matching dictionary. For example: There is an entity "power outage application form" in the data set, and its corresponding triple ID numbers are [550, 610]. There is another entity "power outage application", and its corresponding triple ID numbers are [745, 2371]. After word segmentation, they are [“power outage”, “application form”] and [“power outage”, “application”] respectively. Merge the repeated word "power outage" and record the corresponding ID numbers. The processed data is as follows: "power outage": [550, 610, 745, 2371].

[0069] Specifically, discard the words in the Jieba segmentation results whose frequencies exceed 100. Generally speaking, there will be a large number of auxiliary words such as "de", "di", "de" in the segmentation results. These words do not provide any effective information, but will greatly increase the capacity of the dictionary and reduce the matching efficiency. In addition, words such as "system" and "platform" will also appear in large numbers in this data set. Although these words contain some effective information and will improve the performance of the fuzzy matching module to a certain extent, they will cause a significant increase in the number of entities in the candidate set recalled by exact matching. In order to balance accuracy and efficiency, these words are discarded.

[0070] Discard words with a frequency below 2 in the Jieba segmentation results. Although the current dataset is small, deleting these low-frequency words will not have a particularly significant impact. However, if the knowledge base is expanded to hundreds of thousands or even millions of entries in the future, deleting these low-frequency words will greatly reduce the dictionary size and improve fuzzy matching efficiency. An experiment was conducted using the NLPCC2016 knowledge base, which contains 43,063,796 triples and 5,928,836 entities. Retaining words with a frequency below 2 would increase the fuzzy matching dictionary size to over 1 million entries, while discarding these words would reduce the dictionary size to around 250,000 entries, a significant improvement. Correspondingly, the accuracy of fuzzy matching would decrease from 83% to 75%, and the matching speed would decrease from 1.3 seconds per entity to 0.68 seconds per entity. The loss in accuracy is considered acceptable.

[0071] For example, for entities to be matched in fuzzy matching, word segmentation is performed first, and the segmented words are matched precisely with the fuzzy matching dictionary to obtain a candidate entity set.

[0072] The formula for this process is as follows, with entities to be matched. , For characters:

[0073]

[0074] It is the generated candidate entity set. This is the word segmentation result of the entity to be matched. The words in It is the fuzzy matching dictionary mentioned above. It is recorded in the fuzzy matching dictionary. Set of numbers express The entity corresponding to the triple in the knowledge base.

[0075] For example, Figure 5 This is a schematic diagram illustrating intelligent problem retrieval in the power grid field, such as... Figure 5 As shown, the user's question is: "Where can I submit the 'Support Power' application form?". The first topic entity is extracted as "Support Power's application form". Since this first topic entity cannot be precisely matched in the power grid knowledge database, fuzzy matching is performed. First, it is segmented into words to obtain "Support Power" and "application form". The obtained "Support Power" and "application form" are used to obtain a candidate entity set according to the fuzzy matching dictionary. Then, based on the cosine similarity between each entity in the candidate entity set and the first topic entity "Support Power's application form", a preset number of entities in the candidate entity set are obtained as the result of fuzzy matching.

[0076] Specifically, after obtaining the candidate entity set, the word vector representation of the entity in the candidate entity set is generated by using the word vector of the generated character in the joint feature model. Then, the cosine similarity between the word vector representation of the entity to be matched generated in the joint feature model is calculated in turn. The four entities in the candidate entity set with the highest similarity are selected as the result of fuzzy matching.

[0077] The formula for calculating cosine similarity is as follows: ,in, The word vector of the entity to be matched. is the word vector of the entity in the candidate entity set.

[0078] To evaluate employees more objectively, such as Figure 6 As shown, the above-mentioned intelligent retrieval method for power grid issues can be used. First, the intelligent retrieval method for power grid issues is used to obtain the results corresponding to the user's question. The results are compared with the content of the employee's answer. A subjective score is obtained through expert scoring, with the highest subjective score being 100 points. An objective score is obtained based on the content of the employee's answer and a sentiment analysis model. The subjective score and the objective score are weighted differently to achieve an objective evaluation of the employee. In one embodiment, the subjective score weight is 0.75 and the objective score weight is 0.25.

[0079] The aforementioned sentiment analysis model is the Glove-BiLSTM-AC model, which can be used to perform better polarization detection and qualitative analysis on employee responses. In the model architecture, global vectors representing words are used as weights in the embedding layer. Then, a BiLSTM is used to capture long-term dependencies in the text. An attention mechanism is used at the output of the BiLSTM, enabling the model to pay different levels of attention to different words and sentences. A convolutional neural network is then used to extract features, reducing the dimensionality of the input data. Furthermore, global pooling layers and average pooling layers are stacked at the output of the CNN layer to complete its downsampled feature map. The specific workflow architecture of the sentiment analysis model is described below.

[0080] First, in order to generate the input annotation matrix, it needs to be processed by a pre-trained GloVe embedding matrix, which embeds annotation vectors according to the total number of words and the embedding dimension, using padding length or maximum number of words.

[0081] Then, two BiLSTMs are applied as parallel layers to the output of the embedding layer. That is, the parallel layers are used to process sequences of arbitrary length before the character input encoding layer, and two kinds of forward and backward long correlations are extracted. This allows the model to memorize both long and short sequences at the same time.

[0082]

[0083]

[0084] To determine the weight of each word, we can obtain annotations by connecting the preceding and following context:

[0085]

[0086] Applying attention mechanisms to h tLSTM This allows the model to pay attention to different words in the comments with different weights, thereby capturing important domains within the text. The feature vectors are modified to extract informative words from the annotations, as shown below.

[0087]

[0088]

[0089]

[0090] Among them, W wLSTM for h tLSTM The weight, u tLSTM It is h tLSTM The hidden representation of u wLSTM These are context vectors that are randomly initialized and jointly learned during the training phase. Using u tLSTM with u wLSTM Similarity calculation of words u tLSTM The importance of these factors is determined and normalized, as shown in the equation above. α tLSTM By weighting and summing them, they are finally aggregated into s. LSTM . s LSTM This is a feature vector summarizing all word information in the comment. After obtaining the final annotation representation, convolution operations are used to extract local feature information from the input data, reducing dimensionality. Furthermore, convolution makes the model position-invariant. In Glove-BiLSTM-AC, each branch uses two parallel convolutional layers with different kernel sizes. In this layer, convolution is performed in one dimension. Specifically, the output of the BiLSTM unit applies two CNN architectures with a fixed number of filters and different window sizes. At this point, there are four CNN layer outputs because the output of the BiLSTM layer applies two independent CNNs. Now, max-pooling and average-pooling layers are independently stacked on the CNN outputs, downsampling their feature maps. This makes the generated feature maps more robust to positional variations in features. Considering the number of filters in the CNN layers, the final feature vector for each pooling operation is... This yields eight local feature maps because max pooling and average pooling are used independently for each CNN. These feature vectors are concatenated to form the final document vector, thus resulting in... After obtaining the Lc vector, batch normalization is used to accelerate network training and reduce overfitting. To predict the sentiment polarity of comments, a fully connected dense layer is used. L C The vector is transformed into a high-level sentiment representation, and the output of this layer is calculated as follows.

[0091]

[0092] Among these, h p W is the hidden representation obtained after batch normalization of the pooling layer. d and b d These are the parameters learned during training. Finally, the output of the fully connected layer is fed into the output layer of the sigmoid function for binary classification. The classification results are N and Y. The objective score for a classification result of Y is 100 points, and the objective score for a classification result of N is 0 points.

[0093] To verify the performance of the joint feature model in this application, the following method was used to test the performance of the joint feature model. The content of the third topic entity was organized into a simplified knowledge base. 3500 data points were selected as the training set and 1023 data points were selected as the test set. Some parameter settings of the joint feature model are shown in Table 1.

[0094]

[0095] Table 1

[0096] The most commonly used test metrics are precision (P), recall (R), and F1 score (F1), which are calculated using the following formulas: , , TP represents the number of positive classes that were correctly identified as positive in the prediction, FP represents the number of negative classes that were correctly identified as positive in the prediction, and FN represents the number of positive classes that were correctly identified as negative in the prediction.

[0097] To make the experimental results more realistic and reliable, a control experiment was conducted to compare the results with the mainstream SoftLexicon model (the difference between the SoftLexicon model and the joint feature model is that the joint feature model in this application incorporates information from the preceding and following phrases). The comparison results are shown in Table 2.

[0098]

[0099] Table 2

[0100] The comparative results from the above experiments show that, for the power grid dataset, our proposed joint feature model achieves better performance in all three metrics (P, R, and F1) compared to the SoftLexicon model, regardless of whether a high-frequency word dictionary is used. This improvement is even more pronounced after using the high-frequency word dictionary, with the F1 score being approximately 1.5% higher than the SoftLexicon model. These results demonstrate that our proposed joint feature model is more suitable for NER-related tasks in the power grid domain than the SoftLexicon model, and its performance meets the accuracy requirements for NER module recognition in intelligent customer service systems.

[0101] The aforementioned intelligent retrieval method for power grid issues involves segmenting the user-proposed power grid issue into multiple characters, words, and phrases. Based on these elements, a first topic entity for the user's proposed power grid issue is obtained. This first topic entity is then matched with a power grid knowledge database to yield a solution to the user's problem. The multiple characters in obtaining the first topic entity prevent information loss due to incorrect segmentation boundaries. The multiple words prevent the loss of information from the original words after segmentation into characters. The multiple phrases reveal the interrelationships between the words. Therefore, this application's solution combines character, word, and phrase information, resulting in more accurate matching results and enabling users to obtain precise solutions.

[0102] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0103] Corresponding to the intelligent retrieval method for power grid issues described in the above embodiments, Figure 7 The diagram shows a structural block diagram of an intelligent retrieval device for power grid issues provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiments of this application are shown.

[0104] See Figure 7 The intelligent retrieval device for power grid issues in this application embodiment may include: an acquisition module 301, a processing module 302, an identification module 303, and a result module 304.

[0105] Optionally, module 301 is used to acquire power grid knowledge database and power grid-related questions raised by users.

[0106] Optionally, the processing module 302 is used to perform word segmentation and character segmentation operations on the power grid field problem proposed by the user to obtain multiple characters, multiple words and multiple word groups. The multiple word groups are composed of any one of the multiple words and a word adjacent to that word.

[0107] Optionally, the recognition module 303 is used to obtain a first topic entity based on the multiple characters, multiple words, multiple phrases and a high-frequency word dictionary in the power grid field, wherein the high-frequency word dictionary in the power grid field is constructed based on multiple power grid field issues and multiple issue solutions.

[0108] For example, the identification module 303 is specifically used to: obtain multiple power grid domain problems and multiple problem solutions based on the power grid knowledge database; filter out invalid power grid domain problems and invalid problem solutions from the multiple power grid domain problems and multiple problem solutions to obtain a first problem set and a first solution set; combine the first problem set and the first solution set accordingly to obtain a question-and-answer dataset; use the HanLP tool to identify the topic entities in the question-and-answer dataset to obtain a second topic entity; use the BIO annotation method to annotate, verify, and modify the second topic entity to obtain a third topic entity; and establish a high-frequency word dictionary for the power grid domain based on a preset number of topic entities with the highest frequency of occurrence in the third topic entity.

[0109] For example, an invalid problem in the power grid field is a problem that will no longer occur in the power grid system; an invalid solution is a solution that cannot solve the corresponding problem or a solution that will no longer occur in the power grid system.

[0110] For example, the recognition module 303 is specifically used to: obtain multiple word set vectors based on the BMES annotation method and multiple characters, wherein the multiple word set vectors include B word set vectors, M word set vectors, E word set vectors and S word set vectors; obtain forward word set vectors and backward word set vectors based on multiple words and multiple word sets; obtain character vectors based on multiple word set vectors, forward word set vectors and backward word set vectors; establish a joint feature model based on a high-frequency word dictionary in the power grid field and SoftLexicon technology; and input the character vectors into the joint feature model to obtain the first topic entity.

[0111] For example, the joint feature model includes: an input layer, an encoding layer, a decoding layer, and an output layer; the input layer is used to obtain the character vectors input to the joint feature model; the encoding layer is used to process the input character vectors using a Bi-LSTM model to obtain first processed information; the decoding layer is used to predict the corresponding labels based on the first processed information using a normalized exponential function, and obtain the first topic entity based on the labels; the output layer is used to output the first topic entity.

[0112] For example, the character vector is: Where c is any character, Let c be the forward word vector. Let be the backward word vector of character 'c'. The formula for the word vector of a character is: , L A dictionary of high-frequency terms in the power grid field. This represents the vector of the words in the phrase; , , , ,in, , For words The number of times it appears in the third topic entity, It is the vector of words in the word set.

[0113] Optionally, the result module 304 is used to match the first topic entity based on the power grid knowledge database to obtain a solution to the power grid problem proposed by the user.

[0114] For example, the result module 304 is specifically used to: directly obtain the solution to the power grid domain problem proposed by the user when the first topic entity is precisely matched with the entity in the power grid knowledge database; when the first topic entity cannot be precisely matched with the entity in the power grid knowledge database, perform fuzzy matching on the first topic entity to obtain a set of similar entities, and obtain the solution to the power grid domain problem proposed by the user based on the set of similar entities and the entities in the power grid knowledge database.

[0115] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0116] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0117] This application also provides a terminal device, see [link to relevant documentation] Figure 8 The terminal device 500 may include at least one processor 510 and a memory 520, the memory 520 being used to store a computer program 521. The processor 510 is used to call and run the computer program 521 stored in the memory 520 to implement the steps in any of the above method embodiments, for example... Figure 2 Steps 101 to 104 in the illustrated embodiment. Alternatively, when the processor 510 executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 7 The functions of modules 301 to 304 are shown.

[0118] For example, computer program 521 may be divided into one or more modules / units, one or more of which are stored in memory 520 and executed by processor 510 to complete this application. The one or more modules / units may be a series of computer program segments capable of performing specific functions, which describe the execution process of the computer program in terminal device 500.

[0119] Those skilled in the art will understand that Figure 8 This is merely an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, buses, etc.

[0120] The processor 510 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0121] The memory 520 can be an internal storage unit of the terminal device or an external storage device, such as a plug-in hard drive, a smart media card (SMC), a secure digital (SD) card, or a flash card. The memory 520 is used to store the computer program and other programs and data required by the terminal device. The memory 520 can also be used to temporarily store data that has been output or will be output.

[0122] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0123] The intelligent retrieval method for power grid issues provided in this application can be applied to terminal devices such as computers, wearable devices, vehicle-mounted devices, tablets, laptops, netbooks, and mobile phones. This application does not impose any restrictions on the specific type of terminal device.

[0124] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the various embodiments of the intelligent retrieval method for problems in the power grid field described above.

[0125] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps in the various embodiments of the intelligent retrieval method for problems in the power grid field described above.

[0126] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0127] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0128] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0129] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0130] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0131] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for intelligent retrieval of problems in the power grid field, characterized in that, include: Access power grid knowledge databases and power grid-related questions raised by users; The power grid-related questions raised by the user are segmented into words and characters to obtain multiple characters, multiple words, and multiple word groups. Each word group consists of any one of the multiple words and a word adjacent to that word. Based on the multiple characters, multiple words, multiple phrases, and a high-frequency word dictionary in the power grid field, a first topic entity is obtained. The high-frequency word dictionary in the power grid field is constructed based on multiple power grid field issues and multiple issue solutions. Based on the power grid knowledge database, the first topic entity is matched to obtain a solution to the power grid problem proposed by the user. The process of constructing the high-frequency word dictionary in the power grid field includes: Based on the power grid knowledge database, we obtained multiple problems and solutions in the power grid field. By filtering out invalid power grid domain problems and invalid problem solutions from the plurality of problem domain problems and the plurality of problem solutions, a first problem set and a first solution set are obtained; wherein, invalid power grid domain problems are problems that will no longer occur in the power grid system; invalid problem solutions are solutions that cannot solve the corresponding problems or solutions that will no longer occur in the power grid system. The first question set and the first solution set are combined accordingly to obtain a question-and-answer dataset; The HanLP tool was used to identify the topic entities in the question-and-answer dataset to obtain the second topic entities. The second topic entity is annotated, verified, and modified using the BIO annotation method to obtain the third topic entity; A high-frequency word dictionary for the power grid field is established based on a preset number of thematic entities that appear most frequently in the third thematic entity; Based on the multiple characters, multiple words, multiple phrases, and a high-frequency word dictionary in the power grid field, the first topic entity is obtained, specifically including: Based on the BMES annotation method and the multiple characters, multiple word set vectors are obtained, including B word set vector, M word set vector, E word set vector and S word set vector; Based on the multiple words and multiple word groups, a forward word group vector and a backward word group vector are obtained; Based on the multiple word set vectors, the forward word group vectors, and the backward word group vectors, a character vector is obtained; A joint feature model is established based on a high-frequency word dictionary in the power grid field and SoftLexicon technology; The character vector is input into the joint feature model to obtain the first topic entity; The formula for word set vectors is: , , , Where L is a high-frequency word dictionary, For characters arrive The words formed For characters arrive The words formed For characters arrive The words formed , and For sentences For characters in the word set vector that do not match any words, use "None" to replace them; The character vector is: Where c is any character, Let c be the forward word vector. Let be the backward word vector of character 'c'. The formula for the word vector of a character is: , L This is a high-frequency word dictionary for the power grid field. This represents the vector of the words in the phrase; , , , ,in, , For words The number of times it appears in the third topic entity, It is the vector of words in the word set.

2. The intelligent retrieval method for power grid problems as described in claim 1, characterized in that, The invalid power grid problems are problems that will not recur in the power grid system; the invalid problem solutions are solutions that cannot solve the corresponding problems or solutions that will not recur in the power grid system.

3. The intelligent retrieval method for power grid problems as described in claim 1, characterized in that, The joint feature model includes: an input layer, an encoding layer, a decoding layer, and an output layer; The input layer is used to obtain the character vector of the input joint feature model; The encoding layer is used to process the input character vector using a Bi-LSTM model to obtain the first processed information; The decoding layer is used to predict the corresponding label based on the first processed information using a normalized exponential function, and to obtain the first topic entity based on the label. The output layer is used to output the first topic entity.

4. The intelligent retrieval method for power grid problems as described in claim 1, characterized in that, The step of matching the first topic entity based on the power grid knowledge database to obtain a solution to the power grid problem proposed by the user specifically includes: When the first topic entity is precisely matched with the entity in the power grid knowledge database, a solution to the power grid problem proposed by the user is directly obtained; When the first topic entity cannot be precisely matched with the entity in the power grid knowledge database, a fuzzy match is performed on the first topic entity to obtain a set of similar entities. Based on the set of similar entities and the entities in the power grid knowledge database, a solution to the power grid domain problem proposed by the user is obtained.

5. An intelligent problem retrieval device in the field of power grids, characterized in that, include: The acquisition module is used to acquire power grid knowledge databases and power grid-related questions raised by users. The processing module is used to perform word segmentation and character segmentation on the power grid-related questions raised by the user, resulting in multiple characters, multiple words, and multiple word groups. Each word group consists of any one of the multiple words and a word adjacent to that one word. The identification module is used to obtain a first topic entity based on the multiple characters, multiple words, multiple phrases and a high-frequency word dictionary in the power grid field, wherein the high-frequency word dictionary in the power grid field is constructed based on multiple power grid field issues and multiple problem solutions. The results module is used to match the first topic entity based on the power grid knowledge database to obtain a solution to the power grid problem proposed by the user. The process of constructing the high-frequency word dictionary in the power grid field includes: Based on the power grid knowledge database, we obtained multiple problems and solutions in the power grid field. By filtering out invalid power grid domain problems and invalid problem solutions from the plurality of problem domain problems and the plurality of problem solutions, a first problem set and a first solution set are obtained; wherein, invalid power grid domain problems are problems that will no longer occur in the power grid system; invalid problem solutions are solutions that cannot solve the corresponding problems or solutions that will no longer occur in the power grid system. The first question set and the first solution set are combined accordingly to obtain a question-and-answer dataset; The HanLP tool was used to identify the topic entities in the question-and-answer dataset to obtain the second topic entities. The second topic entity is annotated, verified, and modified using the BIO annotation method to obtain the third topic entity; A high-frequency word dictionary for the power grid field is established based on a preset number of thematic entities that appear most frequently in the third thematic entity; The recognition module is used for: Based on the BMES annotation method and the multiple characters, multiple word set vectors are obtained, including B word set vector, M word set vector, E word set vector and S word set vector; Based on the multiple words and multiple word groups, a forward word group vector and a backward word group vector are obtained; Based on the multiple word set vectors, the forward word group vectors, and the backward word group vectors, a character vector is obtained; A joint feature model is established based on a high-frequency word dictionary in the power grid field and SoftLexicon technology; The character vector is input into the joint feature model to obtain the first topic entity; The formula for word set vectors is: , , , ,in, L A high-frequency word dictionary For characters arrive The words formed For characters arrive The words formed For characters arrive The words formed , and For sentences For characters in the word set vector that do not match any words, use "None" to replace them; The character vector is: Where c is any character, Let c be the forward word vector. Let be the backward word vector of character 'c'. The formula for the word vector of a character is: , L This is a high-frequency word dictionary for the power grid field. This represents the vector of the words in the phrase; , , , ,in, , For words The number of times it appears in the third topic entity, It is the vector of words in the word set.

6. A terminal device, characterized in that, include: A processor and a memory, the memory for storing a computer program, the processor for calling and running the computer program stored in the memory to perform the intelligent retrieval method for power grid problems as described in any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the intelligent retrieval method for power grid problems as described in any one of claims 1 to 4.