Fault diagnosis method and system based on hydroelectric power plant auxiliary equipment knowledge graph

CN122507586APending Publication Date: 2026-08-04STATE GRID HUBEI ELECTRIC POWER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID HUBEI ELECTRIC POWER CO LTD
Filing Date
2026-05-14
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

[0005]本发明提供一种基于水电厂辅助设备知识图谱的故障诊断方法及系统,用以解决现有技术中的知识图谱推理方法难以应对复杂、动态的故障场景的缺陷,实现对未知或复杂工况的推理

Benefits of technology

[0015]第四方面,本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种所述的基于水电厂辅助设备知识图谱的故障诊断方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122507586A_ABST
    Figure CN122507586A_ABST
Patent Text Reader

Abstract

The application provides a kind of based on water power plant auxiliary equipment knowledge graph's fault diagnosis method and system, belong to fault diagnosis technical field.The method includes: extracting the fault log when fault occurs and the operating state data of equipment;According to the fault log, the operating state data, determine the fault reasoning starting point in knowledge graph;Action probability of fault path selection is predicted using strategy network, from the fault reasoning starting point, according to the action probability, carry out fault path search in the knowledge graph, obtain multiple candidate fault paths;The confidence of each candidate fault path is calculated, and the fault reason corresponding to the end node of at least one candidate fault path with the highest confidence is screened out as the fault diagnosis result.The application can realize the automatic reasoning and screening of high-quality fault path based on knowledge graph, and significantly improve the fault diagnosis accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fault diagnosis technology, and in particular to a fault diagnosis method and system based on a knowledge graph of auxiliary equipment in hydropower plants. Background Technology

[0002] The operational status of auxiliary equipment in hydropower plants is influenced by a variety of factors, and complex faults often require reasoning based on comprehensive equipment knowledge, operational status, and historical data. Therefore, knowledge graphs have become an important way to organize and manage equipment operational knowledge. By presenting equipment, anomalies, root causes, and their logical relationships in a topological structure, they can provide structured information support for fault reasoning.

[0003] Traditional knowledge graph reasoning methods mostly employ fixed rules, static search strategies, or manually set heuristic functions, making it difficult to cope with constantly changing anomaly patterns and dynamic fault chains in real-world operating scenarios. When faced with fault modes under complex operating conditions or novel faults that have never appeared in historical data, static reasoning methods often fail to guarantee the accuracy of the reasoning direction and search efficiency.

[0004] Therefore, a new knowledge graph-based fault diagnosis method is needed to improve the intelligence, adaptability, and generalization capabilities of complex fault reasoning. Summary of the Invention

[0005] This invention provides a fault diagnosis method and system based on a knowledge graph of auxiliary equipment in hydropower plants, which solves the shortcomings of existing knowledge graph reasoning methods in dealing with complex and dynamic fault scenarios, and enables reasoning for unknown or complex operating conditions.

[0006] In a first aspect, the present invention provides a fault diagnosis method based on a knowledge graph of auxiliary equipment in a hydropower plant, comprising: Extract the fault logs and equipment operating status data at the time of the fault; Based on the fault log and the operating status data, determine the starting point for fault reasoning in the knowledge graph; A policy network is used to predict the action probability of fault path selection. Starting from the fault inference starting point, a fault path search is performed in the knowledge graph according to the action probability to obtain multiple candidate fault paths. Calculate the confidence level of each candidate fault path, and select the fault cause corresponding to the terminal node of at least one candidate fault path with the highest confidence level as the fault diagnosis result.

[0007] According to the present invention, a fault diagnosis method based on a knowledge graph of auxiliary equipment in a hydropower plant includes determining the fault inference starting point in the knowledge graph based on the fault log and the operating status data, comprising: Extract the semantic vector representation of the fault log, and extract the running status vector corresponding to the running status data; Calculate the comprehensive similarity between the semantic vector representation, the running state vector, and the semantic embedding vector and running state vector of each node in the knowledge graph; wherein, the running state vector of each node in the knowledge graph is constructed based on the running state data of the device corresponding to each node; Select the nodes with the highest overall similarity as multiple fault inference starting points, and form a set of fault inference starting points.

[0008] According to the present invention, a fault diagnosis method based on a knowledge graph of auxiliary equipment in a hydropower plant is provided. The method employs a policy network to predict the action probability of fault path selection. Starting from the fault inference starting point, a fault path search is performed in the knowledge graph based on the action probability to obtain multiple candidate fault paths, including: The initial candidate paths in the knowledge graph, starting from each of the fault reasoning starting points, are encoded to obtain path encoding vectors corresponding to each initial candidate path; wherein, the initial candidate path is represented by a sequence of nodes, edges, and nodes. Given that the path encoding vectors corresponding to each initial candidate path are known, a policy network is used to calculate the action probability of the next node of each initial candidate path from the knowledge graph. Actions are filtered from the action space of each initial candidate path according to the action probability, and the initial candidate paths are expanded according to the action filtering results to generate candidate fault paths corresponding to each initial candidate path.

[0009] According to the present invention, a fault diagnosis method based on a knowledge graph of auxiliary equipment in a hydropower plant includes the step of filtering actions from the action space of each initial candidate path according to the action probability, and generating candidate fault paths corresponding to each initial candidate path, comprising: Action space constraints are set to generate the action space for each initial candidate path; wherein, the action space constraints include topological adjacency constraints and semantic similarity constraints between the end node of the initial candidate path and the next node; For each initial candidate path, multiple action samples are taken from the action space according to the action probability, and the action obtained from each action sample is added to the initial candidate path for path expansion until a preset termination condition is reached, thereby obtaining the candidate fault path corresponding to the initial candidate path.

