Urban infrastructure safety supervision map construction method and system based on large model
By building a knowledge graph for urban infrastructure safety supervision based on a large language model, the problem of insufficient accuracy and flexibility of knowledge graph construction in the existing technology is solved, and the recommendation of intelligent discovery of violation clues and regulatory basis is realized, and the city is improved Infrastructure safety supervision capabilities.
Patent Information
- Application Number
- CN202410925508.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-11-12
AI Technical Summary
In the safety supervision of urban infrastructure, the accuracy and flexibility of knowledge graph construction are insufficient, making it difficult to effectively discover clues of violations and provide regulatory basis.
Using a method based on a large language model, obtain urban infrastructure information, extract entity sets and regulatory entries, build a knowledge graph for urban infrastructure safety supervision, and combine accident cases to build an accident knowledge graph, integrate it to form a safety supervision knowledge graph, and deeply explore potential Risk points and violation patterns.
It has improved the decision-making capabilities of regulatory units, provided intelligent recommendation services, supported the improvement of urban infrastructure safety supervision capabilities, and ensured the punishment plan and legal basis for emergencies.
Smart Images

Figure CN118939810A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of urban safety supervision and relates to urban infrastructure safety supervision technology, specifically to a method and system for constructing an urban infrastructure safety supervision map based on a large model. Background Art
[0002] The patent for a method and device for constructing a knowledge graph of important Internet infrastructure, currently with a publication number of CN202111035360.1, extracts knowledge based on an ontology model of important Internet infrastructure using preset extraction rules, and uses the Neo4j graph database to form a knowledge graph of important Internet infrastructure. The rules used in this method are preset rules, and the algorithm rules have low flexibility when running, and conflicts are prone to occur between rules, making it difficult to directly locate and troubleshoot the cause of the problem. In addition, the patent for a method, system, and device for determining an emergency knowledge graph for urban municipal infrastructure (CN202310044599.8) extracts emergency text data of urban municipal infrastructure, constructs an entity recognition model based on emergency entities, and then constructs an emergency knowledge graph model for urban municipal infrastructure. This patent is mainly aimed at the construction of an emergency system for urban municipal infrastructure, and the content is relatively one-sided. In addition, the accuracy of the knowledge graph construction system has not been verified, and the accuracy may not be high.
[0003] Based on this, the present invention proposes a method and system for constructing a city infrastructure safety supervision map based on a large model, aiming to provide intelligent discovery of violation clues and intelligent recommendation services such as supervision basis, penalty benchmarks, typical cases, etc. for the operation and management of urban infrastructure lifeline projects, thereby improving the decision-making ability of supervision units. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a method and system for constructing a safety supervision map of urban infrastructure based on a large model.
[0005] To achieve the above-mentioned purpose, the method for constructing a large-scale model-based urban infrastructure safety supervision map of the present invention comprises the following steps:
[0006] S1. Acquire urban infrastructure information for safety supervision; and extract an entity set for urban infrastructure safety supervision based on the urban infrastructure information;
[0007] S2. Based on the entity set, extract the regulatory items to form a regulatory item set, and use the large language model to extract the entities in the regulatory entity set in the specific content of the regulatory items and the attributes and relationships of the corresponding associated entities, and build a knowledge graph of urban infrastructure safety regulatory regulations based on the conditional knowledge graph data model;
[0008] S3. Based on the entity set, extract typical accident case information of urban infrastructure to form an accident case set, decompose each accident case in the accident case set based on the large language model, extract the known urban infrastructure supervision entities in the accident case and the attributes and relationships of their corresponding related entities, and construct a knowledge graph of urban infrastructure safety supervision accidents based on accident cases;
[0009] S4. Integrate the regulatory knowledge graph and the accident knowledge graph to construct a large-model-based urban infrastructure safety supervision knowledge graph.
[0010] Preferably, S1 comprises the following steps:
[0011] S101. Based on the human, machine, environment and management elements of urban infrastructure safety supervision, obtain urban infrastructure information for safety supervision, extract urban infrastructure safety supervision entities according to the composition types, application forms, basic structures and ancillary facilities of urban infrastructure and the types of personnel involved, and construct an initial entity set for urban infrastructure safety supervision;
[0012] S102. Based on the initial urban infrastructure safety supervision entity set, a large language model is used to obtain the normative information of related laws and policies, and the standard terms and their explanation texts in the normative information are analyzed to obtain the standard terms related to the supervision entities, and the relevant standard terms are used to update the initial safety supervision entity set. After aggregation analysis, an entity set for urban infrastructure safety supervision is finally formed.
[0013] Preferably, in S1, based on various factors such as people, machines, environment, and management, urban infrastructure entities used for safety supervision in legal regulations are extracted;
[0014] The method comprises:
[0015] Based on the human, machine, environment, and management elements of urban infrastructure safety supervision, the initial urban infrastructure supervision entity set is constructed from the aspects of urban infrastructure composition, application form, basic structure and ancillary facilities, and types of personnel involved.
[0016] Preferably, the S2 comprises the following steps: S201, based on the entity set, the extracted regulatory items include the legal regulation name, item number and the legal regulation text information contained in the item, and the legal regulation text contained in the item is named by the legal regulation name + item number to form a regulatory item set;
[0017] S202. Based on the set of regulatory items, a large language model is used to extract the attributes and relationships of the safety supervision entities and their corresponding related entities in each item text sample, and a conditional knowledge graph data model is used to construct a knowledge graph of urban infrastructure safety supervision regulations.
[0018] Preferably, the S201 includes: extracting the name of the regulation: extracting the name of the legal regulation by using a regular expression or a preset format text form;
[0019] Extracting regulatory item numbers: Using regular expressions, text reverse analysis, and preset text formats to extract item numbers;
[0020] Extracting text fragments from regulatory entries: Using preset text formats and forward and reverse text analysis to extract text fragments from entries and build a sample library of regulatory entry texts;
[0021] Forming a set of regulatory entries: Use "regulation name + entry number" to name the extracted entry text samples to form a set of regulatory entries.
[0022] Preferably, the S202 includes: determining the number of samples in each set: randomly selecting a certain number of regulatory entry text samples as a training set, an alternative set, a test set, and a validation set;
[0023] Data preprocessing: Preprocess the text samples of regulatory items in the training set. Data preprocessing includes data cleaning, sentence segmentation, and word segmentation.
[0024] Constructing a vocabulary: Constructing a vocabulary based on the vocabulary obtained after preprocessing the text samples of the regulatory entries in the training set, and evaluating the effectiveness of the training set samples by counting the word frequencies, and using the alternative set to update unreasonable training set samples;
[0025] Annotated dataset: Use the big model to extract the attributes and relationships of safety regulatory entities and their corresponding related entities in the pre-processed regulatory entry text samples, and annotate the dataset based on the vocabulary;
[0026] Expand the training set: Use the masked language model to randomly mask the text samples of regulatory entries. According to the principle that when the masked words are mutually exclusive in terms of part of speech, one of them must be retained, and when the words are special, the front and back participles are not masked, the number of training sets is expanded;
[0027] Model training and testing: Use the existing large language model to train the expanded training set of regulatory text samples, and use the test set for evaluation, and adjust the training set based on the evaluation results;
[0028] Model verification: Use the trained large language model to verify on the verification set, and use text similarity to analyze the similarity between the output attributes and relationships of the verification set and the initial annotation labels. Perform cyclic training based on the similarity results to improve model accuracy.
[0029] Extract entities, attributes, and relationships from text through post-processing and decoding operations;
[0030] Knowledge graph drawing: Use the conditional knowledge graph data model to build a knowledge graph of urban infrastructure safety supervision regulations.
[0031] Preferably, S3 comprises the following steps:
[0032] S301. Construct a case library of urban infrastructure safety accidents; use the big model to obtain typical accident and penalty case texts, evaluate the relevance of accident texts with safety supervision entities, extract accident report names to name accident texts, and construct a case library of urban infrastructure safety accidents;
[0033] S302. Extract the attributes and relationships of known safety supervision entities and accidents in the accident report, where the attributes include basic accident information, accident damage type, accident damage consequences, emergency response measures, violation type, violation of regulations, penalties, accident lessons, etc.
[0034] S303. Draw a knowledge map of urban infrastructure safety supervision accidents.
[0035] Preferably, the S4 includes S401, construction of a city infrastructure safety accident case library; S402, extraction of entities, attributes, conditions and relationships based on accident safety supervision entities; and S403, drawing an accident knowledge graph for city infrastructure safety supervision.
[0036] Preferably, based on the urban infrastructure safety supervision entity, the regulatory knowledge graph and the accident knowledge graph are integrated.
[0037] Another aspect of the present invention provides a system constructed by the above method, which is used for application in combination with actual urban infrastructure safety supervision needs;
[0038] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention analyzes the legal system, policy standards, and urban infrastructure safety supervision related to the large language model, proposes a method for extracting urban infrastructure entities, and constructs a safety law knowledge graph; by analyzing typical accidents and disposal cases involved in urban infrastructure safety supervision, a safety accident knowledge graph is constructed; by integrating the safety law knowledge graph and the safety accident knowledge graph, an urban infrastructure safety supervision knowledge graph is formed. The knowledge graph can be used to deeply explore the potential risk points and violation behavior patterns in the process of urban infrastructure safety supervision, provide auxiliary analysis such as punishment schemes, legal basis for illegal behavior, intelligent recommendation of disposal cases, and automatic accident investigation reports for emergency handling, and support the improvement of urban infrastructure safety supervision capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A schematic diagram of a process for constructing a large-scale model-based urban infrastructure safety supervision map according to an embodiment of the present application;
[0041] Figure 2 A schematic diagram showing a gas safety supervision entity part provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of a dynamic update process of an entity set provided in an embodiment of the present application;
[0043] Figure 4 A schematic diagram of the gas pipeline attribute word annotation part provided in the embodiment of the present application;
[0044] Figure 5 A schematic diagram of the relationship between legal normative entities and attributes provided in the embodiment of the present application;
[0045] Figure 6 A schematic diagram of an example of a knowledge graph of urban infrastructure safety supervision regulations provided in an embodiment of the present application;
[0046] Figure 7 A schematic diagram of the general form of the name of the accident investigation report provided in an embodiment of the present application;
[0047] Figure 8 A schematic diagram of an example of a knowledge graph for urban infrastructure safety supervision accidents provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] See also Figure 1-Figure 8 , the first aspect of the present invention provides a method for constructing a city infrastructure safety supervision map based on a large model, comprising the following steps: S1, obtaining city infrastructure information for safety supervision; and extracting an entity set of city infrastructure safety supervision based on the city infrastructure information;
[0050] S2. Based on the entity set, extract the regulatory items to form a regulatory item set, and use the large language model to extract the safety supervision entities in the specific content of the regulatory items and the attributes and relationships of the corresponding related entities, and build a knowledge graph of urban infrastructure safety supervision regulations based on the conditional knowledge graph data model;
[0051] S3. Based on the entity set, extract typical accident case information of urban infrastructure to form an accident case set, decompose the content of each accident case in the accident case set based on the large language model, extract the known urban infrastructure entities in the accident case and the attributes and relationships of their corresponding related entities, and construct a knowledge graph of urban infrastructure safety supervision accidents based on accident cases;
[0052] S4. Integrate the regulatory knowledge graph and the accident knowledge graph to construct a large-model-based urban infrastructure safety supervision knowledge graph.
[0053] In an exemplary embodiment, the urban infrastructure safety supervision entity set is constructed based on legal norms (1) constructing an initial urban infrastructure safety supervision entity set
[0054] Types of urban infrastructure include: transportation facilities (roads, bridges, rail transit, etc.), energy facilities (electricity, gas, etc.), water conservancy facilities (water supply, drainage, etc.), information facilities (communications, radio and television, etc.), and disaster prevention facilities (fire protection, earthquake prevention, ground subsidence prevention, etc.).
[0055] According to the accident causation model of system theory, the safety supervision of urban infrastructure should consider factors such as "people, machines, environment, and management", among which each factor can be expressed as:
[0056] "People" refers to the engineering construction personnel, operation management practitioners, operation service users, safety supervision personnel, etc. of urban infrastructure; such as gas filling workers, communication facility maintenance personnel, etc.
[0057] "Machine" refers to the urban infrastructure itself and its ancillary facilities, etc., which should be subdivided into specific main facilities according to the type of urban infrastructure. It is the core of urban infrastructure safety supervision.
[0058] "Environment" refers to the surroundings of urban infrastructure, such as the surroundings of gas pipelines and subways;
[0059] "Management" refers to the owners of urban infrastructure (enterprises, units, etc.) and management measures, such as water supply groups, gas stations, bridge monitoring, etc.
[0060] Focusing on the urban infrastructure itself and its ancillary facilities, based on various factors such as people, machines, environment, and management, starting from the composition types, application forms, basic structures and ancillary facilities of urban infrastructure, and the types of personnel involved, the main information of urban infrastructure for safety supervision is obtained to form the initial urban infrastructure supervision entity set. Taking gas safety supervision as an example, Figure 2 As shown:
[0061] In an exemplary embodiment, the initial entity set is updated with the canonical terminology:
[0062] Utilize the initial urban infrastructure safety supervision entity set and use the entities therein as keywords to obtain relevant policy requirements and legal norms from announcements on the official websites of national and local administrative agencies. You can also obtain legal policies, regulations, and industry standards related to urban infrastructure from the "National Standards Full Text Disclosure System", official websites of legal publishers, and association websites. Through a preliminary review of these legal standards, extract the "terms" defined in each specification, and use a large language model to process the term text. Use pattern matching to determine whether the text contains entities in the initial entity set of urban infrastructure. If not, use the defined "standard terms" as new identification entities to update the initial entity set until the queried standard terms are repeated with existing entities in the entity set. The entity set dynamic update process is as follows: Figure 3 As shown:
[0063] The urban infrastructure safety supervision entities retained through the above process need to be aggregated by merging synonyms, hypernyms and hyponyms, parts and wholes, entities with the same attributes, etc., and combined with the types of safety supervision entities, entity relationships, entity application scenarios, etc. Figure 1 As shown in the figure, the entities are associated to finally obtain the urban infrastructure entity set.
[0064] In an exemplary embodiment, a knowledge graph of urban infrastructure safety supervision regulations is constructed based on legal norms.
[0065] (1) Extracting the set of regulatory items
[0066] The large language model parsing technology is used to further analyze the legal normative content extracted from urban infrastructure safety supervision entities, extract information such as the name of the regulation, implementation time, item number, and the legal normative text contained in the item, build a sample library of regulatory item texts, and form a set of regulatory items.
[0067] 1) Determine the content of the legal regulations to be analyzed: After matching a certain regulation with the urban infrastructure safety supervision entity, extract the entire regulation text for analysis;
[0068] 2) Extraction of regulatory names: Regular expressions can be used to match text fragments with keywords (including but not limited to "law", "regulations", "standards", etc.), and then further processed and screened to obtain the names of legal regulations.
[0069] 3) Extraction of the implementation time of the specification: Regular expressions can be used to match text fragments containing date information in the context information of the "implementation" text field, such as "yyyy-mm-dd" or "yyyy year mm month dd day".
[0070] 4) Item number extraction: After matching the specific location of the safety regulatory entity in the standard text, use regular expressions to reversely analyze the text information above it. According to the item form matching rules (such as "Article X", "X", "(X)", etc., where "X" is an uppercase number; or "Article x", "xxx", "xx", etc., where "x" is a number), the first item number that matches the item form is the item number to be extracted. The examples of legal specification names and item extraction are shown in Table 1 below:
[0071] Table 1. Examples of legal norm names and item extraction
[0072]
[0073]
[0074] 4) Extraction of item specification samples: After matching the specific location of the safety supervision entity in the specification text, use regular expressions to retrieve the legal specification text information of the safety supervision entity for forward analysis, and match the first item number that matches the item format according to the item format matching rules. The legal specification text between the item number obtained by the forward analysis of the text and the extracted item number is extracted as a legal specification item sample based on the urban infrastructure entity, and a regulatory item text sample library is constructed;
[0075] 5) The name of the extracted legal norms + the entry number obtained by reverse analysis of the entity above is used as the name of the sample of the legal norms entry to form a set of legal entries; such as "Article 1 of the Urban Gas Management Measures", "Article 1 of the Petroleum and Natural Gas Pipeline Protection Law of the People's Republic of China", etc.
[0076] 6) Abstract the implementation time as an attribute of the regulatory entry set and mark the regulatory entry set.
[0077] In an exemplary embodiment, (2) drawing a safety supervision law knowledge graph:
[0078] The big model is used to extract the attributes and relationships of urban infrastructure safety supervision entities and corresponding related entities from each legal text sample, and a legal knowledge graph for urban infrastructure safety is constructed based on the knowledge graph triple data model.
[0079] 1) Determine the number of samples in each set: Randomly select 1,000 regulatory samples from the above regulatory text sample library as the training set, select 500 as the alternative set, select 300 as the test set, and the rest as the validation set.
[0080] 2) Data preprocessing: Preprocess the text samples of regulatory items in the training set, including data cleaning and sentence segmentation. Tools such as word segmenters can be used to segment the text and map the segmented subwords to corresponding word vectors. Punctuation marks and numbers can be treated as special characters or processed separately to ensure that the original structure and context of the text are preserved during the processing.
[0081] 3) Constructing the vocabulary: Construct the vocabulary based on the vocabulary obtained after preprocessing the text samples of the regulatory entries in the training set. The vocabulary should contain all the words that appear in the data set, use text processing tools to count the word frequency, sort by word frequency, and count the words with higher frequency, so as to facilitate the evaluation of the selected training set samples. When the number of samples occupied by a high-frequency word is too high (more than 60%), remove 1 / 3 of the samples corresponding to the high-frequency word, and randomly select the same number of samples from the alternative set to complete it.
[0082] 4) Annotated dataset: Use the big model to extract the attributes and relationships of the safety supervision entities and their corresponding related entities in the text samples, and annotate the dataset based on the vocabulary;
[0083] In an exemplary embodiment, 1. Annotate entities: annotate the locations of security supervision entities and corresponding associated entities based on a vocabulary.
[0084] In the preprocessed regulatory entry text sample, the safety regulatory entity and the starting and ending positions of the corresponding associated entities are marked, and the labels of the starting and ending positions can be used to indicate the scope of the entity. For example, "B-ENTITY" can be used to indicate the starting position of the safety regulatory entity, "I-ENTITY" can be used to indicate the middle position of the safety regulatory entity, and "O" can be used to indicate the position of the non-safety regulatory entity.
[0085] 2. Labeling attributes and relationships
[0086] ① Extract attributes through part-of-speech analysis: Use the part-of-speech standardizer and part-of-speech classification results to label attributes.
[0087] In the preprocessed regulatory entry text samples, combined with the vocabulary, each word is annotated with the corresponding part of speech using a part-of-speech tagger, and the part-of-speech classification is performed. According to the attribute grammar and semantic rules of the safety regulatory entity set corresponding to the associated entity, rules are formulated to match specific entity attributes. Taking the gas pipeline as an example, if the part of speech in the text is a noun and the structural description is "diameter", "STRUCTURE" can be annotated to represent the structural attribute of the safety regulatory entity, such as Figure 4 As shown:
[0088] ② Part-of-speech analysis to extract relationships: Use the dependency parser and part-of-speech analysis results to annotate the relationship between entities and corresponding related entities, and between entities and attributes
[0089] The dependency parser is used to analyze the dependency relationship between words in the text. The relationship between entities in legal norms includes but is not limited to command relationship, authorization relationship, task relationship, imperial relationship, protection relationship, etc. If the part of speech is a verb and the description is a "prohibition" command relationship, "COMMAND" can be used to mark the relationship between the entity and the attribute. Some relationship descriptions are as follows: Figure 5 shown.
[0090] 5) Expanding the training set using masked language models
[0091] The masked language model is used to randomly mask each regulatory entry text sample, and then the masked words are predicted. At this time, the following two principles should be followed: when multiple words originally marked with special [MASK] have mutually exclusive parts of speech, at least one mutually exclusive part of speech should be retained; when the words originally marked with special [MASK] have special parts of speech, the word segmentation before and after the special part of speech should be retained without being masked. The training set is expanded to 10,000 using the above method.
[0092] 6) Model training and testing
[0093] Use existing large language models (such as the BERT model, etc.) to train the expanded legal norms sample training set text, and use the test set samples to evaluate the trained model, and calculate various indicators such as accuracy, recall, and F1 value to measure the performance of the model. If the accuracy is lower than 80%, the task model can be trained by continuing to expand the number of training sets and increase the number of iterations, etc., repeating the above steps until the accuracy exceeds 80%.
[0094] 7) Model Validation
[0095] The trained large language model is used to verify the validation set, and the text similarity is used to analyze the similarity between the output attributes and relationships of the validation set and the initial labeled labels. If the similarity is less than 80%, the model training fails, and the entry samples with lower similarity are screened and added to the training set, and the training set is retrained. After multiple cycles, the overall text similarity is not less than 80%.
[0096] 8) Extract the attributes and relationships of the security supervision entity and the corresponding related entities: Through post-processing and decoding operations, the final entity and the attribute and relationship extraction results of the corresponding related entities are obtained.
[0097] 9) Draw a knowledge map of safety supervision regulations
[0098] Based on the conditional knowledge graph data model, a safety supervision law knowledge graph is drawn. Figure 6 As shown, diamond nodes are used to represent the relationship between entities, and round nodes represent the relationship between fact triples (blue dotted lines) and condition triples (red dotted lines) under conditional constraints.
[0099] In an exemplary embodiment, a knowledge graph of urban infrastructure safety supervision accidents is constructed based on typical accidents and penalty cases:
[0100] (1) Construction of a case database of urban infrastructure safety accidents
[0101] 1) Get the accident text
[0102] Based on the physical safety supervision entity of urban infrastructure, the entity corresponds to the form of damage, such as gas leakage, bridge collapse, water supply pipe burst, etc., and the physical damage corresponds to the form of disaster, such as combustion, explosion, collapse, fire, etc., and the accident investigation report is superimposed as a keyword for retrieval. Accident handling report information related to urban infrastructure can be obtained from channels such as the websites of emergency departments of governments at all levels, news media, academic research institutions, etc.
[0103] 2) Evaluate the relevance of accident text to safety regulatory entities
[0104] After obtaining each accident report, evaluate the relevance of the accident report content to the urban infrastructure safety supervision entity, and use the urban infrastructure safety supervision entity as a keyword to search in the report text. If the frequency of occurrence is less than 10 times, it means that the text is not highly correlated with the urban infrastructure entity, and the accident report text can be removed.
[0105] 3) Naming of accident text
[0106] After obtaining each accident report, the accident report name is extracted to name the accident text content and build an urban infrastructure safety accident case library. The accident report name extraction method is as follows:
[0107] The name of the accident report is relatively common, and the general form is as follows Figure 7 As shown. The accident names are extracted using the large language model in the form of the figure below, where keywords such as "date", "urban infrastructure entity", and "accident investigation report" are essential items in the accident names. After the accident name is extracted, the text information of the corresponding accident report is named with the name. The text information contained in all accident names constitutes the accident report sample library.
[0108] (2) Extraction of attributes and relationships between security supervision entities and corresponding related entities
[0109] The content of an accident report generally includes seven parts: basic situation, cause of the accident (direct and indirect), accident-related situation (including but not limited to emergency response, relevant units, infrastructure entities, etc.), major issues, handling suggestions, accident lessons, and preventive measures. After obtaining an accident report sample, refer to the entity, attribute, and relationship extraction methods in "2.1.3 Constructing a knowledge graph of urban infrastructure safety supervision regulations based on a large language model", and based on the large language model combined with "title recognition + keyword" text parsing and other methods, extract the various parts of the information contained in the report in different categories for subsequent analysis. At the same time, use the large language model to analyze the contents of each part of the accident report sample text and extract the corresponding attributes and relationships of the corresponding related entities.
[0110] 1) Analysis of basic accident situations: Analyze the text content of the basic situation and extract attributes and relationship information related to the accident, such as the date of occurrence, location, type of accident consequences (such as leakage, explosion, fire, etc.), and entities responsible for safety supervision of urban infrastructure in the accident.
[0111] 2) Analysis of accident causes (direct and indirect): Analyze the text content of the accident causes (direct and indirect), and extract the damage type attributes (such as corrosion and aging, construction, natural disasters, etc.) and relationship information related to the urban infrastructure safety supervision entities (referring to entities such as "machine" and "environment") in the accident.
[0112] 3) Analysis of accident-related situations: parse the accident-related situation text, extract the basic attributes and relationship information such as structure and status related to the urban infrastructure safety supervision entities in the accident (referring to entities such as "machine" and "environment"), extract the attributes and relationship information of the damage consequences such as injured persons, deaths, and economic losses in the accident; extract the attribute information such as project construction and emergency response measures related to the infrastructure supervision entities (referring to entities such as "people" and "management").
[0113] 4) Main issues: By analyzing the main issue text, the illegal items (or illegal behaviors) of the urban infrastructure safety supervision entities in the accident, the names of the violated legal provisions and the item numbers and other attributes and relationship information are extracted, and the entities, attributes, relationships, etc. of the illegal items are further extracted.
[0114] 5) Processing suggestions: Analyze the text of the processing suggestions and extract the attributes and relationship information such as the violation type and penalty type (including but not limited to fines, detention, etc.) of the safety supervision entity.
[0115] 6) Lessons from accidents: Analyze the text of lessons from accidents and further extract the attributes and relationship information such as violations (or illegal behaviors) related to the urban infrastructure safety supervision entity.
[0116] 7) Preventive measures: Analyze the preventive measures text and extract the attributes and relationship information such as preventive measures related to this type of accident.
[0117] (3) Draw a knowledge map of urban infrastructure safety supervision accidents
[0118] Sorting out the entities, attributes, and relationships extracted from each accident report in the above steps, referring to the method of "2.1.3 Constructing a knowledge graph of urban infrastructure safety supervision regulations based on a large language model", a knowledge graph of urban infrastructure safety supervision accidents based on typical accidents and penalty cases is drawn. Taking an accident report as an example, the accident knowledge graph example is as follows: Figure 8 As shown:
[0119] In an exemplary embodiment, a knowledge graph of urban infrastructure safety supervision based on a large model is constructed and applied:
[0120] Based on the urban infrastructure safety supervision entity, the urban infrastructure safety supervision regulations knowledge graph based on legal norms and the urban infrastructure safety supervision accident knowledge graph based on typical accidents and penalty cases are integrated to construct an urban infrastructure safety supervision knowledge graph based on a big model.
[0121] In an exemplary embodiment, the following functions can be achieved based on the urban infrastructure safety supervision knowledge graph:
[0122] (1) Risk point identification: The structure, status and other attributes of the urban infrastructure safety supervision entity (“the facility itself”) in the accident are the risk points of urban infrastructure safety supervision. Identifying such risk points helps to identify safety supervision violations;
[0123] (2) Identification of violation behaviors: By analyzing the violation types in the knowledge graph of urban infrastructure safety supervision accidents, when similar violation types exist in urban infrastructure safety supervision entities, violations in the urban infrastructure safety supervision process can be identified;
[0124] (3) Supporting key supervision of urban infrastructure safety: By conducting statistical analysis on the urban infrastructure safety supervision entities and their structure, status and other attribute relationships in the urban infrastructure safety supervision accident knowledge graph, the attributes that appear frequently belong to the key supervision objects, providing a basis for urban infrastructure safety supervision.
[0125] (4) Statistical analysis: Frequent accidents and violations are the difficulties in the urban infrastructure safety supervision process. Based on the urban infrastructure safety supervision accident knowledge map, various types of infrastructure damage, accident types, accident consequences, violations and other factors are counted to support the improvement of urban infrastructure safety supervision capabilities;
[0126] (5) Emergency Assisted Analysis: When an emergency occurs in urban infrastructure, the corresponding accident name can be matched according to the information such as the urban infrastructure subject and its damage type and accident consequence type in the safety supervision map to achieve the recommendation of typical accident cases. Then, by identifying the violations in the safety supervision of urban infrastructure, the knowledge reference such as the penalty type and the legal basis of the violations can be provided to assist the analysis of the emergency.
[0127] (6) Automatic generation of accident investigation reports: When an emergency occurs in urban infrastructure, relevant knowledge information is extracted based on the safety accident knowledge graph, and the accident investigation report is automatically generated by referring to the contents of each component of the accident investigation report.
[0128] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A method for constructing a safety supervision map of urban infrastructure based on a large model, characterized in that: The steps include: S1. Acquire urban infrastructure information for safety supervision; and extract an entity set for urban infrastructure safety supervision based on the urban infrastructure information; S2. Based on the entity set, extract the regulatory items to form a regulatory item set, and use the large language model to extract the safety supervision entities in the specific content of the regulatory items and the attributes and relationships of the corresponding related entities, and build a knowledge graph of urban infrastructure safety supervision regulations based on the conditional knowledge graph data model; S3. Based on the entity set, extract typical accident case information of urban infrastructure to form an accident case set, decompose each accident case in the accident case set based on the large language model, extract the known urban infrastructure supervision entities in the accident case and the attributes and relationships of their corresponding related entities, and construct a knowledge graph of urban infrastructure safety supervision accidents based on accident cases; S4. Integrate the regulatory knowledge graph and the accident knowledge graph to construct a large-model-based urban infrastructure safety supervision knowledge graph.
2. The method for constructing a large-scale model-based urban infrastructure safety supervision map according to claim 1 is characterized in that: The S1 comprises the following steps: S101. Based on the human, machine, environment and management elements of urban infrastructure safety supervision, obtain urban infrastructure information for safety supervision, extract urban infrastructure safety supervision entities according to the names, types, hierarchical subordinate structures and collaborative relationships of urban infrastructure entities, and construct an initial entity set for urban infrastructure safety supervision; S102. Based on the initial urban infrastructure safety supervision entity set, use the large language model to obtain the relevant legal and policy specification information, analyze the standard terms and their explanation texts in the specification information, obtain the standard terms related to the supervision entity, and use the relevant standard terms to update the safety supervision entity set. After aggregation analysis, the entity set of urban infrastructure safety supervision is finally formed.
3. The method for constructing a large-scale model-based urban infrastructure safety supervision map according to claim 1 is characterized in that: In S1, based on the elements of man, machine, environment and management, urban infrastructure entities used for safety supervision in legal regulations are extracted; The method comprises: Based on the elements of people, machines, environment and management of urban infrastructure safety supervision, the initial urban infrastructure supervision entity set is constructed from the aspects of the composition types, application forms, basic structures and ancillary facilities of urban infrastructure and the types of personnel involved; Based on the entities in the initial urban infrastructure regulatory entity set, the relevant legal and policy regulatory information is obtained, and the large language model is used to identify and analyze the terms and texts in the regulatory information to obtain standard terms. The initial urban infrastructure entity set is updated through standard terms, and the information of urban infrastructure entities used for safety supervision is extracted from the updated urban infrastructure safety regulatory entity set, and the final urban infrastructure safety regulatory entity set is formed after aggregation analysis.
4. The method for constructing a large-scale model-based urban infrastructure safety supervision map according to claim 1 is characterized in that: The S2 comprises the following steps: S201, based on the entity set, the extracted regulatory items include the legal regulation name, item number and the legal regulation text information contained in the item, and the legal regulation text contained in the item is named by the legal regulation name + item number to form a regulatory item set; S202. Based on the set of regulatory items, a large language model is used to extract the attributes and relationships of the safety supervision entities and their corresponding related entities in each item text sample, and a conditional knowledge graph data model is used to construct a knowledge graph of urban infrastructure safety supervision regulations.
5. The method for constructing a large-scale model-based urban infrastructure safety supervision map according to claim 1 is characterized in that: The S201 includes: extracting the name of the regulation: extracting the name of the legal regulation by using a regular expression and a preset format text form; Extracting regulatory item numbers: Using regular expressions, text reverse analysis, and preset text formats to extract item numbers; Extracting text fragments from regulatory entries: Using preset text formats and forward and reverse text analysis to extract text fragments from entries and build a sample library of regulatory entry texts; Forming a set of regulatory entries: Use "regulation name + entry number" to name the extracted entry text samples to form a set of regulatory entries.
6. The method for constructing a large-scale model-based urban infrastructure safety supervision map according to claim 1 is characterized in that: The S202 includes: determining the number of samples in each set: randomly selecting a certain number of regulatory entry text samples as a training set, an alternative set, a test set, and a validation set; Data preprocessing: Preprocess the text samples of regulatory items in the training set. Data preprocessing includes data cleaning, sentence segmentation, and word segmentation. Constructing a vocabulary: Constructing a vocabulary based on the vocabulary obtained after preprocessing the text samples of the regulatory entries in the training set, and evaluating the effectiveness of the training set samples by counting the word frequencies, and using the alternative set to update unreasonable training set samples; Annotated dataset: Use the big model to extract the attributes and relationships of safety regulatory entities and their corresponding related entities in the pre-processed regulatory entry text samples, and annotate the dataset based on the vocabulary; Expand the training set: Use the masked language model to randomly mask the text samples of regulatory entries. According to the principle that when the masked words are mutually exclusive in terms of part of speech, one of them must be retained, and when the words are special, the front and back participles are not masked, the number of training sets is expanded; Model training and testing: Use the existing large language model to train the expanded training set of regulatory text samples, and use the test set for evaluation, and adjust the training set based on the evaluation results; Model verification: Use the trained large language model to verify on the verification set, and use text similarity to analyze the similarity between the output attributes and relationships of the verification set and the initial annotation labels, and perform cyclic training based on the similarity results; Extract entities, attributes, and relationships from text through post-processing and decoding operations; Knowledge graph drawing: Use the conditional knowledge graph data model to build a knowledge graph of urban infrastructure safety supervision regulations.
7. The method for constructing a large-scale model-based urban infrastructure safety supervision map according to claim 1 is characterized in that: The S3 comprises the following steps: S301. Build a case library of urban infrastructure safety accidents; use the big model to obtain typical accident and penalty case texts, evaluate the relevance of accident texts with safety supervision entities, extract accident report names to name accident texts, and build a case library of urban infrastructure safety accidents; S302, extracting the attributes and relationships of known safety supervision entities and accidents in the accident report, wherein the attributes include basic accident information, accident damage type, accident damage consequences, emergency response measures, violation type, violation of regulations, punishment and accident lessons; S303. Draw a knowledge map of urban infrastructure safety supervision accidents.
8. The method for constructing a large-scale model-based urban infrastructure safety supervision map according to claim 1 is characterized in that: The S4 includes S401, construction of a city infrastructure safety accident case library; S402, extraction of entities, attributes, conditions and relationships based on accident safety supervision entities; and S403, drawing an accident knowledge graph for city infrastructure safety supervision.
9. The method for constructing a large-scale model-based urban infrastructure safety supervision map according to claim 1 is characterized in that: Based on the urban infrastructure safety supervision entity, the regulatory knowledge graph and the accident knowledge graph are integrated.
10. A system constructed using the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Internet important infrastructure knowledge graph construction method and device
CN113507486A
Urban municipal infrastructure emergency knowledge graph determination method, system and equipment
CN116028645A
Cited By
Knowledge graph semi-automatic construction method and device for urban planning field
CN121212292A
A knowledge graph semi-automatic construction method and device for the field of urban planning
CN121212292B
