A method and system for reasoning and generating a disposal scheme for a fault case of operation and maintenance of a hydropower plant

CN122903777APending Publication Date: 2026-10-13HUANENG LANCANG RIVER HYDROPOWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610800131.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-04
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

不过专家知识的获取和更新比较困难,而且知识库的规模和覆盖范围也有限

Benefits of technology

[0016]本发明实施例的方法、系统及存储介质,能够提高水电厂运维故障推理的准确性和处置方案生成的效率,减少故障处理时间,提升运维安全性和自动化水平。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903777A_ABST
    Figure CN122903777A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of hydropower plant operation and maintenance fault processing, and particularly relates to a hydropower plant operation and maintenance fault case reasoning and disposal scheme generation method and system. The method first integrates multi-source knowledge of historical fault cases of the hydropower plant, equipment operation and maintenance manuals and safety regulations to construct a domain knowledge graph; entities and relationships in the domain knowledge graph are converted into structured prompt information to form a knowledge-enhanced large model adapted to the hydropower plant operation and maintenance scene; real-time data and context information of the current fault of the hydropower plant are collected, a fault feature vector is extracted, and the fault feature vector is input into the knowledge-enhanced large model to conduct similar case retrieval and causal reasoning in combination with the domain knowledge graph; if the similarity of the initial reasoning result does not reach the expectation, the similar case retrieval is re-conducted; a preliminary disposal scheme is generated based on the reasoning result, compliance is verified, if the compliance is not passed, the knowledge-enhanced large model is adjusted in details, and if the compliance is passed, a final scheme is output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hydropower plant operation and maintenance fault handling technology, and in particular to a method and system for generating hydropower plant operation and maintenance fault case reasoning and handling solutions. Background Technology

[0002] In the daily operation of hydropower plants, numerous and complex pieces of equipment inevitably experience various malfunctions. If these malfunctions are not handled promptly and accurately, they can not only affect the normal power generation of the hydropower plant but may even lead to safety accidents, causing serious economic losses and social impact. Traditional troubleshooting methods often rely on the experience of maintenance personnel and simple fault manuals, which significantly reduce efficiency and accuracy when facing complex or newly emerging fault types.

[0003] In the field of hydropower plant operation and maintenance fault case reasoning and response solution generation, several common related technical solutions have certain shortcomings. Traditional rule matching methods rely on preset rules to determine faults and generate response solutions. The obvious drawback of this method is that the rules are pre-defined and it's difficult to cover all fault scenarios; it may fail to provide effective solutions for complex or newly emerging faults. Case analogy methods compare the current fault with historical cases to find the response solution for the most similar case. However, this method is highly dependent on historical cases; if historical cases are incomplete or lack similar cases, the reasoning will be inaccurate. Expert systems rely on expert knowledge and experience to build a knowledge base for reasoning. However, acquiring and updating expert knowledge is difficult, and the size and coverage of the knowledge base are limited. Machine learning algorithms, such as decision trees and support vector machines, while capable of handling large amounts of data, do not delve deeply enough into the causal relationships of faults and have poor interpretability. Summary of the Invention

[0004] The present invention aims to at least partially solve one of the technical problems in the related art.

[0005] Therefore, the first objective of this invention is to propose a method for reasoning and generating solutions for hydropower plant operation and maintenance failure cases, comprising the following steps:

[0006] S1 integrates multi-source knowledge from historical failure cases of hydropower plants, equipment operation and maintenance manuals, and safety procedures to construct a domain knowledge graph that includes failure types, causal relationships, and handling procedures. S2, transform the entities and relationships in the domain knowledge graph into structured prompt information, or inject domain knowledge into the large model through knowledge distillation to form a knowledge-enhanced large model adapted to the operation and maintenance scenario of hydropower plants; S3. Collect real-time data and contextual information of the current fault of the hydropower plant, extract the fault feature vector, and input the fault feature vector into the knowledge-enhanced large model. Combine the domain knowledge graph to perform similar case retrieval and causal reasoning. If the similarity of the initial reasoning result does not meet expectations, expand the related entities in the domain knowledge graph and retrieve them again. S4. Generate a preliminary handling plan based on the reasoning results, and verify compliance by combining the operation and maintenance procedures and security rules in the domain knowledge graph. If it fails, return to the knowledge-enhanced large model to adjust the details. If it passes, output the final plan.