[0010] According to the fault diagnosis method based on the knowledge graph of auxiliary equipment in a hydropower plant provided by the present invention, the calculation of the confidence level of each candidate fault path includes: Calculate the probability distribution of each candidate fault path before and after path expansion, and determine the information gain of the candidate fault path based on the probability distribution before and after path expansion. The path uncertainty is determined based on the confidence level of each edge in the candidate fault path; The confidence level of the candidate fault path is calculated based on the information gain and the path uncertainty.

[0011] According to the present invention, a fault diagnosis method based on a knowledge graph of auxiliary equipment in a hydropower plant includes calculating the probability distribution of each candidate fault path before and after path expansion, and determining the information gain of the candidate fault path based on the probability distribution before and after path expansion, comprising: Based on the comprehensive similarity corresponding to each fault inference starting point in the fault inference starting point set, determine the probability distribution of each fault inference starting point before path expansion; Based on the prior knowledge in the knowledge graph, the path evidence score of each candidate fault path after path expansion is determined; wherein, the prior knowledge is the reasonableness score of the knowledge triple in which the end node of the candidate fault path is located. The posterior distribution of each candidate fault path after path expansion is determined based on the comprehensive similarity and the path evidence score corresponding to each fault inference starting point. The information gain of the candidate fault path is calculated based on the probability distribution before path expansion and the posterior distribution after path expansion.

[0012] According to the present invention, a fault diagnosis method based on a knowledge graph of auxiliary equipment in a hydropower plant is provided, the method further includes: The fault diagnosis results are pushed to the operation and maintenance personnel, and the fault verification results of the operation and maintenance personnel are obtained. The confidence of edges in each candidate fault path in the knowledge graph is updated based on the fault verification results, and the policy network is updated and trained based on the fault verification results.

[0013] Secondly, the present invention also provides a fault diagnosis system based on a knowledge graph of auxiliary equipment in hydropower plants, comprising: The data acquisition module is used to extract fault logs and equipment operating status data when a fault occurs; The starting point determination module is used to determine the starting point for fault reasoning in the knowledge graph based on the fault log and the running status data. The path reasoning module is used to predict the action probability of fault path selection using a policy network. Starting from the fault reasoning starting point, it searches for fault paths in the knowledge graph based on the action probability to obtain multiple candidate fault paths. The fault attribution module is used to calculate the confidence level of each candidate fault path and select the fault cause corresponding to the terminal node of at least one candidate fault path with the highest confidence level as the fault diagnosis result.

[0014] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the fault diagnosis method based on the knowledge graph of auxiliary equipment of hydropower plants as described above.

[0015] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the fault diagnosis method based on the knowledge graph of hydropower plant auxiliary equipment as described above.

[0016] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the fault diagnosis method based on the knowledge graph of hydropower plant auxiliary equipment as described above.

[0017] The beneficial effects of the technical solutions provided by some embodiments of the present invention include at least the following: 1) This invention provides a fault diagnosis method and system based on a knowledge graph of auxiliary equipment in hydropower plants. By using fault logs and operational status data, the starting point for fault reasoning in the knowledge graph is determined. Thus, when a fault occurs, the starting point for fault reasoning is accurately located by combining the semantic vector of the fault log with the real-time operational status vector, facilitating subsequent dynamic reasoning. A policy network is used to predict the action probability of fault path selection, and fault path search is performed in the knowledge graph to automatically find the reasoning path with the most causal correlation. Finally, the confidence of each candidate fault path is calculated to filter out invalid or low-confidence paths. This invention can achieve automatic reasoning and screening of high-quality fault paths based on the knowledge graph, significantly improving the accuracy of fault diagnosis.

[0018] 2) This invention can carry out dynamic path search based on action probability in knowledge graphs. That is, it can perform probabilistic action sampling and path expansion in the action space through policy network, and can efficiently locate the most likely cause of failure in complex association network, which has significant advantages compared with traditional static rule or text matching methods.

[0019] 3) This invention utilizes a trainable policy network to perform Monte Carlo search on a knowledge graph. It uses the rationality score, information gain, and uncertainty of the knowledge triple where the end node of the candidate fault path is located as the basis for evaluating the confidence of the path. It adaptively adjusts the action selection direction, which can gradually filter out high-quality path reasoning directions during the path expansion process, avoid reasoning path deviation or falling into invalid search, improve reasoning efficiency and accuracy, and realize intelligent discovery and dynamic explanation of fault causal chains under unknown working conditions.

[0020] 4) This invention constructs a closed-loop feedback mechanism that can update the knowledge graph and policy network based on the fault reasoning results and the fault verification results fed back from the field. This enables the reasoning method to have continuous learning capabilities and adapt to new working conditions, unknown faults and equipment changes, thereby improving the accuracy and stability of reasoning. It also has stronger generalization ability, interpretability and long-term adaptability. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0022] Figure 1 This is one of the flowcharts of the fault diagnosis method based on the knowledge graph of auxiliary equipment in hydropower plants provided by the present invention; Figure 2 This is the second flowchart of the fault diagnosis method based on the knowledge graph of auxiliary equipment in hydropower plants provided by the present invention. Figure 3 This is a schematic diagram of the fault diagnosis system based on the knowledge graph of auxiliary equipment in hydropower plants provided by the present invention; Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0024] When a failure occurs in the auxiliary system of a hydropower plant, it often involves multiple components and complex operating conditions. Existing knowledge graph reasoning technology is generally based on static knowledge bases or keyword matching diagnostic methods, which still have limited applicability in complex fault diagnosis scenarios in hydropower plants.

