Foundation pit construction accident knowledge graph construction method based on text mining

Through the method of dependent syntax analysis and manual intervention, a knowledge graph of foundation pit construction events was constructed, which solved the problems of dispersed data and inaccurate semantic extraction of foundation pit accidents in the existing technology, realized the correlation and connection of accident information, and improved the Accident prevention and management capabilities.

CN119202264APending Publication Date: 2024-12-27SINOHYDRO BUREAU 14 CO LTD

Patent Information

Application Number
CN202411042719.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing technology lacks unified standard standards and data models in the field of foundation pit construction, resulting in dispersed, inconsistent data of foundation pit accidents, and difficult to share. Natural language processing technology cannot accurately extract the semantics in text and cannot effectively construct foundation pit construction accidents. Dynamic Event Knowledge Graph.

Method used

Using a text mining method, triplets are extracted through dependent syntax analysis, combined with manual guidance and intervention, a knowledge graph for foundation pit construction events is constructed, including obtaining accident reports, text preprocessing, dependent syntax analysis, and increasing triplet integrity , import the graph database, build the framework and query functions to realize the association and connection of accident information.

Benefits of technology

It has successfully achieved accurate semantic extraction of foundation pit accident text, and constructed a foundation pit accident knowledge graph with a complete structure and rich content, helping decision makers understand the accident evolution process and influencing factors, and improving accident prevention and management capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202264A_ABST
    Figure CN119202264A_ABST
Patent Text Reader

Abstract

The invention provides a construction method of a foundation pit construction accident knowledge graph based on text mining. According to the method, related information, accident root causes, affected factors and other elements of foundation pit accidents are associated and connected, the occurrence mechanism and the affected factors of the accidents are comprehensively understood, and experience and guidance are provided for safety management and risk control of foundation pit construction. According to the method, the foundation pit accident knowledge graph with a complete structure and rich contents is constructed, elements such as accident related information, accident root causes and affected factors are associated and connected in a portrait representation mode, reliable reference is provided for decision makers, the accident prevention and management capability is improved, and the accident prevention and management efficiency is improved. And a positive promotion effect is achieved for promoting development and safety management of the foundation pit construction industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of knowledge graph construction, and specifically is a method for constructing a foundation pit construction accident knowledge graph based on text mining. Background Art

[0002] Knowledge graph is a technology that represents and organizes knowledge in the form of graphs. It can model the entities, attributes and relationships in accident events in a structured manner to form a rich and hierarchical knowledge network. By constructing a knowledge graph of foundation pit construction accident events, many implicit and complex relationships such as networks, structures, interactions, intersections, evolutions or derivations between knowledge units or knowledge groups can be clearly displayed, so as to better understand the evolution process of accident events, the correlation of related factors and their impact on engineering safety.

[0003] At present, there is a lack of unified standards and data models in the field of foundation pit construction, which leads to the dispersion, inconsistency and difficulty in sharing of foundation pit accident data. Although with the development of knowledge graphs in recent years, the automatic processing of text information related to foundation pit construction accidents has been achieved through the application of natural language processing and text mining technology, this processing method cannot accurately extract the semantics in the text (knowledge graph construction method based on disaster scenarios (CN 109992672 A)). Therefore, it is necessary to propose a strategy for extracting triples based on dependency syntactic analysis, combined with manual guidance and intervention, to accurately draw a knowledge graph of dynamic events of foundation pit construction accidents. Summary of the invention

[0004] The present invention aims to solve one of the technical problems existing in the prior art: To this end, the present invention proposes a method for constructing a knowledge graph of foundation pit construction accident events based on text mining, aiming to associate and connect the relevant information of foundation pit accidents, root causes of accidents, affected factors and other elements, comprehensively understand the occurrence mechanism and influencing factors of accidents, and provide experience and guidance for safety management and risk control of foundation pit construction.

[0005] The purpose of the present invention is achieved by at least one of the following technical solutions.

[0006] A method for constructing a knowledge graph of foundation pit construction accidents based on text mining includes the following steps:

[0007] Step 1: Obtain foundation pit construction accident report;

[0008] Step 2: Manually screen the text, retain the summary of the time and place of the accident, the nature of the accident and the accident loss in the foundation pit construction accident report, intercept the content of the accident process, emergency response analysis and accident cause analysis, delete the rest of the content, and obtain the target text;

[0009] Step 3: Complete the preprocessing of this article: perform word segmentation on the target text to achieve Chinese word segmentation and part-of-speech tagging; manually fill in the subject when a sentence in a text paragraph directly starts with a core verb or the subject appears repeatedly in the same paragraph; manually adjust the inaccurate word segmentation results caused by professional terms, abbreviations and special writing methods;

[0010] Step 4: Combine the parts of speech of each word in the target text, analyze the dependency relationship between words in the sentence, and combine the analysis of the accident formation mechanism and accident characteristics to extract knowledge triples from the preprocessed text and generate a dependency syntax list;

[0011] Step 5: Increase the completeness of the extracted knowledge triples;

[0012] Step 6: Define the framework for the semantic meaning and constraints of entities, relations and attributes in knowledge triples;

[0013] Step 7: Import the extracted triplet data into the graph database, and output the knowledge graph of foundation pit construction accident events;

[0014] Step 8: Use the query function of the knowledge graph to retrieve construction accident information of the required type, time range, or area.

[0015] Furthermore, in step 5, the following rules are followed to increase the completeness of the extracted knowledge triples:

[0016] (1) Completing the entity content with respect to other components in the sentence, including attributives, adverbials, and object complements;

[0017] (2) When the sentence is a parallel structure, the knowledge triples are divided into two different cases: when the sentence is a predicate parallel structure and when the sentence is a subject or object parallel structure;

[0018] (3) When the sentence is a subject-predicate-preposition-object structure, the subject of the sentence is taken as the subject, the core verb of the predicate and its complement preposition together form an entity relationship, and the preposition is taken as the object of the knowledge triple.

[0019] Furthermore, the entity content is completed for other components in the sentence, including attributives, adverbials, and object complements, as follows:

[0020] 1) When the subject and object in the sentence are modified by attributives, and there are multiple attributive complements before the object, add attributives for modification when extracting triples. The specific idea is:

[0021] S1.1, determine whether there is a word B that has a definite relationship with the entity A to be extracted. If so, add all the words B that have a definite relationship with the entity A to be extracted to the list L in ascending order of the sentence word numbers; traverse the list L in reverse order, and if there is still a word C in the word B that has a definite relationship with A, recursively call step S1.1;

[0022] S1.2, in the order of traversing the list L in reverse order, concatenate the word C with the entity A to complete the attributive completion of the entity;

[0023] 2) When the sentence has only a subject-predicate-object structure, the subject of the sentence is taken as the subject, the core verb of the predicate is taken as the entity relationship, and the object is taken as the object of the knowledge triple. The specific idea is:

[0024] S2.1. Determine whether there is a word B that has a verb-object relationship with entity A or a word C that has a subject-predicate relationship with entity A;

[0025] S2.2, if there is a word B that has a subject-object relationship with entity A, then determine whether there is a word D that has a subject-object relationship with word B, if so, return to step S2.1, otherwise word B and entity A form an entity;

[0026] If there is a word C that has a subject-predicate relationship with entity A, then determine whether there is a word D that has a subject-predicate relationship with word C. If so, return to step S2.1; otherwise, word C and entity A form an entity.

[0027] Furthermore, when the sentence is a parallel structure, it is handled in the following two cases:

[0028] 1) When the sentence is a predicate parallel structure: determine whether the verb E that has a parallel structure with the core verb has a subject-predicate structure or a verb-object structure with other words. If there is a subject-predicate structure, verb E and the core verb have a common object; if there is a verb-object structure, verb E and the core verb have a common subject;