[0007] In one embodiment of the present invention, S1 includes: S11, perform structured preprocessing on multi-source heterogeneous data, in which key fields of historical fault cases are extracted using regular expressions, including fault equipment codes, fault phenomenon descriptions and timestamps, to form an initial event set; S12, the equipment operation and maintenance manual extracts operational constraints through dependency parsing and establishes an action-state mapping; S13, The safety procedure text uses the BERT model for entity recognition.

[0008] In one embodiment of the present invention, the loss function used by the BERT model is: ; in, It is the first The context vector of each word, It is its physical label. Given the sequence length, the identified entities include device type. Risk level and processing time limit .

[0009] In one embodiment of the present invention, after performing structured preprocessing on the multi-source heterogeneous data as described in step S11, a knowledge fusion stage is further included to resolve entity ambiguity issues: Define the entity alignment similarity function: , in For entity embedding vectors, The Jaccard similarity coefficient. For weighted hyperparameters; through cross-source evidence chains Verify consistency of entity references, when Establish a unique ID for the entity at the time. This is the evidence threshold.

[0010] In one embodiment of the present invention, S2 includes: S21. Extract key entities and relationships from the hydropower plant operation and maintenance knowledge graph, use a graph neural network for entity embedding representation, and use the TransE model to calculate entity vectors. The entity vectors are represented as follows: , in Represents the head entity embedding vector. Represents the relation embedding vector. Represents the tail entity embedding vector; S22, based on the embedded results, designs a dynamic prompt template, serializes entities and relationships into text format, and processes the prompt text through the BERT encoder to generate a structured representation.

[0011] In one embodiment of the present invention, after performing entity embedding representation using a graph neural network, a knowledge distillation process is further included: S211, a knowledge graph-based graph convolutional network is pre-trained as a teacher model, which outputs a soft target probability distribution; S212, Train the student model to minimize the distillation loss and the task loss. The distillation loss function is defined as: , in This represents the Kullback-Leibler divergence loss. For the softmax function, It is the temperature coefficient. and These are the output probabilities of the teacher and student models, respectively. For real labels, For cross-entropy loss, Control distillation weight; S213, after distillation, performs domain-specific fine-tuning on the large model, applying a domain-adaptive layer using a hydropower plant-specific dataset: , in As the base model output, For the domain feature vector, To adapt to the weight matrix, the overall loss is optimized during fine-tuning. , For domain classification loss, It is a balance parameter.

[0012] In one embodiment of the present invention, S3 includes: S31, the fault feature vector is input into the knowledge-enhanced large model. The large model uses a Transformer-based encoder architecture to process the input and generate query embedding vectors. S32, integrate the query embedding vectors into the knowledge graph, and use graph neural networks to precompute the graph embedding of the entity subgraph associated with each case in the knowledge graph; S33, calculate the cosine similarity between the query and the cases, and sort them based on the cosine similarity, selecting the top-ranked cases. As a candidate set; S34, using the causal reasoning module to analyze top- The case study, combined with the causal chain in the knowledge graph, uses the decoder component of the large model to input the case embedding and associated entities, and outputs a vector of failure cause or solution.

[0013] In one embodiment of the present invention, S4 includes: S41, use a pre-trained large language model to process the input inference results, and the model outputs the probability distribution of candidate solutions; S42, combined with knowledge graph Verify compliance and define the compliance scoring function: , in It is a constraint set. To constrain The weighting coefficients, It is an indicator function that indicates when a candidate solution satisfies the constraints. The value is 1 if the condition is met and 0 otherwise. The score is then calculated and compared with a preset threshold. In comparison, if The solution is compliant; otherwise, it is deemed unqualified. S43, if the compliance check fails, calculate the compliance loss function, derive the parameter gradient, and return the adjustment details, including the gradient vector and update direction; S44. If the compliance verification is passed, the final candidate solution is directly output as the formal disposal solution, and it is encapsulated in a structured output format containing execution steps and compliance basis. A final consistency check is performed before output.

