Automatic Conversion Method and Device for Emergency Response Plan Diagrams of Urban Power Grid Substations

By converting the text of emergency response plans for urban power grid substations into a knowledge graph structure, the inefficiency of existing technologies is solved, enabling rapid querying and efficient representation of emergency response plan knowledge, thereby improving the power grid's recovery capabilities.

CN122309759APending Publication Date: 2026-06-30STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
Filing Date
2026-03-20
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing emergency response plans for urban power grid substations are compiled in semi-structured forms such as operation steps and process tables in documents, which is difficult to meet the needs of power grid digitalization for searchability and rapid querying. In addition, manual annotation and import methods are inefficient and difficult to update in real time.

Method used

By employing automatic text recognition and feature extraction methods, and through text preprocessing, parsing, and mapping tables, the text of emergency response plans for urban power grid substations is converted into a knowledge graph structure, and the Neo4j graph database is used to achieve automatic conversion.

Benefits of technology

It enables rapid querying and efficient knowledge representation of emergency response plans for urban power grid substations, thereby improving the power grid's recovery capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122309759A_ABST
    Figure CN122309759A_ABST
Patent Text Reader

Abstract

This invention provides a method and apparatus for automatically converting emergency response plan knowledge graphs for urban power grid substations, relating to the field of knowledge graph construction and knowledge representation technology. The invention employs automatic text recognition and element extraction methods. By preprocessing and parsing document content, key semantic elements are extracted from valid statements based on predefined modules and mapping tables. The extracted content is then imported into the Neo4j graph database using a CSV file as an intermediary, ultimately achieving automatic conversion of emergency response plan knowledge graphs for urban power grid substations. This invention effectively regularizes and formalizes complex emergency response plan texts into a knowledge graph structure, simplifying fault operation query methods and improving the efficiency of emergency response plan knowledge representation. Ultimately, this invention enables rapid querying of emergency response plan decision-making steps after a fault in an urban power grid substation, improving the power grid's recovery capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of knowledge graph construction and knowledge representation technology, specifically to a method and device for automatic conversion of accident contingency plan graphs for urban power grid substations. Background Technology

[0002] With urban power grid substation emergency response plans being extensively documented in semi-structured formats such as operational steps and flowcharts, they struggle to meet the demands of power grid digitalization for searchability and rapid querying. For emergency response plans with long operational chains, graph databases offer significant advantages in querying, as their node-edge structure-based query method results in only a linear increase in complexity across multiple steps. Since changes in urban power grid construction, renovation, and operation all necessitate the creation and writing of new emergency response plans, relying on manual annotation and import methods to build databases is inefficient and makes real-time updates to the latest plans difficult. Summary of the Invention

[0003] The purpose of this invention is to provide an automatic conversion method and device for accident contingency plan graphs in urban power grid substations. This method addresses the problems of inefficiency and difficulty in updating existing database construction methods in real time based on the latest contingency plans. It can effectively represent complex contingency plan texts in a regular and formal way as a knowledge graph structure, simplifying fault operation query methods and improving the efficiency of contingency plan knowledge representation.

[0004] To achieve the above objectives, in a first aspect, the present invention provides a method for automatically converting accident contingency plan diagrams for urban power grid substations, comprising: Read the emergency response plan document for urban power grid substations, define text preprocessing operators, and preprocess the text units in the document using text preprocessing operators; The preprocessed text units are parsed to identify valid statements within them, and fault elements, action identifiers, and operation objects are extracted based on predefined modules. Construct a mapping table to map action identifiers and operation objects to normalized identifiers. The fault elements and normalized identifiers are arranged in order and stored as plain text files required to build the graph database; Import plain text files into a graph database to construct a knowledge graph of emergency response plans for urban power grid substations, enabling automatic conversion of the emergency response plan graph for urban power grid substations.

