Knowledge graph construction method and system oriented to electric power design standard specification field, electronic equipment and storage medium

By building a two-particle knowledge graph in the field of power design standards and specifications, the problems of information retrieval difficulties and poor knowledge management are solved, efficient knowledge management and retrieval are achieved, and the application efficiency and accuracy of standard knowledge are improved.

CN119647577APending Publication Date: 2025-03-18ECONOMIC & TECH RES INST OF STATE GRID HEILONGJIANG ELECTRIC POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411795269.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

There are problems in the field of power design standards and specifications such as difficulty in retrieving information, poor knowledge reuse, scattered documents and lack of unified management, which makes it difficult for professionals to find the most accurate and applicable documents, and it is prone to incomplete and inconsistent information, which affects the operation and management of the power system.

Method used

The knowledge graph construction method is adopted for the field of power design standards and specifications, and through a construction strategy combining bottom-up and top-down, combined with manual construction methods based on rules and expert experience, a two-particle knowledge graph structure is established to achieve in-depth mining of power design standards and specification documents and knowledge rules construction.

Benefits of technology

The level of standard knowledge management has been improved, standard and standard knowledge support has been provided, and the efficiency of knowledge management and knowledge retrieval has been significantly improved, which has reduced the search time, and improved the efficiency and accuracy of knowledge application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647577A_ABST
    Figure CN119647577A_ABST
Patent Text Reader

Abstract

The invention discloses a power design standard specification field-oriented knowledge graph construction method and system, electronic equipment and a storage medium, and relates to the technical field of standard digitization, and the method comprises the steps: collecting related data, and forming a data set; related texts are preprocessed; establishing a regular expression to perform document segmentation and chapter division on the text; establishing a text dictionary, performing word segmentation operation on characters, and extracting keywords; establishing a dual-granularity knowledge graph structure; forming knowledge units; and importing the knowledge units into the knowledge graph, establishing nodes and relationships, and carrying out knowledge graph visualization and knowledge retrieval. The invention provides a dual-granularity knowledge graph construction scheme for standardizing and unifying power design standard specification files, dual-granularity structural modeling realizes knowledge representation modes of different fine granularities, and knowledge units of different granularities are selected for representation according to different requirements and application scenes, so that the construction efficiency is greatly improved. The application efficiency and accuracy of knowledge are improved, and the knowledge management and retrieval efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of standard digitization technology, and in particular relates to a knowledge graph construction method, system, electronic device and storage medium for the field of power design standards and specifications. Background Art

[0002] The field of power design standards and specifications contains a large amount of professional knowledge, technical parameters and industry standards. With the passage of time and the development of the industry, the number of normative documents for power systems continues to increase and the content becomes increasingly complex.

[0003] At present, there are the following difficulties in the field of power design standards and specifications:

[0004] 1) Electric power design standard specification data usually exists in various forms such as PDF documents, tables, and graphics. There is a lack of a unified knowledge platform, which makes information retrieval difficult and knowledge reuse poor;

[0005] 2) Power design standard specification documents are scattered across different departments, institutions and systems, lacking unified integration and management;

[0006] 3) The power design standards and specifications are authoritative and legally binding and cannot be tampered with at will. Therefore, the digital management of standard documents requires "recoverability".

[0007] The above problems cause professionals to spend a lot of time and energy searching and screening relevant documents, but it is difficult to find the most accurate and applicable documents; on the other hand, it is easy for incomplete, inconsistent or even contradictory information to appear, which brings great hidden dangers to the operation and management of the power system.

[0008] As an effective way of knowledge representation, knowledge graph can describe entities, attributes and relationships in a structured manner, providing strong support for knowledge management in the field of power design standards and specifications. However, existing knowledge graph construction methods are often targeted at specific fields or data types, making it difficult to fully cover the field of power design standards and specifications.

[0009] Therefore, in order to solve the above problems, it is necessary to design knowledge graph construction methods, systems, electronic devices and storage media for the field of power design standards and specifications. Summary of the invention

[0010] The technical problem to be solved by the present invention is to solve the deficiencies in the prior art and design a knowledge graph construction scheme for the field of electric power design standards and specifications. This knowledge graph construction scheme for the field of electric power design standards and specifications covers the unstructured information processing and digital management of electric power design standard specification documents. In view of the complexity of the unstructured nature of the text data of the electric power design standards and specifications and the complexity of knowledge association, and to ensure the high accuracy and high confidence of the knowledge graph, the present invention adopts a construction strategy that combines "bottom-up" and "top-down". In specific implementation, an artificial construction method based on the integration of rules and expert experience is adopted. The present invention can realize the deep mining and knowledge rule construction of electric power design standard specification documents, and provides a technical solution for the construction of a knowledge graph for electric power design standard specification documents in a standardized, unified and dual-granular manner, which effectively improves the level of standard knowledge management and provides standard specification knowledge support for electric power design related work.

