Power plant operation and maintenance knowledge intelligent query method based on large language model and RAG technology

By constructing a multi-source power plant operation and maintenance knowledge vector base and combining a large language model with RAG technology, the problems of insufficient semantic understanding and unreliable answers in power plant operation and maintenance are solved, realizing high-precision and traceable intelligent question answering, and improving the query response quality and system controllability of power plant operation and maintenance.

CN121029784APending Publication Date: 2025-11-28JIANGSU GUOHUACHENJIAGANG POWER GENERATION CO LTD
View PDF 0 Cites 36 Cited by

Patent Information

Application Number
CN202511150129.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-18
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

Existing power plant operation and maintenance knowledge management systems suffer from insufficient semantic understanding capabilities, redundant and unreliable retrieval results, and a lack of control mechanisms for generating answers when faced with complex problems and multi-source heterogeneous data. Consequently, they cannot achieve high-precision and traceable intelligent question answering.

Method used

A knowledge vector library for the operation and maintenance of multi-source power plants is constructed. Combining large language models and RAG technology, a structured intelligent query method is realized through semantic retrieval, intent recognition, and expert rules. This includes semantic vector representation, intent tag recognition, multi-factor ranking, and generation control to ensure the accuracy and traceability of the answers.

Benefits of technology

It significantly improves the quality of query response in power plant operation and maintenance scenarios, realizes deep understanding of complex queries, fine matching of multi-source knowledge, and structured output of highly reliable answers, ensuring the accuracy and traceability of response content, and improving the controllability and engineering practicality of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121029784A_ABST
    Figure CN121029784A_ABST
Patent Text Reader

Abstract

The invention discloses a power plant operation and maintenance knowledge intelligent query method based on a large language model and an RAG technology. The method comprises the following steps: constructing a power plant operation and maintenance knowledge vector library covering structured, semi-structured and unstructured data; receiving a natural language question of a user, inputting an improved instruction to align a preprocessor, and generating a question semantic vector and an intention tag; relevant knowledge fragments are retrieved and sorted through a semantic matching retriever in combination with the intention labels; constructing a large language model cue word structure based on the retrieval result and the original question, generating candidate answers and recording a reference path; and finally, performing term specification and consistency verification according to the expert rule base, and outputting a structured and traceable final answer. According to the invention, the improved RAG technology is fused to realize intelligent query of the operation and maintenance knowledge of the power plant.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and knowledge engineering technology, and in particular to an intelligent query method for power plant operation and maintenance knowledge based on large language models and RAG technology. Background Technology

[0002] As power systems continue to expand, power plant operation and maintenance (O&M) work becomes increasingly complex, encompassing diverse and dynamic equipment types, operating modes, and procedures. To ensure stable equipment operation and personnel safety, power plants have accumulated a wealth of O&M knowledge, including operation manuals, fault records, maintenance procedures, and expert experience documents. Traditional knowledge management methods primarily rely on document systems or static databases, requiring O&M personnel to search for answers through keyword searches or manual document retrieval. This approach is not only inefficient but also prone to overlooking crucial information or obtaining inaccurate answers when dealing with complex problems, combining rules, or cross-system queries.

[0003] In recent years, with the development of artificial intelligence technology, some power plants have begun to try to introduce natural language processing and knowledge question-answering systems to assist in operation and maintenance decision-making. These systems are generally based on rule engines or FAQ matching models, and cannot achieve true semantic understanding and reasoning. Especially when faced with open-ended questions, fault tracing, or combined tasks in new scenarios, they often suffer from problems such as irrelevant answers and insufficient coverage. Furthermore, some systems have introduced question-answering structures based on pre-trained language models, but they still rely on pre-set corpora and lack the ability to dynamically access and generate responses to real-time knowledge.

[0004] To improve the practical usability of intelligent question-answering systems in professional scenarios, the industry has begun to focus on the RAG architecture, which retrieves relevant document fragments from a knowledge base and combines them with a generative language model to output answers. This method significantly improves the ability of large language models to understand professional contexts. However, the application of existing RAG technology in power plant operation and maintenance scenarios still faces many technical obstacles. First, power plant knowledge bases contain a large amount of unstructured and heterogeneous data, and existing methods are not precise enough in organizing and embedding knowledge fragments, resulting in redundant or inoperable retrieval results. Second, most current RAG systems use static vector retrieval, lacking task intent recognition and semantic tagging guidance mechanisms, and cannot finely select supporting fragments according to different task types. In addition, the generative model lacks a control mechanism when synthesizing answers, which may generate content that is detached from facts or not explicitly cited, affecting the traceability and engineering usability of the results.

[0005] To address the aforementioned shortcomings, constructing an intelligent question-answering method that integrates high-precision semantic retrieval, context injection control, and response output traceability has become a key technical issue in the intelligent operation and maintenance of power plants. Especially when facing complex query tasks, the system must not only understand the user's intent but also extract the most relevant knowledge from multi-source fragments and guide the generation process to output structured and interpretable results.

[0006] Therefore, how to provide an intelligent query method for power plant operation and maintenance knowledge based on large language models and RAG technology is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0007] One objective of this invention is to propose an intelligent query method for power plant operation and maintenance knowledge based on large language models and RAG technology. This invention fully integrates natural language processing, vectorized semantic retrieval, and generative large model reasoning techniques to construct a knowledge-enhanced question-and-answer process tailored to power plant professional scenarios. This method constructs a multi-source power plant operation and maintenance knowledge vector library, identifies user query intent, performs semantically guided fragment retrieval and control prompt word generation, and combines expert rules to achieve structured output and traceable binding of response content. It details the entire process of intelligently understanding power plant operation and maintenance issues, retrieving knowledge, and generating answers, possessing advantages such as strong semantic understanding capabilities, high accuracy of response content, traceable citation paths, and a high degree of result structure.

[0008] The intelligent query method for power plant operation and maintenance knowledge based on large language model and RAG technology according to embodiments of the present invention includes:

[0009] Construct a multi-source knowledge base for power plant operation and maintenance, collect and process structured, semi-structured, and unstructured data related to power plant operation and maintenance, and build a knowledge vector library that supports vectorized representation;