[0014] To achieve the above objectives, a second aspect of the present invention provides a system for generating reasoning and handling solutions for hydropower plant operation and maintenance fault cases, comprising: The knowledge graph construction module is used to integrate multi-source knowledge such as historical failure cases of hydropower plants, equipment operation and maintenance manuals and safety procedures to build a domain knowledge graph that includes failure types, causal relationships and handling procedures. The large model knowledge enhancement module is used to transform entities and relationships in the domain knowledge graph into structured prompt information, or to inject domain knowledge into the large model through knowledge distillation to form a knowledge-enhanced large model adapted to the operation and maintenance scenario of hydropower plants. The fault reasoning retrieval module is used to collect real-time data and contextual information of the current fault in the hydropower plant, extract fault feature vectors, and input the fault feature vectors into the knowledge-enhanced large model. It combines the domain knowledge graph to perform similar case retrieval and causal reasoning. If the similarity of the initial reasoning result does not meet expectations, it expands the related entities in the domain knowledge graph and re-retrieves them. The solution generation and verification module is used to generate a preliminary handling solution based on the reasoning results, and verify its compliance by combining the operation and maintenance procedures and security rules in the domain knowledge graph. If it fails, it returns the knowledge-enhanced large model to adjust the details. If it passes, it outputs the final solution.

[0015] To achieve the above objectives, a third aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.

[0016] The methods, systems, and storage media of this invention can improve the accuracy of fault reasoning in hydropower plant operation and maintenance and the efficiency of generating handling solutions, reduce fault handling time, and enhance operation and maintenance safety and automation levels.

[0017] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0018] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of a method for generating reasoning and handling solutions for hydropower plant operation and maintenance fault cases according to an embodiment of the present invention; Figure 2 This is a structural diagram of a hydropower plant operation and maintenance fault case reasoning and handling scheme generation system according to an embodiment of the present invention. Detailed Implementation

[0019] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0020] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0021] The following describes, with reference to the accompanying drawings, a method and system for generating reasoning and handling solutions for hydropower plant operation and maintenance fault cases, according to an embodiment of the present invention.

[0022] Example 1 like Figure 1 As shown, this invention discloses a knowledge-enhanced large model-assisted method for reasoning and generating solutions for hydropower plant operation and maintenance fault cases. The steps of this method include: [Step 1]: Integrate multi-source knowledge, including historical fault cases from hydropower plants, equipment operation and maintenance manuals, and safety procedures, to construct a domain knowledge graph that includes fault types, causal relationships, and handling procedures. The specific implementation method for this step is as follows: Multi-source heterogeneous data requires structured preprocessing. Historical fault cases are analyzed using regular expressions to extract key fields, including faulty device codes. Description of the fault phenomenon timestamp To form the initial event set The equipment operation and maintenance manual extracts operational constraints through dependency parsing and establishes an action-state mapping. ,in Indicates a maintenance action. This indicates the target state of the equipment. The safety procedure text uses the BERT model for entity recognition, with the loss function being:

[0023] here It is the first The context vector of each word, It is its physical label. This is the sequence length. The identified entities include device type. Risk level Time limit for handling Core elements such as...

[0024] The knowledge fusion phase needs to address entity ambiguity. Define an entity alignment similarity function:

[0025] in For entity embedding vectors, The Jaccard similarity coefficient. This is a weighted hyperparameter. It is obtained through a cross-source evidence chain. Verify consistency of entity references, when Establish a unique ID for the entity at the time. This is the evidence threshold.

[0026] The graph was constructed using RDF triples for storage. Fault causal relationships were modeled using Bayesian networks.

[0027] Represents the variable indicating the faulty node. It is its set of parent nodes, conditional probability table Calculated based on historical fault co-occurrence frequency. The handling process is modeled as a time-series logic rule:

[0028] for The system state vector at any given time. For handling actions, This is a safety procedure constraint function. Finally, node relationship storage and path lookup are implemented using the Neo4j graph database.