[0029] 2) When the sentence is a subject or object parallel structure: determine the word E that has a subject-predicate relationship with the core verb and the word F that has a verb-object relationship with the core verb; if the word G and E form a parallel relationship, then G in the sentence has a subject-predicate relationship with the core word, and the extracted triples have the same object; if the word G and F form a parallel relationship, then the core verb in the sentence has a verb-object relationship with G, and the extracted triples have the same subject.

[0030] Furthermore, in step six, the constructed framework sets five tags, including: "Title" tag, "Location" tag, "Event" tag, "Entity" tag, and "Other" tag;

[0031] Among them, the "Title" tag represents the title of the accident text case, covering basic information such as time and place, and is used for quick retrieval and summarization; the "Location" tag represents the specific location where the foundation pit accident occurred, and is used to quickly determine the type of accident and conduct detailed classification; the "Event" is an event / event set tag, which is a certain event or a collection of a certain type of events that occurred in the foundation pit accident; the "Entity" is an entity tag, representing the noun part involved in the event chain, which is the subject or object of the "Event" tag; the "Other" tag has little to do with the accident behavior subject chain and serves as a logical connection part.

[0032] Furthermore, in step three, the PaddlePaddle word segmentation function is used to segment the target text to achieve Chinese word segmentation and part-of-speech tagging.

[0033] Furthermore, in step three, the inaccurate segmentation results caused by professional terms, abbreviations and special writing methods are solved by manually adding a custom dictionary.

[0034] Furthermore, in step one, framework crawler technology is used to obtain foundation pit construction accident reports from websites, including government websites at all levels, emergency management websites, and websites of relevant agencies such as the Ministry of Housing and Urban-Rural Development.

[0035] Furthermore, in step 4, the dependency syntactic analysis function of PaddleNLP is used to analyze the dependency relationship between words in the sentence.

[0036] Furthermore, in step seven, the extracted triple data is imported into the Neo4j database using the CREATE command in the Cypher statement, and the knowledge graph of foundation pit construction accident events is output.

[0037] Compared with the prior art, the advantages of the present invention are:

[0038] (1) The method based on dependency syntactic analysis in the present invention successfully realizes the triple extraction of foundation pit accident text and accurately extracts the semantics of sentences, thus establishing supporting conditions for better supporting the task of entity relationship extraction of foundation pit accident report text.

[0039] (2) A knowledge graph of foundation pit accidents with a complete structure and rich content was constructed, which associates and connects relevant information, root causes, affected factors and other elements of the accident in a portrait-like manner. This helps to provide reliable reference for decision makers, improve the ability to prevent and manage accidents, and has a positive role in promoting the development and safety management of the foundation pit construction industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1It is a flow chart of a method for constructing a knowledge graph of foundation pit construction accidents based on text mining in an embodiment of the present invention;

[0041] Figure 2 It is a knowledge graph display diagram of foundation pit construction accident events in an embodiment of the present invention;

[0042] Figure 3 This is a display diagram of a search example in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The following description combines specific illustrations to explain the technical solution so as to fully understand the present invention. However, the present invention can be implemented in many other ways different from those described herein, and similar generalized embodiments made by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.

[0044] A method for constructing a knowledge graph of foundation pit construction accidents based on text mining, such as Figure 1 As shown, the following steps are included:

[0045] Step 1: Obtain foundation pit construction accident report;

[0046] In one embodiment, framework crawler technology is used to obtain foundation pit construction accident reports from websites, including government websites at all levels, emergency management websites, and websites of relevant agencies such as the Ministry of Housing and Urban-Rural Development.

[0047] The crawler code is as follows:

[0048]

[0049]

[0050] Step 2: Manually screen the text, retain the summary of the time and place of the accident, the nature of the accident and the accident loss in the foundation pit construction accident report, intercept the content of the accident process, emergency response analysis and accident cause analysis, delete the rest of the content, and obtain the target text;

