A Road Intersection Hazard Diagnosis Method Based on Adaptive Graph and Multi-Link Inference
By constructing an adaptive graph and multi-link reasoning method, and integrating road design specifications and laws and regulations, we have achieved deep integration and multi-link reasoning of safety hazards at road intersections. This solves the problems of fragmented hazard identification and uninterpretable diagnostic results in existing technologies, and provides authoritative and interpretable governance decision support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JILIN UNIVERSITY
- Filing Date
- 2026-02-25
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies for diagnosing safety hazards at road intersections suffer from problems such as fragmented hazard identification, lack of systematic reasoning in causal analysis, insufficient interpretability of diagnostic results, and disconnect between governance decisions and the diagnostic process. These issues make it difficult to achieve deep logical connections and accurate identification of complex traffic scenarios.
We employ an adaptive graph-based and multi-link reasoning approach to construct a multi-source heterogeneous traffic safety knowledge base. We introduce a collaborative filtering affinity scoring mechanism and design a multi-link reasoning-driven causal evolution diagnosis mechanism to generate a diagnostic report covering the entire process of cause-evolution-risk. Combined with an intelligent agent with explicit reflection capabilities, we achieve deep integration of hazard entity characteristics and business semantics.
It improves the accuracy, stability, and engineering usability of safety hazard diagnosis in complex traffic scenarios, provides authoritative and interpretable decision support for intersection safety management, and ensures the traceability of diagnostic conclusions and the precision of management.
Smart Images