[0011] The solution adopted by the present invention to solve the technical problem is:

[0012] A knowledge graph construction method for the field of power design standards and specifications.

[0013] It is characterized in that

[0014] The following steps are involved:

[0015] Step S1: Collect text data of power design standards and specifications to form a data set;

[0016] Step S2: preprocessing the power design standard specification text collected in step S1;

[0017] Step S3: Establish a regular expression, and use the regular expression to perform document segmentation and chapter division on the text data to obtain text data containing document information;

[0018] Step S4: Establish a text dictionary in the field of power design, perform word segmentation on the text data containing document information, and use the TF-IDF method to extract chapter keywords, paragraph keywords, and sentence keywords according to the three dimensions of chapter, paragraph, and sentence;

[0019] Step S5: Establish a dual-granularity knowledge graph structure, including a structure layer and a content layer; the dual-granularity knowledge graph structure contains macro-granularity and micro-granularity, the macro-granularity describes the overall framework and standard information of the power design standard specification, and the micro-granularity describes the specific detail information.

[0020] Step S6: Extract and fuse knowledge from the text data containing document information, structured table data and formula image structured data to form a knowledge unit. The knowledge unit contains three types of core knowledge:

[0021] Identification elements: entities, relationships, and attributes. Entities are the various nodes defined in step S5. Entities are connected by relationships. Each entity and relationship can define its attributes. Attributes are key-value pairs that further describe entities or relationships.

[0022] Step S7: Import the extracted knowledge units into the knowledge graph, establish nodes and relationships, and use Neo4j to visualize the knowledge graph and perform knowledge retrieval.

[0023] As a preferred embodiment of the present invention, the electric power design standard specification text preprocessing in step S2 includes text content preprocessing, table preprocessing and formula image preprocessing.

[0024] Text content preprocessing:

[0025] Use Python-tesseract library to optically disassemble Chinese text information in read-only PDF, manually verify the results, and use sentence segmentation method to collect data to form text data;

[0026] Table preprocessing:

[0027] Preset typical table formats, use the paddleOCR tool to recognize and extract content from the table, and normalize the table content according to the corresponding typical table format to obtain structured table data;

[0028] Formula image preprocessing:

[0029] The formula image is stored in a standardized manner to obtain the structured data of the formula image.

[0030] As a preferred implementation of the present invention, the specific steps of applying the TF-IDF method in step S4 are:

[0031] Step S40: normalize the word frequency TF to obtain the standardized word frequency TFst.

[0032] Specifically, TF term frequency is defined as the number of times a word appears in a document, n. Suppose the total number of words in the article is N, we get

[0033]

[0034] Step S41: Setting a corpus to simulate the language usage environment.

[0035] Specifically, the total number of documents in the corpus is set to M, and the number of documents containing a certain word is set to m, and we get

[0036]

[0037] Step S43: TF-IDF is the product of TFst and IDF. The TF-IDF value of each word in the document is calculated, and then it is arranged in descending order, and the first few words are taken.

[0038] As a preferred embodiment of the present invention, the structural layer of the dual-granularity knowledge graph structure established in step S5 includes standard specification nodes, chapter nodes, paragraph nodes, and sentence nodes, and the specific attributes are as follows:

[0039] Standard specification node = {Standard specification: standard name, standard code, standard number, standard level or category, international standard classification number, Chinese standard document classification number, release date, implementation date, release agency, standard status, alternative standard, replaced standard, drafting unit, competent department, centralized unit and drafter};

[0040] Chapter node = {Chapter: title level, title sequence number, title name, content 1 and keyword 1};

[0041] Paragraph node = {paragraph: paragraph number, content 2, keyword 2, link title 1 and link title number 1}, in particular, the paragraph number is expressed as pi , where i is numbered with chapters as the domain;

[0042] Sentence node = {sentence: sentence number, content 3, keyword 3, link title 2 and link title number 2}, in particular, the sentence number is represented by s j , where j is numbered based on the entire article;

[0043] The content layer of the dual-granularity knowledge graph structure established in step S5 includes type nodes, subject nodes, and object nodes.

[0044] The type nodes include: definition and explanation class, requirement satisfaction class, parameter selection class, measure adoption class, general description inclusion class, specific item class, table description class, notes class and reference regulation class. Each sentence node is associated with at least one type node and is connected to its corresponding subject node or object node.

