Question and answer type intelligent query method and system based on power distribution network knowledge base

By constructing a FAQ corpus in the power distribution network knowledge base, and using keyword semantic information to classify and evaluate the relevance of question-answer pairs, the problem of identifying questions with different expressions is solved, and the query efficiency and accuracy are improved.

CN121786172BActive Publication Date: 2026-05-08CHANGSHA XINTIAN SURVEYING & DESIGNING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHANGSHA XINTIAN SURVEYING & DESIGNING CO LTD
Filing Date
2026-03-06
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing question-and-answer intelligent query methods fail to fully consider the semantic similarity of questions with different expressions in the power distribution network knowledge base, making it difficult to accurately identify the same type of question and affecting query efficiency and accuracy.

Method used

By constructing a comprehensive and accurate FAQ corpus, we classify question-answer pairs using keyword semantic information, filter out high-frequency and low-frequency question sets, calculate the correlation between questions and answers, evaluate semantic consistency, and select question-answer pairs suitable for constructing the FAQ corpus.

Benefits of technology

It improves the efficiency and accuracy of question-and-answer intelligent query of the power distribution network knowledge base, reduces the computational complexity of semantic analysis, enriches the corpus content, and ensures the accuracy of the query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121786172B_ABST
    Figure CN121786172B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of question and answer type intelligent query, in particular to a question and answer type intelligent query method and system based on a power distribution network knowledge base, which comprises the following steps: acquiring each question and answer pair composed of question texts and answer texts in historical question and answer records; classifying all the question and answer pairs; screening each question high-frequency set and each question low-frequency set for each category; acquiring each high-relevant question high-frequency set of each question low-frequency set; acquiring the question correlation degree between each question low-frequency set and each high-relevant question high-frequency set thereof; acquiring the answer correlation degree between each question and answer pair belonging to each question low-frequency set and each question and answer pair belonging to each high-relevant question high-frequency set thereof; acquiring the semantic consistency degree of each question and answer pair belonging to each question low-frequency set; constructing an FAQ corpus; and performing question and answer type intelligent query. The application aims to improve the efficiency and precision of the question and answer type intelligent query based on the power distribution network knowledge base by constructing a comprehensive and accurate FAQ corpus.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of question-and-answer intelligent query technology, specifically to a question-and-answer intelligent query method and system based on a power distribution network knowledge base. Background Technology

[0002] In recent years, the structure of power distribution networks has become increasingly complex, and the volume of operational data has grown massively, making the traditional method of relying on expert experience to retrieve fault knowledge inefficient. The development of AI technology has provided technical support for the digital and intelligent transformation of power distribution networks. Among its applications, question-and-answer intelligent query based on power distribution network knowledge bases is one of its important application areas, which can significantly improve knowledge retrieval efficiency and the operational stability of power distribution networks.

[0003] However, existing question-and-answer intelligent query methods mainly retrieve answers to input questions from the massive knowledge base of the power distribution network. In reality, power distribution network knowledge bases are not only massive in volume but also contain a wide variety of complex data types. Mixing high-frequency and low-frequency questions increases the waiting time when querying high-frequency questions. Although constructing a FAQ corpus by statistically analyzing high-frequency questions improves intelligent query efficiency, this method primarily focuses on the frequency dimension of questions and does not fully consider the semantic similarity of questions with different expressions. This makes it difficult to accurately identify the same type of questions with the same semantic relationship. For example, different people may ask the same question in different ways; although the answers may be consistent, the statistical frequency of the same type of question is low, resulting in an incomplete FAQ corpus and affecting the efficiency and accuracy of question-and-answer intelligent queries based on the power distribution network knowledge base. Summary of the Invention

[0004] In view of the above, it is necessary to provide a question-and-answer intelligent query method and system based on the power distribution network knowledge base. Compared with the traditional question-and-answer intelligent query method based on the power distribution network knowledge base, the efficiency and accuracy of the question-and-answer intelligent query based on the power distribution network knowledge base can be improved by constructing a comprehensive and accurate FAQ corpus.

[0005] In a first aspect, embodiments of this application provide a question-and-answer-based intelligent query method based on a power distribution network knowledge base, the method comprising the following steps:

[0006] Retrieve each question-and-answer pair, consisting of the question text and the answer text, from the historical question-and-answer records;

[0007] Based on the semantic information of keywords in all question-answer pairs, all question-answer pairs are classified. For each category, a keyword set for each question is obtained based on the keywords in the question text of each question-answer pair. Then, based on the occurrence of keywords in each question keyword set, high-frequency sets and low-frequency sets for each question are obtained. By comparing the low-frequency sets with the high-frequency sets, the high-frequency sets of highly relevant questions for each low-frequency set are obtained. Finally, by analyzing the similarity of word vectors of keywords between the low-frequency sets and the high-frequency sets of highly relevant questions, the high-frequency sets of questions for each low-frequency set are obtained. The question-answer correlation between sets is calculated. By using the word vector similarity of the keywords in the answer texts of each question-answer pair belonging to the low-frequency question set and each question-answer pair belonging to the high-frequency question set of each highly relevant question, the answer correlation between each question-answer pair belonging to the low-frequency question set and each question-answer pair belonging to the high-frequency question set of each highly relevant question is obtained. Then, combined with the question-answer correlation, the semantic consistency of each question-answer pair belonging to the low-frequency question set is obtained. Based on the semantic consistency, question-answer pairs used to construct the FAQ corpus are selected, and then the constructed FAQ corpus is used for question-answering intelligent query.

