A highway maintenance question and answer method based on a knowledge graph enhanced large model

By constructing a knowledge graph containing logically mutually exclusive constraints, and combining it with subgraph retrieval and prompt word error correction mechanisms, the problem of generating incorrect suggestions in intelligent query systems was solved, thus achieving the professionalism and logical consistency of highway maintenance plans.

CN122196131APending Publication Date: 2026-06-12CHENGDU GUIMU TESTING TECH CO LTD +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHENGDU GUIMU TESTING TECH CO LTD
Filing Date
2026-03-16
Publication Date
2026-06-12

Smart Images

  • Figure CN122196131A_ABST
    Figure CN122196131A_ABST
Patent Text Reader

Abstract

The application discloses a highway maintenance question and answer method based on a knowledge graph enhanced large model, and comprises the following steps: S1, a graph containing logical mutual exclusion constraints is constructed; S2, when a user asks a question, a knowledge subgraph is extracted; S3, according to the structural information of the extracted knowledge subgraph, a Prompt slot is dynamically filled, and a preliminary answer is output; S4, conflict detection and automatic error correction are performed, and the result is output to the user. The application has the beneficial effects that by constructing a highway maintenance field knowledge graph containing mutual exclusion logic, the subgraph retrieval and the prompt word engineering are combined, and the automatic error correction mechanism based on the graph logic is introduced, so that the professionalism, accuracy and logical self-consistency of the maintenance scheme generation are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of transportation engineering technology, and in particular to a question-and-answer method for highway maintenance based on a knowledge graph-enhanced large model. Background Technology

[0002] In the field of highway maintenance, technicians typically need to consult numerous standards and specifications (such as the "Technical Specification for Asphalt Pavement Maintenance" JTG 5142-2019), atlases, and historical cases when developing maintenance plans. Currently, there are two main intelligent query methods: 1) Traditional keyword retrieval systems: These can only match literal meanings and cannot understand the deep semantic connection between "asphalt pavement scraping" and "insufficient high-temperature stability," resulting in low recall and precision; 2) General-purpose large language models (such as ChatGPT, Qianwen, and Wenxin Yiyan), while possessing powerful natural language understanding and generation capabilities, lack vertical knowledge in the field of highway engineering. These general-purpose models are prone to generating seemingly reasonable but actually erroneous engineering suggestions. For example, regarding "asphalt pavement pothole repair," the model might recommend repair materials only applicable to "cement pavements" or fabricate non-existent national standard provisions. Such errors are unacceptable in a rigorous engineering field and could lead to engineering accidents. Moreover, existing models struggle to handle the compatibility logic of engineering materials. For example, a model might suggest using both "hot asphalt" and "cold patching material" for immediate repairs within the same scheme, which are mutually exclusive or redundant in terms of process flow. The model lacks a self-correction mechanism based on engineering logic. Furthermore, maintenance schemes typically need to follow a standard paradigm of "disease diagnosis - cause analysis - material selection - process flow - quality acceptance." The answers generated by general large models are often loosely structured and cannot directly guide on-site construction. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a highway maintenance question-and-answer method based on a knowledge graph-enhanced large model.

[0004] The objective of this invention is achieved through the following technical solution: a highway maintenance question-answering method based on a knowledge graph-enhanced large model, comprising the following steps:

[0005] S1: Construct a graph containing logical mutual exclusion constraints;

[0006] S2: When a user asks a question, extract the knowledge subgraph;

[0007] S3: Based on the structural information of the extracted knowledge subgraph, dynamically fill the Prompt slots and output a preliminary answer;

[0008] S4: Perform conflict detection and automatic error correction, and then output the results to the user.

[0009] Preferably, step S1 further includes the following step:

[0010] S11: Data sources are collected based on the "Technical Specifications for Highway Asphalt Pavement Maintenance" and the "Safety Operation Procedures for Highway Maintenance";

[0011] S12: Extract entity sets from canonical text using natural language processing techniques. With relation set Construct a list of triples .

[0012] Preferably, in step S12, the entity set This includes diseases, materials, processes, equipment, environmental conditions, and standard provisions; a set of relationships. This includes positive relationships and mutually exclusive relationships.

[0013] Preferably, step S2 further includes the following step:

[0014] S21: Using the Jieba word segmentation tool, from the question Extract entity set ;

[0015] S22: with The entities in the path are seed nodes. A K-hop breadth-first search is performed on each node. Calculate the relevance score ,

[0016] ;

[0017] in, The vector representation of the user's question. For graph nodes The vector representation of , and All are weighting coefficients;