[0010] It receives natural language query text input by the user and inputs it into an improved instruction alignment preprocessor to perform syntactic cleaning, context completion and intent recognition, and generate a semantic vector representation of the question and a question intent label.

[0011] The semantic vector representation of the question is input into the improved semantic matching retrieval unit. Combined with the question intent tag, the vector retrieval operation is performed to obtain the set of matching knowledge document fragments from the knowledge vector base and output a list of fragments sorted by confidence.

[0012] Based on the original question text and the retrieved list of fragments, construct the input prompt word structure for the large language model;

[0013] Input the prompt word structure into the large language model to generate a set of candidate answers, and record the source of the knowledge fragment and the response path corresponding to each candidate answer;

[0014] Based on the power plant operation and maintenance expert rule base, semantic consistency verification, terminology standardization replacement and format structure correction are performed on the candidate answer set to generate a compliant final answer;

[0015] The final answer and the referenced knowledge paths are combined to form a structured query result, and an intelligent query response is output.

[0016] Optionally, the construction of a multi-source knowledge base for power plant operation and maintenance, which involves collecting and processing structured, semi-structured, and unstructured data related to power plant operation and maintenance, and constructing a knowledge vector library that supports vectorized representation, specifically includes:

[0017] Collect structured data involved in power plant operation and maintenance scenarios, including equipment history data, operation record sheets and alarm logs; semi-structured data, including inspection reports and daily reports; and unstructured data, including operation manuals, expert notes and technical procedures.

[0018] The collected data is subjected to a unified format conversion operation. Field mapping, template extraction and document slicing strategies are used to standardize various types of data into a unified knowledge fragment structure. The knowledge fragment structure includes text content, data type tags and timestamp identifiers.

[0019] Embedding pre-computation is performed on the standardized knowledge fragment structure. A multi-semantic channel encoding method is used to input the fragment text into the language model to generate semantic vectors. Each semantic vector is then labeled with its own tag, confidence weight, and document path index information.

[0020] All processed semantic vectors are stored in a knowledge vector library to form an embedded knowledge base structure that supports semantic retrieval. The knowledge vector library supports fragment indexing and sorting by time, tag, and document source.

[0021] Optionally, receiving the natural language query text input by the user and inputting it into the improved instruction alignment preprocessor to perform syntactic cleaning, context completion, and intent recognition to generate a question semantic vector representation and a question intent label specifically includes:

[0022] Receive natural language query text input by the user, perform cleaning operations, and remove noise symbols, time redundancy items and duplicate phrases;

[0023] The cleaned natural language query text is input into an improved instruction alignment preprocessor, which includes a semantic block encoder, a context completion module, and an intent recognition network.

[0024] The semantic block encoder consists of a bidirectional Transformer structure and a clause boundary detector, and is used to perform syntactic dependency analysis and semantic segmentation on the input natural language query text, and output a set of semantic clause vectors.

[0025] The context completion module includes a dynamic attention network based on a memory mechanism and a context fusion unit. It receives historical session vectors and user profile information, performs referential completion, ambiguity resolution, and missing information filling on semantic clause vectors, and generates enhanced semantic representation vectors.

[0026] The intent recognition network consists of a multi-layer feedforward classifier and a label embedding mapping layer. Based on the instruction alignment mechanism, it performs multi-label classification on the enhanced semantic representation vector, outputs the question intent label, and generates the question semantic vector representation by combining the semantic clause vector.

[0027] Optionally, the step of inputting the question semantic vector representation into the improved semantic matching retrieval unit, performing vector retrieval operations in conjunction with the question intent tags, obtaining a set of matching knowledge document fragments from the knowledge vector base, and outputting a list of fragments sorted by confidence score specifically includes:

[0028] The semantic vector representation of the question is input into an improved semantic matching retrieval module, which includes a vector alignment submodule, a tag-guided filtering unit, and a multi-factor fusion ranking module.

[0029] In the vector alignment submodule, a multi-channel encoding structure is used to extract the context embedding features of the question semantic vector and the fragment vector in the knowledge vector base respectively. By introducing a semantic alignment attention mechanism, the matching score is calculated to obtain the semantic correlation between the question and each fragment.

[0030] In the tag-guided filtering unit, based on the question intent tag, fragments that do not match the current task type are removed from the knowledge vector base, and a subset of question-related fragments that match the semantic domain, content level and operation type are retained as candidate fragments.

[0031] In the multi-factor fusion ranking module, a comprehensive ranking score is calculated for each candidate segment. The comprehensive ranking score is composed of semantic matching score, knowledge segment self-confidence score, document weight parameter and timestamp timeliness index. The semantic matching score is determined by the semantic alignment mechanism. The knowledge segment self-confidence score is assigned a fixed weight based on the structure type, content completeness and quality of the collection source of its document. The document weight parameter is calculated based on the node centrality index and historical citation frequency of the document in the knowledge graph. The timestamp timeliness index is calculated based on the time interval between the segment creation time and the current query time, combined with the preset timeliness decay rule.

[0032] The above scoring items are weighted and merged according to the set weight coefficients to generate the final ranking score of the candidate segments. Based on this, the segment set is prioritized and the top-ranked segment set, along with their corresponding text content, semantic tags, and index paths, are constructed into a confidence-ranked segment list.

[0033] Optionally, the construction of the input prompt word structure for the large language model based on the original question text and the retrieved list of fragments specifically includes:

[0034] Based on the confidence-ranked fragment list and the original natural language question text, an input prompt word structure is constructed. The prompt word structure consists of a question semantic unit, a knowledge fragment context unit, an inference control tag unit, and an output structure instruction unit.

[0035] The question semantic unit consists of the original question text or context-enhanced text, used to express the semantic intent, task objective and key entities of the user query, and is generated into a unified semantic vector representation after language modeling processing;

[0036] The knowledge fragment context unit consists of fragment text sorted by confidence, the document path to which the fragment belongs, the fragment publication timestamp, and semantic tags. These are sequentially concatenated into a context input paragraph that can be parsed by a large language model, possessing traceability and content boundary identification.