[0008] In one embodiment, the process of classifying all question-answer pairs is as follows:

[0009] The word vectors of all keywords in the question text of each question-answer pair are concatenated with the word vectors of all keywords in the answer text to obtain the comprehensive vector of each question-answer pair;

[0010] All question-answer pairs are classified based on the similarity between their combined vectors.

[0011] In one embodiment, the process of obtaining the high-frequency set and low-frequency set of each problem is as follows:

[0012] The frequency of occurrence of various question keyword sets is statistically analyzed. The frequency segmentation threshold is defined as the segmentation threshold for the frequency of occurrence of all question keyword sets. Question keyword sets with an occurrence frequency greater than or equal to the frequency segmentation threshold are defined as high-frequency sets for each question, and the remaining question keyword sets are defined as low-frequency sets for each question.

[0013] In one embodiment, the process of obtaining the high-frequency sets of highly relevant problems from the low-frequency sets of each problem is as follows:

[0014] The similarity threshold between the low-frequency set of each question and the high-frequency set of all questions is denoted as the similarity segmentation threshold.

[0015] The high-frequency sets of each question whose similarity to the low-frequency sets of each question is greater than or equal to the similarity segmentation threshold are taken as the high-frequency sets of highly relevant questions of each low-frequency set.

[0016] In one embodiment, the process of obtaining the problem relevance is as follows:

[0017] The similarity between the word vectors of each keyword in the low-frequency set of each question and each keyword in the high-frequency set of each highly relevant question is denoted as the question keyword similarity.

[0018] The relevance of the issues is obtained by combining the similarity of the keywords in the low-frequency set of each issue with the keywords in the high-frequency set of each highly relevant issue.

[0019] In one embodiment, the question relevance is the average of the question keyword similarity between all keywords in the low-frequency set of each question and all keywords in the high-frequency set of each highly relevant question.

[0020] In one embodiment, the process of obtaining the answer relevance is as follows:

[0021] For any question-answer pair belonging to the low-frequency set of any question and any question-answer pair belonging to the high-frequency set of any highly relevant question, the maximum value of the word vector similarity between any keyword in the answer text of any question-answer pair and all keywords in the answer text of any question-answer pair is denoted as the answer keyword similarity between any keyword and any question-answer pair.

[0022] Calculate the keyword similarity between any keyword in the answer text of any question-and-answer pair and any keyword in the answer text of any question-and-answer pair;

[0023] An average value is calculated by considering the similarity between all keywords in the answer text of any question-answer pair and the answer keyword similarity between all keywords in the answer text of any question-answer pair and the answer keyword similarity between any question-answer pair.

[0024] The percentage of keywords in the answer text of any question-and-answer pair whose keyword similarity to the answer keyword is greater than or equal to a preset threshold is calculated among all keywords.

[0025] By combining the average value and the quantity ratio, the answer correlation degree between any question-answer pair and any other question-answer pair is obtained.

[0026] In one embodiment, the process of obtaining the semantic consistency is as follows:

[0027] By combining the question relevance and the answer relevance, the consistency coefficient between each question-answer pair belonging to the low-frequency set of each question and each question-answer pair belonging to the high-frequency set of each highly relevant question is obtained;

[0028] The maximum value among the consistency coefficients between each question-answer pair belonging to the low-frequency set of each question and all question-answer pairs belonging to the high-frequency set of all highly relevant questions is taken as the semantic consistency of each question-answer pair belonging to the low-frequency set of each question.

[0029] In one embodiment, the step of filtering question-answer pairs for constructing a FAQ corpus based on the semantic consistency includes:

[0030] The semantic consistency threshold for the segmentation of question-answer pairs belonging to all question low-frequency sets in all classes is denoted as the semantic consistency segmentation threshold. When the semantic consistency of each question-answer pair belonging to each question low-frequency set is greater than the semantic consistency segmentation threshold, each question-answer pair belonging to each question low-frequency set is determined as the question-answer pair for constructing the FAQ corpus.

[0031] Secondly, embodiments of this application also provide a question-and-answer intelligent query system based on a power distribution network knowledge base, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any of the above-described question-and-answer intelligent query methods based on a power distribution network knowledge base.

[0032] This application has at least the following beneficial effects:

[0033] This application classifies question-and-answer pairs using semantic information, grouping semantically similar questions and answers into one category and performing more detailed analysis on each subcategory, which helps reduce the computational complexity of subsequent semantic analysis. It distinguishes between high-frequency and low-frequency questions and assesses the possibility that low-frequency and high-frequency questions belong to the same category of questions in different ways, which helps identify questions with the same semantic relationship, thus enriching the corpus content. Simultaneously, it considers the semantic relevance of both the question and answer texts between question-and-answer pairs, comprehensively evaluating the semantic consistency between them from two dimensions. This allows for a more accurate assessment of whether two question-and-answer pairs belong to the same category of questions, thus more precisely selecting suitable question-and-answer pairs for building a comprehensive and accurate FAQ corpus, thereby improving the efficiency and accuracy of question-and-answer intelligent queries based on the power distribution network knowledge base. Attached Figure Description

[0034] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, 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.

[0035] Figure 1 A flowchart illustrating the steps of a question-and-answer intelligent query method based on a power distribution network knowledge base, as provided in one embodiment of this application;

[0036] Figure 2 This is a schematic diagram illustrating the process of obtaining semantic consistency.

[0037] Figure 3 This is a schematic diagram illustrating the calculation process for semantic consistency. Detailed Implementation

[0038] In the description of the embodiments in this application, the words "exemplary," "or," and "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary," "or," and "for example" is intended to present the relevant concepts in a specific manner.

[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be understood that, unless otherwise stated, " / " in this application means "or".

[0040] It should also be noted that the terms "first" and "second" in this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0041] The following description, in conjunction with the accompanying drawings, details the specific scheme of the question-and-answer intelligent query method and system based on the power distribution network knowledge base provided in this application.

[0042] Please see Figure 1 The diagram illustrates a flowchart of a question-and-answer intelligent query method based on a power distribution network knowledge base, according to an embodiment of this application. The method includes the following steps:

[0043] Step 1: Obtain each question-and-answer pair consisting of the question text and the answer text from the historical question-and-answer records.

[0044] The system retrieves historical question-and-answer records from the database of the power distribution network question-and-answer intelligent query system within the past year. These records include the text of the question entered and the text of the answer output for each instance.

[0045] To obtain high-quality question and answer texts for more accurate semantic analysis, a stop word removal method is used to remove punctuation and meaningless characters from the acquired historical question and answer texts. Based on the historical question-and-answer records, the stop word-removed question texts and their corresponding answer texts are constructed into question-answer pairs, referred to simply as question-answer pairs. The stop word removal technique is a well-known technique and will not be elaborated upon in this application.

[0046] Step 2: Classify all question-answer pairs; for each class, filter to obtain high-frequency sets and low-frequency sets of questions; by comparing the low-frequency sets and high-frequency sets of questions, obtain the high-frequency sets of highly relevant questions for each low-frequency set; obtain the question correlation degree between each low-frequency set of questions and each high-frequency set of highly relevant questions; obtain the answer correlation degree between each question-answer pair belonging to each low-frequency set of questions and each question-answer pair belonging to each high-frequency set of highly relevant questions; obtain the semantic consistency degree of each question-answer pair belonging to each low-frequency set of questions.

[0047] Generally, different staff members ask the same questions about the power distribution network in different ways, which can lead to some questions and answers having a lower statistical frequency. When building a FAQ corpus based on the frequency of questions and answers, even if some questions and answers have a high degree of semantic similarity to the frequently occurring questions and answers, some questions and answers may still be missed. Building a FAQ corpus based solely on frequently occurring questions and answers results in an incomplete FAQ corpus, which in turn affects the efficiency and accuracy of intelligent queries.

[0048] Step 2.1: Classify all question-answer pairs based on the semantic information of the keywords in all question-answer pairs.

[0049] Even when multiple question-and-answer pairs exist for the same power distribution network problem, their keywords exhibit semantic similarity, such as equipment names, problem types, and specific solutions in the answers. Therefore, semantically similar question-and-answer pairs can be grouped together, reducing the computational complexity of subsequent semantic analysis and FAQ corpus construction. Specifically, the keywords of each question-and-answer pair are obtained, along with their word vectors. The word vectors of all keywords in the question text are arranged in the order they appear in the question text to form the question vector for each pair. Similarly, the word vectors of all keywords in the answer text are arranged in the order they appear in the answer text to form the answer vector for each pair. The question vectors and answer vectors are then concatenated to obtain the combined vector for each question-and-answer pair. Based on the similarity between the combined vectors of all question-and-answer pairs, all pairs are classified.

[0050] In this embodiment, the TF-IDF algorithm is used to obtain the keywords of each question-answer pair. The TF-IDF algorithm is a well-known technology and will not be described in detail here. As other implementation methods, based on the ability to obtain the keywords of each question-answer pair, implementers may use other existing technologies, such as the TextRank algorithm, etc., and this application does not impose any special restrictions. A power distribution network domain dictionary is introduced during keyword extraction, including proprietary terms such as transformers, voltage levels, and fault types.

[0051] In this embodiment, the Word2Vec word vector model is used to obtain the word vectors of each keyword. The Word2Vec word vector model is a well-known technology and will not be described in detail in this application. As other implementation methods, based on the ability to obtain the word vectors of each keyword, the implementer may use other existing feasible technologies, and this application does not impose any special restrictions.