Figure CN121724164B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent transportation safety engineering technology, specifically relating to a method for diagnosing potential hazards at road intersections based on adaptive graphs and multi-link reasoning. Background Technology
[0002] Road intersections, as core hubs of urban and regional transportation networks, are areas with the most complex traffic flow organization and the highest concentration of traffic conflict points. Because intersections involve the interaction of multiple dimensions such as geometric design, control facilities, traffic operation, and management analysis, their safety level directly affects national economic development and the safety of people's lives and property. Accurate diagnosis and scientific decision-making regarding safety hazards at road intersections are crucial for improving road traffic safety and ensuring the level of intelligent transportation safety engineering.
[0003] With the penetration of intelligent technologies into the transportation sector, safety hazard diagnosis has gradually shifted from traditional manual experience-driven to data-driven and intelligent-driven approaches. However, existing safety management technologies for road intersections still face significant bottlenecks. First, current methods for identifying road traffic hazards largely rely on fragmented physical indicator monitoring, lacking a systematic correlation with the accident evolution process. Specifically, Chinese patent CN115600896B discloses a method, device, and electronic equipment for identifying physical structural hazards in urban roads. This method acquires data on the intersection's level difference, width difference, and morphology, and combines this data with preset rules to perform risk scoring. Regarding scene and conflict perception, Chinese patent CN120913442A proposes a method for vehicle safety domain modeling and conflict risk assessment based on visual constraints, and Chinese patent CN119027295A further utilizes panoramic technology to construct scene models and identify specific scene types. However, while these methods improve the efficiency of automated monitoring, they are essentially limited to passive comparisons of preset physical thresholds or specific geometric parameters. This has led to the current technology failing to establish a deep logical connection between road geometry design deviations, dynamic traffic flow conflict mechanisms, and the causes of historical accidents over long periods. As a result, the final diagnostic conclusions are isolated and one-sided, making it difficult to reconstruct the causal evolution chain behind the hidden dangers.
[0004] Secondly, while Large Language Models (LLMs) have seen explosive growth in the field of artificial intelligence, demonstrating significant advantages in handling natural language interaction and general knowledge understanding, their direct application to the field of traffic intersection safety hazards easily leads to "answer illusions." Therefore, current research on knowledge representation and automated reasoning for complex traffic scenarios primarily focuses on combining LLMs with knowledge graphs and using techniques such as retrieval-enhanced generation. Although such research attempts to compensate for the insufficient knowledge reserves of large models in the traffic field through external knowledge bases, the integration depth of LLMs and knowledge graphs in the intersection scenario is severely insufficient, and the system lacks structured causal collaborative reasoning capabilities when handling complex engineering logic. Specifically, although Chinese patents CN120045655A and CN118585632A attempt to combine knowledge graphs and large models to achieve traffic question answering, the two remain at a shallow "static library + natural language interface" combination mode. The knowledge graph only serves as a passive knowledge source for retrieval, and the large model is only responsible for interaction logic, failing to achieve explicit topological guidance and logical rigid constraints from the knowledge graph on the reasoning path of the large model. Due to the lack of structured relationships deeply intervening in the thought process of the large model, the system is prone to making judgments that violate common sense about traffic physics when faced with complex geometric conflicts at intersections, mixed traffic flow interactions, and compliance determinations. Meanwhile, while existing technologies such as Chinese patent CN120975099A have achieved the extraction of traffic accident knowledge, their content mostly focuses on basic accident information and fails to specifically cover the scenario-specific knowledge system of road intersections, especially lacking a deep logical connection between complex conflict rules, design specification clauses, and specific causes of hazards. This lack of deep logic prevents the system from driving the large model to perform authoritative multi-step deductive reasoning through the structured links of the knowledge graph, making it difficult to accurately identify the multi-source coupled risks and compliance loopholes behind hazards.
[0005] Finally, there is a significant fragmentation issue in hazard identification, lacking systematic causal evolution analysis and collaborative governance decisions. When processing large-scale traffic hazard knowledge graphs, existing algorithms rely excessively on topological structure while neglecting the unique business relationship semantics of traffic engineering. This makes it difficult for the system to accurately distinguish hazard patterns with similar topological features but different physical conflict logics, easily leading to pattern drift problems. Furthermore, the lack of a multi-link characterization of the entire process of a hazard—from "initial trigger (e.g., unreasonable channelization)" to "process evolution (e.g., traffic weaving)" and then to "risk outcome (e.g., side-impact accident)"—results in isolated diagnostic conclusions. This break in the causal logic chain makes diagnostic conclusions untraceable, unable to support authoritative compliance judgments within the industry, and unable to provide an explainable basis for subsequent precise governance decisions.
[0006] In summary, current technologies for diagnosing and managing safety hazards at road intersections face core challenges such as difficulty in integrating multi-source knowledge, low reliability in matching hazard patterns, lack of traceability in diagnostic logic, and poor synergy between diagnosis and management decisions. Summary of the Invention
[0007] To address the problems in existing road intersection safety hazard diagnosis technologies, such as fragmented hazard identification, lack of systematic reasoning in causal analysis, insufficient interpretability of diagnostic results, and disconnect between governance decisions and the diagnostic process, this invention proposes a road intersection hazard diagnosis method based on adaptive graph and multi-link reasoning. This method integrates road design specifications and laws and regulations to construct a multi-source heterogeneous traffic safety knowledge base; introduces an affinity scoring mechanism based on collaborative filtering to achieve deep fusion and disambiguation of hazard entity features and business semantics; and designs a causal evolution diagnosis mechanism driven by multi-link reasoning, combined with an intelligent agent with explicit reflective capabilities, to generate a diagnostic report covering the entire evolutionary evidence chain of "inducement-evolution-risk." This effectively improves the accuracy, stability, and engineering usability of safety hazard diagnosis in complex traffic scenarios, providing authoritative and interpretable decision support for intersection safety governance.
[0008] To achieve the above objectives, the present invention adopts the following technical solution:
[0009] A method for diagnosing road intersection hazards based on adaptive graphs and multi-link inference, comprising the following steps:
[0010] Step 1. Construct a knowledge graph of traffic hazards;
[0011] Step 2. For the constructed traffic hazard knowledge graph, gather the data of each entity node in its first-order neighborhood, extract and encode the context embedding vector of the entity node, then concatenate them, and perform summation and smoothing on the data in the neighborhood to obtain the entity embedding vector for the next iteration; organize the entity embedding set of each iteration based on the clustering algorithm to generate an initial cluster candidate set, and quantify the association affinity between the entity embedding vector and each hazard pattern community in the initial cluster candidate set; then, dynamically reallocate the entity nodes based on the maximum affinity scoring criterion, and simultaneously execute the feature update and centroid evolution process of the hazard pattern community until the partitioning result of the hazard pattern community tends to be stable;
[0012] Step 3. Construct a hierarchical traffic hazard knowledge system consisting of an atomic hazard data layer, a hazard pattern semantic layer, and a decision-making and reasoning guidance layer. Process the traffic hazard knowledge graph and establish the hierarchical mapping relationship between semantic meta-nodes, hazard pattern communities, and underlying hazard entities, with the hazard pattern community as the core organizational unit.
[0013] Step 4. Based on real-time perception data of the intersection and user queries, extract the core semantic keywords of the hidden dangers, calculate the similarity between them and the semantic meta nodes of each hidden danger pattern, determine the target semantic meta nodes, and then use the multi-path reasoning chain extraction method based on the semantic constraints of the hidden danger mechanism to retrieve the deep causes of the hidden dangers and their evolutionary relationships, and output the logical evidence set.
[0014] Step 5. Construct a diagnostic framework based on the "perception-reasoning-reflection" cyclical mechanism, and output a diagnostic report based on the logical evidence set.
[0015] As a preferred embodiment of the present invention, step 1 first constructs a comprehensive database that integrates general domain knowledge and intersection perception data, performs semantic segmentation on unstructured domain knowledge corpus, and uses a knowledge extraction method based on adaptive hazard pattern constraints to extract data that meets the constraints from unstructured text, performs structured mapping and integration on the extracted data, and constructs a traffic hazard knowledge graph.
[0016] As a preferred embodiment of the present invention, in step 2, the calculation of the association affinity between the entity embedding vector and each hidden danger pattern community in the initial cluster candidate set comprehensively considers the topological connectivity overlap based on the Jaccard coefficient and the semantic perception similarity based on cosine similarity, and introduces a weighted fusion coefficient. Finally, a comprehensive affinity score is calculated. The expression is: ;
[0017] in, For topological connectivity overlap, For semantically perceived similarity, Representing the The entity embedding vector of the next iteration. This represents a community with potential safety hazards.
[0018] As a preferred embodiment of the present invention, in step 3, the atomic hazard data layer uses entity, relation, and attribute triples to fully characterize the factual information of hazards in the traffic scenario; the hazard pattern semantic layer organizes the scattered hazard entities into hazard pattern units with clear business meanings through community centroid aggregation and comprehensive affinity scoring matching; and the decision and reasoning guidance layer generates corresponding hazard pattern semantic meta-nodes by performing semantic summarization on stable hazard pattern communities. Thus establishing semantic meta-nodes Hidden Danger Model Community The top-down hierarchical mapping relationship of underlying hidden entities.
[0019] As a preferred embodiment of the present invention, step 4 extracts various attribute values from the input real-time intersection perception data, including geometric design, control facilities, traffic operation, and management analysis. Then, the discrete indicators are converted into unstructured semantic description text. Subsequently, a pre-trained deep embedding model is used as an encoder to convert the semantic description text into a high-dimensional query vector. Based on user queries and traffic hazard map patterns, core semantic keywords of hazards are extracted and mapped into semantic vectors in a high-dimensional feature space. Finally, the semantic vectors and centroid vectors corresponding to the semantic metanodes of each hazard pattern in the traffic hazard knowledge graph are calculated. Similarity between them, in order to characterize a class of traffic risk mechanisms through high-level semantic pattern indexing. As an anchor point for reasoning and retrieval, i.e., the target semantic meta-node, .
[0020] As a preferred embodiment of the present invention, the specific steps of step 4, which involves retrieving the deep-seated causes and evolutionary relationships of hidden dangers based on the multi-path reasoning chain extraction method with semantic constraints of hidden danger mechanisms, are as follows: First, construct a set of candidate hidden danger entities induced by the pattern based on the target semantic meta-node and its corresponding hidden danger pattern community; then, using the set of candidate hidden danger entities as the seed set, perform a deep-level [analysis / process] in the traffic hidden danger knowledge graph. The subgraph expansion operation is used to obtain a locally related subgraph. Then, the locally related subgraph is traversed and extracted to obtain the original inference set. Finally, the original inference set is filtered and prioritized based on the rearrangement model to form a simplified inference set, i.e., the logical evidence set.
[0021] When performing logical reasoning on local related subgraphs, three types of logical reasoning chains are constructed: evolutionary path chain, root cause chain, and associated chain.
[0022] Evolutionary path chain ;
[0023] Root Cause Chain ;
[0024] Associated companion chain ;
[0025] in, As the core inducing entity, As a deep-seated trigger node, Representing entities, Representational relationship.
[0026] In a preferred embodiment of the present invention, step 5 first uses the current intersection perception index as a retrieval constraint to locate and extract the rule set of related compliance standard constraints in the global traffic hazard knowledge graph. This rule set serves as the explicit constraint base for the reasoning process of the reflective agent. The user query, the preliminary retrieval output obtained based on the user query, and the reasoning chain connected by directed arrows in the logical evidence set are semantically coupled. Then, multi-source heterogeneous information is injected into the prompt template. The reflective agent performs closed-loop diagnosis in the background prior space of strong constraints provided by the prompt template. After iterative reasoning and logical reflection self-checking, a final memory representation of a stable convergent state is obtained. Finally, the logical reasoning features in the final memory representation are mapped into a closed-loop diagnosis report with natural language semantics.
[0027] As a further preferred embodiment of the present invention, when performing semantic segmentation in step 1, a sliding window method with overlapping intervals is used for segmentation; when constructing the traffic hazard knowledge graph, a traffic hazard graph pattern is defined. The adaptive knowledge extraction agent uses the traffic hazard map pattern as the boundary and extracts a set of triples that meet the constraints from the unstructured text for each document. By performing structured mapping and integration on the extracted discrete triples, a traffic hazard knowledge graph is constructed. ;in, For entity type, For relational types, For attribute set, Representing entities, Representative relationship, Indicates a collection of entities that pose traffic hazards. Represents a set of relationships between entities. Represented as a collection of entity attributes;
[0028] The traffic hazard map pattern is iteratively updated through continuous interaction between the knowledge extraction agent and traffic domain knowledge content. The knowledge extraction agent analyzes the potential relationship patterns in each document through an update function and automatically proposes a set of pattern expansion suggestions. Then update the current iteration mode: ;in, , Representing the , The set of traffic hazard map patterns in the next iteration The confidence threshold is the confidence level. Determining the frequency of self-verifying scores or logical consistency across documents based on large language models.
[0029] As a further preferred embodiment of the present invention, the topological connection overlap in step 2 The expression is:
[0030] ;
[0031] in, For the physical nodes of potential hazards to be identified The set of all relationship types in the traffic hazard knowledge graph. For summarization The union of relations formed by the relation types involved in all entity nodes within the set;
[0032] Semantic similarity The expression is:
[0033] ;
[0034] in, In the first During each iteration, the arithmetic mean of the embedding vectors of all entity nodes within the current hidden danger pattern community is calculated, and the community centroid vector is dynamically generated.
[0035] As a further preferred embodiment of the present invention, in the evolutionary path chain retrieval process of step 4, a hidden danger evolutionary path extraction method based on causal semantic constraints is adopted. As the starting state, during the graph traversal, an edge attribute filter is introduced to allow state transitions only along edges whose relation semantic type belongs to the "cause" or "induce" set, and to force the entity node with the semantic type labeled as "risk result" as the search termination condition.
[0036] During the root cause tracing chain retrieval process, a topological pattern matching mechanism based on reverse tracing of multiple hidden dangers is adopted. For multiple identified hidden danger entities, reverse traversal is performed along their incoming edge directions to extract their predecessor node set. In the traversal process, a semantic intersection calculation strategy is introduced to filter out common predecessor entities that are simultaneously pointed to by multiple hidden danger phenomena, i.e., deep cause nodes.
[0037] During the retrieval of associated chains, a retrieval method for hazard-related features based on semantic diffusion of core causes is adopted. First, the core cause entity is identified in the local subgraph and used as the diffusion center. Then, restricted expansion is performed in parallel along the outgoing edge direction of the core cause entity to retrieve entities of multiple hazard phenomena that appear simultaneously under the same cause.
[0038] Advantages and beneficial effects of the present invention:
[0039] (1) This invention proposes a method for constructing a knowledge graph for intersections based on adaptive hazard pattern constraints. This method breaks through the limitations of traditional knowledge graphs that rely on preset static patterns. Its core innovation lies in the introduction of an adaptive pattern evolution mechanism. During the unstructured text processing, the knowledge extraction agent dynamically triggers pattern update suggestions by analyzing potential relationship patterns, thereby achieving continuous optimization and automatic expansion of the entity types, logical relationships, and attribute sets of traffic hazards. Finally, by integrating multi-source data such as road design specifications, safety regulations, and historical accident reports, a foundational knowledge base with strong industry constraints and dynamic evolution capabilities is constructed.
[0040] (2) This invention proposes a collaborative filtering method for hazard patterns based on dual perception of physical topology and business semantics. Addressing the issues of feature fragmentation and computational redundancy caused by large-scale traffic hazard entities, this invention introduces the concept of collaborative filtering, jointly modeling the physical topological association features and semantic representation features of hazard entities. The system achieves highly reliable matching between hazard entities and their communities by calculating the affinity score between the entity and the hazard pattern community. This method not only forms stable and reusable hazard pattern units but also fundamentally overcomes the pattern drift problem caused by relying solely on semantic or structural similarity, significantly improving the stability of hazard identification in large-scale complex scenarios.
[0041] (3) This invention designs a multi-dimensional topological reasoning link retrieval mechanism based on traffic conflict mechanisms. Addressing the shortcomings of existing diagnostic methods that lack systematic correlation of accident evolution processes and cannot reconstruct the causal chain of hidden dangers, this invention constructs three types of specific topological reasoning chains based on traffic conflict mechanisms: evolutionary paths, used to characterize the transmission logic from triggers to risks; root cause tracing chains, used to identify deep common conflict points pointed to by multiple abnormal phenomena; and associated chain chains, used to identify the characteristics of coupled hidden dangers. This mechanism realizes logical traceability and evidentiary expression of hidden danger cause analysis, improving the interpretability and engineering credibility of hidden danger diagnosis results.
[0042] (4) Precise pruning strategy for inference evidence integrated with deep reordering model. In order to eliminate redundant noise in the initial multi-path retrieval and improve diagnostic efficiency, this invention introduces a reordering mechanism based on deep semantic understanding. The system uses a pre-trained reordering model to perform fine-grained matching and modeling of query semantics and inference links. This innovation effectively filters irrelevant noise and lays a precise data foundation for the subsequent generation of authoritative diagnostic reports.
[0043] (5) An explicit reflection mechanism based on physical constraint verification and contradiction loss is adopted. To address the inference distortion caused by the asymmetric alignment between the logical reasoning path and the underlying physical parameter space when large language models process complex traffic logic, this invention designs an intelligent agent reasoning mechanism with explicit reflection capabilities. The system extracts the technical parameter vector from the reasoning state and aligns it numerically with industry compliance rule thresholds and on-site perceived observations, calculating the contradiction loss function to achieve a quantitative evaluation of the reasoning conclusion. Through this reflection operator, the system can accurately identify and correct logical judgments that do not conform to physical facts, ensuring that the diagnostic output strictly aligns with national and industry standards and specifications.
[0044] (6) Achieving intelligent closed-loop output of the evolutionary evidence chain of "perception-reasoning-reflection-decision". This invention constructs a hierarchical knowledge architecture consisting of an atomic data layer, a pattern semantic layer, and a decision reasoning layer. Through prompting engineering, it deeply couples real-time perception data, industry standard constraints, and reasoning evidence. Based on the results of multi-link reasoning, it integrates the characteristics of hidden danger patterns and the conclusions of compliance reflection to achieve automated generation from multi-source perception input to closed-loop governance countermeasure output. This ensures that the investigation work has a traceable, explainable, and auditable logical evidence chain, thereby effectively solving the problem of existing diagnostic conclusions being disconnected from engineering practice and making it difficult to make accurate governance decisions, and significantly improving the scientific nature, practicality, and decision credibility of road intersection safety hazard governance.
[0045] (7) This invention achieves accurate identification and compliance assessment of safety risks at traffic intersections by deeply integrating collaborative filtering algorithms with the multi-path logical reasoning capabilities of knowledge graphs. Attached Figure Description
[0046] Other objects and results of the invention will become more apparent and readily understood with reference to the following description taken in conjunction with the accompanying drawings. In the drawings:
[0047] Figure 1 This is a flowchart of the road intersection hazard diagnosis method based on adaptive graph and multi-link reasoning provided by the present invention. Detailed Implementation
[0048] To enable those skilled in the art to better understand the technical solutions and advantages of the present invention, the present application will be described in detail below with reference to the accompanying drawings, but this is not intended to limit the scope of protection of the present invention.
[0049] like Figure 1 As shown in the figure, this embodiment provides a method for diagnosing potential hazards at road intersections based on adaptive graphs and multi-link reasoning. The method includes the following steps:
[0050] Step 1. Construction of a hierarchical traffic hazard knowledge graph based on adaptive hazard pattern constraints:
[0051] This step aims to transform unstructured domain knowledge corpora... This is transformed into a structured, highly semantically cohesive traffic hazard knowledge graph. This embodiment utilizes a frozen large language model to extract targeted knowledge from the original text, which includes 477 standards, specifications, and professional books, and outputs a structured graph connecting knowledge. Since traditional graph augmentation generation techniques are typically limited by preset fixed structures or explicit text features when extracting knowledge patterns, this invention innovatively proposes a graph construction scheme using adaptive hazard pattern constraints to construct a traffic hazard knowledge graph. .
[0052] Specifically, step 1 includes the following steps:
[0053] Step 1.1. Integration of multi-source heterogeneous traffic data:
[0054] First, a comprehensive database integrating general domain knowledge and specific intersection perception data is constructed. In response to the characteristics of data fragmentation and unstructuredness in traffic scenarios, a unified data access layer is established, which specifically includes: (1) Laws and standards: including industry and local standards and specifications, such as "Road Traffic Signs and Markings" (GB5768) and "Highway Engineering Technical Standards" (JTGB01), as the benchmark for compliance judgment. (2) Professional books: including authoritative works in the fields of traffic safety, intersection design, and accident analysis, such as "Road Safety Hazard Investigation and Treatment" and "Technical Guidelines for Safety Design of Highway Intersections", used to extract the mechanism of hazards. (3) Academic literature and reports: including journal articles and research reports in the database, as well as accident investigation reports published online and typical hazard analysis cases published by industry public accounts.
[0055] Step 1.2. Semantic segmentation of knowledge in the transportation domain:
[0056] For unstructured domain knowledge corpora First, semantic segmentation is performed to ensure the long-range dependency handling capability of the large language model when extracting knowledge. Specifically, a sliding window method with overlapping intervals is used for segmentation, and the formula for calculating the segmentation interval is defined as follows:
[0057]
[0058] in, For the first A semantic block, This is the starting position of the block. This is a preset block length. In this embodiment, the block length is... Setting it to 1000 tokens ensures the semantic integrity of individual traffic standard clauses.
[0059] Step 1.3. Knowledge extraction based on adaptive hazard pattern constraints:
[0060] Traffic scenarios often suffer from fragmented and unstructured data. This invention employs a graph-pattern-constrained agent extraction method to transform multi-source data into standardized structured knowledge.
[0061] To guide the model in accurately extracting knowledge related to traffic hazards, a traffic hazard map pattern is defined. , where entity type Covering potential hazards, design specifications, traffic facilities, etc.; Relationship types Restrictions were placed on connection logic such as "violation" and "cause"; attribute set Key parameters such as design speed and lane width were defined. Based on this, an adaptive knowledge extraction agent was constructed. ,in Constrained The information that identifies the matching elements is used to effectively reduce the search space to a Cartesian product. .
[0062] Specifically, the pattern constraint extraction process is as follows: the knowledge extraction agent uses... For each document, the boundary is defined. Extracting a set of constrained triples from unstructured text. Based on this, the present invention constructs a traffic hazard knowledge graph by performing structured mapping and integration on the extracted discrete triples. ;in, Indicates a collection of entities that pose traffic hazards. Represents a set of relationships between entities. Represented as a collection of entity attributes, entity and relationships It accurately depicts the explicit relationships between road geometry, traffic control facilities, and industry compliance standards.
[0063] Because the initial traffic hazard graph pattern is relatively generalized and requires manual pre-definition, and existing common GraphRAGs all face limitations in scalability and adaptability in unknown domains, this invention provides a knowledge extraction intelligent agent. It is equipped with an addition tool and introduces an adaptive design that dynamically optimizes the initial pattern through continuous interaction with knowledge content in the transportation domain. Specifically, the knowledge extraction agent utilizes an update function. Analyze the potential relational patterns in each document and automatically generate a set of pattern expansion suggestions. Its computational logic is expressed as follows: ;
[0064] in, , representing the candidate entity type Candidate Relationship Type and candidate attribute types The resulting set of tuples. Subsequently, this invention updates the current iteration mode:
[0065]
[0066] in, Representing the The set of traffic hazard map patterns in the next iteration This is the confidence threshold. In this process, the confidence level... The knowledge extraction agent determines the frequency of self-verifying scores or cross-document logical consistency based on a large language model. Candidate patterns with confidence scores higher than a threshold are selected from the data. And by using a union operation, it is incorporated into the initial pattern, thereby realizing the autonomous evolution and precise expansion of the traffic hazard map pattern in the unknown domain.
[0067] Step 2. Hierarchical abstraction and community-based organization of the traffic hazard knowledge graph:
[0068] Since triples generated from different blocks may contain duplicate entities or relations, this step aims to address the severe fragmentation, instability, and computational redundancy issues present in the reasoning process of large-scale traffic hazard knowledge graphs. This invention addresses this by optimizing the traffic hazard knowledge graph... Multi-level abstraction is employed to construct a hidden danger pattern community layer with high business cohesion. In the specific implementation process, firstly, an initial cluster candidate set is generated based on entity embedding vectors using the K-means algorithm. Then, a comprehensive evaluation index based on a collaborative filtering mechanism is introduced. By jointly calculating the topological connectivity overlap based on the Jaccard coefficient and the semantic perception similarity based on cosine similarity, the hidden danger entities are dynamically redistributed to the pattern communities that best match their physical mechanisms and business logic, driving the adaptive evolution of the community centroid until stable convergence.
[0069] Specifically, step 2 includes the following steps:
[0070] Step 2.1. Extraction of traffic hazard entity embedding vectors based on neighborhood context:
[0071] For the constructed traffic hazard knowledge graph This invention first aggregates each entity node in its first-order neighborhood. The context embedding vector of an entity node is extracted and encoded using all triples within the context. Specifically, for each triple... The present invention adopts The model acts as a feature extractor, mapping the textual descriptions of triples to a high-dimensional vector space. . The model employs a BERT encoder-only architecture, generating embedding vectors with higher semantic density and stability when handling isolated phrases and phrase meanings, effectively reducing the randomness that may occur during inference in generative models. This implementation extracts the [CLS] bit vector from its last hidden layer to represent the head entity. ,relation Tail entity The original text description is mapped to the corresponding initial high-dimensional vector (embedding vector). , , The expression is:
[0072]
[0073] Subsequently, the present invention concatenates the embedding vectors of the head entity, relation, and tail entity, and takes the average of all neighborhood triples to obtain the entity embedding vector for the next iteration. :
[0074]
[0075] in, Represents the number of iterations, and when At this point, the entity embedding vector takes the value of the aforementioned initial iteration vector. The BERT model extracts deep semantic features carrying the text in the transportation domain, and by summing and smoothing all triples in the neighborhood, the context embedding vector of the entity can simultaneously preserve the local topological structure pattern and deep semantic relationship, providing dual signal support for the subsequent clustering process.
[0076] Step 2.2. Initialization of the clustering space for the hidden danger pattern community:
[0077] Given the massive scale and complex relationships between entities in the original traffic hazard knowledge graph, performing high-precision pattern determination and entity redistribution directly in the global space would not only be computationally complex but also susceptible to local noise interference, making it difficult to guarantee the stability and interpretability of pattern extraction.
[0078] Therefore, this step is not aimed at generating the final hazard pattern, but rather at constructing a structured candidate community space to initially organize the entity set, providing a controllable search boundary for subsequent refined fusion based on dual-perception scoring.
[0079] Specifically, the present invention first embeds the entity set in step 2.1. Apply the K-means algorithm, where Represents the total number of entities, i.e. Generate an initial cluster candidate set Among them, the number of clusters The value of is limited by the particle size control parameter, and its calculation formula is:
[0080]
[0081] Among them, settings To ensure that each hazard pattern cluster contains sufficient entity samples, set To prevent the patterns from becoming overly fragmented.
[0082] Step 2.3. Refined integration of hazard patterns based on dual-perception scoring:
[0083] After completing the clustering initialization in step 2.2, given that the K-means algorithm only performs static partitioning based on Euclidean distance in the vector space, potentially leading to the misclassification of potentially isolated points or points logically unrelated by traffic, this step aims to introduce the collaborative filtering mechanism commonly used in computer recommendation systems to design a comprehensive evaluation index (comprehensive affinity score). , used in the Quantization in the next iteration Community with hidden danger model The affinity between them. This indicator enables cross-validation of the physical topology logic and deep business semantics of traffic intersections, thereby achieving a refined integration of potential hazard patterns. The specific processing procedure is as follows:
[0084] Step 2.3.1. Collaborative filtering calculation based on topological connection overlap:
[0085] To address the complex traffic connections at intersections, the first step is to extract the entity nodes to be identified as potential hazards. The set of all relation types in the traffic hazard knowledge graph is denoted as At the same time, summarize The relation types involved in all entity nodes form a relation union. This step borrows the "item-based" similarity measurement concept from collaborative filtering: if the relationship type associated with a newly discovered potential hazard entity is similar to the existing hazard pattern community... If the relationship types in the data have a high degree of overlap, then the potential hazard entity node can be considered to be consistent with the pattern community at the traffic topology logical level. Based on this, the Jaccard similarity coefficient is used to calculate the topological connectivity overlap. Its definition is as follows:
[0086]
[0087] This indicator can effectively identify potential hazard entities that have a high degree of synergy in the traffic organization structure and control logic at intersections.
[0088] Step 2.3.2. Feature mapping and community centroid construction based on semantically aware similarity:
[0089] To further verify the matching relationship between potential entities and pattern communities at the semantic level, it is necessary to construct a representative description of the community in the feature space. Specifically, in the... In this iteration, the current hidden danger pattern community The embedding vectors of all entity nodes within the community are averaged to dynamically generate the community centroid vector. The calculation method is as follows:
[0090]
[0091] in, Community indicating potential hazards The number of entity nodes included. After obtaining the community centroid, the entity embedding vectors generated in step 2.1, which contain deep traffic business semantics, are used to calculate their relationship with the community centroid vector. The cosine similarity between them is used to obtain the semantic-perceived similarity.
[0092]
[0093] This similarity metric can reflect the degree of semantic consistency between the potential threat entity and the existing potential threat pattern in the high-dimensional semantic space.
[0094] Step 2.3.3. Weighted fusion and pattern determination based on dual-perception scoring:
[0095] Taking into account both topological consistency and semantic feature similarity, this invention introduces a weighted fusion coefficient. This is used to dynamically balance the influence weights of structural and semantic information in the pattern determination process. Finally, a comprehensive affinity score is calculated. Its expression is:
[0096]
[0097] The aforementioned evaluation mechanism effectively overcomes the pattern drift problem caused by relying solely on single structural similarity or semantic similarity by deeply coupling traffic physical topology with deep business semantic features, and achieves highly reliable matching between hidden danger entities and hidden danger pattern communities.
[0098] Step 2.4. Dynamic Evolution of Hazardous Pattern Communities:
[0099] This step aims to utilize the comprehensive affinity score generated in step 2.3. This drives the hierarchical abstraction of the traffic hazard knowledge graph from the underlying "data fragments" to "high-level hazard patterns," and achieves the final stable convergence of the hazard pattern community through an iterative optimization mechanism.
[0100] In the specific implementation process, the potential hazard entities are first dynamically reallocated based on the maximum affinity scoring criterion. For the potential hazard entities to be investigated in the intersection knowledge graph, all current candidate hazard patterns are traversed. Perform entity reassignment. Based on the maximum affinity criterion, dynamically assign entities to scoring systems. In the highest-ranking community, the allocation logic is as follows:
[0101]
[0102] This operation allows for the timely correction of erroneous clustering, enabling potentially problematic entities to be reassigned to the pattern communities that best align with their physical mechanisms and business logic.
[0103] Following the completion of a new round of hazard entity member allocation, the feature update and centroid evolution process of the hazard pattern community are executed simultaneously. Specifically, for the updated entity embedding set, the centroid vector of the community semantic space is recalculated. To simulate the adaptive evolution of traffic hazard knowledge during the iteration process, this ensures that the model community can continuously capture the latest hazard features in complex intersection scenarios. The calculation method is as follows:
[0104]
[0105] The aforementioned process of redistributing hazard entities and updating community characteristics is executed iteratively until the division results of hazard pattern communities tend to stabilize.
[0106] Step 3. Construction and formal expression of a hierarchical traffic hazard knowledge system:
[0107] After completing the construction of the traffic hazard knowledge graph described in step 1 and the hazard pattern recognition and evolution processing described in step 2, this invention further constructs a hierarchical traffic hazard knowledge system. Specifically, it constructs a system consisting of atomic hazard data layers. Semantic layer of hidden danger patterns and decision-making and reasoning guidance layer A hierarchical knowledge system of traffic hazards jointly constituted , recorded as This system is used to uniformly model and organize traffic hazard knowledge at different levels of abstraction. The atomic hazard data layer utilizes entity, relation, and attribute triples to comprehensively depict fine-grained factual information in traffic scenarios. The hazard pattern semantic layer organizes dispersed hazard entities into pattern units with clear business meanings through community centroid aggregation and affinity matching. The decision-making and reasoning guidance layer generates corresponding hazard pattern semantic meta-nodes by performing semantic summarization on stable communities. Thus establishing The top-down hierarchical mapping relationship.
[0108] Specifically, this invention addresses the atomic vulnerability data layer. In this layer, the traffic hazard knowledge graph constructed in step 1 is represented in a standardized manner. This layer uses a set of traffic hazard entities. A set of traffic semantic relationships between entities Based on entity attribute sets, it is used to fully depict the factual information of potential hazards in traffic scenarios.
[0109] Based on this, in the semantic layer of the hidden danger pattern In this layer, an abstract model is performed on the hazard pattern communities identified and stably converged in step 2. As the core organizational unit, through the corresponding community centroid vector Based on the comprehensive affinity score, the scattered hidden danger entities in step 1 are organized into hidden danger pattern units with clear business meaning.
[0110] Once the hazard pattern community has completed its evolution and reached a stable state, further steps are taken at the decision-making and reasoning guidance layer. The document provides a high-level overview and unified expression of hazard patterns. Specifically, it defines hazard patterns within communities. Perform semantic summarization to generate semantic meta-nodes for potential hazard patterns. It also constructs a hierarchical mapping relationship between semantic meta-nodes, hidden danger pattern communities, and underlying hidden danger entities. .
[0111] By constructing the hierarchical traffic hazard knowledge system described above, this step achieves unified integration and abstract expression of the processing results of Step 1 and Step 2, enabling traffic hazard knowledge to flow orderly between different granular levels. This provides a systematic, scalable reasoning path with pattern-level indexing for hazard identification, pattern analysis, and decision support in complex traffic scenarios.
[0112] Step 4. Intelligent diagnosis of intersection hazards enhanced by multi-path reasoning chain retrieval:
[0113] This stage aims to utilize the hierarchical traffic hazard knowledge system constructed in step 3, combined with a large language model, to perform deep reasoning and hazard diagnosis on the input perception data of specific intersections. In the reasoning and retrieval stage, real-time perception data of specific traffic intersections is received. This invention first uses a preset template to transform it into unstructured semantic description text. And employ a depth encoder Map the descriptive text to a high-dimensional query vector By calculating its semantic meta-nodes of various hidden danger patterns in the hierarchical knowledge system. Cosine similarity is used to achieve the transformation from perception and recognition to target semantic meta-nodes with risk mechanism characteristics. Precise anchoring. Based on this, knowledge-based intelligent agents are used in locally related subgraphs. The function that triggers the multi-dimensional logical reasoning chain extraction is used to specifically construct the evolutionary path chain. Root cause chain and related associated chains The system comprises a multi-path reasoning context set, where the evolutionary path chain captures the causal transmission path from the initial trigger through intermediate mechanisms to the final risk outcome; the root cause chain identifies common precursor nodes pointed to by multiple potential hazards through reverse traversal; and the associated chain identifies hazard characteristics coupled in specific environments based on the semantic diffusion of the core trigger. Subsequently, a reordering model based on deep semantic understanding is introduced to perform secondary screening and relevance scoring on the candidate reasoning chain set. Precise pruning is then performed to remove redundant noise, ultimately outputting a streamlined optimal logical evidence set. This lays the data foundation for generating in-depth diagnostic reports with evolutionary evidence chains.
[0114] Specifically, step 4 includes the following steps:
[0115] Step 4.1. Semantic Mapping and Potential Entity Localization:
[0116] This indicator system, in conjunction with the appendix to the "Methods for Investigating and Analyzing Hidden Dangers at Frequently Occurring Sections of Highways," defines geometric design categories to address the needs of intelligent diagnostics at intersections. Transportation Operations Control facilities and management analysis The standardized indicator symbol system is shown in Table 1.
[0117] Table 1: Attribute Table of Traffic Safety Hazard Investigation Indicators at Road Intersections
[0118] Indicator Number Indicator Name Refine attribute parameters (multi-dimensional breakdown) According to specifications / instructions <![CDATA[ d 1 ]]> Sight distance triangle adaptability 1. Measured sight distance (m); 2. Type of obstruction (building / greenery / facilities); 3. Lateral encroachment width of obstruction (m); 4. Design speed of intersection (km / h); 5. Slope of entrance and exit lanes (%) Article 9.3.1 of JTGD20-2017; Article 6.2.1 of CJJ152-2010 <![CDATA[ d 2 ]]> Channelization design synergy 1. Number / layout of channelization islands; 2. Number of turning lanes (left turn / right turn / U-turn); 3. Turning lane width (m); 4. Radius of curvature of guide lines (m); 5. Non-motorized vehicle lane separation method (physical / painted); 6. Spacing of pedestrian safety islands (m) Article 10.4.2 of JTGD20-2017; Article 7.3.2 of CJJ152-2010 <![CDATA[ d 3 ]]> Longitudinal and transverse linear coupling 1. Main line longitudinal slope (%); 2. Vertical curve radius within the intersection area (m); 3. Cross slope (%); 4. Superelevation transition section length (m); 5. Alignment smoothness (curvature change rate) Article 7.2.1 of JTGD20-2017; Article 5.3.1 of CJJ37-2012 <![CDATA[ d 4 ]]> Import / export channel functional adaptability 1. Number of entrance and exit lanes; 2. Lane width (m); 3. Length of transition section (m); 4. Design value of saturated flow rate of entrance lane (pcu / h); 5. Matching degree with the number of lanes of upstream and downstream sections (%) Article 6.3.1 of CJJ152-2010; *Traffic Engineering Handbook* <![CDATA[ d 5 ]]> Special scene design adaptability 1. Intersection type (signaled / unsignaled / roundabout); 2. Pedestrian crossing density (m / 100m); 3. Accessibility facilities configuration (tactile paving / ramps); 4. Speed bump spacing in school / hospital areas (m) GB50763-2012 "Code for Accessibility Design"; CJJ152-2010, Clause 8.2.1 <![CDATA[ j 1 ]]> Signal control coordination effectiveness 1. Traffic light type (motor vehicles / non-motor vehicles / pedestrians); 2. Number of phases / phase difference (s); 3. Green light duration (s / phase); 4. Timing cycle (s); 5. Adaptive timing response delay (s); 6. Synchronization rate with adjacent intersection signals (%) GA / T527-2019 Road Traffic Signal Control Methods; CJJ152-2010, Clause 9.2.1 <![CDATA[ j 2 ]]> Safety protection facility compatibility 1. Guardrail type (wave-shaped / concrete / flexible); 2. Guardrail height (m); 3. Guardrail protection level (A / B / SA); 4. Continuous guardrail length (m); 5. End treatment of guardrail at intersection entrances and exits (rounded end / crash-resistant end); 6. Clearance between guardrail and traffic lights / signs (m) JTG / TD81-2017, Clause 6.2.1; GB5768.2-2022 <![CDATA[ j 3 ]]> Signage and markings collaborative recognition 1. Sign type (warning / prohibition / instruction); 2. Sign visibility distance (m); 3. Marking material (hot melt / water-based / reflective film); 4. Marking reflectivity (mcd·lx⁻¹·m⁻¹); 5. Sign-marking consistency (semantic matching degree); 6. Marking wear degree (%); 7. Nighttime lighting adaptability (illuminance lx) GB5768.2-2022; GB5768.3-2009; JTG / TD81-2017 <![CDATA[ j 4 ]]> Completeness of ancillary safety facilities 1. Distance from stop line to pedestrian crossing (m); 2. Pedestrian crossing signal timing (s); 3. Speed bump height / spacing (mm / m); 4. Coverage range of monitoring equipment (%); 5. Emergency telephone installation density (locations / km); 6. Response speed of water accumulation monitoring equipment (s) GB5768.3-2009; CJJ152-2010, Clause 8.3.1 <![CDATA[ j 5 ]]> Aging facilities and timely maintenance 1. Service life of traffic lights (years); 2. Corrosion degree of guardrails (%); 3. Repainting cycle of road markings (months); 4. Response time for facility malfunction repairs (hours); 5. Frequency of regular inspections (times / year) Technical Specification for Maintenance of Urban Road Facilities CJJ36-2016; JTGH10-2009 <![CDATA[o1]]> Traffic flow supply and demand coupling status 1. Traffic flow by direction and time period (pcu / h / direction); 2. Saturation of approach lanes (by time period); 3. Queue length (m / lane); 4. Queue overflow frequency (times / h); 5. Large vehicle mixing rate (%); 6. Tidal traffic fluctuation coefficient (peak / off-peak) General evaluation standards in the field of traffic engineering; "Evaluation Indicators for Urban Road Traffic Operation" GB / T33171-2016 <![CDATA[o2]]> Multimodal traffic conflict intensity 1. Conflict type (intersection / rear-end collision / lane change / pedestrian-motor vehicle); 2. Conflict frequency (times / hour); 3. Conflict severity (minor / moderate / serious); 4. Conflict distribution by time of day (peak / off-peak / night); 5. Non-motorized vehicle traffic (vehicles / hour); 6. Pedestrian crossing traffic (person-times / hour) Article 10.2.1 of the "Specification for Safety Evaluation of Highway Projects" (JTGB05-2015; CJJ152-2010) <![CDATA[o3]]> Dynamics of road surface operating conditions 1. Road surface bearing capacity (BPN) (dry / wet); 2. Road surface roughness index (IRI) (m / km); 3. Road surface damage rate (%); 4. Road surface water depth (mm); 5. Road surface temperature (°C); 6. Visibility (m / night / foggy weather) JTGH20-2007; Technical Specifications for Urban Road Maintenance CJJ36-2016 <![CDATA[o4]]> Traffic flow stability and disturbance level 1. Standard deviation of vehicle speed (km / h); 2. Frequency of sudden acceleration / deceleration (times / h / lane); 3. Impact range of temporary road construction (m); 4. Number of illegally parked vehicles (vehicles / 100m); 5. Duration of impact of sudden accidents (min) GB / T33171-2016; GA / T900-2010 "Traffic Organization Specification for Urban Road Construction Operations" <![CDATA[ l 1 ]]> Accident characteristics and risk accumulation 1. Total number of accidents in the past 3 years; 2. Percentage of accidents by type (side collision / rear-end collision / pedestrian / non-motorized vehicle); 3. Distribution of accident severity (minor / moderate / major); 4. Distribution of accidents by time (peak hours / night / severe weather); 5. Concentration of accident locations (% / 10m interval); 6. Accident recurrence rate (%) Provisional Regulations on Statistics of Road Traffic Accidents; JTGB05-2015 <![CDATA[ l 2 ]]> Effectiveness of traffic violation control 1. Average annual total number of violations (incidents); 2. Percentage of key violation types (running red lights / speeding / failure to yield to pedestrians / illegal lane occupation); 3. Violation detection rate (%); 4. Control intensity during peak violation periods (police force / personnel); 5. Violation penalty enforcement rate (%) Regulations on Procedures for Handling Violations of Road Traffic Safety; Local Traffic Management Regulations <![CDATA[ l 3 ]]> Completeness of safety management mechanism 1. Frequency of hazard inspections (times / year); 2. Hazard rectification completion rate (%); 3. Safety education coverage rate (% / surrounding communities / schools); 4. Completeness of emergency response plans (whether they cover multiple scenarios); 5. Frequency of emergency drills (times / year); 6. Efficiency of multi-department collaborative governance (response days for rectification). Regulations on Highway Safety Protection; Regulations on Urban Road Management <![CDATA[ l 4 ]]> Special scenario management adaptability 1. School / hospital area student / medical care time management (whether implemented); 2. Traffic control response speed in severe weather (min); 3. Completeness of holiday traffic management plans; 4. Nighttime lighting duration (h); 5. Timeliness of temporary traffic control information dissemination (min). Local traffic management regulations; Article 11.2.1 of CJJ152-2010
[0119] First, regarding the input intersection sensing data... The system extracts attribute values for categories including geometric design, control facilities, traffic operation, and management analysis. Using a pre-defined natural language template filling technique, these discrete indicators are transformed into unstructured semantic descriptive text. :
[0120]
[0121] Secondly, cross-modal semantic space mapping is performed. A pre-trained deep embedding model is used as the encoder. semantic description text Transform into a high-dimensional query vector Meanwhile, based on user queries Traffic hazard map mode Using intelligent agents Extracting core semantic keywords of potential hazards :
[0122]
[0123] Then Mapped to semantic vectors in a high-dimensional feature space Based on this, the semantics of the comprehensive query and the knowledge graph of traffic hazards are calculated. Semantic meta-nodes of various hidden danger patterns in China Corresponding centroid vector The similarity between them is used to complete semantic anchoring:
[0124]
[0125] in, This represents the vector representation of the semantic meta-nodes of the hazard pattern in the embedding space. Therefore, the system no longer uses a single hazard entity as the starting point for inference, but instead uses a high-level semantic pattern index that can characterize a class of traffic risk mechanisms. As the anchor point for reasoning and retrieval, i.e. the target semantic meta node.
[0126] Step 4.2. Expanding and retrieving hidden danger knowledge based on multidimensional logical chains:
[0127] After anchoring the semantic meta-nodes of the hidden danger pattern, the next step is to construct a multi-dimensional reasoning chain dominated by high-level semantic patterns. This step no longer uses an unconstrained graph traversal approach, but instead proposes a multi-path reasoning chain extraction method based on the semantic constraints of the hidden danger mechanism. By redefining the state transition rules, path retention conditions, and termination criteria in the graph traversal process, a highly reliable retrieval of the deep-seated causes of hidden dangers and their evolutionary relationships can be achieved.
[0128] First, based on the target semantic meta nodes Its corresponding hidden danger model community Construct a set of candidate potential hazard entities induced by the pattern. Subsequently, with As a seed set, a depth of [value] is executed in the traffic hazard knowledge graph. The subgraph expansion operation obtains locally related subgraphs. , .in, This represents the subgraph extraction operator. Based on this, the path extraction function is called. For the local associated subgraph By traversing and extracting the paths, we obtain the initial set of paths (the original inference set). , recorded as .
[0129] In this embodiment, under the semantic constraints of the hidden danger pattern, the following three types of logical reasoning chains are constructed in parallel to form a multi-path reasoning context set.
[0130] In the head-to-tail retrieval process, this invention proposes a method for extracting hazard evolution paths based on causal semantic constraints, primarily used to address the complex "cause-evolution-accident risk" chain problem in the hazard investigation process at road intersections. This method uses... As the initial state, during graph traversal, an edge attribute filter is introduced, allowing state transitions only along edges whose relation semantic type belongs to the "cause" or "induce" set, and forcing entity nodes with the semantic type labeled "risk outcome" as the search termination condition, thus obtaining an evolutionary path that satisfies the following form: For example, starting with "insufficient length of the dedicated left-turn lane", the logic can be used to capture "risk of rear-end collision" as the endpoint, thus capturing the dynamic causal chain of the hidden danger.
[0131] In the tail-to-tail retrieval process, this invention designs a topological pattern matching mechanism based on multi-source hazard reverse tracing, mainly used to solve the common problem of "multiple abnormal phenomena occurring concurrently, but the root cause is unknown" in intersection hazard investigation. For multiple identified hazard entities, reverse traversal is performed along their incoming edges to extract their predecessor node sets. A semantic intersection calculation strategy is introduced during the traversal process to filter common predecessor entities simultaneously pointed to by multiple hazard phenomena, using a formula... Identify the underlying root cause nodes that multiple hidden dangers point to. This is used to characterize the root causes of multiple concurrent hazards. For example, the system can identify that problems such as "difficult driver visibility" and "discrete vehicle trajectories" both stem from a deep-seated design issue: "oversized intersections."
[0132] In the head-to-head retrieval process, this invention designs a hazard co-occurrence feature retrieval method based on the semantic diffusion of core causes, mainly used to solve the complex scenario of "a single cause triggering multiple types of hazards simultaneously" in on-site inspections of intersections. In this method, core cause entities with high causal frequency and high semantic weight are first identified in the local association subgraph. This entity is then used as the diffusion center. Subsequently, a restricted expansion is performed in parallel along the outgoing edges of this entity to retrieve entities exhibiting multiple potential problems simultaneously under the same triggering factor, constructing a symbiotic relationship chain in the following form: For example, under the inducement of "greenery obstruction," accompanying phenomena such as "insufficient observation" and "reduced safety level" were simultaneously retrieved.
[0133] Furthermore, to eliminate redundant noise in the initial multi-path inference chain and improve overall inference efficiency, this step introduces a reranking model (Reranker) based on deep semantic understanding to perform secondary screening and priority ranking of the candidate inference chain set. The reranking model (Reranker) uses bge_reranker_large as the base model and leverages its fine-tuning capability on large-scale asymmetric instruction data to perform refined modeling of the matching degree between query semantics and inference chain semantics.
[0134] Before performing the rearrangement, the system first bases the results on the user query. A preliminary search is performed in a pre-defined knowledge base to obtain candidate knowledge texts associated with the user's query, and these are used as the preliminary search output. In its implementation, the system no longer relies on traditional keyword matching methods based on word frequency, but instead directly retains the user's query... and predictive retrieval output The complete natural language structure is used to construct a joint semantic input through semantic concatenation operations, and further semantically aware chunking processing is performed on the joint semantic input to construct a reference semantic set without destroying the syntactic structure and contextual dependencies.
[0135]
[0136] Subsequently, the system Using a semantic benchmark, the original inference set is calculated through a unified deep semantic relevance. Each logical chain is scored for importance. Finally, the chains with the highest scores are retained. The reasoning chain forms a simplified set of inferences. :
[0137]
[0138] in, Through this rearrangement strategy, the system can effectively filter out irrelevant noise and accurately identify the optimal logical evidence supporting the diagnosis of potential problems in the geometric design of intersections, laying a data foundation for the generation of subsequent diagnostic reports.
[0139] Step 5. Generating an intelligent diagnostic report that integrates context and explicit reflection:
[0140] This step aims to transform the multi-level, multi-link structured traffic hazard knowledge built in the previous steps into a deep diagnostic report of intersection safety hazards with clear causal basis, compliance with industry standards, and engineering credibility, based on an agent-based reasoning framework. Addressing the problems of semantic illusion arising from relying solely on large language models and the difficulty of traditional rule engines in handling complex hazard relationships in existing technologies, this invention introduces an agent-based reasoning mechanism with compliance constraints and explicit reflection capabilities, constructing a diagnostic framework based on a cyclical mechanism of perception, reasoning, and reflection. In this framework, the system will include a predicted output. Memory states that include intermediate reasoning states and historical records A set of rules representing compliance standard constraints. Real-time sensing data and the optimal logical reasoning set Deep semantic coupling is employed to provide a strongly constrained prior space for hazard diagnosis. Based on this, the intelligent agent is rethinked. Perform iterative reasoning to continuously update the intermediate reasoning state. It also introduces a symbolic physical constraint verification module to calculate the inconsistencies in technical parameters. This enables the understanding of inference paths and on-site observations such as line-of-sight triangles or channelization schemes. A quantitative assessment of consistency between them.
[0141] Finally, based on the final memory representation after stable convergence. The system maps it into a closed-loop diagnostic report according to the preset format requirements. The report presents a complete logical evolutionary evidence chain from the initial causal entity through intermediate mechanism nodes to the risk outcome entity in a structured manner, which significantly improves the engineering credibility and scientific rigor of the diagnostic results.
[0142] Specifically, step 5 includes the following steps:
[0143] Step 5.1. Constructing and anchoring rules for an agent model with compliance constraints:
[0144] First, a diagnostic framework based on the "perception-reasoning-reflection" cyclical mechanism is constructed, which is formally represented as follows: Within this framework, The predicted output defined in step 4.2 serves as the logical starting point for diagnostic reasoning; This refers to a memory state that includes intermediate reasoning states and historical records. A set of rules constrained by compliance standards; A constrained reflective agent with explicit reflective capabilities.
[0145] Based on the constructed overall framework, firstly, this patent uses semantic anchoring technology to filter and extract the current intersection perception indicators from the global knowledge graph. The associated set of legally mandated technical parameters (a set of rules constrained by compliance standards). .
[0146]
[0147] in, The compliance rule retrieval operator is specifically defined as a knowledge mining function based on semantic feature matching, used to perceive indicators at the current intersection. As a retrieval constraint, in the global traffic hazard knowledge graph The system locates and extracts the corresponding technical thresholds from industry standards, regulations, and design benchmarks.
[0148] The set As a reflective agent in step 5.3 Explicit constraints in the reasoning process, such as the minimum safety threshold for sight distance triangles, intersection channelization design specifications, and related traffic facility configuration requirements, effectively suppress the risk of model illusion and improve the engineering feasibility and review credibility of diagnostic results.
[0149] Step 5.2. Engineering design of prompts based on multimodal context fusion:
[0150] This step performs context fusion based on PromptEngineering.
[0151] The system will query user queries Predictive search output Semantic coupling is achieved with the reasoning chain connected by directed arrows. Using explicit symbolic anchoring techniques, the aforementioned multi-source heterogeneous information is injected into the prompt template according to the structured constraints shown in Table 1. It is used to construct reasoning-guided texts with structured constraints and to serve as a reflective intelligent agent. The core logic input.
[0152] This step uses a prompt template for the reflective agent. It provides a strongly constrained prior space, requiring that the generated diagnostic suggestions be highly aligned with the perceived physical features (current intersection perception indicators) at both the semantic and physical levels. Compliance requirements This ensures the closed-loop nature of the diagnostic logic.
[0153] In this embodiment, the prompt template The logic is as follows:
[0154] Assume the current user is a seasoned traffic safety engineering expert and compliance reviewer. The task is to intelligently diagnose potential hazards at road intersections and generate a remediation report based on provided real-time perception data, logical reasoning chains, and legal regulations.
[0155] #External constraints ( - Forced alignment):
[0156] The following are the legal standards and normative constraints relevant to the current scenario. Your diagnostic conclusions must strictly meet the following thresholds: {{ }}.
[0157] #Environment Context ( -On-site perception):
[0158] The current real-time operating status parameters of the intersection are: {{ }}.
[0159] #Logical Evidence Chain ( -Evolutionary reasoning):
[0160] The multi-link reasoning evidence provided by the knowledge graph is as follows:
[0161] - Evolutionary path chain: {{ .evolution_chains}} (demonstrates the evolution from incentive to risk).
[0162] - Root cause chain: {{ .root_cause_chains}} (Reveals the common source of conflict for multiple phenomena).
[0163] - Associated companion chains: {{ .association_chains}} (Identify potential problems arising from coupling).
[0164] #User diagnostic needs( ):
[0165] Analyze the specific questions asked by users: {{ }}.
[0166] #Task Requirements and Reflection Logic Core instructions):
[0167] 1. Perceptual alignment: Verify {{ Does the parameter in}}} violate {{ Mandatory standards in}}
[0168] 2. Logical verification: Analyze {{ Does the provided chain of reasoning possess physical plausibility?
[0169] 3. Explicit Reflection: If the preliminary conclusion finds that "the line-of-sight triangle is blocked," but {{ The statement "The channelization plan has cleared the widened area" is a logical contradiction that needs to be corrected immediately.
[0170] 4. Evidence Retrospection: The report must explicitly cite {{ The causal entity and the dangerous result in}}.
[0171] #Output Format (Diagnostic Report) ):
[0172] Please provide suggestions for closed-loop governance strategies, including:
[0173] - [Hazard Conclusion]: Identify the type and severity of the hazard.
[0174] - [Evolutionary Evidence]: A detailed description of the complete evolutionary chain from cause to risk.
[0175] - [Compliance Determination]: Indicates the specific regulatory item that was violated (such as GB5768).
[0176] -[Governance Recommendations]: Provide targeted engineering solutions.
[0177] Step 5.3. Iterative Reasoning and Physically Constrained Explicit Reflective Optimization:
[0178] After completing the prompting engineering and compliance rule anchoring, reflect on the intelligent agent. The system then enters the iterative reasoning and reflective optimization phase. This phase introduces an explicit memory update mechanism to achieve dynamic correction and gradual convergence of the diagnostic logic. Before executing the iterative reasoning, the system first acquires the initial memory state. The specific process is to retrieve the user query. The predicted retrieval output And the simplified inference set By performing structured encapsulation, an initial memory state is constructed to serve as the starting point for reasoning. , recorded as Subsequently, the reflective intelligent agent In the In the next inference loop, an incremental inference conclusion is generated, and the following state update process is performed:
[0179]
[0180] in, Representing the The memory state at the end of the next reasoning loop The output is the incremental conclusion generated after the logical verification of the previous memory state in the current step. This represents the new memory state after incorporating the incremental conclusions. Subsequently, in the... During each inference loop, the system uses the attribute parsing operator to extract key technical parameter values from the currently generated intermediate inference conclusions. And compare it with the statutory threshold parameters specified in the compliance rules set and the field observation parameter values in the sensing data. Perform numerical alignment and consistency comparison.
[0181] Based on the above comparison results, the system introduces contradictory losses. This is used to characterize the degree of conflict between the reasoning path and physical constraints, and its calculation formula is defined as:
[0182]
[0183] in, For the first The weighting coefficients of each traffic evaluation indicator. This indicates the direction of the polarity constraint corresponding to the indicator. This is a vector of field observations. To start from the current memory state The system extracts the predicted technical parameters of the nth traffic evaluation index from the inference conclusions. Through logical reflection and self-checking using this contradictory loss function, the system can accurately identify whether there is a significant data-level conflict between the initial hazard judgment, such as "obstructed sight triangle," and the physical facts on site, such as "the widened area has been cleared."
[0184] Step 5.4. Output a closed-loop diagnostic report with an evolutionary chain of evidence:
[0185] After the iterative reasoning and explicit reflection processes are completed, the final memory representation that has reached a stable convergent state is obtained. Based on this final memory state, and following the preset output format requirements in the prompt template in step 5.2, the logical reasoning features in the final memory representation are mapped into a closed-loop diagnostic report with natural language semantics. .in, It includes engineering modification suggestions (such as channelization modification), timing optimization suggestions (such as adding full red time), and management and enforcement suggestions, corresponding to the four types of indicator systems defined in step 4.1.
[0186] The final intersection hazard diagnosis report not only provides clear qualitative conclusions about the hazards and remediation recommendations, but also presents a complete logical evolutionary evidence chain composed of multi-path reasoning results in a structured manner. This evidence chain clearly demonstrates the entire process of the hazard evolving from the initial causal entity, through intermediate mechanism nodes, to the final risk outcome entity, giving the diagnosis conclusions traceable, interpretable, and auditable engineering attributes.
[0187] The present invention also provides an electronic device, comprising: one or more processors and a memory; wherein the memory is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the road intersection hazard diagnosis method based on adaptive graph and multi-link reasoning described above.
[0188] The present invention also provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described method for diagnosing road intersection hazards based on adaptive graph and multi-link reasoning.
[0189] Those skilled in the art will understand that all or part of the functions of the various methods / modules in the above embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, which may include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the above functions can be implemented by executing the program with a computer. For example, the program can be stored in the memory of a device, and when the program in the memory is executed by the processor, all or part of the above functions can be implemented.
[0190] In addition, when all or part of the functions in the above embodiments are implemented by computer programs, the programs can also be stored in storage media such as servers, other computers, disks, optical discs, flash drives, or portable hard drives. They can be downloaded or copied to the memory of the local device, or the system of the local device can be updated. When the program in the memory is executed by the processor, all or part of the functions in the above embodiments can be implemented.
[0191] The above-described specific examples are for illustrative purposes only and are not intended to limit the scope of the invention. Those skilled in the art can make various simple deductions, modifications, or substitutions based on the principles of this invention. Therefore, the scope of protection of this invention should be determined by the scope of the claims.
Claims
1. A road intersection hazard diagnosis method based on adaptive atlas and multi-link reasoning, characterized in that, The method includes the following steps: Step 1. Construct a knowledge graph of traffic hazards; Step 2. For the constructed traffic hazard knowledge graph, gather the data of each entity node in its first-order neighborhood, extract and encode the context embedding vector of the entity node, then concatenate them, and perform summation and smoothing on the data in the neighborhood to obtain the entity embedding vector for the next iteration; organize the entity embedding set of each iteration based on the clustering algorithm to generate an initial cluster candidate set, and quantify the association affinity between the entity embedding vector and each hazard pattern community in the initial cluster candidate set; then, dynamically reallocate the entity nodes based on the maximum affinity scoring criterion, and simultaneously execute the feature update and centroid evolution process of the hazard pattern community until the partitioning result of the hazard pattern community tends to be stable; Step 3. Construct a hierarchical traffic hazard knowledge system consisting of an atomic hazard data layer, a hazard pattern semantic layer, and a decision-making and reasoning guidance layer. Process the traffic hazard knowledge graph and establish the hierarchical mapping relationship between semantic meta-nodes, hazard pattern communities, and underlying hazard entities, with the hazard pattern community as the core organizational unit. Step 4. Based on real-time perception data of the intersection and user queries, extract the core semantic keywords of the hidden dangers, calculate the similarity between them and the semantic meta nodes of each hidden danger pattern, determine the target semantic meta nodes, and then use the multi-path reasoning chain extraction method based on the semantic constraints of the hidden danger mechanism to retrieve the deep causes of the hidden dangers and their evolutionary relationships, and output the logical evidence set. Step 5. Construct a diagnostic framework based on the "perception-reasoning-reflection" cyclical mechanism, and output a diagnostic report based on the logical evidence set.
2. The method of claim 1, wherein, Step 1 first constructs a comprehensive database that integrates general domain knowledge and intersection perception data. Semantic segmentation is performed on the unstructured domain knowledge corpus. A knowledge extraction method based on adaptive hazard pattern constraints is used to extract data that meets the constraints from the unstructured text. The extracted data is then structured, mapped, and integrated to construct a traffic hazard knowledge graph.
3. The adaptive map and multi-link reasoning based road intersection hazard diagnosis method of claim 1, wherein, In step 2, the association affinity calculation between the entity embedding vector and each hidden danger pattern community in the initial cluster candidate set comprehensively considers the topological connectivity overlap based on the Jaccard coefficient and the semantic perception similarity based on cosine similarity, and introduces a weighted fusion coefficient. Finally, a comprehensive affinity score is calculated. The expression is: ; in, For topological connectivity overlap, For semantically perceived similarity, Representing the The entity embedding vector of the next iteration. This represents a community with a potential safety hazard.
4. The adaptive map and multi-link reasoning based road intersection hazard diagnosis method of claim 1, wherein, In step 3, the atomic hazard data layer uses entity, relation, and attribute triples to fully characterize the factual information of hazards in the traffic scenario; the hazard pattern semantic layer organizes scattered hazard entities into hazard pattern units with clear business meaning through community centroid aggregation and comprehensive affinity scoring matching; and the decision-making and reasoning guidance layer generates corresponding hazard pattern semantic meta-nodes by performing semantic summarization on stable hazard pattern communities. Thus establishing semantic meta-nodes Hidden Danger Model Community The top-down hierarchical mapping relationship of underlying hidden entities.
5. The adaptive map and multi-link reasoning based road intersection hazard diagnosis method of claim 1, wherein, Step 4 extracts various attribute values from the input real-time intersection perception data, including geometric design, control facilities, traffic operation, and management analysis. Then, the discrete indicators are converted into unstructured semantic description text. Subsequently, a pre-trained deep embedding model is used as an encoder to transform the semantic description text into a high-dimensional query vector. Based on user queries and traffic hazard map patterns, core semantic keywords of hazards are extracted and mapped into semantic vectors in a high-dimensional feature space. Finally, the semantic vectors and centroid vectors corresponding to the semantic metanodes of each hazard pattern in the traffic hazard knowledge graph are calculated. Similarity between them, in order to characterize a class of traffic risk mechanisms through high-level semantic pattern indexing. As an anchor point for reasoning and retrieval, i.e., the target semantic meta-node, .
6. The adaptive map and multi-link reasoning based road intersection hazard diagnosis method of claim 1, wherein, The specific steps of step 4, which uses a multi-path reasoning chain extraction method based on semantic constraints of hazard mechanisms to retrieve the deep-seated causes and evolutionary relationships of hazards, are as follows: First, construct a set of candidate hazard entities induced by the pattern based on the target semantic meta-node and its corresponding hazard pattern community; then, using the set of candidate hazard entities as the seed set, perform a deep-level [analysis / process] in the traffic hazard knowledge graph. The subgraph expansion operation is used to obtain a locally related subgraph. Then, the locally related subgraph is traversed and extracted to obtain the original inference set. Finally, the original inference set is filtered and prioritized based on the rearrangement model to form a simplified inference set, i.e., the logical evidence set. When performing logical reasoning on local related subgraphs, three types of logical reasoning chains are constructed: evolutionary path chain, root cause chain, and associated chain. Evolutionary path chain ; root cause traceability chain ; Associated companion strand ; in, As the core inducing entity, As a deep-seated trigger node, Representing entities, Representational relationship.
7. The adaptive map and multi-link reasoning based road intersection hazard diagnosis method of claim 1, wherein, Step 5 first uses the current intersection perception index as a retrieval constraint to locate and extract the rule set of related compliance standard constraints in the global traffic hazard knowledge graph. This rule set serves as the explicit constraint base for the reasoning process of the reflective agent. The user query and the preliminary retrieval output obtained based on the user query are semantically coupled with the reasoning chain connected by directed arrows in the logical evidence set. Then, multi-source heterogeneous information is injected into the prompt template. The reflective agent performs closed-loop diagnosis in the background prior space of the constraints provided by the prompt template. After iterative reasoning and logical reflection self-checking, the final memory representation of the stable convergence state is obtained. Finally, the logical reasoning features in the final memory representation are mapped into a closed-loop diagnostic report with natural language semantics.
8. The adaptive map and multi-link reasoning based road intersection hazard diagnosis method of claim 2, wherein, When performing semantic segmentation in step 1, a sliding window method with overlapping intervals is used for segmentation; when constructing the traffic hazard knowledge graph, a traffic hazard graph pattern is defined. The adaptive knowledge extraction agent uses the traffic hazard map pattern as the boundary and extracts a set of triples that meet the constraints from the unstructured text for each document. By performing structured mapping and integration on the extracted discrete triples, a traffic hazard knowledge graph is constructed. ;in, For entity type, For relational types, For attribute set, Representing entities, Representative relationship, Indicates a collection of entities that pose traffic hazards. Represents a set of relationships between entities. Represented as a collection of entity attributes; The traffic hazard map pattern is iteratively updated through continuous interaction between the knowledge extraction agent and traffic domain knowledge content. The knowledge extraction agent analyzes the potential relationship patterns in each document through an update function and automatically proposes a set of pattern expansion suggestions. Then update the current iteration mode: ;in, , Representing the , The set of traffic hazard map patterns in the next iteration The confidence threshold is the confidence level. Determining the frequency of self-verifying scores or logical consistency across documents based on large language models.
9. The adaptive map and multi-link reasoning based road intersection hazard diagnosis method of claim 3, wherein, The topological connection overlap degree in step 2 The expression is: ; in, For the physical nodes of potential hazards to be identified The set of all relationship types in the traffic hazard knowledge graph. For summarization The union of relations formed by the relation types involved in all entity nodes within the set; Semantic similarity The expression is: ; wherein, is the community centroid vector generated in the first iteration process by performing an arithmetic average operation on the embedding vectors of all entity nodes within the current hidden pattern community.
10. The method for diagnosing road intersection hazards based on adaptive graph and multi-link reasoning according to claim 6, characterized in that, In step 4, during the evolutionary path chain retrieval process, a method for extracting potential evolutionary paths based on causal semantic constraints is employed. As the starting state, during the graph traversal, an edge attribute filter is introduced to allow state transitions only along edges whose relation semantic type belongs to the "cause" or "induce" set, and to force entity nodes with semantic type labeled as "risk outcome" as the search termination condition. During the root cause tracing chain retrieval process, a topological pattern matching mechanism based on reverse tracing of multiple hidden dangers is adopted. For multiple identified hidden danger entities, reverse traversal is performed along their incoming edge directions to extract their predecessor node set. In the traversal process, a semantic intersection calculation strategy is introduced to filter out common predecessor entities that are simultaneously pointed to by multiple hidden danger phenomena, i.e., deep cause nodes. During the retrieval of associated chains, a retrieval method for hazard-related features based on semantic diffusion of core causes is adopted. First, the core cause entity is identified in the local subgraph and used as the diffusion center. Subsequently, a restricted expansion is performed in parallel along the outgoing edge direction of the core inducing entity to retrieve multiple potential hazard entities that appear simultaneously under the same inducing effect.
Citation Information
Patent Citations
A city road physical structure hidden danger checking method, device and electronic equipment
CN115600896B
Large model question and answer method, device and equipment for traffic industry and storage medium
CN118585632A
Road traffic potential safety hazard troubleshooting method and system based on AR panoramic technology
CN119027295A
Traffic question and answer method, device and equipment based on large language model and medium
CN120045655A
Vehicle safety domain modeling and conflict risk assessment method based on visual constraint
CN120913442A