[0045] As a preferred embodiment of the present invention, the knowledge unit in step S6 is a dual-granularity knowledge unit, including a structure layer knowledge unit and a content layer knowledge unit; the knowledge extraction is a dual-granularity knowledge extraction, including a structure layer extraction and a content layer extraction;

[0046] The structure layer entity extraction, attribute extraction and relationship extraction adopt the knowledge extraction method based on pattern matching rules, using the structure layer nodes and their attributes specified in step S5, using regular expressions and corresponding extraction methods, to establish extraction rules and extract nodes and their corresponding attributes;

[0047] The relationship between the nodes in the structure layer is a fixed inclusion relationship, that is, [standard specification node] → [include] → [chapter node] → [include] → [paragraph node] → [include] → [sentence node]. The relationship between the nodes in the structure layer can be directly extracted using the extraction rules;

[0048] Content-layer entity extraction uses a knowledge extraction method that combines rules with semantic role labeling technology. The rule-based semantic role labeling technology takes the predicate argument structure as the decomposition center and extracts the predicate and its corresponding subject and object nodes from the sentence structure.

[0049] The content layer relationship and attribute extraction is a knowledge extraction method based on pattern matching rules, that is, the relationship between content layer nodes is the type relationship between sentence nodes and type nodes, the subject relationship between type nodes and subject nodes, and the object relationship between type nodes and object nodes. There are three types of relationships in total. The relationship extraction is performed by combining the extraction results of rules with semantic role labeling technology.

[0050] Knowledge fusion uses cosine similarity calculation to fuse and match the extracted predicate nodes with type nodes.

[0051] As a preferred embodiment of the present invention, the typical table form includes:

[0052] Each table can be divided into column headers, row headers and content cells.

[0053] The column header includes single row, multiple columns and multiple rows nested.

[0054] The row header contains single column, multiple rows and multiple columns nested format.

[0055] Content cells contain parallel and nested modes;

[0056] The normalization process is to convert any table into a parallel mode of multiple rows and columns according to a typical table form;

[0057] The standardized storage includes: {type: standard, serial number, name, storage path}.

[0058] As a preferred embodiment of the present invention, after the knowledge extraction and knowledge fusion in step S6, an expert review process is provided to ensure the professionalism and accuracy of the knowledge units extracted from the standard specification document.

[0059] A knowledge graph construction system for the field of power design standards and specifications.

[0060] It is characterized in that

[0061] Include:

[0062] Text collection module:

[0063] Used to obtain the PDF file of current power design industry standards and specifications, including national standards, industry standards and enterprise standards

[0064] Text preprocessing module:

[0065] Used to pre-process the text of power design standards and specifications,

[0066] System building blocks:

[0067] a: Establish a regular expression to obtain text data containing document information and establish a text dictionary in the field of power design;

[0068] b: Establish a text dictionary in the field of power design, perform word segmentation on text data containing document information, and extract keywords.

[0069] c: Establish a dual-granularity knowledge graph structure consisting of a structure layer and a content layer

[0070] d: Establish dual-granularity knowledge units including structure-layer knowledge units and content-layer knowledge units.

[0071] Visualization module: visualize the knowledge graph and assist staff in completing knowledge retrieval.

[0072] An electronic device comprising a processor and a storage medium;

[0073] The storage medium is used to store instructions;

[0074] The processor is used to operate according to the instructions to execute the steps according to any of the aforementioned methods.

[0075] A computer-readable storage medium stores a computer program, which implements the steps of any of the above methods when executed by a processor.

[0076] Compared with the prior art, the present invention has the following beneficial effects:

[0077] The present invention provides a technical solution for constructing a standardized, unified, dual-granular knowledge graph for power design standard specification documents. The dual-granularity structural modeling realizes knowledge representation methods of different fine-grained levels. According to different needs and application scenarios, knowledge units of different granularities are selected for representation, thereby improving the application efficiency and accuracy of knowledge. The retrieval time is in the order of ms, which significantly improves the efficiency of knowledge management and knowledge retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 A schematic diagram of a knowledge graph construction method for the field of electric power design standards and specifications proposed by the present invention;

[0079] Figure 2 This is a schematic diagram of text data preprocessed by the knowledge graph construction method for the field of electric power design standards and specifications proposed in the present invention;

[0080] Figure 3 A schematic diagram of a preset typical table format of the knowledge graph construction method for the field of electric power design standards and specifications proposed by the present invention;

[0081] Figure 4 A schematic diagram of structured table data of the knowledge graph construction method for the field of electric power design standards and specifications proposed by the present invention;

[0082] Figure 5 A schematic diagram of a dual-granularity knowledge graph structure of a knowledge graph construction method for the field of electric power design standards and specifications proposed in the present invention;