[0018] Calculate cosine similarity ,

[0019] ;

[0020] Topological importance is calculated using the PageRank algorithm. ,

[0021] ;

[0022] in, The damping coefficient is... This represents the total number of nodes in the graph. For pointing The set of nodes, For nodes The degree of departure;

[0023] S23: Select Nodes and connecting edges exceeding a set threshold constitute a knowledge subgraph. .

[0024] Preferably, step S4 further includes the following step:

[0025] S41: Preliminary Response to Large Model Generation Perform parsing and extract the key entity set. ;

[0026] S42: Input answer entity set and global map Construct Cartesian product entity pairs ;

[0027] S43: If satisfied or If any of these conditions is met, a conflict is determined, and the conflicting entities are recorded. and conflict types;

[0028] S44: Generate correction instructions and will correct instructions As a new prompt input model, the model adjusts its approach based on the instructions, generating a logically corrected final answer. And output it to the user.

[0029] The present invention has the following advantages: By constructing a knowledge graph in the field of highway maintenance that includes mutually exclusive logic, the present invention combines subgraph retrieval with prompt word engineering, and introduces an automatic error correction mechanism based on graph logic, thereby achieving the professionalism, accuracy and logical consistency of maintenance scheme generation. Attached Figure Description

[0030] Figure 1 This is a schematic diagram of the process of a highway maintenance question-answering method based on a knowledge graph-enhanced large model. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0032] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

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

[0034] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0035] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use, or the orientation or positional relationship commonly understood by those skilled in the art. They are only used for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0036] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0037] In this embodiment, as Figure 1 As shown, a highway maintenance question-answering method based on a knowledge graph-enhanced large model includes the following steps:

[0038] S1: Construct a graph containing logical mutual exclusion constraints;

[0039] S2: When a user asks a question, extract the knowledge subgraph;

[0040] S3: Based on the structural information of the extracted knowledge subgraph, dynamically fill the Prompt slots and output a preliminary answer; specifically, predefine the JSON Schema of the maintenance plan:

[0041] {

[0042] "diagnosis": "Disease diagnosis",

[0043] "material": "Recommended materials and parameters",

[0044] "process": ["Step 1", "Step 2", "Step 3"],

[0045] "restriction": "prohibited items"

[0046] }

[0047] The specific assembly strategy for Prompt is as follows: 1) ... 1) Fill the material nodes connected to the diseased entity into the [Recommended Materials] slot; 2) Fill the process nodes into the [Construction Process] slot in logical order; 3) Explicitly extract The negative relation (unsuitable_environment) should be filled into the [Taboo] prompt. Example of the generated Prompt: "Given that the current environment is 'Rainy Day,' and the map shows that 'Hot Mix Asphalt' and 'Rainy Day' have an 'Unsuitable' relationship, please generate a pothole repair plan and explicitly exclude unsuitable materials in the plan. Calculate node scores by combining vector similarity and topological importance." Based on the retrieved subgraph structure, positive knowledge is filled into suggestion slots, and negative relationships (mutually exclusive edges) are filled into constraint slots, generating structured prompts.

[0048] S4: Perform conflict detection and automatic error correction, and then output the results to the user. By constructing a knowledge graph in the field of highway maintenance that includes mutual exclusion logic, it can identify engineering defects such as "hot asphalt cannot be used in rainy weather" and "cold asphalt patching material cannot be used on cement pavement," avoiding the generation of unreasonable solutions. By combining subgraph retrieval with prompt word engineering and introducing an automatic error correction mechanism based on graph logic, the professionalism, accuracy, and logical consistency of maintenance solution generation are achieved.

[0049] Furthermore, step S1 also includes the following steps:

[0050] S11: Data sources are collected based on the "Technical Specifications for Highway Asphalt Pavement Maintenance" and the "Safety Operation Procedures for Highway Maintenance";

[0051] S12: Extract entity sets from canonical text using natural language processing techniques. With relation set Construct a list of triples Furthermore, in step S12, the entity set... This includes diseases, materials, processes, equipment, environmental conditions, and standard provisions; a set of relationships. This includes positive and mutually exclusive relationships. Specifically, positive relationships include `repair_with` (for repair), `suitable_environment` (suitable environment), and `follow_standard` (follow the standard); mutually exclusive relationships include `conflict_with` (conflicts with / excludes from) and `unsuitable_environment` (unsuitable environment). To be specific, the natural language processing technology used is existing technology and has not been improved upon here, so it will not be elaborated further. When maintenance specifications are updated, only the triples in the graph database need to be updated; there is no need to retrain a large model, allowing the question-answering system to keep up with the latest standards, resulting in low maintenance costs.

