Generative question answering method, system and device supported by power equipment operation and maintenance knowledge base and medium

By combining intent recognition models and large language models, along with semantic vector retrieval and security verification mechanisms, the problem of inaccurate understanding of user intent in the power equipment operation and maintenance knowledge base system is solved, achieving efficient and secure operation and maintenance question answering.

CN121543682APending Publication Date: 2026-02-17GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511666606.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-14
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing power equipment operation and maintenance knowledge base systems cannot accurately understand user intent, resulting in low accuracy and relevance of answers. They are particularly difficult to provide effective solutions when faced with ambiguous or complex questions, and also suffer from incomplete knowledge coverage and safety hazards.

Method used

An intent recognition model is used for question classification, combined with a pre-trained large language model and a rule engine for differentiated processing, and semantic vector retrieval and security verification mechanisms are used to achieve accurate understanding and secure response to user questions.

Benefits of technology

The accuracy and security of the power equipment operation and maintenance Q&A system have been improved. By optimizing the knowledge base through human-machine collaboration, the professionalism and compliance of the responses are ensured, and the risk of AI misjudgment is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543682A_ABST
    Figure CN121543682A_ABST
Patent Text Reader

Abstract

The invention discloses a generative question answering method, system and device supported by an operation and maintenance knowledge base of power equipment and a medium. The method comprises the following steps: obtaining an operation and maintenance question input by a user; performing intention classification on the operation and maintenance problem through a pre-trained intention recognition model to obtain an intention type; when the intention type is a daily question and answer intention, generating a daily dialogue reply text according to a pre-trained large language model; when the intention type is an equipment knowledge query intention or a fault processing intention, matching a target knowledge base, and retrieving information from the target knowledge base according to a pre-trained large language model to generate a reply text; and performing security verification on the reply text generated by the pre-training large language model. The operation and maintenance problems are intelligently classified through the intention recognition model, differential processing strategies are adopted for different intention types, and the defect that a traditional question and answer system is cut at a time is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power operation and maintenance technology, and in particular to a generative question-and-answer method, system, equipment, and medium supporting a power equipment operation and maintenance knowledge base. Background Technology

[0002] With the rapid development of the power industry, the importance of power equipment operation and maintenance knowledge bases as a crucial technical support for ensuring the safe and stable operation of power systems is becoming increasingly prominent. Existing power equipment operation and maintenance knowledge bases typically accumulate a large amount of equipment ledger information, defect cases, maintenance procedures, and safety standards. However, while some power companies have introduced intelligent question-and-answer systems, these systems are mostly based on simple keyword matching or template matching technologies. Their ability to understand user questions is limited, and they cannot accurately determine the user's true intent, resulting in low accuracy and relevance of the answers. This is especially true when facing ambiguous or complex operation and maintenance issues, making it difficult to provide effective solutions. Summary of the Invention

[0003] In view of the aforementioned existing problems, the present invention is proposed.

[0004] Therefore, this invention provides a generative question-and-answer method, system, equipment, and medium supported by a power equipment operation and maintenance knowledge base to address the problem that most existing systems rely on simple keyword matching or template matching techniques, which have limited ability to understand user questions and cannot accurately determine the user's true intent.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a generative question-answering method supported by a power equipment operation and maintenance knowledge base, comprising the following steps: obtaining operation and maintenance questions input by users; classifying the operation and maintenance questions into intent types using a pre-trained intent recognition model; when the intent type is a daily question-and-answer intent, generating daily dialogue response text based on a pre-trained large language model; when the intent type is an equipment knowledge query intent or a fault handling intent, matching a target knowledge base, and retrieving information from the target knowledge base based on the pre-trained large language model to generate response text; and performing security verification on the response text generated by the pre-trained large language model.

[0006] As a preferred embodiment of the generative question-answering method supported by the power equipment operation and maintenance knowledge base of the present invention, the step of obtaining the intent type includes: extracting features from the operation and maintenance question to obtain keywords and contextual information; inputting the keywords and contextual information into a pre-trained intent classification model to output the intent type; wherein, the intent type includes daily question-answering intent, equipment knowledge query intent, and fault handling intent.

[0007] As a preferred embodiment of the generative question-answering method supported by the power equipment operation and maintenance knowledge base described in this invention, the step of generating daily dialogue response text based on a pre-trained large language model includes: performing word embedding vectorization processing on the operation and maintenance question to generate an input vector; inputting the input vector into the pre-trained large language model; generating a probability distribution through the pre-trained large language model and sampling and outputting a token sequence; stopping generation and returning the complete daily dialogue response text when the token sequence contains a terminator.