[0083] Figure 6 A schematic diagram of the results of content-layer entity extraction using the semantic role labeling technology of the knowledge graph construction method for the field of electric power design standards and specifications proposed in the present invention. DETAILED DESCRIPTION

[0084] The specific implementation of the present invention is described below in conjunction with the accompanying drawings and embodiments:

[0085] It should be noted that the structures, colors, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification so that people familiar with this technology can understand and read them, and are not used to limit the conditions under which the present invention can be implemented. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical content disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0086] At the same time, in the description of the present invention, it should be understood that the terms "one end", "the other end", "middle", "upper", "one side", "top", "inside", "front", "center", "both ends" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0087] In addition, the terms "first", "second", "third" and "fourth" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first", "second", "third" and "fourth" may explicitly or implicitly include at least one of such features.

[0088] In the present invention, unless otherwise clearly stipulated and limited, the terms such as "installation", "setting", "connection", "fixation" and "screw-on" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. Unless otherwise clearly defined, ordinary technicians in this field can understand the specific meanings of the above terms in the present invention according to the specific circumstances.

[0089] like Figure 1-Figure 6 The present invention provides a knowledge graph construction method for the field of electric power design standards and specifications, comprising the following steps:

[0090] Step S1: Collect power design standard specification text data to form a data set. The power design standard specification text data is a PDF file of the current power design industry standard specification, including national standards, industry standards and enterprise standards.

[0091] Step S2: preprocess the electric power design standard specification text collected in step S1, including text content preprocessing, table preprocessing, and formula image preprocessing. Figure 2 The figure shows a schematic diagram of text data after preprocessing.

[0092] 1. Text content preprocessing:

[0093] The Python-tesseract library is used to optically decompose the Chinese text information in the read-only PDF, the results are manually verified, and the data is collected using the sentence segmentation method to form text data.

[0094] Among them, Python-tesseract is a Python-based OCR tool that can convert handwritten or printed text in images into machine-encoded text.

[0095] 2. Table preprocessing:

[0096] Preset a typical table format, use the paddleOCR tool to recognize the table and extract the content, normalize the table content according to the corresponding typical table format, and obtain structured table data.

[0097] Among them, Figure 3 As shown, typical forms include:

[0098] Each table can be divided into column headers, row headers and content cells. Column headers include single-row multiple-columns and multiple-row nested formats, row headers include single-column multiple-rows and multiple-column nested formats, and content cells include parallel mode and nested mode.

[0099] Normalization processing is: according to the typical table form, any table is converted into a parallel mode with multiple rows and columns. The structured table data obtained is as follows: Figure 4 shown.

[0100] 3. Formula image preprocessing:

[0101] The formula image is stored in a standardized manner to obtain the structured data of the formula image.

[0102] The storage format of standardized storage is: {type: standard, serial number, name, storage path}. For example, for Figure A in the national standard "GB / T 51072-2014 110(66)kV~220kV Intelligent Substation Design Specification", the storage format is {Figure: GBT51072-2014, Figure A, substation automation system structure diagram, . / GBT51072-2014}.

[0103] Step S3: Establish a regular expression, and use the regular expression to perform document segmentation and chapter division on the text data to obtain text data containing document information;

[0104] A regular expression is a pattern consisting of a series of characters and special characters, which is used to describe the text pattern to be matched. Regular expressions can be used to find, replace, extract, and verify specific patterns in text. Regular expressions can be used to segment text data into documents and chapters to obtain text data containing document information.

[0105] like Figure 2 As shown in , the pre-processed data obtained in step 2 is divided into {title level: 1, title number 4, title name: electrical primary, content: (all contents contained in chapter 4)}; for section 4.1.1, it is divided into {title level: 3, title number: 4.1.1, title name: None, content: the design of the electrical main connection of 220kV substation shall comply with the relevant provisions of the current industry standard "220kV ~ 750kV substation design technical regulations" DL / T5218; the design of the electrical main connection of 110(66)kV substation shall comply with the relevant provisions of the current national standard "35kV ~ 110kV substation design specifications" GB50059.}.

[0106] Step S4: Establish a text dictionary in the field of power design, perform word segmentation on the text data containing document information, and use the TF-IDF method to extract chapter keywords, paragraph keywords, and sentence keywords according to the three dimensions of chapter, paragraph, and sentence.

[0107] The TF-IDF method is a commonly used weighted technique for information retrieval and data mining, where TF is term frequency and IDF is inverse document frequency.

[0108] The specific steps of applying the TF-IDF method in step S4 are:

[0109] Step S40: normalize the word frequency TF to obtain the standardized word frequency TFst.