[0037] The inference control tagging unit consists of task category identifiers, inference boundary constraint instructions, and retrieval reference restriction information. It is used to limit the content selection range of the large language model when generating responses and ensure that the inference process is based only on verified fragments.

[0038] The output structure instruction unit consists of an output format type, a citation mark control field, and a structured output template number. It is used to control whether the generated result includes a response summary, whether to attach a citation number and its source document path, and to ensure that the response has structured output capability and information traceability.

[0039] The above units are processed hierarchically and serialized in a preset format order, and converted into a text prompt structure that conforms to the input specifications of the large language model. This text is then passed into the large language model as the context window input content.

[0040] Optionally, the step of inputting the prompt word structure into the large language model to generate a candidate answer set and recording the knowledge fragment source and response path corresponding to each candidate answer specifically includes:

[0041] The prompt word structure is input into a large language model, and multiple candidate answer drafts are generated based on the context injection mechanism. The context injection mechanism establishes a reasoning association between the semantic representation of the question and the context fragments through semantic alignment.

[0042] During the candidate answer generation process, the output range of the large language model is limited based on the reasoning control markers in the input prompts. Only the reference to the marked knowledge fragments is allowed for reasoning generation, thus avoiding the generation of free text that is detached from knowledge support.

[0043] After each candidate answer is generated, a structured answer description unit is automatically constructed. The answer description unit includes the generated natural language answer text, the corresponding knowledge fragment number and its index path information in the knowledge vector library, and the semantic consistency score between the candidate answer and the question semantic vector. The semantic consistency score is calculated based on the cosine similarity function and also includes the generation confidence score obtained by aggregating the output probability distribution of the large language model.

[0044] All candidate answers are sorted according to semantic consistency score and reference coverage, a priority list of response candidate answers is constructed, and the top K answers in the sorting are used as the initial response output of the model;

[0045] The generation process information for each candidate answer is archived, including input prompt summary, referenced knowledge path, large language model version identifier, generation timestamp and generation control parameter information, to build a traceable response metadata set.

[0046] Optionally, the step of performing semantic consistency verification, terminology standardization replacement, and format structure correction on the candidate answer set based on the power plant operation and maintenance expert rule base to generate a compliant final answer specifically includes:

[0047] The candidate answers are input into the expert rule correction module, which includes a terminology standardization library, an operating procedure rule set, and a semantic discrimination network.

[0048] Based on the terminology standard database, standardized replacement operations were performed on the professional terms in the candidate answers to ensure they conformed to the terminology system and usage standards of the power plant industry.

[0049] Based on the operation procedure rule set, rule matching analysis is performed on the operation description, execution order and dependency conditions in the candidate answers. When a logical structure or expression content that does not conform to the standard procedure appears, local adjustment, completion or elimination operations are performed.

[0050] The candidate answers after rule adjustment are input into the semantic discriminant network, and consistency matching is performed with the original question semantic vector. The semantic fit score is calculated. When the score is lower than the preset threshold, it is marked as a low-confidence answer and the output priority is reduced.

[0051] Each candidate answer is ranked based on its terminology compliance, procedural consistency, and semantic fit, and the answer with the highest score is selected as the final response answer.

[0052] Optionally, the step of combining the final answer with the referenced knowledge path to form a structured query result and outputting an intelligent query response specifically includes:

[0053] The final response answer is associated and bound with the knowledge fragment number, index path and original document meta information to construct a response traceability path set;

[0054] A structured output is generated based on the final response answer content. The structured output includes the answer text, a list of cited fragment paths, the titles of cited documents, response time, and model version information.

[0055] Perform formatting and encapsulation operations on the response results, and generate a standardized response format that can be used for front-end display, API feedback, or document archiving according to the preset output template specifications;

[0056] Construct a response log recording unit to write the input question, retrieval fragment set, large language model input summary, generation process control parameters, final answer and response structure of this round of query task into the query log;

[0057] The query logs are stored in the historical response database of the intelligent query system, and can be retrieved and audited by user ID, question keywords, response time and referenced document path, so as to achieve traceability of query results and closed-loop management of operation and maintenance knowledge.

[0058] The beneficial effects of this invention are:

[0059] The intelligent query method for power plant operation and maintenance knowledge based on large language model and RAG technology proposed in this invention addresses the problems of insufficient knowledge retrieval accuracy, weak semantic understanding ability and untraceable results in existing technologies. It constructs a closed-loop structured question-and-answer process covering "intent recognition - semantic retrieval - prompt control - output generation", which significantly improves the query response quality and system controllability in professional scenarios.

[0060] First, this invention constructs a multi-source, heterogeneous power plant operation and maintenance knowledge vector library, integrating structured documents, semi-structured records, and unstructured text content. It also introduces semantic fragment slicing and pre-embedding processing methods to achieve a unified representation and vectorized modeling of operation and maintenance knowledge, ensuring the breadth of coverage and accuracy of subsequent semantic retrieval. By combining the construction of question semantic vectors with a task intent tag recognition mechanism, it effectively solves the problem of "wide retrieval range but poor relevance" in traditional RAG models.

[0061] Secondly, this invention introduces a semantic alignment attention mechanism and a tag-guided filtering method into the semantically enhanced retrieval process, and constructs a multi-factor fusion ranking strategy. This strategy comprehensively considers the semantic matching score, confidence score, document weight, and timeliness index of the fragments, significantly improving the professional relevance and execution adaptability of the retrieval results. Simultaneously, by combining structured fragment output, it ensures that the generation module obtains complete, accurate, and context-rich content support.

[0062] Furthermore, this invention incorporates a reasoning control tagging and output structure instruction mechanism in the prompt word construction and response generation stages. This achieves contextual boundary constraints and output format control during the large language model generation process, preventing the "illusion" phenomenon of the generation process deviating from the knowledge base content. Combined with expert rule correction and terminology standardization replacement modules, it effectively improves the standardization, practicality, and security of the response content in terms of engineering semantics. The final structured output answer is not only accurate in content but also has citation traceability capabilities, supporting subsequent review and verification. This achieves intelligent, structured, and traceable management of the entire process from query input to response output.

