A bridge management and maintenance knowledge graph construction method, system, device and medium based on a large model multi-agent

CN122047429BActive Publication Date: 2026-08-21SOUTHEAST UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610509064.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-04-17
Publication Date
2026-08-21
Estimated Expiration
2046-04-17

AI Technical Summary

Technical Problem

例如,它们可能混淆构件与其缺陷,这种语义错误在安全攸关的场景中可能导致灾难性的工程决策

Benefits of technology

[0070]Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: The present invention proposes a construction method based on multi-agent hierarchical collaboration and self-correction. By simulating the internal verification and external review mechanism of expert collaboration, it effectively overcomes the risks of "illusion" and factual errors in large language models. This enables the construction process to achieve full automation, reduce costs and improve efficiency, while ensuring the high fidelity and high credibility of the generated knowledge. It solves the core problem of applying automated knowledge graphs in the field of bridge maintenance and provides a more accurate and reliable data foundation for subsequent engineering decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122047429B_ABST
    Figure CN122047429B_ABST
Patent Text Reader

Abstract

The application discloses a bridge management and maintenance knowledge graph construction method, system, device and medium based on a large model multi-agent, which comprises the following steps: processing a bridge inspection report, converting original text into units by a decomposition agent, and establishing a text labeling database; taking a theme text block as input, extracting triplets by an extraction agent, then checking whether the extracted triplets conform to the bridge detection domain ontology and domain knowledge by a verification agent, finally correcting the triplets with errors by a correction agent, iteratively extracting, verifying and correcting triplets, and outputting high-quality triplets; establishing a dynamic knowledge learning mechanism and updating a knowledge base; constructing an initial knowledge graph according to the verified knowledge triplets; reviewing the initial knowledge graph by a review agent, and feeding back the review result to a construction agent for iterative updating, and finally constructing a bridge management and maintenance knowledge graph. The application can ensure the accuracy and fact consistency of the graph data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention pertains to knowledge graphs in the field of bridge engineering, and particularly relates to a method, system, equipment, and medium for constructing a bridge maintenance knowledge graph based on a large-scale multi-agent model. Background Technology

[0002] Modern bridges are designed for long lifespans, but their maintenance is extremely challenging due to continuous degradation. Current reactive "fault-fixing" maintenance methods are costly and inefficient. Therefore, a shift towards proactive maintenance is inevitable, but this relies on the effective utilization of damage evolution data hidden within massive amounts of unstructured inspection reports. Knowledge graphs are ideal tools for structuring this data, supporting intelligent maintenance. However, traditional knowledge graph construction methods heavily rely on manual annotation and expert intervention, resulting in low automation, high costs, and difficulty in large-scale application. Therefore, fully automated construction methods are necessary. While large language models offer promise for automation, they lack in-depth knowledge in specialized fields such as civil engineering and are prone to generating "illusions"—generating seemingly reasonable but factually incorrect information. For example, they may confuse components with their defects; such semantic errors can lead to catastrophic engineering decisions in safety-critical scenarios. Summary of the Invention

[0003] Purpose of the invention: The purpose of this invention is to provide a method, system, device and medium for constructing a bridge maintenance knowledge graph based on a large model and multiple agents. This invention can ensure the accuracy and consistency of the graph data.

[0004] Technical Solution: To achieve the above objectives, this invention discloses a method for constructing a bridge maintenance knowledge graph based on a large-scale multi-agent model, comprising the following steps:

[0005] S1. Standardize and partition bridge inspection reports as unstructured data. The decomposition agent transforms the raw text into centralized, analyzable units, creates constraints and coherent contexts, and establishes a text annotation database for the bridge maintenance field.

[0006] S2. An entity and relation extraction module is constructed using a joint entity and relation extraction method to extract entities and relations in the bridge domain, outputting high-quality triples. Specifically, the topic text block containing the topic processed in step S1 is used as input. The extraction agent extracts triples from the topic text, and then the verification agent checks whether the extracted triples conform to the ontology and domain knowledge of the bridge detection domain. Finally, the correction agent corrects the triples with errors. The process of extracting, verifying and correcting triples iteratively outputs high-quality triples.

[0007] S3. Establish a dynamic knowledge learning mechanism, evaluate the semantic novelty of the verified knowledge triples in step S2, and selectively add high-value examples representing new knowledge to the dynamic knowledge base to obtain the updated knowledge base; semantic novelty refers to a quantitative indicator that measures the degree of semantic difference between the verified knowledge triples and the existing knowledge base content.

[0008] S4. Based on all the verified knowledge triples obtained, the building agent performs entity alignment and disambiguation to construct an initial knowledge graph. Subsequently, the reviewing agent reviews the global logical consistency of the initial knowledge graph and feeds back the review results to the building agent for iterative updates, ultimately constructing a unified, complete, and high-fidelity bridge maintenance knowledge graph.

[0009] Optionally, step S1 includes the following specific steps:

[0010] S101. Pass the bridge inspection report to a decomposition agent based on a large language model. The decomposition agent performs semantic segmentation, dividing the report into different topic blocks, each of which integrates all sentences related to a single topic. The decomposition agent uses a general large-scale model API and a specially designed prompt word template: [task instruction] + [filtered input text] + [output topic text block format example] + [output format constraints]. Finally, the decomposition agent outputs a report... Convert to a group A coherent thematic text block :

[0011] (1)

[0012] Each topic block It is a tuple containing a topic and a collection of sentences related to this topic , It refers to the first One sentence. It refers to the first Each topic block.

[0013] Optionally, step S2 includes the following specific steps:

[0014] S201. For each sentence in the topic text block Extracting intelligent agents Extract entities and relationships that conform to the predefined ontology; extract the API interfaces and design-specific prompts for the agent to use the general large model. Template: [Role Instructions] + [Core Task Instructions (including definitions of entities and relations, etc.)] + [Domain Auxiliary Information for Enhanced Retrieval] + [Dynamically Extracted Sample Examples] + [Input Text] + [Output Triple Format Examples] + [Output Format Constraints]; Finally, the extraction agent extracts the topic text block into an initial set of triples and outputs it as candidate triples in JSON format. :