[0110] Specifically, TF term frequency is defined as the number of times a word appears in a document, n. Suppose the total number of words in the article is N, we get

[0111]

[0112] Step S41: The calculation of IDF requires setting up a corpus to simulate the language usage environment. Specifically, the total number of documents in the corpus is set to M, and the number of documents containing a certain word is set to m.

[0113]

[0114] Step S43: TF-IDF is the product of TFst and IDF. TF-IDF is proportional to the number of times a word appears in a document and inversely proportional to the number of times the word appears in the entire language. Calculate the TF-IDF value of each word in the document, then sort them in descending order and take the first few words.

[0115] In this embodiment, the corpus is calculated using the built-in general corpus of jieba, and the first three words are taken. For "site selection" the site selection should comply with the relevant provisions of the current industry standard "220kV~750kV substation design technical regulations" DL / T5218. "The site should be determined by technical and economic comparison based on the requirements of the power system, in accordance with urban and rural planning, combined with factors such as inlet and outlet conditions, equipment transportation, water supply, power supply, flood control and waterlogging prevention facilities. "The site should have suitable geological and topographic conditions, and should avoid unfavorable geological structures such as landslides, mudslides, collapse areas and earthquake fault zones. "When selecting a site, land should be used reasonably, land should be saved, and no or less arable land and land with high economic benefits should be occupied, and the amount of earthwork should be reduced. "When selecting a site, the substation should be coordinated with adjacent facilities and the surrounding environment, and nature reserves and cultural relics should be avoided, and mineral resources should not be covered. If necessary, written permission or agreement from relevant departments should be obtained. "" paragraph, the extracted keywords are: "site", "selection", "substation".

[0116] Step S5: Establish a dual-granularity knowledge graph structure, such as Figure 5 As shown, it includes two parts: structure layer and content layer;

[0117] The dual-granularity knowledge graph structure established in step S5 includes macro-granularity and micro-granularity. The macro-granularity describes the overall framework and standard information of the power design standard specification, and the micro-granularity describes the specific technical parameters, standard clauses and other detailed information.

[0118] The structural layer of the dual-granularity knowledge graph structure established in step S5 includes standard specification nodes, chapter nodes, paragraph nodes, and sentence nodes. The specific attributes are as follows:

[0119] Standard specification node = {Standard specification: standard name, standard code, standard number, standard level or category, international standard classification number, Chinese standard document classification number, release date, implementation date, release agency, standard status, alternative standard, replaced standard, drafting unit, competent department, centralized unit and drafter};

[0120] Chapter node = {Chapter: title level, title sequence number, title name, content 1 and keyword 1};

[0121] Paragraph node = {paragraph: paragraph number, content 2, keyword 2, link title 1 and link title number 1}, in particular, the paragraph number is expressed as pi , where i is numbered with chapters as the domain;

[0122] Sentence node = {sentence: sentence number, content 3, keyword 3, link title 2 and link title number 2}, in particular, the sentence number is represented by s j , where j is numbered based on the entire article;

[0123] The content layer of the dual-granularity knowledge graph structure established in step S5 includes type nodes, subject nodes, and object nodes.

[0124] There are nine types of type nodes, including: definition and explanation type, requirement satisfaction type, parameter selection type, measure adoption type, general description type, specific item type, table description type, notes type, and reference regulations type. Each sentence node is associated with at least one type node and is connected to its corresponding subject node or object node. The specific description and examples of type nodes are shown in Table 1.

[0125] Table 1 Detailed description and examples of type nodes

[0126]

[0127]

[0128] Step S6: extracting and integrating knowledge from text data containing document information, structured table data, and formula image structured data to form a knowledge unit;

[0129] The knowledge unit in step S6 contains three core knowledge elements: entity, relationship and attribute. Entity is the various nodes defined in step S5. Entities are connected by relationships. Each entity and relationship can define its attributes. Attributes are key-value pairs that further describe entities or relationships.

[0130] In step S6, the knowledge unit is a dual-granularity knowledge unit, including a structure layer knowledge unit and a content layer knowledge unit; the knowledge extraction is a dual-granularity knowledge extraction, including a structure layer extraction and a content layer extraction.

[0131] The structural layer entity extraction, attribute extraction and relationship extraction adopt a knowledge extraction method based on pattern matching rules. Using the structural layer nodes and their attributes specified in step S5, regular expressions and corresponding extraction methods are used to establish extraction rules and extract nodes and their corresponding attributes.

[0132] The relationship between the nodes in the structural layer is a fixed inclusion relationship, that is: [standard specification node] → [include] → [chapter node] → [include] → [paragraph node] → [include] → [sentence node], so the relationship between the nodes in the structural layer can be directly extracted using the extraction rules.