[0063] Through the above technical design, this invention achieves in-depth understanding of complex query intents in professional contexts, fine matching of multi-source knowledge, and structured output of highly reliable answers, and has good engineering application prospects and practical promotion value in the intelligent operation and maintenance scenario of power plants. Attached Figure Description

[0064] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0065] Figure 1 This is an overall flowchart of the intelligent query method for power plant operation and maintenance knowledge based on large language model and RAG technology proposed in this invention.

[0066] Figure 2 This is a schematic diagram of an improved RAG technology proposed in this invention. Detailed Implementation

[0067] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0068] refer to Figure 1-2 A smart query method for power plant operation and maintenance knowledge based on large language models and RAG technology includes:

[0069] Step 1: Construct a multi-source knowledge base for power plant operation and maintenance, collect and process structured, semi-structured, and unstructured data related to power plant operation and maintenance, and construct a knowledge vector library that supports vectorized representation;

[0070] Step 2: Receive the natural language query text input by the user and input it into the improved instruction alignment preprocessor to perform syntactic cleaning, context completion and intent recognition, and generate a semantic vector representation of the question and a question intent label;

[0071] Step 3: Input the semantic vector representation of the question into the improved semantic matching retrieval machine, perform vector retrieval operation in combination with the question intent tag, obtain the set of matching knowledge document fragments from the knowledge vector base, and output a list of fragments with confidence ranking;

[0072] Step 4: Based on the original question text and the retrieved list of fragments, construct the input prompt word structure for the large language model;

[0073] Step 5: Input the prompt word structure into the large language model to generate a set of candidate answers, and record the source of the knowledge fragment and the response path corresponding to each candidate answer;

[0074] Step Six: Based on the power plant operation and maintenance expert rule base, perform semantic consistency verification, terminology standardization replacement, and format structure correction on the candidate answer set to generate a compliant final answer;

[0075] Step 7: Combine the final answer with the referenced knowledge paths to form a structured query result and output an intelligent query response.

[0076] This invention optimizes the entire intelligent query process in power plant scenarios by integrating multi-source power plant operation and maintenance knowledge construction, semantic-aware retrieval, and large language model generation mechanisms. This method not only accurately identifies user query intent and efficiently extracts supporting information from structured and unstructured knowledge, but also ensures the accuracy and standardization of the results through prompt word control and expert rule verification. The final query results possess advantages such as high semantic fit, traceable response content, and standardized terminology, significantly improving the intelligence level and practical value of power plant operation and maintenance knowledge services.

[0077] In this embodiment, the construction of a multi-source knowledge base for power plant operation and maintenance, which involves collecting and processing structured, semi-structured, and unstructured data related to power plant operation and maintenance, and constructing a knowledge vector base that supports vectorized representation, specifically includes:

[0078] Collect structured data involved in power plant operation and maintenance scenarios, including equipment history data, operation record sheets and alarm logs; semi-structured data, including inspection reports and daily reports; and unstructured data, including operation manuals, expert notes and technical procedures.

[0079] The collected data is subjected to a unified format conversion operation. Field mapping, template extraction and document slicing strategies are used to standardize various types of data into a unified knowledge fragment structure. The knowledge fragment structure includes text content, data type tags and timestamp identifiers.

[0080] Embedding pre-computation is performed on the standardized knowledge fragment structure. A multi-semantic channel encoding method is used to input the fragment text into the language model to generate semantic vectors. Each semantic vector is then labeled with its own tag, confidence weight, and document path index information.

[0081] All processed semantic vectors are stored in a knowledge vector library to form an embedded knowledge base structure that supports semantic retrieval. The knowledge vector library supports fragment indexing and sorting by time, tag, and document source.

[0082] This implementation method constructs an embedded knowledge vector library with multi-tag and multi-dimensional indexing capabilities by uniformly collecting, standardizing, and semantically vectorizing structured, semi-structured, and unstructured data related to power plant operation and maintenance. This knowledge library not only achieves a unified representation of multi-source knowledge but also improves the accuracy and coverage of subsequent semantic retrieval. Simultaneously, by introducing data type tags, confidence weights, and document path information, it ensures the controllability and credibility of knowledge fragments during retrieval, matching, and tracing, providing high-quality, callable underlying knowledge support for intelligent question-answering systems.

[0083] In this embodiment, receiving the natural language query text input by the user and inputting it into the improved instruction alignment preprocessor to perform syntactic cleaning, context completion, and intent recognition to generate a question semantic vector representation and a question intent label specifically includes:

[0084] Receive natural language query text input by the user, perform cleaning operations, and remove noise symbols, time redundancy items and duplicate phrases;

[0085] The cleaned natural language query text is input into an improved instruction alignment preprocessor, which includes a semantic block encoder, a context completion module, and an intent recognition network.

[0086] The semantic block encoder consists of a bidirectional Transformer structure and a clause boundary detector, and is used to perform syntactic dependency analysis and semantic segmentation on the input natural language query text, and output a set of semantic clause vectors.

[0087] The context completion module includes a dynamic attention network based on a memory mechanism and a context fusion unit. It receives historical session vectors and user profile information, performs referential completion, ambiguity resolution, and missing information filling on semantic clause vectors, and generates enhanced semantic representation vectors.

[0088] The intent recognition network consists of a multi-layer feedforward classifier and a label embedding mapping layer. Based on the instruction alignment mechanism, it performs multi-label classification on the enhanced semantic representation vector, outputs the question intent label, and generates the question semantic vector representation by combining the semantic clause vector.

[0089] This implementation introduces an improved instruction alignment preprocessor to perform deep semantic parsing and intent modeling on user-input natural language query text, effectively improving the accuracy of query understanding and context adaptability. This preprocessor combines semantic block encoding, context completion, and multi-label intent recognition to perform semantic recovery of ambiguous referential meanings, omitted statements, and implicit task objectives in complex power plant operation and maintenance scenarios. It generates accurate question semantic vectors and intent labels, providing a high-quality semantic input foundation for subsequent knowledge retrieval and generative question answering, significantly enhancing the system's robustness and generalization ability to natural language instructions.