[0015] (2)

[0016] in, This is an example of dynamically extracting samples. To enhance the search for domain-specific auxiliary information;

[0017] S202, candidate triplet Passed to the validating agent The review process verifies that the agent performs text fact verification and content extraction checks; it also verifies that the agent uses the API interface of the general large model and the specially designed prompt word template: [role instruction] + [triplets to be checked] + [text fact check rules] + [content check rules] + [output error message example] + [output format constraints].

[0018] The validating agent calculates the triplet quality score based on the number and type of errors in the output. , Triple mass fraction The calculation formula is as follows:

[0019] (3)

[0020] in, and All are weights. The quantity is inconsistent with the facts. It represents the number of content errors;

[0021] Finally, verify that the agent outputs a quality score and error messages in JSON format, detailing the error type and location. :

[0022] (4)

[0023] S203, if the triplet Validation failed, i.e., triplet quality score Then the triplet and error messages Together they are transmitted to the correction agent The corrective agent adjusts based on error messages. The specific feedback was revised; the correction agent used the API interface of the general large model and the specially designed prompt word template: [role instruction] + [triple to be corrected] + [correction constraint] + [output format constraint];

[0024] Finally, the correcting agent adjusts based on the error message. Modify triples And generate an improved version of the triplet. :

[0025] (5)

[0026] If the triplet mass fraction The loop terminates if the triple is successfully verified. As the final output.

[0027] Optionally, step S3 includes the following specific steps:

[0028] S301. The knowledge learning mechanism uses the paraphrase-multilingual-MiniLM-L12-v2 language model to compute validated triples. Sentences Compared with existing example sentences in knowledge base L semantic similarity Evaluate each validated sentence-triple pair The novelty score is calculated using the following formula:

[0029] (6)

[0030] S302, based on the preset novelty threshold Validated sentence-triple pairs with high novelty scores are selectively added to the knowledge base L, enabling dynamic expansion of the knowledge base:

[0031] (7)

[0032] in, This is the updated knowledge base.

[0033] Optionally, step S4 includes the following specific steps:

[0034] S401, Constructing Intelligent Agents Aggregate all verified triples , Entity alignment is performed by calculating semantic similarity scores between entity tags using the paraphrase-multilingual-MiniLM-L12-v2 language model and merging entities that exceed a preset threshold. Subsequently, corresponding entities and relations are extracted according to the standard JOSN format, and an initial knowledge graph is constructed in Neo4j. ;

[0035] (8)

[0036] S402. To detect errors in the initial knowledge graph, a subgraph with semantic connections is first extracted from the initial knowledge graph, and then the constructing agent flattens it into a human-readable narrative chain. Narrative chain The graph in question is a knowledge graph. ;

[0037] Then, examine the intelligent agent. The narrative chain is examined for logical coherence, semantic integrity, and domain common sense; if errors are found, a revised narrative chain is generated. The review agent uses the API interface of the general large model and the specially designed prompt word template: [role instruction] + [compliance link rule] + [input narrative chain] + [output modified narrative chain format example] + [output format constraint];

[0038] Finally, the reviewing agent outputs a revised narrative chain. :

[0039] (9)

[0040] S403, Revised Narrative Chain by a parser Decomposed into a set of modified triples based on the key value. :

[0041] (10)

[0042] Finally, based on the corrected triplet Keywords in knowledge graph The relevant content is searched and deleted, and then the intelligent agent adds the corrected triples into the knowledge graph. To form an updated knowledge graph :

[0043] (11)

[0044] The process continues iteratively until the reviewing agent determines that it will not output the revised narrative chain, ultimately outputting the constructed bridge maintenance knowledge graph.

[0045] Based on the same inventive concept, the present invention provides a bridge maintenance knowledge graph construction system based on a large-scale multi-agent model, comprising:

[0046] The database construction module is used to standardize and partition bridge inspection reports as unstructured data. The decomposition agent transforms the raw text into centralized, analyzable units, creates constraints and coherent contexts, and establishes a text annotation database for the bridge maintenance field.

[0047] The high-quality triple output module is used to construct an entity and relation extraction module for the bridge domain using a joint entity and relation extraction method, and output high-quality triples. Specifically, the topic text block containing the topic processed in step S1 is used as input. The extraction agent extracts triples from the topic text, and then the verification agent checks whether the extracted triples conform to the ontology and domain knowledge of the bridge detection domain. Finally, the correction agent corrects the triples with errors. The process of iteratively extracting, verifying and correcting triples is carried out to output high-quality triples.

[0048] The database update module is used to establish a dynamic knowledge learning mechanism, evaluate the semantic novelty of verified knowledge triples, and selectively add high-value examples representing new knowledge to the dynamic knowledge base to obtain the updated knowledge base. Semantic novelty is a quantitative indicator that measures the degree of semantic difference between verified knowledge triples and existing knowledge base content.

[0049] The knowledge graph construction module is used to construct an initial knowledge graph by performing entity alignment and disambiguation based on all the obtained verified knowledge triples. Subsequently, the reviewing agent reviews the global logical consistency of the initial knowledge graph and feeds the review results back to the construction agent for iterative updates, ultimately constructing a unified, complete and high-fidelity bridge maintenance knowledge graph.

[0050] Optionally, the database construction module passes the bridge inspection report to a decomposition agent based on a large language model. The decomposition agent performs semantic segmentation, dividing the report into different topic blocks, each of which integrates all sentences related to a single topic. The decomposition agent uses a general large-scale model API and a specially designed prompt word template: [task instruction] + [filtered input text] + [output topic text block format example] + [output format constraints]. Finally, the decomposition agent outputs a report... Convert to a group A coherent thematic text block :

[0051] (1)