[0029] [Step 2]: Transform the entities and relationships in the knowledge graph into a structured prompt, or inject domain knowledge into the large model through knowledge distillation to form a knowledge-enhanced large model adapted to the hydropower plant operation and maintenance scenario. The specific implementation method for this step is as follows: Key entities (such as turbines, valves, and sensors) and relationships (such as failure modes, maintenance history, and associated equipment) are extracted from the hydropower plant's operation and maintenance knowledge graph. Entity embedding representations are then performed using graph neural networks, for example, the TransE model is used to calculate entity vectors. .in, This represents the embedding vector of the head entity (e.g., a water turbine). Represents a relation embedding vector (e.g., "maintained in"), This represents the tail entity embedding vector (e.g., a maintenance record); this embedding process ensures that semantic relationships between entities are captured and used as input features to construct a structured prompt. Based on the embedding results, a dynamic prompt template is designed to serialize entities and relationships into text format, such as "Entity: ;relation: ; Context: Hydropower plant parameters, where and These refer to specific entity and relation identifiers, respectively. The prompt text is processed by the BERT encoder to generate a structured representation: , This is the vector output of the prompt, used as input for subsequent models.

[0030] The knowledge distillation process is implemented by pre-training a teacher model (e.g., a graph convolutional network based on a knowledge graph) that outputs a soft target probability distribution. A student model (e.g., GPT-3) is trained to minimize both the distillation loss and the task loss. The distillation loss function is defined as:

[0031] here, This represents the Kullback-Leibler divergence loss. For the softmax function, It is the temperature coefficient (scaled output distribution). and These are the output probabilities of the teacher and student models, respectively. For real labels, For cross-entropy loss, The distillation weights are controlled (range [0,1]). This loss ensures that the student model inherits the teacher's knowledge generalization ability.

[0032] To adapt to the operation and maintenance scenario of hydropower plants, domain-specific fine-tuning is performed on the large model after distillation. A domain-adaptive layer is applied using hydropower plant-specific datasets (such as fault logs and sensor time-series data).

[0033] in As the base model output, These are domain feature vectors (extracted from the dataset). To adapt to the weight matrix, fine-tuning optimizes the overall loss:

[0034] For domain classification loss, These are the balancing parameters. Ultimately, the model converges through iterative training, outputting knowledge-enhanced predictions (such as fault diagnosis) to ensure efficient operation and maintenance in low-resource hydropower plant environments.

