Subway operation accident knowledge graph construction method, system, terminal and storage medium
By constructing a dual self-verification mechanism based on an ontology knowledge base and a large language model in the field of subway operation accidents, the problem of professional errors in knowledge graph construction in existing technologies has been solved, achieving high-quality knowledge extraction and graph construction, and improving the reliability and practical value of subway operation accident analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DATA SPACE RES INST
- Filing Date
- 2025-11-26
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies lack a self-verification mechanism for professional domain knowledge when constructing a knowledge graph of subway operation accidents. This can lead to professional errors or inaccuracies in the extracted knowledge triples, making it impossible to fully understand and process specific domain knowledge such as professional terms and equipment systems, and thus failing to guarantee the reliability and completeness of the extraction results.
A dual self-verification mechanism of pre-event and post-event self-verification is adopted. By designing an ontology knowledge base and a large language model based on the subway operation accident dispatch log dataset, context learning and thought chain reasoning are carried out. The knowledge extraction task is decomposed into entity recognition, relationship determination and attribute extraction, and multi-dimensional verification is carried out to ensure the accuracy and reliability of the knowledge graph.
It effectively solves the problem of insufficient understanding of professional knowledge in subway operation accidents, improves the accuracy and completeness of knowledge extraction, reduces dependence on training data, and realizes dynamic updating and optimization of knowledge graph.
Smart Images