[0025] Traditional rule-based matching methods rely on human knowledge construction, making it difficult to utilize multi-level relationships between entities and to perform dynamic reasoning based on real-time operating status, thus failing to fully cover complex and diverse fault chains. Static heuristic-based reasoning lacks adaptability, failing to adjust the search direction based on real-time equipment status and intermediate results. This easily leads to reasoning path deviations or getting stuck in invalid searches, resulting in decreased reasoning efficiency and accuracy. Furthermore, the lack of modeling for reasoning uncertainties results in weak interpretability and insufficient generalization ability of the diagnostic path. In multi-measurement point associated fault scenarios, the lack of a dynamic probability evaluation mechanism often leads to unstable or inefficient exploration of complex links in the fault map, failing to meet the needs of hydropower plants for rapid, accurate, and safe fault diagnosis.

[0026] Furthermore, existing methods are generally unable to make effective inferences about unknown faults or anomalies not recorded in historical documents. In other words, they are difficult to handle fault modes that have not appeared in historical knowledge and lack the ability to detect and generalize to newly emerging links.

[0027] Therefore, a reasoning method is needed that can dynamically adjust strategies, has probabilistic guidance capabilities, and is compatible with complex graph structures, in order to improve the accuracy, efficiency, and scalability of fault diagnosis.

[0028] Example 1 Please see Figure 1 , Figure 1 One of the flowcharts for a fault diagnosis method based on a knowledge graph of auxiliary equipment in a hydropower plant, provided as an embodiment of the present invention, includes: S101. Extract the fault log and equipment operating status data at the time of the fault. S102. Based on the fault log and operating status data, determine the starting point for fault reasoning in the knowledge graph; S103. Use a policy network to predict the action probability of fault path selection. Starting from the fault reasoning starting point, search for fault paths in the knowledge graph according to the action probability to obtain multiple candidate fault paths. S104. Calculate the confidence level of each candidate fault path, and select the fault cause corresponding to the terminal node of at least one candidate fault path with the highest confidence level as the fault diagnosis result.

[0029] This invention uses fault logs and operational status data to determine the starting point of fault reasoning in a knowledge graph. This allows for accurate location of the fault reasoning starting point when a fault occurs, combining the semantic vector of the fault log with the real-time operational status vector, facilitating subsequent dynamic reasoning. A policy network is used to predict the action probability of fault path selection, and fault path searches are performed in the knowledge graph to automatically find the most causally related reasoning path. Finally, the confidence level of each candidate fault path is calculated to filter out invalid or low-confidence paths. This invention enables automatic reasoning and filtering of high-quality fault paths based on a knowledge graph, significantly improving fault diagnosis accuracy.

[0030] In S101 of this embodiment, when a fault occurs in the auxiliary equipment of the hydropower plant, the fault log and the operating status data of the equipment are obtained.

[0031] Specifically, hydropower plants have a wide variety of auxiliary equipment, such as oil systems, water systems, gas systems, speed governors, excitation system auxiliary equipment, ventilation and cooling systems, fire protection systems, and drainage equipment. When a fault occurs, the system generates a fault log, which is a crucial basis for fault analysis, location, and recovery. The operating status data of the equipment at the time of the fault is real-time monitoring data, such as stable parameters like bearing temperature, vibration, and motor current, and non-stationary time series data with trends, periods, or multiple operating modes, such as cooling water temperature, flow rate, and pressure.

[0032] In S102 of this embodiment, the starting node for fault reasoning is determined from the pre-established knowledge graph of fault diagnosis of auxiliary equipment in hydropower plants based on the fault log and operating status data.

[0033] The knowledge graph for fault diagnosis of auxiliary equipment in hydropower plants is constructed by scoring and filtering the rationality of basic semantic triples based on the operating status data of the equipment. Specifically, the construction process of this knowledge graph can be as follows: (1) Obtain multi-source text data of auxiliary equipment of hydropower plant and perform preprocessing to form multi-source dataset; Specifically, structured and unstructured data sources are collected from the auxiliary systems of hydropower plants to form multi-source text data, which is then preprocessed to obtain a multi-source dataset.