[0035] [Step 3]: Collect real-time data (such as equipment temperature, vibration values, and alarm codes) and contextual information (such as operation and maintenance records and environmental parameters) of the current fault at the hydropower plant, and extract the fault feature vector. The specific implementation method of this step is as follows: Real-time acquisition of equipment temperature sequences from hydropower plant monitoring systems (such as SCADA) ( , (Number of sampling points), vibration amplitude sequence and discrete alarm codes Simultaneously, contextual information is retrieved from the database, including the most recent maintenance timestamp from the operations and maintenance records. and number of faults and environmental parameters such as ambient temperature and humidity Data preprocessing includes: cleaning outliers and missing data, filling them with linear interpolation; and normalizing the numerical data to the [0,1] range using the following formula: ,in These are the original data points. It is the entire data sequence. and These represent the minimum and maximum values ​​of the sequence, respectively, to ensure consistent feature scales.

[0036] Regarding temperature data (After normalization), extract time-domain statistical features: calculate the mean. Sum of standard deviation:

[0037] Reflects average temperature level, This indicates the degree of temperature fluctuation. For vibration data... In addition to statistical features, frequency domain analysis is added: the Fast Fourier Transform (FFT) is applied to calculate the spectrum.

[0038] in It is the total number of samples. It is a frequency index. The imaginary unit, It is the natural constant; then the dominant frequency is extracted:

[0039] , It is the sampling frequency (unit: Hz). Identify the main frequency components of the vibration. Alarm code. Treat the variables as categorical variables and convert them into binary feature vectors using one-hot encoding. For example, if the code has 3 states, a 3-dimensional binary vector will be generated.

[0040] Integrate all features to construct a fault feature vector Temperature characteristics Vibration characteristics ( and For vibration mean and standard deviation), alarm coding features, and contextual features such as (Maintenance time converted to days from now) and , (Using normalized values ​​directly) concatenate to form a high-dimensional vector:

[0041] in This indicates a transpose operation, ensuring consistent vector dimensions for subsequent machine learning model input. Feature extraction must be completed in a real-time system with millisecond-level latency, and online fault diagnosis should be supported.

[0042] [Step 4]: Input the fault feature vector into the knowledge-enhanced large model, and combine it with the knowledge graph to perform similar case retrieval and causal inference. If the initial inference result does not achieve the expected similarity, expand the related entities in the knowledge graph and retrieve them again. The specific implementation method of this step is as follows: Fault feature vector The large knowledge-enhanced model is input, in which Represents a d-dimensional feature vector, each This corresponds to a specific fault indicator value (such as abnormal temperature or voltage fluctuation). The large model employs a Transformer-based encoder architecture. Process the input and generate query embedding vectors Here, m is the embedding dimension (typically m=768). This process fuses dependencies between features through an attention mechanism, ensuring that the vector representation captures fault semantics. Knowledge Graph The graph is integrated, where V is a set of entity nodes (such as equipment parts or fault types) and E is a relation edge (such as "causes" or "related_to"). When the system retrieves similar historical cases, each case c is associated with an entity subgraph, and its graph embedding is pre-computed. Using a graph neural network (GNN), calculate the cosine similarity between the query and the case:

[0043] in This represents the dot product operation. s_c is the L2 norm, used to quantify the angle between vectors; s_c ranges from [-1, 1], with higher values ​​indicating greater similarity. Based on s_c, the top-k cases (k=5) are selected as the candidate set for subsequent inference.

[0044] The causal reasoning module analyzes the top-k cases, combining causal chains in the knowledge graph (such as "leads_to" relationships between entities). The reasoning process utilizes the decoder component of the large model. Input case embeddings and associated entities, output a vector of failure causes or solutions. ,in This represents the inference result. This module employs a multi-hop inference mechanism, traversing the graph path to infer potential causality, such as inferring "component_failure" from the entity "overheating". It evaluates whether the initial retrieval similarity reaches the expected threshold: calculating the maximum similarity score. and with a predefined threshold Comparison (e.g.) (Based on domain calibration). If This indicates insufficient similarity.

[0045] Expand the knowledge graph to associate entities to enhance retrieval coverage. Initial entity set. Originating from query-related entities (such as entities mapping fault characteristics). The extended operation is defined as:

[0046] Where v is the neighbor entity and r is the relation type (e.g., "associated_with"), this step adds all one-hop neighbor entities to enrich the context. The case embedding is then recalculated. Using the updated entity set, re-embed through the GNN process Repeat similarity calculation:

[0047] And select new top-k cases, iterating until... Or it can reach the maximum expansion depth (default depth=2). The entire process ensures dynamic optimization of the knowledge scope when the similarity is low.

[0048] [Step 5]: Generate a preliminary handling plan based on the reasoning results, and verify its compliance by combining the operation and maintenance procedures and security guidelines in the knowledge graph. If it fails, return to the larger model to adjust the details. If it passes, output the final plan. The specific implementation method of this step is as follows: A preliminary handling plan is generated based on the reasoning results. A pre-trained large-scale language model is used to process the input reasoning results. ,in This represents text or structured data obtained from upstream tasks. The model outputs a probability distribution of candidate solutions. ,here Representing possible treatment options, It is the set of adjustable parameters for the model. The optimal solution is selected by maximizing the probability. ,Right now This process utilizes the model's contextual understanding capabilities to generate preliminary solutions, ensuring their initial feasibility. Model parameters. Optimize by training with historical data to improve generation accuracy.

[0049] Compliance is verified using knowledge graphs. Store the set of operational procedures and security criteria constraints representing entity relationships. Define the compliance scoring function. ,in It is a constraint set. To constrain The weighting coefficient (reflecting importance). It is an indicator function, when the scheme Satisfying constraints The value is 1 if the condition is met, and 0 otherwise. After calculating the score, it is compared with a preset threshold. In comparison, if The solution is compliant if it passes the test; otherwise, it is deemed non-compliant. Threshold Based on the experience of domain experts, the score is typically set at 80% of the total possible scores. The verification process is implemented through graph database queries, efficiently matching solution details with graph rules.

[0050] If the compliance check fails, return the adjustment details to the larger model. Calculate the compliance loss function. ,in Quantization scheme bias. Derivation of parameter gradients. , indicating the loss with respect to model parameters The partial derivatives. Returning the adjustment details includes the gradient vector and update direction. ,here It is the learning rate coefficient (ranging from 0.01 to 0.1), which guides the iterative optimization of the model. To minimize losses, this feedback mechanism ensures that compliance constraints are incorporated into the model in subsequent generation rounds.

[0051] If the compliance verification is passed, the final solution will be output directly. This serves as the official handling plan. After double verification, the plan is encapsulated in a structured output format, such as JSON or XML, containing execution steps and compliance justification. A final consistency check is performed before output to ensure no omissions or risks. The entire process is executed in an automated pipeline, with latency controlled within milliseconds, making it suitable for real-time operation and maintenance scenarios.

[0052] Example 2 like Figure 2 As shown, a hydropower plant operation and maintenance fault case reasoning and handling solution generation system 10 includes... The knowledge graph construction module 100 is used to integrate multi-source knowledge such as historical failure cases of hydropower plants, equipment operation and maintenance manuals and safety procedures to construct a domain knowledge graph that includes failure types, causal relationships and handling procedures. The large model knowledge enhancement module 200 is used to transform entities and relationships in the domain knowledge graph into structured prompt information, or to inject domain knowledge into the large model through knowledge distillation to form a knowledge-enhanced large model adapted to the operation and maintenance scenario of hydropower plants. The fault reasoning retrieval module 300 is used to collect real-time data and contextual information of the current fault of the hydropower plant, extract fault feature vectors, and input the fault feature vectors into the knowledge-enhanced large model. It combines the domain knowledge graph to perform similar case retrieval and causal reasoning. If the similarity of the initial reasoning result does not meet expectations, it expands the related entities in the domain knowledge graph and re-retrieves them. The solution generation and verification module 400 is used to generate a preliminary handling solution based on the reasoning results, and verify compliance by combining the operation and maintenance procedures and security rules in the domain knowledge graph. If it fails, it returns the knowledge-enhanced large model to adjust the details. If it passes, it outputs the final solution.

[0053] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned method for generating reasoning and handling solutions for hydropower plant operation and maintenance fault cases.

[0054] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0055] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