[0052] Each topic block It is a tuple containing a topic and a collection of sentences related to this topic , It refers to the first One sentence. It refers to the first Each topic block.

[0053] Optionally, in the high-quality triple output module, for each sentence in the topic text block... Extracting intelligent agents Extract entities and relationships that conform to the predefined ontology; extract the API interfaces and design-specific prompts for the agent to use the general large model. Template: [Role Instructions] + [Core Task Instructions (including definitions of entities and relations, etc.)] + [Domain Auxiliary Information for Enhanced Retrieval] + [Dynamically Extracted Sample Examples] + [Input Text] + [Output Triple Format Examples] + [Output Format Constraints]; Finally, the extraction agent extracts the topic text block into an initial set of triples and outputs it as candidate triples in JSON format. :

[0054] (2)

[0055] in, This is an example of dynamically extracting samples. To enhance the search for domain-specific auxiliary information;

[0056] Candidate Triples Passed to the validating agent The review process verifies that the agent performs text fact verification and content extraction checks; it also verifies that the agent uses the API interface of the general large model and the specially designed prompt word template: [role instruction] + [triplets to be checked] + [text fact check rules] + [content check rules] + [output error message example] + [output format constraints].

[0057] The validating agent calculates the triplet quality score based on the number and type of errors in the output. , Triple mass fraction The calculation formula is as follows:

[0058] (3)

[0059] in, and All are weights. The quantity is inconsistent with the facts. It represents the number of content errors;

[0060] Finally, verify that the agent outputs a quality score and error messages in JSON format, detailing the error type and location. :

[0061] (4)

[0062] If triplet Validation failed, i.e., triplet quality score Then the triplet and error messages Together they are transmitted to the correction agent The corrective agent adjusts based on error messages. The specific feedback was revised; the correction agent used the API interface of the general large model and the specially designed prompt word template: [role instruction] + [triple to be corrected] + [correction constraint] + [output format constraint];

[0063] Finally, the correcting agent adjusts based on the error message. Modify triples And generate an improved version of the triplet. :

[0064] (5)

[0065] If the triplet mass fraction The loop terminates if the triple is successfully verified. As the final output.

[0066] Based on the same inventive concept, the present invention provides an electronic device including a processor and a storage medium;

[0067] The storage medium is used to store instructions;

[0068] The processor is configured to operate according to the instructions to perform the steps of the method described above.

[0069] Based on the same inventive concept, the computer-readable storage medium of the present invention stores a computer program thereon, which, when executed by a processor, implements the steps of the method described above.

[0070] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: The present invention proposes a construction method based on multi-agent hierarchical collaboration and self-correction. By simulating the internal verification and external review mechanism of expert collaboration, it effectively overcomes the risks of "illusion" and factual errors in large language models. This enables the construction process to achieve full automation, reduce costs and improve efficiency, while ensuring the high fidelity and high credibility of the generated knowledge. It solves the core problem of applying automated knowledge graphs in the field of bridge maintenance and provides a more accurate and reliable data foundation for subsequent engineering decisions. Attached Figure Description

[0071] Figure 1 This is a flowchart of the present invention. Detailed Implementation

[0072] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0073] Example 1: As Figure 1 As shown, this invention discloses a method for constructing a bridge maintenance knowledge graph based on a large-scale multi-agent model, comprising the following steps:

[0074] S1. Standardize and partition bridge inspection reports as unstructured data. The decomposition agent transforms the original text into centralized, analyzable units, creating constraints and coherent context for subsequent extraction tasks, and establishing a text annotation database for the bridge maintenance field.

[0075] Step S1 includes the following specific steps:

[0076] S101. Pass the inspection report to a decomposition agent based on a large language model. The agent performs semantic segmentation, dividing the report into different topic blocks, each of which integrates all sentences related to a single topic. The agent uses a general large-scale model API and a specially designed prompt word template: [task instruction] + [filtered input text] + [output topic text block]. [Format Example] + [Output Format Constraints]; where, [Task Instructions]: Please identify the main themes described in the text (e.g., defects of specific components, specific types of detection findings, such as "main beam defects", "bridge deck pavement cracks", "support problems"), and then categorize different texts under the most relevant themes; [Input Filtered Text]: The input text; [Output Theme Text Block Format Example]: {{"Main Beam Defects":["Concrete in the anchorage area on the left side of the bottom of L2# box girder, 35m from pier 2, 1 exposed rebar, 3m long.", "Concrete at the bottom of L3# box girder, 2 cracks, 3m long."], "Bridge Deck Pavement Problems":["Multiple transverse cracks are visible in the bridge deck pavement layer, with uneven width.", "Local displacement of asphalt surface layer."]}}. [Output Format Constraints]: It is mandatory that only JSON format content is returned in the end; ultimately, the decomposition agent can generate a report. Convert to a group A coherent thematic text block :

[0077] (1)

[0078] Each topic block It is a tuple containing a topic and a collection of sentences related to this topic , It refers to the first One sentence. It refers to the first Each topic block.

[0079] S2. An entity and relation extraction module for the bridge domain is constructed by employing a joint entity and relation extraction method and combining it with an internal triplet self-correction loop consisting of extraction, verification, and correction agents (i.e., a closed-loop iterative mechanism consisting of extraction, verification, and correction agents, which continuously reviews and corrects factual and content errors to mitigate the illusion of a large model and ultimately output high-fidelity knowledge triples). Taking the topic text block containing the topic processed in step S1 as input, the extraction agent extracts triples from the topic text, namely, head entity-relation-tail entity. Then, the verification agent checks whether the extracted triples conform to the ontology and domain knowledge of the bridge detection domain. Finally, the correction agent corrects the triples with errors. This internal triplet correction loop iteratively extracts, verifies, and corrects triples to ultimately output high-quality triples.

[0080] Step S2 includes the following specific steps:

[0081] S201. For each sentence in the topic text block Extracting intelligent agents Extract entities and relationships that conform to the predefined ontology; extract the API interfaces and design-specific prompts for the agent to use the general large model. Template: [Role Instructions] + [Core Task Instructions (including definitions of entities and relations, etc.)] + [Domain Auxiliary Information for Enhanced Retrieval] + [Example of Dynamically Extracted Samples] + [Input Text] + [Example of Output Triple Format] + [Output Format Constraints];

[0082] Among them, [Role Instructions]: You are a bridge domain expert. Based on the provided context, you ensure that the entities extracted match the bridge domain knowledge answers.

[0083] [Core Task Instructions]: Complete the task of extracting entities, relationships, and attributes from bridge inspection text: 1) Perform entity recognition based on given entities (e.g., component number, component location, defect location, defect, defect quantity, defect symptom description category, defect symptom value); 2) Perform relationship recognition based on given relationships (e.g., component location is a relationship from component to component number, specific location is a relationship from component number to component location, specific defect location is a relationship from component location to defect location, existence of defect is a relationship from defect location to defect); 3) Cleaning rules (e.g., delete redundant modifiers);

[0084] [Domain-Auxiliary Information for Enhanced Retrieval]: Domain-auxiliary information for enhanced retrieval refers to external domain texts, such as professional books and industry standards. Using retrieval enhancement generation techniques, relevant domain information is found based on the semantic similarity between the sentence to be extracted and the external text. External knowledge serves as an aid to the large model in correctly understanding and extracting professional terms;

[0085] [Example of dynamically extracted samples]: Prompt words It is a dynamic placeholder that will be retrieved from the knowledge base L based on the text to be processed. Initially, the knowledge base L is empty. Each time the final triple after extraction, verification and correction is processed, it will be added to the knowledge base L based on the calculated novelty score. The most similar and verified successful case will be retrieved and dynamically inserted into the prompt words.

[0086] [Input text{context}]: Each sentence in the topic text block ;

[0087] [Example of output triplet format]: [{"Text":"1 longitudinal crack in the concrete of the expansion joint anchorage zone at L3# platform","Trinity":["Component: Expansion Joint > Component Location is > Component Number: L3# platform","Component Number: L3# platform > Specific Location of Defect is > Defect Location: Anchorage Zone Concrete","Defect Location: Anchorage Zone Concrete > Existing Defect is > Defect: Longitudinal Crack"]},{"Text":"15% Voiding at 3# Support","Trinity":["Component: Support > Component Location is > Component Number: 3#","Component Number: 3# > Existing Defect is > Defect: Voiding"],["Voiding > Voiding Rate > 15%"]}];

[0088] [Output format constraint]: It is mandatory that only JSON format content should be returned in the end.

[0089] Finally, the extraction agent extracts the topic text blocks into an initial set of triples and outputs them as candidate triples in JSON format. :

[0090] (2)

[0091] in, This is an example of dynamically extracting samples. To enhance the search with domain-specific auxiliary information.

[0092] S202, candidate triplet Passed to the validating agent The review process verifies that the agent performs text fact verification and content extraction checks; it also verifies that the agent uses the API interface of the general large model and the specially designed prompt word template: [role instruction] + [triplets to be checked] + [text fact check rules] + [content check rules] + [output error message example] + [output format constraints].

[0093] Among them, [Role Instruction]: You are a bridge expert. Please perform triplet detection according to the text fact verification and content extraction inspection rules, give a comprehensive score and propose modification suggestions;

[0094] [Triples to be checked]: Candidate triples to be validated. , It refers to the first Second verification;

[0095] [Text Fact Checking Rules]: The content of triples can only be extracted from the original text; it is not allowed to generate content that deviates from the original text.

[0096] [Content Inspection Rules]: Triples can only contain defined entities and relations (e.g., an entity can only be one of the following: component number, component, component location, defect location, defect, defect quantity, defect symptom description category, defect symptom value; relations can only conform to the following rules: component location is a relationship from component to component number, specific location is a relationship from component number to component location, specific defect location is a relationship from component location to defect location, and the existence of a defect is a relationship from defect location to defect).

[0097] [Example of output error message]: {"Part to be modified":{"Content check - Relationship error":["The relationship between the head entity and the tail entity is the component number should be that the component position is "]};

[0098] [Output format constraint]: It is mandatory that only JSON format content should be returned in the end.

[0099] The validating agent calculates the triplet quality score based on the number and type of errors in the output. , ternary mass fraction The calculation formula is as follows:

[0100] (3)

[0101] in, and All are weights. The quantity is inconsistent with the facts. It represents the number of content errors.

[0102] Finally, verify that the agent outputs a quality score and error messages in JSON format, detailing the error type and location. :

[0103] (4)

[0104] in, This is an error message.

[0105] S203, if the triplet Validation failed, i.e., triplet quality score Then the triplet and error messages Together they are transmitted to the correction agent According to the error message The specific feedback was revised; the correction agent used the API interface of the general large model and the specially designed prompt word template: [role instruction] + [triple to be corrected] + [correction constraint] + [output format constraint];

[0106] Among them, [Role Instructions]: You are a bridge expert. Please modify the input triples according to the error messages, and output the modified triples. The rules are as follows: 1) Modification of the "text" content is not allowed; 2) Check whether the modification requirements are reasonable and whether they conform to the original text content; 3) Modify the "extraction results" according to the "problems" in the "part to be modified".

[0107] [Triples to be corrected]: Triples to be corrected ;

[0108] [Correct Constraints]: Error message output by S202 ;

[0109] [Output format constraint]: It is mandatory that only JSON format content should be returned in the end.

[0110] Finally, the correcting agent adjusts based on the error message. Modify triples And generate an improved version of the triplet. :

[0111] (5)

[0112] If the triplet mass fraction The loop terminates if the triple is successfully verified. As the final output.