[0051] In one embodiment, "Song Jin and Su Xi, who were working on the ground, heard shouting from the direction of the foundation pit, and hurried over to check, and found that the southern part of the foundation pit had collapsed, and three workers who were cleaning the loose soil at the bottom were buried. The fire rescue personnel arrived at the scene. Because the soil in the foundation pit was very viscous and manual tools were inconvenient to dig, they then called in large mechanical equipment such as excavators to carry out excavation operations. The three buried workers were cleared out one after another and were sent to the hospital by 120 for rescue, but died. Cause of the accident: The construction unit failed to prepare a special safety construction plan and organize experts for certification as required, and arbitrarily adopted a vertical excavation method. The excavation slope did not meet the stability requirements of the foundation pit, resulting in excessive slope bearing capacity and unstable soil layer collapse." is the text that has completed manual screening.

[0052] Step 3: Complete the preprocessing of this article: perform word segmentation on the target text to achieve Chinese word segmentation and part-of-speech tagging; manually fill in the subject when a sentence in a text paragraph directly starts with a core verb or the subject appears repeatedly in the same paragraph; manually adjust the inaccurate word segmentation results caused by professional terms, abbreviations and special writing methods;

[0053] In one embodiment, the PaddlePaddle word segmentation function is used to perform word segmentation on the target text to achieve Chinese word segmentation and part-of-speech tagging. The part-of-speech tagging is shown in Table 1.

[0054] Table 1 Part-of-speech tagging example table

[0055]

[0056]

[0057]

[0058] In one embodiment, inaccurate word segmentation results caused by professional terms, abbreviations and special writing methods are solved by manually adding a custom dictionary.

[0059] Step 4: Combine the parts of speech of each word in the target text, analyze the dependency relationship between words in the sentence, and combine the analysis of the accident formation mechanism and accident characteristics to extract knowledge triples from the preprocessed text and generate a dependency syntax list;

[0060] In one embodiment, the dependency relationship between words in a sentence is analyzed using the dependency syntactic analysis function of PaddleNLP.

[0061] Step 5: Follow the following rules to increase the completeness of the extracted knowledge triples:

[0062] (1) For other components in the sentence, including attributives, adverbials, and object complements, complete the entity content as follows:

[0063] 1) When the subject and object in the sentence are modified by attributives, and there are multiple attributive complements before the object, add attributives for modification when extracting triples. The specific idea is:

[0064] S1.1, determine whether there is a word B that has a definite relationship with the entity A to be extracted. If so, add all the words B that have a definite relationship with the entity A to be extracted to the list L in ascending order of the sentence word numbers; traverse the list L in reverse order, and if there is still a word C in the word B that has a definite relationship with A, recursively call step S1.1;

[0065] S1.2, in the order of traversing the list L in reverse order, concatenate the word C with the entity A to complete the attributive completion of the entity;

[0066] In one embodiment, in the sentence "The dump truck driven by Wang Yun overturned into a foundation pit about 4 meters deep that had been dug", both the subject and the object are modified by attributives, and there are multiple attributive complements before the object. When extracting triples, adding attributives for modification makes the triple information expression more complete: <dump truck, overturned into, about 4 meters deep foundation pit>.

[0067] 2) When the sentence has only a subject-predicate-object structure, the subject of the sentence is taken as the subject, the core verb of the predicate is taken as the entity relationship, and the object is taken as the object of the knowledge triple. The specific idea is:

[0068] S2.1. Determine whether there is a word B that has a verb-object relationship with entity A or a word C that has a subject-predicate relationship with entity A;

[0069] S2.2, if there is a word B that has a subject-object relationship with entity A, then determine whether there is a word D that has a subject-object relationship with word B, if so, return to step S2.1, otherwise word B and entity A form an entity;

[0070] If there is a word C that has a subject-predicate relationship with entity A, then determine whether there is a word D that has a subject-predicate relationship with word C. If so, return to step S2.1; otherwise, word C and entity A form an entity.

[0071] In one embodiment, in the sentence "Worker A received an order to dismantle the support device", the entity "dismantle" is a verb, and has a subject-object relationship with the word "device". "Dismantle the support device" is a verb phrase as an entity, so the extracted triples are <Worker A, receives, order>, <Worker A, is responsible for, dismantling the support device>.