[0008] As a preferred embodiment of the generative question-answering method supported by the power equipment operation and maintenance knowledge base described in this invention, the step of generating response text by retrieving information from the target knowledge base based on a pre-trained large language model includes: extracting equipment type keywords and operation type keywords from the operation and maintenance question to form keyword combinations; mapping the keyword combinations to the target knowledge base using a predefined rule engine; converting the operation and maintenance question into a semantic vector; calculating the cosine similarity between the semantic vector and the corpus fragments in the target knowledge base; sorting the corpus fragments in the target knowledge base in descending order based on the cosine similarity; comparing the cosine similarity with a preset threshold, and directly performing a secondary analysis based on the comparison result.

[0009] The beneficial effects of this preferred technical solution are: by combining keyword mapping with semantic vector retrieval, it not only ensures the accuracy of retrieval, but also takes into account the flexibility of semantic understanding.

[0010] As a preferred embodiment of the generative question-answering method supported by the power equipment operation and maintenance knowledge base of the present invention, the secondary analysis step includes: when there are corpus fragments with a cosine similarity reaching a preset threshold, recalling the corpus fragments with the top three cosine similarities as context; concatenating the operation and maintenance question with the context to form prompt words, inputting them into the pre-trained large language model to generate the response text; when there are no corpus fragments with a cosine similarity reaching the preset threshold, triggering a knowledge base update request, and submitting the operation and maintenance question to the review terminal; updating the content of the target knowledge base in response to supplementary knowledge data input at the review terminal; re-generating the response text using the updated target knowledge base and feeding it back to the user terminal.

[0011] The beneficial effects of this preferred technical solution are: it establishes a closed-loop feedback mechanism of retrieval failure, manual review, knowledge supplementation, and regeneration, enabling the knowledge base to have self-evolution capabilities, solving the problem of incomplete coverage in traditional static knowledge bases, and continuously optimizing through human-machine collaboration.

[0012] As a preferred embodiment of the generative question-and-answer method supported by the power equipment operation and maintenance knowledge base of the present invention, the step of performing security verification on the generated response text includes: parsing the operation instructions in the response text and matching the operation instructions with the list of prohibited operations in the safety standard library; triggering an alarm flag when a high-risk instruction is detected; extracting the voltage parameters and current level parameters in the response text and verifying whether the voltage parameters and current level parameters exceed the rated operating range of the corresponding model of equipment in the equipment ledger library; when the verification result does not meet the preset verification conditions, automatically blocking the transmission of the response text to the user terminal, generating an early warning report containing risk location points and pushing it to the terminal of the operation and maintenance personnel, calling the pre-trained large language model to perform security rewriting of the response text, and outputting the response text after the verification is passed.

[0013] The beneficial effects of this preferred technical solution are: through a multi-layered security verification mechanism, it effectively prevents the generation of dangerous operation commands and out-of-limit parameters by large language models, and avoids equipment damage or personnel safety accidents caused by AI misjudgment.

[0014] As a preferred embodiment of the generative question-and-answer method supported by the power equipment operation and maintenance knowledge base described in this invention, the target knowledge base includes an equipment ledger library, a defect case library, a maintenance procedure library, and a safety standard library.

[0015] Secondly, the present invention provides a generative question-and-answer system supported by a power equipment operation and maintenance knowledge base, comprising: a question acquisition module for acquiring operation and maintenance questions input by users; The intent recognition module is used to classify the operational issues by intent using a pre-trained intent recognition model to obtain the intent type; The daily dialogue generation module is used to generate daily dialogue responses based on a pre-trained large language model when the intent type is daily question and answer intent. The knowledge base retrieval module is used to match the target knowledge base when the intent type is a device knowledge query intent or a fault handling intent, and to generate a response based on information retrieved from the target knowledge base using a pre-trained large language model; The knowledge base update module is used to automatically trigger a knowledge base update request when there are no corpus fragments with similarity reaching a preset threshold, receive supplementary knowledge data, and update the target knowledge base. The security verification module is used to perform security verification on the generated response, including operation instruction matching, parameter range verification, and security rewriting.

[0016] Thirdly, the present invention provides an electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the generative question-and-answer method supported by the power equipment operation and maintenance knowledge base.

[0017] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the generative question-answering method supported by the power equipment operation and maintenance knowledge base.

[0018] Compared with existing technologies, the beneficial effects of this invention are as follows: It intelligently classifies maintenance issues through an intent recognition model and adopts differentiated processing strategies for different intent types, avoiding the "one-size-fits-all" drawbacks of traditional question-and-answer systems. Especially in equipment knowledge query and fault handling scenarios, it employs a dual mechanism of "rule engine mapping + semantic vector retrieval," ensuring both accurate positioning in cross-database searches and flexibility in semantic understanding. Furthermore, when the knowledge base cannot match, the system automatically triggers a closed-loop feedback mechanism of manual review and knowledge supplementation, enabling the knowledge base to continuously evolve and solving the industry pain points of incomplete coverage and delayed updates in static knowledge bases.