[0133] Content-layer entity extraction adopts a knowledge extraction method that combines rules with semantic role labeling technology. The rule-based semantic role labeling technology takes the predicate-argument structure as the decomposition center and extracts the predicate and its corresponding subject and object nodes from the sentence structure.

[0134] For example, for the sentence "It is advisable to use a light solid door for the gate.", we use rules combined with semantic role labeling (SRL) technology to obtain two groups of results: [None]←[subject]←<advisable>→[object]→[use a light solid door] and [gate]←[subject]←<use>→[object]→[light solid door]. Figure 6 As shown in the figure. The predicate is in <>.

[0135] The content layer relationship and attribute extraction is a knowledge extraction method based on pattern matching rules, that is, the relationship between content layer nodes is the type relationship between sentence nodes and type nodes, the subject relationship between type nodes and subject nodes, and the object relationship between type nodes and object nodes. There are three types of relationships in total. The relationship extraction is carried out by combining the extraction results with rules and semantic role labeling technology.

[0136] The content layer attribute extraction rules are shown in Table 1.

[0137] Knowledge fusion uses cosine similarity calculation to fuse and match the extracted predicate nodes with type nodes.

[0138] For example, for the sentence "It is advisable to use a light-weight physical door.", we use rules combined with semantic role labeling (SRL) technology to obtain two sets of results: [None]←[subject]←<advisable>→[object]→[adopt a light-weight physical door] and [gate]←[subject]←<adopt>→[object]→[light-weight physical door]. Among them, the predicate <advisable> is the standard degree word attribute in the type node, and its cosine similarity with "advisable" is 1, so it is extracted as the type node attribute.

[0139] After knowledge extraction and knowledge fusion in step S6, an expert review process is set up to ensure the professionalism and accuracy of the knowledge units extracted from the standard specification document.

[0140] Step S7: Import the extracted knowledge units into the knowledge graph, establish nodes and relationships, and use Neo4j to visualize the knowledge graph and perform knowledge retrieval.

[0141] The present invention provides a method for constructing a standardized, unified, dual-granular knowledge graph for power design standard specification documents. The dual-granularity structural modeling realizes knowledge representation methods of different fine-grained levels. According to different needs and application scenarios, knowledge units of different granularities are selected for representation, thereby improving the application efficiency and accuracy of knowledge and significantly improving the efficiency of knowledge management and knowledge retrieval.

[0142] If the constructed dual-granularity knowledge graph is used to search for the keywords "measurement and control device" and "configuration", the original text of the macro-granularity can be returned: {Paragraph: Paragraph number: 41, Content: "The measurement and control device should be configured as a single set. The 220kV measurement and control device should be configured independently, and the device can integrate metering, phasor measurement and other functions. 110(66)kV should adopt a protection and measurement and control integrated device, and the device can also integrate metering and other functions. 10(35)kV should adopt a device with integrated protection, measurement and control, metering and other functions.", Keyword 1: Measurement and control device, Keyword 2: Configuration, Keyword 3: Integration, Link title: None, Link title number: 5.4.7}

[0143] Note: The above content corresponds to content 2 in the previous paragraph node = {paragraph: paragraph number, content 2, keyword 2, link title 1 and link title number 1}, keyword 1, keyword 2 and keyword 3 correspond to keyword 2 in the previous text, and are briefly summarized as keyword 2 in the overall description, link title corresponds to link title 1, and link title number corresponds to link title number 1.

[0144] It is also possible to return the original text at a micro-granular level:

[0145] 1.{type: type: measure adoption class, condition: None, standard degree word: appropriate, positive word / negative word: positive word, predicate: single set configuration, voltage level 1: 110(66), voltage level 2: 220}→[object]→{object: measurement and control device};

[0146] 2.{Type: Type: Measures adopted, Condition: None, Standard degree words: Suitable, Positive words / Negative words: Positive words, Predicate: Independent configuration, Voltage level 1: 220}→[Subject]→{Subject: Measurement and control device};{Subject: Device}←[Subject]←{Type: Type: Measures adopted, Condition: None, Standard degree words: Possible, Positive words / Negative words: Positive words, Predicate: Integration, Voltage level 1: 220}→[Object]→{Object: Phase measurement and other functions}

[0147] 3.{Type: Type: Measures adopted, Condition: None, Standard degree words: Appropriate, Positive words / Negative words: Positive words, Predicate: Adopt, Voltage level 1: 110(66)}→[Object]→{Object: Protection, measurement and control integrated device};{Subject: Device}←[Subject]←{Type: Type: Measures adopted, Condition: None, Standard degree words: Possible, Positive words / Negative words: Positive words, Predicate: Integrated, Voltage level 1: 110(66)}→[Object]→{Object: Measurement and other functions}

