Road operation early warning report generation method and system based on knowledge graph and double-path retrieval fusion

CN123013869APending Publication Date: 2026-10-30HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611269181.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-20
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0008]本发明目的是为了解决现有基于纯文本RAG的预警生成方法存在的知识结构化缺失导致逻辑链不完整、检索信息平面化导致处置措施缺乏针对性、以及大语言模型缺乏结构化约束导致幻觉风险高的问题,本发明提供一种基于知识图谱与双路检索融合的道路运营预警报告生成方法及系统

Benefits of technology

[0035]本发明核心思想以“知识图谱结构化因果链(步骤S1)”替代纯文本片段堆叠作为推理骨架,以“双路并行检索(步骤S2)”替代单一语义相似度召回,以“约束性生成(步骤S3)”替代无边界自由生成。具体优点如下:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123013869A_ABST
    Figure CN123013869A_ABST
Patent Text Reader

Abstract

The application discloses a road operation early warning report generation method and system based on knowledge graph and double-path retrieval fusion, and relates to the cross technical field of intelligent traffic management and knowledge engineering. The application solves the problems of the existing early warning generation method based on pure text RAG, that is, the incomplete logic chain caused by the lack of knowledge structure, the lack of pertinence of disposal measures caused by the planarization of retrieval information, and the high illusion risk caused by the lack of structured constraints of large language models. The application constructs a multi-level causal logic chain knowledge graph composed of five types of entities, i.e., meteorological events, disaster-causing factors, disaster consequences, coping measures and emergency resources, and the pointing relationship thereof; when early warning is triggered, the double-path parallel execution of semantic retrieval and graph retrieval is performed to obtain standard specification text segments and structured disposal knowledge; the retrieval results, priority, traceability and numerical accuracy are jointly injected into a large language model to generate a structured early warning report. The application is mainly applied to road operation and traffic control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of intelligent traffic management and knowledge engineering. Background Technology

[0002] In road operation and management, emergency response to severe weather conditions such as rain, snow, ice, strong winds, and dense fog relies heavily on standards, regulations, emergency plans, and historical experience. Operations personnel must quickly review relevant materials and formulate response measures; these decisions directly impact traffic safety and efficiency. Currently, utilizing large language models combined with Retrieval Enhanced Generation (RAG) technology to assist in generating early warning reports has become a trend. A common practice is to pre-vectorize standard specifications, emergency plans, and other documents and store them in a knowledge base. When an early warning is triggered, relevant text fragments are retrieved and used as context input to the large language model to generate an early warning report with professional background information.

[0003] However, in practical applications, existing warning generation methods based on plain text RAGs have the following problems:

[0004] First, there is a lack of structured knowledge. Emergency response in road operations involves a multi-level chain of logical relationships: "meteorological factors → disaster-causing factors → disaster consequences → countermeasures → required resources." For example, the meteorological condition of "blizzard" leads to the disaster-causing factor "snow accumulation on the road surface," which in turn causes the disaster consequence of "a 60% reduction in road surface adhesion coefficient," requiring countermeasures such as "speed limit of 40 km / h" and "spreading of environmentally friendly de-icing agents." These measures, in turn, require corresponding resource support such as "de-icing vehicles" and "de-icing agent warehouses." While this complete logical chain is reflected in the texts of various standards, specifications, and emergency plans, it is scattered across different chapters and documents. Vectorized retrieval of pure text can only match text fragments based on semantic similarity, failing to characterize and utilize the structured relationships between these entities, resulting in a lack of hierarchy and completeness in the retrieval results.

[0005] Second, the basis for early warning generation is flat. Traditional RAG methods retrieve a flat list of document fragments from the knowledge base, which lack explicit logical connections (such as causal relationships, conditional relationships, and dependency relationships). After receiving this fragmented information, the large language model struggles to accurately reconstruct the correspondence between measures and disaster-causing factors, easily applying inappropriate measures to the generated early warning report, resulting in a lack of specificity and accuracy in the response recommendations.

[0006] Third, the risk of illusion in large models is difficult to control. Large language models, lacking sufficient structured constraints, tend to generate "illusory" content—that is, fabricating non-existent measures, resource allocations, or standard parameters. In high-risk decision-making scenarios such as road operation safety, a fictitious speed limit or snow removal plan could lead to serious safety accidents or resource waste. While existing RAG methods alleviate the illusion problem to some extent by providing reference text, the unstructured nature of text fragments means the model may still deviate from the original knowledge during the generation process.

[0007] Therefore, it is urgent to address the problems in existing warning generation methods based on plain text RAG, such as the lack of knowledge structuring leading to incomplete logical chains, the flatness of retrieved information leading to a lack of targeted response measures, and the lack of structured constraints in large language models leading to a high risk of hallucinations. Summary of the Invention