[0113] S3. Establish a dynamic knowledge learning mechanism and evaluate the knowledge triples verified in step S2. Semantic novelty selectively adds high-value examples representing new knowledge to the dynamic knowledge base for subsequent retrieval tasks, thus forming a self-reinforcing learning loop that improves system performance and domain understanding over time. Semantic novelty is a quantitative indicator that measures the degree of semantic difference between validated knowledge triples and existing knowledge base content, used to filter out high-value unique knowledge.

[0114] Step S3 includes the following specific steps:

[0115] S301. The knowledge learning mechanism uses the paraphrase-multilingual-MiniLM-L12-v2 language model to compute validated triples. Sentences Compared with existing example sentences in knowledge base L semantic similarity This allows for the evaluation of each validated sentence-triple pair. The novelty score is calculated using the following formula:

[0116] (6)

[0117] S302, based on the preset novelty threshold Validated sentence-triple pairs with high novelty scores are selectively added to the knowledge base L, enabling dynamic expansion of the knowledge base:

[0118] (7)

[0119] in, This updated knowledge base will be used for subsequent enhanced knowledge extraction tasks, thereby enabling the system's meta-learning capabilities.

[0120] S4. Based on all the verified knowledge triples obtained in steps S2 and S3, the building agent performs entity alignment and ablation to construct an initial knowledge graph. Subsequently, through an external graph self-correction loop, the reviewing agent reviews the global logical consistency of the initial knowledge graph and feeds the review results back to the building agent for iterative updates, ultimately constructing a unified, complete, and high-fidelity bridge maintenance knowledge graph.

[0121] The external graph self-correction loop in step S4 aims to detect and correct logical inconsistencies or semantic errors at the graph level, and includes the following sub-steps:

[0122] S401, Constructing Intelligent Agents Aggregate all verified triples , The semantic similarity score between entity tags is calculated using the paraphrase-multilingual-MiniLM-L12-v2 language model, and entities exceeding a preset threshold are merged to perform entity alignment. Subsequently, based on the standard JOSN format (e.g., [{"text":"vertical crack at beam #8 on the east side of cap beam","triple":["component: cap beam>component location is>component number: 1#","component number: 1#>specific location is>component location: east side","component location: east side>specific location of the defect is>defect location: beam #8","defect location: beam #8>existing defect is>defect:vertical crack"]}]), the corresponding entities and relationships are extracted from the entity tags (e.g., component, component number, component location, defect location, defect), and an initial knowledge graph is constructed in Neo4j. ;

[0123] (8)

[0124] S402. To detect errors in the initial knowledge graph, a subgraph with semantic connections is first extracted from the initial knowledge graph produced in S401, and then the building agent flattens it into a human-readable narrative chain. Narrative chain The graph in question is a knowledge graph. For example, the output after flattening is: Component: Cap Beam - Component Location is - Component Number: 1#" - Specific Location is - Component Location: East Side - Specific Location of Defect is - Defect Location: Beam 8# - Existing Defect is - Defect: Vertical Crack.

[0125] Then, examine the intelligent agent. Examine the logical coherence, semantic integrity, and domain common sense of these narrative chains; if errors are found, generate a corrected version. The review agent uses the API interface of the general large model and the specially designed prompt word template: [role instruction] + [compliance link rule] + [input narrative chain] + [output modified narrative chain format example] + [output format constraint];

[0126] Among them, [Role Instruction]: You are a bridge expert. Please check whether the input narrative chain conforms to the link order and linguistic logic, and modify the narrative chain according to the rules;

[0127] [Compliant Link Rules]: The correct link rules should be as follows (e.g., Component - Component Location is - Component Number - Specific Part is - Component Part - Specific Location of Defect is - Defect Location - Existing Defect is - Defect).

[0128] [Input Narrative Chain]: For the flattened narrative chain ;