[0090] In this embodiment, the step of inputting the question semantic vector representation into the improved semantic matching retrieval device, performing vector retrieval operations in conjunction with the question intent tags, obtaining a set of matching knowledge document fragments from the knowledge vector base, and outputting a list of fragments sorted by confidence score specifically includes:

[0091] The semantic vector representation of the question is input into an improved semantic matching retrieval module, which includes a vector alignment submodule, a tag-guided filtering unit, and a multi-factor fusion ranking module.

[0092] In the vector alignment submodule, a multi-channel encoding structure is used to extract the context embedding features of the question semantic vector and the fragment vector in the knowledge vector base respectively. By introducing a semantic alignment attention mechanism, the matching score is calculated to obtain the semantic correlation between the question and each fragment.

[0093] In the tag-guided filtering unit, based on the question intent tag, fragments that do not match the current task type are removed from the knowledge vector base, and a subset of question-related fragments that match the semantic domain, content level and operation type are retained as candidate fragments.

[0094] In the multi-factor fusion ranking module, a comprehensive ranking score is calculated for each candidate segment. The comprehensive ranking score is composed of semantic matching score, knowledge segment self-confidence score, document weight parameter and timestamp timeliness index. The semantic matching score is determined by the semantic alignment mechanism. The knowledge segment self-confidence score is assigned a fixed weight based on the structure type, content completeness and quality of the collection source of its document. The document weight parameter is calculated based on the node centrality index and historical citation frequency of the document in the knowledge graph. The timestamp timeliness index is calculated based on the time interval between the segment creation time and the current query time, combined with the preset timeliness decay rule.

[0095] The above scoring items are weighted and merged according to the set weight coefficients to generate the final ranking score of the candidate segments. Based on this, the segment set is prioritized and the top-ranked segment set, along with their corresponding text content, semantic tags, and index paths, are constructed into a confidence-ranked segment list.

[0096] This implementation introduces an improved semantic matching retrieval tool, achieving a high-precision knowledge fragment retrieval mechanism based on dual constraints of semantic alignment and task intent. The semantic alignment attention mechanism enhances the semantic awareness between questions and fragments, while semantic domain filtering combined with question intent tags significantly reduces the risk of interference from irrelevant fragments. Simultaneously, a multi-factor ranking strategy integrating semantic matching scores, confidence scores, document weights, and timeliness is introduced, effectively improving the relevance, authority, and timeliness of the retrieval results. The resulting confidence-ranked fragment list provides reliable and accurate knowledge support for the generation module, significantly enhancing the system's response quality and decision controllability in power plant operation and maintenance scenarios.

[0097] In this embodiment, the key feature is that the step of constructing the input prompt word structure of the large language model based on the original question text and the retrieved list of fragments specifically includes:

[0098] Based on the confidence-ranked fragment list and the original natural language question text, an input prompt word structure is constructed. The prompt word structure consists of a question semantic unit, a knowledge fragment context unit, an inference control tag unit, and an output structure instruction unit.

[0099] The question semantic unit consists of the original question text or context-enhanced text, used to express the semantic intent, task objective and key entities of the user query, and is generated into a unified semantic vector representation after language modeling processing;

[0100] The knowledge fragment context unit consists of fragment text sorted by confidence, the document path to which the fragment belongs, the fragment publication timestamp, and semantic tags. These are sequentially concatenated into a context input paragraph that can be parsed by a large language model, possessing traceability and content boundary identification.

[0101] The inference control tagging unit consists of task category identifiers, inference boundary constraint instructions, and retrieval reference restriction information. It is used to limit the content selection range of the large language model when generating responses and ensure that the inference process is based only on verified fragments.

[0102] The output structure instruction unit consists of an output format type, a citation mark control field, and a structured output template number. It is used to control whether the generated result includes a response summary, whether to attach a citation number and its source document path, and to ensure that the response has structured output capability and information traceability.

[0103] The above units are processed hierarchically and serialized in a preset format order, and converted into a text prompt structure that conforms to the input specifications of the large language model. This text is then passed into the large language model as the context window input content.

[0104] This implementation constructs an input prompt word structure comprising four units: question semantics, knowledge fragment context, reasoning control, and output instructions. This achieves precise guidance and semantic constraints on the large language model generation process. By introducing traceable knowledge fragment sequences and reasoning boundary control information, it ensures that the model-generated content is strictly based on the retrieval results, effectively avoiding hallucinatory responses and semantic shifts. Simultaneously, the output structure instruction unit supports standardized result formats and citation annotations, improving the structure and interpretability of the response content. This approach significantly enhances the controllability, accuracy, and practicality of the generation module in power plant-specific scenarios.

[0105] In this embodiment, the step of inputting the prompt word structure into the large language model to generate a set of candidate answers and recording the source and response path of the knowledge fragment corresponding to each candidate answer specifically includes:

[0106] The prompt word structure is input into a large language model, and multiple candidate answer drafts are generated based on the context injection mechanism. The context injection mechanism establishes a reasoning association between the semantic representation of the question and the context fragments through semantic alignment.

[0107] During the candidate answer generation process, the output range of the large language model is limited based on the reasoning control markers in the input prompts. Only the reference to the marked knowledge fragments is allowed for reasoning generation, thus avoiding the generation of free text that is detached from knowledge support.

[0108] After each candidate answer is generated, a structured answer description unit is automatically constructed. The answer description unit includes the generated natural language answer text, the corresponding knowledge fragment number and its index path information in the knowledge vector library, and the semantic consistency score between the candidate answer and the question semantic vector. The semantic consistency score is calculated based on the cosine similarity function and also includes the generation confidence score obtained by aggregating the output probability distribution of the large language model.

[0109] All candidate answers are sorted according to semantic consistency score and reference coverage, a priority list of response candidate answers is constructed, and the top K answers in the sorting are used as the initial response output of the model;

[0110] The generation process information for each candidate answer is archived, including input prompt summary, referenced knowledge path, large language model version identifier, generation timestamp and generation control parameter information, to build a traceable response metadata set.

