Power grid equipment fault diagnosis method and system based on knowledge graph relationship reasoning
By constructing a power grid equipment fault diagnosis system based on knowledge graph relational reasoning, the problem of the inability to quickly and accurately analyze power grid equipment faults in existing technologies is solved, and efficient fault location and handling are achieved, meeting the needs of intelligent power grid management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-18
- Publication Date
- 2026-04-10
AI Technical Summary
Existing fault diagnosis technologies for power grid equipment cannot quickly and accurately analyze and locate the causes of faults in complex equipment structures, resulting in low fault handling efficiency and failing to meet the needs of intelligent power grid management.
A knowledge graph-based relational reasoning method is adopted. By aggregating the fault diagnosis dataset of power grid equipment into structured state data, knowledge is extracted using entity and relation dictionaries, a knowledge graph relational reasoning model is trained, and triples of entities and relations are constructed to achieve vectorized computation for fault diagnosis.
It enables the rapid and accurate detection of fault causes in complex power grid equipment, reduces the impact of faults, improves fault handling efficiency, and meets the needs of intelligent power grid management.
Smart Images

Figure CN115563225B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to power grid equipment fault diagnosis technology, in particular to a power grid equipment fault diagnosis method and system based on knowledge graph relationship reasoning. BACKGROUND
[0002] At present, the domestic power grid is developing rapidly, and the power industry is focusing on building an intelligent power grid system. With the increasing size of the power system and the continuous evolution towards intelligence, electric energy occupies an important position in the national economy, and higher requirements are put forward for the good operation of the power system and its equipment. A large amount of alarm information will be received in the actual abnormal operation of the substation equipment. If the maintenance personnel cannot timely locate the cause of the fault, it will further cause serious consequences and have a bad influence on the substation equipment and the operating environment. At present, the analysis and diagnosis of alarm information depend on the experience of maintenance personnel. When faced with a large amount of substation equipment alarm information, it is impossible to quickly and accurately locate the fault cause of the alarm, and the fault handling efficiency is low, which cannot meet the growing demand for intelligent management of the power grid. Therefore, efficient fault handling and diagnosis capability is of great significance to the management and maintenance of substation equipment.
[0003] The traditional power system fault reasoning and diagnosis methods mainly include expert systems and artificial neural networks. With the exponential increase in the number of power station equipment, online power station equipment monitoring technology is also increasingly popular, and a large amount of equipment detection information flows into the equipment analysis center. It is impossible to realize large data volume equipment analysis by artificial methods. Artificial neural networks use neurons to realize the analysis of substation faults, have learning and self-ability, and the calculation between neurons has relative independence, which is convenient for parallel processing. With the development of the power system, the power system network is becoming larger and larger, and the structure is more complex, which puts forward higher requirements for power system fault diagnosis. The traditional power system fault reasoning method has certain defects in processing speed, model complexity, processing information accuracy and complex equipment information processing capability. Knowledge graph provides a means for extracting structured knowledge from massive data and utilizing graph analysis for relationship mining, and has a wide application prospect. Therefore, how to realize power grid equipment fault diagnosis based on knowledge graph has become a key technical problem to be solved. SUMMARY
[0004] The technical problem to be solved by the present application: in view of the above problems of the prior art, a power grid equipment fault diagnosis method and system based on knowledge graph relationship reasoning are provided, and the present application aims to solve the problem that the existing fault diagnosis technology cannot analyze and find the fault of the equipment in the complex equipment structure, and to realize the completion, discovery and reasoning calculation of the knowledge in the field of power grid equipment fault diagnosis.
[0005] In order to solve the above technical problems, the technical scheme adopted by the present application is:
[0006] A power grid equipment fault diagnosis method based on knowledge graph relationship reasoning, comprising:
[0007] S101, the input fault diagnosis data set of different power grid equipment is converged into a structured state data set S, and the unified structured state data format of each power grid equipment in the structured state data set S is the same;
[0008] S102, using a preset entity dictionary E dict and a relationship dictionary R dict knowledge extraction is performed on the structured state data set S to obtain an entity and relationship sample set;
[0009] S103, the entity and relationship sample set is used to train a knowledge graph relationship reasoning model to construct a triple consisting of two entities and the relationship therebetween;
[0010] S104, the trained knowledge graph relationship reasoning model is used for power grid equipment fault diagnosis: the input fault diagnosis data of the target power grid equipment is generated into unified structured state data, the unified structured state data is subjected to knowledge extraction using a preset entity dictionary E dict and a relationship dictionary R dict , the extracted entity and relationship are vectorized through the trained knowledge graph relationship reasoning model, and the vectorized entity and relationship are subjected to vector calculation to obtain a power grid equipment fault diagnosis result.
[0011] Optionally, before step S101, there is further included a step of preprocessing the input fault diagnosis data set of different power grid equipment, and the preprocessing includes supplementing missing data, eliminating abnormal data and noise data.
[0012] Optionally, in step S101, the fault diagnosis data set of power grid equipment includes a device operation data set S1, a device action data set S2, a device state data set S3, a device control data set S4 and a device alarm data set S5, and the function expression for converging into a unified structured state data set is:
[0013] S=S1∪S2∪S3∪S4∪S5,
[0014] In the above formula, S is the structured state data set, and ∪ is a merging operation.
[0015] Optionally, in step S101, the function expression of the structured state data set S is:
[0016]
[0017] In the above formula, F 00 ~F0p respectively, are p features of the first piece of uniform structured state data, F 10 ~F 1p respectively, are p features of the second piece of uniform structured state data, F q0 ~F qp respectively, are p features of the qth piece of uniform structured state data, q is the number of pieces of uniform structured state data in the structured state data set S, and p is the number of features of the uniform structured state data.
[0018] Optionally, step S102 includes a step of constructing an entity dictionary E dict and a relationship dictionary R dict :
[0019] S201, for each sentence sequence T = {t1, t2, t3,..., t n} in each document M of the original corpus D, respectively, any ith sentence t i is processed for word segmentation, converted into a keyword sequence t i = {w i1 , w i2 , w i3 ,..., w im}, the number of occurrences of different keywords is counted, the number of occurrences of the jth keyword w i of the ith sentence t ij in the original corpus D is C ij , and the general term frequency representation TF ij of the keyword w ij is calculated according to the following formula:
[0020]
[0021] In the above formula, C kl is the number of occurrences of the lth keyword w k of the kth sentence t kl in the original corpus D.
[0022] S202, the number of occurrences of the jth keyword w i of the ith sentence t ij in the preset expert knowledge corpus ED is EC ij , and the expert term frequency representation of the keyword w ij is calculated according to the following formula:
[0023]
[0024] In the above formula, EC kl is the number of occurrences of the lth keyword w k of the kth sentence t klThe number of occurrences in the expert knowledge corpus ED
[0025] S203, calculating the importance of the keyword w according to the following formula ij
[0026] E(i, j) = (1 - μ) * TF ij + μ * ETF ij ,
[0027] In the above formula, μ is a weight coefficient;
[0028] S204, screening the keywords according to the importance, and classifying the screened keywords into entities and relationships, establishing an entity dictionary E dict for the keywords classified as entities, and establishing a relationship dictionary R dict for the keywords classified as relationships.
[0029] Optionally, the knowledge graph relationship reasoning model in step S103 uses the following formula to represent two entities and the relationship therebetween in a triple:
[0030] r e : e h → e t ,
[0031] In the above formula, r e represents the relationship, e h represents the head entity, and e t represents the tail entity, wherein the head entity and the tail entity are both entities obtained through knowledge extraction, and the head entity e h and the tail entity e t have a mapping relationship r e , and the knowledge graph relationship reasoning model is used to perform word embedding on the distributed vector representation R e of the relationship r h , the distributed vector representation E h of the head entity e t , and the distributed vector representation E t of the tail entity e h , so that E e + R t = E e is established in the vector space.
[0032] Optionally, when the knowledge graph relationship reasoning model is trained using the sample set of entities and relationships in step S103, the knowledge graph relationship reasoning model further comprises the following constraint condition:
[0033] |cos(R t , E h -E e ) >= gamma,
[0034] In the above formula, gamma is a training parameter of the knowledge graph relationship reasoning model, the value range of the training parameter gamma is gamma [0, 1], and when gamma is 1, the difference between different head and tail entity vectors maintains a direction, and when gamma is less than 1, the difference between different head and tail entity vectors is allowed to maintain a controllable direction deviation within a given range.
[0035] Optionally, when training the knowledge graph relationship reasoning model by using the sample set of entities and relationships in step S103, the loss function used is:
[0036]
[0037] In the above formula, L is a loss function, is a positive sample set, is a negative sample set, (R e , E t , E h ) represents a positive sample, wherein R e is a distributed vector representation of the relationship of the positive sample, E h is a distributed vector representation of the head entity of the positive sample, and E t is a distributed vector representation of the tail entity of the positive sample; (R e , E' t , E' h ) represents a negative sample, wherein R e is a distributed vector representation of the relationship of the negative sample, E' h is a distributed vector representation of the head entity of the negative sample, and E' t is a distributed vector representation of the tail entity of the negative sample; delta is a threshold parameter, d(R e , E t -E h ) represents the score of the positive sample, d(R e , E' t -E' h ) represents the score of the negative sample, and [x] + represents the positive part of any x, and the calculation function expression of the score is:
[0038]
[0039] In the above formula, T represents a transpose operation.
[0040] In addition, the present application also provides a power grid equipment fault diagnosis system based on knowledge graph relationship reasoning, comprising a microprocessor and a memory connected to each other, the microprocessor is programmed or configured to execute the power grid equipment fault diagnosis method based on knowledge graph relationship reasoning.
[0041] In addition, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is used for programming or configuring a microprocessor to execute the power grid equipment fault diagnosis method based on knowledge graph relationship reasoning.
[0042] Compared with the prior art, the application has the following advantages: the application can unify the input fault diagnosis data sets of different power grid equipments to form structured state data, then mine entities and relationships, train a knowledge graph relationship reasoning model by using a sample set of the entities and the relationships to construct a triple consisting of two entities and the relationship therebetween, and use the trained knowledge graph relationship reasoning model for power grid equipment fault diagnosis, so that unknown facts or relationships can be inferred based on existing facts or relationships, knowledge can be extracted from complex and heterogeneous substation alarm information by using knowledge graph reasoning technology to construct fault diagnosis knowledge triples, entities and relationships of the triples are distributedly represented, diagnosis knowledge represented by the triples is mapped to a vector space, and power grid equipment fault diagnosis is realized by using the knowledge graph relationship reasoning mode. The application can solve the problem that the prior art cannot analyze substation equipment faults in a complex substation equipment structure, minimize the impact of faults, and ensure that the fault causes are found in the shortest time. Moreover, since the knowledge graph reasoning technology is used for fault diagnosis, the knowledge graph relationship reasoning technology can be used for power grid equipment fault diagnosis to complete, discover and reason the knowledge in the field. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 FIG. 1 is a basic flowchart of the method of the embodiment of the application.
[0044] Figure 2 FIG. 4 is a schematic diagram of data preprocessing and unified structured state data format in the embodiment of the application.
[0045] Figure 3 FIG. 6 is a schematic diagram of realizing power grid equipment fault diagnosis in the embodiment of the application. DETAILED DESCRIPTION
[0046] The specific embodiments of the application will be further described below with reference to the drawings, and the description of the embodiments will help those skilled in the art to have a more complete, accurate and in-depth understanding of the inventive concept and technical solutions of the application.
[0047] As shown in FIG. 1, the power grid equipment fault diagnosis method based on knowledge graph relationship reasoning in the embodiment of the application includes the following steps. Figure 1
[0048] S101, the input fault diagnosis datasets of different power grid devices are aggregated into a structured state data set S, wherein the unified structured state data format of each power grid device in the structured state data set S is the same.
[0049] S102, using the preset entity dictionary E dict Relational dictionary R dict Knowledge extraction is performed on the structured state data set S to obtain a sample set of entities and relations;
[0050] S103, using sample sets of entities and relations to train a knowledge graph relational reasoning model to construct a triple consisting of two entities and their relation;
[0051] S104, the trained knowledge graph relational reasoning model is used for fault diagnosis of power grid equipment, such as... Figure 1 The flowchart on the right side of the middle section shows the following steps: generating unified structured status data from the input fault diagnosis data of the target power grid equipment, and utilizing a preset entity dictionary E. dict Relational dictionary R dict Entities and relations are extracted from the unified structured state data. The extracted entities and relations are then vectorized using a trained knowledge graph relation reasoning model. Finally, the vectorized entities and relations are used to calculate the fault diagnosis results of power grid equipment.
[0052] In this embodiment, before step S101, there is a step of preprocessing the input fault diagnosis dataset of different power grid equipment. The preprocessing includes supplementing missing data, removing abnormal data and noisy data. Through the above preprocessing, the interference caused by missing data, abnormal data and noisy data when training the knowledge graph relational reasoning model using sample sets of entities and relations can be reduced, thereby improving the accuracy of the knowledge graph relational reasoning model.
[0053] This embodiment specifically uses substation equipment as an example of power grid equipment, but it can also be applied to other types of power grid equipment. See also Figure 2 In this embodiment, when the substation equipment is running, the operating system and online monitoring equipment will generate a large amount of raw data such as equipment operation data, equipment action data, equipment status data, equipment control data and equipment alarm data. Data preprocessing methods are used to process missing data, abnormal data and noisy data to construct equipment operation dataset S1, equipment action dataset S2, equipment status dataset S3, equipment control dataset S4 and equipment alarm dataset S5.
[0054] In this embodiment, the fault diagnosis data set of the power grid equipment in step S101 includes the equipment operation data set S1, the equipment action data set S2, the equipment state data set S3, the equipment control data set S4, and the equipment alarm data set S5, and the function expression of the converged unified structured state data set is:
[0055] S=S1∪S2∪S3∪S4∪S5,
[0056] In the above formula, S is a structured state data set, and ∪ is a merging operation. Referring to Figure 2 , the unified structured state data format in the structured state data set S is fixed in format, contains all types of fault diagnosis data of all power grid equipment, and for a certain piece of unified structured state data, if a certain type of fault diagnosis data is missing, the fault diagnosis data of this type in the unified structured state data can be left empty (or filled with 0), so as to realize the unified structured expression of all types of fault diagnosis data of all power grid equipment.
[0057] In this embodiment, the function expression of the structured state data set S in step S101 is:
[0058]
[0059] In the above formula, F 00 ~F 0p are p features of the first piece of unified structured state data, F 10 ~F 1p are p features of the second piece of unified structured state data, and F q0 ~F qp are p features of the qth piece of unified structured state data, q is the number of unified structured state data in the structured state data set S, and p is the number of features of the unified structured state data. The i th feature item of the i th piece of unified structured state data (feature row) can be represented as F ij , i∈[0,q],j∈[0,p]。
[0060] In this embodiment, before step S102, the steps of constructing an entity dictionary E dict and a relationship dictionary R dict are included:
[0061] S201, for each sentence sequence T={t1, t2, t3,..., t n} in each document M of the original corpus D (generally a power grid equipment database), the word segmentation processing is performed on any i th sentence t i in the sequence, respectively, to convert it into a keyword sequence t i ={w i1 , w i2, w i3 ,..., w im}, the number of occurrences of the jth keyword w i in the ith sentence t ij in the original corpus D is counted, and the general term frequency representation TF ij of the keyword w ij is calculated according to the following formula: ij
[0062]
[0063] In the above formula, C kl is the number of occurrences of the lth keyword w k in the kth sentence t kl in the original corpus D;
[0064] S202, the number of occurrences of the jth keyword w i in the ith sentence t ij in the preset expert knowledge corpus ED is counted, which is EC ij , and the expert term frequency representation of the keyword w ij is calculated according to the following formula:
[0065]
[0066] In the above formula, EC kl is the number of occurrences of the lth keyword w k in the kth sentence t kl in the expert knowledge corpus ED;
[0067] S203, the importance of the keyword w ij is calculated according to the following formula:
[0068] E(i, j) = (1 - μ) × TF ij + μ × ETF ij ,
[0069] In the above formula, μ is a weight coefficient;
[0070] S204, the keywords are screened according to the importance, and the screened keywords are classified as entities and relationships, the keywords classified as entities are used to establish an entity dictionary E dict , and the keywords classified as relationships are used to establish a relationship dictionary R dict .
[0071] In the step S103 of the embodiment, the knowledge graph relationship reasoning model is trained by using the sample set of entities and relationships to construct a triple consisting of two entities and the relationship therebetween, wherein the triple can be represented as:
[0072] (head entity, relation, tail entity),
[0073] wherein the head entity, the relation and the tail entity are all obtained by using an entity dictionary E dict and a relation dictionary R dict Knowledge extraction is performed on the structured state data set S.
[0074] The relationship mapping between different features of the structured state data set S can be represented as follows:
[0075] r e : F ik → F il ,
[0076] wherein r e represents the relationship between F ik and F il , F ik and F il are the kth feature item of the ith piece of unified structured state data (feature row) and the 1st feature item of the ith piece of unified structured state data (feature row) respectively, k, l ∈ [0, p], r e ∈ R dict , so as to establish a relationship mapping rule and directly extract knowledge from the features of the structured data. Key words are extracted from different features F ij , and entities are obtained from F dict and F ik according to the entity dictionary E il , so as to establish complete triple knowledge (two entities and the relationship therebetween), which can be represented as follows:
[0077] r e : e ik → e il ,
[0078] In the above formula, e ik and e il represent the entity pair corresponding to the relationship r e .
[0079] On this basis, the knowledge graph relationship reasoning model can establish a knowledge graph G for fault diagnosis through training based on the generated knowledge triple. In this embodiment, the knowledge graph relationship reasoning model in step S103 uses the following formula to represent two entities and the relationship therebetween:
[0080] r e : e h → e t ,
[0081] In the above formula, r e represents the relationship, and eh represents a head entity, e t represents a tail entity, wherein the head entity and the tail entity are both entities extracted from knowledge, and the head entity e h and the tail entity e t have a relationship r e , and the knowledge graph relationship reasoning model is used to map the relationship r e to a distributed vector representation R e , and the head entity e h to a distributed vector representation E h , and the tail entity e t to a distributed vector representation E t , so that E h + R e = E t is established. The relationship r e is subjected to word embedding to obtain a distributed vector representation R e , the head entity e h is subjected to word embedding to obtain a distributed vector representation E h , and the tail entity e t is subjected to word embedding to obtain a distributed vector representation E t , so that E e + R t = E h is established. The encoding method based on word embedding can be implemented according to the word embedding model used, and the implementation details are not described herein since the application of the above method is only involved in the present embodiment.
[0082] In the present embodiment, when the knowledge graph relationship reasoning model is trained by using the sample set of entities and relationships in step S103, the knowledge graph relationship reasoning model further comprises a constraint condition shown in the following formula:
[0083] |cos(R e , E t -E h )|≥γ,
[0084] In the above formula, γ is a training parameter of the knowledge graph relationship reasoning model, the value range of the training parameter γ is γ∈[0, 1], and when γ is 1, the difference between different head-tail entity vectors is kept in one direction, and when γ is less than 1, the difference between different head-tail entity vectors is allowed to keep a controllable directional deviation within a given range. It should be noted that the knowledge graph relationship reasoning model can use the required knowledge graph relationship reasoning model as needed. For example, as an optional implementation, the classical TransE model is selected in the present embodiment, and an improved TransE model is obtained by giving the constraint condition corresponding to the training parameter γ. Since there are phenomena such as one head entity corresponding to multiple tail entities through one relationship and different head entities corresponding to one tail entity through one relationship in the smart fault diagnosis knowledge graph of the substation, which can be represented as:
[0085] r e : e ih → e t ,
[0086] r e : e h → e tj ,
[0087] In the above formula, the first row represents a plurality of head entities e ih through a relationship r e corresponding to a tail entity e t , and the second row represents a head entity e h through a relationship r e corresponding to a plurality of tail entities e tj , and i, j ∈ N. In order to better represent and reason about the multiple relationships existing in the substation intelligent fault diagnosis knowledge graph, an optimized entity and relationship distributed vector representation is designed to implement the multiple relationship reasoning task. The optimized distributed vector representation method does not strictly require the difference of entity vectors to be equal to the relationship vector, but requires the direction of the vector to remain basically the same, that is, the constraint condition recorded in the foregoing:
[0088] |cos(R e , E t -E h )|≥γ.
[0089] According to the constraint condition, the score calculation function of the knowledge graph relationship reasoning model can be set as:
[0090]
[0091] In the above formula, T represents the transpose operation. The score calculation function uses cosine similarity to calculate, and in the training, it is ensured that the score of the positive sample (correct sample of entity + object) is larger, and the score of the negative sample (incorrect sample of entity + object) is smaller, so when the knowledge graph relationship reasoning model is trained in step S103 of the embodiment, the loss function used is:
[0092]
[0093] In the above formula, L is the loss function, is the positive sample set, is the negative sample set, (R e , E t , E h ) represents a positive sample, wherein R e is the distributed vector representation of the relationship of the positive sample, E h is the distributed vector representation of the head entity of the positive sample, and Et This is the distributed vector representation of the tail entity of the positive sample; (R e E′ t E′ h ) represents a negative sample, where R e E′ is the distributed vector representation of the relation of this negative sample. h E′ is the distributed vector representation of the head entity of this negative sample. t d(R) is the distributed vector representation of the tail entity of the negative sample; δ is the threshold parameter used to ensure the minimum margin between positive and negative samples; e E t -E h ) represents the score of the positive sample, d(R) e E′ t -E′ h ) represents the score of the negative sample, [x] + Let x represent the positive part of any x, and the function expression for calculating the score is:
[0094]
[0095] In the above formula, T represents the transpose operation.
[0096] Finally, after training the knowledge graph relational reasoning model, the input fault diagnosis data of the target power grid equipment is used to generate unified structured state data, which is then processed using a pre-defined entity dictionary E. dict Relational dictionary R dict Knowledge extraction is performed on unified structured state data to obtain entities and relations. These extracted entities and relations are then vectorized using a trained knowledge graph relational reasoning model. Finally, vector computation is used to obtain fault diagnosis results for power grid equipment from the vectorized entities and relations. For example... Figure 3 As shown, if the obtained entity is "coil fault" and the relation is "cause", the knowledge graph relational reasoning model derives "transformer overheating". If the obtained entity is "coil fault" and the relation is "belongs to", the knowledge graph relational reasoning model derives "insulator fault", thus enabling fault diagnosis of substation equipment. Undoubtedly, this method is not only applicable to substation equipment but also to various types of power grid equipment.
[0097] In summary, the method of the embodiment comprises the following steps: fault data governance. Using data governance, substation equipment operation information, status information, alarm information and other data from different sources are converged into structured data; domain dictionary construction. A set of candidate keywords is constructed by preprocessing and word segmentation of the original fault diagnosis corpus. Statistical analysis is performed on the keywords using statistical methods, and the keywords are judged according to their importance. Combined with the scoring of artificial experts, the keyword dictionary is generated in sequence. Knowledge graph relationship reasoning model construction. Knowledge is extracted from the unified structured state data to form knowledge and stored in the knowledge graph relationship reasoning model. The fault diagnosis state data and the keyword dictionary are used to generate knowledge triples, and the knowledge graph relationship reasoning model for fault diagnosis is established. Distributed vector representation. The entities and relationships of the knowledge graph triples are mapped to a low-dimensional space using the distributed vector representation method, and the loss function is minimized to learn the distributed vector representation, realizing the relationship reasoning of fault diagnosis. Fault relationship reasoning. For any set of fault diagnosis data, data structure conversion is performed, and semantic analysis is performed on the structured text information. The entity dictionary and relationship dictionary are constructed to understand the fault diagnosis intent, and the optimized distributed representation model is used for vectorization marking. The fault diagnosis result is obtained by vector calculation. The method of the embodiment can solve the problem that the prior art cannot analyze the substation equipment fault in a complex substation equipment structure, minimize the impact of the fault, and ensure that the fault cause is found in the shortest time.
[0098] In addition, the embodiment also provides a power grid equipment fault diagnosis system based on knowledge graph relationship reasoning, which comprises a microprocessor and a memory connected with each other. The microprocessor is programmed or configured to execute the aforementioned power grid equipment fault diagnosis method based on knowledge graph relationship reasoning. In addition, the embodiment also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium. The computer program is used to program or configure the microprocessor to execute the aforementioned power grid equipment fault diagnosis method based on knowledge graph relationship reasoning.
[0099] Those skilled in the art will appreciate that embodiments of the application can be readily used as a method, apparatus, or computer program product. Accordingly, the application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk memory, CD-ROMs, optical storage devices, etc.) embodying computer readable program code. The application is described in reference to the flow diagrams and / or block diagrams of the methods, apparatus (systems) and computer program products according to embodiments of the application illustrated in the attached drawings, which flow diagrams and / or block diagrams Figure 1 one or more functions specified in the flow or flows and / or block or blocks of the flow diagrams and / or block diagrams. Figure 1 one or more functions specified in the flow or flows and / or block or blocks of the flow diagrams and / or block diagrams. Figure 1 one or more functions specified in the flow or flows and / or block or blocks of the flow diagrams and / or block diagrams. Figure 1 one or more functions specified in the flow or flows and / or block or blocks of the flow diagrams and / or block diagrams. Figure 1 one or more functions specified in the flow or flows and / or block or blocks of the flow diagrams and / or block diagrams. Figure 1 one or more functions specified in the flow or flows and / or block or blocks of the flow diagrams and / or block diagrams.
[0100] The above description is only preferred embodiments of the application, the protection scope of the application is not limited to the above-mentioned embodiments, and any technical scheme falling within the idea of the application belongs to the protection scope of the application. It should be noted that, for ordinary skilled in the art, some improvements and refinements without departing from the principles of the application, these improvements and refinements should also be considered as the protection scope of the application.
Claims
1. A power grid equipment fault diagnosis method based on knowledge graph relationship reasoning, characterized in that, Comprise: S101, the input of different power grid equipment fault diagnosis data set into a structured state data set S, the structured state data set S each power grid equipment uniform structured state data format is same; S102, utilize the preset entity dictionary and the relationship dictionary Knowledge extraction is performed on the structured state data set S to obtain an entity and relationship sample set; S103, the sample set of entity and relation is used to train the knowledge graph relation reasoning model to build the triple of two entities and the relation between them; S104, using the trained knowledge graph relationship reasoning model for power grid equipment fault diagnosis: generating unified structured state data from the input target power grid equipment fault diagnosis data, using the pre-set entity dictionary and relationship dictionary performing knowledge extraction on the unified structured state data to obtain entities and relationships, vectorizing the extracted entities and relationships through the trained knowledge graph relationship reasoning model, and obtaining a power grid equipment fault diagnosis result through vector calculation on the vectorized entities and relationships; Step S102 includes a step of constructing an entity dictionary and a relation dictionary beforehand. S201, for the original corpus of each document of the sentence sequence , respectively, any i-th sentence word segmentation processing, converted to the keyword sequence , the number of different keywords statistics, the i-th sentence j-th keyword in the original corpus occurs the number of times , and according to the following formula to calculate the keyword general word frequency representation : , In the above formula, the kth sentence the lth keyword of the kth sentence the number of occurrences in the original corpus the number of occurrences in the original corpus S202, respectively, the i-th sentence the j-th keyword occurs in the preset expert knowledge corpus ED times , and the expert word frequency representation of the keyword is calculated according to the following formula: , In the above formula, the kth sentence the lth keyword of the kth sentence the number of occurrences in the expert knowledge corpus ED; S203, calculate the importance of the keyword according to the following formula: importance = (1 - (1 / (1 + exp(- (keyword score - threshold)))) , In the above formula, are weight coefficients; S204, screening the keywords according to the importance degree, and classifying the screened keywords into entities and relations, and establishing an entity dictionary for the keywords classified as entities , and establishing a relation dictionary for the keywords classified as relations ; When the sample set of entity and relation is used to train the knowledge graph relation reasoning model in step S103, the knowledge graph relation reasoning model further contains the constraint condition shown in the following formula: , In the above formula, is a training parameter of the knowledge graph relation reasoning model, the training parameter has a value range of , and when is 1, the difference between different head-tail entity vectors maintains a direction, and when is less than 1, the difference between different head-tail entity vectors is allowed to maintain a controllable directional deviation within a given range. When the sample set of entity and relation is used to train the knowledge graph relation reasoning model in step S103, the loss function used is: , In the above formula, is a loss function, is a set of positive samples, is a set of negative samples, denotes a positive sample, wherein is a distributed vector representation of the relation for the positive sample, is a distributed vector representation of the head entity for the positive sample, is a distributed vector representation of the tail entity for the positive sample; denotes a negative sample, wherein is a distributed vector representation of the relation for the negative sample, is a distributed vector representation of the head entity for the negative sample, is a distributed vector representation of the tail entity for the negative sample; is a threshold parameter, represents a score of a positive sample, represents a score of a negative sample, represents an arbitrary positive part, and the score calculation function expression is: , , In the above formulae, is a transpose operation.
2. The power grid equipment fault diagnosis method based on knowledge graph relationship reasoning according to claim 1, characterized in that, Before step S101, it further includes the step of preprocessing the input of different power grid equipment fault diagnosis data set, and the preprocessing includes supplementing missing data, rejecting abnormal data and noise data.
3. The power grid equipment fault diagnosis method based on knowledge graph relationship reasoning according to claim 1, characterized in that, The fault diagnosis data set of the power grid equipment in step S101 includes an equipment operation data set , an equipment action data set , an equipment state data set , an equipment control data set , and an equipment alarm data set , and the function expression of the unified structured state data set is: , In the above formula, S is a structured state data set, is a merge operation.
4. The power grid equipment fault diagnosis method based on knowledge graph relationship reasoning according to claim 1, characterized in that, The function expression of the structured state data set S in step S101 is: , In the above formula, ~ respectively p features of the first uniform structured state data, ~ respectively p features of the second uniform structured state data, ~ respectively p features of the qth uniform structured state data, q is the number of uniform structured state data of the structured state data set S, and p is the number of features of the uniform structured state data.
5. The power grid equipment fault diagnosis method based on knowledge graph relationship reasoning according to claim 1, characterized in that, The knowledge graph relation reasoning model in step S103 uses the following formula to represent two entities and the relation between them: , In the above formula, Indicates a relationship. Indicates the head entity. This represents the tail entity, where both the head and tail entities are entities obtained through knowledge extraction, and the head entity... Tail entity There is a relationship The mapping, and the knowledge graph relation reasoning model is used to map relations Distributed vector representation obtained by word embedding , head entity Distributed vector representation after word embedding , tail entity Distributed vector representation after word embedding This makes the vector space have Established.
6. A power grid equipment fault diagnosis system based on knowledge graph relationship reasoning, comprising a microprocessor and a memory connected to each other, characterized in that, The microprocessor is programmed or configured to perform the power grid equipment fault diagnosis method based on the knowledge graph relation reasoning of any one of claims 1-5.
7. A computer-readable storage medium having stored therein a computer program, characterized in that, The computer program is used for being programmed or configured by the microprocessor to perform the power grid equipment fault diagnosis method based on the knowledge graph relation reasoning of any one of claims 1-5.
Citation Information
Patent Citations
Substation equipment alarm intelligent decision-making method and system
CN114298339A