[0052] In this embodiment, the K-means clustering algorithm is used to classify all question-answer pairs. Each cluster of the K-means clustering algorithm represents a class of question-answer pairs. The number of clusters of the K-means clustering algorithm is determined by the elbow rule. The distance metric is the Euclidean distance between the composite vectors. The K-means clustering algorithm, the elbow rule, and the Euclidean distance are well-known techniques and will not be described in detail in this application. As other implementation methods, implementers can use other existing feasible techniques to achieve the classification of all question-answer pairs. This application does not impose any special restrictions.

[0053] Step 2.2: For each category, obtain the keyword set for each question based on the keywords in the question text of each question-answer pair, and filter out the high-frequency set and low-frequency set for each question based on the occurrence of the keyword set. By comparing the low-frequency set and the high-frequency set, obtain the high-frequency set of highly relevant questions for each low-frequency set. By the similarity of the word vectors of the keywords between the low-frequency set and the high-frequency set of highly relevant questions, obtain the question relevance between the low-frequency set and the high-frequency set of highly relevant questions.

[0054] Because different distribution network equipment may have the same type of fault and similar solutions, for example, when both 10kV oil-immersed transformers and 10kV vacuum circuit breakers have overheating faults, if questions are asked such as "Common causes and solutions for overheating during operation of a 10kV oil-immersed transformer?" and "Causes and solutions for overheating after closing a 10kV vacuum circuit breaker?", the distribution network question-and-answer intelligent query system provides answers such as "Locate the overheating part, isolate the faulty equipment, detect key parameters (winding temperature), and repair the fault (replace aging windings)" and "Locate the overheating part, isolate the faulty equipment, detect key parameters (loop resistance), and repair the fault (replace aging springs)". The questions and answers contain a large number of similar words. Since the above classification is based on the similarity between the semantic vectors of all content in the question-and-answer pair, it can lead to problems from different distribution network equipment being grouped into the same category. Therefore, further filtering of similar problems for the same equipment is necessary.

[0055] Taking the i-th category as an example, we obtain all keywords from the question text of each question-answer pair in the i-th category and form question keyword sets for each question-answer pair in the i-th category. Generally, when asking the same question, if the expression is the same or the keywords are consistent, the question keyword sets are the same, and the corresponding question keyword sets appear frequently. If the question expression is significantly different each time or there are keyword differences, the corresponding question keyword sets appear less frequently. Therefore, we count the frequency of each type of question keyword set, where each question keyword set represents a way of expressing a question.

[0056] To further identify whether each question statement belongs to high-frequency or low-frequency categories, a segmentation threshold for the frequency of occurrence of all question keyword sets is obtained and recorded as the frequency segmentation threshold. This threshold is used to filter whether questions within the same category belong to high-frequency or low-frequency categories. Question keyword sets whose occurrence frequency is greater than or equal to the frequency segmentation threshold are designated as high-frequency sets for each question. High-frequency sets are generally used to construct FAQ corpora due to their high occurrence frequency. All other question keyword sets are designated as low-frequency sets for each question. Low-frequency sets are generally not used to construct FAQ corpora due to their low occurrence frequency.

[0057] In this embodiment, the Otsu threshold segmentation algorithm is used to obtain the segmentation threshold for occurrence frequency. The Otsu threshold segmentation algorithm is a well-known technique and will not be described in detail here. As other implementation methods, based on the ability to obtain the segmentation threshold for occurrence frequency, implementers may use other existing techniques, such as iterative threshold segmentation, global threshold segmentation, etc., and this application does not impose any special restrictions. In this application, unless otherwise specified, the Otsu threshold segmentation algorithm is used to obtain the data segmentation threshold.

[0058] A low-frequency problem set may belong to the same equipment and fault as a high-frequency problem set, but due to differences in the way the questions are phrased, it appears less frequently and is therefore classified as a low-frequency problem set. To analyze the semantic similarity between low-frequency and high-frequency problem sets, the similarity score between each low-frequency problem set and each high-frequency problem set is calculated. The higher the similarity score, the more likely the low-frequency and high-frequency problem sets are to be different expressions of the same distribution network problem. To analyze which high-frequency problem sets are more similar to low-frequency problem sets, a similarity threshold between each low-frequency problem set and all high-frequency problem sets is set as the similarity segmentation threshold. High-frequency problem sets whose similarity to each low-frequency problem set is greater than or equal to the similarity segmentation threshold are considered as highly relevant high-frequency problem sets for each low-frequency problem set.

[0059] In this embodiment, the similarity between the low-frequency set of questions and the high-frequency set of questions is specifically the cosine similarity between the average word vector of all keywords in the low-frequency set of questions and the average word vector of all keywords in the high-frequency set of questions. Cosine similarity is a well-known technique and will not be elaborated upon in this application. As other implementation methods, implementers may adopt other existing feasible techniques based on the ability to measure the similarity between the low-frequency set of questions and the high-frequency set of questions. This application does not impose any special restrictions.