[0005] According to the present invention, an automatic conversion method for accident contingency plan diagrams of urban power grid substations is provided, wherein the text units in the document include paragraphs and tables. According to the present invention, an automatic conversion method for emergency response plan diagrams of urban power grid substations is provided. When preprocessing paragraphs using text preprocessing operators, the preprocessing process of the text preprocessing operators includes: Identify the heading content of the paragraph. If it is a part that needs to be entered into the image database, the text preprocessing operators include: deleting placeholders; standardizing writing style; and modifying the list format according to the requirements of the image database, or dividing the paragraph into a list. According to the present invention, an automatic conversion method for accident contingency plan diagrams of urban power grid substations is provided. When a table is preprocessed using a text preprocessing operator, the preprocessing process of the text preprocessing operator includes: Identify the column header names and rename the columns that need to be entered into the graph database according to the graph database definition specifications; perform basic cleaning operations on the content of each cell; and associate row and column information with cell content. According to the present invention, an automatic conversion method for emergency response plan diagrams of urban power grid substations is provided, which parses preprocessed text units, identifies valid statements in the preprocessed text units, and extracts fault elements, action identifiers, and operation objects based on predefined modules, including: After dividing the preprocessed text units into valid sentences according to punctuation marks, a preset evaluation function is used to determine whether they are boundary sentences. According to the contingency plan writing specifications, a set of predefined modules consisting of regular expressions and pattern dictionaries with priority order are maintained. The predefined modules identify fault elements, action identifiers and operation objects in valid statements, and capture serial numbers and column separators to locate step boundaries and text connection order. According to the present invention, an automatic conversion method for accident contingency plan diagrams of urban power grid substations is provided, and the evaluation function is:

[0006] in, Indicates a valid statement for evaluation Does it begin with a serial number? Indicates a valid statement for evaluation Does it contain typical text or keywords? Indicates a valid statement for evaluation Does it already include special styles? , and The numerical range is , , and It is a proportionality coefficient, satisfying... . According to the present invention, an automatic conversion method for accident contingency plan diagrams of urban power grid substations is provided, which constructs a mapping table, maps action identifiers and operation objects to standardized identifiers through the mapping table, including: Construct a mapping table based on the power grid model file; After extracting the action identifier and the operation object, the mapping first attempts to match precisely. If the precise match fails, a hierarchical fuzzy matching strategy is used to calculate multiple candidate matches. Rank multiple candidate matches by confidence and retain the top few candidate words for manual selection; If all mappings fail, a temporary localized identifier is generated and the original name is retained as an attribute. The unmapped item is then added to the pending confirmation column of the mapping table for manual verification. According to the present invention, an automatic conversion method for accident contingency plan diagrams of urban power grid substations is provided, which arranges fault elements and standardized identifiers in sequence and stores them as plain text files required for constructing a graph database, including: Determine the node type, node attributes, and relationship attributes. The node type includes substation name, line / feeder name, equipment name, fault type, voltage level, and fault description. The node attributes include unique identifier number, name, load, and number of users. The relationship attributes include fault cause, power transfer path, and action type. Based on node type, node attributes, and relationship attributes, fault elements and normalized identifiers are combined into a table and exported as a plain text file that meets the requirements of the Neo4j graph database import tool. According to the present invention, an automatic conversion method for accident contingency plan knowledge graphs of urban power grid substations is provided, which imports plain text files into a graph database to construct an accident contingency plan knowledge graph for urban power grid substations, including: The Neo4j graph database defines the storage of emergency response plans for urban power grid substations as consisting of multiple fault handling links, starting from the fault description and ending with the equipment name of the final recovery operation. Different fault handling links are combined into a network structure through node type, node attributes, and relationship attributes to form an emergency response plan graph for urban power grid substations.

[0007] Secondly, the present invention provides an automatic conversion device for emergency response plan diagrams of urban power grid substations, comprising: The preprocessing unit is used to read the emergency response plan document of the urban power grid substation, define text preprocessing operators, and preprocess the text units in the document through the text preprocessing operators; The parsing unit is used to parse the preprocessed text units, identify the valid statements in the preprocessed text units, and extract fault elements, action identifiers and operation objects based on predefined modules. The mapping unit is used to construct a mapping table, which maps action identifiers and operation objects to normalized identifiers. Storage units are used to arrange fault elements and normalization identifiers in order and store them as plain text files required to build the graph database; The conversion unit is used to import plain text files into a graph database, construct a knowledge graph of emergency response plans for urban power grid substations, and realize the automatic conversion of the emergency response plan graph for urban power grid substations.

[0008] Compared with the prior art, the present invention has at least the following technical effects: This invention provides a method and apparatus for automatically converting urban power grid substation accident contingency plan knowledge graphs. It employs automatic text recognition and element extraction methods, preprocessing and parsing document content, extracting key semantic elements from valid statements based on predefined modules and mapping tables, and importing the extracted content into a Neo4j graph database using a CSV file as an intermediary. This ultimately achieves automatic conversion of urban power grid substation accident contingency plan knowledge graphs. This invention effectively regularizes and formalizes complex contingency plan texts into a knowledge graph structure, simplifying fault operation query methods and improving the efficiency of contingency plan knowledge representation. Ultimately, this invention enables rapid querying of contingency plan decision-making steps after an urban power grid substation fault, improving power grid recovery capabilities. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0010] In the attached diagram: Figure 1 This is a flowchart of the automatic conversion method for accident contingency plan diagrams of urban power grid substations according to the present invention. Detailed Implementation

