Substation knowledge graph construction and optimization method based on multi-view learning
Technical Field
The invention relates to the technical field of transformer substation data cooperation and operation and maintenance management, in particular to a transformer substation knowledge graph construction and optimization method based on multi-view learning.
Background
The existing dispatching automation system and centralized control station system of the transformer substation mainly run for primary equipment, the system model mainly describes the topological relation between the primary equipment of the transformer substation and a power grid, secondary equipment, auxiliary equipment, inspection equipment and the like are not needed, and a unified association model for the transformer substation equipment is difficult to realize.
In addition, the data generated by various devices of the transformer substation are exponentially increased in quantity, non-physical connection relation exists in relation, and multi-source heterogeneous data types exist in kinds, for example, various unstructured data files exist. The data show the characteristics of large quantity, multiple types, large difference, complex relationship and the like, so that the original system model is difficult to cover. Therefore, the traditional power system model cannot completely correlate the substation equipment and the operation data generated by the substation equipment, and the traditional relational database is low in efficiency and difficult to inquire.
Knowledge graph is a structured semantic knowledge base for symbolically describing concepts and their interrelationships in the physical world. The basic composition unit is an entity-relation-entity triplet, and the entities and related attribute value pairs thereof are mutually connected through the relation to form a net-shaped knowledge structure. The knowledge graph is a net knowledge base formed by linking entities with attributes through relationships, and from the view point of the graph, the knowledge graph is essentially a concept network, wherein nodes represent entities (or concepts) of a physical world, and various semantic relationships among the entities form edges in the network. Thus, the knowledge graph is a symbolic representation of the physical world. The application value of the knowledge graph is that the knowledge graph can change the existing information retrieval mode, and on one hand, concept retrieval is realized through reasoning; on the other hand, the structured knowledge subjected to classification is displayed to the user in a graphical mode.
In order to fully perceive the operation situation of the transformer substation, the invention designs a power system global model which is realized by using a knowledge graph technology.
Disclosure of Invention
In order to solve the problems, the invention provides a transformer substation knowledge graph construction and optimization method based on multi-view learning, which uses a text information extraction technology to convert huge and complicated data from a transformer substation into structured data with different dimension attributes, and uses the knowledge graph technology to correlate the data to form a heterogeneous model capable of covering the whole transformer substation, so as to finish the operation and maintenance management of the whole equipment.
The invention is realized by the following scheme:
a transformer substation knowledge graph construction method based on multi-view learning, which comprises the following steps,
step S1, multi-source heterogeneous data of a transformer substation in a range of a whole area A are analyzed and described;
s2, integrating all structured data in the range of the whole area A into an expert knowledge base by using a text information extraction technology;
s3, extracting entities, attributes and connection relations from the structured data, and constructing a data layer of the knowledge graph;
step S4, constructing a relation viewAnd->;
Step S5, data are secondarily layered and recombined, and a label view is constructed;
S6, establishing an entity relation library of the power system, and constructing an external knowledge graph and an internal knowledge graph;
step S7, knowledge storage is carried out on the knowledge graphs outside and inside the transformer substation based on the Neo4j graph database; from a relational viewAnd uniqueness of entity naming, which integrates the entity relation library of the electric power system into a large-scale knowledge graph.
Further, the method comprises the steps of,
the entity object comprises primary equipment and secondary equipment of the transformer substation.
Still further, the method further comprises the steps of,
the secondary equipment comprises auxiliary equipment and patrol equipment.
Further, step S1 includes:
s11, manually combing and analyzing physical connection relations, non-physical connection relations and deep logic relations among all transformer substation entity objects in the range of the whole area A, and creating text information data of all the entity objects in the range of the whole area A;
s12, analyzing the operation data of all substations in the range of the whole area A, and converting unstructured data into structured data.
Further, the method comprises the steps of,
the operational data includes a graphics file.
Still further, the method further comprises the steps of,
the entities and entity relationships contained in the graph are manually converted into structured text data.
Still further, the method further comprises the steps of,
the graphics file includes a power topology map.
Further, in step S2,
the text information extraction technology comprises keyword segmentation, feature analysis, knowledge extraction and data duplication removal.
Further, step S3 includes:
s31, identifying the actual names of the transformer substation and the equipment as the entity to be processed, and forming an entity pair by the entity to be processed;
s32, marking each entity to be processed according to the attribute and the type of the entity to be processed;
s33, the structured data is initially layered, and the entity to be processed is divided into an external entity and an internal entity.
Still further, the method further comprises the steps of,
the labels of the entities to be processed are used as standards for dividing the entities into an external entity and an internal entity.
Further, step S4 includes:
definition of the first embodimentThe individual entity is->;
Extracting the physical connection relation between the two entities from the data layer in the step S3 to obtain a relation view vector between the two entities
Wherein->N is a natural number;
further, step S4 further includes:
for the entity, the physical characteristics of each entity and each relation are learned from the data layer in the step S3, the attribute name and the attribute value are identified by utilizing an attribute extraction method, the attribute characteristics of different dimensions are designed, and the length is obtainedIs>Attribute view vector of individual entities is
;
For the relationship attribute, the relationship name is first identified from the data layer in the step S3, and then expanded into two entity names, one path name and the corresponding relationship attribute feature after word segmentation, entity matching and uniqueness confirmation, so as to obtain the relationship attribute feature with the length ofIs>The attribute view vector of the segment relationship is
,And->Corresponding to the above.
Further, the step S5 includes,
secondary layering with attribute views of entities:
attribute vector of entity obtained according to step 4Calculating the intimacy between the internal entities to obtain a intimacy matrix as
;
;
Clustering is carried out by utilizing the affinity matrix, and a secondary layering result of all entity devices is obtained.
Still further, the method further comprises the steps of,
defining a tab view of an external entity after secondary layering asAnd (5) a transformer substation.
Further, step S6 includes:
and forming entity pairs by all external entities and internal entities in the range of the area A, and constructing an electric power system entity relation library.
Further, step S6 further includes:
using tab viewsAn external entity of the transformer substation constructs an external knowledge graph of the transformer substation;
all substations in the range of the area A, which are obtained from the structured data through knowledge extraction, are used as entities to be processed, and two groups of entities to be processed form entity pairs;
assume a commonThe following transformer substations:N is a natural number;
according to the connection relation between different substations, establishing entity pairs and entity relations of the knowledge graph:
by usingRepresentation->And->A connection state between them, wherein,
,
according toAnd (3) establishing an external association knowledge graph between the substations.
Further, step S6 further includes:
taking a transformer substation as a data unit;
first select a tab view with the substationIs->And->Corresponding attribute view->,
Matching from the electric power system entity relation library to obtain the equipment entity at the other end in the attribute viewAnd establishing a knowledge graph of the internal equipment of the transformer substation.
The invention also provides a multi-objective optimization method of the knowledge graph, which optimizes the knowledge graph, and comprises the following steps:
firstly, setting four-dimensional targets of an evaluation knowledge graph model as accuracy, consistency, simplicity and coverage rate; wherein,
the accuracy is defined as: the ratio between the number of correct entities for a given tag view and the total number of real devices under the same tag view, i.e.
,
Wherein,representing the total count->Representing +.>An individual entity;
the consistency is defined as: the case where the logic in the relational view matches the actual logic, i.e
,
,
Wherein,representing +.>Personal entity and->Relationship of individual entities;
the conciseness is defined as: the sum of the number of low frequency attributes, while the attribute view with the occurrence frequency smaller than a certain threshold is considered as the low frequency attribute, the conciseness is defined as
,
,
,
Coverage is defined as: the coverage of knowledge graph to entity and relation in real data, i.e
,
Thus the four-dimensional objective function is expressed as
,
And then optimizing the constructed knowledge graph from three views by using a multi-target gradient mode.
Further, the method comprises the steps of,
for nodesFor example, the optimization vector to be updated is:
;
updating by using multi-target gradient descent mode, wherein the specific updating operation is as follows
,
,
Up to。
Compared with the prior art, the invention has the following advantages:
in the data fusion stage, a multi-view data description and analysis method is provided. Considering three views of labels, relationships and attributes, the attribute view is added unlike the common knowledge graph. And obtaining the attribute characteristics with uniqueness in the multi-dimension space by utilizing the data expansion and attribute extraction methods.
In the model construction stage, a novel knowledge graph construction mode of data layering and re-fusion is provided. And layering the data into an external part and an internal part according to the physical characteristics of the data for the first time, and respectively constructing a knowledge graph. The secondary layering divides the internal data into different categories of data corresponding to different devices based on the results after the multi-view description. And fusing the knowledge maps after completion to help define the data structure.
In the model optimization stage, a knowledge graph optimization method based on multi-objective gradients is provided. The accuracy, coverage rate, consistency and simplicity are considered as four optimization targets for quality evaluation of the knowledge graph, and gradient optimization is carried out on the knowledge graph from a multi-view angle in order to achieve pareto optimization of a plurality of targets.
The invention provides a transformer substation knowledge graph construction method based on multi-view learning, which creates a brand new association mode for multi-source heterogeneous data collaboration from a complex power system and realizes more comprehensive entity coverage and a more complex semantic relation network.
Drawings
Fig. 1 is a schematic flow chart of the knowledge graph construction method of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Based on multi-source heterogeneous data of all substations (including substations, centralized control stations, virtual stations, thermal power stations, wind power stations and the like) in a certain area A, the invention discloses a substation knowledge graph construction method based on multi-view learning, which comprises the following steps.
And S1, analyzing and describing multi-source heterogeneous data of the transformer substation in the range of the whole area A.
S11, manually combing and analyzing physical connection relations, non-physical connection relations and deep logic relations among all substations including primary equipment and secondary equipment (including auxiliary equipment and inspection equipment) in the whole area A, and creating text information data of all entity objects in the whole area A.
Using a transformer stationA generator (No. 1 generator) and a switch (No. 1 switch) within a substation) are exemplified:
the three physical objects have a circuit connection relationship, i.e. a physical connection relationship, such as creating a "generator connection No. 1 switch" and a "generator connection No. 1Text information data of substation ". In addition to this, from a spatial point of view, both the generator and the switch are devices inside the substation, this spatial affiliation, i.e. not physically connected, thus creating "+.>Transformer substation No. 1 generator and->Text information data of switch No. 1 of transformer substation. In addition, although the switch and the generator are connected with the transformer substation, when the switch is disconnected, the generator is also disconnected, and the relationship between the generator and the transformer substation belongs to the deep logic relationship existing in the power system, and can be simply understood as the causal relationship with secondary causal relationship or more layers, such as creating a switch No. 1 for secondary causal relationship>The substation disconnects generator No. 1.
The structured text data created by the invention covers secondary equipment of the transformer substation and considers deep logic relations.
S12, analyzing operation data of the transformer substation in the range of the whole area A, and converting unstructured data into structured data.
The operation data of the transformer substation comprise power transmission rules, service experience, model data, alarm data, historical data, graphic files and the like.
The model data is structured data reflecting information of different sites of the transformer substation and running equipment thereof.
The alarm data is structured data for recording fault information of the transformer substation system.
The historical data is structured data that records substation operating parameters.
Graphics files belong to unstructured data, such as power topologies, requiring the conversion of entities and entity relationships contained in the graphics into structured text data. This process is done manually and is part of the preparatory phase of the invention.
And S2, performing keyword segmentation, feature analysis, knowledge extraction and data duplication removal processing on all the structured data in the whole area A by using a text information extraction technology, and integrating the keyword segmentation, the feature analysis, the knowledge extraction and the data duplication removal processing into an expert knowledge base.
And S3, extracting the entity, the attribute and the connection relation from the structured data, and constructing a data layer of the knowledge graph.
S31, identifying the actual names of the transformer substation and the equipment as the entity to be processed, and forming the entity to be processed into an entity pair.
S32, marking each entity to be processed according to the attribute and the type of the entity to be processed.
Such as substation, centralized control station centralized control station, switch, knife switch, transformer power transformer, etc.
S33, the structured data is initially layered.
The entity to be processed is marked as a division standard, for example, the entity marked as a sub/station is divided into external entities, and the entity to be processed of the types marked as power transformer, break, transformer winding, shunt compensator and the like is divided into internal entities.
Step S4, constructing a relation viewAnd->。
Definition of the first embodimentThe individual entity is->。
S41, constructing a relation view.
Extracting the physical connection relation between the two entities from the data layer in the step S3 to obtain a relation vector between the two entities
,
Wherein the method comprises the steps ofN is a natural number.
S42, constructing an attribute view.
When the attribute view is constructed, the attribute view needs to be divided into two cases of entity attribute and attribute relationship.
For the entity, the physical characteristics of each entity and each segment of relation are required to be learned from the data layer in the step S3, the attribute names and the attribute values are identified by utilizing an attribute extraction method, the entity attribute characteristics with different dimensions are designed, and the length is obtainedIs>The attribute view vector of the individual entity is +.>;
And for the relationshipFor attributes, advanced data expansion is required. The relation name is identified from the data layer in the step S3, for example, the data corresponding to the standard path name is expanded into two entity names, one path name and the corresponding relation attribute feature after word segmentation, entity matching and uniqueness confirmation. Obtaining a length ofIs>Segment (/ ->And->Correspondence) is +.>。
And S5, data are secondarily layered and recombined, and a tag view is constructed.
S51, utilizing the attribute view of the entitySecondary layering, namely obtaining attribute vectors of the entities according to the step 4Calculating the intimacy between the internal entities to obtain a intimacy matrix as
;
。
S52, clustering is carried out by utilizing the affinity matrix, and a secondary layering result of all the entity devices is obtained.
S53, defining the label view of the external entity after the secondary layering asAnd (5) a transformer substation.
And 6, establishing an entity relation library of the power system, and constructing an external knowledge graph and an internal knowledge graph.
And forming entity pairs by all external entities and internal entities in the range of the area A, and constructing an electric power system entity relation library.
S61, constructing an external knowledge graph of the transformer substation.
UsingAnd an external entity of the transformer substation constructs a transformer substation external knowledge graph.
And taking all substations in the range of the area A, which are obtained from the structured data through knowledge extraction, as the entities to be processed, and forming two groups of entity pairs by the entities to be processed.
Assume a commonThe following transformer substations:N is a natural number.
According to the connection relation between different substations, establishing entity pairs and entity relations of the knowledge graph:
by usingRepresentation->And->A connection state between them, wherein,
。
according toAnd (3) establishing an external association knowledge graph between the substations.
S62, constructing a knowledge graph of internal equipment of the transformer substation.
Taking a transformer substation as a data unit.
First selecting the label with the transformer substationRelation of (1)>And its corresponding attribute viewMatching from the electric power system entity relation library to obtain the equipment entity at the other end in the attribute viewThese entities are considered to belong to the same internal substation, and their corresponding device physical names are the devices located inside the substation.
And finally, constructing a substation internal equipment knowledge graph according to the entity pairs and the corresponding entity relations.
Step S7, knowledge storage is carried out on the knowledge graphs outside and inside the transformer substation based on the Neo4j graph database, and according to the relation viewAnd uniqueness of entity naming, which integrates the entity relation library of the electric power system into a large-scale knowledge graph.
The database storage mode of Neo4j can interactively present the connection relation among complex models of the transformer substation in the angle of data visualization, and realize the functions of adding, deleting and modifying, thereby realizing the visual and interactive integral association of all equipment of all transformer substations in the whole area range.
The constructed substation knowledge graph can completely cover different types of substations such as substations, virtual stations, thermal power stations, wind power stations and the like, and simultaneously comprises various primary and secondary equipment. The primary device is abstracted to a primary entity and the secondary device is abstracted to a secondary entity. Each entity represents a node.
In the knowledge graph of the invention, different types of nodes are distinguished by different colors and sizes. If a large node represents a substation and a small node represents a secondary device, different types of secondary devices may be set to different colors.
The invention also provides a method for carrying out multi-objective optimization on the constructed knowledge graph model. The method comprises the following steps:
firstly, setting four-dimensional targets of the evaluation knowledge graph model as accuracy, consistency, simplicity and coverage rate. Wherein:
the accuracy is defined as: the ratio between the number of correct entities for a given tag view and the total number of real devices under the same tag view, i.e.
,
Wherein,representing the total count->Representing +.>And a personal entity.
The consistency is defined as: the case where the logic in the relational view matches the actual logic, i.e
,
,
Wherein,representing reality?>Personal entity and->Relationship of individual entities.
The conciseness is defined as: the sum of the number of low frequency attributes, while attribute views with frequency of occurrence less than a certain threshold are considered low frequency attributes. Conciseness is defined as
,
,
,
Coverage is defined as: the coverage of knowledge graph to entity and relation in real data, i.e
。
Thus the four-dimensional objective function is expressed as
。
And then optimizing the constructed knowledge graph from three views by using a multi-target gradient mode.
For nodesFor instance, include tag view +.>View of relationshipAnd attribute->The view, expressed as an optimization vector to be updated, is:
。
updating by using multi-target gradient descent mode, wherein the specific updating operation is as follows
,
,
Up to。
The optimized knowledge graph can be used as a technical basis for supporting the auxiliary analysis and processing of the transformer substation event, namely: based on the external association knowledge graph of the transformer substations, the connection relation of power transmission between the transformer substations can be simply analyzed; based on the knowledge graph of the internal equipment of the transformer substation, a situation graph of the power grid equipment can be constructed, and the life cycle state and the system robustness of the equipment can be continuously perceived and pre-warned. The combination of the external association knowledge graph and the internal equipment knowledge graph can help to improve the digital monitoring capability of the whole model of the global transformer substation. For example, when a certain device fails, the failure information is used as an engine to input a knowledge graph, and the intelligent semantic search function is utilized to inquire the failure information by an operator, complete the confirmation of the failure device, obtain the analysis of the failure information and further map the analysis to the specific position, the attribute and the connection relation of the knowledge graph.
Further, the data layer of the knowledge graph is updated in real time by taking the operation mode of the power system equipment as a principle, so that monitoring staff is assisted in completing transportation and management, the equipment state of a large-scale global model of the power system is mastered, situation analysis is completed, and the sustainable development of the digital technology of the power system is promoted.
Although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.