[0060] To further analyze the correlation between each keyword in the low-frequency set of each question and each keyword in the high-frequency set of each highly relevant question, we obtained the word vectors of each keyword in the low-frequency set of each question and the word vectors of each keyword in the high-frequency set of each highly relevant question. These were then used to form the question vector set of each low-frequency set of questions and the question vector set of each high-frequency set of questions that are highly relevant to each low-frequency set of questions.

[0061] Based on the above analysis, the similarity of keyword word vectors between each low-frequency question set and each high-frequency question set with high relevance is used to obtain the question relevance between each low-frequency question set and each high-frequency question set with high relevance. This relevance reflects the semantic significance between the low-frequency question set and the high-frequency question set. The expression is as follows:

[0062] ; This represents the degree of correlation between the low-frequency set of the j-th problem and the high-frequency set of the k-th highly relevant problem; This represents the total number of word vectors in the question vector set of the j-th low-frequency question set; This represents the total number of word vectors in the question vector set of the k-th highly relevant question in the low-frequency set of the j-th question; This represents the m-th word vector in the question vector set of the j-th low-frequency question set; This represents the nth word vector in the question vector set of the kth highly relevant question in the high-frequency set of the jth low-frequency question set; This indicates the operation of calculating similarity. This is denoted as the similarity of the keywords in the question.

[0063] In this embodiment, the similarity between word vectors involved in calculating the relevance of the question is cosine similarity. The calculation of cosine similarity is a well-known technique and will not be elaborated upon here. As other implementation methods, implementers may use other existing techniques to measure the similarity between word vectors, and this application does not impose any special restrictions. In this application, unless otherwise specified, the similarity between word vectors is all cosine similarity.

[0064] It should be noted that, to evaluate the correlation between the low-frequency question set and the high-frequency question set, the similarity feature of each word vector in the question vector set is used as a partial feature. By calculating the mean of all similarity features, the semantic significance between the low-frequency and high-frequency question sets is reflected as a whole. The greater the similarity of word vectors between the question vector sets of the low-frequency and high-frequency question sets, the higher the semantic significance between them, and the greater the calculated question correlation degree.

[0065] Step 2.3: Obtain the answer correlation degree between each question-answer pair belonging to the low-frequency set of each question and each question-answer pair belonging to the high-frequency set of each highly relevant question by using the word vector similarity of the keywords in the answer text.

[0066] Furthermore, analyzing the correlation solely based on the question dimension of the question-answer pair is too one-sided and cannot fully reflect the overall correlation between the question and the answer. For example, in the case mentioned above where both 10kV oil-immersed transformers and 10kV vacuum circuit breakers have overheating faults, the question texts differ only in the keywords of the equipment names, while other descriptions are basically the same, resulting in a relatively high calculated correlation. However, the fact that both 10kV oil-immersed transformers and 10kV vacuum circuit breakers have overheating faults does not belong to the same distribution network fault problem, and the solutions in the answer texts are different, indicating a low semantic correlation between the question-answer pair.

[0067] To analyze the correlation between answer texts, taking the f-th question-answer pair belonging to the low-frequency set of the j-th question and the g-th question-answer pair belonging to the high-frequency set of the k-th highly relevant question as examples, the maximum value of the word vector similarity between any keyword in the answer text of the f-th question-answer pair and all keywords in the answer text of the g-th question-answer pair is denoted as the answer keyword similarity between the given keyword and the g-th question-answer pair. This reflects the maximum similarity between the given keyword and the keywords in the answer text of the g-th question-answer pair. The larger the calculated answer keyword similarity, the more similar the given keyword is to the keywords in the answer text of the g-th question-answer pair.

[0068] Furthermore, to avoid situations where the answer text in the f-th question-answer pair is relatively short while that in the g-th question-answer pair is much longer, and the answer text in the f-th question-answer pair can be retrieved in the g-th question-answer pair even though their content is significantly different and not semantically consistent—for example, the answer text in the f-th question-answer pair contains only the word "inspection," while the answer text in the g-th question-answer pair is a several-hundred-word operation manual containing the word "inspection"—based on the above analysis, the similarity between any keyword in the answer text of the g-th question-answer pair and the answer keyword similarity between the f-th question-answer pair is calculated.

[0069] Furthermore, the similarity between all keywords in the answer text of the f-th question-answer pair and the answer keyword similarity between the g-th question-answer pair, as well as the similarity between all keywords in the answer text of the g-th question-answer pair and the f-th question-answer pair, are calculated together to obtain an average value, which is recorded as the average similarity between the f-th and g-th question-answer pairs. This average value reflects the overall similarity of keywords between the answer texts of the f-th and g-th question-answer pairs. The larger the calculated average similarity value, the greater the overall similarity of keywords between the answer texts of the f-th and g-th question-answer pairs.

