A method for diagnosing and controlling equipment fault of a hydropower station based on text understanding reasoning
By constructing an intelligent platform based on text understanding and reasoning, integrating multi-source data, and introducing fault diagnosis path state control, the problem of complex semantic understanding and multi-source data integration in the fault diagnosis of hydropower station equipment was solved, achieving efficient and safe fault diagnosis and knowledge updating.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA YANGTZE POWER
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies lack a unified query entry point for fault diagnosis of hydropower station equipment. Traditional retrieval methods cannot support complex semantic problems, resulting in low retrieval accuracy and efficiency. They are also difficult to integrate heterogeneous data from multiple sources and may output invalid diagnostic conclusions under complex operating conditions, lacking safe and reliable real-time auxiliary decision-making.
We construct an intelligent platform based on text understanding and reasoning. Through deep aggregation and cleaning of multi-source heterogeneous data, we build a vertical knowledge graph for the hydropower field. We adopt a sparse + dense dual-path indexing mechanism, introduce a fault diagnosis path state control mechanism, and combine a large language model to perform agent-driven dynamic retrieval and reordering to generate interpretable diagnostic suggestions. We also optimize the knowledge base through feedback loop.
It significantly improves the engineering consistency and safety of fault diagnosis, reduces the risk of erroneous diagnostic output, enhances the quality of contextual recall and knowledge granularity, possesses continuous evolution capabilities, and can provide reliable fault root cause tracing and correlation analysis under complex operating conditions.
Smart Images