[0034] The multi-source text data can include: equipment information from hydropower plant auxiliary systems, equipment operating status data (i.e., real-time monitoring data of equipment operation), inspection and maintenance records, and may also include fault reports, fault logs, system log records, etc. The above multi-source text data undergoes preprocessing such as data cleaning, missing value imputation, text normalization, and regularized field extraction. Combined with expert experience, this forms a basic equipment information dataset, an operating status dataset, and an inspection and maintenance text dataset. (2) Entity and relation recognition is performed based on multi-source datasets, and a basic semantic triplet set is constructed; Based on the multi-source dataset obtained in step (1), entity and relation extraction is performed to construct basic semantic triples, forming a set of basic semantic triples: S = { s' ht |( e h , r e , e t )},in s' ht Represents the entity from which the head is located. e h , tail entity e t and the relationship between them r e The basic triplet ( e h , r e , e t ).

[0035] (3) For each entity in the set of basic semantic triples, construct the entity's running state vector based on the running state data corresponding to the entity; For each entity e h , e t Based on the entity's corresponding running status data, construct its running status vector V.

[0036] (4) For each basic semantic triple in the set of basic semantic triples, calculate the semantic relevance between the head entity and the tail entity in the basic semantic triple; For example, Xavier Uniform can be used to perform semantic embedding encoding on each basic semantic triple to obtain a semantic embedding vector, and semantic relevance calculation can be implemented based on a graph neural network (GNN). Specifically, a batch of triples is prepared in advance, their semantic relevance is calculated, positive samples are constructed, and the semantic relevance label of the positive samples is... For each pair of triples, randomly replace the head or tail entity and calculate its semantic relevance. Construct negative samples, with the semantic relevance label for each negative sample being... Based on these positive and negative samples, the graph neural network is trained through end-to-end backpropagation. The AdamW optimizer is used for iterative optimization to update and optimize parameters such as relation weight matrix, relation interaction vector, and relation bias term, and output the prediction results of semantic relevance.

[0037] (5) Based on the running state vectors corresponding to the head entity and the tail entity respectively, extract the temporal state vectors of the head entity and the tail entity in the preset time period through the Temporal Convolutional Network (TCN), and calculate the state consistency between the head entity and the tail entity based on the difference between the temporal state vectors. Specifically, based on the head entity e h Tail-end entity e t The corresponding running state vectors Construct the running state matrices of the head entity and the tail entity for a preset time period, respectively. ,in, T represents the time step, which is the length of the observation window for the preset time period; This represents the dimension of the running state vector at each time step, i.e., the number of running state parameters of the entity.

[0038] Then, a temporal convolutional network is used to extract the temporal state vectors corresponding to the running state matrices of the head entity and the tail entity, respectively. :

[0039] Finally, based on the differences between the temporal state vectors, the state consistency between the head entity and the tail entity is calculated. :

[0040] This state consistency characterizes the degree of difference between the operational state data corresponding to the head entity and the tail entity.

[0041] (6) Based on the running state vectors corresponding to the head entity and the tail entity respectively, the trend features of the head entity and the tail entity in the preset time period are extracted by the sliding window difference method. Based on the difference between the trend features, the trend difference between the head entity and the tail entity is calculated. For example, the trend features corresponding to the running state matrices of the head entity and the tail entity can be extracted separately using the sliding window method, and the trend difference between the head entity and the tail entity can be calculated.

[0042] Specifically, the sliding window difference of the running state matrix of the head entity is calculated separately. Sliding window difference of the running state matrix of the tail entity The operating state matrix of water pump A For example, calculate the sliding window difference. The formula is:

[0043] Where m and n are the running state matrices respectively. The row and column indices are used, and w is the sliding window size, which is determined as needed. If w=1, it is a first-order difference, which can be used to study velocity changes. If w=5, it is a difference of 5 time points, which can be used to capture short-term trends. If w=30, it is a difference of 30 time points, which can be used to capture long-term trends.

[0044] After calculating the sliding window difference of the running state matrices of the head and tail entities, feature extraction is performed using the linear transformation layer of the TCN to obtain the trend features corresponding to the running state matrices of the head and tail entities. :

[0045] Calculate trend characteristics Trend differences between :

[0046] This trend difference characterizes the degree of difference between the trends in the operational status data of the head and tail entities over time.

[0047] (7) Determine the confidence factor of the basic semantic triples based on state consistency and trend differences; Specifically, state consistency Trend Difference The mapping to confidence factors can be represented by the following formula:

[0048] Among them, confidence factor , These are the weights.

[0049] This confidence factor characterizes the degree of matching between the head and tail entities of the basic semantic triple and the reliability of the runtime status data.

[0050] (8) The rationality of the basic semantic triples is scored based on semantic relevance, state consistency, trend difference and confidence factor, and the scoring results are obtained; For example, a lightweight multilayer perceptron (MLP) can be used as a scoring discriminator to classify semantic relevance. State consistency Trend differences After splicing, combined with confidence factors As input to the scoring discriminator This yields the scoring result output by the scoring discriminator.

[0051]

[0052] in, It is an S-shaped function. The scoring results represent the basic semantic triples. Reasonableness score under current operating conditions.

[0053] To facilitate subsequent processing, the confidence factor can be... and Add basic semantic triples s' ht In this process, we obtain the basic semantic triples of the extended representation. s th =[ s' ht , , ], and obtain the extended set of basic semantic triples S={ s ht}

[0054] (9) Based on the scoring results, the basic semantic triples are filtered to obtain the knowledge triples set; Specifically, confidence thresholds and scoring thresholds can be preset to filter out confidence factors. Basic semantic triples that are greater than the confidence threshold and whose reasonableness score is greater than the score threshold are used to form a set of knowledge triples.

[0055] (10) Construct a fault diagnosis knowledge graph based on the knowledge triple set.

[0056] Specifically, a fault diagnosis knowledge graph can be constructed by mapping knowledge triples to nodes and edges in a knowledge graph using the Neo4j graph database.

[0057] In this embodiment, the starting node for fault reasoning is determined based on the knowledge graph described above.

[0058] In some possible embodiments, the starting point for fault reasoning in the knowledge graph is determined based on fault logs and operational status data, including: S102-1. Extract the semantic vector representation of the fault log and extract the running status vector corresponding to the running status data; S102-2, Calculate the comprehensive similarity between the semantic vector representation, the running state vector, and the semantic embedding vector and running state vector of each node in the knowledge graph; S102-3. Select the nodes with the highest comprehensive similarity as multiple fault inference starting points and form a fault inference starting point set.

[0059] Specifically, in step S102-1 above, for any fault log text to be analyzed, the log content is segmented into words, and the semantic context information of the fault log is extracted using the BERT (Bidirectional Encoder Representations from Transformers) pre-trained model to obtain its semantic vector representation. .

[0060] Simultaneously, the system parses the equipment operating status data recorded at the time of the fault to generate a corresponding operating status vector, denoted as... For example, suppose the operating status data of a certain component at a given time is shown in Table 1 below: Table 1. Example of operating status data for a certain component