[0008] The purpose of this invention is to address the problems of existing warning generation methods based on plain text RAG, such as incomplete logical chains due to lack of knowledge structure, lack of targeted response measures due to flat retrieval information, and high risk of illusion due to lack of structured constraints in large language models. This invention provides a method and system for generating road operation warning reports based on the fusion of knowledge graph and dual-path retrieval.

[0009] A road operation early warning report generation method based on the fusion of knowledge graph and dual-path retrieval, the method includes:

[0010] S1. Constructing a knowledge graph: Extract and store five types of entities—meteorological events, disaster-causing factors, disaster consequences, response measures, and emergency resources—from standards, regulations, emergency plans, and historical handling records related to road operation and management. These entities are categorized into cause relationships, trigger relationships, response relationships, and need relationships. Cause relationships point from meteorological events to disaster-causing factors; trigger relationships point from disaster-causing factors to disaster consequences; response relationships point from disaster consequences to response measures; and need relationships point from response measures to emergency resources.

[0011] The five types of entities and the pointing relationships between them form a multi-level causal logic link graph for road operation management, from meteorological events to emergency resources. This multi-level causal logic link graph serves as a knowledge graph, with the five types of entities serving as nodes and the pointing relationships between entities serving as edges.

[0012] S2. When an alert is triggered, two paths are executed in parallel to retrieve data.

[0013] Path 1: Using the text describing the current road section's weather conditions as input, the text knowledge base is invoked for semantic retrieval to obtain several standard and specification text fragments with the highest similarity; the text knowledge base stores the complete full-text content of various standards and specifications, emergency plans, and historical handling documents in the field of road operation;

[0014] Path 2: Using the name of the disaster-causing factor of the current road segment as input, the knowledge graph is called for retrieval. The name of the disaster-causing factor of the current road segment is matched with the disaster-causing factor name attribute of the disaster-causing factor entity in the knowledge graph. Starting from the matched node, a multi-hop graph traversal is performed along the triggering relationship and the response relationship to obtain the disaster consequences, response measures and emergency resources associated with the current disaster-causing factor. The retrieval results are then assembled into structured JSON data for output.

[0015] S3, Constraint-based early warning report generation:

[0016] All standard and specification text fragments retrieved from Path 1 are used as background knowledge, the structured JSON data retrieved from Path 2 is used as structured measure knowledge, and the constructed constraints are used as contextual information for road operation and management. This information is then filled into the prompt word template and injected into the large language model to generate a structured early warning report.

[0017] The constructed constraints include priority constraints, traceability constraints, and numerical accuracy constraints.

[0018] Preferably, the priority constraint is: when there is an inconsistency between the retrieval results of path one and path two, the large language model is required to prioritize the response measures in the list of measures obtained through path two;

[0019] The traceability constraint requires that the large language model label the knowledge source of each response measure in the generated early warning report;

[0020] The numerical accuracy constraint is that large language models must not fabricate numerical processing parameters not included in the knowledge graph.

[0021] Preferably, the numerical response parameters include speed limits, resource quantities, and de-icing agent usage, wherein the resource quantities include the number of de-icing vehicles and the number of emergency personnel.

[0022] Preferably, the knowledge source types include two categories: graph provision and text reference.

[0023] Preferably, the number of text segments with the highest similarity is 3.

[0024] Preferably, among the five types of entities described in step S1,

[0025] Meteorological event entities are used to describe the meteorological process that triggers the warning, and they include the event name, event level, and time period of occurrence.

[0026] The disaster-causing factor entity describes the road disaster-causing factors caused by meteorological events, and includes the disaster-causing factor name and trigger condition description attributes.

[0027] Disaster consequence entity, used to describe the consequences or the degree of deterioration of quantitative indicators caused by disaster-causing factors, includes disaster consequence description and quantitative indicator attributes;

[0028] The response measures entity describes the measures that should be taken in response to the consequences of a disaster, and includes the measures name, implementation conditions, and implementation priority attributes.

[0029] Emergency resource entities describe the emergency resources required to implement response measures, including resource name, type, and regular reserve quantity or deployment location attributes.

[0030] Preferably, the relationships are: causal relationship, which indicates that a meteorological event leads to the generation of disaster-causing factors; triggering relationship, which indicates that disaster-causing factors lead to disaster consequences; response relationship, which indicates that measures should be taken to address the disaster consequences; and need relationship, which indicates that emergency resources need to be mobilized to implement the response measures.

[0031] Preferably, the structured early warning is generated in four parts: risk overview, detailed early warning for each road segment, disposal and dispatch suggestions, and recovery forecast.

[0032] Preferably, the structured JSON data includes at least the following fields: disaster factor name field, disaster consequence description field, response measure list field, and emergency resource list field; each field corresponds to the value of a specific attribute in the entity.

