Self-adaptive retrieval surveying and mapping quality inspection method based on knowledge graph enhancement
By constructing a lightweight knowledge graph and a dual-channel retrieval method, combined with an error-aware supplementary verification mechanism and evidence guardrails, the problems of incomplete retrieval, unstable reasoning, and untraceable results in surveying and mapping quality inspection were solved, achieving an efficient, accurate, and reliable surveying and mapping quality inspection process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU URBAN PLANNING & DESIGN SURVEY RES INST
- Filing Date
- 2025-12-12
- Publication Date
- 2026-05-15
AI Technical Summary
Existing surveying and mapping quality inspection methods are inefficient, easily affected by differences in human experience, and result in fragmented search results. They lack consistency verification and evidence traceability mechanisms, and cannot meet the traceability and compliance requirements of engineering acceptance.
An adaptive retrieval method based on knowledge graph enhancement is adopted. By constructing a lightweight quality inspection knowledge graph and combining text and knowledge graph dual-channel retrieval, an error-aware adaptive supplementary evidence loop is used to achieve the integrity of evidence recall and the stability of cross-clause reasoning. The traceability of the results is ensured through evidence packages and evidence guardrails.
It has improved the completeness of clause retrieval, enhanced the reasoning ability for complex judgments, ensured the traceability and compliance of results, reduced illusion and error rates, and improved quality inspection efficiency and consistency.
Smart Images