[0111] This implementation introduces a context-injection-based large language model response generation process, enabling semantic association modeling of candidate answers, constraint of reference fragments, and traceability of response paths. By limiting the generation scope through inference control tags, it ensures that the answer content is strictly based on verified fragment reasoning, effectively avoiding issues of content fabrication and deviation from the knowledge base. After generation, candidate answers are automatically organized into structured descriptive units and sorted and output based on semantic consistency and confidence. Simultaneously, metadata throughout the process is recorded, constructing a traceable and auditable response chain, significantly improving the credibility and engineering practicality of the intelligent question-answering system.

[0112] In this embodiment, the step of performing semantic consistency verification, terminology standardization replacement, and format structure correction on the candidate answer set based on the power plant operation and maintenance expert rule base to generate a compliant final answer specifically includes:

[0113] The candidate answers are input into the expert rule correction module, which includes a terminology standardization library, an operating procedure rule set, and a semantic discrimination network.

[0114] Based on the terminology standard database, standardized replacement operations were performed on the professional terms in the candidate answers to ensure they conformed to the terminology system and usage standards of the power plant industry.

[0115] Based on the operation procedure rule set, rule matching analysis is performed on the operation description, execution order and dependency conditions in the candidate answers. When a logical structure or expression content that does not conform to the standard procedure appears, local adjustment, completion or elimination operations are performed.

[0116] The candidate answers after rule adjustment are input into the semantic discriminant network, and consistency matching is performed with the original question semantic vector. The semantic fit score is calculated. When the score is lower than the preset threshold, it is marked as a low-confidence answer and the output priority is reduced.

[0117] Each candidate answer is ranked based on its terminology compliance, procedural consistency, and semantic fit, and the answer with the highest score is selected as the final response answer.

[0118] This implementation method, by introducing an expert rule correction module, standardizes the terminology of candidate answers, verifies the compliance of operational logic, and confirms semantic consistency, effectively ensuring the accuracy of the generated results in terms of professional expression, procedural compliance, and semantic fit. A terminology standardization library unifies the wording used in answers, an operational procedure rule set ensures that the content conforms to the actual execution standards of the power plant, and a semantic discrimination network further filters out semantic deviations, effectively improving the quality and credibility of the answers. The final output response has the advantages of clear professional expression, accurate structural logic, and reliable and controllable content, significantly enhancing the engineering usability of the intelligent question-answering system in power plant operation and maintenance scenarios.

[0119] In this embodiment, the step of combining the final answer with the referenced knowledge path to form a structured query result and outputting an intelligent query response specifically includes:

[0120] The final response answer is associated and bound with the knowledge fragment number, index path and original document meta information to construct a response traceability path set;

[0121] A structured output is generated based on the final response answer content. The structured output includes the answer text, a list of cited fragment paths, the titles of cited documents, response time, and model version information.

[0122] Perform formatting and encapsulation operations on the response results, and generate a standardized response format that can be used for front-end display, API feedback, or document archiving according to the preset output template specifications;

[0123] Construct a response log recording unit to write the input question, retrieval fragment set, large language model input summary, generation process control parameters, final answer and response structure of this round of query task into the query log;

[0124] The query logs are stored in the historical response database of the intelligent query system, and can be retrieved and audited by user ID, question keywords, response time and referenced document path, so as to achieve traceability of query results and closed-loop management of operation and maintenance knowledge.

[0125] This implementation method achieves standardized presentation and full-process traceability management of intelligent query responses by constructing response traceability paths and structured output results. By associating and binding the final answer with the knowledge fragments and document information it references, it ensures that each answer has clear source evidence; the structured output content meets the format requirements of front-end display and system integration, improving the adaptability and usability of the response. Simultaneously, through the systematic recording of response logs and audit support from the historical query database, it achieves traceability and supervision of the entire query process, enhancing the security, standardization, and maintainability of the intelligent question-and-answer system in power plant operation and maintenance scenarios.

[0126] Benefit 1:

[0127] To verify the feasibility of this invention in practice, it was applied to a 600MW-class thermal power plant in a certain location. The plant is equipped with a standard main and auxiliary equipment operation and maintenance control system, as well as an information dispatch center and a manual maintenance support team. The test scenario was selected during the high-load operation period in summer, when equipment operating pressure and fault frequency increased significantly. On average, on-duty personnel received 20 to 30 on-site natural language query requests daily, covering typical fault handling tasks such as boiler start-up and shutdown, fan vibration, desulfurization fluctuations, water pump tripping, and power switching.

[0128] Under the traditional operating method, on-duty personnel mostly use keywords to search historical documents or flip through paper procedure manuals, which has the following problems: low query efficiency, inability to identify key semantics, and differences in the understanding of terminology and judgment of operation paths among different personnel, resulting in insufficient response speed and execution accuracy, which can easily lead to slow response or misjudgment.

[0129] After the implementation and deployment of this invention, a power plant operation and maintenance knowledge vector library containing 312,000 structured, semi-structured, and unstructured fragments was constructed, covering operating procedures, equipment history, expert opinions, and technical documents. Users input questions in natural language through the control platform, such as "What should be done if a strong earthquake occurs during wind turbine startup?" The system automatically cleans and identifies the intent of the question, generates a semantic vector, and then launches a semantic matching retrieval device to accurately filter and sort thousands of procedure fragments. Finally, the fragment with the highest confidence is injected into a large language model to construct input prompt words, and controlled content generation is executed.

[0130] Comparative tests were conducted on five typical problems over three consecutive days in a month, covering morning, noon, and evening shifts. The performance of the traditional manual response method and the system of this invention were statistically analyzed, and the data are shown in the table below:

[0131] Table 1 Performance Comparison Table

[0132]

[0133] As can be seen from the table, the average response time of the system of this invention is controlled between 30 and 36 seconds, far lower than the average time of about 250 seconds for traditional manual queries, improving efficiency by more than 7 times. Regarding accuracy, manual responses are prone to ambiguity due to experience bias, with accuracy ranging from 66% to 73%. In contrast, this invention, relying on procedural reference paths and semantic control mechanisms, maintains an overall accuracy rate of over 91%, demonstrating high consistency and reproducibility. Particularly in the tasks of "wind turbine strong vibration" and "backup power supply switching," the results generated by this invention actively match more than three operational procedure segments, and the source documents and paths are marked through the output structure, ensuring that the response content is verifiable and traceable.