[0072] (2) When the sentence is a parallel structure, the knowledge triples are divided into two different cases: when the sentence is a predicate parallel structure and when the sentence is a subject or object parallel structure:

[0073] 1) When the sentence is a predicate parallel structure: determine whether the verb E that has a parallel structure with the core verb has a subject-predicate structure or a verb-object structure with other words. If there is a subject-predicate structure, verb E and the core verb have a common object; if there is a verb-object structure, verb E and the core verb have a common subject;

[0074] In one embodiment, in the sentence "The construction unit has not obtained a construction permit, has not determined the engineering supervision unit, and has not handled the construction project safety supervision procedures", the core verb is "obtain", and the verbs "determine" and "handle" are parallel structures with the core verb. The core verb and its parallel verb have a subject-predicate relationship with "construction unit", but the object is not the same. Therefore, the triple extraction result of the above sentence is: <construction unit, has not obtained, construction permit>, <construction unit, has not determined, engineering supervision unit>, <construction unit, has not handled, construction project safety supervision procedures>.

[0075] 2) When the sentence is a subject or object parallel structure: determine the word E that has a subject-predicate relationship with the core verb and the word F that has a verb-object relationship with the core verb; if the word G and E form a parallel relationship, then G in the sentence has a subject-predicate relationship with the core word, and the extracted triples have the same object; if the word G and F form a parallel relationship, then the core verb in the sentence has a verb-object relationship with G, and the extracted triples have the same subject.

[0076] In one embodiment, in the sentence "The construction unit did not strictly carry out construction, slope cutting, and support in accordance with the revised deep foundation pit support design and expert review opinions", the core verb is "construct", and "slope cutting", "support" and the word "construct" are in a parallel structure. The word "construction" and the core verb "construct" are in a predicate-object structure, and are in a subject-predicate structure with the phrase "construction unit". Therefore, the extracted triples are: <The construction unit did not strictly carry out construction in accordance with the revised deep foundation pit support design and expert review opinions>, <The construction unit did not strictly carry out slope cutting in accordance with the revised deep foundation pit support design and expert review opinions>, <The construction unit did not strictly carry out support in accordance with the revised deep foundation pit support design and expert review opinions>.

[0077] (3) When the sentence is a subject-predicate-preposition-object structure, the subject of the sentence is taken as the subject, the core verb of the predicate and its complement preposition together form an entity relationship, and the preposition is taken as the object of the knowledge triple;

[0078] In one embodiment, in the sentence "the slope should be maintained within the specified standards", the core verb is "maintain", the subject is "slope", the core verb "maintain" and the word "in" have a verb-complement structure, and "in" and the object "in" have a preposition-object structure, so the triple extraction result of the above sentence is: <slope, maintained within, standards>.

[0079] Step 6: Define the framework for the semantic meaning and constraints of entities, relations and attributes in knowledge triples;

[0080] The constructed framework sets 5 tags, including: "Title" tag, "Location" tag, "Event" tag, "Entity" tag, and "Other" tag;

[0081] Among them, the "Title" tag represents the title of the accident text case, covering basic information such as time and place, and is used for quick retrieval and summarization; the "Location" tag represents the specific location where the foundation pit accident occurred, and is used to quickly determine the type of accident and conduct detailed classification; the "Event" is an event / event set tag, which is a certain event or a collection of a certain type of events that occurred in the foundation pit accident; the "Entity" is an entity tag, representing the noun part involved in the event chain, which is the subject or object of the "Event" tag; the "Other" tag has little to do with the accident behavior subject chain and serves as a logical connection part.

[0082] Since causality is the main logical connection in accident events, in order to facilitate the induction, summary and retrieval of the knowledge graph of foundation pit construction accident events, only the labels with accident causal factors are connected with "leading to".