[0052] In this embodiment, step S2 further includes the following step:

[0053] S21: Using the Jieba word segmentation tool, from the question Extract entity set For example, "How to deal with potholes on asphalt roads in rainy weather?" .

[0054] S22: with The entities in the path are seed nodes. A K-hop (K=2 or 3) breadth-first search is performed. To filter out noise, each node on the path is... Calculate the relevance score ,

[0055] ;

[0056] in, The vector representation of the user's question. For graph nodes The vector representation of , and All are weighting coefficients. It is 0.7. It is 0.3;

[0057] Calculate cosine similarity ,

[0058] ;

[0059] Topological importance is calculated using the PageRank algorithm. ,

[0060] ;

[0061] in, The damping coefficient is... This represents the total number of nodes in the graph. For pointing The set of nodes, For nodes The output level is used to prioritize the retrieval of commonly used materials and core processes;

[0062] S23: Select Nodes and connecting edges exceeding a set threshold constitute a knowledge subgraph. The threshold is set to 0.5.

[0063] In this embodiment, step S4 further includes the following step:

[0064] S41: Preliminary Response to Large Model Generation Perform parsing and extract the key entity set. ;

[0065] S42: Input answer entity set and global map Construct Cartesian product entity pairs ;

[0066] S43: If satisfied (Directly mutually exclusive, such as the conflict between rigid base layers and flexible surface layers under specific conditions) or (Environmental conflicts, such as: materials) Not applicable to the current context If any of these conditions is met, a conflict is determined, and the conflicting entity pair is recorded. and conflict types;

[0067] S44: Generate correction instructions and will correct instructions As a new prompt input model, the model adjusts its approach based on the instructions, generating a logically corrected final answer. And output it to the user. Specifically, generate correction instructions. "Warning: A logic conflict has been detected. The specification states..." and Mutual exclusion, please remove. And based on the map recommendations, replace with yes It is a sibling node and there are no conflicts.

[0068] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A highway maintenance question-answering method based on a knowledge graph-enhanced large model, characterized in that: Includes the following steps: S1: Construct a graph containing logical mutual exclusion constraints; S2: When a user asks a question, extract the knowledge subgraph; S3: Based on the structural information of the extracted knowledge subgraph, dynamically fill the Prompt slots and output a preliminary answer; S4: Perform conflict detection and automatic error correction, and then output the results to the user.

2. The highway maintenance question-answering method based on a knowledge graph-enhanced large model according to claim 1, characterized in that: Step S1 further includes the following steps: S11: Data sources are collected based on the "Technical Specifications for Highway Asphalt Pavement Maintenance" and the "Safety Operation Procedures for Highway Maintenance"; S12: Extract entity sets from canonical text using natural language processing techniques. With relation set Construct a list of triples .

3. The highway maintenance question-answering method based on a knowledge graph-enhanced large model according to claim 2, characterized in that: In step S12, the entity set This includes diseases, materials, processes, equipment, environmental conditions, and standard provisions; a set of relationships. This includes positive relationships and mutually exclusive relationships.

4. The highway maintenance question-answering method based on a knowledge graph-enhanced large model according to claim 3, characterized in that: Step S2 further includes the following steps: S21: Using the Jieba word segmentation tool, from the question Extract entity set ; S22: with The entities in the path are seed nodes. A K-hop breadth-first search is performed on each node. Calculate the relevance score , ; in, The vector representation of the user's question. For graph nodes The vector representation of , and All are weighting coefficients; Calculate cosine similarity , ; Topological importance is calculated using the PageRank algorithm. , ; in, The damping coefficient is... This represents the total number of nodes in the graph. For pointing The set of nodes, For nodes The degree of departure; S23: Select Nodes and connecting edges exceeding a set threshold constitute a knowledge subgraph. .

5. The highway maintenance question-answering method based on a knowledge graph-enhanced large model according to claim 4, characterized in that: Step S4 also includes the following steps: S41: Preliminary Response to Large Model Generation Perform parsing and extract the key entity set. ; S42: Input answer entity set and global map Construct Cartesian product entity pairs ; S43: If satisfied or If any of these conditions is met, a conflict is determined, and the conflicting entities are recorded. and conflict types; S44: Generate correction instructions and will correct instructions As a new prompt input model, the model adjusts its approach based on the instructions, generating a logically corrected final answer. And output it to the user.