Claims

1. A method for reasoning and generating solutions for hydropower plant operation and maintenance failure cases, characterized in that, Includes the following steps: S1 integrates multi-source knowledge from historical failure cases of hydropower plants, equipment operation and maintenance manuals, and safety procedures to construct a domain knowledge graph that includes failure types, causal relationships, and handling procedures. S2, transform the entities and relationships in the domain knowledge graph into structured prompt information to form a knowledge-enhanced large model adapted to the operation and maintenance scenario of hydropower plants; S3. Collect real-time data and contextual information of the current fault of the hydropower plant, extract the fault feature vector, and input the fault feature vector into the knowledge-enhanced large model. Combine the domain knowledge graph to perform similar case retrieval and causal reasoning. If the similarity of the initial reasoning result does not meet expectations, expand the related entities in the domain knowledge graph and retrieve them again. S4. Generate a preliminary handling plan based on the reasoning results, and verify compliance by combining the operation and maintenance procedures and security rules in the domain knowledge graph. If it fails, return to the knowledge-enhanced large model to adjust the details. If it passes, output the final plan.

2. The method as described in claim 1, characterized in that, S1 includes: S11, perform structured preprocessing on multi-source heterogeneous data, in which key fields of historical fault cases are extracted using regular expressions, including fault equipment codes, fault phenomenon descriptions and timestamps, to form an initial event set; S12, the equipment operation and maintenance manual extracts operational constraints through dependency parsing and establishes an action-state mapping; S13, The safety procedure text uses the BERT model for entity recognition.

3. The method as described in claim 2, characterized in that, The loss function used in the BERT model is: ; in, It is the first The context vector of each word, It is its physical label. Given the sequence length, the identified entities include device type. Risk level and processing time limit .

4. The method as described in claim 2, characterized in that, After performing structured preprocessing on the multi-source heterogeneous data as described in step S11, a knowledge fusion stage is also included to resolve entity ambiguity issues. Define the entity alignment similarity function: , in For entity embedding vectors, The Jaccard similarity coefficient. For weighted hyperparameters; through cross-source evidence chains Verify consistency of entity references, when Establish a unique ID for the entity at the time. This is the evidence threshold.

