A method for constructing and retrieving a petrochemical emergency rescue standard knowledge graph
By constructing a knowledge graph of petrochemical emergency response standards, the problem of time-consuming and error-prone standard lookup in traditional petrochemical emergency response has been solved, enabling rapid and accurate standard knowledge retrieval and decision support.
Patent Information
- Application Number
- CN202410489925.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2044-04-23
AI Technical Summary
In existing petrochemical emergency response, traditional methods of consulting standards are time-consuming and prone to errors, and cannot achieve cross-referencing of knowledge between standard documents, resulting in slow and inaccurate decision-making.
A standard knowledge graph for petrochemical emergency rescue is constructed by collecting standard texts, designing ontologies, extracting entities and relationships, and using deep learning models for entity recognition and relationship extraction. The results are then stored in a graph database to enable visual querying and intelligent retrieval.
It enables rapid integration and accurate retrieval of standard knowledge, improving the speed and accuracy of emergency response and supporting rapid and accurate decision-making.
Smart Images

Figure CN118394951B_ABST
Abstract
Description
Technical Field
[0001] This invention pertains to petrochemical emergency rescue standard knowledge graphs, specifically involving a method for constructing and retrieving petrochemical emergency rescue standard knowledge graphs. Background Technology
[0002] With continued economic development, my country, as a major producer and consumer of petrochemicals, is also experiencing a continuous increase in petrochemical accidents. Emergency response refers to the ability to take swift action in emergency situations to minimize losses and protect lives and property. Petrochemical accidents are a common type of safety incident.
[0003] Currently, rescue personnel need to search through numerous manuals, contingency plans, and standard documents to obtain petrochemical-related rescue information. These standards form a crucial foundation for the decision-making process. However, traditional methods of reviewing standards are time-consuming and prone to errors due to information redundancy, posing a challenge to the speed and accuracy of petrochemical emergency response. Current petrochemical emergency decision-making is primarily supported by expert systems, which require experts to search all knowledge bases related to emergency rescue, with relevant standards being the most important decision-making basis. However, currently, relevant standards in my country are published and stored in PDF format or paper copies, which are not machine-readable. Standards are still in the stage of representing knowledge using documents as the basic unit, failing to achieve cross-referencing between standard documents. Furthermore, the existing storage methods of standard documents are not conducive to the construction of a standard system and knowledge organization, hindering rapid retrieval and accurate matching of standard document knowledge. Summary of the Invention
[0004] To address the shortcomings of existing petrochemical emergency decision-making, such as the inability to cross-reference knowledge among standard documents and the unfavorable storage methods for standard system construction and knowledge organization, which hinder rapid retrieval and accurate matching of standard document knowledge and result in slow and inaccurate decision-making, this invention provides a method for constructing and retrieving a petrochemical emergency rescue standard knowledge graph. This method integrates the standard knowledge involved in the rescue, providing high-quality knowledge and decision-making information for experts and commanders.
[0005] The technical solution of the present invention is as follows:
[0006] A method for constructing and retrieving a standard knowledge graph for petrochemical emergency rescue, comprising collecting standard texts for petrochemical emergency rescue and preprocessing the standard texts;
[0007] Design the petrochemical emergency rescue standard ontology, and design the petrochemical accident rescue standard entity, petrochemical accident rescue standard relationship and knowledge graph underlying data structure based on relevant petrochemical standard knowledge;
[0008] Entity and relation extraction are performed on common standard elements in the standard using standard rules;
[0009] Entity recognition and relation extraction of core elements in standard text based on deep learning models;
[0010] The obtained petrochemical accident rescue standard entities and ternaries are integrated into a knowledge database and stored in a graph database;
[0011] Visual queries and intelligent searches are performed based on graph databases.
[0012] Furthermore, the collection of standard texts for petrochemical emergency response and the preprocessing of these standard texts specifically include the following steps:
[0013] Step 1.1: Collect standard texts for petrochemical emergency response through scanning paper standards and downloading from the platform;
[0014] Step 1.2: Since most of the standard text documents are paper documents, PDF files, or image files, the non-text files in the standard text are converted into text files using OCR technology, and then manually cleaned to delete typos, add missing words, and remove irrelevant words;
[0015] Step 1.3: Complete the abbreviations in the standard text.
[0016] Furthermore, the petrochemical emergency rescue standard ontology is designed. Based on relevant petrochemical standard knowledge, the petrochemical accident rescue standard entities, petrochemical accident rescue standard relationships, and the underlying data structure of the knowledge graph are designed. Specifically, the following steps are included:
[0017] Step 2.1: Construct a petrochemical emergency rescue standard ontology based on the characteristics of knowledge in the field of petrochemical accident rescue and related standards. The petrochemical emergency rescue standard ontology performs semantic standardization and constraints on the extracted knowledge in terms of professional terminology.
[0018] Step 2.2: Design the standard entities for petrochemical accident rescue. The standard entities for petrochemical accident rescue include common entities for petrochemical accident rescue, relational entities for petrochemical accident rescue, and element entities for petrochemical accident rescue.
[0019] Step 2.3: Design the standard relationships for petrochemical accident rescue, which include common relationships, logical relationships, and element relationships of petrochemical accident rescue standards.
[0020] Step 2.4: The underlying data of the knowledge graph is in the form of a six-tuple, which includes the first petrochemical accident rescue standard entity, the petrochemical accident rescue standard relationship between the first petrochemical accident rescue standard entity and the second petrochemical accident rescue standard entity, the second petrochemical accident rescue standard entity, the standard number to which the first petrochemical accident rescue standard entity belongs, the standard number of the petrochemical accident rescue standard relationship, and the standard number to which the second petrochemical accident rescue standard entity belongs.
[0021] Furthermore, the petrochemical accident rescue standard has 14 common entities and 8 relational entities, which are important components of the petrochemical accident rescue standard element relationships and logical relationships; the petrochemical accident rescue standard element entities have 53 entities, which are the main content of the petrochemical emergency rescue standard knowledge graph.
[0022] Furthermore, the petrochemical accident rescue standard has 17 common relationships and 2 logical relationships, representing inclusion relationships, parallel relationships, and numerical requirements within the standard; the petrochemical accident rescue standard has 9 element relationships, representing the main contents of emergency rescue in the standard.
[0023] Furthermore, the step of using standard rules to extract entities and relationships from common standard elements in the standard specifically involves: using the structure and drafting rules of the standardized document to extract entity relationships of petrochemical accident rescue standard elements in the standard document.
[0024] Furthermore, the entity recognition and relation extraction of core elements of standard text based on the deep learning model specifically includes the following steps:
[0025] Step 3.1: Extract words from the preprocessed standard text to construct a dictionary for petrochemical emergency rescue;
[0026] Step 3.2: Use the BERT-BiLSTM-CRF named entity recognition network model with domain dictionary embedding to perform entity recognition and extraction in the standard text;
[0027] Step 3.3: The relation extraction of the knowledge graph adopts the BERT-BiLSTM-CRF entity relation extraction model to obtain the triple data table.
[0028] Furthermore, the obtained standard entities and ternaries for petrochemical accident rescue are fused together and stored in a graph database, specifically including the following steps:
[0029] Step 4.1: Match the extracted triplet data table with the same semantic multi-word pairs in the domain dictionary and then perform entity alignment; then, by detecting triples with the same head entity and the same tail entity in the data table, identify their entity relationships to form a normalized triplet data table.
[0030] Step 4.2: Write a Python program to obtain the entity and canonical triple data table through the Py2neo module, import it into the Neo4j graph database, and complete the construction of the knowledge graph.
[0031] Furthermore, the visualization query and intelligent retrieval based on the graph database are as follows:
[0032] Step 5.1: Use the Cypher query statement of Neo4j graph database to write a search template based on petrochemical names, standards and emergency scenarios, and complete the storage and retrieval of graphs;
[0033] Step 5.2: Build a webpage using Flask as the web framework through the graph database port, embed search templates, and use the Echarts library to perform intelligent querying and visualization of the data.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] In the field of petrochemical emergency rescue, decision-making requires rapid and accurate searching of standard requirements that meet the specific on-site conditions. This invention provides a knowledge graph for establishing petrochemical emergency standards, which can realize standard knowledge retrieval and visualization. It has excellent efficiency in deep search involving relationships and real-time query efficiency for relationships, and can realize rapid integration of standard knowledge, effectively improving the speed and accuracy of emergency response. Attached Figure Description
[0036] Figure 1 This is a flowchart illustrating the construction of the petrochemical emergency rescue standard knowledge graph for this invention.
[0037] Figure 2 This is a structural diagram of the petrochemical emergency rescue standard body of the present invention;
[0038] Figure 3 This is a diagram of the six-tuple structure of the present invention;
[0039] Figure 4 This is a standard document cover format diagram for the present invention;
[0040] Figure 5 This is an example diagram of entity annotation for the present invention;
[0041] Figure 6 This is an example diagram of relation extraction and annotation in this invention;
[0042] Figure 7 The schematic diagram of embedding the BERT-BiLSTM-CRF entity recognition model into the domain dictionary of this invention;
[0043] Figure 8 This is a schematic diagram of the BERT-BiLSTM-CRF relation extraction structure of the present invention;
[0044] Figure 9 This is a schematic diagram of the knowledge graph retrieval for petrochemical emergency rescue standards of the present invention; Detailed Implementation
[0045] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0046] See Figure 1-3 A method for constructing and retrieving a petrochemical emergency rescue standard knowledge graph, comprising collecting petrochemical emergency rescue standard texts and preprocessing the standard texts;
[0047] Design the petrochemical emergency rescue standard ontology, and design the petrochemical accident rescue standard entity, petrochemical accident rescue standard relationship and knowledge graph underlying data structure based on relevant petrochemical standard knowledge;
[0048] Entity and relation extraction are performed on common standard elements in the standard using standard rules;
[0049] Entity recognition and relation extraction of core elements in standard text based on deep learning models;
[0050] The obtained petrochemical accident rescue standard entities and ternaries are integrated into a knowledge database and stored in a graph database;
[0051] Visual queries and intelligent searches are performed based on graph databases.
[0052] The standard texts referred to herein are emergency rescue standards for petrochemical product accidents, including national standards, industry standards, local standards, and enterprise standards known to those skilled in the art.
[0053] In one embodiment of the present invention, the collection of petrochemical emergency rescue standards and the preprocessing of the standard text specifically include the following steps:
[0054] Step 1.1: Collect standard texts for petrochemical emergency response through scanning paper standards and downloading from the platform;
[0055] Step 1.2: Since most of the standard text documents are paper documents, PDF files, or image files, the non-text files in the standard text are converted into text files using OCR technology, and then manually cleaned to delete typos, add missing words, and remove irrelevant words;
[0056] Step 1.3: Complete the abbreviations in the standard text; for example, in the sentence "This standard specifies the terms and definitions for petrochemical spill accidents", "this standard" needs to be rewritten as the standard number of the standard "GA / T 970-2011 specifies the terms and definitions for petrochemical spill accidents" in order to extract the entities and relationships contained in the sentence. Tables in the standard should be rewritten as data or text descriptions.
[0057] In another embodiment of the present invention, a petrochemical emergency rescue standard ontology is designed. Based on petrochemical-related standard knowledge, petrochemical accident rescue standard entities, petrochemical accident rescue standard relationships, and the underlying data structure of the knowledge graph are designed, namely, the knowledge graph schema layer construction. The schema layer includes ontology construction (defining entity relationships) and underlying data structure design, specifically including the following steps:
[0058] Step 2.1: Construct a petrochemical emergency rescue standard ontology based on knowledge of the petrochemical accident rescue field and the characteristics of relevant standards, such as... Figure 2 As shown, the petrochemical emergency rescue standard ontology performs semantic standardization and constraints on the extracted knowledge in terms of professional terminology;
[0059] Step 2.2: Design the standard entities for petrochemical accident rescue. The standard entities for petrochemical accident rescue include common entities for petrochemical accident rescue, relational entities for petrochemical accident rescue, and element entities for petrochemical accident rescue.
[0060] The common entities of the petrochemical accident rescue standard are designed according to the common requirements of the standard in "GB / T 1.1—2020 Standardization Work Guidelines Part 1: Structure and Drafting Rules of Standardization Documents" and related regulations on standardization work, totaling 14 entities, as shown in Table 1 below:
[0061] Serial Number entity Serial Number entity 1 standard 8 scope 2 Standard number 9 the term 3 ICS number 10 definition 4 CCS number 11 English 5 Release time 12 government organizations 6 Implementation time 13 drafter 7 Standard State 14 Standard type
[0062] Table 1
[0063] There are a total of 8 entities related to the petrochemical accident rescue standard. These entities are important components of the petrochemical accident rescue standard's element relationships and logical relationships, as shown in Table 2 below:
[0064] Serial Number entity Serial Number entity 1 method 5 Require 2 illustrate 6 in principle 3 numerical values 7 program 4 condition 8 Duties
[0065] Table 2
[0066] There are a total of 53 element entities, which constitute the main content of the standard knowledge graph for petrochemical emergency response. The following content will be referred to as element entities, as shown in Table 3 below:
[0067] Serial Number entity Serial Number entity 1 Response subject 28 Command and analysis 2 government organizations 29 command 3 non-governmental organizations 30 Accident level 4 individual 31 Disaster Level 5 Responding to the object 32 Operation Rescue 6 Emergency 33 Information Report 7 Accidents and disasters 34 Initial handling 8 Petrochemical accident 35 evacuation 9 Disaster-bearing carrier 36 Alert and Isolation 10 Disaster victims 37 monitor 11 property 38 Decontamination 12 Resources and Environment 39 Cleaning 13 Hazard Source 40 Firefighting 14 Leaking medium 41 Investigation 15 emergency supplies 42 Public opinion 16 Basic living supplies 43 Information Release 17 Emergency equipment and supporting supplies 44 Confirmation of the accident scene 18 Engineering materials and machining equipment 45 Search and rescue of injured and trapped personnel 19 Emergency Management 46 Surrounding environment confirmed 20 Prevention and preparation 47 Confirm required resources 21 Risk Management 48 Determine control measures 22 Drills and Training 49 Personnel safety protection 23 Material reserves 50 Information Disclosure 24 Monitoring and early warning 51 Emergency Support 25 monitor 52 Financial Administration 26 Warning 53 Recovery and Reconstruction 27 Response and rescue
[0068] Table 3
[0069] Step 2.3: Design the standard relationships for petrochemical accident rescue, which include common relationships, logical relationships, and element relationships of petrochemical accident rescue standards.
[0070] The standard common element relationships, including the petrochemical accident rescue standard element entities, are designed according to the common requirements of the standard in "GB / T 1.1—2020 Standardization Work Guidelines Part 1: Structure and Drafting Rules of Standardization Documents", as well as the subsequent standard map construction and management, totaling 17 relationships, as shown in Table 4 below:
[0071] Serial Number Head Entity relation Tail entity 1 Standard number ICS number is ICS number 2 Standard number CCS number is CCS number 3 standard The standard number is Standard number 4 Standards / Terminology The English is English 5 Standard number Release time is Release time 6 Standard number Implementation time is Implementation time 7 government organizations release standard 8 government organizations propose Standard number 9 government organizations Classification standard 10 Drafter / Organization Drafting Standard number 11 Standard number Standard state is Standard State 12 Standard number It stipulates scope 13 Standard number Applicable to scope 14 Standard number Quote Standard documents 15 the term The definition is definition 16 Standard number The alternative standard is Standard number 17 Standard documents Standard type is Standard type
[0072] Table 4
[0073] There are two logical relationships in the petrochemical accident rescue standards: a containment relationship, a parallel relationship, and a numerical requirement, as shown in Table 5 below.
[0074] Serial Number Head Entity relation Tail entity 1 Element Entity Numerical requirements numerical values 2 Element Entity Include Element Entity
[0075] Table 5
[0076] There are a total of 9 elements in the standard for emergency response to petrochemical accidents, which represent the main contents of emergency response in the standard, as shown in Table 6 below:
[0077] Serial Number Head Entity Tie Tail entity 1 Element Entity The condition is condition 2 Element Entity The requirement is Require 3 Element Entity The principle is in principle 4 Element Entity The program is program 5 Element Entity Duty is Duties 6 Element Entity Required Element Entity 7 Element Entity The explanation is illustrate 8 Element Entity Applicable to Element Entity 9 Element Entity The method is method
[0078] Table 6
[0079] Step 2.4: The underlying data of the knowledge graph is in the form of a six-tuple, including the first petrochemical accident rescue standard entity, the petrochemical accident rescue standard relationship between the first and second petrochemical accident rescue standard entities, the second petrochemical accident rescue standard entity, the standard number to which the first petrochemical accident rescue standard entity belongs, the standard number of the petrochemical accident rescue standard relationship, and the standard number to which the second petrochemical accident rescue standard entity belongs; specifically represented as {entity1, entity1_Standard, relation, relation_Standard, entity2, entity2_Standard}, abbreviated as {e1, e1_sta, rel, rel_sta, e2, e2_sta}. The display method for a six-tuple is as follows... Figure 3 As shown.
[0080] In a triplet, entities are represented by circles, relations by rectangles, and reference numbers by rounded rectangles. For each entity, the triplet with that entity as the subject is selected for display. The reference numbers of the entity and relation are used as attributes for backend data processing and querying. Nodes of the same color connecting the same node represent the same semantic relationship. The overall effect is a mesh structure radiating outwards from the query entity, with related entities having semantic relationships at the center.
[0081] In addition, in this embodiment of the invention, the step of using standard rules to extract entities and relationships from common standard elements in the standard specifically involves: using the structure and drafting rules of the standardized document to extract entity relationships of petrochemical accident rescue standard elements in the standard document.
[0082] Since the standards are all drafted in accordance with "GB / T 1.1—2020 Standardization Work Guidelines Part 1: Structure and Drafting Rules of Standardization Documents", the extraction of entity relationships of petrochemical accident rescue standard elements in standard documents can be based on the structure and drafting rules of standardization documents. For example, 8.2 of "GB / T 1.1—2020 Standardization Work Guidelines Part 1: Structure and Drafting Rules of Standardization Documents" stipulates that "the cover element is used to provide information identifying the document. The following essential information should be indicated on the cover: document name, document level or category." It is necessary to extract the entity ICS code of the standard document. The ICS code appears only on the cover of the standard document and its form is 'ICS xx.xxx.xx', such as... Figure 4 As shown, the ICS code of this standard can be extracted by recognizing the combination of ICS, numbers, and decimal point symbols in the text, and the relationship of the ICS number of this standard can be directly extracted—{standard number, ICS code, ICS code}; 8.3 stipulates that “g) the drafting unit and main drafter of the document shall use the following expression form: ‘Drafting unit of this document:…….’ ‘Main drafter of this document:…….’” It is necessary to extract each drafter of the standard document. The drafters of the standard document appear only in the preface and are in the form of ‘Main drafters of this document: XXX, XXX, XXX…….’. By recognizing the name after the paragraph ‘Main drafter:’ in the text, the drafter of this standard can be extracted, and the relationship of the drafter of this standard can be directly extracted—{XXX, drafter, standard}, {XXX, drafter, standard}, {XXX, drafter, standard}……;
[0083] Multiple extraction rule algorithms were designed, including those for standard number, CCS number, and drafter. The ICS number extraction algorithm is shown in Table 7 below.
[0084]
[0085] Table 7
[0086] In one embodiment of the present invention, the entity recognition and relation extraction of core elements of standard text based on a deep learning model specifically includes the following steps:
[0087] Step 3.1: Extract words from the preprocessed standard text to construct a dictionary for petrochemical emergency rescue;
[0088] Specifically, the standard text is divided into a manually annotated test set and an unannotated training set in a 2:8 ratio. The test set uses the BIO annotation method, where B represents the beginning of the annotated data, I represents the middle of the annotated data, and O represents the end of the annotated data. Named entity recognition annotation is as follows: Figure 5 As shown, the relationship is labeled as follows Figure 6 As shown.
[0089] Step 3.2: A BERT-BiLSTM-CRF named entity recognition network model with domain dictionary embedding is used to perform entity recognition and extraction in the standard text; its structure is as follows: Figure 7 BERT is a pre-trained model used to convert input text sequences into word vector sequences. This step effectively preserves the semantic and contextual information in the text. This paper introduces dictionary features, fusing them with the word-level vectors obtained through BERT. This enhances the semantic information of the sequence based on the dictionary segmentation results, further improving model performance.
[0090] Step 3.3: Relation extraction from the knowledge graph employs the BERT-BiLSTM-CRF entity relation extraction model to obtain a triplet data table. Specifically, the entities and text identified in Step 3.2 are input into the model together, with the structure as follows: Figure 8 BERT is a pre-trained model that, after inputting text, produces a query vector, key vector, and value vector representing the full-text semantic information. BiLSTM is a bidirectional long short-term memory model that selectively preserves contextual information by controlling the input gate, forget gate, and output gate, resulting in more comprehensive semantic information. CRF is a conditional random field; after the first two layers of information are input, the sentences are sequence-labeled. Its principle is to predict the current sentence label by learning from manually labeled information, thus obtaining triples.
[0091] In addition, in one embodiment of the present invention, the obtained petrochemical accident rescue standard entities and triples are fused and stored in a graph database, specifically including the following steps:
[0092] Step 4.1: Match the extracted triplet data table with the same semantic multi-word pairs in the domain dictionary and then perform entity alignment to avoid relation redundancy; then, by detecting triples with the same head entity and the same tail entity in the data table, identify their entity relations to form a standardized triplet data table.
[0093] Step 4.2: Write a Python program to obtain the entity and canonical triple data table through the Py2neo module, import it into the Neo4j graph database, and complete the construction of the knowledge graph.
[0094] In yet another embodiment of the present invention, the visualization query and intelligent retrieval based on the graph database are specifically as follows:
[0095] Step 5.1: Use the Cypher query statement of Neo4j graph database to write a search template based on petrochemical names, standards and emergency scenarios, and complete the storage and retrieval of graphs;
[0096] The Cypher statements mainly include the MATCH statement for image matching, the WHERE statement for conditional filtering, and the RETURN statement for returning results. The implementation of Cypher statements is shown in Table 8.
[0097]
[0098] Table 8
[0099] Step 5.2: Build a webpage using Flask as the web framework through the graph database port, embed search templates, and use the Echarts library for intelligent data querying and visualization. This interface allows users to query standard elements related to an accident by standard, petrochemical product type, and accident scenario, such as... Figure 9 As shown.
[0100] The search box offers two search methods. The default search method retrieves the corresponding entity and displays it along with its relationships on the knowledge graph page. If no matching results are found, the knowledge graph page remains unchanged. The second search method integrates with a tree-structured menu. Users need to click on one of the three options in the tree-structured menu to search for relevant content.
[0101] The tree-structured menu consists of two parts: options and tree-structured content. Options are divided into three categories: Standards, Hazards, and Scenarios. Under the Standards option, the tree-structured content is displayed according to standard categories. Clicking on a standard in the tree-structured content will display all entity relationships for that standard on the knowledge graph page. Entering content in the search box will recommend relevant standards within the knowledge graph based on the content's dropdown menu. Clicking on a standard will then display its entities and relationships. Under the Hazards option, the tree-structured content is displayed according to hazard categories, with the same structure as the Standards option. Scenario content refers to suggestions from domain experts to set up different scenario tree-structured content. Standards can be recommended and entity relationships displayed on the knowledge graph page based on important emergency scenario conditions such as whether the hazard source is known, whether the leakage amount is known, and whether the accident level can be determined.
[0102] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for constructing and retrieving a petrochemical emergency rescue standard knowledge graph, characterized in that, The standard text of collecting petrochemical emergency rescue is included, and the standard text is pretreated; The petrochemical emergency rescue standard ontology is designed, the petrochemical accident rescue standard entity, the petrochemical accident rescue standard relationship and the knowledge graph bottom data structure are designed according to the knowledge of petrochemical related standards; The entity extraction and relationship extraction of the common standard elements in the standard are carried out by using the standard rules; The entity recognition and relationship extraction of the core elements of the standard text are carried out based on the deep learning model, and the triplets are obtained; The obtained petrochemical accident rescue standard entity and triplet are knowledge fused and stored in the graph database; The visualization query and intelligent retrieval are carried out according to the graph database; The bottom data form of the knowledge graph is six-tuple, including the first petrochemical accident rescue standard entity, the petrochemical accident rescue standard relationship between the first petrochemical accident rescue standard entity and the second petrochemical accident rescue standard entity, the second petrochemical accident rescue standard entity, the standard number of the first petrochemical accident rescue standard entity, the standard number of the petrochemical accident rescue standard relationship and the standard number of the second petrochemical accident rescue standard entity; The visualization query and intelligent retrieval according to the graph database are as follows: The retrieval template is written according to the petrochemical name, standard and emergency scene as the main body by using the Cypher query statement of the Neo4j graph database, and the storage and retrieval of the graph are completed; The webpage is built by using Flask as the Web framework through the port of the graph database, the retrieval template is embedded, and the intelligent query and visualization display of the data are carried out by using the Echarts library; The retrieval template is configured with a tree structure menu based on the emergency scene conditions, which can recommend related standards and display entity relationships according to at least one condition of whether knowing the dangerous source, whether knowing the leakage amount and whether being able to judge the accident level; The petrochemical emergency rescue standard ontology is designed, the petrochemical accident rescue standard entity, the petrochemical accident rescue standard relationship and the knowledge graph bottom data structure are designed according to the knowledge of petrochemical related standards, and the specific steps include: Step 2.1: According to the knowledge of petrochemical accident rescue field and the characteristics of related standards, the petrochemical emergency rescue standard ontology is constructed, and the extracted knowledge is semantically standardized and constrained in professional terms; Step 2.2: The petrochemical accident rescue standard entity is designed, which includes the petrochemical accident rescue standard common entity, the petrochemical accident rescue standard relationship entity and the petrochemical accident rescue standard element entity; Step 2.3: The petrochemical accident rescue standard relationship is designed, which includes the petrochemical accident rescue standard common relationship, the petrochemical accident rescue standard logic relationship and the petrochemical accident rescue standard element relationship.
2. The method according to claim 1, wherein, The standard text of collecting petrochemical emergency rescue is included, and the standard text is pretreated, which includes the following steps: Step 1.1: The standard text of petrochemical emergency is collected by scanning paper standards and downloading platform; Step 1.2: If the standard text is mostly in paper, PDF or image files, convert the non-text files in the standard text to text files through OCR technology, and then manually clean up, delete wrong words, add missing words and remove irrelevant words; Step 1.3: Complete the abbreviated and abbreviated content in the standard text.
3. The method according to claim 1, wherein the method is characterized by, The petrochemical product accident rescue standard common entity has 14, the petrochemical product accident rescue standard relationship entity has 8, which is an important part of the composition of petrochemical product accident rescue standard element relationship and petrochemical product accident rescue standard logical relationship; The petrochemical product accident rescue standard element entity has 53, which is the main content of the standard knowledge graph of petrochemical emergency rescue.
4. The method according to claim 1, wherein the method is characterized by, The common relationship of the petrochemical product accident rescue standard has 17, the logical relationship of the petrochemical product accident rescue standard has 2, which represents the inclusion relationship, parallel relationship and numerical requirements in the standard; The petrochemical product accident rescue standard element relationship has 9, which represents the main content of emergency rescue in the standard.
5. The method according to claim 1, wherein the method is characterized by, The entity extraction and relationship extraction of common standard elements in the standard by using standard rules are as follows: using the structure and drafting rules based on standardized files to extract the petrochemical product accident rescue standard element entity relationship in the standard file.
6. The method according to claim 1, wherein the method is characterized by, The entity recognition and relationship extraction of the core elements of the standard text based on the deep learning model include the following steps: Step 3.1: Preprocess the standard text to extract words and construct a petrochemical emergency rescue field dictionary; Step 3.2: Use the BERT-BiLSTM-CRF named entity recognition network model based on field dictionary embedding to extract entities and extract entities in the standard text; Step 3.3: The relationship extraction of knowledge graph uses BERT-BiLSTM-CRF entity relationship extraction model to obtain a triple data table.
7. The method according to claim 6, wherein the method is characterized by, The obtained petrochemical product accident rescue standard entity and triple are fused and stored in a graph database, which includes the following steps: Step 4.1: Match the extracted triple data table with the same semantic multi-word group in the field dictionary, then align the entities; Then detect the triple with the same head entity and the same tail entity in the data table, and identify the entity relationship to form a standard triple data table; Step 4.2: Write a Python program to import the obtained entity and standard triple data table into the Neo4j graph database through the Py2neo module and complete the construction of the knowledge graph.
Citation Information
Patent Citations
Fishery standard knowledge graph construction method fusing rules and deep learning
CN113946685A
Emergency medical knowledge graph construction method, system and device and storage medium
CN117408335A