[0011] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0012] The following detailed description of some embodiments of the present invention will be provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0013] Please see Figure 1 This invention provides a method for automatically converting accident contingency plan diagrams for urban power grid substations, comprising the following steps: Step 1: Read the emergency response plan document for urban power grid substations, define text preprocessing operators, and preprocess the text units in the document using the text preprocessing operators; Specifically, for the collection of emergency response plan documents for urban power grid substations Define text preprocessing operators The original text is preprocessed using text preprocessing operators. This is done on a single document basis. For example, suppose that after reading document d, the set of text units (i.e., units of different types) obtained in document d is . The preprocessed text units are as follows:

[0014] In the formula, For the original text unit, This is for preprocessing text units. The text preprocessing operator C consists of different basic operators acting in succession, and its effect varies depending on the type of unit, such as paragraphs and tables.

[0015] For paragraphs, the first step is to identify the original text units. That is, the title content of the paragraph. If it is part that needs to be entered into the image database (hereinafter referred to as "database entry"), then the text preprocessing operator C is denoted as... ,include: (1) Delete the placeholder; (2) Standardize the writing of punctuation, numbers, and units of physical quantities; (3) Modify the list format according to the database entry requirements, or divide long text paragraphs into lists according to semicolons, line breaks, etc.

[0016] For tables, the text preprocessing operator C is denoted as... ,include: (1) Identify the column names in the table header and rename the columns that need to be entered into the database according to the database definition specifications; (2) Perform basic cleaning operations such as deleting placeholders and standardizing writing conventions on the content of each cell; (3) Associate row and column information with cell content to facilitate backtracking when extracting entities later.

[0017] Step 2: Parse the preprocessed text units, identify the valid statements in the preprocessed text units, such as identifying the target cells or text fragments containing valid statements, and extract fault elements, action identifiers, and operation objects based on a predefined module; Specifically, for the preprocessed text units , after briefly dividing by punctuation marks such as semicolons, colons, and full stops, valid statements are obtained , and further determine whether it is a boundary statement through the following preset evaluation function :

[0018] In the formula, represents evaluating whether the valid statement starts with a serial number; represents evaluating whether the valid statement contains typical text or keywords, such as "during normal operation", "after N-1 accident", "transfer plan is as follows", etc.; represents evaluating whether the valid statement already contains special styles, such as bold, italic, etc., , , The numerical ranges of , , and are proportionality coefficients, satisfying , usually taking . When , it is considered that the valid statement belongs to different semantic ranges before and after.

[0019] Maintain a predefined module consisting of a set of regular expressions and pattern dictionaries with priority sorting according to the preplan writing specification, used to identify the fault elements, action identifiers, operation objects, etc. in the valid statement , and at the same time capture common serial numbers and column separators to locate the step boundaries and text connection order.

[0020] Specifically, when identifying the action identifier, the corresponding predefined module is as follows:

[0021] In the formula, represents evaluating the matching degree of the pattern dictionary in the valid statement , such as "up", "pull open", "self-switching", etc.; evaluates the matching degree of the regular expression, such as ""; -transfer through to "wait," " represents any string. After recognition, the verb is extracted as an action identifier.

[0022] Based on the identified action identifiers, the text before and after the operation steps is divided. If the text contains prepositions or conjunctions, it is further split, and then predefined modules are used to identify non-action text content such as fault elements and operation objects in each part.

[0023] Step 3: Construct a mapping table to map action identifiers and operation objects to normalized identifiers. Specifically, a mapping table is constructed based on the power grid model file. The mapping table needs to define the standard name of the equipment, unique identification number (ID), category label, etc. Some categories, such as substations, also need to provide additional information such as voltage level and area.

[0024] After extracting the action identifier and the operation object, the mapping process first attempts at exact matching. If exact matching fails, a hierarchical fuzzy matching strategy is adopted, including calculating multiple candidate matches based on word form similarity and word vectors. For object phrases... and mapping table candidates Similarity The calculation method is as follows:

[0025] In the formula, This is the exact match score; a score of 1 indicates a perfect match, and 0 indicates otherwise. It is the normalized Levenshtein distance (edit distance); This is the Jaccard similarity score, which typically requires splitting the string into semantic sets before calculation. Let... and The split word sets are as follows and , and The specific calculation formula is as follows:

[0026] In the formula, It is the Levenshtein distance, which represents the minimum number of single-character editing operations required to transform one string into another. Allowed operations include inserting, deleting, and replacing a character.

[0027] Confidence ranking is performed on multiple candidate matches and the top few candidate words (e.g., 5) are retained for manual selection. Typically, for accident contingency plan texts under the same writing specifications, automatic disambiguation under strong constraints can be achieved after a single manual match.

[0028] If all mappings fail, a temporary localized identifier is generated, and the original name is retained as an attribute. The unmapped item is added to the pending confirmation column of the mapping table for manual verification. Furthermore, to ensure entity uniqueness and indexability, the results are validated by unique identifier numbers and conflicts are checked after mapping is complete.

[0029] Step 4: Arrange the fault elements and normalization identifiers in order and store them as a plain text file (CSV file) required to build the graph database. Specifically, step 4 includes the following steps: Determine the node type, node attributes, and relationship attributes as follows: (1) Node type: Substation name, line / feeder name, equipment name, fault type, voltage level, fault description; (2) Node attributes: unique identifier ID, name, load, number of users; (3) Relationship attributes: fault cause, transfer path, action type; Based on the aforementioned node types, node attributes, and relationship attributes, fault elements and normalized identifiers are combined into a table and exported as a CSV file that meets the requirements of the Neo4j graph database import tool.

[0030] Specifically, the fault type, fault cause, and fault description together constitute the fault elements.

[0031] Step 5: Import the plain text file into the graph database to construct a knowledge graph of emergency response plans for urban power grid substations, and realize the automatic conversion of the emergency response plan graph for urban power grid substations.

[0032] Specifically, the Neo4j graph database defines the storage of urban power grid substation accident contingency plans as primarily consisting of multiple fault handling links, starting from the fault description and ending with the equipment name in the final recovery operation. After constructing the fault handling links, including the operation steps, different fault handling links are combined into a network structure using the aforementioned node type, node attributes, and relationship attributes, such as classification label fields like voltage level, substation name, and fault type. This ultimately forms a knowledge graph of urban power grid substation accident contingency plans that is easy to query quickly.

[0033] Based on the same inventive concept, another embodiment of the present invention provides an automatic conversion device for urban power grid substation accident contingency plan diagrams, used to implement the automatic conversion method for urban power grid substation accident contingency plan diagrams of the aforementioned embodiment. The device includes: The preprocessing unit is used to read the emergency response plan document of the urban power grid substation, define text preprocessing operators, and preprocess the text units in the document through the text preprocessing operators; The parsing unit is used to parse the preprocessed text units, identify the valid statements in the preprocessed text units, and extract fault elements, action identifiers and operation objects based on predefined modules. The mapping unit is used to construct a mapping table, which maps action identifiers and operation objects to normalized identifiers. Storage units are used to arrange fault elements and normalization identifiers in order and store them as plain text files required to build the graph database; The conversion unit is used to import plain text files into a graph database, construct a knowledge graph of emergency response plans for urban power grid substations, and realize the automatic conversion of the emergency response plan graph for urban power grid substations.

[0034] In summary, this invention provides a method and apparatus for automatically converting urban power grid substation accident contingency plan knowledge graphs. It employs automatic text recognition and element extraction methods, preprocessing and parsing document content, extracting key semantic elements from valid statements based on predefined modules and mapping tables, and importing the extracted content into a Neo4j graph database using a CSV file as an intermediary. This ultimately achieves automatic conversion of urban power grid substation accident contingency plan knowledge graphs. This invention effectively regularizes and formalizes complex contingency plan texts into a knowledge graph structure, simplifying fault operation query methods and improving the efficiency of contingency plan knowledge representation. Ultimately, this invention enables rapid querying of contingency plan decision-making steps after an urban power grid substation fault, improving the power grid's recovery capabilities.

[0035] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. It should be understood that the invention is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for automatically converting accident contingency plan diagrams for urban power grid substations, characterized in that, include: Read the emergency response plan document for urban power grid substations, define text preprocessing operators, and preprocess the text units in the document using the text preprocessing operators; The preprocessed text units are parsed to identify valid statements within them, and fault elements, action identifiers, and operation objects are extracted based on predefined modules. A mapping table is constructed to map the action identifiers and operation objects to standardized identifiers. The fault elements and standardized identifiers are arranged in sequence and stored as plain text files required for building the graph database. The plain text files are imported into the graph database to construct a knowledge graph of emergency response plans for urban power grid substations, enabling automatic conversion of the knowledge graph of emergency response plans for urban power grid substations.