[0061] After applying Min-Max standardization to the above operational status data, the corresponding operational status vector is obtained. =[0.78, 0.21, 0.46, 0.48, 0.32].

[0062] In step S102-2 above, the semantic vector obtained in step S102-1 is represented... and running state vector semantic embedding vectors of each node e in the knowledge graph and running state vector Joint calculation of comprehensive similarity :

[0063] Here, α and β are set as weighting coefficients that satisfy α + β = 1 to balance the importance of text semantics and running state. α can be 0.6 (semantics plays a major role) and β can be 0.4 (state plays a minor role).

[0064] In steps S102-3 above, the comprehensive similarity is selected. The top M nodes (entities) are used as the starting nodes for fault reasoning, forming the fault reasoning starting point set. .

[0065] In step S103 of this embodiment, a trainable policy network is used. Guide probabilistic traversal on the knowledge graph.

[0066] In some possible embodiments, a policy network is used to predict the action probability of fault path selection. Starting from the fault reasoning starting point, a fault path search is performed in the knowledge graph based on the action probability to obtain multiple candidate fault paths, including: S103-1. Encode the initial candidate paths in the knowledge graph starting from each fault reasoning point to obtain the path encoding vector corresponding to each initial candidate path; wherein, the initial candidate path is represented by a sequence of nodes, edges, and nodes. S103-2. Using a policy network to calculate the path encoding vectors corresponding to each initial candidate path, select the action probability of the next node of each initial candidate path from the knowledge graph. S103-3. Select actions from the action space of each initial candidate path according to the action probability, and expand the initial candidate paths according to the action selection results to generate candidate fault paths corresponding to each initial candidate path.

[0067] Specifically, in step S103-1 above, the path is represented by a sequence of nodes and edge nodes. ,in, These represent the nodes in path p in sequence. Each edge represents the edge between two nodes, which represents the relationship between two entities in the knowledge graph.

[0068] A sequence encoder based on the Transformer model is used to encode the initial candidate paths starting from each fault inference point: ① For the i-th jump Construct the i-th segment of path p , For this side Confidence factor.

[0069] ②The input to the Transformer model is k is the path length; After passing through L layers of Transformers, the encoded output is obtained. ,in, ·) represents a Transformer layer; Final output path sequence .

[0070] ③ Use Xavier Uniform to initialize and generate a similar... Trainable parameter vectors of the same dimension After training, the final path encoding vector of the initial candidate path p is: , i,j=1,2,…,k.

[0071] In step S103-2 above, a policy network is used. ( θ(as parameters), by calculating the probability of the action. This action probability characterizes the probability of an action within a given path encoding vector. The distribution of the "next action" output by the policy network. A decoder based on the Transformer model can be selected for actions. To extract from the knowledge graph at the current path p The next step is to select the (relation, target entity) pair, which corresponds to a semantic triple, i.e. ,in, r Let (relationship, target entity) be the relation and (target entity) be the target entity. The current path can be uniquely determined based on this (relationship, target entity) pair. p The next node (corresponding to the target entity) ).

[0072] Specifically, policy network Initialize in the following way: A) Use the Xavier Uniform function to initialize and generate the path encoding vector. Weight matrix linearly projected into the action space , =128, =128. Path encoding vector Dimensions This represents the dimension of the action space.

[0073] B) Use Xavier Uniform functions to initialize and generate candidate actions. Weight matrix linearly projected onto a unified feature space , =Dimension of each relation vector r + Dimension of each target entity vector e'

[0074] Through policy network The process of calculating the probability of an action is as follows: (a) Path encoding vector With candidate actions Mapping to the same dimensional space: ,in, , These are the mapped path encoding vector and the mapped candidate action, respectively. (b) Calculate the original output value of the mapped candidate action. ): ; (c) Obtain the action probability using the Softmax function: .

[0075] In step S103-3 above, the action space of each initial candidate path is determined. That is, the set of action candidates formed by the "next action" that meets the conditions.

[0076] For example, the condition requirement can be: (relationship, target entity) pairs that are connected to the end node of the current initial candidate path p and whose cosine similarity between the running state vectors of the nodes is greater than a preset similarity threshold.

[0077] Then, based on the action probability From the action space Action screening is performed, and the initial candidate paths are expanded based on the action screening results, gradually generating candidate fault paths corresponding to each initial candidate path.

[0078] In some possible embodiments, actions are filtered from the action space of each initial candidate path according to the action probability to generate candidate fault paths corresponding to each initial candidate path, including: Set action space constraints to generate the action space for each initial candidate path; where action space constraints include topological adjacency constraints and semantic similarity constraints between the end node and the next node of the initial candidate path. For each initial candidate path, N action samples are performed from the action space according to the action probability, and the action 'a' obtained from each action sample is added to the initial candidate path for path expansion until the preset termination condition is reached, thus obtaining the candidate fault path corresponding to the initial candidate path.

[0079] Specifically, to reduce ineffective expansion, action space constraints can be set to reduce the search space. Let the end node (entity) of the current path be... Candidate actions are only considered those that are present in the knowledge graph. The neighborhood and the state with Similar target entities To obtain the action space :

[0080] in, For the current initial candidate path The action space, i.e., the set of action candidates; To select end entities from the knowledge graph based on topological adjacency constraints and semantic similarity constraints. The neighborhood set; for and The L2 norm of the difference in semantic similarity between them. The semantic similarity threshold can be set to... =0.2.