[0083] Step 7: Use the CREATE command in the Cypher statement to import the extracted triple data into the Neo4j database, and output the knowledge graph of foundation pit construction accident events;

[0084] In one embodiment, the following processed and extracted triples are taken as an example: (Song and Su heard shouting from the direction of the foundation pit); (Song and Su found that the southern part of the foundation pit had collapsed); (Song and Su found that three workers who were cleaning the loose soil at the bottom were buried); (The three buried workers died after being sent to the hospital by 120 for rescue); (The construction unit did not prepare a special safety construction plan in accordance with regulations); (The construction unit did not organize experts to conduct certification); (The construction unit adopted the vertical excavation method without authorization); (The excavation slope did not meet the stability requirements of the foundation pit); (The soil layer collapsed);

[0085] By using the CREATE command in the following Cypher statement to create a node in Neo4j, you can output an event knowledge graph with a clear development chain:

[0086] CREATE(t1:Title{name:"Collapse accident of Taizhou Hengyuan New Building Materials Machinery Co., Ltd."})

[0087] CREATE(e1:Event{name:"Soil instability"})

[0088] CREATE(e2:Event{name:"collapse occurs"})

[0089] CREATE(loc1:location{name:"South of the foundation pit"})

[0090] CREATE(e3:Event{name:"Buried"})

[0091] CREATE(E1:Entity{name:"Workers cleaning up loose soil"})

[0092] CREATE(o1:other{name:"Song and Su heard shouting"})

[0093] CREATE(o2:other{name:"Song Moujin and Su Moujin ran over to check"})

[0094] CREATE(e4:Event{name:"The southern part of the foundation pit has collapsed"})

[0095] CREATE(e5:Event{name:"Sent to hospital via 120"})

[0096] CREATE(e6:Event{name:"Rescue failed"})

[0097] CREATE(e7:Event{name:"death"})

[0098] CREATE(E2:Entity{name:"Slope"})

[0099] CREATE(E3:Entity{name:"Construction Unit"})

[0100] CREATE(E4:Entity{name:"Safety Special Construction Plan"})

[0101] CREATE(E6:Entity{name:"Expert Certification"})

[0102] CREATE(E7:Entity{name:"Vertical excavation method"})

[0103] CREATE(E8:Entity{name:"Excavation slope"})

[0104] CREATE(E9:Entity{name:"Foundation pit stability requirements"})

[0105] CREATE(t1)-[:Accident Details]->(e1)

[0106] CREATE(e1)-[:PRECEDES]->(e2)

[0107] CREATE(e2)-[:loc]->(loc1)

[0108] CREATE(e2)-[:PRECEDES]->(E1)

[0109] CREATE(E1)-[:PRECEDES]->(e3)

[0110] CREATE(e3)-[:PRECEDES]->(o1)

[0111] CREATE(o1)-[:PRECEDES]->(o2)

[0112] CREATE(o2)-[:PRECEDES]->(e4)

[0113] CREATE(e3)-[:PRECEDES]->(e5)

[0114] CREATE(e5)-[:PRECEDES]->(e6)

[0115] CREATE(e6)-[:PRECEDES]->(e7)

[0116] CREATE(E2)-[:Excessive load]->(e1)

[0117] CREATE(E3)-[:Not compiled according to regulations]->(E4)

[0118] CREATE(E3)-[:unorganized]->(E6)

[0119] CREATE(E3)-[:Unauthorized Use]->(E7)

[0120] CREATE(E7)-[:result]->(E8)

[0121] CREATE(E8)-[:Not satisfied]->(E9)

[0122] CREATE(E4)-[:results]->(e1)

[0123] CREATE(E6)-[:result]->(e1)

[0124] CREATE(E9)-[:result]->(e1)

[0125] WITH*

[0126] MATCH(n)RETURN n

[0127] By analyzing accident reports and mining text features, the key attributes and relationships of accident elements are identified, thereby constructing a knowledge graph of foundation pit construction accident events. Figure 2 It is a knowledge graph display diagram of foundation pit construction accidents, which shows the complex relationships and influences between construction processes, equipment, materials, personnel, etc. from a comprehensive perspective, forming a "construction safety accident portrait".