2. The method for automatic conversion of urban power grid substation accident contingency plan diagrams according to claim 1, characterized in that, The text units in the document include paragraphs and tables.

3. The method for automatic conversion of urban power grid substation accident contingency plan diagrams according to claim 2, characterized in that, When a paragraph is preprocessed using the aforementioned text preprocessing operator, the preprocessing process of the text preprocessing operator includes: The text preprocessing operators include: deleting placeholders; standardizing writing style; and modifying the list format according to the requirements of the image database, or dividing the paragraph into a list.

4. The method for automatic conversion of urban power grid substation accident contingency plan diagrams according to claim 2, characterized in that, When the table is preprocessed using the text preprocessing operator, the preprocessing process of the text preprocessing operator includes: Identify the column header names and rename the columns that need to be entered into the graph database according to the graph database definition specifications; perform basic cleaning operations on the content of each cell; and associate row and column information with cell content.

5. The method for automatic conversion of urban power grid substation accident contingency plan diagrams according to claim 2, characterized in that, The preprocessed text units are parsed to identify valid statements within them. Fault elements, action identifiers, and operation objects are extracted based on predefined modules, including: After dividing the preprocessed text units into valid sentences according to punctuation marks, a preset evaluation function is used to determine whether they are boundary sentences. According to the drafting specifications, a set of predefined modules consisting of regular expressions and pattern dictionaries with priority order are maintained. The predefined modules are used to identify fault elements, action identifiers and operation objects in valid statements, and capture sequence numbers and column dividers to locate step boundaries and text connection order.

6. The method for automatic conversion of urban power grid substation accident contingency plan diagrams according to claim 5, characterized in that, The evaluation function is: in, Indicates a valid statement for evaluation Does it begin with a serial number? Indicates a valid statement for evaluation Does it contain typical text or keywords? Indicates a valid statement for evaluation Does it already include special styles? , and The numerical range is , , and It is a proportionality coefficient, satisfying... .

7. The method for automatic conversion of urban power grid substation accident contingency plan diagrams according to claim 5, characterized in that, Construct a mapping table to map the action identifier and the operation object to normalized identifiers, including: Construct a mapping table based on the power grid model file; After extracting the action identifier and the operation object, the mapping first attempts to match precisely. If the precise match fails, a hierarchical fuzzy matching strategy is used to calculate multiple candidate matches. Rank multiple candidate matches by confidence and retain the top few candidate words for manual selection; If all mappings fail, a temporary localized identifier is generated and the original name is retained as an attribute. The unmapped item is then added to the pending confirmation column of the mapping table for manual verification.

8. The method for automatic conversion of urban power grid substation accident contingency plan diagrams according to claim 7, characterized in that, The fault elements and normalized identifiers are arranged in sequence and stored as a plain text file required for constructing the graph database, including: Determine the node type, node attributes, and relationship attributes. The node type includes substation name, line / feeder name, equipment name, fault type, voltage level, and fault description. The node attributes include unique identifier number, name, load, and number of users. The relationship attributes include fault cause, power transfer path, and action type. Based on the node type, node attributes, and relationship attributes, the fault elements and normalized identifiers are combined into a table and exported as a plain text file that meets the requirements of the Neo4j graph database import tool.

9. The method for automatic conversion of urban power grid substation accident contingency plan diagrams according to claim 8, characterized in that, Import the plain text file into the graph database to construct a knowledge graph of emergency response plans for urban power grid substations, including: The Neo4j graph database defines the storage of urban power grid substation accident contingency plans as consisting of multiple fault handling links, starting from the fault description and ending with the equipment name of the final recovery operation. Different fault handling links are combined into a network structure through the node type, node attributes, and relationship attributes to form an urban power grid substation accident contingency plan graph.

10. An automatic conversion device for accident contingency plan diagrams in urban power grid substations, characterized in that, include: The preprocessing unit is used to read the emergency response plan document for urban power grid substations, define text preprocessing operators, and preprocess the text units in the document through the text preprocessing operators. The parsing unit is used to parse the preprocessed text units, identify the valid statements in the preprocessed text units, and extract fault elements, action identifiers and operation objects based on predefined modules. The mapping unit is used to construct a mapping table, and to map the action identifier and the operation object to a normalized identifier through the mapping table. A storage unit is used to arrange the fault elements and normalized identifiers in sequence and store them as plain text files required to construct the graph database; The conversion unit is used to import the plain text file into the graph database, construct a knowledge graph of emergency response plans for urban power grid substations, and realize the automatic conversion of the emergency response plan graph for urban power grid substations.