[0019] A multi-layered security protection system has been established, encompassing operation command matching, parameter range verification, automatic blocking, and secure rewriting. This effectively prevents the generation of dangerous operations or out-of-limit parameters by the large language model, minimizing the safety risks associated with applying AI to high-risk industries such as power. The overall technical solution deeply integrates the generation capabilities of the pre-trained large language model with the professionalism of the domain knowledge base, ensuring both the accuracy and timeliness of responses, as well as the safety and compliance of operations, thereby improving the intelligence and reliability of power equipment operation and maintenance. Attached Figure Description

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

[0021] Figure 1 This is a schematic diagram of the overall process of the generative question-answering method supported by the power equipment operation and maintenance knowledge base according to an embodiment of the present invention. Detailed Implementation

[0022] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0023] Example 1, referring to Figure 1 As an embodiment of the present invention, a generative question-answering method supported by a power equipment operation and maintenance knowledge base is provided, including the following steps S100~S500: S100, Obtaining user input regarding operational and maintenance issues; S200. Classify the intent of the operation and maintenance problem using a pre-trained intent recognition model to obtain the intent type; S300. When the intent type is a daily question-and-answer intent, generate daily dialogue response text based on the pre-trained large language model; S400. When the intent type is a device knowledge query intent or a fault handling intent, match the target knowledge base and retrieve information from the target knowledge base according to the pre-trained large language model to generate a response text. S500 performs security verification on the response text generated by the pre-trained large language model.

[0024] It should be noted that in power equipment operation and maintenance scenarios, the types of problems faced by maintenance personnel are complex and diverse, including both professional issues such as equipment parameter queries and fault diagnosis, and general questions and answers such as daily communication. Traditional knowledge base retrieval systems cannot distinguish the intent of the question, easily resulting in irrelevant answers. Meanwhile, although pre-trained large language models possess powerful generation capabilities, their direct application in the power industry presents safety hazards such as incomplete knowledge coverage, the potential for misinterpretation, and the generation of dangerous operating instructions. Therefore, how to organically combine the generation capabilities of large language models with the professionalism of domain knowledge bases, while ensuring the security of responses, is a problem that urgently needs to be solved in the intelligent operation and maintenance of power equipment.

[0025] Therefore, to address the aforementioned issues of intent recognition and secure generation, the steps S100-S500 are implemented as follows: First, an intent classification model is used to intelligently categorize questions. For routine questions and answers, a large language model is directly invoked to respond, while for professional questions, the target knowledge base is matched for precise retrieval. Simultaneously, a security verification mechanism is used to match operation instructions and verify parameter ranges in the generated response text, enabling automatic interception and secure rewriting of dangerous content. Ultimately, this achieves a unified guarantee of accuracy, professionalism, and security for operation and maintenance questions and answers.

[0026] Example 2, refer to Figure 1As an embodiment of the present invention, based on the above embodiment, a generative question-and-answer method supporting a power equipment operation and maintenance knowledge base is provided.

[0027] In this embodiment of the application, step S200, the step of obtaining the intent type, includes A1~A2: A1. Extract features from the operation and maintenance problem to obtain keywords and contextual information.

[0028] Specifically, word segmentation algorithms are used to segment the operation and maintenance questions input by users. The TF-IDF algorithm is used to extract high-weight keywords from the questions and identify core semantic units such as device names, operation verbs, and fault phenomena. At the same time, dependency parsing is used to obtain the grammatical relationships between words and capture the contextual information of the questions. In addition, feature tags such as interrogative words, time adverbs, and negation words are extracted from the questions to form a comprehensive feature vector that includes lexical features, syntactic features, and semantic features.

[0029] A2. Input the keywords and contextual information into the pre-trained intent classification model and output the intent type. The intent types include daily question-and-answer intent, device knowledge query intent, and fault handling intent.

[0030] In this embodiment, a BERT-based intent classification model is employed. This model is fine-tuned and trained using a large amount of labeled question-and-answer data from the power operation and maintenance field. The keywords and contextual information extracted in step A1 are encoded into fixed-length vector representations and input into the fully connected layer of the classification model. The probability distribution of each intent type is calculated using the Softmax activation function, and the category with the highest probability is selected as the final intent type output. The intent types include three main categories: daily question-and-answer intents, equipment knowledge query intents, and fault handling intents. Daily question-and-answer intents cover general scenarios such as casual conversation and weather inquiries; equipment knowledge query intents include needs such as parameter queries and model comparisons; and fault handling intents target professional issues such as anomaly diagnosis and emergency response.