[0033] A knowledge graph-enhanced early warning generation system for road operation management includes a storage device, a processor, and a computer program stored in the storage device and executable on the processor. The processor executes the computer program to implement the road operation early warning report generation method based on the fusion of knowledge graph and dual-path retrieval.

[0034] The beneficial effects of this invention are:

[0035] The core idea of ​​this invention is to replace the stacking of plain text fragments as the reasoning framework with a "structured causal chain of knowledge graph (step S1)", replace single semantic similarity recall with "dual-path parallel retrieval (step S2)", and replace unbounded free generation with "constrained generation (step S3)". Specific advantages are as follows:

[0036] Firstly, this invention constructs a knowledge graph encompassing five entities: meteorological events, disaster-causing factors, disaster consequences, response measures, and emergency resources. It also explicitly defines four types of directional relationships: "cause → trigger → response → need." This knowledge graph structurally expresses and stores the multi-level chain-like logical relationship of "meteorological event → disaster-causing factor → disaster consequences → response measures → emergency resources" in road operation emergency response. The knowledge graph transforms unstructured text, originally scattered throughout standards, specifications, and emergency plans, into a multi-level causal logical chain from meteorological events to emergency resources. When an early warning is triggered, it no longer relies on pure text retrieval to obtain fragmented information, but instead uses this logical chain as its framework for reasoning. Therefore, the complete causal path from meteorological triggers to final resource allocation is explicitly stored and invoked, fundamentally solving the problem of broken logical chains.

[0037] Secondly, this invention employs a dual-path fusion mechanism of "text semantic retrieval + graph structure retrieval," enabling the large language model to reference both generalized background knowledge from standard and specification documents and precise, structured response measures derived from the knowledge graph when generating early warning reports. These two approaches complement each other, significantly improving the accuracy and relevance of early warning recommendations. Furthermore, path two uses the name of the current disaster-causing factor as input, precisely matching the disaster-causing factor entity in the knowledge graph and performing multi-hop graph traversal along "causation relationships" and "response relationships" to directly obtain the disaster consequences, response measures, and emergency resources associated with the specific disaster-causing factor. This retrieval path is based on causal depth-oriented extraction, rather than a flat recall based on pure text similarity matching. Therefore, the output measures have a clear causal relationship and relevance to the current disaster-causing factor, and are output in structured JSON, avoiding the ambiguity in applicability caused by extracting measures from generalized text.

[0038] Thirdly, regarding the risk of illusion, the structured JSON output from Path 2 serves as the factual foundation, which, together with the textual background from Path 1 and the three types of constraints, constitutes a prompt word template, explicitly limiting the scope of model generation. This effectively constrains the generation behavior of the large language model and reduces the risk of model illusion in the high-risk scenario of road operation safety. Structured data provides deterministic parameters and the source of measures, while constraints enforce traceability and numerical prohibition, thereby locking the generation boundary within the existing knowledge scope and limiting the model's space for free fabrication. Attached Figure Description

[0039] Figure 1 This is a schematic diagram illustrating the principle of the road operation early warning report generation method based on the fusion of knowledge graph and dual-path retrieval described in this invention;

[0040] Figure 2 This is an example diagram of a local structure of a knowledge graph.

[0041] Figure 3 This is a schematic diagram illustrating an example of an early warning report. Detailed Implementation

[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0044] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.

[0045] Specific Implementation Method 1: Combination Figure 1 This embodiment describes a road operation early warning report generation method based on the fusion of knowledge graph and dual-path retrieval. The method includes:

[0046] S1. Constructing a knowledge graph: Extract and store five types of entities—meteorological events, disaster-causing factors, disaster consequences, response measures, and emergency resources—from standards, regulations, emergency plans, and historical handling records related to road operation and management. These entities are categorized into cause relationships, trigger relationships, response relationships, and need relationships. Cause relationships point from meteorological events to disaster-causing factors; trigger relationships point from disaster-causing factors to disaster consequences; response relationships point from disaster consequences to response measures; and need relationships point from response measures to emergency resources.

[0047] The five types of entities and the pointing relationships between them form a multi-level causal logic link graph for road operation management, from meteorological events to emergency resources. This multi-level causal logic link graph serves as a knowledge graph, with the five types of entities serving as nodes and the pointing relationships between entities serving as edges.

[0048] S2. When an alert is triggered, two paths are executed in parallel to retrieve data.

[0049] Path 1: Using the text describing the current road section's weather conditions as input, a text knowledge base is invoked for semantic retrieval to obtain several standard and normative text fragments with the highest similarity. The text knowledge base stores the complete full-text content of various standards, norms, emergency plans, and historical handling documents in the road operation field. In specific applications, the number of text fragments with the highest similarity is 3.