Figure CN122045330A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of surveying and mapping engineering and intelligent information processing, and in particular to an adaptive retrieval surveying and mapping quality inspection method based on knowledge graph enhancement. Background Technology
[0002] Quality inspection and acceptance of surveying and mapping results are fundamental to ensuring the reliability and compliance of surveying and mapping projects. Current procedures primarily rely on manual review of national or industry standards and technical regulations to compare and judge the results. This method is inefficient, highly susceptible to differences in human experience, and prone to omissions and inconsistencies, especially in large-scale surveying and mapping projects.
[0003] To improve efficiency, some organizations have attempted to establish quality inspection information systems based on databases or full-text searches. While these systems can locate clauses through keyword searches and assist in document management, their capabilities remain limited to the "information presentation" level, failing to achieve a deep understanding of the semantics of clauses or to make logical inferences across clauses. Search results are often fragmented, lacking context and supporting conditions, making it difficult to directly support quality conclusions. Furthermore, the output of these systems lacks consistency verification and evidence traceability mechanisms, making it difficult to meet the stringent requirements of traceability and compliance in project acceptance.
[0004] In recent years, knowledge graph (KG) and retrieval-enhanced generation (RAG) technologies have been increasingly applied to intelligent question answering and document analysis, providing answers to complex questions by combining structured knowledge and semantic retrieval. However, in surveying and mapping quality inspection and acceptance scenarios, existing KG+RAG technologies still have several significant limitations:
[0005] First, the search results are incomplete, and the relationships between clauses are often broken, making it impossible to guarantee the comprehensiveness of the conclusions.
[0006] Second, it lacks cross-clause and multi-parameter reasoning capabilities, especially in complex tasks such as sampling judgment and error threshold comparison, where it is unstable.
[0007] Third, the generated results suffer from illusions and inaccurate citations, often lacking anchor points such as clause numbers and page numbers, making them difficult to trace and audit.
[0008] In summary, designing a knowledge graph enhancement generation method that can simultaneously guarantee retrieval completeness, cross-clause reasoning ability, and traceability of output results in the context of surveying and mapping results quality inspection and acceptance has become a recognized technical challenge for those skilled in the art. This invention is proposed precisely to solve the aforementioned problems. Summary of the Invention
[0009] The purpose of this invention is to overcome the aforementioned deficiencies in the prior art and provide an adaptive retrieval and mapping quality inspection method based on knowledge graph enhancement. This method provides structured constraints through a lightweight knowledge graph, improves the completeness of evidence recall by employing a hierarchical retrieval mechanism with both text and knowledge graph channels, enhances the stability of cross-clause reasoning by utilizing an error-aware adaptive supplementary evidence loop, and achieves consistency verification of facts, citations, and values through evidence packages and evidence guardrails, thereby outputting a clause-level traceable final conclusion. This method can simultaneously solve the technical problems of insufficient retrieval completeness, unsound reasoning, and untraceable results.
[0010] To achieve the above objectives, this invention provides an adaptive retrieval and mapping quality inspection method based on knowledge graph enhancement, comprising the following steps:
[0011] S1. Construct a lightweight quality inspection knowledge graph, extract clause numbers, inspection elements and thresholds from quality inspection and acceptance standards, map the clauses to preset ontology to generate triples, and bind document identifiers, page numbers or segment number anchors, generate a relationship whitelist and establish a linkage mechanism between the knowledge graph and the document index.
[0012] S2. Perform entity recognition and terminology and unit standardization on user input, parse the result type, standard version and indicator constraints to generate standardized queries, and use a large language model to identify query intent and generate a retrieval plan that includes text channel and knowledge graph channel accordingly.
[0013] S3. Evidence is retrieved in parallel through the text channel and the knowledge graph channel. The text channel recalls candidate fragments through vector similarity and lexical relevance, while the knowledge graph channel retrieves relevant nodes, relationships and paths. The candidate evidence is then rearranged at the document level and the graph level, and an evidence score is obtained by combining time decay and source authority factors.
[0014] S4. Based on the preliminary evidence from step S3, generate initial candidate answers and extract assertions. Calculate the support score based on the implied score, attribution score, and path coverage. When the support is insufficient, perform a controlled knowledge graph walk by identifying the error perception. Supplement evidence based on path energy until the support score meets the threshold or reaches the iteration limit.
[0015] S5. Aggregate the completed knowledge graph path summary and document fragments according to the clause number to form an evidence package, and generate multiple candidate answers with reference locations and confidence information;
[0016] S6. Apply evidence barriers during the generation stage, using the valid path and the validity period of the clause as constraints, and perform multiple consistency checks on candidate answers. If the checks fail, trigger a rollback or rejection.
[0017] S7. Output the traceable results of the embedded clause number and page number, and record the evidence list and verification failure points for subsequent large language model optimization and knowledge graph update.
[0018] The above steps S1-S7 are considered as a processing system for a quality inspection question-answering system based on an adaptive retrieval surveying and mapping quality inspection method enhanced by knowledge graphs.
[0019] Preferably, step S1 includes the following processing steps:
[0020] S1.1 Extract clause numbers, result types, inspection elements, threshold conditions, and process nodes from the text of standards and procedures related to the quality inspection and acceptance of surveying and mapping results, and use them as clause elements to generate triples.
[0021] S1.2. Generate corresponding triples based on the clause elements extracted in step S1.1, and map the triples to a preset surveying and mapping quality inspection ontology. Generate a relation signature set and a relation whitelist according to label(domain,range). The relation signature set is used to limit the domain and value range of the relation, and the relation whitelist is used to constrain the legal relations allowed in the knowledge graph. The relation signature set is also solidified, and version and validity period attributes are added to the clause nodes.
[0022] S1.3. Bind a document anchor point to the triple, wherein the document anchor point includes at least a document identifier, page number or segment number, so as to realize bidirectional traceability between the triple and the standard and procedure documents;
[0023] S1.4 Establish a linkage mechanism between the knowledge graph index and the document index for subsequent knowledge graph retrieval and updates.
[0024] Preferably, step S2 includes the following processing steps:
[0025] S2.1 Perform entity recognition and terminology and unit standardization on user input, and parse the output type, standard version, indicators and units, scope or validity period elements;
[0026] S2.2. Generate a standardized query based on the elements parsed in step S2.1, and supplement necessary domain constraints, including unit conversion, threshold expression and time validity.
[0027] S2.3 Identify the query intent based on the normalized query and determine whether the query intent is retrieval-type, reasoning-type, or generative-type;
[0028] S2.4 Generate a retrieval plan based on the query intent, select text-first, graph-first, or mixed methods, and set the recall cap and reordering weights.
[0029] Preferably, in step S2.3, intent recognition performs syntactic and semantic parsing of user input using natural language processing technology, and automatically identifies question type, core entities and constraints based on a large language model, converting user input into a structured query representation to ensure that the retrieval plan matches user needs.
[0030] Preferably, step S3 includes the following processing steps:
[0031] S3.1. In the text channel, segment the key points of the standard and procedure documents into clauses or tables, and vectorize the resulting segments to obtain candidate segments;
[0032] S3.2. In the knowledge graph channel, retrieve relevant nodes, relationships and paths with the query entity as the seed, and prioritize returning subgraphs containing thresholds or exception conditions to obtain candidate paths;
[0033] S3.3. Perform a two-level reshuffling of candidate evidence at the document and tile levels, and rank the candidate evidence based on the mixed relevance, where mixed relevance... Define the following formula (1):
[0034] (1);
[0035] in To standardize the query, For tiles, The document to which the tile belongs. As weights, each tile is represented by a triple, which facilitates modular management and querying; Document-level relevance; For patch-level correlation, it is defined by the following formula (1):
[0036] (2);
[0037] in Let q and t be the vector representations of the query and the plot, respectively. Lexical relevance is used to measure the relevance of query q and graph tile t at the text matching level. This measure assesses the structural consistency between the query subgraph and the tile-aligned subgraph in terms of entities, relations, and paths. Gq is the structural subgraph corresponding to query q; Gt is the structural subgraph corresponding to tile t, where α, β, and γ are weighting coefficients, satisfying the following condition: ;
[0038] S3.4. Based on the above mixed correlation, a time decay factor and a source authority factor are introduced to fuse and deduplicate candidate evidence, resulting in the final evidence score. Its definition is as follows: (3)
[0039] (3);
[0040] in, This indicates the difference between the publication time of the terms and conditions and the current query time. The attenuation coefficient is... This represents the source authority factor, used to improve the rating of documents from authoritative sources.
[0041] Preferably, step S4 includes the following processing steps:
[0042] S4.1 Extract conclusive assertions from each of the initial candidate answers. From the assertion candidate evidence set Choose evidence c, and calculate the support of the assertion based on the natural language implication score, citation attribution score, and knowledge graph path coverage. Its definition is as follows: (4)
[0043] (4);
[0044] in, , For assertion The set of candidate evidence, For evidence c and assertion The natural language implications between them contain consistency scores, where Attr(c,aᵢ) represents the evidence c against the assertion. Citation attribution score, For assertions The knowledge graph path coverage, k1, k2, k3 are weighting coefficients, and k1+k2+k3=1;
[0045] S4.2, will Compared with the preset support threshold θ, when At that time, assertions are determined through an error-aware mechanism. Insufficient evidence, and based on this assertion Build an enhanced query for the seed to trigger the supplementary verification process;
[0046] S4.3 In enhanced retrieval, only retain items with energy levels not lower than the threshold. The path, the path energy Defined as follows (5):
[0047] (5);
[0048] in Weights for edge types, This is a version validity factor;
[0049] S4.4 Add supplementary evidence that satisfies the energy threshold condition to the assertion. candidate evidence set And re-based on the above The definition of support is calculated until... The support threshold θ is met or the preset iteration limit is reached.
[0050] Preferably, in step S4.2, the error perception mechanism identifies insufficient evidence based on the comparison between the assertion support degree Supp(aᵢ) and a preset threshold θ. When Supp(aᵢ) is lower than the threshold θ, a supplementary evidence process is triggered. The supplementary evidence process selects at least one exemplary path as a reference using path similarity, and introduces negative example paths when necessary to prompt template correction, so as to enhance the trigger sensitivity of error perception and improve the relevance and stability of supplementary evidence.
[0051] Preferably, step S5 includes the following processing steps:
[0052] S5.1. The document fragments retrieved from the text channel in step S3 and verified in step S4 are aligned and combined with the knowledge graph path summaries obtained and organized in steps S3 and S4 to form an evidence package. The evidence package includes at least the clause number, page number or segment number, knowledge graph path summary and source metadata.
[0053] S5.2. Generate candidate answers based on the evidence package, and attach a reference location, confidence information, and a conflict marker when there is a conflict between the evidence in the evidence package to each candidate answer;
[0054] S5.3 The candidate answers shall output at least TOP-k (k≥3) and support the processing system of manual or quality inspection question answering system to select the best answer for subsequent generation.
[0055] Preferably, step S6 includes the following processing steps:
[0056] S6.1 Apply knowledge barriers during the candidate answer generation stage, using the effective path range of the knowledge graph and the validity period of the clauses as hard constraints to restrict the generated content from exceeding the parameter range specified in the clauses and to avoid referencing expired standard clauses.
[0057] S6.2 Perform consistency guardrail checks on the generated candidate answers, including at least: factual consistency checks, used to verify the consistency between the content of the candidate answer and the knowledge graph path summary and document fragments in the evidence package; citation consistency checks, used to verify the matching relationship between the clause numbers, page numbers and evidence anchors cited in the generated candidate answers; and unit and threshold normalization checks, used to ensure that the numerical values and dimensions conform to the range specified in the standard.
[0058] S6.3 When any consistency check fails, a rollback mechanism is triggered; if the consistency condition is still not met after more than a preset number of iterations, a rejection message is output and an evidence gap prompt is returned to indicate the stage where the evidence is insufficient.
[0059] S6.4. Force the embedding of evidentiary anchors such as clause number, page number, and version into the final generated answer to ensure the traceability, auditability, and source transparency of the final answer.
[0060] Preferably, step S7 includes the following processing steps:
[0061] S7.1 Generate the final result and output it in natural language. The final result has been embedded with the clause number, document page number and version information in step S6 to ensure traceability.
[0062] S7.2 Simultaneously display the set of candidate answers and their corresponding evidence packages for users or the quality inspection question and answer system's processing system to select, confirm, or provide feedback on the best result;
[0063] S7.3 When outputting the final result, a complete list of evidence shall be attached. The list of evidence shall include at least the cited clause number, document page number, knowledge graph path summary and source metadata, and support clicking to trace back to the original document;
[0064] S7.4 Record the failure point labels generated during the verification process, including at least missing paths, insufficient references, inconsistent units, version conflicts, and threshold out-of-bounds errors, and use the failure points for subsequent large language model optimization and knowledge graph updates;
[0065] S7.5. Achieve closed-loop optimization through user interaction and feedback mechanisms to improve the accuracy and consistency of subsequent queries. The user interaction and feedback mechanisms include user selection and feedback on candidate answers, as well as adaptive adjustments to the retrieval plan, weight configuration, and prompt templates based on feedback.
[0066] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0067] 1. Significantly improved completeness of clause retrieval: By constructing a lightweight knowledge graph and binding it with document anchors, combined with dual-channel retrieval of text and knowledge graph channels, and integrating document-level and tile-level two-layer rearrangement as well as time decay and source authority grading mechanisms, the problem of fragmented search results and inaccurate clause positioning in the existing search results has been effectively solved, achieving complete coverage and accurate positioning of relevant clauses.
[0068] 2. Enhanced Complex Judgment and Reasoning Ability: After generating the initial candidate answers, this invention introduces an error-aware adaptive supplementary evidence mechanism. For assertions with insufficient support, it triggers a controlled knowledge graph walk and combines the demonstration path and the negative example path to supplement evidence. This provides robust reasoning across clauses and parameters in complex tasks such as sampling judgment and error threshold comparison, overcoming the shortcomings of existing methods in reasoning.
[0069] 3. Result traceability and compliance assurance: Through evidence package construction and consistency guardrail design, all generated answers are forcibly embedded with anchors such as clause number, page number, and version number, and undergo factual consistency, citation consistency, and unit / threshold standardization verification to ensure that the output results are true, reliable, and auditable, avoiding the illusion and erroneous citation problems common in existing RAG technology.
[0070] 4. Significantly reduced hallucination and error rates: By utilizing evidence support calculation, guardrail backoff mechanism, and "refusal to answer" logic, this invention can proactively provide prompts instead of blindly generating them when there is a lack of valid evidence, greatly reducing the risk of hallucination and erroneous conclusions.
[0071] 5. In summary, this invention has achieved significant results in terms of the completeness of clause retrieval, the reasoning ability of complex judgments, the traceability and compliance of results, and the control of illusion rate. It can effectively meet the actual needs of surveying and mapping results quality inspection and acceptance for completeness, accuracy, robust reasoning, and compliance. Attached Figure Description
[0072] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0073] Figure 1 This is a system structure diagram of a system application based on an adaptive retrieval mapping quality inspection method enhanced by knowledge graphs, provided in Embodiment 2 of the present invention.
[0074] Figure 2 This is a system structure block diagram of steps S3-S7 in the processing system of the quality inspection question and answer system provided in Embodiment 2 of the present invention;
[0075] Figure 3 This is a flowchart illustrating the overall algorithm of a system application based on an adaptive retrieval surveying and mapping quality inspection method enhanced by knowledge graphs, provided in Embodiment 2 of the present invention.
[0076] Figure 4 This is a system structure block diagram of the block-level accuracy determination framework provided in Embodiment 2 of the present invention. Detailed Implementation
[0077] The technical solution of this embodiment of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiment is one embodiment of the present invention, and not all embodiments thereof. Based on this embodiment 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.
[0078] Example 1
[0079] Embodiment 1 of the present invention provides an adaptive retrieval mapping quality inspection method based on knowledge graph enhancement, comprising the following steps:
[0080] S1. Construct a lightweight quality inspection knowledge graph, extract clause numbers, inspection elements and thresholds from quality inspection and acceptance standards, map the clauses to preset ontology to generate triples, and bind document identifiers, page numbers or segment number anchors, generate a relationship whitelist and establish a linkage mechanism between the knowledge graph and the document index.
[0081] Step S1 includes the following processing steps:
[0082] S1.1 Extract clause numbers (clause numbers refer to the text numbers), result types, inspection elements, threshold conditions, and process nodes from the texts of standards and procedures related to the quality inspection and acceptance of surveying and mapping results, and use them as clause elements to generate triples.
[0083] S1.2. Generate corresponding triples based on the clause elements extracted in step S1.1, and map the triples to a preset mapping quality inspection ontology (referring to the preset ontology in step S1 and...). Figure 1 The domain ontology generates a relation signature set and a relation whitelist based on label(domain, range). The relation signature set is used to limit the domain and value range of the relation, and the relation whitelist is used to constrain the legal relations allowed in the knowledge graph and solidify the relation signature set. At the same time, version and validity period attributes are added to the clause nodes (referring to the nodes in the knowledge graph, which are structured objects of clause number + attributes).
[0084] In step S1.2, the relationship whitelist is automatically generated based on the relationship signature set. The relationship signature set is formed by combining the relationship labels of the relationships in the preset mapping quality inspection ontology and their corresponding domain and range concept labels to form the label(domain, range) form. During the generation process, space normalization and missing item removal are performed to ensure the consistency of the relationship signatures.
[0085] S1.3. Bind a document anchor point to the triple, wherein the document anchor point includes at least a document identifier, page number or segment number, so as to realize bidirectional traceability between the triple and the standard and procedure documents;
[0086] S1.4 Establish a linkage mechanism between the knowledge graph index and the document index for subsequent knowledge graph retrieval and updating;
[0087] Through the above step S1, the structured and traceable management of standard clauses can be achieved, providing a standardized, unified and reliable data foundation for subsequent retrieval, reasoning and consistency verification.
[0088] S2. Perform entity recognition and terminology and unit standardization on user input, parse the result type, standard version and indicator constraints to generate standardized queries, and use a large language model to identify query intent and generate a retrieval plan that includes text channel and knowledge graph channel accordingly.
[0089] Among them, S2.1 performs entity recognition and terminology and unit standardization on user input, and analyzes elements such as output type, standard version, indicators and units, scope or validity period;
[0090] S2.2. Generate a standardized query based on the elements parsed in step S2.1, and supplement necessary domain constraints, including unit conversion, threshold expression and time validity.
[0091] S2.3 Identify the query intent based on the normalized query and determine whether the query intent is retrieval-type, reasoning-type, or generative-type;
[0092] In step S2.3, intent recognition uses natural language processing technology to perform syntactic and semantic parsing of user input, and automatically identifies question types, core entities and constraints based on a large language model, converting user input into a structured query representation to ensure that the retrieval plan matches user needs.
[0093] Among them, the natural language processing technology is NLP; the large language model is LLM.
[0094] S2.4 Generate a retrieval plan based on the query intent, select text-first, graph-first, or mixed methods, and set the recall cap and reordering weights;
[0095] By using step S2 above, the matching degree between user input and standard terms can be significantly improved, making the query expression more standardized, structured and able to accurately reflect user needs, thereby improving the relevance and effectiveness of subsequent search plans.
[0096] S3. Evidence is retrieved in parallel through the text channel and the knowledge graph channel. The text channel recalls candidate fragments through vector similarity and lexical relevance, while the knowledge graph channel retrieves relevant nodes, relationships and paths. The candidate evidence is then rearranged at the document level and the graph level, and an evidence score is obtained by combining time decay and source authority factors.
[0097] Step S3 includes the following processing steps:
[0098] S3.1. In the text channel, segment the key points of the standard and procedure documents into clauses or tables, and vectorize the resulting segments to obtain candidate segments;
[0099] S3.2. In the knowledge graph channel, retrieve relevant nodes, relationships and paths with the query entity as the seed, and prioritize returning subgraphs containing thresholds or exception conditions to obtain candidate paths;
[0100] S3.3. Perform a two-level reshuffling of candidate evidence at the document and tile levels, and rank the candidate evidence based on the mixed relevance, where mixed relevance... Define the following formula (1):
[0101] (1);
[0102] in To standardize the query, For tiles, The document to which the tile belongs. As weights, each tile is represented by a triple, which facilitates modular management and querying; Document-level relevance; For patch-level correlation, it is defined by the following formula (1):
[0103] (2);
[0104] in Let q and t be the vector representations of the query and the plot, respectively. Lexical relevance is used to measure the relevance of query q and graph tile t at the text matching level. This measure assesses the structural consistency between the query subgraph and the tile-aligned subgraph in terms of entities, relations, and paths. Gq is the structural subgraph corresponding to query q; Gt is the structural subgraph corresponding to tile t, where α, β, and γ are weighting coefficients, satisfying the following condition: ;
[0105] S3.4. Based on the above mixed correlation, a time decay factor and a source authority factor are introduced to fuse and deduplicate candidate evidence, resulting in the final evidence score. Its definition is as follows: (3)
[0106] (3);
[0107] in, This indicates the difference between the publication time of the terms and conditions and the current query time. The attenuation coefficient is... This indicates the source authority factor, used to improve the rating of documents from authoritative sources;
[0108] Step S3 above can improve the completeness and relevance of evidence recall, providing a more accurate basis for subsequent reasoning.
[0109] S4. Based on the preliminary evidence from step S3, generate initial candidate answers and extract assertions. Calculate the support score based on the implied score, attribution score, and path coverage. When the support is insufficient, perform a controlled knowledge graph walk by identifying the error perception. Supplement evidence based on path energy until the support score meets the threshold or reaches the iteration limit.
[0110] Step S4 includes the following processing steps:
[0111] S4.1 Extract conclusive assertions from each of the initial candidate answers. From the assertion candidate evidence set Choose evidence c, and calculate the support of the assertion based on the natural language implication score, citation attribution score, and knowledge graph path coverage. Its definition is as follows: (4)
[0112] (4);
[0113] in, , For assertion The set of candidate evidence, For evidence c and assertion The natural language implications between them contain consistency scores, where Attr(c,aᵢ) represents the evidence c against the assertion. Citation attribution score, For assertions The knowledge graph path coverage, k1, k2, k3 are weighting coefficients, and k1+k2+k3=1;
[0114] S4.2, will Compared with the preset support threshold θ, when At that time, assertions are determined through an error-aware mechanism. Insufficient evidence, and based on this assertion Build an enhanced query for the seed to trigger the supplementary verification process;
[0115] S4.3 In enhanced retrieval, only retain items with energy levels not lower than the threshold. The path, the path energy Defined as follows (5):
[0116] (5);
[0117] in Weights for edge types, This is a version validity factor;
[0118] S4.4 Add supplementary evidence that satisfies the energy threshold condition to the assertion. candidate evidence set And re-based on the above The definition of support is calculated until... The support threshold θ is met or the preset iteration limit is reached;
[0119] Specifically, in step S4.2, the enhanced query operation is: asserting aᵢ as an extended query generated from a seed; in step S4.3, the enhanced retrieval operation is: using the enhanced query to further retrieve evidence from the knowledge graph;
[0120] In step S4.2, the error perception mechanism identifies insufficient evidence based on the comparison between the assertion support degree Supp(aᵢ) and a preset threshold θ. When Supp(aᵢ) is lower than the threshold θ, a supplementary evidence process is triggered. The supplementary evidence process selects at least one exemplary path as a reference using path similarity and introduces negative example paths when necessary to prompt template correction, thereby enhancing the trigger sensitivity of error perception and improving the relevance and stability of supplementary evidence.
[0121] Through the above step S4, key evidence can be automatically supplemented when support is insufficient, thereby enhancing the stability and reliability of the reasoning chain in complex judgment scenarios.
[0122] S5. Aggregate the completed knowledge graph path summary and document fragments according to the clause number to form an evidence package, and generate multiple candidate answers with reference locations and confidence information;
[0123] Step S5 includes the following processing steps:
[0124] S5.1. The document fragments retrieved from the text channel in step S3 and verified in step S4 are aligned and combined with the knowledge graph path summaries obtained and organized in steps S3 and S4 to form an evidence package. The evidence package includes at least the clause number, page number or segment number, knowledge graph path summary and source metadata.
[0125] S5.2. Generate candidate answers based on the evidence package, and attach a reference location, confidence information, and a conflict marker when there is a conflict between the evidence in the evidence package to each candidate answer;
[0126] S5.3, at least TOP-k candidate answers shall be output (k≥3), and the processing system of manual or quality inspection question-and-answer system shall select the best answer for subsequent generation;
[0127] Through step S5 above, a structured and traceable evidence package can be generated, ensuring that the candidate answers have clear evidence and are verifiable.
[0128] S6. Apply evidence barriers during the generation stage, using the valid path and the validity period of the clause as constraints, and perform multiple consistency checks on candidate answers. If the checks fail, trigger a rollback or rejection.
[0129] Step S6 includes the following processing steps:
[0130] S6.1 Apply knowledge barriers during the candidate answer generation stage, using the effective path range of the knowledge graph and the validity period of the clauses as hard constraints to restrict the generated content from exceeding the parameter range specified in the clauses and to avoid referencing expired standard clauses.
[0131] S6.2 Perform consistency guardrail checks on the generated candidate answers, including at least: factual consistency checks, used to verify the consistency between the content of the candidate answer and the knowledge graph path summary and document fragments in the evidence package; citation consistency checks, used to verify the matching relationship between the clause numbers, page numbers and evidence anchors cited in the generated candidate answers; and unit and threshold normalization checks, used to ensure that the numerical values and dimensions conform to the range specified in the standard.
[0132] S6.3 When any consistency check fails, a rollback mechanism is triggered; if the consistency condition is still not met after more than a preset number of iterations, a rejection message is output and an evidence gap prompt is returned to indicate the stage where the evidence is insufficient.
[0133] S6.4. Force the embedding of evidentiary anchors such as clause number, page number, and version into the final generated answer to ensure the traceability, auditability, and source transparency of the final answer;
[0134] Through step S6 above, a strict consistency check can be performed on the generated content, effectively avoiding illusions and misquotes, and ensuring that the final answer is legal, accurate and credible.
[0135] S7. Output the traceable results of the embedded clause number and page number, and record the evidence list and verification failure points for subsequent large language model optimization and knowledge graph update.
[0136] Step S7 includes the following processing steps:
[0137] S7.1 Generate the final result and output it in natural language. The final result has been embedded with the clause number, document page number and version information in step S6 to ensure traceability.
[0138] S7.2 Simultaneously display the set of candidate answers and their corresponding evidence packages for users or the quality inspection question and answer system's processing system to select, confirm, or provide feedback on the best result;
[0139] S7.3 When outputting the final result, a complete list of evidence shall be attached. The list of evidence shall include at least the cited clause number, document page number, knowledge graph path summary and source metadata, and support clicking to trace back to the original document;
[0140] S7.4, Record Verification
[0141] The failure point labels generated during the process include at least path missing, insufficient reference, inconsistent units, version conflict and threshold out of bounds, and the failure points are used for subsequent large language model optimization and knowledge graph update.
[0142] The optimization and update steps are as follows: Based on the failure point information recorded in step S7.4 and the user feedback in step S7.5, the quality inspection question-and-answer system's processing system can perform attribution analysis on the problems that have occurred during the retrieval and generation process, and update the relevant parameters and knowledge structure accordingly. The updates include: adjusting the prompt templates and weight configurations on the large language model side to reduce ambiguity and incorrect citations in future queries; revising the recall cap, reordering strategy, and weight factors in the retrieval plan to improve the coverage and relevance of evidence retrieval; and maintaining the clause versions, relationship whitelists, and document anchors in the knowledge graph to ensure that the graph content is consistent with the latest standards.
[0143] S7.5. Achieve closed-loop optimization through user interaction and feedback mechanisms to improve the accuracy and consistency of subsequent queries. The user interaction and feedback mechanisms include user selection and feedback on candidate answers, as well as adaptive adjustments to the retrieval plan, weight configuration, and prompt templates based on feedback.
[0144] Through the above step S7, a final result with clause-level traceability can be output, forming a feedback loop to continuously improve the processing system performance of the quality inspection question and answer system.
[0145] Steps S1-S7 above are considered as the processing system of a quality inspection question-and-answer system based on a knowledge graph-enhanced adaptive retrieval mapping quality inspection method. (This paragraph refers to the core processing system of the knowledge graph-enhanced adaptive retrieval mapping quality inspection method in this embodiment, which is essentially equivalent to a quality inspection question-and-answer system. This core processing system has been fully and clearly described in the above embodiment. This paragraph introduces the concept of the processing system of the quality inspection question-and-answer system to facilitate the description of how the processing system handles the results in certain steps.)
[0146] The adaptive retrieval mapping quality inspection method based on knowledge graph enhancement, according to Embodiment 1 of the present invention, has the following advantages:
[0147] 1. Significantly improved completeness of clause retrieval: By constructing a lightweight knowledge graph and binding it with document anchors, combined with dual-channel retrieval of text and knowledge graph channels, and integrating document-level and tile-level two-layer rearrangement as well as time decay and source authority grading mechanisms, the problem of fragmented search results and inaccurate clause positioning in the existing search results has been effectively solved, achieving complete coverage and accurate positioning of relevant clauses.
[0148] 2. Enhanced Complex Judgment and Reasoning Ability: This embodiment introduces an error-aware adaptive re-retrieval mechanism after generating the initial candidate answers. It automatically triggers controlled knowledge graph walks and enhanced queries for assertions with insufficient support, enabling robust reasoning across clauses and parameters in complex tasks such as sampling judgment and error threshold comparison, thus overcoming the shortcomings of existing methods in reasoning.
[0149] 3. Result traceability and compliance assurance: Through evidence package construction and consistency guardrail design, all generated answers are forcibly embedded with anchors such as clause number, page number, and version number, and undergo factual consistency, citation consistency, and unit / threshold standardization verification to ensure that the output results are true, reliable, and auditable, avoiding the illusion and erroneous citation problems common in existing RAG technology.
[0150] 4. Significantly reduced hallucination and error rates: By utilizing evidence support calculation, guardrail rollback mechanism, and "refusal to answer" logic, this Implementation Example 1 can proactively provide prompts instead of blindly generating them when there is a lack of valid evidence, greatly reducing the risk of hallucination and erroneous conclusions.
[0151] 5. Improved quality inspection efficiency and consistency: This first embodiment realizes an integrated process from clause location, evidence aggregation, reasoning verification to answer output, which can significantly reduce the workload of manual review and comparison, reduce inconsistencies caused by human differences, and improve the efficiency and consistency of the quality inspection and acceptance process.
[0152] 6. Continuous optimization and adaptive capability: Through the recording and feedback of failure point tags, the quality inspection question and answer system can perform closed-loop optimization of retrieval strategies, prompt templates and parameter configurations, and has self-learning and adaptive capabilities. As the number of uses increases, the performance gradually improves.
[0153] 7. In summary, this first embodiment aims to address the problems of fragmented retrieval, insufficient cross-clause reasoning, and untraceable generation in existing knowledge graph (KG) + retrieval-enhanced generation (RAG) methods for surveying and mapping results quality inspection and acceptance scenarios. It proposes an adaptive retrieval surveying and mapping quality inspection method based on knowledge graph enhancement. This first embodiment is applicable to various surveying and mapping engineering results quality inspection and acceptance scenarios, such as cadastral surveying, engineering control surveying, and large-scale topographic surveying. This first embodiment has achieved significant results in terms of the completeness of clause retrieval, the reasoning ability for complex judgments, the traceability and compliance of results, and the control of illusion rate, effectively meeting the practical needs of surveying and mapping results quality inspection and acceptance for completeness, accuracy, robust reasoning, and compliance.
[0154] Example 2:
[0155] Please see the appendix Figure 1 To be continued Figure 4 This second embodiment illustrates the application structure and processing flow of the method of the present invention in the system. Based on a lightweight knowledge graph, text retrieval channel, graph retrieval channel, error-aware supplementary verification mechanism, and consistency guardrail module, the system achieves structured understanding, cross-clause reasoning, and traceable generation of surveying and mapping quality inspection clauses. The overall system architecture is attached. Figure 1 The processing flow is shown in the attached diagram. Figure 2 With appendix Figure 3 As shown in the attached diagram, the structure of the tile-level accuracy verification chain is as follows. Figure 4 As shown. The entire system corresponds to method steps S1 to S7 of claim 1, as follows:
[0156] S1 Lightweight Quality Inspection Knowledge Graph Construction
[0157] This step extracts clause information from national and industry quality inspection and acceptance standards documents and constructs a rule-based knowledge graph, specifically including:
[0158] (1) Extract relevant elements from the text of national and industry quality inspection and acceptance standards, including clause number, deliverable type, inspection elements, threshold conditions, and process nodes (corresponding to...). Figure 1 (metadata module);
[0159] (2) Map the clause elements to the preset surveying and mapping quality inspection ontology to generate triples (corresponding to Figure 1The domain ontology and knowledge graph modules generate a set of relation signatures based on the domain and range tags in the ontology, and automatically generate a relation whitelist to constrain legal relations in the knowledge graph (corresponding to...). Figure 4 Relationship whitelist module);
[0160] (3) Bind document anchors to the triples, including document number, page number, or section number, so that knowledge graph entities can achieve bidirectional tracing with the original document terms (corresponding to...). Figure 1 (anchor point mapping module);
[0161] (4) Establish a linkage mechanism between the knowledge graph index and the document index to achieve joint retrieval between graph nodes, document locations, and clause numbers (corresponding to...). Figure 1 (The knowledge index and text index link).
[0162] S2 Input Parsing and Intent Recognition
[0163] like Figure 1 As shown, this method receives natural language queries input by the user; combined with Figure 2 The processing system structure of the quality inspection question-and-answer system shown is as follows: Step S2 parses the input and generates an executable retrieval plan, specifically including:
[0164] (1) When a user submits a natural language query ( Figure 1 (Top example) The quality inspection question-and-answer system uses the NLP module to perform entity recognition, terminology standardization, and unit standardization, and parses elements such as result type, standard version, indicator range, and validity period in the input content;
[0165] (2) Generate standardized queries and supplement constraints in areas such as unit conversion, threshold expression, and time validity;
[0166] (3) Based on the QA module (used for performing semantic parsing and structured representation of questions) and the deep semantic understanding capabilities of LLM, the query execution intent is classified and identified as retrieval-type, reasoning-type, or generative-type (corresponding to...). Figure 1 (intent type module);
[0167] (4) Generate a retrieval plan based on the intent category, select text-first, graph-first, or hybrid strategies, and configure the recall cap and reordering weights (corresponding to...). Figure 1 (Setting of text retrieval and graph retrieval strategies).
[0168] S3 Dual-Channel Evidence Retrieval and Two-Level Rearrangement
[0169] like Figure 1 and Figure 3 As shown, step S3 involves parallel evidence retrieval in both the text channel and the knowledge graph channel:
[0170] (1) The text channel performs clause segmentation and vectorization on the standard document, and recalls candidate text fragments (corresponding to) based on vector similarity and lexical relevance. Figure 1 (text retrieval module);
[0171] (2) The graph channel uses entities in the normalized query as seed nodes to retrieve relevant nodes, relationships, and paths, and prioritizes returning subgraphs containing thresholds and exception conditions (corresponding to...). Figure 1 (Graph retrieval and knowledge reasoning link module).
[0172] (3) Based on document-level relevance and tile-level relevance (Formulas (1)-(2) in Example 1), the evidence is rearranged in two levels. Figure 3 The corresponding processing steps for Rel, TileRel, and Score;
[0173] (4) Introducing the time decay factor and the source authority factor, a comprehensive evidence score (corresponding to) is obtained. Figure 3 (Rating module).
[0174] S4 Error Perception and Adaptive Compensation Circuit
[0175] like Figure 3 As shown, step S4 verifies the initial answer and automatically supplements it if necessary:
[0176] (1) The quality control question-answering system extracts key assertions from the initial candidate answers and calculates the support score Supp (corresponding to) based on natural language implication score, citation attribution score, and path coverage. Figure 2 (Support calculation module);
[0177] (2) If Supp is below the threshold θ, the quality inspection question-and-answer system determines that the evidence is insufficient and triggers the error perception mechanism. Figure 2 (Supp < θ determination steps)
[0178] (3) The quality inspection question-answering system performs controlled path walking in the knowledge graph and calculates the path energy E(p) according to formula (5), and selects the effective path whose energy exceeds the threshold τ. Figure 2 Path supplementary proof and Figure 3 Path energy calculation module);
[0179] (4) Supplement the evidence and write it back into the evidence set, then return it to the support calculation module for reassessment (corresponding to...). Figure 2 Evidence repatriation steps and Figure 1 (The reasoning chain completion process).
[0180] S5 Evidence Package Construction and Candidate Answer Generation
[0181] like Figure 2As shown, step S5 involves structurally combining the knowledge graph path summary with document fragments:
[0182] (1) Align the supplemented map path summary with the document fragments and aggregate them according to the clause number to form a structured evidence package (corresponding to Figure 1 (Evidence fusion module)
[0183] (2) Generate candidate answers based on the evidence package, and attach the citation location, conflict marker and confidence level Conf (corresponding to) Figure 1 (Confidence assessment module);
[0184] (3) Output at least TOP-k candidate answers for the system or manual selection (corresponding to Figure 1 (The candidate answer list module).
[0185] S6 Evidence Barrier and Consistency Verification
[0186] like Figure 2 As shown, the compliance of the answer is ensured through the evidence guardrail:
[0187] (1) Apply knowledge barriers based on the effective path range of the map and the validity period of the clauses to avoid referencing expired or out-of-bounds clauses;
[0188] (2) Perform multiple consistency checks, including consistency of facts, consistency of citations, and standardization of units and thresholds;
[0189] (3) If all checks pass, the consistency judgment result Consist=1; if any check fails, Consist=0, where Consist represents the final judgment result of the consistency guardrail module on the candidate answer (corresponding to Figure 2 (Consist determination process at the bottom); when Consist=0, the quality inspection question and answer system enters the rollback and regeneration logic, and outputs a rejection when consecutive failures exceed the threshold;
[0190] (4) Force the embedding of evidence anchors such as clause number, page number and version into the final answer.
[0191] S7 Traceable Output and Feedback Closed Loop
[0192] The above steps S1-S7 are considered as a processing system for a quality inspection question-answering system based on an adaptive retrieval surveying and mapping quality inspection method enhanced by knowledge graphs.
[0193] like Figure 1 and Figure 2 As shown, this step is used to output the final traceable conclusion and achieve closed-loop optimization of the large language model:
[0194] (1) The quality inspection question-and-answer system outputs the final conclusion in natural language form and embeds evidence anchors such as clause number, page number, and version information (corresponding to Figure 1 (Natural language output module);
[0195] (2) Display candidate answers and their evidence packages to support user or system selection and feedback;
[0196] (3) Output a complete list of evidence for tracing back to the original document (corresponding to) Figure 3 (Final Answer and Evidence List Module).
[0197] (4) Record the verification failure points, including missing paths, insufficient references, inconsistent units, version conflicts, and threshold exceeding limits;
[0198] (5) Use failure points and user feedback to adjust the search plan, weight configuration, and prompt templates. Figure 1 The system configuration parameter feedback loop shown achieves closed-loop optimization.
[0199] This second embodiment presents a system application of an adaptive retrieval surveying and mapping quality inspection method based on knowledge graph enhancement. Its technical principle can be summarized as follows: Using a pre-defined ontology of the surveying and mapping quality inspection domain as the structural foundation, a lightweight knowledge graph is constructed through clause element extraction and ontology mapping to achieve structured semantic expression of standard clauses. During the user query phase, natural language questions are transformed into executable, standardized queries through entity recognition, terminology and unit standardization, and intent recognition. In the retrieval phase, a dual-channel parallel retrieval mechanism combining text and knowledge graph channels is employed. A method combining clause vectorization recall and graph relation path retrieval is used to perform evidence matching at both the document and tile levels, and time decay factors and source authority factors are introduced to fuse and score candidate evidence. In the reasoning phase, support calculation and error perception verification are performed on the initially generated answer, and adaptive graph walkthroughs are used to supplement divergent paths and missing evidence, improving the completeness of cross-clause reasoning. In the generation phase, evidence package construction and evidence guardrail constraints are used to achieve factual consistency, citation consistency, and numerical standardization consistency in the generated results, and a traceable conclusion with embedded clause number, page number, and version information is output.
[0200] The system application in this second embodiment achieves the following technical effects through the synergistic effect of lightweight knowledge graph and retrieval enhancement generation process: First, it significantly improves the completeness of clause retrieval by effectively restoring the correlation between clauses through ontology constraints and knowledge graph path expansion, solving the problem of fragmented evidence in traditional keyword retrieval. Second, it enhances the stability of reasoning under cross-clause and multi-parameter conditions by automatically supplementing missing evidence when the initial answer is insufficient through an adaptive supplementary evidence mechanism based on support assessment and error awareness, improving the reliability of complex judgment tasks. Third, it effectively reduces the risk of generation illusions and inaccurate citations by ensuring that the generated conclusions strictly comply with the constraints of standard clauses through factual consistency, citation consistency, and numerical normalization verification of evidence guardrails. Fourth, it achieves clause-level traceability of results by providing the final conclusion with source information such as clause number, page number, and version through evidence packages and evidence anchoring mechanisms, meeting the requirements of auditability and credibility for engineering acceptance. Fifth, it achieves closed-loop optimization of the method through user feedback and failure point recording, enabling adaptive adjustment of retrieval strategies and prompt templates in subsequent tasks, continuously improving the accuracy, consistency, and stability of quality checks.
[0201] Example 3
[0202] Embodiment 3 of the present invention is a specific application of the method in Embodiment 1. Embodiment 3 provides a specific application of an adaptive retrieval surveying and mapping quality inspection method based on knowledge graph enhancement. This embodiment 3 uses the quality inspection and acceptance process of a 1:1000 topographic map of a vocational college park as an example to illustrate the workflow and effects of Embodiment 3 in practical application.
[0203] Case Background
[0204] A 1:1000 large-scale topographic map was completed over an area of approximately 22 km² in a vocational college park. The inspection team checked the horizontal and vertical accuracy of the maps according to current standards such as the *Urban Surveying Code* (CJJT8-2011), the *Engineering Surveying Code* (GB50026-2007), and the latest *Quality Inspection and Acceptance of Surveying and Mapping Results* (GB / T24356-2023). The quality inspection report showed that the horizontal position error ranged from 6.2 to 9.5 cm, and the vertical error was 5.3 cm.
[0205] This third embodiment illustrates how the present invention applies steps S1–S7 in this case to output a compliance conclusion.
[0206] S1 Knowledge Graph Construction and Initialization
[0207] In step S1, relevant clauses for this case are extracted from standards and regulations, and the clause information is structured into triples:
[0208]
[0209] Each triple is bound to the clause number, page number, and paragraph number of the original document to form a traceable anchor. This step also generates a relationship whitelist to limit the allowed relationship types between clauses, ensuring that subsequent retrieval and reasoning processes follow standard definitions. The resulting lightweight knowledge subgraph provides a structured knowledge foundation for accuracy determination in this embodiment, such as... Figure 4 As shown. This step ensures the structured and traceable nature of the clause knowledge, laying the foundation for subsequent retrieval and reasoning.
[0210] S2 Input Parsing and Intent Recognition
[0211] When the inspectors input a natural language query, "Is the 1:1000 topographic map of this park qualified?", the quality inspection question and answer system needs to convert the vague expression into an executable structured query.
[0212] The analysis result is:
[0213]
[0214] The quality inspection question-and-answer system further determined that the query was "inference-based," requiring a comprehensive assessment of multiple elements, rather than a simple clause retrieval. Based on this, a retrieval plan incorporating both text and graph channels was generated, with a recall limit and reordering weights set. The user's fuzzy natural language question was successfully parsed into a structured query conforming to domain specifications, ensuring an accurate correspondence with the clauses.
[0215] S3 Multichannel Retrieval and Hierarchical Matching
[0216] The quality inspection question-and-answer system simultaneously calls both text and knowledge graph channels for retrieval. To ensure the scientific nature of the result ranking, a two-level rearrangement formula is introduced, incorporating time decay and source authority factors.
[0217] Formula 1: Document / Tile Reflow
[0218] (1);
[0219] Formula 2: Patch-level correlation
[0220] (2);
[0221] Formula 3: Final Evidence Score
[0222] (3);
[0223] in: Indicates semantic similarity. Indicates keyword matching. Indicates structural consistency; This indicates the difference between the publication time of the terms and conditions and the current query time. The attenuation coefficient is... Indicates the authoritative source.
[0224] Substitute parameters: .
[0225] Calculation results:
[0226] t1 (National Standard, General Provisions, GB / T24356-2023) → Score=0.538;
[0227] t2 (National Standard, Plane Clause Only, GB / T24356-2023) → Score=0.501;
[0228] t3 (Industry standard, interpretive clause) → Score=0.416.
[0229] The results show that clause t1 scored the highest and simultaneously covered both "planar position accuracy ≤ error 10cm" and "elevation accuracy ≤ error 5cm", therefore it was given priority in the evidence set to ensure the completeness of the clause coverage.
[0230] S4 Error-Aware Adaptive Retrieval
[0231] After obtaining the preliminary search results, this third embodiment does not output them directly, but instead evaluates the support level of each generated assertion. This determines whether the evidence in the clauses sufficiently supports the conclusion, thereby avoiding omissions and errors.
[0232] Formula 4: Support Calculation
[0233] (4);
[0234] in:
[0235] Natural Language Reasoning Score: Judging Evidence Fragments Does it semantically imply an assertion? ;
[0236] Citation attribution score measures whether an assertion is properly cited.
[0237] Assert whether it is covered by a knowledge graph path;
[0238] Weighting coefficient.
[0239] like If the result is not found, an adaptive retrieval mechanism is triggered to continue supplementing the evidence. During the supplementary evidence process, path energy is used to determine whether the retrieval path is valid.
[0240] Formula 5: Path Energy
[0241] (5);
[0242] in, Indicates edge type weight, As a version validity factor, only if path energy Only then will the path be accepted as valid evidence;
[0243] Substitute parameters: .
[0244] Calculation results:
[0245] assertions regarding planar position accuracy Supp=0.915≥0.8→Sufficient support;
[0246] Assumptions regarding elevation accuracy Supp=0.665<0.8→Insufficient support;
[0247] The quality inspection question-and-answer system's processing system triggers enhanced retrieval, path energy. The "Comprehensive Evaluation / Sampling Judgment" clause in GB / T24356-2023 has been supplemented.
[0248] After the update, the elevation assertion Supp=0.835≥0.8→support closure.
[0249] Results Explanation: Step S4 enables the quality inspection question and answer system to detect the problem of "elevation accuracy exceeding the ±5cm limit by 5.3cm", and automatically supplements the evaluation clauses to arrive at a compliant explanation of "still qualified", which is consistent with the actual acceptance conclusion.
[0250] S5 Evidence Package and Candidate Generation
[0251] After the evidence is supplemented, the quality inspection question and answer system's processing system organizes the clauses, original text fragments, and metadata into an evidence package, and generates candidate answers based on the evidence package.
[0252] The evidence package includes:
[0253] Clause number and excerpt from the original text (e.g., Chapter ×, Clause × of GB / T24356-2023: "1:1000 topographic map horizontal accuracy ≤ ±10cm; vertical accuracy ≤ ±5cm").
[0254] Anchor information from the original text (document ID, page number, paragraph number);
[0255] Version information and publishing organization.
[0256] Formula for confidence level of candidate answer:
[0257]
[0258] Substitute the values: .
[0259]
[0260] The results show that the confidence level of the candidate answers reached 0.873, indicating that the results are reliable in terms of evidence support and consistency, and can proceed to the final guardrail inspection stage.
[0261] S6 Answer Enhancement and Consistency Guardrail
[0262] To ensure that the output does not produce illusions or citation errors, this invention designs a consistency guardrail, requiring strict consistency between the generated answer and the evidence package.
[0263] Formula 6: Consistency Determination
[0264] (6)
[0265] in:
[0266] Factual consistency: Check the alignment between the answer and the evidence package;
[0267] : Citation consistency, check whether the clause number and page number are completely matched;
[0268] UnitOK: Unit and threshold check.
[0269] Substituting the results: Faith=0.93, CitePrec=1.00, UnitOK=1→Consist=1.
[0270] Results show that, in this case, the present invention ensures that the output content strictly complies with the requirements of GB / T24356-2023, and there are no fabrications or errors in citation.
[0271] S7 Output and Feedback Closed Loop
[0272] After passing through the consistency barrier, the quality inspection Q&A system's processing system outputs the final conclusion and records the feedback information.
[0273] Final output example:
[0274] According to the relevant clauses of GB / T24356-2023 "Quality Inspection and Acceptance of Surveying and Mapping Results", the mean square error of the horizontal position of the 1:1000 topographic map in this project is 6.2–9.5 cm, which meets the limit of error ≤ 10 cm; the mean square error of elevation is 5.3 cm. Based on the evaluation / sampling judgment clauses, it is judged to be qualified. Acceptance conclusion: Qualified.
[0275] Results show that the present invention achieved automatic clause location, evidence completion, logical judgment and traceable output in this case, and the conclusion is consistent with the actual acceptance results.
[0276] In this embodiment 3, the pseudocode for an adaptive retrieval and question-answering process enhanced with a knowledge graph is shown in Table 1 below:
[0277] Table 1. Pseudocode for an adaptive retrieval and question-answering process enhanced by knowledge graph.
[0278]
[0279]
[0280] In this embodiment 3, the parameters used in the above retrieval and reasoning process can be selected and configured according to Table 2. It should be understood that these values are only examples, and the actual system can be flexibly adjusted according to the scenario without affecting the overall process of the method of the present invention.
[0281] Table 2 Parameter Configuration Table
[0282]
[0283] In this embodiment 3, the relationship whitelist is shown in Table 3 below.
[0284] Table 3 Relationship Whitelist
[0285]
[0286] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. 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. An adaptive retrieval and mapping quality inspection method based on knowledge graph enhancement, characterized in that, Includes the following steps: S1. Construct a lightweight quality inspection knowledge graph, extract clause numbers, inspection elements and thresholds from quality inspection and acceptance standards, map the clauses to preset ontology to generate triples, and bind document identifiers, page numbers or segment number anchors, generate a relationship whitelist and establish a linkage mechanism between the knowledge graph and the document index. S2. Perform entity recognition and terminology and unit standardization on user input, parse the result type, standard version and indicator constraints to generate standardized queries, and use a large language model to identify query intent and generate a retrieval plan that includes text channel and knowledge graph channel accordingly. S3. Evidence is retrieved in parallel through the text channel and the knowledge graph channel. The text channel recalls candidate fragments through vector similarity and lexical relevance, while the knowledge graph channel retrieves relevant nodes, relationships and paths. The candidate evidence is then rearranged at the document level and the graph level, and an evidence score is obtained by combining time decay and source authority factors. S4. Based on the preliminary evidence from step S3, generate initial candidate answers and extract assertions. Calculate the support score based on the implied score, attribution score, and path coverage. When the support is insufficient, perform a controlled knowledge graph walk by identifying the error perception. Supplement evidence based on path energy until the support score meets the threshold or reaches the iteration limit. S5. Aggregate the completed knowledge graph path summary and document fragments according to the clause number to form an evidence package, and generate multiple candidate answers with reference locations and confidence information; S6. Apply evidence barriers during the generation stage, using the valid path and the validity period of the clause as constraints, and perform multiple consistency checks on candidate answers. If the checks fail, trigger a rollback or rejection. S7. Output the traceable results of the embedded clause number and page number, and record the evidence list and verification failure points for subsequent large language model optimization and knowledge graph update. The above steps S1-S7 are considered as a processing system for a quality inspection question-answering system based on an adaptive retrieval surveying and mapping quality inspection method enhanced by knowledge graphs.
2. The adaptive retrieval and mapping quality inspection method based on knowledge graph enhancement according to claim 1, characterized in that, Step S1 includes the following processing steps: S1.1 Extract clause numbers, result types, inspection elements, threshold conditions, and process nodes from the text of standards and procedures related to the quality inspection and acceptance of surveying and mapping results, and use them as clause elements to generate triples. S1.
2. Generate corresponding triples based on the clause elements extracted in step S1.1, and map the triples to a preset surveying and mapping quality inspection ontology. Generate a relation signature set and a relation whitelist according to label(domain,range). The relation signature set is used to limit the domain and value range of the relation, and the relation whitelist is used to constrain the legal relations allowed in the knowledge graph. The relation signature set is also solidified, and version and validity period attributes are added to the clause nodes. S1.
3. Bind a document anchor point to the triple, wherein the document anchor point includes at least a document identifier, page number or segment number, so as to realize bidirectional traceability between the triple and the standard and procedure documents; S1.4 Establish a linkage mechanism between the knowledge graph index and the document index for subsequent knowledge graph retrieval and updates.
3. The adaptive retrieval and mapping quality inspection method based on knowledge graph enhancement according to claim 1, characterized in that, Step S2 includes the following processing steps: S2.1 Perform entity recognition and terminology and unit standardization on user input, and parse the output type, standard version, indicators and units, scope or validity period elements; S2.
2. Generate a standardized query based on the elements parsed in step S2.1, and supplement necessary domain constraints, including unit conversion, threshold expression and time validity. S2.3 Identify the query intent based on the normalized query and determine whether the query intent is retrieval-type, reasoning-type, or generative-type; S2.4 Generate a retrieval plan based on the query intent, select text-first, graph-first, or mixed methods, and set the recall cap and reordering weights.
4. The adaptive retrieval and mapping quality inspection method based on knowledge graph enhancement according to claim 1, characterized in that, In step S2.3, intent recognition uses natural language processing technology to perform syntactic and semantic parsing of user input, and automatically identifies question type, core entities and constraints based on a large language model, converting user input into a structured query representation to ensure that the retrieval plan matches user needs.
5. The adaptive retrieval mapping quality inspection method based on knowledge graph enhancement according to claim 1, characterized in that, Step S3 includes the following processing steps: S3.
1. In the text channel, segment the key points of the standard and procedure documents into clauses or tables, and vectorize the resulting segments to obtain candidate segments; S3.
2. In the knowledge graph channel, retrieve relevant nodes, relationships and paths with the query entity as the seed, and prioritize returning subgraphs containing thresholds or exception conditions to obtain candidate paths; S3.
3. Perform a two-level reshuffling of candidate evidence at the document and tile levels, and rank the candidate evidence based on the mixed relevance, where mixed relevance... Define the following formula (1): (1); in To standardize the query, For tiles, The document to which the tile belongs. As weights, each tile is represented by a triple, which facilitates modular management and querying; Document-level relevance; For patch-level correlation, it is defined by the following formula (1): (2); in Let q and t be the vector representations of the query and the plot, respectively. Lexical relevance is used to measure the relevance of query q and graph tile t at the text matching level. This measure assesses the structural consistency between the query subgraph and the tile-aligned subgraph in terms of entities, relations, and paths. Gq is the structural subgraph corresponding to query q; Gt is the structural subgraph corresponding to tile t, where α, β, and γ are weighting coefficients, satisfying the following condition: ; S3.
4. Based on the above mixed correlation, a time decay factor and a source authority factor are introduced to fuse and deduplicate candidate evidence, resulting in the final evidence score. Its definition is as follows: (3) (3); in, This indicates the difference between the publication time of the terms and conditions and the current query time. The attenuation coefficient is... This represents the source authority factor, used to improve the rating of documents from authoritative sources.
6. The adaptive retrieval and mapping quality inspection method based on knowledge graph enhancement according to claim 1, characterized in that, Step S4 includes the following processing steps: S4.1 Extract conclusive assertions from each of the initial candidate answers. From the assertion candidate evidence set Choose evidence c, and calculate the support of the assertion based on the natural language implication score, citation attribution score, and knowledge graph path coverage. Its definition is as follows: (4) (4); in, , For assertion The set of candidate evidence, For evidence c and assertion The natural language implications between them contain consistency scores, where Attr(c,aᵢ) represents the evidence c against the assertion. Citation attribution score, For assertions The knowledge graph path coverage, k1, k2, k3 are weighting coefficients, and k1+k2+k3=1; S4.2, will Compared with the preset support threshold θ, when At that time, assertions are determined through an error-aware mechanism. Insufficient evidence, and based on this assertion Build an enhanced query for the seed to trigger the supplementary verification process; S4.3 In enhanced retrieval, only retain items with energy levels not lower than the threshold. The path, the path energy Defined as follows (5): (5); in Weights for edge types, This is a version validity factor; S4.4 Add supplementary evidence that satisfies the energy threshold condition to the assertion. candidate evidence set And re-based on the above The definition of support is calculated until... The support threshold θ is met or the preset iteration limit is reached.
7. The adaptive retrieval and mapping quality inspection method based on knowledge graph enhancement according to claim 6, characterized in that, In step S4.2, the error perception mechanism identifies insufficient evidence based on the comparison between assertion support Supp(aᵢ) and a preset threshold θ. When Supp(aᵢ) is lower than the threshold θ, a supplementary evidence process is triggered. The supplementary evidence process selects at least one exemplary path as a reference using path similarity and introduces negative example paths when necessary to prompt template correction, thereby enhancing the trigger sensitivity of error perception and improving the relevance and stability of supplementary evidence.
8. The adaptive retrieval and mapping quality inspection method based on knowledge graph enhancement according to claim 1, characterized in that, Step S5 includes the following processing steps: S5.
1. The document fragments retrieved from the text channel in step S3 and verified in step S4 are aligned and combined with the knowledge graph path summaries obtained and organized in steps S3 and S4 to form an evidence package. The evidence package includes at least the clause number, page number or segment number, knowledge graph path summary and source metadata. S5.
2. Generate candidate answers based on the evidence package, and attach a reference location, confidence information, and a conflict marker when there is a conflict between the evidence in the evidence package to each candidate answer; S5.3 The candidate answers shall output at least TOP-k (k≥3) and support the processing system of manual or quality inspection question answering system to select the best answer for subsequent generation.
9. The adaptive retrieval and mapping quality inspection method based on knowledge graph enhancement according to claim 1, characterized in that, Step S6 includes the following processing steps: S6.1 Apply knowledge barriers during the candidate answer generation stage, using the effective path range of the knowledge graph and the validity period of the clauses as hard constraints to restrict the generated content from exceeding the parameter range specified in the clauses and to avoid referencing expired standard clauses. S6.2 Perform consistency guardrail checks on the generated candidate answers, including at least: factual consistency checks, used to verify the consistency between the content of the candidate answer and the knowledge graph path summary and document fragments in the evidence package; citation consistency checks, used to verify the matching relationship between the clause numbers, page numbers and evidence anchors cited in the generated candidate answers; and unit and threshold normalization checks, used to ensure that the numerical values and dimensions conform to the range specified in the standard. S6.3 When any consistency check fails, a rollback mechanism is triggered; if the consistency condition is still not met after more than a preset number of iterations, a rejection message is output and an evidence gap prompt is returned to indicate the stage where the evidence is insufficient. S6.
4. Force the embedding of evidentiary anchors such as clause number, page number, and version into the final generated answer to ensure the traceability, auditability, and source transparency of the final answer.
10. The adaptive retrieval and mapping quality inspection method based on knowledge graph enhancement according to claim 1, characterized in that, Step S7 includes the following processing steps: S7.1 Generate the final result and output it in natural language. The final result has been embedded with the clause number, document page number and version information in step S6 to ensure traceability. S7.2 Simultaneously display the set of candidate answers and their corresponding evidence packages for users or the quality inspection question and answer system's processing system to select, confirm, or provide feedback on the best result; S7.3 When outputting the final result, a complete list of evidence shall be attached. The list of evidence shall include at least the cited clause number, document page number, knowledge graph path summary and source metadata, and support clicking to trace back to the original document; S7.4 Record the failure point labels generated during the verification process, including at least missing paths, insufficient references, inconsistent units, version conflicts, and threshold out-of-bounds errors, and use the failure points for subsequent large language model optimization and knowledge graph updates; S7.
5. Achieve closed-loop optimization through user interaction and feedback mechanisms to improve the accuracy and consistency of subsequent queries. The user interaction and feedback mechanisms include user selection and feedback on candidate answers, as well as adaptive adjustments to the retrieval plan, weight configuration, and prompt templates based on feedback.