[0129] [Example of the corrected narrative chain format]: [{Component: cap beam - component location is - component number: 1#" - specific location is - component location: east side - specific location of the defect is - location of the defect: at beam #8 - defect exists - defect: vertical crack}];

[0130] [Output format constraint]: It is mandatory that only JSON format content should be returned in the end.

[0131] (9)

[0132] in, To output the corrected narrative chain.

[0133] S403, Revised Narrative Chain by a parser Decomposed into a set of modified triples based on the key value. :

[0134] (10)

[0135] Finally, based on these revised triples Keywords in knowledge graph The relevant content is searched and deleted, and then the intelligent agent adds the corrected triples into the knowledge graph. To form an updated knowledge graph :

[0136] (11)

[0137] The process iterates until the review agent determines that it will not output a revised narrative chain. Finally, the method outputs the constructed bridge maintenance knowledge graph.

[0138] Example 2: A bridge maintenance knowledge graph construction system based on a large model and multiple agents, as described in this invention, includes:

[0139] The database construction module is used to standardize and partition bridge inspection reports, which are unstructured data. The decomposition agent transforms the raw text into centralized, analyzable units, creates constraints and coherent contexts, and establishes a text annotation database for the bridge maintenance field.

[0140] The database construction module passes the bridge inspection report to a decomposition agent based on a large language model. The decomposition agent performs semantic segmentation, dividing the report into different topic blocks, each of which integrates all sentences related to a single topic. The decomposition agent uses a general large-scale model API and a specially designed prompt word template: [task instruction] + [filtered input text] + [output topic text block format example] + [output format constraints]. Finally, the decomposition agent outputs a report... Convert to a group A coherent thematic text block :

[0141] (1)

[0142] Each topic block It is a tuple containing a topic and a collection of sentences related to this topic , It refers to the first One sentence. It refers to the first Each topic block.

[0143] The high-quality triple output module is used to construct an entity and relation extraction module for the bridge domain by employing a joint entity and relation extraction method and combining an internal triple self-correction loop. Taking the topic text block containing the topic processed in step S1 as input, the extraction agent extracts the triples from the topic text, namely, head entity-relation-tail entity. Then, the verification agent checks whether the extracted triples conform to the ontology and domain knowledge of the bridge detection domain. Finally, the correction agent corrects the triples with errors. This process iteratively extracts, verifies, and corrects triples to ultimately achieve the output of high-quality triples.

[0144] The high-quality triple output module outputs each sentence in the topic text block. Extracting intelligent agents Extract entities and relationships that conform to the predefined ontology; extract the API interfaces and design-specific prompts for the agent to use the general large model. Template: [Role Instructions] + [Core Task Instructions (including definitions of entities and relations, etc.)] + [Domain Auxiliary Information for Enhanced Retrieval] + [Dynamically Extracted Sample Examples] + [Input Text] + [Output Triple Format Examples] + [Output Format Constraints]; Finally, the extraction agent extracts the topic text block into an initial set of triples and outputs it as candidate triples in JSON format. :

[0145] (2)

[0146] in, This is an example of dynamically extracting samples. To enhance the search with domain-specific auxiliary information.

[0147] Candidate Triples Passed to the validating agent The review verifies that the agent performs text fact verification and content extraction checks; it also verifies that the agent uses the API interface of the general large model and the specially designed prompt word template: [role instruction] + [triplets to be checked] + [text fact check rules] + [content check rules] + [output error message example] + [output format constraints].

[0148] The validating agent calculates the triplet quality score based on the number and type of errors in the output. , ternary mass fraction The calculation formula is as follows:

[0149] (3)

[0150] in, and All are weights. The quantity is inconsistent with the facts. It represents the number of content errors;

[0151] Finally, verify that the agent outputs a quality score and error messages in JSON format, detailing the error type and location. :

[0152] (4)

[0153] If triplet Validation failed, i.e., triplet quality score Then the triplet and error messages Together they are transmitted to the correction agent The corrective agent adjusts based on error messages. The specific feedback was revised; the correction agent used the API interface of the general large model and the specially designed prompt word template: [role instruction] + [triple to be corrected] + [correction constraint] + [output format constraint];

[0154] Finally, the correcting agent adjusts based on the error message. Modify triples And generate an improved version of the triplet. :

[0155] (5)

[0156] If the triplet mass fraction The loop terminates if the triple is successfully verified. As the final output.

[0157] The database update module is used to establish a dynamic knowledge learning mechanism, evaluate the semantic novelty of verified knowledge triples, and selectively add high-value examples representing new knowledge to the dynamic knowledge base to obtain the updated knowledge base.

[0158] The knowledge learning mechanism in the database update module uses the paraphrase-multilingual-MiniLM-L12-v2 language model to compute validated triples. Sentences Compared with existing example sentences in knowledge base L semantic similarity Evaluate each validated sentence-triple pair The novelty score is calculated using the following formula:

[0159] (6)

[0160] Based on the preset novelty threshold Validated sentence-triple pairs with high novelty scores are selectively added to the knowledge base L, enabling dynamic expansion of the knowledge base:

[0161] (7)

[0162] in, This is the updated knowledge base.

[0163] The knowledge graph construction module is used to construct an initial knowledge graph by performing entity alignment and ablation on all the obtained verified knowledge triples by the construction agent. Subsequently, through the graph self-correction loop, the review agent reviews the global logical consistency of the initial knowledge graph and feeds back the review results to the construction agent for iterative updates, ultimately constructing a unified, complete and high-fidelity bridge maintenance knowledge graph.

[0164] Building intelligent agents in the knowledge graph construction module Aggregate all verified triples , Entity alignment is performed by calculating semantic similarity scores between entity tags using the paraphrase-multilingual-MiniLM-L12-v2 language model and merging entities that exceed a preset threshold. Subsequently, corresponding entities and relations are extracted according to the standard JOSN format, and an initial knowledge graph is constructed in Neo4j. ;

[0165] (8)

[0166] To detect errors in the initial knowledge graph, a subgraph with semantic connections is first extracted from the initial knowledge graph, and then the constructing agent flattens it into a human-readable narrative chain. Narrative chain The graph in question is a knowledge graph. .

[0167] Then, examine the intelligent agent. The narrative chain is examined for logical coherence, semantic integrity, and domain common sense; if errors are found, a revised narrative chain is generated. The review agent uses the API interface of the general large model and the specially designed prompt word template: [role instruction] + [compliance link rule] + [input narrative chain] + [output modified narrative chain format example] + [output format constraint].

[0168] Finally, the reviewing agent outputs a revised narrative chain. :

[0169] (9)

[0170] Revised narrative chain by a parser Decomposed into a set of modified triples based on the key value. :

[0171] (10)

[0172] Finally, based on the corrected triplet Keywords in knowledge graph The relevant content is searched and deleted, and then the intelligent agent adds the corrected triples into the knowledge graph. To form an updated knowledge graph :

[0173] (11)

[0174] The process continues iteratively until the reviewing agent determines that it will not output the revised narrative chain, ultimately outputting the constructed bridge maintenance knowledge graph.

[0175] Example 3: An electronic device according to the present invention includes a processor and a storage medium;

[0176] Storage media are used to store instructions;

[0177] The processor is configured to operate according to the instructions to perform the steps of the method described above.

[0178] Example 4: The computer-readable storage medium of the present invention stores a computer program thereon, which, when executed by a processor, implements the steps of the method described above.

Claims

1. A method for constructing a bridge maintenance knowledge graph based on a large-scale multi-agent model, characterized in that, Includes the following steps: S1. Standardize and partition bridge inspection reports as unstructured data. The decomposition agent transforms the raw text into centralized, analyzable units, creates constraints and coherent contexts, and establishes a text annotation database for the bridge maintenance field. S2. An entity and relation extraction module is constructed using a joint entity and relation extraction method to extract entities and relations in the bridge domain, outputting high-quality triples. Specifically, the topic text block containing the topic processed in step S1 is used as input. The extraction agent extracts triples from the topic text, and then the verification agent checks whether the extracted triples conform to the ontology and domain knowledge of the bridge detection domain. Finally, the correction agent corrects the triples with errors. The process of extracting, verifying and correcting triples iteratively outputs high-quality triples. The extraction agent retrieves the most similar and verified successful case from the dynamic knowledge base based on the text to be processed, and dynamically inserts it into the prompt words of the extraction agent. The dynamic knowledge base is initially empty. The verification agent performs text fact verification and content extraction checks. The verification agent calculates the triplet quality score based on the number and type of errors in the output. The verification agent outputs the quality score and an error message that details the error type and location. If the quality score is less than the threshold, the triplet verification fails. The triplet and the error message are passed to the correction agent, which corrects the triplet based on the error message. S3. Establish a dynamic knowledge learning mechanism, evaluate the semantic novelty of the knowledge triples verified in step S2, and selectively add high-value examples representing new knowledge to the dynamic knowledge base to obtain an updated knowledge base. Semantic novelty is a quantitative indicator that measures the degree of semantic difference between verified knowledge triples and existing knowledge base content; S4. Based on all the obtained verified knowledge triples, the building agent performs entity alignment and disambiguation to construct the initial knowledge graph. Subsequently, the review agent reviews the global logical consistency of the initial knowledge graph and feeds the review results back to the construction agent for iterative updates, ultimately constructing a unified, complete, and high-fidelity bridge maintenance knowledge graph. The process involves extracting semantically connected subgraphs from the initial knowledge graph and flattening them into human-readable narrative chains by a building agent. The graph containing these narrative chains is the knowledge graph. A reviewing agent examines the logical coherence, semantic integrity, and domain common sense of the narrative chains. If errors are found, a corrected narrative chain is generated. The corrected narrative chain is decomposed into corrected triples, which are then added to the knowledge graph by the building agent to form an updated knowledge graph.

2. The method for constructing a bridge maintenance knowledge graph based on a large-scale multi-agent model according to claim 1, characterized in that: Step S1 includes the following specific steps: S101. Pass the bridge inspection report to a decomposition agent based on a large language model. The decomposition agent performs semantic segmentation, dividing the report into different topic blocks, each of which integrates all sentences related to a single topic. The decomposition agent uses a general large-scale model API and a specially designed prompt word template: [task instruction] + [filtered input text] + [output topic text block format example] + [output format constraints]. Finally, the decomposition agent outputs a report... Convert to a group A coherent thematic text block : (1) Each topic block It is a tuple containing a topic and a collection of sentences related to this topic , It refers to the first One sentence. It refers to the first Each topic block.

3. The method for constructing a bridge maintenance knowledge graph based on a large model and multiple agents according to claim 2, characterized in that: Step S2 includes the following specific steps: S201. For each sentence in the topic text block Extracting intelligent agents Extract entities and relationships that conform to the predefined ontology; extract the API interfaces and design-specific prompts for the agent to use the general large model. Template: [Role Instructions] + [Core Task Instructions (including entity and relation ontology definitions)] + [Domain Auxiliary Information for Enhanced Retrieval] + [Dynamically Extracted Sample Examples] + [Input Text] + [Output Triple Format Examples] + [Output Format Constraints]; Finally, the extraction agent extracts the topic text block into an initial set of triples and outputs it as candidate triples in JSON format. : (2) in, This is an example of dynamically extracting samples. To enhance the search for domain-specific auxiliary information; S202, candidate triplet Passed to the validating agent The review process verifies that the agent performs text fact verification and content extraction checks; it also verifies that the agent uses the API interface of the general large model and the specially designed prompt word template: [role instruction] + [triplets to be checked] + [text fact check rules] + [content check rules] + [output error message example] + [output format constraints]. The validating agent calculates the triplet quality score based on the number and type of errors in the output. , ternary mass fraction The calculation formula is as follows: (3) in, and All are weights. The quantity is inconsistent with the facts. It represents the number of content errors; Finally, verify that the agent outputs a quality score and error messages in JSON format, detailing the error type and location. : (4) S203, if the triplet Validation failed, i.e., triplet quality score Then the triplet and error messages Together they are transmitted to the correction agent The corrective agent adjusts based on error messages. The specific feedback was revised; the correction agent used the API interface of the general large model and the specially designed prompt word template: [role instruction] + [triple to be corrected] + [correction constraint] + [output format constraint]; Finally, the correcting agent adjusts based on the error message. Modify triples And generate an improved version of the triplet. : (5) If the triplet mass fraction The loop terminates if the triple is successfully verified. As the final output.

4. The method for constructing a bridge maintenance knowledge graph based on a large model and multiple agents according to claim 3, characterized in that: Step S3 includes the following specific steps: S301. The knowledge learning mechanism uses the paraphrase-multilingual-MiniLM-L12-v2 language model to compute validated triples. Sentences Compared with existing example sentences in knowledge base L semantic similarity Evaluate each validated sentence-triple pair The novelty score is calculated using the following formula: (6) S302, based on the preset novelty threshold Validated sentence-triple pairs with high novelty scores are selectively added to the knowledge base L, enabling dynamic expansion of the knowledge base: (7) in, This is the updated knowledge base.

5. The method for constructing a bridge maintenance knowledge graph based on a large model and multiple agents according to claim 4, characterized in that: Step S4 includes the following specific steps: S401, Constructing Intelligent Agents Aggregate all verified triples , The semantic similarity scores between entity tags are calculated using the paraphrase-multilingual-MiniLM-L12-v2 language model, and entities exceeding a preset threshold are merged to perform entity alignment. Subsequently, corresponding entities and relations are extracted according to the standard JOSN format, and an initial knowledge graph is constructed in Neo4j. ; (8) S402. To detect errors in the initial knowledge graph, a subgraph with semantic connections is first extracted from the initial knowledge graph, and then the constructing agent flattens it into a human-readable narrative chain. Narrative chain The graph in question is a knowledge graph. ; Then, examine the intelligent agent. The narrative chain is examined for logical coherence, semantic integrity, and domain common sense; if errors are found, a revised narrative chain is generated. The review agent uses the API interface of the general large model and the specially designed prompt word template: [role instruction] + [compliance link rule] + [input narrative chain] + [output modified narrative chain format example] + [output format constraint]; Finally, the reviewing agent outputs a revised narrative chain. : (9) S403, Revised Narrative Chain by a parser Decomposed into a set of modified triples based on the key value. : (10) Finally, based on the corrected triplet Keywords in knowledge graph The relevant content is searched and deleted, and then the intelligent agent adds the corrected triples into the knowledge graph. To form an updated knowledge graph : (11) The process continues iteratively until the reviewing agent determines that it will not output the revised narrative chain, ultimately outputting the constructed bridge maintenance knowledge graph.

6. A bridge maintenance knowledge graph construction system based on a large-scale multi-agent model, characterized in that, include: The database construction module is used to standardize and partition bridge inspection reports as unstructured data. The decomposition agent transforms the raw text into centralized, analyzable units, creates constraints and coherent contexts, and establishes a text annotation database for the bridge maintenance field. The high-quality triple output module is used to construct an entity and relation extraction module for the bridge domain using a joint entity and relation extraction method, and output high-quality triples. Specifically, the topic text block containing the topic processed in step S1 is used as input. The extraction agent extracts triples from the topic text, and then the verification agent checks whether the extracted triples conform to the ontology and domain knowledge of the bridge detection domain. Finally, the correction agent corrects the triples with errors. The process of iteratively extracting, verifying and correcting triples is carried out to output high-quality triples. The extraction agent retrieves the most similar and verified successful case from the dynamic knowledge base based on the text to be processed, and dynamically inserts it into the prompt words of the extraction agent. The dynamic knowledge base is initially empty. The verification agent performs text fact verification and content extraction checks. The verification agent calculates the triplet quality score based on the number and type of errors in the output. The verification agent outputs the quality score and an error message that details the error type and location. If the quality score is less than the threshold, the triplet verification fails. The triplet and the error message are passed to the correction agent, which corrects the triplet based on the error message. The database update module is used to establish a dynamic knowledge learning mechanism and evaluate verified knowledge triples. Based on semantic novelty, high-value examples representing new knowledge are selectively added to the dynamic knowledge base to obtain an updated knowledge base; Semantic novelty is a quantitative indicator that measures the degree of semantic difference between verified knowledge triples and existing knowledge base content; The knowledge graph construction module is used to construct an initial knowledge graph by having the building agent perform entity alignment and disambiguation based on all the obtained verified knowledge triples. Subsequently, the review agent reviews the global logical consistency of the initial knowledge graph and feeds the review results back to the construction agent for iterative updates, ultimately constructing a unified, complete, and high-fidelity bridge maintenance knowledge graph. The process involves extracting semantically connected subgraphs from the initial knowledge graph and flattening them into human-readable narrative chains by a building agent. The graph containing these narrative chains is the knowledge graph. A reviewing agent examines the logical coherence, semantic integrity, and domain common sense of the narrative chains. If errors are found, a corrected narrative chain is generated. The corrected narrative chain is decomposed into corrected triples, which are then added to the knowledge graph by the building agent to form an updated knowledge graph.

7. A bridge maintenance knowledge graph construction system based on a large-scale multi-agent model according to claim 6, characterized in that: The database construction module transmits the bridge inspection report to a decomposition agent based on a large language model. The decomposition agent performs semantic segmentation, dividing the report into different topic blocks, each of which integrates all sentences related to a single topic. The decomposition agent uses a general large-scale model API and a specially designed prompt word template: [task instruction] + [filtered input text] + [output topic text block format example] + [output format constraints]. Finally, the decomposition agent outputs a report... Convert to a group A coherent thematic text block : (1) Each topic block It is a tuple containing a topic and a collection of sentences related to this topic , It refers to the first One sentence. It refers to the first Each topic block.

8. A bridge maintenance knowledge graph construction system based on a large model and multiple agents as described in claim 7, characterized in that: The high-quality triplet output module outputs each sentence in the topic text block. Extracting intelligent agents Extract entities and relationships that conform to the predefined ontology; extract the API interfaces and design-specific prompts for the agent to use the general large model. Template: [Role Instructions] + [Core Task Instructions (including entity and relation ontology definitions)] + [Domain Auxiliary Information for Enhanced Retrieval] + [Dynamically Extracted Sample Examples] + [Input Text] + [Output Triple Format Examples] + [Output Format Constraints]; Finally, the extraction agent extracts the topic text block into an initial set of triples and outputs it as candidate triples in JSON format. : (2) in, This is an example of dynamically extracting samples. To enhance the search for domain-specific auxiliary information; Candidate Triples Passed to the validating agent The review process verifies that the agent performs text fact verification and content extraction checks; it also verifies that the agent uses the API interface of the general large model and the specially designed prompt word template: [role instruction] + [triplets to be checked] + [text fact check rules] + [content check rules] + [output error message example] + [output format constraints]. The validating agent calculates the triplet quality score based on the number and type of errors in the output. , ternary mass fraction The calculation formula is as follows: (3) in, and All are weights. The quantity is inconsistent with the facts. It represents the number of content errors; Finally, verify that the agent outputs a quality score and error messages in JSON format, detailing the error type and location. : (4) If triplet Validation failed, i.e., triplet quality score Then the triplet and error messages Together they are transmitted to the correction agent The corrective agent adjusts based on error messages. The specific feedback was revised; the correction agent used the API interface of the general large model and the specially designed prompt word template: [role instruction] + [triple to be corrected] + [correction constraint] + [output format constraint]; Finally, the correcting agent adjusts based on the error message. Modify triples And generate an improved version of the triplet. : (5) If the triplet mass fraction The loop terminates if the triple is successfully verified. As the final output.

9. An electronic device, characterized in that, Including processor and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1 to 5.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Bridge operation and maintenance knowledge management and question answering method based on knowledge graph and large language model

    CN121835842A