[0031] In an optional implementation, the intent classification model in step S200 can also employ a multi-model ensemble strategy. Specifically, a BERT-based deep learning model and a traditional rule-based classifier are trained simultaneously. For questions containing strong features such as clear device models and fault codes, the rule-based classifier is prioritized for rapid determination; for questions with ambiguous semantics and diverse expressions, the deep learning model is invoked for semantic understanding. By fusing the prediction results of the two methods through a voting mechanism or confidence-weighted fusion, the accuracy and robustness of intent recognition are significantly improved, making it particularly suitable for complex operation and maintenance scenarios involving dialectal colloquial expressions and mixed professional terminology.

[0032] In this embodiment of the application, step S300, which involves generating everyday dialogue response text based on a pre-trained large language model, includes steps B1 to B4: B1. Perform word embedding vectorization processing on the aforementioned operation and maintenance problem to generate an input vector.

[0033] Specifically, the operation and maintenance problem text is segmented into a token sequence using a pre-trained large language model and its matching tokenizer. Each token is mapped to a high-dimensional dense vector through an embedding layer. At the same time, positional encoding information is superimposed to enable the model to perceive word order relationships. Texts exceeding the maximum length are truncated, and insufficient parts are padded to finally generate a fixed-dimensional input vector matrix.

[0034] B2. Input the input vector into the pre-trained large language model.

[0035] In this embodiment, the input vector generated in step B1 is input to a pre-trained large language model (such as the GPT series or LLaMA series) based on the Transformer architecture. This model contains a multi-layer self-attention mechanism and a feedforward neural network, which can capture the deep semantic features and long-range dependencies of the input text.

[0036] B3. Generate a probability distribution using the pre-trained large language model and sample and output a token sequence.

[0037] Specifically, the output layer of the pre-trained large language model calculates the generation probability of each token in the vocabulary to form a probability distribution; using a greedy decoding or beam search strategy, it selects the token with the highest probability one by one for sampling and output, and feeds the generated token sequence back to the model as context to iteratively generate the next token, forming a coherent response text sequence.

[0038] B4. When the token sequence contains a terminator, stop generating and return the complete daily conversation response text.

[0039] In this embodiment, a special terminator is set (such as...). <eos>or <|endoftext|>) as the end of generation. When the token sequence output by the model contains a terminator, or the length of the generation reaches the preset maximum number of tokens, the iterative generation process is immediately stopped, the generated token sequence is decoded into natural language text, and after removing special symbols and formatting, the complete daily conversation reply text is returned for the user to view.

[0040] In an optional embodiment, when generating the daily conversation reply text in step S300, a dialogue history context management mechanism can also be introduced. The system maintains a sliding window to record the user's recent N rounds of dialogue content, and concatenates the historical dialogue to the front end of the input vector when generating the current reply, so that the model can perceive the coherence and reference relationship of multiple rounds of dialogue. This approach is particularly suitable for interactive question and answer scenarios that require clarification of information and follow-up details, and can significantly improve the fluency and user experience of the dialogue.

[0041] In the embodiments of the present application, in step S400, the step of retrieving information from the target knowledge base to generate a reply text according to the pre-trained large language model includes C1-C6: C1, extracting device type keywords and operation type keywords in the operation and maintenance problem to form a keyword combination.

[0042] Specifically, the named entity recognition technology is used to analyze the operation and maintenance problem, and the device type entity (such as transformer, circuit breaker, GIS combined electrical apparatus, etc.) and the operation type entity (such as maintenance, inspection, fault diagnosis, parameter setting, etc.) in the problem are identified and extracted; through matching and verification by a pre-defined power equipment dictionary and operation verb library, the accuracy of the extracted keywords is ensured; the device type keywords and the operation type keywords are combined in the format of "device type + operation type" to form a structured keyword combination, such as "transformer-maintenance", "circuit breaker-fault diagnosis", etc.

[0043] C2, mapping the keyword combination to the target knowledge base through a pre-defined rule engine.

[0044] In this embodiment, a rule engine based on expert knowledge is established, which maintains a mapping table defining the correspondence between different keyword combinations and the target knowledge base. For example, when the keyword combination is "device model-parameter query", it is mapped to the device account library; when the keyword combination is "device type-fault phenomenon", it is mapped to the defect case library; when the keyword combination is "device type-maintenance operation", it is mapped to the maintenance procedure library. Through the rapid matching of the rule engine, the operation and maintenance problem is accurately located to the most relevant knowledge base, avoiding performance loss and result confusion caused by full database retrieval.

[0045] C3, converting the operation and maintenance problem into a semantic vector.

[0046] Specifically, a pre-trained sentence encoding model (such as Sentence-BERT or SimCSE) is used to encode the operation and maintenance problem text into a high-dimensional dense semantic vector. This encoding process can capture the deep semantic features of the problem and map problems with similar semantics but different expressions to adjacent positions in the vector space. The encoded semantic vector is usually 768-dimensional or 1024-dimensional, which can represent the semantic information of the problem and provide a basis for subsequent similarity calculation.

