Knowledge graph-based fault positioning method, device and equipment, and storage medium
By constructing entity relationships in a knowledge graph, and using feature vectors and fault propagation probability graphs, we can search for suspected faulty entities in both forward and reverse directions. This solves the problem of low fault location accuracy in existing technologies and achieves higher accuracy in fault location.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-06
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies have low accuracy in fault location, fail to fully integrate historical data between the fault and potentially faulty components, and only predict the forward propagation of risk without performing reverse search, resulting in inaccurate prediction results.
By extracting entity relationship pairs from the knowledge graph, feature vectors are constructed, and a fault propagation probability graph is built using a prediction model to search for suspected faulty entities in both forward and reverse directions. Historical data is then used for localization.
The accuracy of fault location has been improved through comprehensive entity relationship analysis.
Smart Images

Figure CN116069874B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault location technology, and in particular to a fault location method, apparatus, device, and storage medium based on knowledge graphs. Background Technology
[0002] With the development of the industrial sector, industrial systems involve a large number of software and hardware systems, and each software and hardware system is highly complex. Various failures are inevitable during operation. Once a failure occurs, it is necessary to locate the faulty entity. Based on the efficiency and accuracy of fault location, the fault location has shifted from manual analysis and location by maintenance personnel to fault location by intelligent devices. Both the efficiency and accuracy of location have been improved.
[0003] In fault location technologies, the semantic similarity between alarm information and keywords in a pre-established knowledge graph can be used to determine the fault problem corresponding to the alarm information. Then, the faulty component can be located based on the fault problem. However, this approach fails to fully integrate historical data between the fault problem and potentially faulty components, neglecting basic information about the same faulty component at different points in time, thus affecting the accuracy of fault location. Furthermore, while a knowledge graph of the relationships between objects under test can be used to obtain the probability of risk propagation between them, and predictions can be made based on the objects experiencing risk, other potentially risky objects are also possible. However, this approach only predicts the forward propagation of risk, neglecting the reverse search of network risks, leading to inaccurate prediction results. In summary, fault location technologies still suffer from low accuracy. Summary of the Invention
[0004] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments, but rather as a prelude to the detailed description that follows.
[0005] In view of the shortcomings of the prior art described above, the present invention discloses a fault location method, apparatus, device and storage medium based on knowledge graph, so as to solve the technical problem of low location accuracy in fault location.
[0006] This invention discloses a fault location method based on knowledge graphs, the method comprising:
[0007] Extract all entity relationship pairs from the knowledge graph, where each entity relationship pair includes two entities that are associated.
[0008] Each entity relationship pair is used to construct features to obtain a feature vector corresponding to each entity relationship pair.
[0009] Input all the feature vectors into the prediction model to obtain the fault propagation probability between the two entities in each entity relationship pair, and construct a fault propagation probability map based on each fault propagation probability.
[0010] Based on the position of the fault manifestation entity in the fault propagation probability map, with the position of the fault manifestation entity as the center, forward suspected fault entities and reverse suspected fault entities are searched to obtain the target suspected fault entity. The target suspected fault entity includes all forward suspected fault entities and all reverse suspected fault entities.
[0011] In one embodiment of the present invention, feature construction for the entity relationship pairs includes:
[0012] Obtain the first attribute features, first operation and maintenance features, and first graph network features of the first entity in each entity relationship pair at the target time, the second attribute features, second operation and maintenance features, and second graph network features of the second entity at the target time, and the relationship features between the first entity and the second entity;
[0013] Based on the first attribute feature, the first operation and maintenance feature, the first graph network feature, the second attribute feature, the second operation and maintenance feature, the second graph network feature, and the relationship feature, a feature vector is constructed for each entity relationship pair.
[0014] In one embodiment of the present invention, obtaining the prediction model includes:
[0015] Extract all entity relationship pairs from the knowledge graph, and obtain fault samples for each entity relationship pair at different historical times based on the fault occurrence of the two entities in each entity relationship pair at different historical times;
[0016] By combining the fault samples of each entity relationship pair at different historical moments, a historical feature vector of each entity relationship pair at different historical moments is constructed.
[0017] The historical feature vectors are input into the learning model, and the learning model is trained and optimized to obtain the prediction model.
[0018] In one embodiment of the present invention, constructing the historical feature vector for each entity relationship pair at the different historical moments includes:
[0019] In each entity relationship pair, the first entity has a first historical attribute feature, a first historical operation and maintenance feature, and a first historical graph network feature at different historical moments; the second entity has a second historical attribute feature, a second historical operation and maintenance feature, and a second historical graph network feature at different historical moments; and the historical relationship features between the first entity and the second entity are also included.
[0020] Based on the first historical attribute features, the first historical operation and maintenance features, the first historical graph network features, the second historical attribute features, the second historical operation and maintenance features, the second historical graph network features, and the historical relationship features, a historical feature vector is constructed for each entity relationship pair.
[0021] In one embodiment of the present invention, based on the position of the fault manifestation entity in the fault propagation probability map, the forward search for suspected fault entities centered on the position of the fault manifestation entity includes:
[0022] Based on the location of the fault manifestation entity, find the first positive entity relationship pair containing the fault manifestation entity in the fault propagation probability graph;
[0023] Based on the preset fault propagation probability threshold of each entity relationship pair, the first positive entity whose fault propagation probability of the first positive entity relationship pair is greater than the fault propagation probability threshold of the first positive entity relationship pair is regarded as the first positive suspected fault entity.
[0024] Continue forward searching for the second positive entity relationship pair containing the first positive suspected fault entity, perform fault propagation probability judgment, obtain the second positive suspected fault entity, continue forward searching and probability judgment to obtain other positive suspected fault entities, until all the positive suspected fault entities are obtained.
[0025] In one embodiment of the present invention, based on the position of the fault manifestation entity in the fault propagation probability map, the reverse search for suspected fault entities, centered on the position of the fault manifestation entity, includes:
[0026] Based on the location of the fault manifestation entity, find the first reverse entity relationship pair containing the fault manifestation entity in the fault propagation probability graph;
[0027] Based on the preset fault propagation probability threshold of each entity relationship pair, the first reverse entity whose fault propagation probability of the first reverse entity relationship pair is greater than the fault propagation probability threshold of the first reverse entity relationship pair is regarded as the first reverse suspected fault entity.
[0028] Continue to reverse search for the second reverse entity relationship pair containing the first reverse suspected fault entity, perform fault propagation probability judgment, obtain the second reverse suspected fault entity, continue to reverse search and probability judgment to obtain other reverse suspected fault entities, until all the reverse suspected fault entities are obtained.
[0029] In one embodiment of the present invention, constructing and obtaining the knowledge graph includes:
[0030] Identify the operational relationships between entities, and construct all entity relationship pairs based on the operational relationships;
[0031] Based on all the entity relationship pairs, the knowledge graph is constructed and obtained.
[0032] In one embodiment of the present invention, after obtaining the knowledge graph, the method further includes:
[0033] The knowledge graph is updated based on the changes in the relationship between the two entities.
[0034] The present invention also discloses a fault location device based on a knowledge graph, the device comprising:
[0035] The extraction module is used to extract all entity relationship pairs in the knowledge graph, wherein the entity relationship pair includes two entities that are associated.
[0036] The first construction module is used to construct features for the entity relationship pairs respectively, and obtain the feature vector corresponding to each entity relationship pair;
[0037] The second construction module is used to input all the feature vectors into the prediction model, obtain the fault propagation probability between the two entities in each entity relationship pair, and construct a fault propagation probability map based on each fault propagation probability.
[0038] The positioning module is used to locate the target suspected fault entity based on the position of the fault manifestation entity in the fault propagation probability map, and to search for the forward suspected fault entity and the reverse suspected fault entity with the position of the fault manifestation entity as the center. The target suspected fault entity includes all forward suspected fault entities and all reverse suspected fault entities.
[0039] The present invention also discloses an electronic device, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to cause the electronic device to perform the above-described method.
[0040] As described above, the automotive software flashing method, apparatus, device, and storage medium provided by the embodiments of the present invention have the following beneficial effects:
[0041] By extracting all entity relationship pairs from the knowledge graph (each pair consisting of two related entities), feature construction is performed on each entity relationship pair to obtain a feature vector for each pair. All feature vectors are then input into the prediction model to obtain the fault propagation probability between the two entities in each pair. A fault propagation probability graph is constructed based on each probability. Based on the position of the fault-manifesting entity in the graph, forward and reverse searches for suspected fault entities are performed, centered on the fault-manifesting entity's location, to obtain the target suspected fault entity. This target suspected fault entity includes all forward and reverse suspected fault entities. By comprehensively locating suspected fault entities through both forward and reverse searches, the accuracy of fault location is improved.
[0042] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0043] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0044] Figure 1 This is a schematic diagram illustrating the implementation environment of a knowledge graph-based fault location device, as shown in an exemplary embodiment of this application.
[0045] Figure 2 This is a flowchart illustrating a knowledge graph-based fault location method as an exemplary embodiment of this application;
[0046] Figure 3 This is an example diagram of a knowledge graph illustrated in an exemplary embodiment of this application;
[0047] Figure 4 This is an example diagram of a fault propagation probability diagram illustrated in an exemplary embodiment of this application;
[0048] Figure 5 This is an example diagram illustrating a forward search for suspected faulty entities, as shown in an exemplary embodiment of this application;
[0049] Figure 6 This is an example diagram illustrating a reverse lookup of suspected faulty entities, as shown in an exemplary embodiment of this application.
[0050] Figure 7This is a flowchart illustrating a specific knowledge graph-based fault location method in an exemplary embodiment of this application;
[0051] Figure 8 This is a block diagram illustrating a knowledge graph-based fault location device, as shown in an exemplary embodiment of this application.
[0052] Figure 9 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation
[0053] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and sub-samples in the embodiments can be combined with each other.
[0054] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0055] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.
[0056] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.
[0057] Unless otherwise stated, the term "multiple" means two or more.
[0058] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.
[0059] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.
[0060] For fault localization, the semantic similarity between alarm information and keywords in a pre-established knowledge graph is typically used to determine the fault issue corresponding to the alarm information, and then the component causing the fault is located based on the fault issue. Alternatively, the risk propagation probability between objects under test can be obtained from a knowledge graph of the relationships between the objects under test, and predictions can be made for other objects that may be at risk based on the object that has experienced risk. Of the two methods mentioned above, the first one does not fully integrate historical data information between the fault issue and the components that may fail, and does not adequately consider the basic information of the same faulty component at different points in time, which leads to inaccurate fault localization results. The second one only predicts the forward propagation of risk and does not perform a reverse search of network risks, which also leads to inaccurate prediction results. Therefore, low fault localization accuracy is still a problem in related fault localization technologies.
[0061] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating the implementation environment of a knowledge graph-based fault location device, as shown in an exemplary embodiment of this application. Figure 1 As shown, in an industrial system, multiple entities work together to complete an event. If the event is not completed, it indicates that one or more entities have malfunctioned, requiring the identification and repair of suspected faulty entities. Among the numerous entities, suspected faulty entities can be searched both forward and backward based on the entity exhibiting the symptoms of malfunction. For example, if entity 8 is a malfunctioning entity, entities 9, 10, 11, and 12 can be searched forward based on entity 8, and their suitability as suspected faulty entities can be determined based on certain conditions. Alternatively, entities 7, 3, and 6 can be searched backward based on entity 8, and their suitability as suspected faulty entities can be determined based on certain conditions.
[0062] To resolve the above issues, please refer to [link / reference]. Figure 2 , Figure 2 This is a flowchart illustrating a knowledge graph-based fault location method as an exemplary embodiment of this application. This method can be applied to... Figure 1The implementation environment shown is specifically executed by the client and / or server within that implementation environment. It should be understood that this method can also be applied to other exemplary implementation environments and executed by devices in other implementation environments; this embodiment does not limit the implementation environment to which the method is applicable. To address these issues, embodiments of this application propose a knowledge graph-based fault location method, a knowledge graph-based fault location device, an electronic device, and a computer-readable storage medium, which will be described in detail below.
[0063] like Figure 2 As shown, in an exemplary embodiment, the fault location method based on knowledge graphs includes at least steps S201 to S204, which are described in detail below:
[0064] Step S201: Extract all entity relationship pairs from the knowledge graph.
[0065] Among them, entity relationship pairs include two entities that have an association relationship.
[0066] It should be understood that completing an event requires the participation of multiple entities, and among these entities, there is usually a relationship between two entities. All entity relationship pairs here refer to all entity relationship pairs consisting of two related entities among all the entities involved in completing a certain event.
[0067] Please see Figure 3 , Figure 3 This is an example diagram of a knowledge graph illustrated in an exemplary embodiment of this application, such as... Figure 3 As shown, this knowledge graph contains 12 entities and 11 entity relationship pairs. Each entity relationship pair is structured as "entity—relationship—entity". Specifically, the entity relationship pair between entity 1 and entity 2 is "entity 1—connection—entity 2", the entity relationship pair between entity 2 and entity 3 is "entity 2—control—entity 3", the entity relationship pair between entity 3 and entity 8 is "entity 3—composition—entity 8", the entity relationship pair between entity 4 and entity 6 is "entity 4—composition—entity 6", and the entity relationship pair between entity 5 and entity 6 is "entity 1—connection—entity 2". The entity relationship pair consisting of Entity 5—Composition—Entity 6, Entity 6 and Entity 8 is “Entity 6—Control—Entity 8”, Entity 7 and Entity 8 is “Entity 7—Composition—Entity 9”, Entity 8 and Entity 9 is “Entity 8—Control—Entity 9”, Entity 9 and Entity 10 is “Entity 9—Composition—Entity 10”, Entity 9 and Entity 11 is “Entity 9—Control—Entity 11”, and Entity 11 and Entity 12 is “Entity 11—Composition—Entity 12”.
[0068] Step S202: Construct features for each entity relationship pair to obtain the feature vector corresponding to each entity relationship pair.
[0069] In one embodiment, feature construction for entity relationship pairs includes:
[0070] Obtain the first attribute features, first operation and maintenance features, and first graph network features of the first entity in each entity relationship pair at the target time, the second attribute features, second operation and maintenance features, and second graph network features of the second entity at the target time, and the relationship features between the first entity and the second entity;
[0071] Based on the first attribute feature, the first operation and maintenance feature, the first graph network feature, the second attribute feature, the second operation and maintenance feature, the second graph network feature, and the relationship feature, construct the feature vector for each entity relationship pair.
[0072] When locating suspected faulty entities, it is necessary to construct features for all entity relationship pairs to obtain feature vectors. For each entity relationship pair, feature construction is performed as follows: the first attribute feature of the first entity + the first operation and maintenance feature of the first entity + the first graph network feature of the first entity + the second attribute feature of the second entity + the second operation and maintenance feature of the second entity + the second graph network feature of the second entity + the relationship feature between the first entity and the second entity. The resulting constructed structure is the feature vector.
[0073] The target time is the time when the failure occurred. The entity's attribute characteristics include its material, manufacturer, production time, and specifications. The entity's operational characteristics include the number of repairs, installation time, and usage duration. The entity's graph network characteristics include its ontology type, PageRank value, in-degree, and clustering coefficient within the graph network. In this context, the entity's ontology type refers to the type of the entity's ontology. For example, a car is divided into systems such as the engine system, cooling system, suspension system, steering system, transmission system, and air conditioning system. If an entity is a spark plug, and spark plugs belong to the engine system, then the ontology type of the spark plug entity is engine system. The PageRank value of an entity is defined on a directed graph of the knowledge graph using a random walk model, i.e., a first-order Markov chain, describing the behavior of a random walker randomly visiting nodes along the directed graph. Under certain conditions, in the extreme case, the probability of visiting each node converges to a stationary distribution. The stationary probability value of each entity node is its PageRank value, representing the importance of the entity node. The in-degree and out-degree of an entity refer to the number of edges from a given entity node to other entity nodes and the number of edges from other nodes to that entity node in the knowledge graph. The clustering coefficient of an entity is a coefficient used to describe the degree to which entity nodes in a knowledge graph cluster together. The relationship characteristics between the first entity and the second entity include, but are not limited to, control and composition.
[0074] Step S203: Input all feature vectors into the prediction model to obtain the fault propagation probability between the two entities in each entity relationship pair, and construct a fault propagation probability map based on each fault propagation probability.
[0075] The feature vector of each entity relationship pair is input into the pre-trained prediction model. The prediction model outputs the failure propagation probability between the two entities in each entity relationship pair. Then, a failure propagation probability map is constructed based on each failure propagation probability. The failure propagation probability is the probability that if one entity in an entity relationship pair fails, the other entity will also fail.
[0076] Please see Figure 4 , Figure 4 This is an example diagram of a fault propagation probability diagram illustrated in an exemplary embodiment of this application, such as... Figure 4 As shown, the value between two entities represents the probability that if one entity fails, the other entity will also fail. For example, if entity 1 fails, the probability that entity 2 will also fail is 0.2; if entity 2 fails, the probability that entity 3 will also fail is 0.5.
[0077] In one embodiment, obtaining the prediction model includes:
[0078] Extract all entity relation pairs from the knowledge graph, and obtain fault samples for each entity relation pair at different historical moments based on the fault occurrence of the two entities in each entity relation pair at different historical moments.
[0079] By combining the fault samples of each entity relationship pair at different historical moments, historical feature vectors of each entity relationship pair at different historical moments are constructed respectively;
[0080] Historical feature vectors are input into the learning model, which is then trained and optimized to obtain a prediction model.
[0081] To obtain the prediction model, firstly, all entity relationship pairs in the knowledge graph need to be extracted. Secondly, based on the failure occurrence of the two entities in each entity relationship pair at different historical times, failure samples of each entity relationship pair at different historical times are obtained. Then, by combining the failure samples of each entity relationship pair at different historical times, historical feature vectors of each entity relationship pair at different historical times are constructed. Finally, the historical feature vectors are input into the learning model to train and optimize the learning model to obtain the prediction model.
[0082] The fault samples are obtained by labeling historical data. For example, at time t1, if entity 1 fails at the same time as entity 2, then the fault propagation combination of entity 1 and entity 2 at time t1 is a positive fault sample and is labeled as 1. At time t2, if entity 1 fails at the same time as entity 2, then the fault propagation combination of entity 1 and entity 2 at time t2 is a negative fault sample and is labeled as 0.
[0083] In one embodiment, constructing the historical feature vector for each entity relationship pair at different historical moments includes:
[0084] For each entity relationship pair, obtain the first historical attribute features, first historical operation and maintenance features, and first historical graph network features of the first entity at different historical moments; the second historical attribute features, second historical operation and maintenance features, and second historical graph network features of the second entity at different historical moments; and the historical relationship features between the first entity and the second entity.
[0085] Based on the first historical attribute features, the first historical operation and maintenance features, the first historical graph network features, the second historical attribute features, the second historical operation and maintenance features, the second historical graph network features, and the historical relationship features, a historical feature vector is constructed for each entity relationship pair.
[0086] For example, taking the entity relationship pair consisting of entity 1 and entity 2 as an example, there are 3 sets of fault data at 3 different historical times in the historical data of entity 1 and entity 2. The first set is that entity 1 and entity B both fail at historical time t1. Then the fault sample of the training data at historical time t1 is Y(t1) = 1, and the feature vector obtained by feature engineering is X(t1) = historical attribute features of entity 1 at historical time t1 + historical operation and maintenance features of entity 1 + historical graph network features of entity 1 + historical attribute features of entity 2 + historical operation and maintenance features of entity 2 + historical graph network features of entity 2 + historical relationship features of entity 1 and entity 2. Similarly, the second set is that entity 1 fails at historical time t2 and entity 2 does not fail. Then the fault sample of the training data at historical time t2 is Y(t2) = 1. If t1 = 0, the feature vector obtained by feature engineering is X(t2) = historical attribute features of entity 1 at historical time t2 + historical operation and maintenance features of entity 1 + historical graph network features of entity 1 + historical attribute features of entity 2 + historical operation and maintenance features of entity 2 + historical graph network features of entity 2 + relationship features between entity A and entity B; the third group is where entity 1 fails and entity 2 does not fail at historical time t3, then the fault sample of the training data at historical time t3 is Y(t3) = 0, and the feature vector obtained by feature engineering is X(t3) = historical attribute features of entity 1 at historical time t3 + historical operation and maintenance features of entity 1 + historical graph network features of entity 1 + historical attribute features of entity 2 + historical operation and maintenance features of entity 2 + historical graph network features of entity 2 + relationship features between entity A and entity B.
[0087] Step S204: Based on the position of the fault manifestation entity in the fault propagation probability map, with the position of the fault manifestation entity as the center, search for the forward suspected fault entity and the reverse suspected fault entity respectively to obtain the target suspected fault entity.
[0088] It should be understood that in a knowledge graph, the fault propagation between the two entities in each entity relationship pair can be forward or backward. For example, when entity 2 fails, entity 3 can be forward searched for to see if it is a suspected faulty entity based on the fault propagation probability between entity 2 and entity 3. At the same time, entity 1 can be backward searched for to see if it is a suspected faulty entity based on the fault propagation probability between entity 2 and entity 1.
[0089] In one embodiment, based on the position of the fault manifestation entity in the fault propagation probability map, the forward search for suspected fault entities centered on the position of the fault manifestation entity includes:
[0090] Based on the location of the fault manifestation entity, find the first positive entity relationship pair containing the fault manifestation entity in the fault propagation probability graph;
[0091] Based on the preset fault propagation probability threshold for each entity relationship pair, the first positive entity whose fault propagation probability of the first positive entity relationship pair is greater than the fault propagation probability threshold of the first positive entity relationship pair is regarded as the first positive suspected fault entity.
[0092] Continue forward searching for the second positive entity relationship pair containing the first positive suspected fault entity, perform fault propagation probability judgment, obtain the second positive suspected fault entity, continue forward searching and probability judgment to obtain other positive suspected fault entities, until all positive suspected fault entities are obtained.
[0093] Please see Figure 5 , Figure 5 This is an example diagram illustrating a forward search for suspected faulty entities, as shown in an exemplary embodiment of this application. Figure 5As shown, during the completion of an event, a sudden failure occurs. The entity exhibiting the failure is identified as entity 8. The location of entity 8 is found in the failure propagation probability graph, and the first positive entity relationship pair containing this entity is searched within the graph. This first positive entity relationship pair is an entity associated with the failure entity, specifically entity 9. Then, based on a preset failure propagation probability threshold of the entity relationship pair between entity 8 and entity 9, if the threshold is 0.4, the failure propagation probability of this entity relationship pair (0.5) is greater than the threshold. Therefore, entity 9 may be experiencing a failure. For the first positive suspected faulty entity, it should be understood that, depending on the different attributes of each entity, the preset fault propagation probability between the two entities in each entity relationship pair will be different. For example, the preset fault propagation probability of some entity relationship pairs is 0.6, that is, in the fault propagation probability diagram, the fault propagation probability of the entity relationship pair must be greater than 0.6 to determine that there is fault propagation between the two entities; while the preset fault propagation probability of some entity relationship pairs is 0.7, that is, in the fault propagation probability diagram, the fault propagation probability of the entity relationship pair must be greater than 0.7 to determine that there is fault propagation between the two entities. After identifying the first positive suspected faulty entity, the forward search continues to find the second positive entity relationship pair containing the first positive suspected faulty entity. Entities 10 and 11 are associated with entity 9, forming an entity relationship pair. If the fault propagation probability threshold between entities 9 and 10 is 0.5, and between entities 9 and 11 is 0.6, then the fault propagation probability between entities 9 and 10 (0.2) is lower than the threshold of 0.5, meaning entity 10 will not fail. Conversely, the fault propagation probability between entities 9 and 11 (0.8) is greater than the threshold of 0.6, meaning entity 11 may fail, and is thus considered the second positive suspected faulty entity. The forward search and probability assessment continue with entity 11. No other positive suspected faulty entities are found. It should be understood that entity 10 is listed as an entity that will not fail, and even if other entity relationship pairs exist for entity 10, they are not further searched. Finally, the target suspected faulty entities obtained through the forward search are entities 9 and 11.
[0094] In one embodiment, based on the position of the fault manifestation entity in the fault propagation probability map, the reverse search for suspected fault entities, centered on the position of the fault manifestation entity, includes:
[0095] Based on the location of the fault manifestation entity, find the first inverse entity relationship pair containing the fault manifestation entity in the fault propagation probability graph.
[0096] Based on the preset fault propagation probability threshold for each entity relationship pair, the first reverse entity whose fault propagation probability of the first reverse entity relationship pair is greater than the fault propagation probability threshold of the first reverse entity relationship pair is regarded as the first reverse suspected fault entity.
[0097] Continue to reverse search for the second reverse entity relationship pair containing the first reverse suspected fault entity, perform fault propagation probability judgment, obtain the second reverse suspected fault entity, continue to reverse search and probability judgment to obtain other reverse suspected fault entities, until all reverse suspected fault entities are obtained.
[0098] Please see Figure 6 , Figure 5 This is an example diagram illustrating a reverse lookup of a suspected faulty entity, as shown in an exemplary embodiment of this application. Figure 6 As shown, during the completion of an event, a sudden failure occurs. The entity exhibiting the failure can be identified as entity 8. The location of entity 8 is found in the failure propagation probability graph, and the first reverse entity relationship pair containing the entity exhibiting the failure is searched in the failure propagation probability graph. The first reverse entity relationship pair consists of entities that are related to the entity exhibiting the failure, namely entities 3 and 6. Then, based on a preset failure propagation probability threshold of entity 3 and entity 8, if it is 0.5, the failure propagation probability of this entity relationship pair (0.8) is greater than the failure propagation probability threshold of 0.5, so entity 3 may have failed and is considered the first reverse suspected failure entity. Similarly, based on a preset failure propagation probability threshold of entity 6 and entity 8, if it is also 0.5, the failure propagation probability of this entity relationship pair (0.6) is greater than the failure propagation probability threshold of 0.5, so entity 6 may have failed and is also considered the first reverse suspected failure entity. After identifying the first suspected reverse faulty entity, continue to reverse search for the second reverse entity relationship pair containing the first suspected reverse faulty entity. Entities 2 and 4, and 5 are related to entities 3 and 6 and form entity relationship pairs. Similarly, the second suspected reverse faulty entity 5 is obtained. Finally, the target suspected faulty entities obtained by reverse search are entities 3, 6 and 5.
[0099] In one embodiment, constructing and obtaining a knowledge graph includes:
[0100] Identify the operational relationships between entities, and construct all entity relationship pairs based on these operational relationships;
[0101] Based on all entity relationship pairs, the knowledge graph is constructed and obtained.
[0102] In one embodiment, after obtaining the knowledge graph, the method further includes:
[0103] The knowledge graph is updated based on changes in the relationship between the two entities.
[0104] For example, if entity 1 and entity 2 are connected, then in the knowledge graph, entity 1 and entity 2 are connected by an edge. In later system updates, entity 2 no longer needs to be connected to entity 1. At this time, the knowledge graph should be updated to remove the direct connection edge between entity 2 and entity 1.
[0105] Please see Figure 7 , Figure 7 This is a flowchart illustrating a specific knowledge graph-based fault location method, as shown in an exemplary embodiment of this application. Figure 7 As shown in the flowchart, a specific fault localization method based on knowledge graphs may include the following steps:
[0106] Step S701: Knowledge graph self-updates by checking changes in the relationships between actual entities and automatically updating the information in the knowledge graph.
[0107] Step S702: Extract all entity relation pairs from the knowledge graph in step S701.
[0108] Step S703: Label the entity relationship pairs with fault samples based on historical data.
[0109] Step S704: Perform feature engineering by combining the fault samples marked in step S703 with the historical attribute features of the entity's historical state at historical moments, historical operation and maintenance features, and historical graph network features.
[0110] Step S705: Divide the results of feature engineering in step S704 into training, test, and validation sets according to the timeline, select an algorithm, such as the xgboot algorithm, to train the model, evaluate and optimize the model to obtain a prediction model, and combine the fault location requirements with the model evaluation indicators to obtain the fault propagation probability threshold.
[0111] Step S706: Based on the entity relationship pairs in step S702, feature engineering is performed based on the current state to obtain the predicted sample.
[0112] Step S707: Based on the prediction model in step S705, predict the predicted samples and use the predicted probability as the transmission probability of the edge to construct a fault transmission probability graph.
[0113] Step S708: Based on the fault propagation probability map in step S707, the known fault manifestation entities are brought into the graph for forward path search, and filtered by the fault propagation probability threshold in step S705 to obtain positive suspected fault entities.
[0114] Step S79: Based on the fault propagation probability map in step S707, bring the known fault manifestation entities into the graph for reverse path search, and filter them through the fault propagation probability threshold in step S705 to obtain reverse suspected fault entities.
[0115] Step S710: Organize the suspected faulty entities from steps S708 and S709 to obtain the target suspected faulty entity.
[0116] Please see Figure 8 , Figure 8 This is a block diagram illustrating a knowledge graph-based fault location device as shown in an exemplary embodiment of this application, such as... Figure 8 As shown, this embodiment provides a knowledge graph-based fault location device 800, which includes:
[0117] Extraction module 801 is used to extract all entity relationship pairs in the knowledge graph. Entity relationship pairs include two entities that have an association relationship.
[0118] The first construction module 802 is used to construct features for each entity relationship pair to obtain the feature vector corresponding to each entity relationship pair.
[0119] The second construction module 803 is used to input all feature vectors into the prediction model, obtain the fault propagation probability between two entities in each entity relationship pair, and construct a fault propagation probability map based on each fault propagation probability.
[0120] The positioning module 804 is used to search for forward and reverse suspected fault entities based on the position of the fault manifestation entity in the fault propagation probability map, with the position of the fault manifestation entity as the center, to determine the target suspected fault entity. The target suspected fault entity includes all forward and reverse suspected fault entities.
[0121] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application, illustrating a schematic diagram of the structure of a computer system suitable for implementing the electronic device of this application. It should be noted that... Figure 9 The computer system 900 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0122] like Figure 9As shown, the computer system 900 includes a Central Processing Unit (CPU) 901, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 902 or programs loaded from storage portion 908 into Random Access Memory (RAM) 903. The RAM 903 also stores various programs and data required for system operation. The CPU 901, ROM 902, and RAM 903 are interconnected via a bus 904. An Input / Output (I / O) interface 905 is also connected to the bus 904.
[0123] The following components are connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. Drive 510 is also connected to I / O interface 905 as needed. Removable media 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 910 as needed so that computer programs read from them can be installed into storage section 908 as needed.
[0124] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by central processing unit (CPU) 901, it performs various functions defined in the system of this application.
[0125] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0126] This disclosure also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements any of the methods in this embodiment.
[0127] The computer-readable storage medium in the embodiments of this disclosure will be understood by those skilled in the art: all or part of the steps of the above method embodiments can be implemented by hardware related to computer programs. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disk, or optical disk.
[0128] The electronic device disclosed in this embodiment includes a processor, a memory, a transceiver, and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication between them. The memory is used to store computer programs, the communication interface is used to perform communication, and the processor and the transceiver are used to run the computer programs, so that the electronic device performs the various steps of the above method.
[0129] In this embodiment, the memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device.
[0130] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), graphics processing units (GPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0131] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used herein means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated subsamples, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other subsamples, wholes, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes the element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.
[0132] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0133] The methods and products (including but not limited to devices and equipment) disclosed in the embodiments herein can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units may be merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some sub-samples may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms. 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 units can be selected to implement this embodiment according to actual needs. In addition, the functional units in the embodiments of this disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0134] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
Claims
1. A fault location method based on knowledge graphs, characterized in that, The method includes: Extract all entity relationship pairs in the knowledge graph. Each entity relationship pair includes two entities that are related. All entity relationship pairs include any two entities that are related among multiple entities participating in the same event. The knowledge graph is updated as the relationship between the two entities changes. Each entity relationship pair is used to construct features to obtain a feature vector corresponding to each entity relationship pair. Input all the feature vectors into the prediction model to obtain the fault propagation probability between the two entities in each entity relationship pair, and construct a fault propagation probability map based on each fault propagation probability. Based on the position of the fault manifestation entity in the fault propagation probability map, with the position of the fault manifestation entity as the center, forward suspected fault entities and reverse suspected fault entities are searched to obtain the target suspected fault entity. The target suspected fault entity includes all forward suspected fault entities and all reverse suspected fault entities. The feature construction for each entity relationship pair includes: obtaining the first attribute feature, first operation and maintenance feature, and first graph network feature of the first entity at the target time, the second attribute feature, second operation and maintenance feature, and second graph network feature of the second entity at the target time, and the relationship feature between the first entity and the second entity; constructing a feature vector for each entity relationship pair based on the first attribute feature, first operation and maintenance feature, first graph network feature, second attribute feature, second operation and maintenance feature, second graph network feature, and relationship feature; wherein, the target time is the time when the fault occurs; The prediction model is obtained by training the historical feature vectors of each entity relationship pair at different historical moments. Constructing the historical feature vectors of each entity relationship pair at different historical moments includes: obtaining the first historical attribute features, first historical operation and maintenance features, and first historical graph network features of the first entity at different historical moments, the second historical attribute features, second historical operation and maintenance features, and second historical graph network features of the second entity at different historical moments, and the historical relationship features between the first entity and the second entity; and constructing the historical feature vectors of each entity relationship pair based on the first historical attribute features, the first historical operation and maintenance features, the first historical graph network features, the second historical attribute features, the second historical operation and maintenance features, the second historical graph network features, and the historical relationship features. Among them, attribute features include the entity's material, manufacturer, production time and specifications; operation and maintenance features include the number of repairs, installation time and usage duration; graph network features include the entity's ontology type, PageRank value, in-degree and clustering coefficient in the graph network; and relationship features include control, composition and connection.
2. The fault location method based on knowledge graphs according to claim 1, characterized in that, Constructing the historical feature vector for each entity relationship pair at the different historical moments includes: In each entity relationship pair, the first entity's first historical attribute features, first historical operation and maintenance features, and first historical graph network features at different historical moments are obtained; the second entity's second historical attribute features, second historical operation and maintenance features, and second historical graph network features at different historical moments are obtained; and the historical relationship features between the first entity and the second entity are obtained. Based on the first historical attribute features, the first historical operation and maintenance features, the first historical graph network features, the second historical attribute features, the second historical operation and maintenance features, the second historical graph network features, and the historical relationship features, a historical feature vector is constructed for each entity relationship pair.
3. The fault location method based on knowledge graphs according to claim 1, characterized in that, Based on the position of the fault-manifesting entity in the fault propagation probability map, the search for potential fault entities is performed with the position of the fault-manifesting entity as the center, including: Based on the location of the fault manifestation entity, find the first positive entity relationship pair containing the fault manifestation entity in the fault propagation probability graph; Based on the preset fault propagation probability threshold of each entity relationship pair, the first positive entity whose fault propagation probability of the first positive entity relationship pair is greater than the fault propagation probability threshold of the first positive entity relationship pair is regarded as the first positive suspected fault entity. Continue forward searching for the second positive entity relationship pair containing the first positive suspected fault entity, perform fault propagation probability judgment, obtain the second positive suspected fault entity, continue forward searching and probability judgment to obtain other positive suspected fault entities, until all the positive suspected fault entities are obtained.
4. The fault location method based on knowledge graphs according to claim 1, characterized in that, Based on the position of the fault-manifesting entity in the fault propagation probability map, the reverse search for suspected fault entities, centered on the position of the fault-manifesting entity, includes: Based on the location of the fault manifestation entity, find the first reverse entity relationship pair containing the fault manifestation entity in the fault propagation probability graph; Based on the preset fault propagation probability threshold of each entity relationship pair, the first reverse entity whose fault propagation probability of the first reverse entity relationship pair is greater than the fault propagation probability threshold of the first reverse entity relationship pair is regarded as the first reverse suspected fault entity. Continue to reverse search for the second reverse entity relationship pair containing the first reverse suspected fault entity, perform fault propagation probability judgment, obtain the second reverse suspected fault entity, continue to reverse search and probability judgment to obtain other reverse suspected fault entities, until all the reverse suspected fault entities are obtained.
5. The fault location method based on knowledge graphs according to any one of claims 1 to 4, characterized in that, Constructing and obtaining the knowledge graph includes: Identify the operational relationships between entities, and construct all entity relationship pairs based on the operational relationships; Based on all the entity relationship pairs, the knowledge graph is constructed and obtained.
6. A fault location device based on a knowledge graph, characterized in that, The device includes: The extraction module is used to extract all entity relationship pairs in the knowledge graph. The entity relationship pair includes two entities that are related. All entity relationship pairs include all entity relationship pairs formed by any two related entities among multiple entities participating in the same event. The knowledge graph is updated as the relationship between the two entities changes. The first construction module is used to construct features for the entity relationship pairs respectively, and obtain the feature vector corresponding to each entity relationship pair; The second construction module is used to input all the feature vectors into the prediction model, obtain the fault propagation probability between the two entities in each entity relationship pair, and construct a fault propagation probability map based on each fault propagation probability. The positioning module is used to search for positive and negative suspected fault entities based on the position of the fault manifestation entity in the fault propagation probability map, with the position of the fault manifestation entity as the center, to determine the target suspected fault entity. The target suspected fault entity includes all positive and negative suspected fault entities. The first construction module is specifically used to obtain the first attribute feature, first operation and maintenance feature, and first graph network feature of the first entity in each entity relationship pair at the target time, the second attribute feature, second operation and maintenance feature, and second graph network feature of the second entity at the target time, and the relationship feature between the first entity and the second entity; and to construct a feature vector for each entity relationship pair based on the first attribute feature, first operation and maintenance feature, first graph network feature, second attribute feature, second operation and maintenance feature, second graph network feature, and relationship feature; wherein, the target time is the time when the fault occurs; The second construction module is specifically used to train the prediction model by using the historical feature vectors of each entity relationship pair at different historical moments; and to obtain, in each entity relationship pair, the first historical attribute feature, the first historical operation and maintenance feature, and the first historical graph network feature of the first entity at different historical moments, the second historical attribute feature, the second historical operation and maintenance feature, and the second historical graph network feature of the second entity at different historical moments, and the historical relationship feature between the first entity and the second entity; and to construct the historical feature vector of each entity relationship pair based on the first historical attribute feature, the first historical operation and maintenance feature, the first historical graph network feature, the second historical attribute feature, the second historical operation and maintenance feature, the second historical graph network feature, and the historical relationship feature. Among them, attribute features include the entity's material, manufacturer, production time and specifications; operation and maintenance features include the number of repairs, installation time and usage duration; graph network features include the entity's ontology type, PageRank value, in-degree and clustering coefficient in the graph network; and relationship features include control, composition and connection.
7. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by the computer's processor, cause the computer to perform the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Network fault determination method and network equipment
CN113839804A
Risk conduction probability knowledge graph generation method and device thereof, equipment and storage medium
CN114048330A
Vehicle part failure prediction method and system based on fault code sequence
CN114091625A