Associative Fault Diagnosis Inference Method and System Based on TransH Model
By decomposing the fault mode of the fault phenomenon into multiple fault elements and using the TransH model to vectorize the fault knowledge graph, the problem of insufficient comprehensive fault diagnosis in the existing technology is solved, and a comprehensive fault cause diagnosis of the fault phenomenon is achieved.
Patent Information
- Application Number
- CN202510468631.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-04-15
AI Technical Summary
It is difficult for the existing technology to query all the causes of failures based on the fault phenomenon, resulting in insufficient comprehensive fault diagnosis.
The associated fault diagnosis and inference method based on the TransH model is used to decompose the fault mode of each fault phenomenon into multiple fault elements, and multiple fault causes are queried for each fault element, thereby building an initial fault knowledge graph, and vectorizing entities and edges through the TransH model to generate fault vector knowledge graphs to support diagnosis.
It can diagnose comprehensive causes of faults based on fault phenomena, provide comprehensive reference for maintenance personnel, and improve the accuracy and comprehensiveness of fault diagnosis.
Smart Images

Figure CN119990344B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method and system for associated fault diagnosis reasoning based on the TransH model, and belongs to the technical field of fault prediction and health management. Background Art
[0002] In the field of aerospace, with the continuous improvement of the functions and efficacy of equipment, the structure and functions of avionics equipment have become increasingly complex, and the difficulty of maintaining and repairing avionics equipment has also increased significantly. Therefore, at the present stage, in order to ensure the normal operation of aviation equipment, improve the reliability of aviation equipment, accurately locate and solve faults in a timely manner when a fault occurs, and predict faults in a timely manner before a fault occurs has become one of the important research topics.
[0003] The Chinese patent application with the publication number CN108509483A discloses a method for constructing a mechanical fault diagnosis knowledge base based on a knowledge graph, which includes the following steps: 1) Knowledge collection and collation: Mechanical fault diagnosis knowledge exists in various structured and unstructured diagnostic reports and case bases, and these contents need to be uniformly collected and collated as the basis for knowledge construction; 2) Constructing a triple dataset: Based on the construction mode of the knowledge graph, the collected and collated fault diagnosis knowledge is represented in the form of entity-relationship-entity triples, and a knowledge graph for mechanical fault diagnosis is established; 3) Determining the embedding dimension: According to the content and scale of the dataset, determine the embedding dimension of the knowledge representation; 4) Initializing vectors: Initialize the triples into vectors of a determined dimension; 5) Constructing training samples: Use the correct triples as positive sampling samples, and replace the head entity or tail entity of the correct triples to construct negative sampling samples, and use the constructed sampling samples as the input for training the model; 6) Using SGD for training and learning: Train and learn to obtain the triple representation vectors; 7) Using the test set to test the vectorized representation results of the triples.
[0004] However, the technical solution disclosed in this patent application cannot query out all the fault causes for a fault phenomenon. Summary of the Invention
[0005] To overcome the shortcomings of the prior art, the present invention provides a method and system for associated fault diagnosis reasoning based on the TransH model, which decomposes the fault mode of each fault phenomenon into multiple fault elements, and queries out multiple fault causes for each fault element, so as to be able to diagnose comprehensive fault causes for the fault phenomenon.
[0006] To achieve the above-mentioned invention purpose, the present invention provides a method for associated fault diagnosis reasoning based on the TransH model, which includes the following steps:
[0007] Step 1: Sort out the fault modes for each fault phenomenon of the system based on expert experience, divide each fault mode into multiple fault elements, sort out the fault causes for each fault element, take the fault phenomenon, fault element, and fault cause as entities, and construct an initial fault knowledge graph with the relationships between them as edges;
[0008] Step 2: Use the TransH model to vectorize the entities and edges in the initial fault knowledge graph to obtain a fault vector knowledge graph;
[0009] Step 3: Obtain the fault phenomenon to be detected, and query the vector value of this fault phenomenon from the mapping table of entities and vectors;
[0010] Step 4: Divide the entities in the fault vector knowledge graph into multiple regions according to the related fault phenomena, fault elements, and fault causes, calculate the similarity between the fault phenomenon to be detected and the entities in multiple regions in parallel, respectively obtain the entities in multiple regions that are most similar to this fault phenomenon, and obtain multiple better similarities; sort the multiple better similarities, obtain the entity and region with the maximum similarity, and regard the entity set directly connected by the edge of the entity with the maximum similarity as the one-hop entity set connected by the relationship of this fault phenomenon to be detected.
[0011] To achieve the above invention purpose, the present invention also provides a system, which includes a storage medium and one or more processors. The storage medium stores a computer program, and the computer program is called by one or more processors to implement the above-mentioned related fault diagnosis and reasoning method based on the TransH model.
[0012] Compared with the prior art, the related fault diagnosis and reasoning method and system based on the TransH model provided by the present invention can diagnose comprehensive fault causes for fault phenomena by decomposing the fault modes of each fault phenomenon into multiple fault elements and querying multiple fault causes for each fault element, providing comprehensive reference for maintenance personnel. Brief Description of the Drawings
[0013] Figure 1 is a flowchart of the related fault diagnosis and reasoning method based on the TransH model provided by the present invention. Detailed Embodiments
[0014] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0015] Figure 1This is the flowchart of the associated fault diagnosis reasoning method based on the TransH model provided by the present invention. As Figure 1 shown, the associated fault diagnosis reasoning method based on the TransH model provided by the present invention includes the following steps:
[0016] Step 1: According to expert experience, sort out the fault modes for each fault phenomenon of the system , divide each fault mode into multiple fault elements , sort out multiple fault causes for each fault element , and take the fault phenomenon , fault element , and fault cause as entities. The relationship between the fault phenomenon and the fault element , and the relationship between the fault element and the fault cause are used as edges to construct an initial fault knowledge graph, where M, N, and J are positive integers greater than or equal to 2;
[0017] Step 2: Use the TransH model to vectorize the relationships and edges in the initial fault knowledge graph to obtain a fault vector knowledge graph;
[0018] Step 3: Obtain the fault phenomenon to be detected, and query the vector value of this fault phenomenon from the mapping table ;
[0019] Step 4: According to the vector value of the fault phenomenon to be detected , calculate the similarity between the fault phenomenon to be detected and the entities in the fault vector knowledge graph. The set of entities directly connected by the relationship to the entity in the fault vector knowledge graph with the highest similarity to the fault phenomenon to be detected is regarded as the one-hop entity set connected by the relationship of the fault phenomenon to be detected, denoted as , where calculating the similarity between the fault phenomenon to be detected and the entities in the fault vector knowledge graph specifically includes the following steps: Divide the entities in the fault vector knowledge graph into P regions according to the related fault phenomena, fault elements, and fault causes, and calculate the similarity between the fault phenomenon to be detected and the entities in the P regions in parallel, respectively obtain the entities with the highest similarity to the fault phenomenon in the P regions to get P better similarities; Sort the P better similarities to obtain the entity and region with the maximum similarity, where K and P are positive integers greater than or equal to 2.
[0020] The associated fault diagnosis reasoning method based on the TransH model provided by the present invention further includes the following steps:
[0021] Step 5: Query each entity in the one-hop entity set in the fault vector knowledge graph Entities directly connected by edges are used as the two-hop entity set of the to-be-detected fault phenomenon ,
[0022] In the formula, represents the entity set obtained by subtracting entity from the entities directly connected by edges to entity , that is, the entity set obtained by subtracting the return flow entities from the entities directly connected by edges between the entities in the one-hop entity set and the entities in the two-hop entity set.
[0023] By analogy, query the entities directly connected by edges to each entity in the (r - 1)-hop entity set E r in the fault vector knowledge graph and subtract the return flow entities as the r-hop entity set of the to-be-detected fault phenomenon. After multiple inferences like this, the fault vector knowledge graph can diagnose comprehensive fault causes for the fault phenomenon.
[0024] The association fault diagnosis and reasoning method based on the TransH model provided by the present invention further includes the following steps:
[0025] Step 6: Export the correspondence between entities, relationships, and vectors in the fault vector knowledge graph to obtain a mapping table
[0026] In the fault reasoning method of the TransH model provided by the present invention, using the TransH model to vectorize entities and edges in the initial fault knowledge graph to obtain a fault vector knowledge graph specifically includes:
[0027] S1-1 Use the TransH model to perform initial quantization on entities and edges in the initial fault knowledge graph to obtain an initial fault vector knowledge graph, specifically including:
[0028] S1-1-1: Two entities and a relationship with a relationship in the initial fault knowledge graph form a fault triple;
[0029] S1-1-2: Extract all entities in the initial fault knowledge graph to form an entity encoding, extract all relationships in the initial fault knowledge graph to form a relationship encoding, the size of the entity set is , and the size of the relationship set is ;
[0030] S1-1-3: Randomly initialize the embedding vectors of entities to obtain an entity embedding matrix : ; Randomly initialize the embedding vectors of relationships to obtain a relationship embedding matrix R: ; Initialize the hyperplane normal vector of each relationship and perform normalization to obtain a normalized normal vector matrix W: , where d is the embedding dimension;
[0031] S1-1-4: Extract the head entity vector h and the tail entity vector from the entity embedding matrix , and extract the relation vector from the relation embedding matrix . Extract the corresponding normal vector from the normal vector matrix . Calculate the projections of the head entity vector h and the tail entity vector t on the hyperplane according to the following formula: ,
[0032] ,
[0033] where T represents the transpose;
[0034] S1-1-5: Calculate the positive loss function according to the following formula:
[0035] ,
[0036] where represents the second norm, represents the projection vector of the vector h on the hyperplane; represents the projection vector of the vector t on the hyperplane;
[0037] S1-1-6: Construct negative samples by randomly replacing the head entity vector or the tail entity vector in the faulty triple vector to generate fake triple vectors , , ;
[0038] S1-1-7: Calculate the negative loss function according to the following formula:
[0039] ,
[0040] where is the projection of the relation vector r on the hyperplane; represents the projection of the vector on the hyperplane; represents the projection of the vector on the hyperplane;
[0041] S1-1-8: Traverse the set of faulty triple vectors in the initial faulty knowledge graph and the set of fake triple vectors in the initial faulty knowledge graph, and use the following formula to find the first loss :
[0042] ,
[0043] In the formula, denotes taking the positive part; D is the set of real existing triples, is the set of false triples, is a hyperparameter;
[0044] S1-1-9: Perturb the vectors of the fault triples and the vectors of the false triples in the initial fault knowledge graph, and calculate the second loss through the following formula:
[0045]
[0046] In the formula, is the perturbation amount;
[0047] S1-1-10: Use the gradient descent method to update the values of the head entity vector h, the tail entity vector t, and the relation vector r, and judge whether the total loss is the smallest. If the total loss reaches the minimum, use the vector of the test fault triples for verification. If the verification is qualified, the entities and relationships in the initial fault knowledge graph are assigned fixed vectors, and the optimized entity embedding matrix , the relation embedding matrix and the normal vector matrix are obtained, and then the initial fault vector knowledge graph is obtained. If the total loss L does not reach the minimum, the updated values of the head entity vector h, the tail entity vector t, and the relation vector r are used to replace the values before the update, and then return to step S1-1-4.
[0048] Through the above technical solutions, all entities and relationships in the initial fault knowledge graph are quantified in the present invention, and fixed vectors are assigned to each entity and relationship in the initial fault knowledge graph, thereby laying a foundation for diagnosing comprehensive fault causes for fault phenomena.
[0049] In the present invention, using the TransH model to vectorize the entities and edges in the initial fault knowledge graph to obtain the fault vector knowledge graph further includes:
[0050] S1-2: Obtain any entity in the initial fault vector knowledge graph, whose vector is , and calculate the second norm of the distance between the projection of the vector of the entity and the vectors of other entities in the initial fault vector knowledge graph on the hyperplane:
[0051] ,
[0052] In the formula, ; is the projection vector of the vector on the hyperplane; is the projection vector of the vector on the hyperplane;
[0053] S1-3: Obtain all entities less than the set value , , and connect those related to with all entities less than the set value , and calculate the relationship vector between them;
[0054] S1-4: Repeat steps S1-2 and S1-3, and traverse all entities in the initial fault vector knowledge graph to obtain the first fault vector knowledge graph.
[0055] In the present invention, by relating each fault phenomenon to multiple fault elements and each fault element to multiple fault causes, it is possible to diagnose comprehensive fault causes for the fault phenomenon.
[0056] In the present invention, the steps of vectorizing the entities and edges in the initial fault knowledge graph by using the TransH model to obtain the fault vector knowledge graph further include the following steps:
[0057] S1-5: Obtain a new fault phenomenon , calculate the similarity between the new fault phenomenon and all entities in the first fault vector knowledge graph , , if the similarity is greater than or equal to the threshold, then use the fault phenomenon as an entity, and connect it through an edge to the entity connected to the entity , adjust the vector of the entity according to the similarity as the vector of the fault phenomenon , adjust the vector of the edge connecting the entity and the entity it is connected to according to the similarity as the vector of the edge connecting the fault phenomenon and the entity connected to the entity ; if the similarity Less than the threshold value, according to expert experience, sort out new fault modes for this new fault phenomenon, decompose the new fault modes into multiple new fault elements, sort out multiple new fault causes for the new fault elements, and then construct a new initial fault knowledge graph, that is, use the new fault phenomenon, new fault elements and new fault causes as entities, and the relationships between the new fault phenomenon and new fault elements, and the relationships between the new fault elements and new fault causes as edges to construct a new initial fault knowledge graph; then use the TransH model to vectorize the entities and edges of the new initial fault knowledge graph to obtain the second fault vector knowledge graph, and fuse the first fault vector knowledge graph and the second fault vector knowledge graph to obtain the fault vector knowledge graph.
[0058] In the present invention, fusing the first fault vector knowledge graph and the second fault vector knowledge graph to obtain the fault vector knowledge graph includes the following steps:
[0059] S1-5-1: Obtain any entity in the first fault vector knowledge graph , and its vector is : Obtain any entity in the second fault vector knowledge graph , and its vector is ;
[0060] Calculate the two-norm of the distance between the projection of the vector of entity on the hyperplane and the vector of entity through the following formula:
[0061] ,
[0062] In the formula, is the projection vector of vector on the hyperplane; is the projection vector of vector on the hyperplane;
[0063] S1-5-2: Obtain all entities in the second fault vector knowledge graph that are less than the set value, and obtain the entity set , , is the size of the entity set in the second fault knowledge graph, and connect with all entities in to calculate their relationship vectors;
[0064] S1-5-3: Repeat step S1-5-1 and step S1-5-2, and traverse all entities in the first fault vector knowledge graph to obtain the fault vector knowledge graph.
[0065] Through the above technical solutions, the present invention can fuse multiple fault vector knowledge graphs with more than or equal to 2, without having to re-quantify the spliced fault knowledge graph.
[0066] Optionally, in the associated fault diagnosis and reasoning method based on the TransH model provided by the present invention, according to the vector value of the to-be-detected fault phenomenon , calculating the similarity between the to-be-detected fault phenomenon and the entities in the fault vector knowledge graph specifically includes:
[0067] S2-1: Project the vector value of the to-be-detected fault phenomenon as the head entity onto the hyperplane to obtain , take all entities in the fault vector knowledge graph as the tail entities, and the vector of the tail entity projected onto the hyperplane is ;
[0068] S2-2: Obtain the entity with the highest similarity to the to-be-detected fault phenomenon in the fault vector knowledge graph through the following formula:
[0069] .
[0070] To achieve the above object of the present invention, the present invention further provides a system, which includes a storage medium and one or more processors. The storage medium stores a computer program, and the computer program is called by the one or more processors to implement the above-mentioned associated fault diagnosis and reasoning method based on the TransH model.
[0071] To achieve the above object of the present invention, the present invention further provides a computer program product, which compiles the above-mentioned associated fault diagnosis and reasoning method based on the TransH model into a computer program called and executed by one or more processors using a computer language.
[0072] The preferred embodiments of the present invention disclosed above are only used to help illustrate the present invention. The preferred embodiments do not elaborate on all details, nor do they limit the present invention to only the specific embodiments described. Obviously, according to the content of this specification, many modifications and changes can be made. This specification selects and specifically describes these embodiments to better explain the principle and practical application of the present invention, so that those skilled in the art can understand and utilize the present invention well. The technical solutions formed by partial combinations of the steps disclosed in the present invention also fall within the scope of the present invention disclosed. The present invention is only limited by the claims and their full scope and equivalents.
Claims
1. A correlation fault diagnosis reasoning method based on TransH model, characterized in that: The steps include: Step 1: Based on expert experience, sort out the fault mode for each fault phenomenon of the system, divide each fault mode into multiple fault elements, sort out the fault cause for each fault element, and build an initial fault knowledge graph based on the fault phenomenon, fault element and fault cause; Step 2: Use the TransH model to vectorize the entities and edges in the initial fault knowledge graph to obtain the fault vector knowledge graph, including: vectorizing the fault triples in the initial fault knowledge graph and the false triple vector Perform the perturbation and calculate the second loss by the following formula: , In the formula, is the disturbance amount; D is the set of real triples, is a set of false triples, is a hyperparameter; The gradient descent method is used to update the values of the head entity vector h, the tail entity vector t and the relationship vector r, and to determine whether the total loss is the minimum. If the total loss is the minimum, the vector of the test fault triple is used for verification. If the verification is qualified, the entities and relationships in the initial fault knowledge graph are assigned fixed vectors to obtain the initial fault vector knowledge graph. Step 3: Obtain the fault phenomenon to be detected, and query the vector value of the fault phenomenon from the mapping table between entities and vectors; Step 4: Divide the fault phenomena, fault elements and fault causes related to the entities in the fault vector knowledge graph into multiple regions, calculate the similarity between the fault phenomenon to be detected and the entities in multiple regions in parallel, obtain the entities most similar to the fault phenomenon in multiple regions respectively, and obtain multiple better similarities; sort the multiple better similarities, obtain the entity with the maximum similarity and its region, and all entities directly connected to the entity with the maximum similarity through edges are regarded as the one-hop entity set connected to the fault phenomenon to be detected through edges.
2. The associated fault diagnosis reasoning method based on the TransH model according to claim 1 is characterized in that: Also includes: Step 5: Query the fault vector knowledge graph for all entities directly connected to each entity in the one-hop entity set through edges as the two-hop entity set of the fault phenomenon to be detected. The two-hop entity set is the entity set obtained by subtracting the return flow entities from the entities directly connected to the entities in the one-hop entity set through edges.
3. The associated fault diagnosis reasoning method based on the TransH model according to claim 1 is characterized in that: The TransH model is used to vectorize the entities and edges in the initial fault knowledge graph to obtain the fault vector knowledge graph, which specifically includes: S1-1 uses the TransH model to initially quantify the relationships and edges in the initial fault knowledge graph to obtain the initial fault vector knowledge graph; S1-2: Get any entity in the initial fault vector knowledge graph , whose vector is , the entity is calculated by the following formula Vector and other entities in the initial fault vector knowledge graph Vector The bi-norm of the distance of the projection on the hyperplane, : , In the formula, represents the two-norm, For vector Projection vector on the hyperplane; For vector Projection vector on the hyperplane; S1-3: Acquisition All entities that are less than the set value , , and will be and All entities smaller than the set value Connect them and calculate the relationship vector between them. is the size of the entity set in the initial vector knowledge graph; S1-4: Repeat steps S1-2 and S1-3 to traverse all entities in the initial fault vector knowledge graph to obtain a first fault vector knowledge graph.
4. The associated fault diagnosis reasoning method based on the TransH model according to claim 3 is characterized in that: Using the TransH model to vectorize the entities and edges in the initial fault knowledge graph to obtain the fault vector knowledge graph also includes the following steps: S1-5: Get new fault symptoms , calculate the new fault phenomenon Any entity in the knowledge graph with the first fault vector Similarity , ; If the similarity If it is greater than or equal to the threshold, the fault phenomenon as entities and connected to them by edges and Connected entities are connected, and the entities The vector is adjusted according to the similarity as the fault phenomenon A vector that connects the entities The edge vectors of the entities connected to it are adjusted according to the similarity as a connection failure phenomenon and entities The vector of the edge of the connected entities; if the similarity When the fault rate is less than the threshold, a new fault mode for the new fault phenomenon is sorted out based on expert experience, and the new fault mode is decomposed into multiple new fault elements. Multiple new fault causes are sorted out for the new fault elements, and then a new initial fault knowledge graph is constructed. Then, the TransH model is used to vectorize the entities and edges of the new initial fault knowledge graph to obtain the second fault vector knowledge graph.
5. The associated fault diagnosis reasoning method based on the TransH model according to claim 4 is characterized in that: Using the TransH model to vectorize entities and edges in the initial fault knowledge graph to obtain a fault vector knowledge graph also includes: fusing the first fault vector knowledge graph and the second fault vector knowledge graph to obtain a fault vector knowledge graph.
6. The associated fault diagnosis reasoning method based on the TransH model according to claim 5 is characterized in that: The steps of fusing the first fault vector knowledge graph and the second fault vector knowledge graph to obtain the fault vector knowledge graph include: S1-5-1: Get any entity in the first fault vector knowledge graph , whose vector is ; Get any entity in the second fault vector knowledge graph , whose vector is ; The entity is calculated by Vectors and entities The bi-norm of the distance between the projection of a vector on the hyperplane: , In the formula, For vector Projection vector on the hyperplane; For vector Projection vector on the hyperplane; S1-5-2: Obtained from the second fault vector knowledge graph All entities less than the set value, get the entity set , , is the entity set size in the second fault knowledge graph, and and Connect all entities in and calculate the relationship vector between them; S1-5-3: Repeat steps S1-5-1 and S1-5-2, and traverse all entities in the first fault vector knowledge graph to obtain a fault vector knowledge graph.
7. The associated fault diagnosis reasoning method based on the TransH model according to claim 6 is characterized in that: The following steps are also included: Step 6: Derive the correspondence between entities, relations, and vectors in the fault vector knowledge graph to obtain a mapping table.
8. A system, characterized in that: It comprises a storage medium and one or more processors, wherein the storage medium stores a computer program, and the computer program is called by one or more processors to implement the associated fault diagnosis reasoning method based on the TransH model as described in any one of claims 1-7.
Citation Information
Patent Citations
Knowledge graph-based mechanical fault diagnosis knowledge base construction method
CN108509483A
Fault judgment method and device, electronic equipment, storage medium and product
CN113672743A
Cultural relic security risk factor identification method based on knowledge graph completion model
CN115099504A