[0070] Furthermore, the proportion of keywords in the answer text of the f-th question-answer pair with a similarity greater than or equal to a preset threshold among all keywords is calculated and denoted as the high similarity proportion between the f-th and g-th question-answer pairs. This proportion reflects the high degree of similarity between the keywords in the answer text of the f-th question-answer pair and the keywords in the highly related answer text of the g-th question-answer pair. The larger the calculated high similarity proportion, the higher the similarity between the keywords in the answer text of the f-th question-answer pair and the keywords in the highly related answer text of the g-th question-answer pair.

[0071] In this embodiment, the preset threshold value is 0.8, which is calculated from experimental data.

[0072] Based on the above analysis, the correlation between the answers of the f-th question-answer pair and the g-th question-answer pair can be obtained by combining the mean similarity and the proportion of high similarity between the f-th question-answer pair and the g-th question-answer pair.

[0073] It should be noted that fusion refers to combining multiple independent variables in a way that enhances the overall effect, such as addition or multiplication. This application does not impose any special restrictions on this.

[0074] In this embodiment, the mean similarity and the mean of the high similarity ratio between the f-th question-answer pair and the g-th question-answer pair are used as the answer correlation degree between the f-th question-answer pair and the g-th question-answer pair.

[0075] It should be noted that both the mean similarity and the proportion of high similarity reflect the degree of keyword similarity in the answer texts of two question-answer pairs to some extent. Therefore, by fusing the mean similarity and the proportion of high similarity, the representation of association features is strengthened, which can more accurately reflect the semantic significance of the answer texts between the f-th question-answer pair and the g-th question-answer pair. The higher the calculated question association degree, the higher the semantic significance of the answer texts between the f-th question-answer pair and the g-th question-answer pair.

[0076] Step 2.4: Obtain the semantic consistency of each question-answer pair belonging to each low-frequency set of questions by measuring the answer correlation between each question-answer pair belonging to each high-frequency set of highly relevant questions and the question correlation between each low-frequency set of questions and each high-frequency set of highly relevant questions.

[0077] Generally, the semantic information of a question-answer pair mainly consists of the question and the answer. When evaluating the semantic similarity between two question-answer pairs, it is necessary to comprehensively evaluate the semantic similarity of the question and the answer. The greater the question relevance and answer relevance between two question-answer pairs with different expressions, the greater the semantic similarity between the question keywords and answer keywords of the two question-answer pairs. The more likely these two question texts with different expressions belong to the same equipment and the same type of power distribution network fault problem.

[0078] Based on the above analysis, by fusing the question correlation degree between the low-frequency set of the j-th question and the high-frequency set of the k-th highly relevant question, and the answer correlation degree between the f-th question-answer pair belonging to the low-frequency set of the j-th question and the g-th question-answer pair belonging to the high-frequency set of the k-th highly relevant question, the consistency coefficient between the f-th question-answer pair and the g-th question-answer pair is obtained, which is used to characterize the probability that the f-th question-answer pair belonging to the low-frequency set of questions can be used to construct a FAQ corpus.

[0079] In this embodiment, the expression for the consistency coefficient between the f-th question-answer pair and the g-th question-answer pair is:

[0080] In the formula, This represents the consistency coefficient between the f-th question-answer pair and the g-th question-answer pair; This represents the degree of correlation between the low-frequency set of the j-th problem and the high-frequency set of the k-th highly relevant problem; This represents the correlation between the answers of the f-th question-answer pair and the g-th question-answer pair; This represents a value within the interval (0,1). The value is 0.55. The value of is derived from experimental data.

[0081] In another embodiment, the expression for the consistency coefficient between the f-th question-answer pair and the g-th question-answer pair is:

[0082] In the formula, This represents the consistency coefficient between the f-th question-answer pair and the g-th question-answer pair; This represents the degree of correlation between the low-frequency set of the j-th problem and the high-frequency set of the k-th highly relevant problem; This represents the correlation between the answers of the f-th question-answer pair and the g-th question-answer pair.

[0083] It should be noted that the question relevance and answer relevance are calculated based on the question content and answer content of the question-answer pair, respectively. Therefore, the semantic similarity between question-answer pairs can be evaluated by fusing the question relevance and answer relevance features. The larger the calculated consistency coefficient, the higher the semantic similarity between the f-th question-answer pair and the g-th question-answer pair. The f-th question-answer pair and the g-th question-answer pair are more likely to belong to the same type of question, and the f-th question-answer pair belonging to the low-frequency question set is more likely to be used to construct a FAQ corpus.

[0084] Furthermore, question-answer pairs belonging to the low-frequency question set are denoted as low-frequency question-answer pairs, and those belonging to the high-frequency question set are denoted as high-frequency question-answer pairs. Generally, a low-frequency question-answer pair only has semantic similarity with one highly relevant high-frequency question-answer pair. Therefore, a maximum value method is used to obtain the maximum consistency coefficient among all highly relevant high-frequency question-answer pairs for each low-frequency question-answer pair, and this maximum value is used as the semantic consistency score for each low-frequency question-answer pair, measuring the degree of semantic consistency between each low-frequency question-answer pair and its highly relevant high-frequency question-answer pairs. A schematic diagram of the semantic consistency score acquisition process is shown below. Figure 2 As shown in the diagram. The calculation process for semantic consistency is illustrated below. Figure 3 As shown.