[0081] Then, using Monte Carlo probabilistic traversal, multiple possible faulty reasoning paths are explored. Specifically, For each fault inference starting point, perform N policy-guided random traversals (N being the number of Monte Carlo samplings performed for each fault inference starting point), and set the maximum path length. The process of each traversal is as follows: (i) Each step from the action space Action probabilities generated by the policy network Sample an action Incorporate it into the initial candidate path Extend the path at the end; (ii) If the preset termination condition is met, stop the traversal; otherwise, continue sampling until the maximum path length is reached. This yields multiple candidate fault paths.

[0082] The preset termination condition can be: if the reasonableness score of the triplet corresponding to several consecutive jumps is higher than the preset confidence threshold. If the path information gain (IG) falls below a threshold, the path can be terminated early. The path information gain (IG) can be determined by the difference in information entropy between the path before and after path expansion.

[0083] In step S104 of this embodiment, the confidence level of each candidate fault path is calculated, and the fault paths are sorted and filtered.

[0084] For example, the confidence of a candidate fault path can be obtained by weighted summation based on the confidence factors of each edge in the candidate fault path.

[0085] For example, the matching degree between the running status vector of each node in the candidate fault path and the fault log can also be calculated, and then the total path matching degree between the candidate fault path and the fault log can be calculated by weighted summation, which is used as the confidence degree of the candidate fault path.

[0086] For example, the confidence of each candidate fault path can be calculated by combining the semantic similarity between nodes and fault logs, the similarity between running state vectors, and the confidence factors of each edge.

[0087] Then, the confidence scores are sorted in descending order, and the top K candidate fault paths with the highest confidence scores are selected. The fault causes corresponding to the end nodes of these top K candidate fault paths are extracted, and the fault causes corresponding to the end nodes of these top K candidate fault paths are pushed to the operation and maintenance personnel as auxiliary fault diagnosis results.

[0088] Example 2 Please see Figure 2 , Figure 2 A second flowchart illustrating a fault diagnosis method based on a knowledge graph of auxiliary equipment in a hydropower plant, provided as an embodiment of the present invention, includes: S201. Extract the fault log and equipment operating status data at the time of the fault. S202. Based on the fault log and operating status data, determine the starting point for fault reasoning in the knowledge graph; S203. Use a policy network to predict the action probability of fault path selection. Starting from the fault reasoning starting point, search for fault paths in the knowledge graph according to the action probability to obtain multiple candidate fault paths. S204. Calculate the probability distribution of each candidate fault path before and after path expansion, and determine the information gain of the candidate fault path based on the probability distribution before and after path expansion. S205. Determine the path uncertainty based on the confidence level of each edge in the candidate fault path; S206. Calculate the confidence level of the candidate fault path based on information gain and path uncertainty; S207. Select the fault cause corresponding to the end node of at least one candidate fault path with the highest confidence as the fault diagnosis result. S208. Push the fault diagnosis results to the operation and maintenance personnel and obtain the fault verification results from the operation and maintenance personnel; S209. Update the confidence of edges in each candidate fault path in the knowledge graph based on the fault verification results, and update and train the policy network based on the fault verification results.

[0089] This invention utilizes a trainable policy network to perform Monte Carlo search on a knowledge graph. It uses the rationality score, information gain, and uncertainty of the knowledge triple containing the terminal node of the candidate fault path as the basis for evaluating the confidence of the path. It adaptively adjusts the action selection direction, which can gradually filter out high-quality path reasoning directions during the path expansion process, avoid reasoning path deviation or falling into invalid search, improve reasoning efficiency and accuracy, and realize intelligent discovery and dynamic interpretation of fault causal chains under unknown working conditions.

[0090] Steps S201 to S203 in this embodiment can be referred to S101 to S103 in Embodiment 1, and will not be repeated here.

[0091] In step S204 of this embodiment, in order to measure the contribution of the path to narrowing down the range of causes of the fault, the information gain of the path needs to be calculated during the path selection process.

[0092] In some possible embodiments, the probability distribution of each candidate fault path before and after path expansion is calculated, and the information gain of the candidate fault paths is determined based on the probability distributions before and after path expansion, including: S204-1. Based on the comprehensive similarity corresponding to each fault reasoning starting point in the fault reasoning starting point set, determine the probability distribution of each fault reasoning starting point before path expansion. S204-2. Based on the prior knowledge in the knowledge graph, determine the path evidence score of each candidate fault path after path expansion. S204-3. Determine the posterior distribution of each candidate fault path after path expansion based on the comprehensive similarity and path evidence score corresponding to each fault inference starting point. S204-4. Calculate the information gain of the candidate fault path based on the probability distribution before path expansion and the posterior distribution after path expansion.

[0093] Specifically, in step S204-1 above, before calculating the path expansion, the entity probability distribution of each fault inference starting point is calculated.

[0094] Let the set of fault inference starting points be denoted as . Let n be the number of fault inference starting points. Calculate the fault inference starting point for each fault. semantic embedding vector Running state vector Semantic vector representation of the fault log at the time of the fault. Running state vector Overall similarity between :

[0095] in, z =1,2,..., n α and β are the weights, and can be set to α=0.5 and β=0.5.

[0096] Comprehensive similarity Converting to probabilities, we obtain the inference starting points for each fault before path expansion. probability distribution :

[0097] in, z,c =1,2,..., n , τ For temperature parameters, the following values ​​can be used: τ =0.2.

[0098] In step S204-2 above, the end nodes of each candidate fault path in the knowledge graph are... The knowledge triplet it belongs to The reasonableness score is based on prior knowledge, determining the path evidence score for each candidate fault path after path expansion. Among these, Candidate Fault Paths p The second to last node, for and The relationship between them.

[0099] Starting point of fault reasoning Path evidence score of candidate faulty path p obtained by path expansion for: ; in, The constant coefficient, End node The knowledge triplet it belongs to The rationality score can be obtained based on the knowledge graph provided in step S102 of Embodiment 1.