[0148] 4.{Type: Type: Measures adopted, Condition: None, Standard degree words: Appropriate, Positive words / Negative words: Positive words, Predicate: Adopt, Voltage level 1: 10(35)}→[Object]→{Object: Device integrating protection, measurement and control, metering and other functions};{Type: Type: Measures adopted, Condition: None, Standard degree words: Appropriate, Positive words / Negative words: Positive words, Predicate: Integrated, Voltage level 1: 10(35)}→[Object]→{Object: Device integrating protection, measurement and control, metering and other functions}

[0149] A knowledge graph construction system for the field of power design standards and specifications, including:

[0150] 1. Text collection module: used to obtain PDF files of current power design industry standards and specifications, including national standards, industry standards and enterprise standards

[0151] 2. Text preprocessing module: used to preprocess the text of power design standards and specifications.

[0152] 3. System building blocks:

[0153] a: Establish a regular expression to obtain text data containing document information and establish a text dictionary in the field of power design;

[0154] b: Establish a text dictionary in the field of power design, perform word segmentation on text data containing document information, and extract keywords.

[0155] c: Establish a dual-granularity knowledge graph structure consisting of a structure layer and a content layer

[0156] d: Establish dual-granularity knowledge units including structure-layer knowledge units and content-layer knowledge units.

[0157] 4. Visualization module: visualize the knowledge graph and assist staff in completing knowledge retrieval.

[0158] An electronic device includes a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the above steps.

[0159] A computer-readable storage medium stores a computer program, which implements the above steps when executed by a processor.

[0160] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.

[0161] Many other changes and modifications may be made without departing from the concept and scope of the present invention.It should be understood that the present invention is not limited to the specific embodiments, and the scope of the present invention is defined by the appended claims.

Claims

1. A knowledge graph construction method for the field of power design standards and specifications. It is characterized in that The following steps are involved: Step S1: Collect text data of power design standards and specifications to form a data set; Step S2: preprocessing the power design standard specification text collected in step S1; Step S3: Establish a regular expression, and use the regular expression to perform document segmentation and chapter division on the text data to obtain text data containing document information; Step S4: Establish a text dictionary in the field of power design, perform word segmentation on the text data containing document information, and use the TF-IDF method to extract chapter keywords, paragraph keywords, and sentence keywords according to the three dimensions of chapter, paragraph, and sentence; Step S5: Establish a dual-granularity knowledge graph structure, including a structure layer and a content layer; the dual-granularity knowledge graph structure contains macro-granularity and micro-granularity, the macro-granularity describes the overall framework and standard information of the power design standard specification, and the micro-granularity describes the specific detail information. Step S6: extract and fuse knowledge from the text data containing document information, structured table data, and formula image structured data to form a knowledge unit. The knowledge unit contains three core knowledge elements: entity, relationship, and attribute. The entity is the various nodes defined in step S5. The entities are connected by relationships. Each entity and relationship can define its attributes. The attributes are key-value pairs that further describe the entity or relationship. Step S7: Import the extracted knowledge units into the knowledge graph, establish nodes and relationships, and use Neo4j to visualize the knowledge graph and perform knowledge retrieval.

2. The knowledge graph construction method for the field of electric power design standards and specifications as claimed in claim 1, It is characterized in that The text preprocessing of the power design standard specification in step S2 includes text content preprocessing, table preprocessing and formula image preprocessing. Text content preprocessing: Use Python-tesseract library to optically disassemble Chinese text information in read-only PDF, manually verify the results, and use sentence segmentation method to collect data to form text data; Table preprocessing: Preset typical table formats, use the paddleOCR tool to recognize and extract content from the table, and normalize the table content according to the corresponding typical table format to obtain structured table data; Formula image preprocessing: The formula image is stored in a standardized manner to obtain the structured data of the formula image.

3. The knowledge graph construction method for the field of electric power design standards and specifications as claimed in claim 1, It is characterized in that The specific steps of applying the TF-IDF method in step S4 are: Step S40: normalize the word frequency TF to obtain the standardized word frequency TFst. Specifically, TF term frequency is defined as the number of times a word appears in a document, n. Suppose the total number of words in the article is N, we get Step S41: Setting a corpus to simulate the language usage environment. Specifically, the total number of documents in the corpus is set to M, and the number of documents containing a certain word is set to m, and we get Step S43: TF-IDF is the product of TFst and IDF. The TF-IDF value of each word in the document is calculated, and then it is arranged in descending order, and the first few words are taken.