[0050] Path 2: Using the name of the disaster-causing factor of the current road segment as input, the knowledge graph is called for retrieval. The name of the disaster-causing factor of the current road segment is matched with the disaster-causing factor name attribute of the disaster-causing factor entity in the knowledge graph. Starting from the matched node, a multi-hop graph traversal is performed along the triggering relationship and the response relationship to obtain the disaster consequences, response measures and emergency resources associated with the current disaster-causing factor. The retrieval results are then assembled into structured JSON data for output.

[0051] S3, Constraint-based early warning report generation:

[0052] All standard and specification text fragments retrieved from Path 1 are used as background knowledge, the structured JSON data retrieved from Path 2 is used as structured measure knowledge, and the constructed constraints are used as contextual information for road operation and management. This information is then filled into the prompt word template and injected into the large language model to generate a structured early warning report.

[0053] The constraints constructed include priority constraints, traceability constraints, and numerical accuracy constraints.

[0054] The structured early warning system is generated in four parts: risk overview, detailed warning for each road segment, response and dispatch recommendations, and recovery estimate. By structuring the early warning report into four fixed parts—risk overview, detailed warning for each road segment, response and dispatch recommendations, and recovery estimate—the system ensures the uniformity and completeness of the output format, facilitating quick reading and execution by frontline personnel according to modules, and also enabling data integration with existing emergency management systems.

[0055] This invention constructs a multi-level causal logic link knowledge graph containing five types of entities and four types of pointing relationships, realizing a structured representation of the entire knowledge chain from meteorological events to emergency resources, providing a clear causal path for early warning reasoning. Parallel semantic retrieval and graph retrieval are executed, balancing the breadth of textual knowledge with the depth of structured knowledge. This enables rapid retrieval of standard normative background and specific countermeasures upon early warning triggering, significantly improving the comprehensiveness and timeliness of information retrieval. Finally, through constraint-based generation, it ensures that early warning reports conform to domain standards and are both executable.

[0056] Furthermore, in the constructed constraints,

[0057] The priority constraint is: when there is a discrepancy between the search results of Path 1 and Path 2, the large language model is required to prioritize the response measures in the list of measures obtained through Path 2.

[0058] The traceability constraint requires that the large language model mark the knowledge source of each response measure in the generated early warning report; the knowledge source types include two categories: graph provision (i.e., knowledge graph) and text reference (i.e., text knowledge base);

[0059] The numerical accuracy constraint is as follows: the large language model must not fabricate numerical handling parameters not included in the knowledge graph; among which, the numerical handling parameters include speed limit values, resource quantity and snow melting agent dosage, and the resource quantity includes the number of de-icing vehicles and the number of emergency personnel.

[0060] This preferred implementation uses priority constraints to enforce the adoption of measures from the knowledge graph when dual-path search results conflict, ensuring that early warning suggestions strictly follow the authoritative logic of the domain knowledge base and reducing text noise interference. Traceability constraints force the labeling of knowledge sources, enhancing the report's credibility and ease of review. Numerical accuracy constraints prohibit the fabrication of parameters in large models, mitigating the risk of numerical illusions in generated content from the source and ensuring the engineering safety of disposal instructions. Furthermore, it clearly defines the specific types of numerical disposal parameters (speed limits, resource quantities, de-icing agent dosage, etc.), making the scope of application of numerical accuracy constraints clear and operable. This facilitates automatic verification and missing information detection of key quantitative information during the generation stage, ensuring that all resource scheduling data in the early warning report has a basis in the knowledge graph, thus improving the reliability of on-site deployment.

[0061] Furthermore, among the five types of entities mentioned in step S1,

[0062] Meteorological event entities are used to describe the meteorological process that triggers the warning, and they include the event name, event level, and time period of occurrence.

[0063] The disaster-causing factor entity describes the road disaster-causing factors caused by meteorological events, and includes the disaster-causing factor name and trigger condition description attributes.

[0064] Disaster consequence entity, used to describe the consequences or the degree of deterioration of quantitative indicators caused by disaster-causing factors, includes disaster consequence description and quantitative indicator attributes;

[0065] The response measures entity describes the measures that should be taken in response to the consequences of a disaster, and includes the measures name, implementation conditions, and implementation priority attributes.

[0066] Emergency resource entities describe the emergency resources required to implement response measures, including resource name, type, and regular reserve quantity or deployment location attributes.

[0067] This preferred implementation defines core attributes (such as event level, triggering conditions, quantitative indicators, execution priority, and reserve quantity) for five types of entities, enabling knowledge graph nodes to have rich semantic details, supporting multi-dimensional retrieval and precise matching, and providing a structured data foundation for risk classification, measure ranking, and resource scheduling in subsequent reports.

[0068] Furthermore, the relationships are: "causing" indicates that a meteorological event leads to the generation of disaster-causing factors; "inducing" indicates that disaster-causing factors lead to disaster consequences; "responding" indicates that measures should be taken to address the disaster consequences; and "needing" indicates that emergency resources need to be mobilized to implement the measures.

