Power dispatching automation operation knowledge graph construction method and system
By building a knowledge graph for power scheduling automation operations, using ontology definition and entity relationship extraction methods, the problem of fault analysis of power scheduling automation system has been solved, fault handling capabilities and knowledge analysis efficiency has been improved, operation and maintenance costs have been reduced, and grid scheduling automation has been enhanced. Level of informatization and intelligence.
Patent Information
- Application Number
- CN202410938468.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-13
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-07-13
AI Technical Summary
It is difficult to accurately and quickly analyze the failures of large-scale power scheduling automation systems in the prior art, and it is difficult to effectively utilize the knowledge of power scheduling automation operations in traditional manual experience.
By building a knowledge graph for power scheduling automation operations, using ontology definition and entity relationship extraction methods, triple information is extracted from unstructured text, and equipment, systems, personnel, faults and work content are linked to establish knowledge about power scheduling automation operations. Map.
The utilization rate of operation knowledge in the field of power scheduling automation has been improved, the fault handling capabilities and the quality and efficiency of knowledge analysis and processing have been improved, the operation and maintenance costs have been reduced, and the informatization and intelligence level of power grid scheduling automation has been enhanced.
Smart Images

Figure CN119130105A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power grid operation and maintenance technology, and in particular to a method and system for constructing a knowledge graph for automated power dispatching operations. Background Art
[0002] my country has been involved in the field of power system dispatching automation since the 1970s, and has accumulated a lot of structured and unstructured data. Nowadays, it is difficult to accurately and quickly analyze large-scale power dispatching automation system faults through traditional manual experience. The use of knowledge graph technology can effectively solve the problem that the knowledge of power dispatching automation operations is difficult to use. The construction of a comprehensive ontology structure can more comprehensively express the faults, operation and inspection content and safety measures of the power dispatching automation system, and can better utilize historical data. The entity relationship joint extraction method extracts triple information from unformatted text, which can better associate equipment, systems, personnel, faults and work content. Summary of the invention
[0003] The present invention proposes a method and system for constructing a knowledge graph for electric power dispatching automation operations. By preprocessing the historical text of dispatching automation operations, a knowledge graph for electric power dispatching automation operations is established using ontology definition and entity relationship extraction methods, and the data in the field of electric power dispatching automation operations is fully explored, which can effectively improve the utilization rate of operation knowledge in the field of electric power dispatching automation.
[0004] The present invention adopts the following technical solutions.
[0005] A method for constructing a knowledge graph of power dispatching automation operations, which preprocesses the historical text of dispatching automation operations and uses ontology definition and entity relationship extraction methods to establish a knowledge graph of power dispatching automation operations, including the following steps:
[0006] Step S1, constructing the power dispatching automation operation ontology structure;
[0007] Step S2, processing the data of the docx text, obtaining the first triplet in the form of (entity, relationship category label, entity) and the domain text to be extracted from the formatted data;
[0008] Step S3, obtaining the word vector and position vector of each sentence in the domain text to be extracted, adding the word vector and the position vector to obtain a new vector representation of the text, and inputting the new vector representation into an entity relationship extraction module that integrates entity category information to obtain a second triplet in the form of (entity, relationship category label, entity);
[0009] Step S4: construct a knowledge graph of power dispatching automation operations according to the ontology structure, the first entity triples and the second entity triples.
[0010] In step S1, the design of the power dispatching automation operation ontology structure is specifically defined as follows:
[0011] Assume that the power dispatching automation operation ontology is Power-Dispatch-Automation-OperatingOntology; Power-Dispatch-Automation-Operating Ontology = {Entity, Attribute, Relation}, where:
[0012] Step S1A1, define Entity as an entity-related concept set, which is used to represent a set of objective entities in the field of power dispatching automation operations, Entity = (Software, Equipment, Staff, Fault, Work), Software is a software-type entity, which refers to the objectively existing business systems and software involved in power dispatching automation, including six subcategories: business system, process, database, data table, file, and operating system; Equipment is an equipment-type entity, which represents the objectively existing physical equipment and site; Staff is a personnel-type entity, which includes personnel, companies, departments, and roles involved in power dispatching automation operations; Fault is a fault-type entity, which includes fault causes and abnormal phenomenon subcategories; Work is a work-type entity, which includes work content, work items, instruction operations, and safety measures.
[0013] Step S1A2, define Attribute as a set of attribute-related concepts, which indicates the specific attribute characteristics of Entity, including version, qualification, and risk; among them, Software entity and Equipment entity have version attribute, which identifies the version number of software and equipment; Staff entity has qualification attribute, which includes permitted operation category, qualification certificate, and training information, which identifies whether the role, company, and personnel are qualified for the operation; risk includes equipment risk and instruction risk;
[0014] Step S1A3, define Relation to include all association relationships between entity and attribute related concepts except hierarchical relationships, recorded as <concept C1, relationship R, concept C2>, where concept C1 and concept C2 are included in the entity related concept set Entity and the attribute related concept set Attribute.
[0015] In step S2, the docx text data is processed to obtain the first triple in the form of (entity, relationship category label, entity) and the text of the entity relationship to be extracted from the formatted data. The specific steps include: step S2A1, define the field list to be extracted NAME = {name1, name2, ..., namen} and the field corresponds to the outline level list LEVEL = {level1, level2, ..., level n}, define the temporary dictionary temp as empty;
[0016] Step S2A2: Use the python-docx tool to parse the docx file to obtain a paragraph list in the xml data format of the document;
[0017] Step S2A3, read a paragraph data in XML format, if the outline level exists in LEVEL, execute step S2A4; if not, continue to read the next paragraph until the outline level of the paragraph read exists in LEVEL or the end of the document is read;
[0018] Step S2A4: If the temporary dictionary temp is empty, the content of this paragraph is <name i ,content i > is saved in the form of a key-value pair to a temporary dictionary, where name represents the field name and content represents the paragraph content, and step S2A3 is executed;
[0019] Step S2A5: If the temporary dictionary contains the field name i , and the corresponding key-value pair value is content i , and the outline level is the last level, then the current paragraph content is spliced to content i , save it to temp again, and execute step S2A3;
[0020] Step S2A6: If the temporary dictionary contains the field name i , and the outline level is not the last level, then the content in the temporary dictionary temp is saved in the formatted text database in json format and the value corresponding to the field outline level of the last level is saved in the domain text database to be extracted, and the field of this level and all the fields of the lower level are removed from the temporary dictionary, and step S2A3 is executed;
[0021] Step S2A7: Obtain a first triplet according to the ontology structure and the content of the formatted text database, and the domain text to be extracted is stored in the domain text database.
[0022] In step S2, the method further includes obtaining a first triple according to the ontology structure and the formatted text database content, specifically including the following steps:
[0023] Extract dictionary temp from the formatted text database; obtain a key1 and corresponding value1 in temp, retrieve the key1 associated relationship r and entity key2 set in the ontology structure, search for key2 and corresponding value2 in temp, and save (value1, r, value2) as the first triple.
[0024] In step S3, the word vector and position vector of each sentence in the domain text to be extracted are obtained, the word vector and the position vector are added to obtain a new vector representation of the text, and the new vector representation is input into an entity relationship extraction module that integrates entity category information to obtain a second triple in the form of (entity, relationship category label, entity), which specifically includes the following steps:
[0025] Step S3A1, obtaining a word vector and a position vector of each sentence in the domain text to be extracted, adding the word vector and the position vector to obtain a new vector representation of the text, performing first entity recognition through a multi-head self-attention mechanism layer, and obtaining multiple first entities and first entity categories;
[0026] Step S3A2, obtain the vector representation of the first entity category information, input the new vector of the text, the first entity and the first entity category information into the specific relationship second entity recognition module that integrates the entity category information, and obtain a second triplet in the form of (entity, relationship category label, entity).
[0027] In step S3A1, the word vector and position vector of each sentence in the field text to be extracted are obtained, the word vector and the position vector are added to obtain a new vector representation of the text, and the first entity recognition is performed through a multi-head self-attention mechanism layer to obtain multiple first entities and first entity categories, which specifically includes the following steps: step S3B1, obtaining the word vector and position vector of each sentence, and obtaining the word vector and position vector of each word in each sentence;
[0028] Step S3B2, adding the word vector and the position vector, and obtaining the first entity prediction probability of the sentence through a multi-head self-attention mechanism layer;
[0029] Step S3B3, processing the first entity prediction probability through a multi-layer pointer decoding layer to obtain a plurality of first entities and first entity categories;
[0030] In step S3A2, a vector representation of the first entity category information is obtained, and the new vector of the text, the first entity, and the first entity category information are input into a specific relationship second entity recognition module that integrates the entity category information to obtain a second triple in the form of (entity, relationship category label, entity), specifically including the following steps:
[0031] Step S4C1, encoding the head entity category through a head entity category encoder to obtain a first entity category vector;
[0032] Step S4C2, obtaining the word vector of the first entity from the new vector of the text, and adding the word vectors in the first dimension to obtain the first entity word vector;
[0033] Step S4C3, adding the new vector of the text, the first entity word vector and the first entity category vector, and obtaining a second entity prediction probability through a bidirectional long short-term memory network;
[0034] Step S4C4, concatenating the new vector of the text, the first entity word vector and the first entity category vector, and obtaining a second entity prediction probability through a multi-head self-attention mechanism layer;
[0035] Step S4C5: add the second entity prediction probability 1 and the second entity prediction probability 2, process through multiple pointer decoding layers, obtain the second entity and relationship related to the first entity, and form a second triplet.
[0036] In step S3, the method further includes limiting the first entity, the relationship category label and the second entity by the triple composition module, specifically including the following steps:
[0037] For the second triple, obtain its first entity e1, second entity e2, and relationship r; if r belongs to the relationship between the fault entity class and the working entity class, and e1 and e2 overlap in the text, remove the triple;
[0038] For the second triple set, get (h i ,r i ,t i ), (h j ,*,*) and (h i ,r i ,t j ), where * represents any value; if h j Include h at the location of the text i At the position of the text or the same h i and r i In case h i Include h at the location of the text j In the position of the text, then keep (h i ,r i ,t j ), remove (h j ,*,*) and (h i ,r i ,tj ).
[0039] In step S4, a knowledge graph of electric power dispatching automation operations is constructed according to the ontology structure, the first triplet and the second triplet. The specific steps include:
[0040] Step S4A1: Obtain the first entity and the second entity in the first triple and the second triple to form an entity list ent=[ent1, ent2, ..., ent n ];
[0041] Step S4A2: Calculate entity similarity Similar(ent i ,ent j ), for Similar(ent i ,ent j )>λ is stored in different entity sets, one set represents a specific entity, and λ is a parameter;
[0042] Step S4A3: For the different entity sets, take the first entity ent1 to replace other entities in the set existing in the first triplet and the second triplet;
[0043] Step S4A4: store the replaced first triplet and second triplet into a graph database.
[0044] In step S4A2, the specific calculation formula of entity similarity is as follows:
[0045]
[0046] In the formula, variable a i and b i are the entities ent1 and ent j The word vector representation of .
[0047] A knowledge graph construction system for power dispatching automation operation includes a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the method steps described above are executed;
[0048] The system also includes the following functional modules: data preprocessing module, triple extraction module, power dispatching automation operation knowledge graph construction module;
[0049] A data preprocessing module, used for obtaining formatted text data and domain text data to be extracted from historical data, and forming triples from the formatted text data;
[0050] A triple extraction module is used to identify the first entity and the first entity category of the domain text data to be extracted, and input the specific relationship second entity recognition module that integrates the entity category information, so as to realize the extraction of (entity, relationship, entity) triples in the domain text to be extracted;
[0051] The electric power dispatching automation operation knowledge graph construction module is used to store triples in the graph database according to the ontology structure. First, the entity alignment of the triples is realized according to the method proposed in step S4, and then the aligned triples are formed into a knowledge graph and stored in the graph database.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] After continuous exploration and experimentation, the present invention structures the power grid dispatching automation software system, hardware equipment, personnel information, historical faults, solutions and safety measures, and uses the ontology method to associate the contents; it is suitable for power grid dispatching automation operation scenarios, provides auxiliary decision-making for operation and maintenance command personnel, effectively improves the ability of personnel to deal with equipment anomalies and faults, improves the quality and efficiency of power grid dispatching automation software and hardware knowledge analysis and processing, reduces the operation and maintenance costs of power grid dispatching automation software and hardware, and improves the efficiency of operation and maintenance personnel.
[0054] Furthermore, the present invention converts massive amounts of software and hardware information and personnel information into power grid dispatching automation operation knowledge and actual productivity through the infrastructure construction of the power dispatching automation operation knowledge graph, and realizes typical application scenarios of power dispatching automation operation knowledge such as accurate search of business system and hardware equipment information and generation of power dispatching automation work tickets.
[0055] The present invention can provide fast, convenient, accurate and effective knowledge support for multiple roles such as power dispatching automation equipment maintenance and technical management. It can mine deep correlations in historical operation data, strengthen operation analysis capabilities, and comprehensively improve the informationization and intelligentization level of power dispatching automation operations.
[0056] The present invention relates to a method and system for constructing a knowledge graph of electric power dispatching automation operation, including constructing an ontology structure of electric power dispatching automation operation; processing the data of docx text, obtaining a first triple in the form of (entity, relationship category label, entity) and a field text to be extracted from the formatted data; obtaining the word vector and position vector of each sentence in the field text to be extracted, adding the word vector and the position vector to obtain a new vector representation of the text, and inputting the entity relationship extraction module integrating entity category information to obtain a second triple in the form of (entity, relationship category label, entity); constructing a knowledge graph of electric power dispatching automation operation according to the ontology structure, the first entity triple and the second entity triple. The present invention pre-processes the historical text of dispatching automation operation, uses the method of ontology definition and entity relationship extraction to establish a knowledge graph of electric power dispatching automation operation, fully explores the field data of electric power dispatching automation operation, and can effectively improve the utilization rate of operation knowledge in the field of electric power dispatching automation.
[0057] The present invention associates the five parts of software, equipment, personnel, faults, and work content in the field of power dispatching automation operations, obtains formatted data through data preprocessing and entity relationship extraction modules, better analyzes the potential relationships in historical data, and thus improves the knowledge mining capabilities of historical operation data. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0059] Attached Figure 1 It is a schematic diagram of the principle framework of the method described in the present invention. DETAILED DESCRIPTION
[0060] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.
[0061] The present invention provides an overall framework of a method for constructing a knowledge graph of electric power dispatching automation operations; specifically, it includes constructing an ontology structure of electric power dispatching automation operations, a data preprocessing module, an entity relationship extraction module integrating entity category information, and a knowledge graph construction module for electric power dispatching automation operations. In view of the characteristics of the electric power dispatching automation operation field, the ontology structure is designed from five perspectives: software, equipment, personnel, faults, and work content; the historical docx text data is preprocessed and divided into formatted data and unformatted data; the unformatted text is formatted through the first entity and category extraction module and the relationship and second entity acquisition module, and finally the knowledge graph of electric power dispatching automation operations is obtained.
[0062] As shown in the figure, a method for constructing a knowledge graph of power dispatching automation operations, by preprocessing the historical text of dispatching automation operations, using ontology definition and entity relationship extraction methods to establish a knowledge graph of power dispatching automation operations, includes the following steps;
[0063] Step S1, constructing the power dispatching automation operation ontology structure;
[0064] Step S2, processing the data of the docx text, obtaining the first triplet in the form of (entity, relationship category label, entity) and the domain text to be extracted from the formatted data;
[0065] Step S3, obtaining the word vector and position vector of each sentence in the domain text to be extracted, adding the word vector and the position vector to obtain a new vector representation of the text, and inputting the new vector representation into an entity relationship extraction module that integrates entity category information to obtain a second triplet in the form of (entity, relationship category label, entity);
[0066] Step S4: construct a knowledge graph of power dispatching automation operations according to the ontology structure, the first entity triples and the second entity triples.
[0067] In step S1, the design of the power dispatching automation operation ontology structure is specifically defined as follows:
[0068] Assume that the power dispatching automation operation ontology is Power-Dispatch-Automation-OperatingOntology; Power-Dispatch-Automation-Operating Ontology = {Entity, Attribute, Relation}, where:
[0069] Step S1A1, define Entity as an entity-related concept set, which is used to represent a set of objective entities in the field of power dispatching automation operations, Entity = (Software, Equipment, Staff, Fault, Work), Software is a software-type entity, which refers to the objectively existing business systems and software involved in power dispatching automation, including six subcategories: business system, process, database, data table, file, and operating system; Equipment is an equipment-type entity, which represents the objectively existing physical equipment and site; Staff is a personnel-type entity, which includes personnel, companies, departments, and roles involved in power dispatching automation operations; Fault is a fault-type entity, which includes fault causes and abnormal phenomenon subcategories; Work is a work-type entity, which includes work content, work items, instruction operations, and safety measures.
[0070] Step S1A2, define Attribute as a set of attribute-related concepts, which indicates the specific attribute characteristics of Entity, including version, qualification, and risk; among them, Software entity and Equipment entity have version attribute, which identifies the version number of software and equipment; Staff entity has qualification attribute, which includes permitted operation category, qualification certificate, and training information, which identifies whether the role, company, and personnel are qualified for the operation; risk includes equipment risk and instruction risk;
[0071] Step S1A3, define Relation to include all association relationships between entity and attribute related concepts except hierarchical relationships, recorded as <concept C1, relationship R, concept C2>, where concept C1 and concept C2 are included in the entity related concept set Entity and the attribute related concept set Attribute.
[0072] In step S2, the docx text data is processed to obtain the first triple in the form of (entity, relationship category label, entity) and the text of the entity relationship to be extracted from the formatted data. The specific steps include: step S2A1, define the field list to be extracted NAME = {name1, name2, ..., name n} and the field corresponds to the outline level list LEVEL = {level1, level2, ..., level n}, define the temporary dictionary temp as empty;
[0073] Step S2A2: Use the python-docx tool to parse the docx file to obtain a paragraph list in the xml data format of the document;
[0074] Step S2A3, read a paragraph data in XML format, if the outline level exists in LEVEL, execute step S2A4; if not, continue to read the next paragraph until the outline level of the paragraph read exists in LEVEL or the end of the document is read;
[0075] Step S2A4: If the temporary dictionary temp is empty, the content of this paragraph is <name i ,content i > is saved in the form of a key-value pair to a temporary dictionary, where name represents the field name and content represents the paragraph content, and step S2A3 is executed;
[0076] Step S2A5: If the temporary dictionary contains the field name i , and the corresponding key-value pair value is content i , and the outline level is the last level, then the current paragraph content is spliced to contenti , save it to temp again, and execute step S2A3;
[0077] Step S2A6: If the temporary dictionary contains the field name i , and the outline level is not the last level, then the content in the temporary dictionary temp is saved in the formatted text database in json format and the value corresponding to the field outline level of the last level is saved in the domain text database to be extracted, and the field of this level and all the fields of the lower level are removed from the temporary dictionary, and step S2A3 is executed;
[0078] Step S2A7: Obtain a first triplet according to the ontology structure and the content of the formatted text database, and the domain text to be extracted is stored in the domain text database.
[0079] In step S2, the method further includes obtaining a first triple according to the ontology structure and the formatted text database content, specifically including the following steps:
[0080] Extract dictionary temp from the formatted text database; obtain a key1 and corresponding value1 in temp, retrieve the key1 associated relationship r and entity key2 set in the ontology structure, search for key2 and corresponding value2 in temp, and save (value1, r, value2) as the first triple.
[0081] In step S3, the word vector and position vector of each sentence in the domain text to be extracted are obtained, the word vector and the position vector are added to obtain a new vector representation of the text, and the new vector representation is input into an entity relationship extraction module that integrates entity category information to obtain a second triple in the form of (entity, relationship category label, entity), which specifically includes the following steps:
[0082] Step S3A1, obtaining a word vector and a position vector of each sentence in the domain text to be extracted, adding the word vector and the position vector to obtain a new vector representation of the text, performing first entity recognition through a multi-head self-attention mechanism layer, and obtaining multiple first entities and first entity categories;
[0083] Step S3A2, obtain the vector representation of the first entity category information, input the new vector of the text, the first entity and the first entity category information into the specific relationship second entity recognition module that integrates the entity category information, and obtain a second triplet in the form of (entity, relationship category label, entity).
[0084] In step S3A1, the word vector and position vector of each sentence in the field text to be extracted are obtained, the word vector and the position vector are added to obtain a new vector representation of the text, and the first entity recognition is performed through a multi-head self-attention mechanism layer to obtain multiple first entities and first entity categories, which specifically includes the following steps: step S3B1, obtaining the word vector and position vector of each sentence, and obtaining the word vector and position vector of each word in each sentence;
[0085] Step S3B2, adding the word vector and the position vector, and obtaining the first entity prediction probability of the sentence through a multi-head self-attention mechanism layer;
[0086] Step S3B3, processing the first entity prediction probability through a multi-layer pointer decoding layer to obtain a plurality of first entities and first entity categories;
[0087] In step S3A2, a vector representation of the first entity category information is obtained, and the new vector of the text, the first entity, and the first entity category information are input into a specific relationship second entity recognition module that integrates the entity category information to obtain a second triple in the form of (entity, relationship category label, entity), specifically including the following steps:
[0088] Step S4C1, encoding the head entity category through a head entity category encoder to obtain a first entity category vector;
[0089] Step S4C2, obtaining the word vector of the first entity from the new vector of the text, and adding the word vectors in the first dimension to obtain the first entity word vector;
[0090] Step S4C3, adding the new vector of the text, the first entity word vector and the first entity category vector, and obtaining a second entity prediction probability through a bidirectional long short-term memory network;
[0091] Step S4C4, concatenating the new vector of the text, the first entity word vector and the first entity category vector, and obtaining a second entity prediction probability through a multi-head self-attention mechanism layer;
[0092] Step S4C5: add the second entity prediction probability 1 and the second entity prediction probability 2, process through multiple pointer decoding layers, obtain the second entity and relationship related to the first entity, and form a second triplet.
[0093] In step S3, the method further includes limiting the first entity, the relationship category label and the second entity by the triple composition module, specifically including the following steps:
[0094] For the second triple, obtain its first entity e1, second entity e2, and relationship r; if r belongs to the relationship between the fault entity class and the working entity class, and e1 and e2 overlap in the text, remove the triple;
[0095] For the second triple set, get (h i ,r i ,t i ), (h j ,*,*) and (h i ,r i ,t j ), where * represents any value; if h j Include h at the location of the text i At the position of the text or the same h i and r i In case h i Include h at the location of the text j In the position of the text, then keep (h i ,r i ,t j ), remove (h j ,*,*) and (h i ,r i ,t j ).
[0096] In step S4, a knowledge graph of electric power dispatching automation operations is constructed according to the ontology structure, the first triplet and the second triplet. The specific steps include:
[0097] Step S4A1: Obtain the first entity and the second entity in the first triple and the second triple to form an entity list ent=[ent1, ent2, ..., ent n ];
[0098] Step S4A2: Calculate entity similarity Similar(ent i ,ent j ), for Similar(ent i ,ent j )>λ is stored in different entity sets, one set represents a specific entity, and λ is a parameter;
[0099] Step S4A3: For the different entity sets, take the first entity ent1 to replace other entities in the set existing in the first triplet and the second triplet;
[0100] Step S4A4: store the replaced first triplet and second triplet into a graph database.
[0101] In step S4A2, the specific calculation formula of entity similarity is as follows:
[0102]
[0103] In the formula, variable a i and b i are the entities ent1 and ent j The word vector representation of .
[0104] A knowledge graph construction system for power dispatching automation operation includes a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the method steps described above are executed;
[0105] The system also includes the following functional modules: data preprocessing module, triple extraction module, power dispatching automation operation knowledge graph construction module;
[0106] A data preprocessing module, used for obtaining formatted text data and domain text data to be extracted from historical data, and forming triples from the formatted text data;
[0107] A triple extraction module is used to identify the first entity and the first entity category of the domain text data to be extracted, and input the specific relationship second entity recognition module that integrates the entity category information, so as to realize the extraction of (entity, relationship, entity) triples in the domain text to be extracted;
[0108] The electric power dispatching automation operation knowledge graph construction module is used to store triples in the graph database according to the ontology structure. First, the entity alignment of the triples is realized according to the method proposed in step S4, and then the aligned triples are formed into a knowledge graph and stored in the graph database.
[0109] This embodiment also provides a knowledge graph construction system for electric power dispatching automation operations, including a memory and a processor, wherein the memory stores method instructions of steps S1 to S4, and the processor executes the method instructions stored in the memory during operation.
[0110] Preferably, the system of this embodiment may also include the following functional modules: a data preprocessing module, a triple extraction module, and a power dispatching automation operation knowledge graph construction module.
[0111] Among them, the data preprocessing module is used to obtain formatted text data and domain text data to be extracted from historical data, and form the formatted text data into triples; the triple extraction module is used to perform first entity and first entity category recognition on the domain text data to be extracted, and input the specific relationship second entity recognition module that integrates the entity category information, so as to realize the extraction of (entity, relationship, entity) triples in the domain text to be extracted; the power dispatching automation operation knowledge graph construction module is used to store the triples in the graph database according to the ontology structure, first realize the entity alignment of the triples according to the method proposed in step S4, and then form the knowledge graph of the aligned triples and store it in the graph database.
[0112] This embodiment designs the ontology structure from five perspectives, namely, software, equipment, personnel, faults, and work content, in view of the characteristics of the field of electric power dispatching automation operations; pre-processes the input historical data to obtain formatted data triplets and unformatted data; obtains formatted triplets through the first entity and the first entity category extraction module and the second entity recognition module that integrates the specific relationship of entity category information, and aligns similar entities to form a knowledge graph, which can effectively enhance the knowledge mining capability and intelligent analysis service capability of the historical data of dispatching automation operations, and comprehensively improve the informationization and intelligentization level of electric power dispatching automation operations.
[0113] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0114] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0115] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0117] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A method for constructing a knowledge graph for power dispatching automation operations, characterized in that: By preprocessing the historical text of dispatching automation operations, the knowledge graph of power dispatching automation operations is established using the ontology definition and entity relationship extraction methods. The steps include: Step S1, constructing the power dispatching automation operation ontology structure; Step S2, processing the data of the docx text, obtaining the first triplet in the form of (entity, relationship category label, entity) and the domain text to be extracted from the formatted data; Step S3, obtaining the word vector and position vector of each sentence in the domain text to be extracted, adding the word vector and the position vector to obtain a new vector representation of the text, and inputting the new vector representation into an entity relationship extraction module that integrates entity category information to obtain a second triplet in the form of (entity, relationship category label, entity); Step S4: construct a knowledge graph of power dispatching automation operations according to the ontology structure, the first entity triples and the second entity triples.
2. A method for constructing a knowledge graph for power dispatching automation operations according to claim 1, characterized in that: In step S1, the design of the power dispatching automation operation ontology structure is specifically defined as follows: Assume that the power dispatching automation operation ontology is Power-Dispatch-Automation-Operating Ontology; Power-Dispatch-Automation-Operating Ontology = {Entity, Attribute, Relation}, where: Step S1A1, define Entity as an entity-related concept set, which is used to represent a set of objective entities in the field of power dispatching automation operations, Entity = (Software, Equipment, Staff, Fault, Work), Software is a software-type entity, which refers to the objectively existing business systems and software involved in power dispatching automation, including six subcategories: business system, process, database, data table, file, and operating system; Equipment is an equipment-type entity, which represents the objectively existing physical equipment and site; Staff is a personnel-type entity, which includes personnel, companies, departments, and roles involved in power dispatching automation operations; Fault is a fault-type entity, which includes fault causes and abnormal phenomenon subcategories; Work is a work-type entity, which includes work content, work items, instruction operations, and safety measures. Step S1A2, define Attribute as a set of attribute-related concepts, which indicates the specific attribute characteristics of Entity, including version, qualification, and risk; among them, Software entity and Equipment entity have version attribute, which identifies the version number of software and equipment; Staff entity has qualification attribute, which includes permitted operation category, qualification certificate, and training information, which identifies whether the role, company, and personnel are qualified for the operation; risk includes equipment risk and instruction risk; Step S1A3, define Relation to include all association relationships between entity and attribute related concepts except hierarchical relationships, recorded as <concept C1, relationship R, concept C2>, where concept C1 and concept C2 are included in the entity related concept set Entity and the attribute related concept set Attribute.
3. The method for constructing a knowledge graph for power dispatching automation operations according to claim 1, characterized in that: In step S2, the docx text data is processed to obtain the first triple in the form of (entity, relationship category label, entity) and the text of the entity relationship to be extracted from the formatted data. The specific steps include: step S2A1, define the field list to be extracted NAME = {name1, name2, ..., name n } and the field corresponds to the outline level list LEVEL = {level1, level2, ..., level n }, define the temporary dictionary temp as empty; Step S2A2: Use the python-docx tool to parse the docx file to obtain a paragraph list in the xml data format of the document; Step S2A3, read a paragraph data in XML format, if the outline level exists in LEVEL, execute step S2A4; if not, continue to read the next paragraph until the outline level of the paragraph read exists in LEVEL or the end of the document is read; Step S2A4: If the temporary dictionary temp is empty, the content of this paragraph is <name i ,content i > is saved in the form of a key-value pair to a temporary dictionary, where name represents the field name and content represents the paragraph content, and step S2A3 is executed; Step S2A5: If the temporary dictionary contains the field name i , and the corresponding key-value pair value is content i , and the outline level is the last level, then the current paragraph content is spliced to content i , save it to temp again, and execute step S2A3; Step S2A6: If the temporary dictionary contains the field name i , and the outline level is not the last level, then the content in the temporary dictionary temp is saved in the formatted text database in json format and the value corresponding to the field outline level of the last level is saved in the domain text database to be extracted, and the field of this level and all the fields of the lower level are removed from the temporary dictionary, and step S2A3 is executed; Step S2A7: Obtain a first triplet according to the ontology structure and the content of the formatted text database, and the domain text to be extracted is stored in the domain text database.
4. A method for constructing a knowledge graph for power dispatching automation operations according to claim 3, characterized in that: In step S2, the method further includes obtaining a first triple according to the ontology structure and the formatted text database content, specifically including the following steps: Extract dictionary temp from the formatted text database; obtain a key1 and corresponding value1 in temp, retrieve the key1 associated relationship r and entity key2 set in the ontology structure, search for key2 and corresponding value2 in temp, and save (value1, r, value2) as the first triple.
5. The method for constructing a knowledge graph for power dispatching automation operations according to claim 1, characterized in that: In step S3, the word vector and position vector of each sentence in the domain text to be extracted are obtained, the word vector and the position vector are added to obtain a new vector representation of the text, and the new vector representation is input into an entity relationship extraction module that integrates entity category information to obtain a second triple in the form of (entity, relationship category label, entity), which specifically includes the following steps: Step S3A1, obtaining a word vector and a position vector of each sentence in the domain text to be extracted, adding the word vector and the position vector to obtain a new vector representation of the text, performing first entity recognition through a multi-head self-attention mechanism layer, and obtaining multiple first entities and first entity categories; Step S3A2, obtain the vector representation of the first entity category information, input the new vector of the text, the first entity and the first entity category information into the specific relationship second entity recognition module that integrates the entity category information, and obtain a second triplet in the form of (entity, relationship category label, entity).
6. A method for constructing a knowledge graph for power dispatching automation operations according to claim 1, characterized in that: In step S3A1, the word vector and position vector of each sentence in the domain text to be extracted are obtained, the word vector and the position vector are added to obtain a new vector representation of the text, and the first entity recognition is performed through a multi-head self-attention mechanism layer to obtain multiple first entities and first entity categories, which specifically includes the following steps: Step S3B1, obtaining a word vector and a position vector of each sentence, and obtaining a word vector and a position vector of each word in each sentence; Step S3B2, adding the word vector and the position vector, and obtaining the first entity prediction probability of the sentence through a multi-head self-attention mechanism layer; Step S3B3, processing the first entity prediction probability through a multi-layer pointer decoding layer to obtain a plurality of first entities and first entity categories; In step S3A2, a vector representation of the first entity category information is obtained, and the new vector of the text, the first entity and the first entity category information are input into a specific relationship second entity recognition module that integrates the entity category information to obtain a second triple in the form of (entity, relationship category label, entity), specifically including the following steps: Step S4C1, encoding the head entity category through a head entity category encoder to obtain a first entity category vector; Step S4C2, obtaining the word vector of the first entity from the new vector of the text, and adding the word vectors in the first dimension to obtain the first entity word vector; Step S4C3, adding the new vector of the text, the first entity word vector and the first entity category vector, and obtaining a second entity prediction probability through a bidirectional long short-term memory network; Step S4C4, concatenating the new vector of the text, the first entity word vector and the first entity category vector, and obtaining a second entity prediction probability through a multi-head self-attention mechanism layer; Step S4C5: add the second entity prediction probability 1 and the second entity prediction probability 2, process through multiple pointer decoding layers, obtain the second entity and relationship related to the first entity, and form a second triplet.
7. The method for constructing a knowledge graph for power dispatching automation operations according to claim 1, characterized in that: In step S3, the method further includes limiting the first entity, the relationship category label and the second entity by the triple composition module, specifically The following steps are involved: For the second triple, obtain its first entity e1, second entity e2, and relationship r; if r belongs to the relationship between the fault entity class and the working entity class, and e1 and e2 overlap in the text, remove the triple; For the second triple set, get (h i ,r i ,t i ), (h j ,*,*) and (h i ,r i ,t j ), where * represents any value; if h j Include h at the location of the text i At the position of the text or the same h i and r i In case h i Include h at the location of the text j In the position of the text, then keep (h i ,r i ,t j ), remove (h j ,*,*) and (h i ,r i ,t j ).
8. The method for constructing a knowledge graph for power dispatching automation operations according to claim 1, characterized in that: In step S4, a knowledge graph of electric power dispatching automation operations is constructed according to the ontology structure, the first triplet and the second triplet. The specific steps include: Step S4A1: Obtain the first entity and the second entity in the first triple and the second triple to form an entity list ent=[ent1, ent2, ..., ent n ]; Step S4A2: Calculate entity similarity Similar(ent i ,ent j ), for Similar(ent i ,ent j )>λ is stored in different entity sets, one set represents a specific entity, and λ is a parameter; Step S4A3: For the different entity sets, take the first entity ent1 to replace other entities in the set existing in the first triplet and the second triplet; Step S4A4: store the replaced first triplet and second triplet into a graph database.
9. The method for constructing a knowledge graph for power dispatching automation operations according to claim 1, characterized in that: In step S4A2, the specific calculation formula of entity similarity is as follows: In the formula, variable a i and b i are the entities ent1 and ent j The word vector representation of .
10. A knowledge graph construction system for power dispatching automation operations, characterized by: The method comprises a memory, a processor and computer program instructions stored in the memory and executable by the processor, wherein when the processor executes the computer program instructions, the method steps according to any one of claims 1 to 9 are executed; The system also includes the following functional modules: data preprocessing module, triple extraction module, power dispatching automation operation knowledge graph construction module; A data preprocessing module, used for obtaining formatted text data and domain text data to be extracted from historical data, and forming triples from the formatted text data; A triple extraction module is used to identify the first entity and the first entity category of the domain text data to be extracted, and input the specific relationship second entity recognition module that integrates the entity category information, so as to realize the extraction of (entity, relationship, entity) triples in the domain text to be extracted; The electric power dispatching automation operation knowledge graph construction module is used to store triples in the graph database according to the ontology structure. First, the entity alignment of the triples is realized according to the method proposed in step S4, and then the aligned triples are formed into a knowledge graph and stored in the graph database.
Citation Information
Patent Citations
A knowledge map representation learning method based on structure information and text description
CN109299284A
Chinese entity relationship extraction method based on character and word feature fusion of entity meaning items
CN111291556A
Text generation method and device and readable storage medium
CN116860958A
Knowledge graph construction method, knowledge graph query method, knowledge graph construction device, knowledge graph query device and related system
CN118152578A
Method for dynamic maintenance of a knowledge graph, terminal device and storage medium
EP4024263A1