[0047] C4, calculate the cosine similarity between the semantic vector and the corpus segment in the target knowledge base.

[0048] In this embodiment, each corpus segment (including device parameter entries, defect case descriptions, maintenance procedure paragraphs, etc.) in the target knowledge base has been pre-converted into a semantic vector by the same sentence encoding model and a vector index has been established. The semantic vector of the operation and maintenance problem generated in step C3 is compared with the semantic vectors of all corpus segments in the target knowledge base to calculate the batch cosine similarity The calculation formula is: where A is the problem semantic vector, B is the corpus segment semantic vector, and the similarity value ranges from -1 to 1. The closer the value is to 1, the more similar the semantics.

[0049] In an alternative embodiment, a hybrid retrieval strategy can also be introduced when calculating the cosine similarity in step C4. In addition to semantic vector retrieval, keyword sparse retrieval based on the BM25 algorithm is also performed to obtain semantic similarity ranking and word frequency similarity ranking, respectively. The two retrieval results are linearly weighted and fused (such as 0.7 x + 0.3 x BM25 score) to form the final comprehensive similarity ranking. This hybrid retrieval method combines the advantages of semantic understanding and exact matching, and is suitable for operation and maintenance query scenarios with high exact matching requirements such as professional terms and model codes, which can improve the recall rate and accuracy of retrieval.

[0050] C5, according to the cosine similarity, the corpus segments in the target knowledge base are sorted in descending order.

[0051] Specifically, the cosine similarity values of all corpus segments calculated in step C4 are sorted in descending order, with the highest similarity corpus segment at the front. The sorting process is efficiently completed through a quicksort algorithm or a heap sort algorithm, and the top-K most relevant corpus segments (usually K is set to 10-20) are retained as candidate recall results, which are prepared for subsequent threshold judgment and context construction.

[0052] C6, compare the cosine similarity with the preset threshold value, and directly analyze the second step according to the comparison result.

[0053] In the present embodiment, a similarity preset threshold value (usually set to 0.7-0.85) is set, the highest cosine similarity value after sorting is compared with the threshold value, and different processing branches are triggered according to the comparison result.

[0054] Among them, the secondary analysis step includes C6.1-C6.5: C6.1, when there is a corpus segment with a cosine similarity reaching a preset threshold value, recall the corpus segments with the top three cosine similarities as the context.

[0055] Specifically, from the results sorted in step C5, select the corpus segments with the top three cosine similarities and reaching the preset threshold value, and extract their complete text content as background knowledge context. These corpus segments usually contain the most relevant device parameters, operation procedures or fault case information for the operation and maintenance problem, and can provide domain knowledge support for the large language model.

[0056] C6.2, concatenate the operation and maintenance problem and the context as a prompt word, and input the pre-trained large language model to generate the reply text.

[0057] In the present embodiment, a prompt word template is constructed according to the structure of "background knowledge + problem description + instruction guidance". The three corpus segments recalled in step C6.1 are arranged in order from high to low according to the similarity, concatenated with the original operation and maintenance problem, and an instruction guidance sentence (such as "Please answer the user's operation and maintenance problem accurately according to the above knowledge base content. The answer needs to be professional, concise and operable") is added. The complete prompt word constructed is input into the pre-trained large language model, and the text generation capability of the model is used to synthesize accurate and professional reply text based on the retrieved context knowledge.

[0058] C6.3, when there is no corpus segment with a cosine similarity reaching a preset threshold value, trigger a knowledge base update request, and submit the operation and maintenance problem to an audit terminal.

[0059] Specifically, when the similarity of all corpus segments after step C5 sorting is lower than the preset threshold value, it indicates that the current knowledge base lacks knowledge content related to the operation and maintenance problem. At this time, the system automatically generates a knowledge base update request, records the problem content, retrieval result, timestamp and other information, and pushes the operation and maintenance problem to the artificial audit terminal through the message queue or work order system for artificial processing and knowledge supplement by domain experts or experienced operation and maintenance personnel.

[0060] C6.4, in response to the supplementary knowledge data input in the audit terminal, update the content of the target knowledge base.

[0061] In this embodiment, the review terminal provides a user-friendly knowledge input interface. Maintenance experts supplement the questions submitted in step C6.3 with corresponding answers, operating procedures, or case descriptions, and label the knowledge type (such as equipment parameters, maintenance steps, fault causes, etc.) and applicable equipment scope. After submission, the supplementary knowledge data undergoes format verification and duplication detection, and is then appended to the corresponding target knowledge base. Simultaneously, a semantic vector for the knowledge fragment is generated using a sentence encoding model, and the vector index is updated to ensure accurate retrieval during subsequent searches.

[0062] C6.5. Re-generate the response text using the updated target knowledge base and send it back to the user terminal. The target knowledge base includes an equipment ledger database, a defect case database, a maintenance procedure database, and a safety standard database.