[0085] Step 3: Based on the semantic consistency, select question-answer pairs for constructing the FAQ corpus, and then use the constructed FAQ corpus for question-answering intelligent query.

[0086] The semantic consistency threshold for segmenting all low-frequency question-answer pairs in all classes is denoted as the semantic consistency segmentation threshold. This threshold is used to filter low-frequency question-answer pairs that can be used to construct a FAQ corpus. Specifically: when the semantic consistency of each question-answer pair belonging to a low-frequency question set is greater than the semantic consistency segmentation threshold, the question-answer pairs belonging to the low-frequency question set are determined to be question-answer pairs for constructing a FAQ corpus; when the semantic consistency of each question-answer pair belonging to a low-frequency question set is less than or equal to the semantic consistency segmentation threshold, the question-answer pairs belonging to the low-frequency question set are determined not to be question-answer pairs for constructing a FAQ corpus.

[0087] Furthermore, the low-frequency and high-frequency question-answer pairs used to construct the FAQ corpus are deduplicated to ensure the uniqueness of each question and answer. The FAQ corpus is then constructed based on the deduplicated question-answer pairs. Data deduplication and the construction of the FAQ corpus are well-known techniques and will not be described in detail in this application.

[0088] Furthermore, all question-answer pairs in the FAQ corpus are stored in JSON format in the power distribution network question-answering intelligent query system. The FAQ corpus is updated and stored using the same method at preset intervals to ensure its real-time performance. The power distribution network question-answering intelligent query system connects to an open-source large language model via an API interface.

[0089] In this embodiment, the preset time is three months. The preset time can be set by the implementer according to the actual situation, and this application does not impose any special restrictions. The large language model is the Alibaba Cloud Tongyi Qianwen model. As other implementation methods, the implementer can choose other existing feasible large language models, such as the GPT-4o model, etc., and this application does not impose any special restrictions.

[0090] When staff enter a question text query into the power distribution network question-and-answer intelligent query system, the system will use a text matching algorithm to retrieve the question text that successfully matches the input question text from the FAQ corpus, and return the corresponding answer text to the question-and-answer interface. The FAQ corpus can significantly improve the efficiency of intelligent query.

[0091] In this embodiment, the text matching algorithm is Jaccard similarity. As other implementation methods, implementers may use other existing technologies, such as the inverse of edit distance, to measure the similarity between texts. This application does not impose any special restrictions.

[0092] If no matching question text can be found in the FAQ corpus, the question text is entered into the general knowledge base of the power distribution network question-and-answer query system for querying. The answer text corresponding to the matching question text is then returned to the question-and-answer interface. The knowledge base includes all historical question-and-answer data of the power distribution network.

[0093] Based on the same inventive concept as the above methods, this application also provides a question-and-answer intelligent query system based on a power distribution network knowledge base, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above-described question-and-answer intelligent query methods based on a power distribution network knowledge base.

[0094] In summary, this application classifies question-answer pairs using semantic information, grouping semantically similar questions and answers into one category. More detailed analysis of each subcategory helps reduce the computational complexity of subsequent semantic analysis. Distinguishing between high-frequency and low-frequency questions and assessing the likelihood of different expressions of low-frequency and high-frequency questions belonging to the same category helps identify questions with shared semantic relationships, thus enriching the corpus content. Simultaneously considering the semantic relevance of both the question and answer texts, and comprehensively evaluating the semantic consistency between question-answer pairs from two dimensions, this approach more accurately assesses whether two question-answer pairs belong to the same category. This allows for more precise selection of suitable question-answer pairs for building a comprehensive and accurate FAQ corpus, thereby improving the efficiency and accuracy of question-and-answer intelligent queries based on the power distribution network knowledge base.

[0095] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0096] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from its essential characteristics. Therefore, the embodiments described above should be considered exemplary and non-limiting in all respects.

Claims

1. A question-and-answer intelligent query method based on a power distribution network knowledge base, characterized in that: The method includes the following steps: Retrieve each question-and-answer pair, consisting of the question text and the answer text, from the historical question-and-answer records; Based on the semantic information of keywords in all question-answer pairs, all question-answer pairs are classified. For each category, a keyword set for each question is obtained based on the keywords in the question text of each question-answer pair. Then, based on the occurrence of keywords in each question keyword set, high-frequency sets and low-frequency sets for each question are obtained. By comparing the low-frequency sets with the high-frequency sets, the high-frequency sets of highly relevant questions for each low-frequency set are obtained. Finally, by analyzing the similarity of word vectors of keywords between the low-frequency sets and the high-frequency sets of highly relevant questions, the high-frequency sets of questions for each low-frequency set are obtained. The question-answer correlation between sets is calculated. By using the word vector similarity of the keywords in the answer texts of each question-answer pair belonging to the low-frequency question set and each question-answer pair belonging to the high-frequency question set of each highly relevant question, the answer correlation between each question-answer pair belonging to the low-frequency question set and each question-answer pair belonging to the high-frequency question set of each highly relevant question is obtained. Then, combined with the question-answer correlation, the semantic consistency of each question-answer pair belonging to the low-frequency question set is obtained. Based on the semantic consistency, question-answer pairs used to construct the FAQ corpus are selected, and then the constructed FAQ corpus is used for question-answering intelligent query.