[0100] In step S204-3 above, the combined similarity score and the path evidence score are merged to obtain the joint score. :

[0101] in, It is a constant coefficient.

[0102] Then, normalize the joint fractions. After path expansion, the corresponding fault inference starting point under each candidate fault path p is obtained. The posterior distribution:

[0103] in, z,c =1,2,..., n , τ This refers to the temperature parameter.

[0104] In step S204-4 above, the probability distribution before path expansion is... Posterior distribution after path expansion Calculate the information gain of candidate fault path p. :

[0105] Where H(•) is the entropy, which can be calculated using Shannon entropy.

[0106] In step S205 of this embodiment, the confidence level of each edge in the candidate fault path is obtained from the knowledge graph to determine the path uncertainty.

[0107] For example, during path reasoning, if a hop in the path contains a low-confidence edge, the uncertainty of the entire path should increase, thereby reducing the likelihood that the endpoint entity of that path will be selected. Therefore, the path uncertainty of the candidate faulty path p... It can be represented as:

[0108] in, For the candidate fault path p, the first i The confidence level of the edge. i =1,2,...,k, where k is the path length.

[0109] In step S206 of this embodiment, the confidence level of each candidate fault path is determined based on the rationality score of the knowledge triplet to which the end node is located, the information gain before and after path expansion, and the path uncertainty.

[0110] For example, reading the end nodes of candidate fault paths from a knowledge graph. The knowledge triplet it belongs to The rationality score is calculated, and combined with information gain and uncertainty, to obtain this candidate failure path. p confidence level :

[0111] in, For weight hyperparameters, =1, can be set =0.6, =0.4.

[0112] In step S207 of this embodiment, fault attribution is performed based on confidence level.

[0113] Specifically, for all fault inference starting points and their corresponding N random traversals, candidate fault paths and their corresponding confidence levels are collected. ; Paths are sorted by confidence level Sort the fault paths from largest to smallest, extract the Top-K candidate fault paths, and use the fault causes corresponding to the terminal nodes of the Top-K candidate fault paths as candidate fault diagnosis results. Simultaneously output the overall confidence score of each candidate fault diagnosis result. The overall confidence level From the road section The rationality score of the corresponding knowledge triple Confidence factor of its corresponding edge The weighted average is obtained as follows: ,in, For grouped calculation functions, it means from ,implement and The weighted average is calculated.

[0114] In S209 of this embodiment, multiple candidate fault diagnosis results are pushed to maintenance personnel for manual on-site inspection, and the fault verification results of the maintenance personnel on-site are obtained.

[0115] Specifically, operations and maintenance personnel verify each candidate fault diagnosis result on-site and provide feedback on the fault verification result in the form of "correct / incorrect". The feedback fault verification result is mapped to real labels at the path level and entity / edge level for subsequent policy network and knowledge graph updates.

[0116] In S210 of this embodiment, a closed-loop feedback mechanism is constructed to update the policy network and knowledge graph through closed-loop learning.

[0117] ① Edge updates of knowledge graphs: For a candidate fault path that is correctly reasoned, increase the confidence factor u of the edges contained in the candidate fault path; For candidate faulty paths with inference errors, the confidence factor of the edges contained in the candidate faulty path is reduced, or marked as a low confidence factor, and the candidate faulty path is added to the "review pool".

[0118] ②Policy Network Updated training: The on-site feedback (path success = 1, failure = 0) is used as a reward signal, and the parameters are returned to the policy network to perform reinforcement learning updates on the policy network:

[0119] in, Let the objective function of the policy network be... For the parameters of the policy network Find the gradient. For path reward functions, the following can be taken: , b To reduce variance, the baseline parameter can be selected as follows: , z =1,2,..., n . ( p ) is the path p The probability of occurrence As expected.

[0120] This invention constructs a closed-loop feedback mechanism that can update the knowledge graph and policy network based on the fault reasoning results and the fault verification results fed back from the field. This enables the reasoning method to have continuous learning capabilities and adapt to new working conditions, unknown faults, and equipment changes, thereby improving the accuracy and stability of reasoning. It also has stronger generalization ability, interpretability, and long-term adaptability.

[0121] It should be noted that the above steps are not strictly performed in the order described by the numbers; they should be understood as a whole.

[0122] Example 3 Please see Figure 3 , Figure 3 A schematic diagram of a fault diagnosis system based on a knowledge graph of auxiliary equipment in a hydropower plant, provided as an embodiment of the present invention, is shown. The system includes: Data acquisition module 310 is used to extract fault logs and equipment operating status data when a fault occurs; The starting point determination module 320 is used to determine the starting point for fault reasoning in the knowledge graph based on fault logs and operating status data. The path reasoning module 330 is used to predict the action probability of fault path selection using a policy network. Starting from the fault reasoning starting point, it searches for fault paths in the knowledge graph based on the action probability to obtain multiple candidate fault paths. The fault attribution module 340 calculates the confidence level of each candidate fault path and selects the fault cause corresponding to the end node of at least one candidate fault path with the highest confidence level as the fault diagnosis result.

[0123] The fault diagnosis system based on the knowledge graph of hydropower plant auxiliary equipment described above and the fault diagnosis method based on the knowledge graph of hydropower plant auxiliary equipment described above can be referred to each other.

[0124] Example 4 Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440. The processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions stored in the memory 430 to execute the fault diagnosis method based on a knowledge graph of auxiliary equipment in a hydropower plant provided in the above embodiments.

[0125] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0126] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute a fault diagnosis method based on a knowledge graph of auxiliary equipment in a hydropower plant provided in the above-described method embodiments.