[0069] In this preferred embodiment, the semantic connotations of four directional relationships (causing, triggering, responding, and needing) are clearly defined, and a complete causal chain of meteorology-disaster-consequence-measures-resources is constructed. This makes the graph traversal path clear and controllable, and supports the rapid deduction of a complete set of response plans from any disaster-causing factor along the relationship direction, thereby improving the transparency and interpretability of the early warning logic.

[0070] Furthermore, the structured JSON data includes at least the following fields: disaster factor name field, disaster consequence description field, response measure list field, and emergency resource list field; each field corresponds to the value of a specific attribute in the entity.

[0071] This preferred embodiment specifies that the structured JSON data should include at least four core fields: disaster-causing factors, disaster consequences, countermeasures, and emergency resources. This ensures that no key information in the graph retrieval results is omitted, providing standardized structured knowledge input for downstream large language models, reducing the difficulty of model parsing, and improving the standardization and completeness of the generated content.

[0072] Specific Implementation Method Two: The knowledge graph-enhanced early warning generation system for road operation management described in this implementation method includes a storage device, a processor, and a computer program stored in the storage device and executable on the processor. The processor executes the computer program to implement the road operation early warning report generation method based on knowledge graph and dual-path retrieval fusion as described in Specific Implementation Method One. This implementation method embeds the method into the storage device and the computer program executed by the processor, achieving automation, standardization, and reproducible deployment of the early warning generation process. This facilitates integration into existing road operation management platforms, significantly reduces the cost of manual judgment, and improves emergency response speed and decision-making quality under severe weather conditions.

[0073] Based on two specific embodiments, this invention provides supplementary explanations regarding the incremental update and maintenance mechanism of the knowledge graph and the overall scalability design of the system. The remaining parts are the same as the aforementioned embodiments.

[0074] The knowledge graph, as an independent knowledge storage layer in this invention system, supports the following three incremental update methods:

[0075] Method 1: Standard and Specification Update Driven. When new versions of national standards, industry standards, or internal operating procedures related to road operation safety are released, domain experts (such as road safety engineers) compare the new specifications with the updated standards and add, modify, or discard the corresponding entities and relationships in the roadmap. For example, if the new version of the "Highway Snow Removal Operation Specification" adjusts the speed limit for a certain type of road section from 40km / h to 35km / h, only the attribute value of the "Speed ​​Limit" entity in the roadmap needs to be modified. All subsequent warning generation will automatically use the updated parameters, without requiring modification to the large language model or prompt word template.