5. The method as described in claim 1, characterized in that, S2 includes: S21. Extract key entities and relationships from the hydropower plant operation and maintenance knowledge graph, use a graph neural network for entity embedding representation, and use the TransE model to calculate entity vectors. The entity vectors are represented as follows: , in Represents the head entity embedding vector. Represents the relation embedding vector. Represents the tail entity embedding vector; S22, based on the embedded results, designs a dynamic prompt template, serializes entities and relationships into text format, and processes the prompt text through the BERT encoder to generate a structured representation.

6. The method as described in claim 5, characterized in that, After using graph neural networks for entity embedding representation, the process also includes implementing a knowledge distillation process: S211, a knowledge graph-based graph convolutional network is pre-trained as a teacher model, which outputs a soft target probability distribution; S212, Train the student model to minimize the distillation loss and the task loss. The distillation loss function is defined as: , in This represents the Kullback-Leibler divergence loss. For the softmax function, It is the temperature coefficient. and These are the output probabilities of the teacher and student models, respectively. For real labels, For cross-entropy loss, Control distillation weight; S213, after distillation, performs domain-specific fine-tuning on the large model, applying a domain-adaptive layer using a hydropower plant-specific dataset: , in As the base model output, For the domain feature vector, To adapt to the weight matrix, the overall loss is optimized during fine-tuning. , For domain classification loss, It is a balance parameter.

7. The method as described in claim 1, characterized in that, S3 includes: S31, the fault feature vector is input into the knowledge-enhanced large model. The large model uses a Transformer-based encoder architecture to process the input and generate query embedding vectors. S32, integrate the query embedding vectors into the knowledge graph, and use graph neural networks to precompute the graph embedding of the entity subgraph associated with each case in the knowledge graph; S33, calculate the cosine similarity between the query and the cases, and sort them based on the cosine similarity, selecting the top-ranked cases. As a candidate set; S34, using the causal reasoning module to analyze top- The case study, combined with the causal chain in the knowledge graph, uses the decoder component of the large model to input the case embedding and associated entities, and outputs a vector of failure cause or solution.

8. The method as described in claim 1, characterized in that, S4 includes: S41, use a pre-trained large language model to process the input inference results, and the model outputs the probability distribution of candidate solutions; S42, combined with knowledge graph Verify compliance and define the compliance scoring function: , in It is a constraint set. To constrain The weighting coefficients, It is an indicator function that indicates when a candidate solution satisfies the constraints. The value is 1 if the condition is met and 0 otherwise. The score is then calculated and compared with a preset threshold. In comparison, if The solution is compliant; otherwise, it is deemed unqualified. S43, if the compliance check fails, calculate the compliance loss function, derive the parameter gradient, and return the adjustment details, including the gradient vector and update direction; S44. If the compliance verification is passed, the final candidate solution is directly output as the formal disposal solution, and it is encapsulated in a structured output format containing execution steps and compliance basis. A final consistency check is performed before output.

9. A system for reasoning and generating solutions for hydropower plant operation and maintenance failure cases, characterized in that, include The knowledge graph construction module is used to integrate multi-source knowledge such as historical failure cases of hydropower plants, equipment operation and maintenance manuals and safety procedures to build a domain knowledge graph that includes failure types, causal relationships and handling procedures. The large model knowledge enhancement module is used to transform entities and relationships in the domain knowledge graph into structured prompt information, or to inject domain knowledge into the large model through knowledge distillation to form a knowledge-enhanced large model adapted to the operation and maintenance scenario of hydropower plants. The fault reasoning retrieval module is used to collect real-time data and contextual information of the current fault in the hydropower plant, extract fault feature vectors, and input the fault feature vectors into the knowledge-enhanced large model. It combines the domain knowledge graph to perform similar case retrieval and causal reasoning. If the similarity of the initial reasoning result does not meet expectations, it expands the related entities in the domain knowledge graph and re-retrieves them. The solution generation and verification module is used to generate a preliminary handling solution based on the reasoning results, and verify its compliance by combining the operation and maintenance procedures and security rules in the domain knowledge graph. If it fails, it returns the knowledge-enhanced large model to adjust the details. If it passes, it outputs the final solution.

10. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as claimed in any one of claims 1-8.