[0134] In summary, this invention demonstrates significant advantages in response speed, improved knowledge accuracy, and increased transparency in real-world power plant operation and maintenance scenarios. It provides intelligent, structured, and highly reliable support for on-site fault response and procedure execution, effectively solving the problems of slow response, knowledge gaps, and uncontrollable output in traditional models. It has extremely high engineering promotion value.

[0135] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for intelligent querying power plant operation and maintenance knowledge based on large language models and RAG technology, characterized in that: Includes the following steps: Construct a multi-source knowledge base for power plant operation and maintenance, collect and process structured, semi-structured, and unstructured data related to power plant operation and maintenance, and build a knowledge vector library that supports vectorized representation; It receives natural language query text input by the user and inputs it into an improved instruction alignment preprocessor to perform syntactic cleaning, context completion and intent recognition, and generate a semantic vector representation of the question and a question intent label. The semantic vector representation of the question is input into the improved semantic matching retrieval unit in the RAG architecture. The vector retrieval operation is performed in combination with the question intent tag. The set of matching knowledge document fragments is obtained from the knowledge vector base, and the list of fragments with confidence ranking is output. Based on the original question text and the retrieved list of fragments, the input prompt word structure of the large language model is constructed, and the input sequence of the RAG generator is constructed by combining the question semantic vector; Input the prompt word structure into the large language model to generate a set of candidate answers, and record the source of the knowledge fragment and the response path corresponding to each candidate answer; Based on the power plant operation and maintenance expert rule base, semantic consistency verification, terminology standardization replacement and format structure correction are performed on the candidate answer set to generate a compliant final answer; The final answer and the referenced knowledge paths are combined to form a structured query result, and an intelligent query response is output.

2. The intelligent query method for power plant operation and maintenance knowledge based on large language model and RAG technology according to claim 1, characterized in that, The construction of a multi-source knowledge base for power plant operation and maintenance involves collecting and processing structured, semi-structured, and unstructured data related to power plant operation and maintenance, and constructing a knowledge vector base that supports vectorized representation. Specifically, this includes: Collect structured data involved in power plant operation and maintenance scenarios, including equipment history data, operation record sheets and alarm logs; semi-structured data, including inspection reports and daily reports; and unstructured data, including operation manuals, expert notes and technical procedures. The collected data is subjected to a unified format conversion operation. Field mapping, template extraction and document slicing strategies are used to standardize various types of data into a unified knowledge fragment structure. The knowledge fragment structure includes text content, data type tags and timestamp identifiers. Embedding pre-computation is performed on the standardized knowledge fragment structure. A multi-semantic channel encoding method is used to input the fragment text into the language model to generate semantic vectors. Each semantic vector is then labeled with its own tag, confidence weight, and document path index information. All processed semantic vectors are stored in a knowledge vector library to form an embedded knowledge base structure that supports semantic retrieval. The knowledge vector library supports fragment indexing and sorting by time, tag, and document source.

3. The intelligent query method for power plant operation and maintenance knowledge based on large language model and RAG technology according to claim 1, characterized in that, The process of receiving natural language query text input by the user and feeding it into an improved instruction alignment preprocessor to perform syntactic cleaning, context completion, and intent recognition to generate a semantic vector representation of the question and a question intent label specifically includes: Receive natural language query text input by the user, perform cleaning operations, and remove noise symbols, time redundancy items and duplicate phrases; The cleaned natural language query text is input into an improved instruction alignment preprocessor, which includes a semantic block encoder, a context completion module, and an intent recognition network. The semantic block encoder consists of a bidirectional Transformer structure and a clause boundary detector. It performs syntactic dependency analysis and semantic segmentation on the input natural language query text and outputs a set of semantic clause vectors. The context completion module includes a dynamic attention network based on a memory mechanism and a context fusion unit. It receives historical session vectors and user profile information, performs referential completion, ambiguity resolution, and missing information filling on semantic clause vectors, and generates enhanced semantic representation vectors. The intent recognition network consists of a feedforward classifier and a label embedding mapping layer. It performs label classification on the enhanced semantic representation vector based on the instruction alignment mechanism, outputs the question intent label, and generates the question semantic vector representation by combining the semantic clause vector.

4. The intelligent query method for power plant operation and maintenance knowledge based on large language model and RAG technology according to claim 1, characterized in that, The process of inputting the semantic vector representation of the question into the improved semantic matching retrieval unit in the RAG architecture, performing vector retrieval operations in conjunction with the question intent tag, obtaining a set of matching knowledge document fragments from the knowledge vector base, and outputting a list of fragments sorted by confidence score specifically includes: The semantic vector representation of the question is input into the improved semantic matching retrieval unit in the RAG architecture. The improved semantic matching retrieval unit includes a vector alignment submodule, a tag-guided filtering unit, and a multi-factor fusion ranking module. The vector alignment submodule includes a multi-channel semantic encoder, a semantic alignment attention mechanism, and an output matching scorer. The multi-channel semantic encoder extracts the contextual embedding features of the question semantic vector and the semantic vector in the knowledge vector base. The semantic alignment attention mechanism performs weighted modeling of the matching relationship between different semantic channels. The output matching scorer generates the semantic correlation between the question and each segment. The tag-guided filtering unit includes a tag classifier interface module, a filter condition builder, and a tag matching executor. The tag classifier interface module is used to receive question intent tags and convert them into a set of tags with semantic domain, device type, and operation category. The filter condition builder is used to construct filtering rules. The tag matching executor is used to remove fragments that do not match the current task type and retain a set of candidate fragments that meet the semantic requirements. In the multi-factor fusion ranking module, a comprehensive ranking score is calculated for each candidate segment. The comprehensive ranking score is composed of semantic matching score, knowledge segment self-confidence score, document weight parameter and timestamp timeliness index. The semantic matching score is determined by the semantic alignment mechanism. The knowledge segment self-confidence score is assigned a fixed weight based on the structure type, content completeness and quality of the collection source of its document. The document weight parameter is calculated based on the node centrality index and historical citation frequency of the document in the knowledge graph. The timestamp timeliness index is calculated based on the time interval between the segment creation time and the current query time, combined with the preset timeliness decay rule. The above scoring items are weighted and merged according to the set weight coefficients to generate the final ranking score of the candidate segments. Based on this, the segment set is prioritized and the top-ranked segment set, along with their corresponding text content, semantic tags, and index paths, are constructed into a confidence-ranked segment list.