[0128] Step 8: Use the query function of the knowledge graph to retrieve construction accident information of the required type, time range or area;

[0129] In one embodiment, taking the retrieval of the relationship "cause" in the knowledge graph as an example, different accident cases can be compared and analyzed to identify common causes and patterns of accidents.

[0130] Type the following statement in the Cypher statement to query the elements that caused the accident in the form of a graph.

[0131] MATCH p=()-[r:`results`]->()

[0132] RETURN p

[0133] like Figure 3 As shown in the figure, this is a retrieval display diagram of the "cause" relationship in the knowledge graph, which reveals the root cause of the accident with a visual effect, helping decision makers and practitioners to better understand and prevent similar accidents.

[0134] The preferred embodiments of the present application disclosed above are only used to help understand the present invention and its core ideas. For those skilled in the art, according to the ideas of the present invention, there will be changes in specific application scenarios and implementation operations, and this specification should not be interpreted as limiting the present invention. The present invention is only limited by the claims and their full scope and equivalents.

Claims

1. A method for constructing a knowledge graph of foundation pit construction accident events based on text mining, characterized in that: The steps include: Step 1: Obtain foundation pit construction accident report; Step 2: Manually screen the text, retain the summary of the time and place of the accident, the nature of the accident and the accident loss in the foundation pit construction accident report, intercept the content of the accident process, emergency response analysis and accident cause analysis, delete the rest of the content, and obtain the target text; Step 3: Complete the preprocessing of this article: perform word segmentation on the target text to achieve Chinese word segmentation and part-of-speech tagging; manually fill in the subject when a sentence in a text paragraph directly starts with a core verb or the subject appears repeatedly in the same paragraph; manually adjust the inaccurate word segmentation results; Step 4: Combine the parts of speech of each word in the target text, analyze the dependency relationship between words in the sentence, and combine the analysis of the accident formation mechanism and accident characteristics to extract knowledge triples from the preprocessed text and generate a dependency syntax list; Step 5: Increase the completeness of the extracted knowledge triples; Step 6: Define the framework for the semantic meaning and constraints of entities, relations and attributes in knowledge triples; Step 7: Import the extracted triplet data into the graph database, and output the knowledge graph of foundation pit construction accident events; Step 8: Use the query function of the knowledge graph to retrieve construction accident information of the required type, time range, or area.

2. The method for constructing a knowledge graph of foundation pit construction accident events based on text mining according to claim 1, characterized in that: In step 5, follow the following rules to increase the completeness of the extracted knowledge triples: (1) Completing the entity content with respect to other components in the sentence, including attributives, adverbials, and object complements; (2) When the sentence is a parallel structure, the knowledge triples are divided into two different cases: when the sentence is a predicate parallel structure and when the sentence is a subject or object parallel structure; (3) When the sentence is a subject-predicate-preposition-object structure, the subject of the sentence is taken as the subject, the core verb of the predicate and its complement preposition together form an entity relationship, and the preposition is taken as the object of the knowledge triple.

3. The method for constructing a knowledge graph of foundation pit construction accident events based on text mining according to claim 2 is characterized in that: For other components in the sentence, including attributives, adverbials and object complements, complete the entity content as follows: 1) When the subject and object in the sentence are modified by attributives, and there are multiple attributive complements before the object, add attributives for modification when extracting triples. The specific idea is: S1.1, determine whether there is a word B that has a definite relationship with the entity A to be extracted. If so, add all the words B that have a definite relationship with the entity A to be extracted to the list L in ascending order of the sentence word numbers; traverse the list L in reverse order, and if there is still a word C in the word B that has a definite relationship with A, recursively call step S1.1; S1.2, in the order of traversing the list L in reverse order, concatenate the word C with the entity A to complete the attributive completion of the entity; 2) When the sentence has only a subject-predicate-object structure, the subject of the sentence is taken as the subject, the core verb of the predicate is taken as the entity relationship, and the object is taken as the object of the knowledge triple. The specific idea is: S2.