2. The question-and-answer intelligent query method based on a power distribution network knowledge base as described in claim 1, characterized in that, The process of classifying all question-answer pairs is as follows: The word vectors of all keywords in the question text of each question-answer pair are concatenated with the word vectors of all keywords in the answer text to obtain the comprehensive vector of each question-answer pair; All question-answer pairs are classified based on the similarity between their combined vectors.

3. The question-and-answer intelligent query method based on a power distribution network knowledge base as described in claim 1, characterized in that, The process of obtaining the high-frequency set and low-frequency set of each problem is as follows: The frequency of occurrence of various question keyword sets is statistically analyzed. The frequency segmentation threshold is defined as the segmentation threshold for the frequency of occurrence of all question keyword sets. Question keyword sets with an occurrence frequency greater than or equal to the frequency segmentation threshold are defined as high-frequency sets for each question, and the remaining question keyword sets are defined as low-frequency sets for each question.

4. The question-and-answer intelligent query method based on a power distribution network knowledge base as described in claim 1, characterized in that, The process of obtaining the high-frequency sets of highly relevant problems from the low-frequency sets of each problem is as follows: The similarity threshold between the low-frequency set of each question and the high-frequency set of all questions is denoted as the similarity segmentation threshold. The high-frequency sets of each question whose similarity to the low-frequency sets of each question is greater than or equal to the similarity segmentation threshold are taken as the high-frequency sets of highly relevant questions of each low-frequency set.

5. The question-and-answer intelligent query method based on a power distribution network knowledge base as described in claim 1, characterized in that, The process of obtaining the relevance of the problem is as follows: The similarity between the word vectors of each keyword in the low-frequency set of each question and each keyword in the high-frequency set of each highly relevant question is denoted as the question keyword similarity. The relevance of the issues is obtained by combining the similarity of the keywords in the low-frequency set of each issue with the keywords in the high-frequency set of each highly relevant issue.

6. The question-and-answer intelligent query method based on a power distribution network knowledge base as described in claim 5, characterized in that, The problem relevance is the average of the similarity between all keywords in the low-frequency set of each problem and all keywords in the high-frequency set of each highly relevant problem.

7. The question-and-answer intelligent query method based on a power distribution network knowledge base as described in claim 1, characterized in that, The process of obtaining the relevance of the answer is as follows: For any question-answer pair belonging to the low-frequency set of any question and any question-answer pair belonging to the high-frequency set of any highly relevant question, the maximum value of the word vector similarity between any keyword in the answer text of any question-answer pair and all keywords in the answer text of any question-answer pair is denoted as the answer keyword similarity between any keyword and any question-answer pair. Calculate the keyword similarity between any keyword in the answer text of any question-and-answer pair and any keyword in the answer text of any question-and-answer pair; An average value is calculated by considering the similarity between all keywords in the answer text of any question-answer pair and the answer keyword similarity between all keywords in the answer text of any question-answer pair and the answer keyword similarity between any question-answer pair. The percentage of keywords in the answer text of any question-and-answer pair whose keyword similarity to the answer keyword is greater than or equal to a preset threshold is calculated among all keywords. By combining the average value and the quantity ratio, the answer correlation degree between any question-answer pair and any other question-answer pair is obtained.

8. The question-and-answer intelligent query method based on a power distribution network knowledge base as described in claim 1, characterized in that, The process of obtaining the semantic consistency is as follows: By combining the question relevance and the answer relevance, the consistency coefficient between each question-answer pair belonging to the low-frequency set of each question and each question-answer pair belonging to the high-frequency set of each highly relevant question is obtained; The maximum value among the consistency coefficients between each question-answer pair belonging to the low-frequency set of each question and all question-answer pairs belonging to the high-frequency set of all highly relevant questions is taken as the semantic consistency of each question-answer pair belonging to the low-frequency set of each question.

9. The question-and-answer intelligent query method based on a power distribution network knowledge base as described in claim 1, characterized in that, The step of filtering question-answer pairs for constructing the FAQ corpus based on the semantic consistency includes: The semantic consistency threshold for the segmentation of question-answer pairs belonging to all question low-frequency sets in all classes is denoted as the semantic consistency segmentation threshold. When the semantic consistency of each question-answer pair belonging to each question low-frequency set is greater than the semantic consistency segmentation threshold, each question-answer pair belonging to each question low-frequency set is determined as the question-answer pair for constructing the FAQ corpus.

10. A question-and-answer intelligent query system based on a power distribution network knowledge base, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the question-and-answer intelligent query method based on the power distribution network knowledge base as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Question generation method and device, electronic equipment and storage medium

    CN114281904A

  • Term extraction method and system

    CN118013974A