[0063] Specifically, after the knowledge base is updated, the system automatically triggers a re-retrieval process, re-executing the complete process of semantic vector calculation, similarity matching, contextual recall, and response generation starting from step C3. Since the knowledge base has been supplemented with relevant content, highly similar corpus fragments can now be retrieved, generating accurate response text. The generated response text, after being formatted, is sent to the user's terminal via the user interface or push notification, along with a notification message stating "This question has been supplemented with knowledge by experts," enhancing user confidence in the response quality.

[0064] In an optional implementation, the knowledge base update mechanism in step C6.4 can also integrate proactive learning strategies. The system statistically analyzes the high-frequency question types that historically trigger knowledge base updates, and periodically generates "knowledge gap analysis reports" which are pushed to knowledge administrators to guide them to proactively supplement systematic knowledge in relevant fields rather than single-point questions. Simultaneously, a version management and quality evaluation mechanism is established for newly added knowledge, tracking the frequency of its recall and user satisfaction ratings, forming a closed-loop iteration of "problem-driven → knowledge supplementation → effect evaluation → continuous optimization," enabling the knowledge base to possess self-evolution and continuous optimization capabilities.

[0065] In this embodiment of the application, step S500, which involves performing security verification on the generated response text, includes steps D1 to D4: D1. Parse the operation instructions in the reply text and match the operation instructions with the list of prohibited operations in the security standard library.

[0066] Specifically, natural language processing (NLP) technology is used to perform syntactic and semantic analysis on the response text, identifying operational verbs (such as closing, disconnecting, adjusting, and removing) and their objects (such as switches, grounding switches, and protection devices) to extract the complete operational instruction structure. In this embodiment, a list of prohibited operations is pre-set in the safety standard library. This list is compiled from power safety regulations and accident cases, including but not limited to high-risk operations such as closing grounding switches while the circuit is energized, entering high-voltage compartments alone without supervision, conducting outdoor maintenance during thunderstorms, and directly contacting equipment without voltage testing. By combining regular expression matching and semantic similarity calculation, the extracted operational instructions are compared item by item with the list of prohibited operations to identify whether there are any operational suggestions in the response text that violate safety regulations.

[0067] D2. When a high-risk command is detected, an alarm flag is triggered.

[0068] In this embodiment, when the matching result of step D1 shows that the reply text contains high-risk instructions from the prohibited operation list, the system immediately triggers an alarm mechanism. The alarm flag includes three elements: risk level (divided into high-risk, medium-risk, and low-risk levels), triggering rule (the specific prohibited operation entry matched), and risk location (the specific location and context of the high-risk instruction in the reply text). The alarm information is recorded in the security log database, and a "high-risk flag" attribute is added to the reply text object to prevent the text from being directly output to the user terminal, and to provide detailed risk tracing information for subsequent security processing.

[0069] D3. Extract the voltage and current level parameters from the reply text, and verify whether the voltage and current level parameters exceed the rated operating range of the corresponding model of equipment in the equipment ledger database.

[0070] Specifically, regular expressions and named entity recognition technology are used to extract numerical parameters from the response text, including key operating parameters such as voltage values ​​(e.g., 10kV, 220kV, 500V), current values ​​(e.g., 630A, 1000A), power values, and temperature values. Simultaneously, the system identifies the corresponding equipment model or name. In this embodiment, the system automatically queries the equipment database and obtains the rated voltage range, rated current range, and maximum allowable temperature of the equipment based on the extracted equipment model. The parameter values ​​in the response text are compared and verified with the rated operating range in the equipment database to determine if any parameters exceed the limits. For example, if the response suggests "adjusting the bus voltage of the 10kV switchgear to 12kV," and the rated voltage of this model of switchgear is 10kV with an allowable deviation of ±5%, then 12kV exceeds the rated range, triggering a parameter over-limit alarm.

[0071] D4. When the verification result does not meet the preset verification conditions, the reply text is automatically blocked from being sent to the user terminal. An early warning report containing risk location points is generated and pushed to the terminal of the operation and maintenance staff. The pre-trained large language model is called to rewrite the reply text securely until the verification is passed and the reply text is output.

[0072] In this embodiment, the preset verification conditions include two core criteria: "no high-risk operation instructions exist" and "all parameters are within the equipment's rated range." When the verification result of step D2 or D3 triggers any alarm, the verification is deemed to have failed, and the system immediately executes the following processing flow: First, activate the automatic blocking mechanism to intercept the output request of the reply text in the message queue, ensuring that content containing security risks is not pushed to the user's terminal.