[0076] Method Two: Accumulation of Historical Handling Experience. After each early warning response, the system collects actual handling feedback data (including actual measures taken, evaluation of the measures' effectiveness, and resource consumption statistics). Domain experts periodically review this feedback data, extracting validated and effective handling patterns as new entities and relationships, and adding them to the knowledge graph. This mechanism enables the graph to continuously "learn" and enrich itself from practical experience.

[0077] Method 3: Regional Adaptation and Expansion. When the system is deployed to a new geographical region or road network, a region-specific knowledge graph subgraph can be constructed based on the region's unique meteorological characteristics, road attributes, and historical accident data. The subgraph shares the core entity type and relation type definitions with the general graph, but instance data can be configured independently according to regional characteristics. For example, in southern regions, meteorological event entities such as "heavy rain" and "typhoon" and corresponding response measure chains can be added; in northern high-altitude and cold regions, special factors such as "extreme low temperature" and "snow depth" can be added.

[0078] Furthermore, the system of the present invention has good scalability in the following dimensions:

[0079] The large language model is replaceable: The large language model called in the knowledge augmentation warning generation module (which defaults to qwen2.5:3b) can be replaced with other large language models that support Chinese and are compatible with Open AI-style API interfaces. Switching models only requires modifying the model configuration parameters of the LLM node in the Dify workflow; no changes are needed to the knowledge graph and API layer.

[0080] The knowledge base platform is replaceable: the knowledge base retrieval engine used in the text retrieval path (which defaults to Dify's built-in knowledge base) can be replaced with other vectorized knowledge base solutions (such as Milvus, Pinecone, Weaviate, etc.), only requiring modification of the API connection configuration of the knowledge base retrieval node.

[0081] The graph database can be replaced: The knowledge graph storage backend (which defaults to Neo4j Community Edition) can be replaced with other graph databases (such as Arango DB, Janus Graph, Nebula Graph, etc.), requiring only modification of the data access layer driver adaptation code in the graph query API.

[0082] In summary, this invention achieves a hierarchical structure for road operation emergency response knowledge by constructing a vertical domain knowledge graph, enables procedural querying of structured knowledge, achieves complementary utilization of textual semantic knowledge and graph structure knowledge through a dual-path retrieval fusion mechanism, and achieves controllable constraints on the generation behavior of the large language model through the design of constraint prompt words. Ultimately, it forms a set of intelligent early warning report automatic generation schemes that are knowledge-manageable, results-traceable, and system-scalable.

[0083] Specific examples:

[0084] (I) Constructing a knowledge graph:

[0085] The knowledge graph is modeled around the core logical chain of road operation emergency response, and the following five core entity types are defined:

[0086] (1) Meteorological event entities This describes the specific weather event that triggers the warning, such as "freezing rain," "blizzard," or "low temperature and high humidity." Each meteorological event entity includes attributes such as event name, event level, and time of occurrence.

[0087] (2) Disaster-causing entity This describes specific road hazards caused by meteorological conditions, such as "black ice on bridge surfaces," "snow accumulation on roads," "crosswinds," and "dense fog." Each hazard factor entity contains attributes such as the hazard factor name and a description of the triggering conditions. Hazard factors are the key bridging entities connecting meteorological conditions and disaster consequences.

[0088] (3) Entities of disaster consequences This is used to describe the specific consequences or the degree of deterioration of quantitative indicators caused by disaster-causing factors, such as "road adhesion coefficient reduced by 60%", "visibility less than 200 meters", "increased risk of vehicle skidding", etc. Each disaster consequence entity includes a description of the disaster consequence and related quantitative indicator attributes.

[0089] (4) Response measures entity This is used to describe specific measures that should be taken in response to the consequences of a particular disaster, such as "speed limit to 40km / h", "spreading environmentally friendly snow-melting agent", "closing lanes", and "strengthening patrols and monitoring". Each measure entity includes attributes such as measure name, implementation conditions, and implementation priority.

[0090] (5) Emergency resource entities This describes the specific emergency resources required to implement various response measures, such as "de-icing vehicles," "snow-melting agent warehouses," and "emergency personnel." Each emergency resource entity includes attributes such as resource name, type, standard reserve quantity, or deployment location.

[0091] Among the above five types of entities, the following four core relationship types are defined, see [link to relevant documentation]. Figure 2 :

[0092] "Cause" relationship: This refers to a meteorological event entity pointing to a disaster-causing factor entity, indicating that the meteorological condition will lead to the occurrence of a certain disaster-causing factor. For example, "freezing rain" — [cause] → "black ice on the bridge surface".

[0093] "Triggering" relationship: This refers to a disaster-causing factor entity pointing to a disaster-causing consequence entity, indicating that the disaster-causing factor will trigger a specific disaster consequence. For example, "snow accumulation on the road surface" — [triggering] → "road surface adhesion coefficient reduced by 60%".

[0094] "Response" relationship: This refers to the entity that deals with the consequences of a disaster and the entity that deals with the response measures, indicating what measures should be taken in response to the consequences of the disaster. For example, "Road adhesion coefficient reduced by 60%" — [Response] → "Speed ​​limit of 40km / h" or "Spreading environmentally friendly de-icing agent".

[0095] "Need" relationship: This refers to the emergency resource entity, indicating which resources need to be mobilized to implement the measure. For example, "spreading environmentally friendly de-icing agent" — [Need] → "de-icing truck" and "de-icing agent warehouse".

[0096] (ii) When an early warning is triggered, two paths are executed in parallel to retrieve data:

[0097] The query capability of the knowledge graph is encapsulated as an application programming interface (API). It matches the name of the disaster-causing factor of the current road segment with the disaster-causing factor name attribute of the disaster-causing factor entity in the knowledge graph. Starting from the matched node, it performs a multi-hop graph traversal along the triggering relationship and the response relationship to obtain the disaster consequences, response measures and emergency resources associated with the current disaster-causing factor. The search results are then assembled into structured JSON data for output.

[0098] Upon receiving a query request, the service program executes the following processing flow: First, the query parameters are standardized (leading and trailing spaces are removed, and the encoding is unified to Chinese characters); then, a Cypher query statement is constructed, matching the disaster-causing factor name of the current road segment with the disaster-causing factor name attribute of the disaster-causing factor entity in the knowledge graph. Taking the matched node as the starting node, the program points to the disaster consequence entity along the triggering relationship, and then points to the response measure entity along the "response" relationship, thereby obtaining the complete logical link from the disaster-causing factor to the response measure. Finally, the query results are assembled into a structured JSON format and returned.

[0099] The early warning generation process is built upon the Dify enterprise-level large language model application orchestration platform. This process is automatically initiated when an external risk perception and triggering system issues an early warning trigger signal. The input to the process is a text describing the current road segment's weather conditions.

[0100] Path 1: Text Retrieval Path (Knowledge Base Semantic Retrieval). This path calls the knowledge base retrieval node in the Dify platform, using the text describing the current road segment's weather conditions as the query input, and performs a semantic similarity search in the preset road operation safety knowledge base. This knowledge base contains the full text of several standard specifications and historical emergency plans, such as the "Road Traffic Safety Operation Procedures," "Technical Specifications for Highway Snow Removal and Ice Melting Operations," and "Emergency Management Plan for Road Traffic in Severe Weather," which are vectorized to support semantic retrieval. The search results return the top-3 text fragments with the highest semantic similarity, each fragment including the original citation, the source document name, and the similarity score. This path provides generalized background knowledge and reference at the standard specification level.

[0101] Path Two: Knowledge Graph Query Path (Structured Exact Match). This path calls the HTTP request node in the Dify platform to send a GET request to the encapsulated knowledge graph query API, passing the name of each disaster-causing factor in graph_factors (such as "snow accumulation on the road") as a query parameter. The API returns structured JSON data, containing the complete logical link from the disaster-causing factor to the response measures. This path provides precise response measures data through structured reasoning, possessing determinism and traceability.

[0102] (III) Constraint-based generation of early warning reports:

[0103] All standard and specification text fragments retrieved via Path 1 are used as background knowledge, the structured JSON data retrieved via Path 2 is used as structured measure knowledge, and the constructed constraints are combined to form the context information for road operation and management, which is then filled into the prompt word template. The prompt word template is then injected into a large language model to generate a structured early warning report. (See [link to relevant documentation]). Figure 3 ;

[0104] Without modifying the parameters of the large language model itself (i.e., without fine-tuning), controllable constraints are imposed on the model's generated output through prompt word engineering techniques to ensure the accuracy and traceability of the generated content. This mechanism includes three levels of constraints:

[0105] The first layer is priority constraint. The prompt explicitly requires the model to "prioritize the structured response measures derived from the knowledge graph." This means that when there is inconsistency between the response measures provided by the knowledge graph path and the text retrieval path, the model is guided to prioritize the structured data in the knowledge graph. This design is based on a core assumption: the structured data in the knowledge graph is deterministic knowledge that has been manually verified and accurately matches the current disaster-causing factors, and its reliability is higher than the generalized reference information returned by text retrieval.

[0106] The second layer is traceability constraint. The prompt requires the model to "label the source of each response measure," that is, to distinguish between two types of source identifiers: "provided by the map" and "textual reference." This constraint, on the one hand, enables operators to trace the knowledge basis of each suggestion, enhancing their trust in the early warning report; on the other hand, it also constrains the model's generation behavior, requiring the model to confirm the source of each measure, thereby reducing the probability of fabricating measures.

[0107] The third layer is numerical accuracy constraints. The prompt explicitly prohibits the model from "fabricating numerical parameters such as speed limits and resource quantities that do not exist in the knowledge graph." In road operation safety scenarios, numerical parameters such as speed limits (e.g., 40 km / h), the number of snowplows, and the amount of de-icing agent used have strict standard references; any deviation may have serious consequences. This constraint mandates that the model can only be used in reports if the knowledge graph provides the corresponding values; otherwise, operators should be advised to determine the appropriate values ​​based on the actual situation.

[0108] The three layers of constraints described above together constitute a "soft constraint" mechanism, which applies constraints through prompt word design rather than through modifications to the model architecture. The advantages of this approach are: constraints can be flexibly adjusted without retraining the model; the strength and scope of constraints can be customized by domain experts according to specific scenarios; and the constraints are updated synchronously with the knowledge graph data, exhibiting good adaptability.

[0109] The overall requirements include:

[0110] 1. Prioritize the use of the measures listed in the structured processing measures derived from knowledge graphs;

[0111] 2. For each treatment measure, indicate its source ("provided by the map" or "referenced in the text");

[0112] 3. It is forbidden to fabricate numerical parameters such as speed limits and resource quantities that do not exist in the map;

[0113] 4. The report format is organized into four parts: "risk overview, detailed early warning for each road segment, handling and dispatch suggestions, and recovery forecast".

[0114] While the invention has been described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the invention. Therefore, it should be understood that many modifications can be made to the exemplary embodiments, and other arrangements can be designed without departing from the spirit and scope of the invention as defined by the appended claims. It should be understood that different dependent claims and features described herein can be combined in ways different from those described in the original claims. It is also understood that features described in conjunction with individual embodiments can be used in other described embodiments.

Claims

1. A method for generating road operation early warning reports based on the fusion of knowledge graph and dual-path retrieval, characterized in that, The method includes: S1. Constructing a knowledge graph: Extract and store five types of entities—meteorological events, disaster-causing factors, disaster consequences, response measures, and emergency resources—from standards, regulations, emergency plans, and historical handling records related to road operation and management. These entities are categorized into cause relationships, trigger relationships, response relationships, and need relationships. Cause relationships point from meteorological events to disaster-causing factors; trigger relationships point from disaster-causing factors to disaster consequences; response relationships point from disaster consequences to response measures; and need relationships point from response measures to emergency resources. The five types of entities and the pointing relationships between them form a multi-level causal logic link graph for road operation management, from meteorological events to emergency resources. This multi-level causal logic link graph serves as a knowledge graph, with the five types of entities serving as nodes and the pointing relationships between entities serving as edges. S2. When an alert is triggered, two paths are executed in parallel to retrieve data. Path 1: Using the text describing the current road section's weather conditions as input, the text knowledge base is invoked for semantic retrieval to obtain several standard and specification text fragments with the highest similarity; the text knowledge base stores the complete full-text content of various standards and specifications, emergency plans, and historical handling documents in the field of road operation; Path 2: Using the name of the disaster-causing factor of the current road segment as input, the knowledge graph is called for retrieval. The name of the disaster-causing factor of the current road segment is matched with the disaster-causing factor name attribute of the disaster-causing factor entity in the knowledge graph. Starting from the matched node, a multi-hop graph traversal is performed along the triggering relationship and the response relationship to obtain the disaster consequences, response measures and emergency resources associated with the current disaster-causing factor. The retrieval results are then assembled into structured JSON data for output. S3. Constraint-based early warning report generation: All standard and specification text fragments retrieved from Path 1 are used as background knowledge, the structured JSON data retrieved from Path 2 is used as structured measure knowledge, and the constructed constraints are used as contextual information for road operation and management. This information is then filled into the prompt word template and injected into the large language model to generate a structured early warning report. The constructed constraints include priority constraints, traceability constraints, and numerical accuracy constraints.

2. The method for generating road operation early warning reports based on the fusion of knowledge graph and dual-path retrieval as described in claim 1, characterized in that, The priority constraint is: when there is an inconsistency between the search results of Path 1 and Path 2, the large language model is required to prioritize the response measures obtained from the response measures list retrieved through Path 2; the traceability constraint is: the large language model is required to mark the knowledge source of each response measure in the generated warning report; the numerical accuracy constraint is: the large language model is required not to fabricate numerical handling parameters not included in the knowledge graph.

3. The method for generating road operation early warning reports based on the fusion of knowledge graph and dual-path retrieval as described in claim 2, characterized in that, Numerical response parameters include speed limits, resource quantities, and de-icing agent usage, with the resource quantities including the number of de-icing vehicles and emergency personnel.

4. The method for generating road operation early warning reports based on the fusion of knowledge graph and dual-path retrieval as described in claim 2, characterized in that, Knowledge sources can be categorized into two types: graph-based and textual references.

5. The method for generating road operation early warning reports based on the fusion of knowledge graph and dual-path retrieval as described in claim 1, characterized in that, The number of text segments with the highest similarity is 3.

6. The method for generating road operation early warning reports based on the fusion of knowledge graph and dual-path retrieval as described in claim 1, characterized in that, Of the five types of entities mentioned in step S1, Meteorological event entities are used to describe the meteorological process that triggers the warning, and they include the event name, event level, and time period of occurrence. The disaster-causing factor entity describes the road disaster-causing factors caused by meteorological events, and includes the disaster-causing factor name and trigger condition description attributes. Disaster consequence entity, used to describe the consequences or the degree of deterioration of quantitative indicators caused by disaster-causing factors, includes disaster consequence description and quantitative indicator attributes; The response measures entity describes the measures that should be taken in response to the consequences of a disaster, and includes the measures name, implementation conditions, and implementation priority attributes. Emergency resource entities describe the emergency resources required to implement response measures, including resource name, type, and regular reserve quantity or deployment location attributes.

7. The method for generating road operation early warning reports based on the fusion of knowledge graph and dual-path retrieval as described in claim 1, characterized in that, The causal relationship characterizes how meteorological events lead to the generation of disaster-causing factors; The "triggering relationship" indicates that the causative factors lead to the disaster consequences; the "response relationship" indicates that measures should be taken to address the disaster consequences; and the "need relationship" indicates that emergency resources need to be mobilized to implement the measures.

8. The method for generating road operation early warning reports based on the fusion of knowledge graph and dual-path retrieval as described in claim 1, characterized in that, The structured early warning system is generated in four parts: risk overview, detailed early warning for each road segment, disposal and dispatch suggestions, and recovery forecast.

9. The method for generating road operation early warning reports based on the fusion of knowledge graph and dual-path retrieval as described in claim 1, characterized in that, The structured JSON data contains at least the following fields: disaster factor name field, disaster consequence description field, response measure list field, and emergency resource list field; each field corresponds to the value of a specific attribute in the entity.

10. A knowledge graph-enhanced early warning generation system for road operation management, comprising a storage device, a processor, and a computer program stored in the storage device and executable on the processor, characterized in that, The processor executes a computer program to implement the road operation early warning report generation method based on the fusion of knowledge graph and dual-path retrieval as described in any one of claims 1 to 9.