Figure CN121189452B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of urban rail transit and artificial intelligence technology, specifically to a method, system, terminal, and storage medium for constructing a knowledge graph of subway operation accidents. Background Technology
[0002] With the unbalanced and rapid growth of subway systems, their external operating environment and internal mechanisms have become increasingly complex, risky, and interconnected. Frequent malfunctions due to human error, equipment failures, harsh environments, improper operational organization, and inadequate management systems exacerbate these problems. The overlapping and compounding of risks amplifies the chain reaction of risk transmission, easily triggering a butterfly effect. This can lead to train delays, significant property damage, or even serious personal injury accidents. These malfunctions propagate in a chain along the super-networked operating lines and cascade and spread in the spatial and temporal dimensions. Ignoring the complex interconnected transmission effects between hazard sources allows potential minor malfunctions to continue to spread, easily leading to higher-level malfunctions or accidents. Furthermore, subway accidents are often complex, influenced by multiple factors. Faced with numerous and complex risk points, hazard sources, and hidden dangers at different levels (points, groups, and networks), the current single-dimensional isomorphic accident-cause network is insufficient for integrating multi-dimensional information and mining complex correlations, including the triggering conditions, spatiotemporal cascading transmission mechanisms, and risk hierarchy logic, under the complex networked operation of subway systems.
[0003] With the increasing volume and diversity of accident data, a more comprehensive and systematic approach to accident analysis is needed. Therefore, to obtain more useful information about subway accidents and explore the correlations between risk sources, it is necessary to introduce heterogeneous networks with various node and relationship types to reveal hidden information and capture meaningful potential associations between different types of accidents and risks. Knowledge graphs, as a multi-dimensional heterogeneous data structure, incorporate multiple elements such as subway accident type, risk source type, time, location, and consequences into a single model, providing a new perspective for in-depth analysis of accident risk sources and the formulation of prevention strategies.
[0004] Traditional knowledge graph construction methods lack self-verification mechanisms for domain-specific knowledge, leading to potential errors or inaccuracies in the extracted knowledge triples. Existing methods often employ a single extraction model, lacking a systematic knowledge verification process, thus failing to guarantee the reliability and completeness of the extraction results. In highly specialized fields such as subway operation accidents, existing technologies struggle to accurately understand and process domain-specific knowledge such as technical terms and equipment systems, making comprehensive quality control of the extracted knowledge impossible. Summary of the Invention
[0005] To address the technical problems existing in the prior art, this invention provides a method, system, terminal, and storage medium for constructing a knowledge graph of subway operation accidents. By designing a dual self-verification mechanism of pre-verification and post-verification, it ensures the construction of an accurate and reliable knowledge graph in the field of subway operation accidents.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] This invention discloses a method for constructing a knowledge graph of subway operation accidents, including steps S1 to S3.
[0008] S1. Based on the subway operation accident dispatch log dataset, an ontology knowledge base for the subway operation accident domain is constructed, and an example pool is constructed based on the ontology knowledge base; wherein, the ontology knowledge base defines entity types, relationship types between entities, and attribute specifications; each example in the example pool contains the original dispatch log and its standard knowledge triple mapping;
[0009] S2. Extract knowledge from unstructured scheduling logs based on an ontology knowledge base, specifically including:
[0010] A context learning mechanism is used to retrieve similar examples from the example pool to guide the large language model to perform preliminary knowledge extraction from the scheduling logs;
[0011] The knowledge extraction task is decomposed into entity recognition subtask, relation determination subtask, triple construction and attribute extraction subtask, and rule verification subtask by using the thinking chain mechanism. Through step-by-step reasoning, the initially extracted knowledge is structured and verified to generate a knowledge graph to be verified.
[0012] S3. Based on the ontology knowledge base and the large language model, the knowledge graph to be verified is subjected to multi-dimensional verification, and the final subway operation accident knowledge graph is generated based on the verified knowledge; wherein, the multi-dimensional verification includes: verifying the compliance of entities, relations and attributes in the knowledge graph in the graph rule dimension, verifying the semantic coherence between entities in the knowledge graph in the logical consistency dimension, and aligning the verified knowledge with the existing knowledge graph in the knowledge fusion dimension by entity alignment, relation alignment and attribute merging.
[0013] As a further improvement to the above scheme, in step S1, the ontology knowledge base is represented as... ;in C Represents a set of concepts. R Represents a set of relations. H A hierarchical structure representing concepts; a set of concepts. C A four-tier entity system was established, including risk points, risks, risk events, and risk incidents. Each layer of entities is subcategorized according to functional characteristics; relationship sets. RIt defines horizontal relationships, vertical affiliations, and causal relationships in the development of events; hierarchical structure. H A multi-layered conceptual system has been established, including the risk point layer, the risk layer, the risk event layer, and the risk incident layer.
[0014] As a further improvement to the above scheme, in step S2, the context learning mechanism is specifically as follows:
[0015] Several examples most similar to the scheduling log to be processed are selected from the example pool as references, and the incident descriptions of the scheduling log to be processed are transformed into standard knowledge triples in an imitation learning manner.
[0016] As a further improvement to the above scheme, in step S3,
[0017] The verification in the graph rules dimension specifically includes: checking whether the entity categories are compliant, whether the relationships between entities conform to the definition of the ontology knowledge base, and the completeness and format specifications of the necessary attributes;
[0018] Verification in the dimension of logical consistency specifically includes: checking whether the causal relationship on the event chain is reasonable, and whether there are logical conflicts between multiple attribute values of the same entity;
[0019] The verification in the knowledge fusion dimension specifically includes: performing entity alignment to identify and merge duplicate entities, performing relationship alignment to ensure the consistency of new relationships with existing relationship networks, and merging attributes based on confidence or timestamps when attribute values conflict.
[0020] As a further improvement to the above scheme, the knowledge extraction adopts an improved Transformer architecture, and processes the scheduling log text sequence through a multi-head self-attention mechanism. ; where, for each element in the text sequence The expression formula for the attention update mechanism is:
[0021] ;
[0022] In the formula, For the number of attention heads, For sequence position index; For the first Elements in size For the first in the sequence element Attention weights; For query vectors, superscript T It is the transpose symbol. For key vectors, It is a value vector; The first The query, key, and value projection matrix for each head; To output the projection matrix; For vector dimensions.
[0023] As a further improvement to the above scheme, in step S1, before constructing the ontology knowledge base, the text in the subway operation accident dispatch log dataset is preprocessed, including: removing redundant information, unifying time and number, and splitting complex text into basic semantic units.
[0024] As a further improvement to the above scheme, the knowledge graph construction method also includes:
[0025] Through the feedback mechanism, the verification results generated by multi-dimensional verification are used to continuously optimize the knowledge extraction process in step S2, and to dynamically update the ontology knowledge base and the example pool.
[0026] This invention also discloses a subway operation accident knowledge graph construction system, which applies the subway operation accident knowledge graph construction method described above; the system includes: an ontology construction module, a pre-event knowledge self-verification module, and a post-event knowledge self-verification module.
[0027] The ontology construction module is used to build an ontology knowledge base for the field of subway operation accidents based on the subway operation accident dispatch log dataset, and to build an example pool based on the ontology knowledge base; wherein, the ontology knowledge base defines entity types, relationship types between entities, and attribute specifications; each example in the example pool contains the original dispatch log and its standard knowledge triple mapping;
[0028] The pre-processing knowledge self-verification module is used to extract knowledge from unstructured scheduling logs based on an ontology knowledge base, including:
[0029] A context learning mechanism is used to retrieve similar examples from the example pool to guide the large language model to perform preliminary knowledge extraction from the scheduling logs;
[0030] The knowledge extraction task is decomposed into entity recognition subtask, relation determination subtask, triple construction and attribute extraction subtask, and rule verification subtask by using the thinking chain mechanism. Through step-by-step reasoning, the initially extracted knowledge is structured and verified to generate a knowledge graph to be verified.
[0031] The post-event knowledge self-verification module is used to perform multi-dimensional verification of the knowledge graph to be verified based on the ontology knowledge base and the large language model, and generate the final subway operation accident knowledge graph based on the verified knowledge.
[0032] The present invention also discloses a computer terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the subway operation accident knowledge graph construction method described above.
[0033] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, it implements the steps of the subway operation accident knowledge graph construction method described above.
[0034] Compared with the prior art, the beneficial effects of the present invention are:
[0035] 1. The subway operation accident knowledge graph construction method of this invention designs a pre-knowledge self-verification mechanism based on ICL and CoT. The ICL mechanism, through matching learning from a high-quality example pool, constrains the model output pattern and effectively solves the illusion problem of large model extraction caused by the diversity of professional terminology and expressions in subway operation scheduling logs. Accident handling processes typically involve multiple steps and complex causal relationships, with a large reasoning span from text to knowledge triples. The CoT mechanism, through structured reasoning steps, fully understands the accident development process and specifically provides the link method, solving the problem of direct extraction when the model processes complex text, which may result in the omission of key information or logical errors. This method can address the shortcomings of general large language models in understanding subway domain professional knowledge, thereby coping with diverse and complex scheduling log expressions and reducing the difficulty of knowledge extraction and graph construction.
[0036] 2. The post-hoc knowledge self-verification mechanism designed in this invention conducts a comprehensive evaluation from three dimensions: graph rules, logical consistency, and knowledge fusion, ensuring that newly extracted knowledge can be seamlessly integrated with the existing knowledge system. This enables the knowledge graph to continuously accumulate and optimize, enhancing the system's practical value and achieving dynamic updates and fusion of knowledge.
[0037] 3. This invention employs a knowledge self-verification method based on a large language model, achieving high-quality knowledge extraction without requiring large-scale labeled data. Through a predefined ontology library and example pool, the system can quickly adapt to new incident scenarios, significantly reducing the dependence of traditional methods on training data. Attached Figure Description
[0038] Figure 1 This is a flowchart of the method for constructing a knowledge graph of subway operation accidents in Embodiment 1 of the present invention.
[0039] Figure 2 This is a logical block diagram of the subway operation accident knowledge graph construction method in Embodiment 1 of the present invention.
[0040] Figure 3This is a flowchart of the thought chain mechanism in Embodiment 1 of the present invention (Step represents a step).
[0041] Figure 4 This is a schematic diagram of the knowledge graph of subway operation accidents in Embodiment 1 of the present invention.
[0042] Figure 5 This is a flowchart illustrating the process of validating the extraction results using a large language model in Embodiment 1 of the present invention.
[0043] Figure 6 This is a schematic diagram of the structure of the computer terminal in Embodiment 3 of the present invention. Detailed Implementation
[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] Example 1
[0046] Please see Figures 1 to 2 This embodiment provides a method for constructing a knowledge graph of subway operation accidents based on a knowledge self-verification large language model. Through a systematic knowledge extraction and verification process, it realizes the transformation from unstructured scheduling logs to a structured knowledge graph. The method includes steps S1 to S3, which are three core parts: ontology construction, pre-verification, and post-verification.
[0047] S1. Ontology Construction.
[0048] First, the input text undergoes standardization processing, including removing redundant information and standardizing formats such as time and numbering. Complex text is then broken down into basic semantic units. The system receives a scheduling log dataset. Each record Includes time information Operation type and text description For example, a specific record can be represented as ("2010-10-17 8:45", "Equipment failure", "Power supply equipment failure of Line 3 signaling system, resulting in line interruption"). The records in the preprocessed scheduling log dataset (Example 1) are shown below:
[0049] Line 1, December 11, 2023: 7:35 A sudden malfunction occurred at Xinzhuang Station's No. 1 switch, preventing it from switching to the correct position. 7:37 On-site confirmation: The switch was faulty; the signaling department was notified for emergency handling. 7:40 Due to the morning rush hour, passenger congestion on the platform rapidly increased, triggering the Level 2 large passenger flow contingency plan. 7:42-8:45 Single-sided platform operation was implemented, with passenger flow limited in the concourse and entry intervals of 12-15 minutes. 8:15 The number of passengers on the platform exceeded 2000, escalating to the Level 1 large passenger flow contingency plan. 8:20 Cross-line support was activated, with 7 additional bus services added to alleviate passenger congestion. 8:45 The switch malfunction was repaired, and dynamic testing was conducted. 8:50 The fault was resolved, and passenger evacuation on the platform began. 9:15 The large passenger flow was completely dispersed, and all contingency plans were cancelled.
[0050] During the data preprocessing stage, an ontology knowledge base is constructed based on the subway operation accident dispatch log dataset, and an example pool is built according to the ontology knowledge base. The ontology knowledge base defines entity types, relationship types between entities, and attribute specifications. Each example in the example pool contains the original dispatch log and its standard knowledge triple mapping.
[0051] In this embodiment, the ontology knowledge base can be represented as follows: .in C Represents a set of concepts. R Represents a set of relations. H Represents the hierarchical structure of concepts.
[0052] concept set C A four-layer entity system was established, including risk points, risks, risk events, and risk accidents. Risk points are categorized into personnel, equipment, environment, and management categories, as shown in Table 1. Each layer of entities is subdivided according to functional characteristics. Accidents include facility and equipment (electrical equipment failure, signal failure, communication failure, track facility failure, foreign object intrusion, vehicle failure, platform screen door failure, self-service ticketing system failure, fires of combustibles in stations and trains, elevator failure, train speeding, and unauthorized use of electrical appliances), passenger transport organization (large passenger flow, intrusion, and inadequate evacuation), public safety (arson, improper handling of dangerous goods or cigarette butts by passengers), and natural disasters (ice accumulation on rails, and extreme weather). Risks are divided into five categories: fires, public safety accidents (stampede accidents), train operation accidents (delays / suspensions, collisions, and derailments), natural disaster accidents, and facility and equipment accidents. Additional attributes such as spatiotemporal dimensions, impact level, and descriptive characteristics are also included.
[0053] Table 1: Risk Point Thesaurus (Partial)
[0054] ;
[0055] Relation setR The horizontal relationships, vertical affiliations, and causal relationships of event development are defined, as shown in Table 2.
[0056] Table 2: Entity Relationship Table
[0057] ;
[0058] Hierarchical structure H A multi-layered conceptual system has been established, including the risk point layer, the risk layer, the risk event layer, and the risk incident layer.
[0059] S2. Extract knowledge from unstructured scheduling logs to be processed based on ontology knowledge base.
[0060] Before extracting knowledge, this invention combines in-context learning (ICL) and chain-of-thought (CoT) reasoning methods to design a pre-knowledge self-verification mechanism.
[0061] A context-based learning mechanism is used to retrieve similar examples from the example pool to guide the large language model in performing preliminary knowledge extraction from the scheduling logs. In this embodiment, large language models such as Qwen, ChatGLM, or BaiChuan can be used. For example, taking Example 1 as input, the output is:
[0062] entity:
[0063] Risk points: electrical faults (equipment-related risk points), poor track bed elasticity (management-related risk points); risks: turnout faults (equipment-related risk); risk events: operation delays, train stoppages, large passenger flow at stations; risk incidents: no specific incidents in this case.
[0064] relation:
[0065] <Track switch malfunction, related to electrical fault>, <Track switch malfunction, related to poor track bed elasticity>, <Train delay, cause and effect, large passenger flow at the station>, <Train cancellation, cause and effect, large passenger flow at the station>, <Electrical fault, related to poor track bed elasticity>, <Train delay, related to track switch malfunction>, <Train cancellation, related to track switch malfunction>, <Large passenger flow at the station, related to track switch malfunction>;
[0066] property:
[0067] Time period: 2023-12-11 7:35-9:15, Location: Xinzhuang Station, Line 1, Consequences of the accident: Number of injured: 0, Number of dead: 0, Train delay: Station entry interval extended to 12-15 minutes, Facility damage: Switches broken, Passenger flow impact: More than 2,000 people stranded on the platform.
[0068] The contextual learning mechanism focuses on learning from task-related analogies. A high-quality example pool is constructed, with each example containing the original scheduling log and its standard knowledge triple mapping. In the actual extraction process, this embodiment selects 3-5 of the most similar examples as references to build an example library covering different types of faults, varying degrees of impact, and different handling procedures. Each example includes the input text and its corresponding standardized output format, including entity recognition results, relation extraction results, and attribute extraction results. ICL uses contextual learning to match the most similar cases to the input text as extraction templates to build a high-quality example pool. The system retrieves similar cases from the example library, such as "a turnout fault at a station caused operational delays" and its corresponding standardized knowledge representation. These examples tell the model which entities to focus on (turnout system, turnout fault, operational delays), which attributes to extract (time, location, equipment number, fault description), and how to map them to a predefined ontology structure.
[0069] The context learning mechanism retrieves N similar example pairs from a historical case database. As a context, it performs imitation learning and predicts test queries. Ideal entity, relation, and attribute knowledge output of scheduling logs As shown in the following formula:
[0070] ;
[0071] In the formula, For the first i Example input scheduling log template content, This provides the output entity, relation, and attribute knowledge template content for the first example. LLM (·) indicates large language model processing.
[0072] The examples serve as a guide, enabling the model to quickly identify key information in the text and perform preliminary conversion according to a predefined format.
[0073] Please see Figure 3 Next, when deeper semantic understanding and relationship construction are required, the designed reasoning mechanism based on thought chains decomposes the complex extraction task into four sub-tasks: entity recognition, relationship determination, triple construction and attribute extraction thought chains, and rule verification. This step-by-step reasoning ensures the accuracy of knowledge extraction. It helps the system establish logical connections between entities through a reasoning chain such as "If a turnout malfunctions, it may affect train traffic, leading to delays."
[0074] For example, the specific process of entity recognition is as follows, namely (1.1)-(1.4).
[0075] (1.1) Identify risk points:
[0076] Question: What infrastructure or environmental factors might be mentioned in the text that could potentially cause the problem?
[0077] Analysis: Identify the basic elements involved, such as equipment, facilities, and environment.
[0078] Result: Electrical fault (equipment-related risk point).
[0079] (1.2) Identify risks:
[0080] Question: What type of failure or problem actually occurred?
[0081] Analysis: Locate the specific fault symptoms or problem description.
[0082] Result: Turnout failure (equipment-related risk).
[0083] (1.3) Identify risk events:
[0084] Question: What specific impact did the malfunction have?
[0085] Analysis: Identify the ways in which operations are affected.
[0086] Result: Delay in execution.
[0087] (1.4) Identify risk events:
[0088] Question: Did it result in any casualties or significant losses?
[0089] Analysis: Find a description of the consequences of the accident.
[0090] Result: No specific incident occurred in this case.
[0091] The specific process for determining the relationship is as follows, namely (2.1)-(2.3).
[0092] (2.1) Determination of causality:
[0093] Question: Are there cause-and-effect relationships between the entities?
[0094] analyze:
[0095] 1. Examine whether one risk event leads to another;
[0096] 2. Check whether the risk event led to an accident.
[0097] Result: There was only one risk event in this case, and no causal relationship was found.
[0098] (2.2) Determining the category relationship:
[0099] Question: Are there any classification or subordinate relationships between the entities?
[0100] analyze:
[0101] 1. Check whether the risk event belongs to a specific risk;
[0102] 2. Check whether the risk belongs to a specific risk point.
[0103] Result: The operation delay was due to a turnout fault, and the turnout fault was due to an electrical fault.
[0104] (2.3) Determination of association:
[0105] Question: Are there parallel or related entities among similar entities?
[0106] analyze:
[0107] 1. Examine the relationships between risk points;
[0108] 2. Examine the relationships between risks.
[0109] Result: In this example, there is only one entity of each type, and there is no relationship between them.
[0110] The specific process of constructing triplets and extracting attributes is as follows, namely (3.1)-(3.2).
[0111] (3.1) Constructing triples:
[0112] Method: Based on the relationship determination results in the second step, construct the relationship for each type.
[0113] result:
[0114] 1. Risk Category: <Track switch failure, related to electrical faults>;
[0115] 2. Risk Event Category: <Operational Delay, Category: Switch Failure>.
[0116] (3.2) Attribute extraction:
[0117] Method: The system checks four attribute dimensions;
[0118] 1. Time Period: Find the specific time when the event occurred;
[0119] 2. Location: Locate the exact location where the event occurred;
[0120] 3. Consequences of the accident:
[0121] Number of injured: Statistics on casualties;
[0122] Deaths: Statistics on the number of deaths among personnel;
[0123] Train delays: Statistics on the impact on operations;
[0124] Facility damage: Record the extent of damage to equipment and facilities.
[0125] 4. Danger frequency: Determine whether it is a single event or a multiple event.
[0126] The specific process of the inspection rule is as follows, namely (4.1) to (4.3).
[0127] (4.1) Entity compliance:
[0128] Check if the entity exists in the ontology repository;
[0129] Check if the entity classification is accurate.
[0130] (4.2) Relationship Compliance:
[0131] Verify that the relation type conforms to the definition;
[0132] Confirm that the relationship direction is correct.
[0133] (4.3) Attribute compliance:
[0134] Check if the time format is standard;
[0135] Verify that the attribute values are within a reasonable range.
[0136] The output of ICL is then used as the input to the CoT inference module, prompting a message. Triggering a multi-step inference chain generates a model based on the conditional probability distribution of the prompt. The initial state After multiple steps of reasoning, it is transformed into the final knowledge representation. In real-world scenarios, this reasoning process might manifest as: entity recognition ( → Relationship determination ( → Triple construction ( → Rule verification Each step of reasoning builds upon the previous one, ensuring the logic and completeness of knowledge extraction.
[0137] The knowledge extraction in this invention employs an improved Transformer architecture, using a multi-head self-attention mechanism to process scheduling log text sequences. ; where, for each element in the text sequence The expression formula for the attention update mechanism is:
[0138] ;
[0139] In the formula, For the number of attention heads, For sequence position index; For the first Elements in size For the first in the sequence element Attention weights; For query vectors, superscript T It is the transpose symbol. For key vectors, It is a value vector; The first The query, key, and value projection matrix for each head; To output the projection matrix; For vector dimensions.
[0140] In subway dispatching scenarios, this mechanism is suitable for capturing long-distance dependencies in fault descriptions. For example, when dealing with descriptions such as "train delays due to signal system failures," the model can accurately associate the causal relationship between "signal system" and "train delays."
[0141] For example, consider the potential risk event of operational delay. Taking "At 8:32, the No. 4 turnout at Xinzhuang Station malfunctioned and became inoperable" as an example, in the entity recognition subtask, the model first needs to identify key entity mentions in the text, such as "Xinzhuang Station," "No. 4 turnout," and "malfunction," and map these entities to predefined categories in the ontology. In this example, "turnout" is mapped to "turnout system" in the equipment risk points, and "turnout malfunction" is mapped to equipment risk. Based on the potential impact of the malfunction, the risk event of "operational delay" is inferred. The model verifies the rationality of the mapping by checking whether these mapped entities exist in the corresponding category list in the ontology. In the relation determination subtask, the model analyzes the semantic relationships between entities. Through analysis, it can be seen that the turnout malfunction and the turnout system constitute a subordinate relationship of part and whole, and there is a causal relationship between operational delay and turnout malfunction. Based on the predefined relation types in the ontology, these semantic relationships are normalized into "belonging" relations, namely "turnout malfunction - belonging - turnout system" and "operational delay - belonging - turnout malfunction." The model verifies whether these relationships conform to the ontology definition and whether the direction of the relationships is correct. In the triple construction and attribute extraction subtask, the model organizes the identified entities and relationships into standard knowledge triples. It also extracts attribute information from the text, such as time (8:32), location (Xinzhuang Station), equipment number (4#), and fault description (inoperable). The model checks whether the necessary attributes are complete and whether the attribute values are formatted correctly. In this example, the time must conform to the format "HH:MM", the location must contain the word "station", and the equipment number must contain numbers and the "#" symbol. After knowledge normalization, the system performs comprehensive verification, including checking whether the entities exist in the corresponding categories in the ontology library, confirming the validity of the relationship types and whether the connected entity categories conform to the definition, and verifying the completeness and format correctness of the necessary attributes. Only verified knowledge is integrated into the existing knowledge graph, updating the relationships between entities and supplementing or updating relevant attribute information.
[0142] S3. Based on the ontology knowledge base and large language model, perform multi-dimensional verification on the knowledge graph to be verified, and generate the final version based on the verified knowledge. Figure 4 The image shows a knowledge graph of subway operation accidents.
[0143] To ensure the accuracy of the extraction results, this invention designs a dual knowledge self-verification mechanism. Pre-existing knowledge self-verification verifies entity completeness, relation compliance, and attribute standardization through an ontology database. Post-existing knowledge self-verification evaluates the consistency of the extraction results and the completeness of the knowledge graph, ensuring the coordination and unity between the newly constructed knowledge graph and the existing knowledge system.
[0144] The constructed knowledge graph is validated using a large language model based on an existing ontology library. The rationality of the extraction is evaluated and explained from three dimensions: graph rules, logical consistency, and knowledge fusion.
[0145] Taking the subway operation dispatch log "8:32 Xinzhuang Station No. 4 turnout malfunctioned and the turnout could not be operated" as an example, this self-verification process is explained in detail.
[0146] At the graph rules dimension, validation primarily focuses on whether newly constructed knowledge conforms to a predefined ontology schema. First, it checks the compliance of entity categories, ensuring that entities such as "turnout system," "turnout failure," and "operational delay" belong to the correct categories (e.g., equipment risk points, equipment risks, risk events, etc.). Second, it verifies the compliance of relationships between entities; for example, "affiliation" must point from a specific risk to a risk point, or from a risk event to a risk. Simultaneously, it verifies the completeness and format compliance of required attributes such as time, location, and equipment number; for example, time must conform to the "HH:MM" format, and equipment number must include numbers and identification identifiers.
[0147] In terms of logical consistency, the focus is on verifying the semantic coherence between knowledge points. The system needs to check whether the causal relationship between turnout malfunctions and operational delays is reasonable, and verify whether the logical transitivity on the event chain holds. For example, if a turnout malfunction causes operational delays, and the operational delays lead to other consequences, then there should be a deducible indirect causal relationship between the turnout malfunction and the final consequences. Simultaneously, the system also needs to check for logical conflicts between multiple attribute values of the same entity to ensure consistency in description. In this example, it is necessary to verify whether the causal deduction of turnout malfunctions leading to operational delays is reasonable, and whether there are contradictions in spatiotemporal attributes, etc.
[0148] In the knowledge fusion dimension, the focus is on integrating newly extracted knowledge with existing knowledge bases. First, entity alignment is performed by comparing entity types and key attributes to identify potentially duplicate or conflicting entities. When potential entity duplication is found, the system merges entity information, retaining more detailed or up-to-date attribute descriptions. Next, relationship alignment is performed to ensure that newly added relationships remain consistent with the existing relationship network, updating relationship weights or confidence levels as needed. Finally, in the attribute merging stage, when attribute value conflicts occur, the system selects the optimal value based on timestamps or confidence levels to ensure the timeliness and accuracy of the knowledge.
[0149] In some embodiments, the knowledge graph construction method may further include:
[0150] Through the feedback mechanism, the verification results generated by multi-dimensional verification are used to continuously optimize the knowledge extraction process in step S2, and to dynamically update the ontology knowledge base and the example pool.
[0151] Please see Figure 5 In this embodiment, the constructed knowledge graph can be based on an existing ontology knowledge base and the extraction can be verified through a large language model to determine whether the extraction is reasonable, and an explanation can be provided.
[0152] First, the specific process and example of validating the extraction results are as follows:
[0153] Verification point 1: Ontology consistency.
[0154] Input: The extracted triples.
[0155] Verification item:
[0156] Whether the entity is within the scope of the ontology definition;
[0157] Does the relationship conform to the ontology relation definition?
[0158] Does the attribute satisfy the ontology constraints?
[0159] Example:
[0160] Input: <turnout fault, category, electrical fault>.
[0161] Verification item:
[0162] 1. Check if "turnout malfunction" is listed in the risk body;
[0163] 2. Check if "Electrical Fault" is listed in the risk point entity;
[0164] 3. Check whether the "belonging" relationship allows connecting these two types of entities.
[0165] Verification point 2: Logical consistency.
[0166] Input: causal chain.
[0167] Verification item:
[0168] Is the order of events reasonable?
[0169] Does the causal relationship conform to logic?
[0170] Example:
[0171] Input: [Switch failure → Operational delay → Large passenger flow at station].
[0172] Verification item:
[0173] 1. Verify the reasonableness of the event sequence;
[0174] 2. Check if any key steps are missing.
[0175] Secondly, the specific process and examples of knowledge graph integrity verification are as follows:
[0176] Inspection item 1: Node integrity.
[0177] Check if the necessary nodes exist;
[0178] Verify that the node attributes are complete.
[0179] Item 2: Relationship integrity.
[0180] Check if there are any isolated nodes in the relationship;
[0181] Verify that the relationship chain is complete.
[0182] Item 3: Attribute integrity.
[0183] Check that all necessary attributes are complete;
[0184] Verify that the attribute values are reasonable.
[0185] Finally, the specific process and examples of instance verification are as follows:
[0186] Verify using example logs:
[0187] Input: "Line 4, April 20, 2010; 8:32 A fault occurred at Xinzhuang Station's No. 4 turnout, rendering it inoperable; 8:34 The station confirmed the fault at the scene and notified maintenance and signaling personnel to handle it; 8:35 A Level 5 early warning and a Level 2 large passenger flow response were activated; 8:36-9:35 Five trains were handled and dispatched using the manual turnout method; 9:40 The fault was confirmed to be caused by the 2DQJ-160 / 260 relay, and the relay was replaced; 9:45 A turnout test was conducted, and the test was normal; 9:50 The fault was resolved, and the early warning information was revoked."
[0188] 1. Entity verification:
[0189] {"Risk Point Validation": {"Entity": "Electrical Fault","Is it in the ontology library": true, "Is the classification correct": true},"Risk Validation": {"Entity": "Turnout Fault","Is it in the ontology library": true, "Is the relationship with the risk point reasonable": true}}.
[0190] 2. Relationship Verification:
[0191] {"Relationship_Validation": {"Triple": "<Turnout Fault, Belonging, Electrical Fault>","Relationship Type Compliance":true,"Entity Type Matching": true}}.
[0192] 3. Attribute validation:
[0193] {"Attribute_Validation": {"Time Format": "Standard","Location Valid": true, "Impact Level Reasonable": true}}.
[0194] It should be noted that there are three core challenges in the knowledge extraction process from subway operation accident dispatch logs:
[0195] The primary problem is insufficient professional understanding. The dispatch log contains a large number of technical terms and complex accident handling procedures, such as descriptions like "a switch at a certain station lost its indication" and "a signal malfunction caused train delays." Without sufficient domain knowledge, it is difficult to accurately understand the nature, impact, and handling of the accident, which can easily lead to professional biases in the extracted knowledge.
[0196] Secondly, there is the matching challenge posed by the diversity of descriptions. The same type of accident may be described in multiple different ways; for example, a signal malfunction might be described as "signal display abnormality," "signal equipment alarm," or "signal system malfunction." Traditional fixed template or rule-based matching methods struggle to accurately identify that these descriptions actually point to the same type of accident. This flexibility and diversity of descriptions makes simple pattern matching methods ineffective.
[0197] The third challenge is the large leap in reasoning from text to knowledge triples. Accident handling processes typically involve multiple steps and complex causal relationships, requiring a complete understanding of the accident's development to accurately extract knowledge. Without a systematic reasoning process, directly extracting knowledge can easily lead to the omission of key information or logical errors, making it difficult to fully reconstruct the logical relationships between the accident's development and handling stages, ultimately affecting the accuracy and completeness of the generated knowledge triples.
[0198] These three problems are interconnected and progressive: insufficient professional understanding leads to difficulties in handling diverse expressions, while the complexity of the expressions increases the reasoning difficulty of knowledge extraction, ultimately affecting the quality of knowledge graph construction. Therefore, a comprehensive solution that can address all three problems simultaneously is needed.
[0199] To address the above three issues, this invention constructs a pre-knowledge self-verification mechanism.
[0200] The ontology database provides professional knowledge support, addressing the issue of comprehension bias; in-context learning (ICL) tackles the challenge of diverse expressions through example learning; and the chain-of-thought (CoT) ensures the systematic and complete nature of the reasoning process. The organic combination of these three mechanisms forms a complete knowledge extraction system, improving the quality and reliability of the subway operation accident knowledge graph.
[0201] First, in the ontology library construction, a pool of professional knowledge examples for subway operation accidents is built by pre-injecting background knowledge such as subway equipment systems, professional terminology definitions, and technical specifications. The focus is on collecting various accident dispatch log records and their standard processing procedures. For example, for accidents involving "turnout failures," a complete knowledge system is collected, including failure manifestations (loss of representation, incomplete switching, etc.), failure level judgment criteria, processing procedure specifications, and typical cases. This professional knowledge is formatted into a unified example structure, facilitating the system's rapid matching of relevant professional knowledge support based on keywords and scenario characteristics when processing new dispatch logs, laying the foundation for subsequent accurate extraction.
[0202] Secondly, ICL focuses on learning from task-related analogies. By building a high-quality example pool, each example contains the original scheduling log and its standard knowledge triple mapping. During actual extraction, the system selects 3-5 of the most similar examples as references, learning through imitation how to transform incident descriptions into standardized knowledge triples. For example, when processing a scheduling log such as "At 10:00 AM on October 1, 2023, the turnout at Wangfujing Station on Line 1 lost its indication," the system imitates the extraction pattern in the example, sequentially identifying key information such as equipment entities, location relationships, and fault phenomena, and constructing a standard triple representation. Based on imitation learning from similar examples, professional knowledge is conveyed through these examples, ensuring that the extraction results conform to domain specifications. Simultaneously, by accumulating and updating high-quality examples, the system's extraction capabilities continuously improve, gradually adapting to more complex incident scenarios.
[0203] Finally, a COT (Content-Oriented Thinking Chain) mechanism is introduced to decompose the knowledge extraction process into four sub-tasks: entity identification, relation extraction and attribute supplementation, and rule verification. In the entity identification stage, the system first identifies basic entities such as risk points, risks, risk events, and risk accidents. In the relation extraction stage, the system clarifies the relationships, causal relationships, and class relationships between entities. In the attribute supplementation stage, information such as time period, location, and accident consequences (number of injured, number of fatalities, train delays, facility damage) is further supplemented. This structured reasoning process ensures the systematic nature and completeness of knowledge extraction, while the clear reasoning path verifies the rationality of each extraction step, thus improving the quality of knowledge triples.
[0204] Furthermore, after constructing a knowledge graph from subway operation accident dispatch logs, relying solely on the extraction process cannot fully guarantee the accuracy and professionalism of the knowledge triples. For example, issues may arise such as entity recognition bias (misidentifying certain specialized equipment terms), relationship determination errors (misunderstanding the hierarchical relationships between equipment), and unreasonable attributes (mismatch between fault levels and handling measures). If these errors are directly applied to the knowledge graph without systematic verification, it will affect the reliability of subsequent fault analysis and decision support. Simultaneously, because subway operation accidents involve a complex professional knowledge system, the verification process needs to consider multiple dimensions simultaneously, including professional standardization, logical consistency, and knowledge completeness, which places high demands on the verification mechanism.
[0205] To ensure the accuracy of the extraction results, this invention designs a dual knowledge self-verification mechanism. Pre-existing knowledge self-verification verifies entity completeness, relation compliance, and attribute standardization using an ontology database. Post-existing knowledge self-verification evaluates the knowledge graph from three dimensions: graph rules, logical consistency, and knowledge fusion, ensuring the coordination and unity of the newly constructed knowledge graph with the existing knowledge system. The constructed knowledge graph is verified against an existing ontology database using a large language model, primarily assessing the rationality of extractions based on consistency of extraction results and completeness of the knowledge graph, and providing explanations. This automated verification mechanism, supported by professional knowledge, improves the accuracy and reliability of knowledge graph construction.
[0206] In summary, the subway operation accident knowledge graph construction method of this embodiment has the following advantages:
[0207] 1. This invention constructs a complete post-hoc knowledge verification and evaluation system, which systematically evaluates knowledge graph rules from three dimensions: compliance, logical relationship consistency, and knowledge fusion compatibility. This evaluation system ensures the effective integration of newly extracted knowledge with the existing knowledge base, supports continuous optimization and dynamic updates of the knowledge graph, and enhances the system's practical value and scalability.
[0208] 2. The core of this invention lies in proposing a dual knowledge self-verification mechanism, comprising two stages: pre-event and post-event. The pre-event stage integrates ICL (Independent Knowledge Query) and two technical paradigms. ICL, through the output of a high-quality example-matching learning constraint model, effectively addresses the knowledge extraction bias caused by the understanding of subway terminology and diverse expressions. CoT (Copyright Query) achieves a complete understanding and accurate extraction of complex accident handling processes by constructing a structured reasoning link. By combining pre-event verification and post-event evaluation based on ICL and CoT, the accuracy and professionalism of knowledge extraction are guaranteed.
[0209] 3. This invention breaks through the dependence of traditional knowledge extraction methods on large-scale labeled data. By using a predefined ontology library and a high-quality example pool, combined with the generalization ability of a large language model, the system can quickly adapt to new accident scenarios and achieve high-quality knowledge extraction. This method based on a pre-trained model significantly reduces the dependence on domain expert annotations and improves the efficiency of knowledge graph construction.
[0210] 4. This invention designs a knowledge extraction method for subway operation accidents, achieving accurate understanding and extraction of professional knowledge in the field of subway operation and scheduling. Through a specially designed knowledge self-verification mechanism, the system can handle the field's unique terminology, complex accident handling procedures, and diverse expression methods, ensuring the accuracy and professionalism of knowledge extraction.
[0211] Example 2
[0212] This invention also discloses a subway operation accident knowledge graph construction system, which applies the subway operation accident knowledge graph construction method described in Example 1; the system includes: an ontology construction module, a pre-event knowledge self-verification module, and a post-event knowledge self-verification module.
[0213] The ontology construction module is used to build an ontology knowledge base for the field of subway operation accidents based on the subway operation accident dispatch log dataset, and to build an example pool based on the ontology knowledge base; wherein, the ontology knowledge base defines entity types, relationship types between entities, and attribute specifications; each example in the example pool contains the original dispatch log and its standard knowledge triple mapping;
[0214] The pre-processing knowledge self-verification module is used to extract knowledge from unstructured scheduling logs based on an ontology knowledge base, including:
[0215] A context learning mechanism is used to retrieve similar examples from the example pool to guide the large language model to perform preliminary knowledge extraction from the scheduling logs;
[0216] The knowledge extraction task is decomposed into entity recognition subtask, relation determination subtask, triple construction and attribute extraction subtask, and rule verification subtask by using the thinking chain mechanism. Through step-by-step reasoning, the initially extracted knowledge is structured and verified to generate a knowledge graph to be verified.
[0217] The post-event knowledge self-verification module is used to perform multi-dimensional verification of the knowledge graph to be verified based on the ontology knowledge base and the large language model, and generate the final subway operation accident knowledge graph based on the verified knowledge.
[0218] In the knowledge graph construction system of this embodiment, the ontology construction module can store and manage professional knowledge in the field of subway operation accidents, and define entity types, relation types and attribute specifications through the ontology model to build a complete domain knowledge example pool; the pre-knowledge self-verification module integrates the large language model processing unit and the prompt learning knowledge self-verification component to realize example-based knowledge extraction and chain reasoning verification; the post-knowledge self-verification module includes a knowledge extraction unit and a verification feedback unit, which are responsible for the final knowledge graph construction and quality control.
[0219] In terms of system connectivity, a complete knowledge processing loop is formed between the modules. The ontology construction module adopts a unified knowledge representation framework to build the subway's basic knowledge system. The pre-emptive knowledge self-verification module supports flexible invocation of multiple large language models. Through a combination of example learning and step-by-step reasoning, it generates a knowledge graph. The verification results optimize the knowledge extraction process through a feedback mechanism and continuously update the verification rule base, ensuring the accuracy and logical integrity of knowledge extraction. The post-emptive knowledge self-verification module has visualization capabilities and a multi-dimensional verification mechanism. New knowledge graphs are written back into the large language model to achieve continuous system optimization, and system performance is continuously improved through closed-loop optimization.
[0220] These three modules are closely interconnected: the ontology construction module provides professional knowledge support for inner-layer processing, the pre-processing knowledge self-verification module performs precise information extraction and verification based on this knowledge, and constructs a knowledge graph. The post-processing knowledge self-verification module, through feedback on verification results, continuously improves and optimizes the processing capabilities of the first two modules. The entire system forms a complete closed loop from knowledge support to extraction and verification, and then to optimization and feedback.
[0221] In practice, the system first loads a professional knowledge base through the ontology construction module, providing necessary domain knowledge support for subsequent processing. Then, the pre-processing knowledge self-verification module extracts knowledge based on example learning and chain reasoning, generating preliminary knowledge triples and constructing a standardized knowledge graph. Finally, the post-processing knowledge self-verification module verifies the extraction results from multiple dimensions and uses the verification feedback to continuously optimize the knowledge base and processing rules. Through this iterative processing mechanism, the system can continuously improve the quality and accuracy of knowledge extraction, providing strong technical support for the construction of a subway operation accident knowledge graph. The entire operation forms a complete processing chain, and the close cooperation between the modules ensures continuous optimization of the system's processing effectiveness.
[0222] Example 3
[0223] This embodiment provides a computer terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the subway operation accident knowledge graph construction method as described in Embodiment 1.
[0224] like Figure 6 As shown, the computer terminal provided in this embodiment includes: at least one processor 101, and a memory 102 connected to at least one processor 101. This embodiment does not limit the specific connection medium between the processor 101 and the memory 102. Figure 6 The example shown is the connection between processor 101 and memory 102 via bus 100. Bus 100 is... Figure 6 The connections between other components are shown in bold lines and are for illustrative purposes only, not as limiting information. Bus 100 can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 6 The bus is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. Alternatively, the processor 101 may also be called a controller; there is no restriction on the name.
[0225] In this embodiment, the memory 102 stores instructions that can be executed by at least one processor 101. The at least one processor 101 can execute the aforementioned method by executing the instructions stored in the memory 102.
[0226] The processor 101 is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory 102 and calling data stored in memory 102, the processor can perform various functions and process data, thereby monitoring the device as a whole.
[0227] In one possible design, processor 101 may include one or more processing units. Processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 101. In some embodiments, processor 101 and memory 102 may be implemented on the same chip; in some embodiments, they may also be implemented on separate chips.
[0228] Processor 101 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the subway operation accident knowledge graph construction method disclosed in Embodiment 1 can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules in processor 101.
[0229] Memory 102, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 102 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 102 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In this embodiment, memory 102 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0230] By designing and programming the processor 101, the code corresponding to the subway operation accident knowledge graph construction method described in the aforementioned embodiments can be embedded into the chip, thereby enabling the chip to execute the code during runtime. Figure 1 The steps of constructing a knowledge graph of subway operation accidents are shown. How to design and program the processor 101 is a technique well-known to those skilled in the art and will not be elaborated upon here.
[0231] Example 4
[0232] This embodiment provides a computer-readable storage medium storing a computer program thereon. When the program is executed by a processor, it implements the steps of the subway operation accident knowledge graph construction method as described in Embodiment 1.
[0233] The computer-readable storage medium may include flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage medium may be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, smart memory card, secure digital card, flash memory card, etc., provided on the computer device. Of course, the storage medium may include both internal storage units and external storage devices of the computer device. In this embodiment, the memory is typically used to store the operating system and various application software installed on the computer device. In addition, the memory can also be used to temporarily store various types of data that have been output or will be output.
[0234] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for constructing a knowledge graph of subway operation accidents, characterized in that, include: S1. Based on the subway operation accident dispatch log dataset, an ontology knowledge base for the subway operation accident domain is constructed, and an example pool is built according to the ontology knowledge base; wherein, the ontology knowledge base defines entity types, relationship types between entities, and attribute specifications; each example in the example pool contains the original dispatch log and its standard knowledge triple mapping; the ontology knowledge base is represented as... ;in C Represents a set of concepts. R Represents a set of relations. H A hierarchical structure representing concepts; a set of concepts. C A four-tier entity system was established, including risk points, risks, risk events, and risk incidents. Each layer of entities is subcategorized according to functional characteristics; relationship sets. R It defines horizontal relationships, vertical affiliations, and causal relationships in the development of events; hierarchical structure. H A multi-layered conceptual system was established, including the risk point layer, the risk layer, the risk event layer, and the risk incident layer; S2. Extract knowledge from unstructured scheduling logs based on an ontology knowledge base, specifically including: A context learning mechanism is used to retrieve similar examples from the example pool to guide the large language model to perform preliminary knowledge extraction on the scheduling logs. The context learning mechanism specifically involves selecting several examples from the example pool that are most similar to the scheduling logs to be processed as references, and using imitation learning to transform the accident descriptions of the scheduling logs to be processed into standard knowledge triples. The knowledge extraction task is decomposed into entity recognition subtask, relation determination subtask, triple construction and attribute extraction subtask, and rule verification subtask by using the thinking chain mechanism. Through step-by-step reasoning, the initially extracted knowledge is structured and verified to generate a knowledge graph to be verified. S3. Based on the ontology knowledge base and the large language model, the knowledge graph to be verified is subjected to multi-dimensional verification, and the final subway operation accident knowledge graph is generated based on the verified knowledge; wherein, the multi-dimensional verification includes: verifying the compliance of entities, relations and attributes in the knowledge graph in the graph rule dimension, verifying the semantic coherence between entities in the knowledge graph in the logical consistency dimension, and aligning the verified knowledge with the existing knowledge graph in the knowledge fusion dimension by entity alignment, relation alignment and attribute merging.
2. The method for constructing a knowledge graph of subway operation accidents according to claim 1, characterized in that, In step S3, The verification in the graph rules dimension specifically includes: checking whether the entity categories are compliant, whether the relationships between entities conform to the definition of the ontology knowledge base, and the completeness and format specifications of attributes; Verification in the dimension of logical consistency specifically includes: checking whether the causal relationship on the event chain is reasonable, and whether there are logical conflicts between multiple attribute values of the same entity; The verification in the knowledge fusion dimension specifically includes: performing entity alignment to identify and merge duplicate entities, performing relationship alignment to ensure the consistency of new relationships with existing relationship networks, and merging attributes based on confidence or timestamps when attribute values conflict.
3. The method for constructing a knowledge graph of subway operation accidents according to claim 1, characterized in that, The knowledge extraction employs an improved Transformer architecture, using a multi-head self-attention mechanism to process the scheduling log text sequence. ; where, for each element in the text sequence The expression formula for the attention update mechanism is: In the formula, For the number of attention heads, For sequence position index; For the first Elements in size For the first in the sequence element Attention weights; For query vectors, superscript T It is the transpose symbol. For key vectors, It is a value vector; The first The query, key, and value projection matrix for each head; To output the projection matrix; For vector dimensions.
4. The method for constructing a knowledge graph of subway operation accidents according to claim 1, characterized in that, In step S1, before constructing the ontology knowledge base, the text in the subway operation accident dispatch log dataset is preprocessed, including: removing redundant information, unifying time and numbering, and splitting complex text into basic semantic units.
5. The method for constructing a knowledge graph of subway operation accidents according to claim 1, characterized in that, Also includes: Through the feedback mechanism, the verification results generated by multi-dimensional verification are used to continuously optimize the knowledge extraction process in step S2, and to dynamically update the ontology knowledge base and the example pool.
6. A subway operation accident knowledge graph construction system, characterized in that, The system employs the subway operation accident knowledge graph construction method as described in any one of claims 1 to 5; the system includes: The ontology construction module is used to build an ontology knowledge base for the field of subway operation accidents based on the subway operation accident dispatch log dataset, and to build an example pool based on the ontology knowledge base; wherein, the ontology knowledge base defines entity types, relationship types between entities, and attribute specifications; each example in the example pool contains the original dispatch log and its standard knowledge triple mapping; The pre-processing knowledge self-verification module is used to extract knowledge from unstructured scheduling logs based on an ontology knowledge base, including: A context learning mechanism is used to retrieve similar examples from the example pool to guide the large language model to perform preliminary knowledge extraction from the scheduling logs; The knowledge extraction task is decomposed into entity recognition subtask, relation determination subtask, triple construction and attribute extraction subtask, and rule verification subtask by using the thinking chain mechanism. Through step-by-step reasoning, the initially extracted knowledge is structured and verified to generate a knowledge graph to be verified. The post-event knowledge self-verification module is used to perform multi-dimensional verification of the knowledge graph to be verified based on the ontology knowledge base and the large language model, and generate the final subway operation accident knowledge graph based on the verified knowledge.
7. A computer terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the subway operation accident knowledge graph construction method as described in any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the subway operation accident knowledge graph construction method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
DCS intelligent decision-making method and system fusing large language model and knowledge graph
CN118820778A
Knowledge extraction method and device based on large model, equipment and medium
CN119149752A
Knowledge proposition error correction method and system based on knowledge graph optimization and upgrading
CN120373298A