[0073] Secondly, a structured early warning report is automatically generated. The report includes: the original operational issue, the full text of the generated response, the type of risk detected (operational risk / parameter risk), the specific risk location (the textual location of the high-risk instruction or the value of the parameter exceeding the limit), the triggered security rule number, the risk level assessment, and a timestamp. This early warning report is pushed to the terminals of the operations team leader or security supervisor in real time via WeChat, SMS, or email, ensuring timely human intervention and review.

[0074] Subsequently, the system automatically invokes a pre-trained large language model for safe rewriting. During the rewriting process, constraints are explicitly injected into the model's input prompts, such as "Please avoid the following high-risk operations in your response: [specific prohibited operations], and ensure that all recommended parameter values ​​are within the device's rated range: [specific parameter range]". The model regenerates the response text based on the original question and constraints, removing or replacing high-risk instructions and correcting out-of-limit parameters to recommended values ​​within a reasonable range.

[0075] Finally, the complete verification process of steps D1-D3 is executed again on the rewritten response text, forming an iterative loop. If the rewritten text still fails verification, rewriting is triggered again, with a maximum of 3 iterations allowed. If verification still fails after 3 iterations, the automatic processing process is terminated, and the issue is marked as "requiring manual handling" for manual response by an operations and maintenance expert. Once verification is successful, the system adds a "This response has passed security verification" marker to the end of the response text, records the verification success timestamp, and finally outputs the secure response text to the user's terminal.

[0076] In an optional implementation, the operation instruction parsing in step D1 can also incorporate a deep learning-based risk assessment model. In addition to rule matching, a dedicated operation risk classifier is trained. This classifier undergoes supervised learning based on historical accident cases and safety procedures, enabling it to identify implicit risk operations (such as statements implying safety hazards like rapid operation or simplified procedures). The model outputs a risk probability score, triggering an alarm when the probability exceeds a set threshold. This hybrid strategy combining deep learning and a rule engine can cover both explicit and implicit safety risks, improving the comprehensiveness and intelligence of safety protection.

[0077] In another optional implementation, the security rewriting mechanism in step D4 can also integrate a manual review process. For response texts that remain in a critical risk state after rewriting (e.g., parameters are close to but do not exceed the upper limit), they are first pushed to maintenance experts for rapid review (with a 5-minute response time limit) before being pushed to the user terminal. Experts can approve or reject with one click via mobile device; if approved, the response is sent immediately, and if rejected, the process proceeds to manual response. Simultaneously, the system records a complete log of all security checks and manual reviews, establishing a security audit traceability chain to provide a reliable basis for subsequent security incident analysis and liability determination. This triple protection mechanism of "automatic verification + intelligent rewriting + manual review" maximizes the security and reliability of the AI ​​question-and-answer system in power operation and maintenance scenarios.

[0078] Example 3 illustrates a generative question-answering method supported by a power equipment operation and maintenance knowledge base. It should be noted that the technical solution of this generative question-answering system supported by the power equipment operation and maintenance knowledge base is based on the same concept as the technical solution of the generative question-answering method supported by the power equipment operation and maintenance knowledge base described above. Details not described in detail in the technical solution of the generative question-answering system supported by the power equipment operation and maintenance knowledge base in this example can be found in the description of the technical solution of the generative question-answering method supported by the power equipment operation and maintenance knowledge base described above.

[0079] This embodiment also provides a generative question-and-answer system supported by a power equipment operation and maintenance knowledge base, including: The issue retrieval module is used to retrieve operation and maintenance issues input by users. The intent recognition module is used to classify the operational issues by intent using a pre-trained intent recognition model to obtain the intent type; The daily dialogue generation module is used to generate daily dialogue responses based on a pre-trained large language model when the intent type is daily question and answer intent. The knowledge base retrieval module is used to match the target knowledge base when the intent type is a device knowledge query intent or a fault handling intent, and to generate a response based on information retrieved from the target knowledge base using a pre-trained large language model; The knowledge base update module is used to automatically trigger a knowledge base update request when there are no corpus fragments with similarity reaching a preset threshold, receive supplementary knowledge data, and update the target knowledge base. The security verification module is used to perform security verification on the generated response.

[0080] This embodiment also provides an electronic device suitable for the case of generative question answering supported by a power equipment operation and maintenance knowledge base, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the generative question answering method supported by the power equipment operation and maintenance knowledge base as proposed in the above embodiment.

[0081] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, it implements the generative question-and-answer method for supporting the power equipment operation and maintenance knowledge base as proposed in the above embodiments.

[0082] The storage medium proposed in this embodiment and the generative question-answering method for supporting the power equipment operation and maintenance knowledge base proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0083] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0084] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.< / eos>

Claims