4. The knowledge graph construction method for the field of electric power design standards and specifications as claimed in claim 1, It is characterized in that The structural layer of the dual-granularity knowledge graph structure established in step S5 includes standard specification nodes, chapter nodes, paragraph nodes, and sentence nodes, and the specific attributes are as follows: Standard specification node = {Standard specification: standard name, standard code, standard number, standard level or category, international standard classification number, Chinese standard document classification number, release date, implementation date, release agency, standard status, alternative standard, replaced standard, drafting unit, competent department, centralized unit and drafter}; Chapter node = {Chapter: title level, title sequence number, title name, content 1 and keyword 1}; Paragraph node = {paragraph: paragraph number, content 2, keyword 2, link title 1 and link title number 1}, in particular, the paragraph number is represented by p i , where i is numbered with chapters as the domain; Sentence node = {sentence: sentence number, content 3, keyword 3, link title 2 and link title number 2}, in particular, the sentence number is represented by s j , where j is numbered based on the entire article; The content layer of the dual-granularity knowledge graph structure established in step S5 includes type nodes, subject nodes, and object nodes. The type nodes include: definition and explanation class, requirement satisfaction class, parameter selection class, measure adoption class, general description inclusion class, specific item class, table description class, notes class and reference regulation class. Each sentence node is associated with at least one type node and is connected to its corresponding subject node or object node.

5. The method for constructing a knowledge graph for the field of electric power design standards and specifications as claimed in claim 4, characterized in that: The knowledge unit in step S6 is a dual-granularity knowledge unit, including a structure layer knowledge unit and a content layer knowledge unit; the knowledge extraction is a dual-granularity knowledge extraction, including a structure layer extraction and a content layer extraction; The structure layer entity extraction, attribute extraction and relationship extraction adopt the knowledge extraction method based on pattern matching rules, using the structure layer nodes and their attributes specified in step S5, using regular expressions and corresponding extraction methods, to establish extraction rules and extract nodes and their corresponding attributes; The relationship between the nodes in the structure layer is a fixed inclusion relationship, that is, [standard specification node] → [include] → [chapter node] → [include] → [paragraph node] → [include] → [sentence node]. The relationship between the nodes in the structure layer can be directly extracted using the extraction rules; Content-layer entity extraction uses a knowledge extraction method that combines rules with semantic role labeling technology. The rule-based semantic role labeling technology takes the predicate argument structure as the decomposition center and extracts the predicate and its corresponding subject and object nodes from the sentence structure. The content layer relationship and attribute extraction is a knowledge extraction method based on pattern matching rules, that is, the relationship between content layer nodes is the type relationship between sentence nodes and type nodes, the subject relationship between type nodes and subject nodes, and the object relationship between type nodes and object nodes. There are three types of relationships in total. The relationship extraction is performed by combining the extraction results of rules with semantic role labeling technology. Knowledge fusion uses cosine similarity calculation to fuse and match the extracted predicate nodes with type nodes.

6. The method for constructing a knowledge graph for the field of electric power design standards and specifications as claimed in claim 2, It is characterized in that The typical forms include: Each table can be divided into column headers, row headers and content cells. The column header includes single row, multiple columns and multiple rows nested. The row header contains single column, multiple rows and multiple columns nested format. Content cells contain parallel and nested modes; The normalization process is to convert any table into a parallel mode of multiple rows and columns according to a typical table form; The storage format of the standardized storage is: {type: standard, serial number, name, storage path}.

7. The method for constructing a knowledge graph for the field of electric power design standards and specifications as claimed in claim 5, It is characterized in that After the knowledge extraction and knowledge fusion in step S6, an expert review process is provided to ensure the professionalism and accuracy of the knowledge units extracted from the standard specification document.

8. A knowledge graph construction system for the field of power design standards and specifications. Using the knowledge graph construction method for the field of power design standards and specifications as described in any one of claims 1 to 7, It is characterized in that Include: Text collection module: Used to obtain the PDF file of current power design industry standards and specifications, including national standards, industry standards and enterprise standards Text preprocessing module: Used to pre-process the text of power design standards and specifications, System building blocks: a: Establish a regular expression to obtain text data containing document information and establish a text dictionary in the field of power design; b: Establish a text dictionary in the field of power design, perform word segmentation on text data containing document information, and extract keywords. c: Establish a dual-granularity knowledge graph structure consisting of a structure layer and a content layer d: Establish dual-granularity knowledge units including structure-layer knowledge units and content-layer knowledge units. Visualization module: visualize the knowledge graph and assist staff in completing knowledge retrieval.

9. An electronic device, It is characterized in that including processor and storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and when the program is executed by a processor, the steps of any method of any of claims 1 to 7 are implemented.