Figure CN122154698A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent operation and maintenance of power systems, specifically to a method for fault diagnosis and control of hydropower station equipment based on text understanding and reasoning under operating conditions. Background Technology
[0002] Currently, the operation and maintenance management of my country's hydropower industry still relies heavily on static documents, manual experience, and fragmented knowledge bases, which hinders rapid question-and-answer, intelligent recommendation, and fault prediction. The general situation regarding equipment maintenance and fault response in hydropower stations is as follows:
[0003] Fault information is scattered across multiple static documents, such as operation and maintenance procedures, accident records, and technical bulletins, lacking a unified query portal.
[0004] Traditional retrieval methods rely on keyword matching, which cannot support complex semantic issues and result in low retrieval accuracy and efficiency.
[0005] Failure cases cannot be effectively transformed into knowledge, and there is a lack of mechanisms to support experience learning and intelligent prediction.
[0006] As equipment becomes increasingly digitized, large amounts of image, sensor, and tabular data are difficult to utilize in a unified manner for diagnostic assistance.
[0007] Existing technologies primarily achieve partial auxiliary diagnostic functions through rule-based or shallow machine learning methods, but they struggle to achieve complex semantic understanding and reasoning capabilities, and cannot integrate and analyze heterogeneous data (text, images, curves, signals). Although expert systems and knowledge graphs have attempted to provide intelligent support, they still lack effective constraint mechanisms on the engineering conditions for fault diagnosis paths under complex operating conditions. This can easily lead to diagnostic conclusions that are not valid under specific operating conditions, making it difficult to support safe and reliable real-time auxiliary decision-making.
[0008] In recent years, with the development of Large Language Models (LLM) and retrieval-enhanced generation technologies, it has become possible to build a unified knowledge question-answering and fault diagnosis platform. This invention aims to construct an intelligent platform with semantic understanding, contextual memory, and modal fusion capabilities for high-frequency application scenarios such as hydropower station operation, scheduling, and maintenance. This platform effectively integrates multi-source data to replace traditional static document systems and cumbersome manual troubleshooting processes. Summary of the Invention
[0009] This invention aims to overcome the shortcomings of existing technologies and provide a method for fault diagnosis and control of hydropower station equipment based on text understanding and reasoning under operating conditions. The steps of the method are as follows: S1. Deep aggregation and cleaning of multi-source heterogeneous data Collect historical operational data, equipment technical manuals, fault case libraries, and expert experience documents from hydropower stations. For unstructured documents (such as scanned PDFs), use OCR technology to extract text and use regular expression algorithms to remove headers, footers, and garbled noise.
[0010] A dynamic segmentation strategy based on semantic hierarchy is adopted: regular expressions are used to identify the chapter level of the procedure document (such as "1.2.3 Fault Phenomenon"), and the phenomena, causes and handling measures belonging to the same logical unit are encapsulated in the same text slice, and a 10%-15% overlap window is set to ensure the integrity of the contextual semantics.
[0011] S2. Constructing a vertical knowledge graph for the hydropower sector Define a graph pattern containing five core entities: "equipment-fault-symptom-cause-handling method". Use the BERT-BiLSTM-CRF model to extract entity relation triples from the cleaned corpus, construct a visualized fault association network, and store it in a graph database.
[0012] S3. Construct a hybrid search index A dual-path indexing mechanism combining sparse and dense indexing is employed. Using a pre-trained embedding model (such as BGE-Large-zh) fine-tuned with hydropower station corpus, text slices are converted into high-dimensional dense vectors and stored in a vector database to capture deep semantic information. A sparse inverted index is constructed using the BM25 algorithm, with a focus on enhancing the accurate matching capability of device reference numbers (KKS encoding), parameter thresholds, and proper nouns; Establish a unified ID mapping to achieve associated storage of the two indexes.
[0013] Before entering the online retrieval and reasoning stage, this invention introduces a fault diagnosis path status control mechanism based on operating conditions.
[0014] For each predefined fault diagnosis path of hydropower station equipment, a path status identifier is set, which includes at least an active state and a frozen state. The system determines the engineering conditions for each diagnosis path based on the current operating mode, load range, and operating condition identifier of the equipment. When a diagnosis path does not meet the physical or engineering conditions under the current operating conditions, the corresponding diagnosis path is frozen, preventing it from participating in the subsequent retrieval, reasoning, and diagnosis output process.
[0015] S4. Agent-driven dynamic retrieval and reordering Upon receiving a fault description request from the user, the system invokes the diagnostic path control operator to dynamically define the retrieval boundaries based on the path status identifier determined by real-time operating conditions. The system performs parallel semantic retrieval based on vector space and keyword retrieval based on sparse indexes only on the structured and unstructured knowledge units associated with the diagnostic path that is in an "active state," obtaining multi-dimensional candidate evidence fragments. Subsequently, a cross-encoder is introduced to perform reranking logic. By calculating the interactive relevance score between the candidate fragments and the user's question, the top-K evidence segments with high confidence are selected as the knowledge foundation for large-scale model inference.
[0016] S5. Interpretable Diagnostic Generation Based on Logical Chain Guidance The selected Top-K evidence paragraphs are semantically decoupled and reorganized from the original question, embedded into a pre-defined expert role prompt template, and input into the large language model. The large language model then activates its Chain of Thought (CoT) reasoning engine, performing step-by-step reasoning within the "activated" diagnostic path logic framework. The model first identifies potential fault locations, then compares them with procedural clauses in the evidence paragraphs, and finally generates interpretable diagnostic suggestions that include root cause analysis, tiered troubleshooting steps, and standard procedural basis. During this process, the system uses a condition logic gating mechanism to forcibly block diagnostic paths in a "frozen state," preventing the model from generating outputs that violate physical laws or engineering common sense, and provides source data citation annotations for each generated suggestion.
[0017] S6. Feedback Loop and Continuous Evolution The system records users' adoption behavior and evaluation feedback, and injects high-quality question-and-answer pairs back into the vector database to achieve automatic updates and optimization of the knowledge base.
[0018] Compared with the prior art, the beneficial effects of the present invention include: (1) By introducing a fault diagnosis and control mechanism for hydropower station equipment based on text understanding and reasoning, fault diagnosis conclusions that are not valid in engineering are effectively avoided under shutdown, no-load or specific load conditions, and the engineering consistency and safety of the diagnosis results are significantly improved.
[0019] (2) By placing the engineering validity judgment of the fault diagnosis path before the retrieval and reasoning stage, the large model is prevented from reasoning or generating diagnosis paths that do not meet the engineering validity conditions, thereby reducing the risk of erroneous diagnosis output from the mechanism level and enhancing the interpretability of the results.
[0020] (3) The knowledge granularity is more refined. The innovative semantic dynamic segmentation algorithm solves the problem of logical breakage caused by traditional fixed-length segmentation, ensures a strong correlation between fault phenomena and handling measures, and improves the quality of context recall.
[0021] (4) It integrates text and graphics, and has strong reasoning ability. Combining the structured reasoning of knowledge graphs with the general understanding of large models, it can not only answer single questions, but also trace the root causes of failures and conduct correlation analysis based on graph relationships.
[0022] (5) It has the ability to continuously evolve. Through the feedback mechanism of "human in the loop", the system can continuously accumulate new cases as the power station operates for more years, thus solving the problem of knowledge obsolescence. Attached Figure Description
[0023] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0024] Figure 1 This is a flowchart illustrating a method for fault diagnosis and control of hydropower station equipment based on text understanding and reasoning, as proposed in this invention.
[0025] Figure 2 This is a system architecture block diagram of the method of the present invention.
[0026] Figure 3 This is a schematic diagram of the data deep cleaning and semantic segmentation process proposed in the method of this invention.
[0027] Figure 4 This is a detailed timing diagram of the working logic of the agent-driven search architecture retrieval enhancement generation mechanism in the method of this invention.
[0028] Figure 5 This is a schematic diagram of ontology construction, gating activation, and triplet relationships in the knowledge graph of hydropower fault domain in the method of this invention. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0030] To verify the effectiveness of the proposed collaborative scheduling method considering source-load uncertainty, simulation verification was conducted in a typical off-grid power inspection UAV-based microgrid system in the Three Gorges Reservoir area. The simulation platform was built based on MATLAB, and the differences in scheduling strategies under different task urgency factors were compared.
[0031] Example 1 A system for fault diagnosis and control of hydropower station equipment based on text understanding and reasoning under operating conditions, such as Figure 2The diagram shows the overall architecture of the system according to the present invention, in which the agent-driven search architecture and the large language model serve as diagnostic support modules controlled by the diagnostic path state. The system of the present invention is logically divided into five layers: I. Data Source Layer As the underlying input of the system, it covers multi-source heterogeneous data from hydropower stations, specifically including but not limited to the following four types of books: (1) Unstructured documents: PDF format of "Operating Procedures for Hydropower Generator Sets", "Maintenance Manual", "Accident Analysis Reports" over the years and manufacturer's technical manuals such as PDF format manufacturer's maintenance manual, Word format operating procedures, and accident analysis reports over the years; (2) Structured data: historical measurement data from SCADA / DCS (data acquisition and monitoring control system), real-time measurement data of the system (such as stator temperature and guide vane opening), and alarm logs from SCADA / DCS (distributed control system); (3) Semi-structured data: equipment maintenance record sheets, fault code tables, and inspection spreadsheets; (4) Expert experience base: Fault trees and rules of thumb accumulated by senior operation and maintenance personnel.
[0032] II. Data Processing Layer It is primarily responsible for data cleaning and transformation. This includes a cleaning module (for removing noise), an entity extraction module (for building a graph), and a vector embedding module (Embedding Model). The vector embedding module is responsible for converting text into high-dimensional vectors that computers can understand.
[0033] III. Knowledge Storage and Indexing Layer This is the system's "memory center," containing a dual-repository structure: Vector Database (Vector DB): Stores text vector indexes and supports high-speed similarity retrieval based on FAISS or Milvus; Graph databases (Graph DBs) store triples of entity relationships between storage devices and faults, such as Neo4j.
[0034] IV. Core Engine Layer It includes a fault diagnosis path state control module, an agent-driven search architecture, and a Large Language Model (LLM). The fault diagnosis path state control module is used to manage the activation and freezing states of each diagnostic path under operational constraints. In this embodiment, the LLM adopts a base model with long text reasoning capabilities.
[0035] V. Application Interaction Layer Provides users with a visual interface via web or mobile devices, supporting intelligent Q&A, fault report generation, and expert feedback functions.
[0036] Example 2 Based on the system architecture described in Embodiment 1, a method for fault diagnosis and control of hydropower station equipment under operating conditions based on text understanding and reasoning is provided, such as... Figure 1 As shown, the specific steps include the following: Step S1: Multi-source data aggregation The system accesses the aforementioned multi-source data, uses OCR technology to recognize scanned documents, and removes headers, footers, and meaningless characters through regular expression cleaning to form a plain text corpus.
[0037] Step S2: Data Preprocessing and Knowledge Graph Construction In this step, the system performs word segmentation and entity recognition on the corpus.
[0038] (1) Ontology layer definition (Schema construction) like Figure 5 As shown, this invention constructs a knowledge graph model specifically for hydropower fault diagnosis, which includes five types of core entity nodes: Equipment nodes (Center): such as "hydro turbine generator set", "thrust bearing", etc.; Fault nodes: such as "stator grounding", "shear pin shearing", etc. Symptoms include: "zero-sequence voltage rise", "slew rate exceeding limits", etc. Causes include: "insulation aging", "low oil pressure", etc. Actions: such as "emergency shutdown" and "switch to backup pump".
[0039] like Figure 4 As shown, the entities are connected by directed edges such as "occurred", "manifested as", "cause as", and "solution", forming a structured fault reasoning network.
[0040] (2) Entity Relationship Extraction The BERT-BiLSTM-CRF model was used to perform entity recognition on the cleaned corpus and extract the following relations: "equipment-contains-component", "component-occurs-failure", "failure-manifests as-symptom", "failure-leads to-consequence", and "failure-solution-operation".
[0041] (3) Graph storage The extracted triples (such as <thrust bearing, occurrence, excessive bearing temperature>) are stored in a graph database (Neo4j or NebulaGraph is selected in this embodiment) to form a visualized fault association network.
[0042] Step S3: Vectorization and Index Construction To address the issue of inaccurate matching of proper nouns in single-vector retrieval, this step constructs a dual-path indexing strategy combining sparse and dense indexes: (1) Dense Embedding: Using a pre-trained embedding model finely tuned to hydropower corpus (BGE-Large-zh in this example), the segmented text blocks are converted into high-dimensional vectors (768 dimensions) and stored in a vector database (Milvus). This vector mainly captures the deep semantic information of the text (e.g., recognizing the similarity between "high temperature" and "heating").
[0043] (2) Sparse index: At the same time, the BM25 algorithm is used to construct an inverted index for the corpus, focusing on the precise literal matching ability of device number and proper nouns (such as "KKS encoding" and "90% opening").
[0044] (3) Hybrid storage: Establish a mapping relationship between text ID and the above two indexes in the database to ensure that the system can call the two retrievals in parallel during online diagnosis (step S4) and perform weighted fusion of the results.
[0045] The system uses a pre-trained Embedding model (BGE-Large-zh) to encode text nodes and segmented document fragments in the graph, generating 768-dimensional dense vectors, and constructs a retrieval library that combines inverted indexes and vector indexes.
[0046] Step S4: Question Vectorization and Similarity Matching Upon entering the online diagnostic phase, when the user inputs a natural language question (such as "How to handle high thrust bearing temperature in Unit 3?"), the system converts the question into a vector and performs a Top-K search in the index database built in step S3. This step aims to address the low precision problem of traditional single-search modes. When the user inputs a fault description (Query) on the front-end interface, the system combines... Figure 3 The online processing logic shown executes the following "recall-refinement" process: (1) Dual-path recall using vectors and keywords The system first initiates two independent searches in parallel for the user-input question (such as "High thrust and bearing temperature of Unit 3"): A. Path 1 (Vector Retrieval): This path uses a pre-trained embedding model to convert the query into a vector and then searches for the paragraph with the closest semantic spatial distance in the Milvus / FAISS vector library. This path excels at capturing implicit semantics (such as the association between "high temperature" and "heat"), but is susceptible to illusions.
[0047] B. Path Two (Keyword Search): This path uses the BM25 algorithm to search for paragraphs containing specific terms in the inverted index. It excels at precisely matching proper nouns such as device tag numbers (e.g., "Unit 3") and fault codes, but struggles with synonyms.
[0048] C. Result merging: The system extracts the top 20 results from both search paths (Top-20), takes the union of the results and removes duplicates to form a candidate knowledge set.
[0049] (2) Cross-coding reordering To remove seemingly relevant but logically irrelevant noisy data from the candidate set, the system introduces a re-ranking mechanism: A. Model Application: Using the Cross-Encoder architecture model (BGE-Reranker is selected in this embodiment), the "original user question" and "each paragraph in the candidate set" are concatenated into pairs and input into the model for deep interactive computation.
[0050] B. Relevance Scoring: The model outputs a confidence score for the relevance of each paragraph to the question. Compared to the simple vector distance (Bi-Encoder), the Cross-Encoder can more accurately understand complex logical relevance.
[0051] C. Final Extraction: The system sorts the paragraphs from highest to lowest score and retains only the top 5 high-confidence paragraphs. These paragraphs will serve as high-quality "context" and be passed to subsequent large-scale model inference steps.
[0052] Step S5: Contextual Recall and Large Model Inference The system concatenates the retrieved Top-K relevant paragraphs with the user's original question to form a dynamic prompt input large language model, and uses the model's reasoning ability to generate diagnostic suggestions. This step transforms the top five (Top-5) high-confidence knowledge fragments selected through re-sorting in step S4 into structured, actionable fault diagnosis suggestions.
[0053] (1) Construction of dynamic prompt word template Employing a "retrieval result injection" technique, the knowledge fragments obtained in previous steps are assembled with the user's question into the following structured prompts. To enhance the logical consistency of the reasoning, this invention embeds chain-like thinking instructions into the dynamic prompts: A. Character setting: "You are a senior operation and maintenance expert with 20 years of experience in hydropower stations, meticulous and professional."
[0054] B. Task Instructions: Please answer the user's troubleshooting questions based on the reference materials provided below.
[0055] Please follow the logic of "thinking step by step" when reasoning: Step 1: Analyze the potential equipment components corresponding to the fault symptoms; Step 2: Select matching procedural clauses or historical cases from the reference materials; Step 3: Make a comprehensive judgment on the most likely root cause; Step 4: Provide step-by-step troubleshooting and handling suggestions.
[0056] C. Reference: Top-5 ranking results from step S4.
[0057] D. Constraints: a. Factual constraints: Answers must be based strictly on the reference materials; fabrication based on association is strictly prohibited.
[0058] b. Rejection Mechanism: If the reference materials are insufficient to support the answer, please directly output "The current knowledge base is insufficient, and it is recommended to manually consult the manufacturer's manual".
[0059] c. Format requirements: The answer must include three parts: the cause of the problem, the suggested solution, and the source of the information.
[0060] E. User troubleshooting issues: The user initiates a request.
[0061] (2) Large-scale model reasoning and anti-hallucination generation The assembled prompts are input into a large language model base deployed on a private cloud.
[0062] A. Model Selection: In this embodiment, DeepSeek-7B is selected to adapt to the computing resources of the power plant's local server.
[0063] B. Reasoning Process: The model follows the CoT instructions in the prompt words, first performing logical deduction internally, and then generating the final text. This mechanism can significantly reduce the probability of the model "talking nonsense in a seemingly serious manner".
[0064] (3) Citation tracing To address the "black box" problem, the system performs post-processing on the generated results: A. Anchor Marking: The system automatically parses the model output to ensure that each diagnostic suggestion is accompanied by a superscript.
[0065] B. Original document jump: When displayed on the front end, users can click the badge to highlight the corresponding original procedure document or case paragraph in the sidebar, realizing two-way verification of "diagnostic suggestions - original vouchers" and ensuring the safety and compliance of operation and maintenance.
[0066] Step S5: Diagnostic suggestion output and visualization interaction The final results are displayed on the front end, and the diagnostic process is archived to the log database for subsequent model fine-tuning and auditing. This step aims to present the complex reasoning results to operations personnel in an intuitive and user-friendly way and to complete data archiving.
[0067] (1) Presentation of multimodal results: A. Text suggestion: Display the structured diagnostic report generated in step S5 on the front-end interface (this example uses Vue.js).
[0068] B. Citation Highlighting: Parses citation markers in the text, supports hovering the mouse to display the original text summary, or clicking to jump to the PDF document viewer on the right to highlight the corresponding procedure clauses.
[0069] C. Graph Linkage: Utilizes D3.js to render local knowledge graphs related to faults. For example, when a report mentions "thrust bearing," the interface simultaneously displays a node topology graph centered on "thrust bearing," intuitively revealing its associated components and historical fault records.
[0070] (2) Diagnostic log archiving: The system encapsulates all data from this session (including user requests, recall context, prompt word templates, model returns, and time consumption statistics) into JSON format.
[0071] Data is stored in relational databases or time-series databases, forming an electronic "fault diagnosis".
[0072] Step S6: Feedback Learning and Continuous Optimization This step aims to establish a feedback mechanism for continuous optimization, address the issue of outdated knowledge base information, and enable the system to grow adaptively.
[0073] (1) Expert feedback and ternary precipitation In the front-end interactive interface, the system sets explicit feedback components (such as "Accept", "Accept after modification", "Inaccurate").
[0074] A. Positive Feedback: If the operator clicks "Accept", the system automatically captures the current <user question, model answer, quoted paragraph> to form a standard question-answer pair, and marks it as a "high confidence sample" and stores it in the log database.
[0075] B. Negative Feedback: If the user selects "Adopt after modification," the system will record the expert's revised text as a golden dataset for subsequent model fine-tuning. If the operations and maintenance personnel mark the diagnosis as "inaccurate," the system will mark the generated <question, answer> as a negative sample for subsequent model preference alignment training, preventing the spread of erroneous knowledge.
[0076] (2) Dynamic updates and policy routing The system employs a tiered storage strategy to utilize the aforementioned feedback data: A. Building a high-frequency question-and-answer database: For high-quality questions and answers verified by experts, the system indexes them independently into the FAQ database. In the subsequent retrieval process (step S4), the system sets the highest priority route—that is, it prioritizes matching the FAQ database. If a match is found, the standard answer is output directly, skipping the large model inference, thereby significantly reducing response latency and computing power consumption.
[0077] B. Incremental Knowledge Base Updates: For newly occurring fault cases or updated procedure documents, the system automatically triggers the processing flow from steps S1 to S3 via scheduled tasks. After cleaning, splitting, and vectorizing, the new data is injected into the vector database incrementally, without requiring system downtime to rebuild the index, ensuring the timeliness of knowledge.
[0078] Example 3 Based on the text understanding and reasoning-based hydropower station equipment fault diagnosis and control method described in Embodiment 2, to ensure the accuracy of the knowledge input into the large model, and considering the complex document formats, numerous scanned documents, and strong logical hierarchies characteristic of the hydropower industry, this invention employs a specific deep cleaning and preprocessing strategy in steps S1 to S2 above, such as... Figure 3 The specific implementation is as follows: I. Deep Document Cleaning Based on OCR and Regular Expressions Given that most historical maintenance manuals and accident reports for hydropower stations are paper scans (PDFs / images), the system incorporates an OCR (Optical Character Recognition) engine (preferably PaddleOCR or Tesseract in this embodiment) to first extract text from the images. Then, a pre-defined regular expression library is used for noise filtering, with specific rules including: (1) Remove headers and footers: By detecting fixed pixel areas or specific keywords (such as "for internal reference only" or "page X") at the top and bottom of the page, use regular expression matching to remove irrelevant characters and prevent them from truncating the semantics.
[0079] (2) Remove garbled text and watermark: Identify and remove consecutive meaningless special symbols (such as "###", "@@@") and interference noise generated by scanning watermark.
[0080] II. Semantic Chunking-based Dynamic Segmentation Conventional text retrieval systems often employ fixed-length windows (e.g., hard truncation every 500 characters), which ignores the logical coherence within a document. When processing hydropower technical regulations with significant structured features, this mechanical segmentation can easily lead to the "fault phenomenon description" and "contingency plan" being split into adjacent heterogeneous blocks, thus causing a break in the core logical chain.
[0081] To address the strong hierarchical progression characteristic of hydropower regulations (e.g., the logical association from "1.2.3 Fault Phenomena" to "1.2.4 Handling Measures"), this invention designs a dynamic semantic encapsulation algorithm with hierarchical awareness capabilities. (See attached diagram) Figure 3 As shown, this algorithm abandons the traditional fixed character counting mode and instead utilizes hierarchical identifier recognition technology for deep document parsing. By capturing chapter titles, sequence numbers, and logical breakpoints, it automatically clusters fault mechanisms, phenomena, and contingency plans belonging to the same logical loop and encapsulates them within the same semantic slice. This strategy ensures the integrity of knowledge units during the retrieval stage, thus providing continuous and lossless contextual information for subsequent accurate reasoning by the large language model.
[0082] (1) Hierarchical perception and recognition: The system scans the text sequence in real time. When the regular expression matches the chapter title feature (such as "1.2.3" or "(II)"), it is determined as a logical breakpoint. The algorithm uses regular expressions to prioritize the recognition of chapter titles and serial numbers in the document.
[0083] (2) Dynamic truncation: If a new chapter title is encountered, the current slice is forcibly ended to ensure that the stored knowledge blocks are logically independent and complete; if no title is encountered but the number of words exceeds the model limit, a secondary slice is performed.
[0084] (3) Logic unit encapsulation: The system does not use word count as a single truncation standard, but forces the "phenomenon description", "cause analysis" and "processing steps" belonging to the same chapter to be encapsulated in a complete slice. For example, ensure that the definition of "stator grounding" and its corresponding "tripping logic" are in the same slice.
[0085] (3) Overlapping window injection mechanism: To ensure the continuity of the context, a 10%-15% text overlap window is set between adjacent slices. For example... Figure 5 As shown in the yellow nodes, when generating a new slice, the system automatically backtracks and extracts the last 10%-15% of the text from the previous node, concatenating it to the beginning of the current slice. This mechanism ensures that the semantics across slices (such as "the above failure was caused by...") remain coherent, avoiding context loss during vector retrieval. For example, the last 200 characters of the previous slice will repeat at the beginning of the next slice. This effectively avoids semantic loss caused by the segmentation point being located precisely in the middle of a key sentence.
[0086] Example 4 The core logic of the intelligent agent-driven search architecture of the system based on the text understanding reasoning-based operating condition fault diagnosis and control method for hydropower station equipment described in Embodiment 1 is as follows: like Figure 4As shown, the closed-loop interaction sequence and deep inference logic of the agent-driven search architecture are illustrated in detail: I. Offline Knowledge Consolidation Stage (1) Logical unit encapsulation: The original document is not mechanically divided into fixed lengths, but the aforementioned hierarchical perception segmentation strategy is adopted to encapsulate the phenomena, causes and countermeasures in the procedure into semantic chunks with logical integrity, and retain 10%-15% of the overlapping window to maintain the continuity of the context tensor.
[0087] (2) Multidimensional vectorization: Using an embedding model fine-tuned from hydropower corpus, semantic slices are mapped to a high-dimensional vector space and persistently stored in a vector database to build a hierarchical knowledge index.
[0088] II. Online Intelligent Reasoning Stage (1) Intent parsing and operating condition perception: After the system receives the fault description input by the user, the agent first performs intent recognition and combines real-time operating condition parameters to perform logical gating filtering and dynamically lock the subset of diagnostic paths that are valid under the current operating condition.
[0089] (2) Hybrid retrieval and multidimensional reordering: A dual-path recall mechanism of "vector semantic retrieval + keyword precise retrieval" is launched. For the candidate set of the initial recall, a cross-encoder is introduced to perform deep interactive computation to solve the semantic drift problem that may be caused by simple vector retrieval, and to ensure that the evidence paragraphs are highly aligned with the fault phenomena.
[0090] (3) Prompt Engineering: The agent uses the selected Top-K high-confidence evidence paragraphs as "fact knowledge context" and performs semantic reorganization and injection with the user's question request according to a specific expert role template.
[0091] (4) CoT reasoning-guided generation: After receiving the prompt words, the large language model activates its built-in Chain of Thought (CoT) reasoning engine. Combining professional background knowledge, it performs step-by-step reasoning, generating interpretable diagnostic results with strong causal logic while suppressing logical illusions.
[0092] (5) Transparent Citation Tracing: The system automatically marks citation anchors (such as [Procedure 5.2]) in the generated diagnostic suggestions. Users can directly jump to the original document source to achieve two-way closed-loop verification between diagnostic suggestions and standard procedures, ensuring the security and compliance of operation and maintenance decisions.
[0093] Example 5 Based on the text understanding and reasoning-based fault diagnosis and control method for hydropower station equipment under operating conditions described in Examples 1-4, the effectiveness of this method is verified. A specific application scenario is described below: Scenario description: The monitoring system of a hydropower station reported a signal that "the stator coil temperature of Unit 3 is too high".
[0094] (1) User question: The operator entered the following in the system dialog box: "The stator temperature of Unit 3 exceeds 100 degrees Celsius. How should this be handled?" (2) System processing: A. Search: The hybrid search module retrieved the provisions on "stator temperature limits" in Chapter 4 of the operating procedures (semantic matching) and the historical case of "stator temperature rise caused by air cooler failure of Unit 3" in 2021 (keyword matching).
[0095] B. Re-ranking: The re-ranking model determines that historical cases are highly relevant to the current problem and ranks them first.
[0096] Result generated: Large model output: "According to Article 4.2 of the Operating Procedures, the stator coil temperature alarm value is 100℃, and the trip value is 130℃. The alarm value has been reached. Referring to historical cases from 2021, it is recommended to prioritize the following investigations:" A. Check if the inlet and outlet water valves of the air cooler are fully open; B. Check if the cooling water flow and water pressure are normal; C. Confirm whether the temperature measuring resistor is reporting a false alarm (compare with the temperatures of other phases).
[0097] Please closely monitor the temperature trend. If it continues to rise to 125℃, you should request a load reduction or shutdown. Value proposition: The system provides suggestions within 30 seconds, including procedural guidelines and practical experience, which is significantly more efficient than manually reviewing paper documents.
[0098] The above description, in conjunction with the accompanying drawings and embodiments, provides a detailed account of the specific implementation of the present invention. However, the present invention is not limited to the above-described embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art can make various modifications, equivalent substitutions, or combinations to the implementation form, parameter settings, and application scenarios of specific modules, and all such modifications or substitutions should fall within the protection scope of the present invention.
Claims
1. A method for fault diagnosis and control of hydropower station equipment based on text understanding and reasoning, characterized in that, Includes the following steps: S1. Deep aggregation and cleaning of multi-source heterogeneous data: Aggregate historical operation data of hydropower stations, equipment manuals, fault cases and expert knowledge, and perform optical character recognition and regular expression cleaning on multi-source heterogeneous corpus. S2. Construct a vertical knowledge graph for the hydropower field, extract entities and normalize relations from the cleaned corpus, construct a knowledge graph containing core entities in the hydropower field, and store it in a graph database; S3. Construct a hybrid retrieval index by segmenting the corpus and building a semantic index based on dense vectors and a sparse inverted index based on keywords to form a hybrid retrieval library; S4. Agent-driven dynamic retrieval and reordering to filter out high-confidence evidence paragraphs; S5. Based on logical chain-guided interpretable diagnosis generation, the selected evidence paragraphs and the original questions are recombined into prompt words and input into the large language model. The chain-like thinking reasoning engine generates diagnostic suggestions containing citation tracing for the activated path and performs output suppression on the diagnostic path in the frozen state. S6. Feedback loop and continuous evolution: Present diagnostic suggestions to the user and incrementally update the knowledge base based on user feedback.
2. The method for fault diagnosis and control of hydropower station equipment based on text understanding and reasoning according to claim 1, characterized in that, The cleaning of multi-source heterogeneous data in step S1 specifically includes: using regular expressions to identify the chapter hierarchy and logical breakpoints of the document, performing clustering and aggregation on the fault phenomena, fault causes and handling measures belonging to the same logical unit, and encapsulating them in the same semantic slice; Overlapping windows are set between adjacent semantic slices to ensure the continuity of contextual semantics during the retrieval process.
3. The method for fault diagnosis and control of hydropower station equipment based on text understanding and reasoning according to claim 1, characterized in that, The knowledge graph of core entities in the hydropower field in step S2 includes five categories of core entities: equipment, faults, symptoms, causes, and handling methods. By using a pre-trained language model, we extract the relationships between "device-components", "component-occurrence-failure", "failure-manifestation-symptoms", "failure-cause-consequences", and "failure-solution-operation" from unstructured text, and construct a structured fault reasoning network.
4. The method for fault diagnosis and control of hydropower station equipment based on text understanding and reasoning according to claim 1, characterized in that, The agent-driven constraint retrieval and reordering in step S4 specifically includes: The retrieval boundary is dynamically defined by the intelligent agent based on the diagnostic path of the current activation state; The high-dimensional vector index built by the pre-trained embedding model and the sparse index built based on the BM25 algorithm are used in parallel to perform dual-path recall; A cross-encoder is introduced to perform deep interactive calculations between the recall results and user questions, and the top-K high-confidence evidence segments are extracted based on the relevance score.
5. The method for fault diagnosis and control of hydropower station equipment based on text understanding and reasoning according to claim 1, characterized in that, The prompts in step S5 include character settings, task instructions, reference materials, and constraints. The task instructions include chain-like thinking guidance instructions, requiring the model to perform fault location identification, procedure matching, cause judgment and suggestion generation step by step; The constraints include requiring the model to answer only based on references, and in the generated diagnostic suggestions, the original reference source corresponding to each suggestion is marked by citation anchors.
6. The method for fault diagnosis and control of hydropower station equipment based on text understanding and reasoning according to claim 1, characterized in that, The feedback loop in step S6 specifically includes: Set up an adoption and correction interface on the user side. When a user adopts a diagnostic suggestion, the system stores the question and answer pair in the high-frequency question and answer database and assigns the highest priority to this logical path in subsequent searches. When the system acquires new fault cases, it transforms them into semantic slices through an offline processing flow and injects them into the vector database, thereby enabling the adaptive growth and evolution of the knowledge base.
7. The method for fault diagnosis and control of hydropower station equipment based on text understanding and reasoning according to claim 1, characterized in that, The specific method for semantic indexing of dense vectors in step S3 is to use a pre-trained embedding model finely tuned with hydropower domain corpus to convert the segmented text blocks into high-dimensional vectors and store them in a vector database. Dense vectors mainly capture the deep semantic information of the text. The specific method for the sparse inverted index in step S3 is to construct an inverted index for the corpus using the BM25 algorithm, focusing on the precise literal matching capability of device numbers and proper nouns.
8. The method for fault diagnosis and control of hydropower station equipment based on text understanding and reasoning according to claim 4, characterized in that, The dual-path recall specifically includes: The system first initiates two independent searches in parallel for the user-input question: Path 1 is vector retrieval, which calls a pre-trained model to convert the fault description into vectors and finds the paragraph with the closest semantic space distance in the vector library; Path 2 is keyword retrieval, which uses the BM25 algorithm to search for paragraphs containing specific terms in the inverted index; The two results are merged, and the system extracts the top 20 results from each of the two search results, takes the union of the results and removes duplicates to form a candidate knowledge set.
9. The method for fault diagnosis and control of hydropower station equipment based on text understanding and reasoning according to claim 1, characterized in that, In step S5, when the equipment operating condition parameters change and the engineering conditions for the frozen diagnostic path are met again, the operating condition logic gating operator automatically switches the corresponding diagnostic path from the frozen state to the active state, removes the retrieval and inference shield, and allows it to re-participate in the online diagnostic process.
10. A system for implementing the method as described in any one of claims 1-9, characterized in that, It includes the data source layer, data processing layer, knowledge storage and indexing layer, core engine layer, and application interaction layer; The data source layer includes unstructured documents, structured data, semi-structured data, and an expert experience base; The data processing layer includes a cleaning module, an entity extraction module, and a vector embedding module; The knowledge storage and indexing layer includes a vector database and a graph database; The core engine layer includes a fault diagnosis path state control module, an agent-driven search architecture, and a large language model. The application interaction layer includes providing users with a visual interface via web or mobile devices, supporting intelligent question and answer, fault report generation, and expert feedback functions.