1. A generative question-and-answer method supported by a power equipment operation and maintenance knowledge base, characterized in that, Includes the following steps: Obtain user-inputted maintenance issues; The intent type is obtained by classifying the operational issues using a pre-trained intent recognition model. When the intent type is a daily question-and-answer intent, generate daily dialogue response text based on a pre-trained large language model; When the intent type is a device knowledge query intent or a fault handling intent, the target knowledge base is matched, and information is retrieved from the target knowledge base based on the pre-trained large language model to generate a response text; Perform security checks on the response text generated by the pre-trained large language model.

2. The generative question-answering method supported by the power equipment operation and maintenance knowledge base as described in claim 1, characterized in that, The steps to obtain the intent type include: Feature extraction is performed on the aforementioned operation and maintenance issues to obtain keywords and contextual information; The keywords and contextual information are input into a pre-trained intent classification model, which outputs the intent type. The intent types include daily question and answer intent, equipment knowledge query intent, and fault handling intent.

3. The generative question-answering method supported by the power equipment operation and maintenance knowledge base as described in claim 2, characterized in that, The steps involved in generating everyday conversational response text based on a pre-trained large language model include: The operation and maintenance problem is processed by word embedding vectorization to generate an input vector; The input vector is fed into the pre-trained large language model; The probability distribution is generated through the pre-trained large language model, and the token sequence is sampled and output. When the token sequence contains a terminator, generation stops and the complete daily conversation response text is returned.

4. The generative question-answering method supported by the power equipment operation and maintenance knowledge base as described in claim 3, characterized in that, The steps for generating response text from a target knowledge base based on a pre-trained large language model include: Extract equipment type keywords and operation type keywords from the aforementioned maintenance issues to form keyword combinations; The keyword combinations are mapped to the target knowledge base using a predefined rule engine; Transform the aforementioned operation and maintenance issues into semantic vectors; Calculate the cosine similarity between the semantic vector and the corpus fragment in the target knowledge base; The corpus fragments in the target knowledge base are sorted in descending order based on the cosine similarity. The cosine similarity is compared with a preset threshold, and a secondary analysis is performed based on the comparison results.

5. The generative question-answering method supported by the power equipment operation and maintenance knowledge base as described in claim 4, characterized in that, The secondary analysis step includes: When there are corpus segments with a cosine similarity that reaches a preset threshold, the corpus segments with the top three cosine similarities are recalled as context. The operation and maintenance question is concatenated with the context to form a prompt word, which is then input into the pre-trained large language model to generate the response text. When there are no corpus segments with a cosine similarity that reaches the preset threshold, a knowledge base update request is triggered, and the aforementioned maintenance issue is submitted to the review terminal. In response to supplementary knowledge data input at the audit terminal, the content of the target knowledge base is updated; The updated target knowledge base is used to regenerate the response text and send it back to the user's terminal.

6. The generative question-answering method supported by the power equipment operation and maintenance knowledge base as described in claim 5, characterized in that, The steps for performing security verification on the generated response text include: The operation instructions in the reply text are parsed and matched with the list of prohibited operations in the security standard library; When a high-risk command is detected, an alarm flag is triggered; Extract the voltage and current level parameters from the reply text, and verify whether the voltage and current level parameters exceed the rated operating range of the corresponding model of equipment in the equipment ledger database. When the verification result does not meet the preset verification conditions, the sending of the reply text to the user terminal is automatically blocked, an early warning report containing risk location points is generated and pushed to the terminal of the operation and maintenance staff, and the pre-trained large language model is called to rewrite the reply text securely until the verification passes and the reply text is output.

7. The generative question-answering method supported by the power equipment operation and maintenance knowledge base as described in claim 6, characterized in that, The target knowledge base includes an equipment ledger database, a defect case database, a maintenance procedure database, and a safety standard database.

8. A generative question-and-answer system supported by a power equipment operation and maintenance knowledge base, employing the method described in any one of claims 1-7, characterized in that, include: The issue retrieval module is used to retrieve operation and maintenance issues input by users. The intent recognition module is used to classify the operational issues by intent using a pre-trained intent recognition model to obtain the intent type; The daily dialogue generation module is used to generate daily dialogue responses based on a pre-trained large language model when the intent type is daily question and answer intent. The knowledge base retrieval module is used to match the target knowledge base when the intent type is a device knowledge query intent or a fault handling intent, and to generate a response based on information retrieved from the target knowledge base using a pre-trained large language model; The knowledge base update module is used to automatically trigger a knowledge base update request when there are no corpus fragments with similarity reaching a preset threshold, receive supplementary knowledge data, and update the target knowledge base. The security verification module is used to perform security verification on the generated response.

9. An electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the generative question-answering method supported by the power equipment operation and maintenance knowledge base according to any one of claims 1 to 7.

10. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the generative question-answering method supported by the power equipment operation and maintenance knowledge base of any one of claims 1 to 7.

Citation Information

Cited By

  • Nuclear power safety evaluation question reply method and applicable system and readable medium thereof

    CN121958506A