[0127] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform a fault diagnosis method based on a knowledge graph of auxiliary equipment in a hydropower plant provided by the methods described above.

[0128] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0129] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A fault diagnosis method based on a knowledge graph of auxiliary equipment in a hydropower plant, characterized in that, include: Extract the fault logs and equipment operating status data at the time of the fault; Based on the fault log and the operating status data, determine the starting point for fault reasoning in the knowledge graph; A policy network is used to predict the action probability of fault path selection. Starting from the fault inference starting point, a fault path search is performed in the knowledge graph according to the action probability to obtain multiple candidate fault paths. Calculate the confidence level of each candidate fault path, and select the fault cause corresponding to the terminal node of at least one candidate fault path with the highest confidence level as the fault diagnosis result.

2. The fault diagnosis method based on the knowledge graph of hydropower plant auxiliary equipment according to claim 1, characterized in that, The step of determining the starting point for fault reasoning in the knowledge graph based on the fault log and the operational status data includes: Extract the semantic vector representation of the fault log, and extract the running status vector corresponding to the running status data; Calculate the comprehensive similarity between the semantic vector representation, the running state vector, and the semantic embedding vector and running state vector of each node in the knowledge graph; wherein, the running state vector of each node in the knowledge graph is constructed based on the running state data of the device corresponding to each node; Select the nodes with the highest overall similarity as multiple fault inference starting points, and form a set of fault inference starting points.

3. The fault diagnosis method based on the knowledge graph of hydropower plant auxiliary equipment according to claim 1, characterized in that, The method employs a policy network to predict the action probability for fault path selection. Starting from the fault inference starting point, it searches the knowledge graph based on the action probability to obtain multiple candidate fault paths, including: The initial candidate paths in the knowledge graph, starting from each of the fault reasoning starting points, are encoded to obtain path encoding vectors corresponding to each initial candidate path; wherein, the initial candidate path is represented by a sequence of nodes, edges, and nodes. Given that the path encoding vectors corresponding to each initial candidate path are known, a policy network is used to calculate the action probability of the next node of each initial candidate path from the knowledge graph. Actions are filtered from the action space of each initial candidate path according to the action probability, and the initial candidate paths are expanded according to the action filtering results to generate candidate fault paths corresponding to each initial candidate path.

4. The fault diagnosis method based on the knowledge graph of hydropower plant auxiliary equipment according to claim 3, characterized in that, The step of filtering actions from the action space of each initial candidate path according to the action probability to generate candidate fault paths corresponding to each initial candidate path includes: Action space constraints are set to generate the action space for each initial candidate path; wherein, the action space constraints include topological adjacency constraints and semantic similarity constraints between the end node of the initial candidate path and the next node; For each initial candidate path, multiple action samples are taken from the action space according to the action probability, and the action obtained from each action sample is added to the initial candidate path for path expansion until a preset termination condition is reached, thereby obtaining the candidate fault path corresponding to the initial candidate path.

5. The fault diagnosis method based on the knowledge graph of hydropower plant auxiliary equipment according to claim 4, characterized in that, The calculation of the confidence level for each of the candidate fault paths includes: Calculate the probability distribution of each candidate fault path before and after path expansion, and determine the information gain of the candidate fault path based on the probability distribution before and after path expansion. The path uncertainty is determined based on the confidence level of each edge in the candidate fault path; The confidence level of the candidate fault path is calculated based on the information gain and the path uncertainty.

6. The fault diagnosis method based on the knowledge graph of hydropower plant auxiliary equipment according to claim 5, characterized in that, The step of calculating the probability distribution of each candidate fault path before and after path expansion, and determining the information gain of the candidate fault paths based on the probability distribution before and after path expansion, includes: Based on the comprehensive similarity corresponding to each fault inference starting point in the fault inference starting point set, determine the probability distribution of each fault inference starting point before path expansion; Based on the prior knowledge in the knowledge graph, the path evidence score of each candidate fault path after path expansion is determined; wherein, the prior knowledge is the reasonableness score of the knowledge triple in which the end node of the candidate fault path is located. The posterior distribution of each candidate fault path after path expansion is determined based on the comprehensive similarity and the path evidence score corresponding to each fault inference starting point. The information gain of the candidate fault path is calculated based on the probability distribution before path expansion and the posterior distribution after path expansion.

7. The fault diagnosis method based on the knowledge graph of hydropower plant auxiliary equipment according to claim 1, characterized in that, The method further includes: The fault diagnosis results are pushed to the operation and maintenance personnel, and the fault verification results of the operation and maintenance personnel are obtained. The confidence of edges in each candidate fault path in the knowledge graph is updated based on the fault verification results, and the policy network is updated and trained based on the fault verification results.

8. A fault diagnosis system based on a knowledge graph of auxiliary equipment in a hydropower plant, characterized in that, include: The data acquisition module is used to extract fault logs and equipment operating status data when a fault occurs; The starting point determination module is used to determine the starting point for fault reasoning in the knowledge graph based on the fault log and the running status data. The path reasoning module is used to predict the action probability of fault path selection using a policy network. Starting from the fault reasoning starting point, it searches for fault paths in the knowledge graph based on the action probability to obtain multiple candidate fault paths. The fault attribution module calculates the confidence level of each candidate fault path and selects the fault cause corresponding to the terminal node of at least one candidate fault path with the highest confidence level as the fault diagnosis result.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the fault diagnosis method based on the knowledge graph of auxiliary equipment of hydropower plants as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the fault diagnosis method based on the knowledge graph of hydropower plant auxiliary equipment as described in any one of claims 1 to 7.