5. The intelligent query method for power plant operation and maintenance knowledge based on large language model and RAG technology according to claim 1, characterized in that, The specific steps for constructing the input prompt word structure for the large language model based on the original question text and the retrieved list of fragments include: Based on the confidence-ranked fragment list and the original natural language question text, an input prompt word structure is constructed. The prompt word structure consists of a question semantic unit, a knowledge fragment context unit, an inference control tag unit, and an output structure instruction unit. The question semantic unit consists of the original question text or context-enhanced text, used to express the semantic intent, task objective and key entities of the user query, and is generated into a unified semantic vector representation after language modeling processing; The knowledge fragment context unit consists of fragment text sorted by confidence, the document path to which the fragment belongs, the fragment publication timestamp, and semantic tags. These are sequentially concatenated into a context input paragraph that can be parsed by a large language model, possessing traceability and content boundary identification. The inference control tagging unit consists of task category identifiers, inference boundary constraint instructions, and retrieval reference restriction information. It is used to limit the content selection range of the large language model when generating responses and ensure that the inference process is based only on verified fragments. The output structure instruction unit consists of an output format type, a citation mark control field, and a structured output template number. It is used to control whether the generated result includes a response summary, whether to attach a citation number and its source document path, and to ensure that the response has structured output capability and information traceability. The above units are processed hierarchically and serialized in a preset format order, and converted into a text prompt structure that conforms to the input specifications of the large language model. This text is then passed into the large language model as the context window input content.

6. The intelligent query method for power plant operation and maintenance knowledge based on large language model and RAG technology according to claim 1, characterized in that, The process of inputting the prompt word structure into the large language model to generate a candidate answer set and recording the knowledge fragment source and response path corresponding to each candidate answer specifically includes: The prompt word structure is input into a large language model, and a draft candidate answer is generated based on the context injection mechanism. The context injection mechanism establishes a reasoning association between the semantic representation of the question and the context fragments through semantic alignment. During the candidate answer generation process, the output range of the large language model is limited based on the reasoning control markers in the input prompts. Only the reference to the marked knowledge fragments is allowed for reasoning generation, thus avoiding the generation of free text that is detached from knowledge support. After each candidate answer is generated, a structured answer description unit is automatically constructed. The structured answer description unit includes the generated natural language answer text, the corresponding knowledge segment number and its index path information in the knowledge vector library, and the semantic consistency score between the candidate answer and the question semantic vector. The semantic consistency score is calculated based on the cosine similarity function and also includes the generation confidence score obtained by aggregating the output probability distribution of the large language model. All candidate answers are sorted according to semantic consistency score and reference coverage, a priority list of response candidate answers is constructed, and the top K answers in the sorting are used as the initial response output of the model; The generation process information for each candidate answer is archived, including input prompt summary, referenced knowledge path, large language model version identifier, generation timestamp and generation control parameter information, to build a traceable response metadata set.

7. The intelligent query method for power plant operation and maintenance knowledge based on large language model and RAG technology according to claim 1, characterized in that, The process of performing semantic consistency checks, terminology standardization replacements, and format structure corrections on the candidate answer set based on the power plant operation and maintenance expert rule base to generate a compliant final answer specifically includes: The candidate answers are input into the expert rule correction module, which includes a terminology standardization library, an operating procedure rule set, and a semantic discrimination network. Based on the terminology standard database, standardized replacement operations were performed on the professional terms in the candidate answers to ensure they conformed to the terminology system and usage standards of the power plant industry. Based on the operation procedure rule set, rule matching analysis is performed on the operation description, execution order and dependency conditions in the candidate answers. When a logical structure or expression content that does not conform to the standard procedure appears, local adjustment, completion or elimination operations are performed. The candidate answers after rule adjustment are input into the semantic discriminant network, and consistency matching is performed with the original question semantic vector. The semantic fit score is calculated. When the score is lower than the preset threshold, it is marked as a low-confidence answer and the output priority is reduced. Each candidate answer is ranked based on its terminology compliance, procedural consistency, and semantic fit, and the answer with the highest score is selected as the final response answer.

8. The intelligent query method for power plant operation and maintenance knowledge based on large language model and RAG technology according to claim 1, characterized in that, The process of combining the final answer with the referenced knowledge path to form a structured query result and outputting an intelligent query response specifically includes: The final response answer is associated and bound with the knowledge fragment number, index path and original document meta information to construct a response tracing path set; A structured output is generated based on the final response answer content. The structured output includes the answer text, a list of cited fragment paths, the titles of cited documents, response time, and model version information. Perform formatting and encapsulation operations on the response results, and generate a standardized response format that can be used for front-end display, API feedback, or document archiving according to the preset output template specifications; Construct a response log recording unit to write the input question, retrieval fragment set, large language model input summary, generation process control parameters, final answer and response structure of this round of query task into the query log; The query logs are stored in the historical response database of the intelligent query system, and can be retrieved and audited by user ID, question keywords, response time and referenced document path, so as to achieve traceability of query results and closed-loop management of operation and maintenance knowledge.

Citation Information

Cited By

  • Effect matrix construction method based on topic clustering and two rounds of questions and answers

    CN121256033A

  • Method, device and equipment for retrieving and enhancing enterprise multi-source knowledge traceability and storage medium

    CN121256067A

  • Question and answer method for low-altitude multi-modal fusion retrieval

    CN121257755A

  • Data query method and system based on large model

    CN121326974A

  • Data retrieval and chart generation method based on large language model

    CN121327120A