1. Determine whether there is a word B that has a verb-object relationship with entity A or a word C that has a subject-predicate relationship with entity A; S2.2, if there is a word B that has a subject-object relationship with entity A, then determine whether there is a word D that has a subject-object relationship with word B, if so, return to step S2.1, otherwise word B and entity A form an entity; If there is a word C that has a subject-predicate relationship with entity A, then determine whether there is a word D that has a subject-predicate relationship with word C. If so, return to step S2.1; otherwise, word C and entity A form an entity.

4. The method for constructing a knowledge graph of foundation pit construction accident events based on text mining according to claim 2 is characterized in that: When the sentence is a parallel structure, it is handled in the following two cases: 1) When the sentence is a predicate parallel structure: determine whether the verb E that has a parallel structure with the core verb has a subject-predicate structure or a verb-object structure with other words. If there is a subject-predicate structure, verb E and the core verb have a common object; if there is a verb-object structure, verb E and the core verb have a common subject; 2) When the sentence is a subject or object parallel structure: determine the word E that has a subject-predicate relationship with the core verb and the word F that has a verb-object relationship with the core verb; if the word G and E form a parallel relationship, then G in the sentence has a subject-predicate relationship with the core word, and the extracted triples have the same object; if the word G and F form a parallel relationship, then the core verb in the sentence has a verb-object relationship with G, and the extracted triples have the same subject.

5. The method for constructing a knowledge graph of foundation pit construction accident events based on text mining according to claim 1 is characterized in that: In step 6, the constructed framework sets 5 tags, including: "Title" tag, "Location" tag, "Event" tag, "Entity" tag, and "Other" tag; Among them, the "Title" tag represents the title of the accident text case, covering basic information such as time and place, and is used for quick retrieval and summarization; the "Location" tag represents the specific location where the foundation pit accident occurred, and is used to quickly determine the type of accident and conduct detailed classification; the "Event" is an event / event set tag, which is a collection of a certain event or a certain type of event that occurred in the foundation pit accident; the "Entity" is an entity tag, representing the noun part involved in the event chain, which is the subject or object of the "Event" tag; the "Other" tag has little to do with the accident behavior subject chain and serves as a logical connection part.

6. The method for constructing a knowledge graph of foundation pit construction accident events based on text mining according to claim 1, characterized in that: In step three, use the PaddlePaddle word segmentation function to segment the target text and implement Chinese word segmentation and part-of-speech tagging.

7. The method for constructing a knowledge graph of foundation pit construction accident events based on text mining according to claim 1, characterized in that: In step 3, the inaccurate segmentation results caused by professional terms, abbreviations and special writing methods are manually adjusted; Inaccurate word segmentation results caused by professional terms, abbreviations and special writing methods are solved by manually adding custom dictionaries.

8. The method for constructing a knowledge graph of foundation pit construction accident events based on text mining according to claim 1, characterized in that: In step one, framework crawler technology is used to obtain foundation pit construction accident reports from websites, including government websites at all levels, emergency management websites, and websites of relevant agencies such as the Ministry of Housing and Urban-Rural Development.

9. The method for constructing a knowledge graph of foundation pit construction accident events based on text mining according to claim 1, characterized in that: In step 4, use the dependency syntactic analysis function of PaddleNLP to analyze the dependency relationship between words in the sentence.

10. The method for constructing a knowledge graph of foundation pit construction accidents based on text mining according to claim 1, characterized in that: In step seven, the extracted triple data is imported into the Neo4j database using the CREATE command in the Cypher statement, and the knowledge graph of foundation pit construction accident events is output.

Citation Information

Patent Citations

  • Knowledge graph construction method based on disaster scene

    CN109992672A

Cited By

  • Navigation accident analysis method and device, computer equipment and storage medium

    CN120994793A

  • A shipping accident analysis method and device, computer equipment and storage medium

    CN120994793B