A semantic feature self-adaptive matching and error correction method and system for building project cost declaration
By constructing a parameterized and temporal material knowledge graph and a multi-level cost ID tree, combined with confidence decomposition and a human-machine closed-loop mechanism, the problems of non-standard material names and insufficient information structure in construction project cost accounting are solved, achieving high-precision matching and parameter-level error correction, and improving automation and management efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING TECH UNIV
- Filing Date
- 2025-10-28
- Publication Date
- 2026-06-02
AI Technical Summary
The construction project cost accounting suffers from problems such as non-standard material names, insufficient information structuring, low matching accuracy, and low review efficiency, leading to inconvenience in project management.
We construct a parameterized and temporally-based enterprise-specific material knowledge graph, combined with a multi-level cost ID tree, and achieve semantic feature adaptive matching and error correction through confidence decomposition and human-machine closed-loop mechanism. This includes knowledge graph pattern design, material knowledge extraction, cost ID tree construction, consumption relationship establishment, and multi-dimensional confidence assessment.
It achieves high-precision automatic material matching and parameter-level error correction, improving the accuracy of automatic matching, and realizes continuous optimization of the knowledge system through a human-machine closed-loop mechanism.
Smart Images

Figure CN121009903B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of construction engineering management and artificial intelligence technology, and in particular relates to a semantic feature adaptive matching and error correction method and system for construction project cost declaration. Background Technology
[0002] With the rapid development of the global construction industry, the management and cost accounting of construction projects face increasingly complex challenges. Especially in the cost accounting stage, engineers typically fill out reports based on the characteristics of the project content. However, due to the numerous and highly detailed cost items, the quality of the work item names and content reporting directly affects the efficiency of cost accounting and management for the project. Specifically, the current cost accounting problems in the construction industry present the following prominent difficulties:
[0003] 1. Inconsistent names and information: During the reporting process, personnel from different projects often use different material names, abbreviations, or aliases, which often cannot be matched with the standard numbers in the enterprise's material cost management system, causing great inconvenience to project management.
[0004] 2. Insufficient structure and dynamism in information representation: Existing knowledge graphs are mostly ordinary static triples, with parameters such as material diameter, strength grade, and unit of measurement often mixed in with the text, making them difficult to use as hard constraints during matching. Furthermore, relationships such as procurement, substitution, and production stoppage lack a time dimension, failing to adapt to differences in different project stages (such as the main structure phase and the decoration phase), and are prone to becoming outdated or incorrectly mapped.
[0005] 3. Low matching accuracy and low review efficiency: Existing systems typically rely on a single similarity score, making it difficult to consider factors such as the differences between candidates, parameter consistency, and rule constraints. When there is ambiguity in the matching, experts need to read each candidate's information, resulting in high review costs and making it difficult to distill feedback into reusable structured knowledge. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides a semantic feature adaptive matching and error correction method and system for construction project cost declaration. Based on the enterprise's dynamic material knowledge graph and multi-level cost ID tree, it introduces a human-machine closed-loop mechanism of parameterization + temporal modeling and confidence decomposition + comparative questioning, which realizes high-precision automatic matching, parameter-level error correction and traceable continuous optimization of building material declaration.
[0007] The present invention achieves the above-mentioned technical objectives through the following technical means.
[0008] An adaptive semantic feature matching and error correction method for construction project cost declaration includes the following process:
[0009] Step 1: Construct a parameterized and temporally-based enterprise-specific material knowledge graph;
[0010] Step 2: Construct a multi-level heading cost ID tree;
[0011] Step 3: Establish the consumption relationship between cost items and materials, thereby integrating the cost ID tree with the knowledge graph and performing semantic matching;
[0012] Step 4: Perform in-depth analysis on the semantic matching results of Step 3 to determine whether manual intervention is needed for error correction.
[0013] Furthermore, the specific process of step 1 is as follows:
[0014] Step 1.1: Knowledge graph schema design; define the organization of data in the knowledge graph, including the type of entity, the type of relationship, and the set of attributes that need to be carried;
[0015] Step 1.2: Material knowledge extraction; Based on the knowledge graph model, information is selectively extracted from various data sources of the enterprise and transformed into structured graph knowledge that conforms to the knowledge graph model specification, namely (entity, relation, entity) triples, and corresponding attribute sets are attached to entities and relations;
[0016] Step 1.3: Import the processed triples and their associated parameter sets and temporal sets into the graph database in batches; create indexes for key attributes including project name and material name to accelerate query efficiency;
[0017] Step 1.4: Knowledge graph consistency verification and visualization monitoring.
[0018] Furthermore, the specific process of step 2 is as follows:
[0019] The cost hierarchy is reconstructed in the graph database so that all leaf nodes carry complete context paths, facilitating subsequent matching and retrieval. The specific process is as follows:
[0020] Retrieve table fields: Cost ID, Cost Item Name, Level, Parent Node ID;
[0021] Starting with the "root list" as level 0, traverse downwards level by level until there is no next level; perform the following for each cost ID in the current level:
[0022] Write or update nodes: When traversing to a cost ID item, if the old node exists in the database, update the node; otherwise, create a new node. Ensure that each node has four attribute information: cost ID, cost item name, level, and parent node ID.
[0023] Write parent-child relationship: Establish a one-way parent→child relationship for the current node and all its child nodes. The relationship name is fixed as HAS_CHILD and the direction is consistent.
[0024] Form the next layer set: Collect all child nodes into the "next layer set" and then proceed to the next round of processing;
[0025] This loop continues until the last node is reached;
[0026] After traversing to the leaf nodes, generate their path text and summary:
[0027] Backtracking Path: Tracing back from the leaf node ID to the root yields a sequence of names; Path Text: Connecting the name sequences with a fixed separator " / " forms the path text path_text; Path Digest: Compressing path_text into a unique, fixed-length path hash path_hash using the secure hashing algorithm SHA256 for deduplication and fast comparison; Attribute Writeback: Writing path_text and path_hash back to the leaf node attributes;
[0028] Once completed, generate a "hierarchical path text" for each bottom-level cost item. The leaf nodes contain the cost ID, cost item name, level, path_text, and path_hash.
[0029] At this point, the entire cost ID tree is complete.
[0030] Furthermore, the specific process of step 3 is as follows:
[0031] Step 3.1: Extract consumption relationship triples;
[0032] The system reads historical engineering material procurement data, bills of quantities, and construction plan documents from the enterprise. Sentences from these documents are input one by one into the relation extraction model. After model processing and output, the following specific mappings and processes are executed to establish the relationship between cost items and material consumption:
[0033] Relationship mapping:
[0034] First, the (head entity, relation type, tail entity) tuple generated by the relation extraction model is parsed. Since the relation extraction model outputs general relations, a mapping rule set is created to map it to the predefined consumption relations in the knowledge graph.
[0035] Entity type constraints:
[0036] Header entity constraint: Link the parsed header entity text to an existing entity in the cost ID tree whose node label is cost item; if it cannot be linked or the linked entity is not a cost item, the extraction result is invalid.
[0037] Tail entity constraint: Link the parsed tail entity text to an existing entity in the knowledge graph whose node label is material; if it cannot be linked or the linked entity is not a material, the extraction result is invalid.
[0038] Manual review: After filtering the mapping rule set and constraining the entity type, the initial mapping result table is constructed and confirmed by experts to be correct. The final mapping table is then loaded into the graph database.
[0039] Step 3.2: Generate and index the "super vector";
[0040] Read the mapping table of the graph database and map the deepest and finest-grained nodes in the cost ID tree to the material nodes in the knowledge graph, thereby completing the fusion of the cost ID tree and the knowledge graph.
[0041] On the already integrated knowledge graph, run the graph embedding algorithm to generate a graph embedding vector for each graph entity corresponding to the bottom-level cost item; for each bottom-level cost item, obtain its hierarchical path text, and use a deep learning model to generate a path text vector containing contextual information; concatenate these two vectors to form the final "super vector"; store the "super vectors" of all bottom-level cost items into the FAISS vector retrieval library to establish an index that can be quickly retrieved;
[0042] Step 3.3: Process online input query requests and find matching cost items from the fused knowledge graph:
[0043] Manually input the key field content;
[0044] A large language model generates query text from the input data.
[0045] Using the same deep learning model loaded in step 3.2, the query text is encoded into a query vector;
[0046] In the FAISS vector retrieval library, the query vector is used to search for the top-K most similar "super vectors"; the similarity is calculated using the cosine similarity formula.
[0047] Finally, the candidate vector with the highest cosine similarity to the query vector and its score are output, and then proceed to step 4.
[0048] Furthermore, the specific process of step 4 is as follows:
[0049] Step 4.1: Confidence assessment and trigger condition determination;
[0050] Step 4.1.1: Confidence Vector Calculate the confidence vector. It contains the following components:
[0051]
[0052] in, Indicates the candidate gap; Indicates cross-modal consistency; Indicates the degree of parameter fit; Indicates the degree of rule conflict;
[0053] Step 4.1.2: Overall confidence level calculate:
[0054]
[0055] in, Represents the weight vector. Indicates the bias term;
[0056] Step 4.1.3: Trigger condition judgment;
[0057] Set two confidence evaluation thresholds τ_accept and τ_ask, satisfying 0 < τ_ask < τ_accept < 1;
[0058] like ≥ τ_accept and =1, then the candidate is automatically confirmed as the final result;
[0059] If τ_ask ≤ If the result is less than τ_accept, or the Δ value is less than the preset threshold δ_min, it is determined to be an uncertain result and triggers expert review.
[0060] like < τ_ask or If the value is 0, the application will be rejected directly and manual intervention is required.
[0061] Step 4.2: Comparative presentation for experts;
[0062] The paths, parameters, and context fields of the Top-K candidates are compared, the differences are extracted, and then a minimum query is automatically generated based on the differences. Experts select the correct option or add new parameter information through the interface; the expert's selection is regarded as a high confidence label and the feedback is recorded.
[0063] Step 4.3: Knowledge Increment and Adaptive Optimization;
[0064] The results confirmed by the experts were written back to the graph database in a three-part incremental manner.
[0065] Furthermore, the candidate gap Specifically as follows:
[0066]
[0067]
[0068]
[0069] in, , These represent the first and second candidate vectors, respectively. , They represent and cosine similarity and Cosine similarity; This is the normalization function; This represents the query vector.
[0070] Furthermore, the cross-modal consistency :
[0071]
[0072] in, The path text vector representing the first candidate; Represents the query vector Contextual projection on the side of the graph; This represents the graph embedding vector of the first candidate.
[0073] Furthermore, the parameter matching degree This is used to measure the degree of matching between query cost items and candidate cost items in terms of key parameters. Key parameters are divided into two categories: numerical parameters, including diameter, thickness, and strength grade values; and enumerated parameters, including units of measurement and material types. Parameter matching degree The calculation formula is as follows:
[0074]
[0075] Where δ is the preset tolerance; and These represent the parameter values for the queried cost item and the candidate cost item, respectively.
[0076] Rule Conflict :
[0077]
[0078] If the hard rule is violated, the value is 0; if the rule is fully satisfied, the value is 1.
[0079] A system for implementing the above-mentioned semantic feature adaptive matching and error correction method for construction project cost declaration includes:
[0080] The knowledge graph construction module is responsible for setting the graph pattern of entities, relationships, parameter sets and temporal sets, extracting knowledge from sources including historical procurement data and Excel data sources, normalizing and parameterizing unstructured descriptions, and finally constructing enhanced triples containing parameter sets and temporal sets, and importing them in batches into the graph database to form an enterprise-specific material knowledge graph.
[0081] The cost ID tree construction module receives the enterprise's cost ID data table, creates cost item nodes and parent-child relationships in the graph database through hierarchical traversal, and after traversing to the leaf node, traces back the complete path to the root node to generate hierarchical path text and path hash, and writes them back to the leaf node as attributes. Finally, it outputs a cost ID tree stored in the same graph database as the knowledge graph.
[0082] The graph-cost fusion and vector generation module is used to implement the data processing in steps 3.1 and 3.2. This module first receives the outputs from the knowledge graph construction module and the cost ID tree construction module, and establishes the consumption relationship between cost items and materials through the relation extraction model to achieve the fusion of graph and tree. Then, for each bottom-level cost item, it generates its graph embedding vector and path text vector, and concatenates the two to form a "super vector". Finally, all "super vectors" are stored in the FAISS vector retrieval library to build an index. This module outputs a vector index library that can be quickly retrieved.
[0083] The query generation and encoding module is used to implement the query generation and encoding process in step 3.3. This module receives structured field information input online by the user, calls a large language model to dynamically integrate these scattered field information into a query text, and then uses a deep learning model to encode the text into a high-dimensional query vector. This module passes the generated query vector to the similarity retrieval module.
[0084] The similarity retrieval module is used to implement the similarity retrieval process in step 3.3. This module receives the query vector output by the query generation and encoding module, and searches the FAISS vector retrieval library constructed by the graph-cost fusion and vector generation module based on the cosine similarity formula to find the Top-K candidate vectors most similar to the query vector and their scores. This module then passes the Top-K candidate results and scores to the confidence evaluation module.
[0085] The confidence assessment module is used to implement the data processing in step 4.1. This module receives the Top-K candidate results returned by the similarity retrieval module and calculates the confidence vector from four dimensions: candidate gap, cross-modal consistency, parameter fit, and rule conflict. Then, it obtains the final total confidence through weighted calculation and determines whether the matching result should be automatically adopted, trigger expert review, or directly rejected based on a preset threshold. This module transmits the assessed results and decision instructions to the expert interaction and knowledge increment module.
[0086] The expert interaction and knowledge increment module is used to implement the data processing in steps 4.2 and 4.3. When an instruction requiring review is received, this module presents candidate differences to the experts in a comparative questioning manner to assist them in making a quick decision. The results confirmed by the experts will be written back to the knowledge base maintained by the knowledge graph construction module as triple incremental knowledge, realizing continuous optimization and closed loop of knowledge. At the same time, the experts' selections will also be used as training samples to optimize the system model parameters.
[0087] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described semantic feature adaptive matching and error correction method for construction project cost declaration.
[0088] The present invention has the following beneficial effects:
[0089] Achieving high-precision matching: By constructing a parameterized knowledge graph and a "super vector" that integrates hierarchy and graph context, this invention can deeply understand the core parameters of materials such as specifications and models, accurately match non-standard entries such as "25mm rebar", and greatly improve the accuracy of automatic matching.
[0090] Achieving parameter-level intelligent error correction: This invention features a unique multi-dimensional confidence assessment model that can proactively identify ambiguities in the matching results. When manual review is required, the system will guide experts with comparative questions such as "Please confirm whether the diameter is Φ25 or Φ28?" This transforms the time-consuming process of reading the entire document into efficient parameter-level point-based error correction.
[0091] Achieving sustainable optimization of the knowledge system: Through a human-machine closed-loop mechanism, every error correction made by an expert is captured by the system, written back into the knowledge graph as incremental knowledge, and used as training data to optimize the model. This gives the system the ability to learn and evolve on its own, forming a continuously iterating and increasingly intelligent knowledge system. Attached Figure Description
[0092] Figure 1 This is a flowchart of the semantic feature adaptive matching and error correction method for construction project cost declaration as described in this invention. Detailed Implementation
[0093] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but the scope of protection of the present invention is not limited thereto.
[0094] The semantic feature adaptive matching and error correction method for construction project cost declaration described in this invention is as follows: Figure 1 As shown, the specific process includes the following:
[0095] Step 1: Constructing a parameterized and temporally-based enterprise-specific material knowledge graph;
[0096] This step is used to construct an operable and traceable dynamic knowledge graph (KG), providing the data and constraint foundation for subsequent matching and error correction. The KG adopts a triple structure (Subject, Relation, Object), binding a parameter set P to material entities and a temporal set T to business relationships (such as PURCHASED). This is used to introduce computable attributes such as "specifications / units / materials" and time dimensions such as "effective period / source / purchase date" into the reasoning and retrieval process. The specific steps include the following four stages, as follows:
[0097] Step 1.1: Knowledge Graph Schema Design;
[0098] First, define the organization of data in the knowledge graph, including the types of entities, the types of relationships, and the sets of attributes they each need to carry. A clear schema design can ensure the accuracy, consistency, and scalability of the knowledge graph. The specific process is as follows:
[0099] Entity definition:
[0100] Project Entity: Represents a specific engineering project, as one of the core entities in the diagram, including fields such as project_id (project ID) and name (project name).
[0101] Material Entity: Represents a type of material and is another core component of the graph. It includes fields such as code (unique material code for the enterprise) and name (main name of the material). This node carries a parameter set P as its attribute to describe its detailed specifications.
[0102] Relationship definition:
[0103] (Project) -[:PURCHASED]-> (Material): This indicates that the project has purchased a certain material, which is one of the core business relationships. This relationship carries a temporal set T as its attribute to record the time, source and transaction details of the purchase event.
[0104] Parameter set definition:
[0105] Parameter set P (bound to the material entity): includes computable fields such as specification, unit, and type.
[0106] Definition of temporal set:
[0107] Temporal set T (bound to the procurement relationship): includes information such as valid_from (valid start date), valid_to (valid expiration date), and source (information source) that records the relationship background and lifecycle.
[0108] Step 1.2: Material knowledge extraction;
[0109] This step will extract information from various data sources within the enterprise based on the schema defined in step 1.1, and transform it into structured graph knowledge that conforms to the schema specification; the specific process is as follows:
[0110] Step 1.2.1: Data source integration and extraction;
[0111] Regularly extract all kinds of information needed to construct the map from the company's historical engineering material procurement data and the Excel and CSV files of historical projects, according to the defined schema.
[0112] Step 1.2.2: Data parameterization;
[0113] The key to this step is to resolve the issue of inconsistent names and specifications, and to transform the unstructured description into a set of structured parameters defined in the schema. The specific process is as follows:
[0114] Normalization and parameterization: Regular expressions and keyword matching are used to process some non-standard expressions. For example, non-standard descriptions such as "rebar (Φ25)" and "25mm rebar" are normalized to the core material "rebar", and a structured parameter set P {specification: "Φ25mm"} is extracted from it. At the same time, the units of measurement and material expressions are standardized and incorporated into the parameter set P.
[0115] Step 1.2.3: Entity relation extraction and triple construction;
[0116] The goal of this step is to parse the parameterized data from step 1.2.2 into a series of (entity, relation, entity) triples, strictly following the schema specification, and to attach corresponding attribute sets to the entities and relations.
[0117] For structured tables: Write a script to read the cleaned procurement data line by line; for example: for a row of data ["XX Project Phase I Building Materials", "Rebar HRB400 Φ25mm", "XX Steel Group", "2024-10-15", "t"], the script needs to generate the following knowledge:
[0118] Create / match entities: Project entity (S): (p:Project {name:"XX Project Phase I Building Materials"}), Material entity (O): (m:Material {name:"Rebar"}).
[0119] Add a parameter set P to the material entity: Add or update attributes to the material entity to form its parameter set P: {type:"HRB400", specification: "Φ25mm", unit:"t"}.
[0120] Construct a temporal set T for the relation: Prepare the attributes for the relation, which constitute its temporal set T: {valid_from: '2024-10-15', valid_to: null, source: 'historical procurement data', purchase_date: '2024-10-15'}.
[0121] Create relation: (p) -[:PURCHASED {all attributes of temporal set T}]-> (m)
[0122] This constructs an enhanced triple (XX Project Phase I Building Materials, Procurement, Rebar) with strong binding information, where Procurement is bound to the temporal set T and Rebar is bound to the parameter set P.
[0123] Step 1.3: Knowledge Graph Construction and Dynamic Update;
[0124] This step is used to complete the initial construction of the knowledge graph by batch importing the processed triples and their associated parameter sets P and temporal sets T into a graph database (such as Neo4j); and creating indexes for key attributes such as project names and material names to accelerate query efficiency.
[0125] Step 1.4: Consistency verification and visualization;
[0126] To ensure the health and usability of the knowledge graph, regular verification and monitoring are conducted; the specific process is as follows:
[0127] Step 1.4.1: Consistency check;
[0128] Regularly scan the graph to detect the existence of "isolated nodes" (nodes with no relation to each other), or check whether the parameter set P of the material node is complete (e.g., missing the necessary unit field), and generate a report for the administrator to correct.
[0129] Step 1.4.2: Visualization and Operational Monitoring;
[0130] Use visualization tools to graphically display project and material nodes and their associated information to facilitate understanding and verification by business personnel; during interaction, the parameter set P of the material node and the detailed temporal set T of the relationship should be clearly displayed.
[0131] Step 2: Construct a multi-level heading cost ID tree;
[0132] The goal of this step is to reconstruct the cost hierarchy in the graph database, ensuring that all leaf nodes carry complete context paths to facilitate subsequent matching and retrieval; the specific process is as follows:
[0133] Read table fields: costID (cost ID), name (cost item name), level (level), parentID (parent node ID);
[0134] Starting with the "root list" as level 0, traverse downwards level by level until there is no next level; for each costID in the current level, complete the following sequentially:
[0135] Write or update node: When the program traverses to a cost ID item, if the old node exists in the database, the node is updated; otherwise, a new node is created. Ensure that each node has four attribute information: costID, name, level, and parentID.
[0136] Write parent-child relationship: Establish a one-way parent-child relationship for the current node and all its child nodes (the relationship name is fixed as HAS_CHILD, and the direction is consistent).
[0137] Form the next layer set: Collect all child nodes into the "next layer set" and then proceed to the next round of processing.
[0138] This process is repeated until the last node is reached.
[0139] After traversing to the leaf nodes, generate their path text and summary:
[0140] Backtracking path: Tracing back from the leaf node along the parentID to the root node yields the name sequence [root … leaf]; Path text: Connecting the name sequence with a fixed separator " / " forms the path text path_text; Path digest: Compressing path_text into a unique, fixed-length "identifier" (path_hash) using the secure hash algorithm SHA256, i.e., the path hash, is used for deduplication and fast comparison; Attribute write-back: Writing path_text and path_hash back to the leaf node attributes.
[0141] Once completed, generate a "hierarchical path text" for each bottom-level cost item. The leaf nodes contain costID, name, level, path_text, and path_hash.
[0142] At this point, the entire cost ID tree is complete.
[0143] Step 3: Integrate the knowledge graph with the cost ID tree and semantic matching;
[0144] The core objective of this step is to establish the consumption relationship between specific construction activities (cost items) and materials, thereby integrating the cost ID tree constructed in step 2 with the material knowledge graph constructed in step 1. It's important to clarify that the CONSUMES_MATERIAL relationship to be established in this step describes the technical connections at the engineering construction level, which belongs to a different business dimension than the PURCHASED relationship describing project procurement behavior in step 1. Similarly, a cost item is a specific, fine-grained work unit within a project. The specific process is as follows:
[0145] Step 3.1: Extracting consumption relationship triples, i.e., extracting consumption relationship triples such as (CostItem, CONSUMES_MATERIAL, Material):
[0146] The system reads historical engineering material procurement data, bills of quantities, construction plans, and other documents from the enterprise. Sentences from these documents are input one by one into a relation extraction model, such as REBEL (Relation Extraction By End-to-End Languagegeneration, an end-to-end relation extraction model based on a BART pre-trained model). After the model processes and outputs the data, the following specific mapping rules and processes are executed to establish the relationship between cost items and material consumption:
[0147] 1. Relational mapping
[0148] First, parse the (head entity, relation type, tail entity) tuple generated by REBEL; since REBEL outputs a general relation, a mapping rule set needs to be created to map it to the predefined CONSUMES_MATERIAL relation in the knowledge graph;
[0149] Example of a rule set:
[0150] The relation type output by IF REBEL belongs to any of the [Use, Consumption...] categories;
[0151] Then the relation will be mapped to: CONSUMES_MATERIAL;
[0152] ELSE (otherwise) ignore the triple because it does not represent a consumption relationship.
[0153] 2. Entity type constraints
[0154] Even if a triplet is successfully mapped, it must still satisfy strict entity type constraints to ensure logical correctness. The entity type constraints are as follows:
[0155] Header entity constraint: Successfully link the parsed header entity text (such as "C30 commercial concrete pouring") to an existing entity in the cost ID tree with the node label CostItem; if it cannot be linked or the linked entity is not a cost item, the extraction result is invalid.
[0156] Tail entity constraint: The system needs to successfully link the parsed tail entity text (such as "C30 concrete") to an existing entity in the knowledge graph with the node label "Material"; if it cannot be linked or the linked entity is not a material, the extraction result is invalid.
[0157] Manual review: After filtering the rule set and constraining the entity type, the initial mapping result table needs to be reviewed by experts. Once the experts confirm that there are no errors, a script is used to load this final mapping table into the graph database.
[0158] Step 3.2: Generate and index the "super vector";
[0159] Read the mapping table of the graph database and map the deepest and finest-grained nodes in the cost ID tree to the material nodes in the knowledge graph, thereby completing the fusion of the cost ID tree and the knowledge graph.
[0160] On the already integrated knowledge graph, run a graph embedding algorithm (such as Node2Vec) to generate a graph embedding vector for each graph entity corresponding to the bottom-level CostItem; for each bottom-level CostItem, obtain its hierarchical path text, and use a deep learning model (Sentence-Transformer model) to generate a path text vector containing contextual information; concatenate these two vectors to form the final "super vector"; store the "super vectors" of all bottom-level CostItems in the FAISS vector retrieval library to establish an index that can be quickly retrieved.
[0161] Step 3.3: Online matching phase;
[0162] This stage handles online query requests and quickly and accurately finds the most matching cost item from the fused knowledge graph. Instead of fixed, rule-based templates, this stage employs a more advanced Large Language Model (LLM) for dynamic text generation to obtain higher-quality query input. The specific query matching process is as follows:
[0163] Structured information input: Receives manually filled content from five key fields: “Sub-items”, “Work Project Name”, “Project Characteristics”, “Unit”, and “Work Content”.
[0164] Query text generation based on large language models (LLM): The structured fields mentioned above are dynamically embedded into a pre-designed instruction, which is then sent to the LLM to guide it to generate a coherent and natural text from the actual input data as the final query text; this method can intelligently handle situations where fields are missing or the content is not detailed enough.
[0165] Encoding the query: Using the same Sentence-Transformer model loaded in step 3.2, the query text generated by the LLM in the previous step is encoded into a high-dimensional query vector.
[0166] Similarity retrieval: In the FAISS vector retrieval library, this query vector is used to efficiently search for the top-K most similar "super vectors"; the similarity is calculated using the cosine similarity formula:
[0167]
[0168] in, Represents the query vector With candidate vectors The cosine similarity, with values ranging from [-1, 1]; Represents the query vector With candidate vectors exist The smaller the angle between the two sides in 3D space, the greater the similarity. This represents the query vector (generated from the query text encoding in step 3.3); This represents the candidate vector (the "super vector" generated from the leaf cost term in step 3.2); Represents the query vector In the Dimensional components; Represents candidate vectors In the Dimensional components; This represents the dimension of the vector, that is, the length of the "supervector";
[0169] The system returns the candidate vector with the highest cosine similarity to the query vector and its score, and proceeds to step 4 for confidence evaluation.
[0170] Step 4: Multidimensional confidence-driven expert review and adaptive optimization;
[0171] Step 4.1: Confidence assessment and trigger condition determination;
[0172] This step follows the semantic matching results from step 3, performing in-depth analysis to determine if manual intervention is necessary. Before performing the confidence calculation and triage judgment in step 4, this invention first prepares a batch of manually labeled verification sample sets for calibrating parameters and thresholds. Specifically, several "query cost item - candidate cost item" pairs are randomly selected from the bill of quantities, construction plans, and historical procurement and settlement data. The query cost item is generated from the list field in step 3.3, and the candidate cost item is generated from the cost ID leaf node in step 3.2. Then, domain experts review each pair of samples, labeling their relationship as "correct match" or "incorrect match," while recording key difference information (such as unit discrepancies, specification differences). Finally, the sample set is randomly divided into a training set and a verification set.
[0173] Step 4.1.1: Calculate the confidence vector;
[0174] First, the Top-K candidates returned by the FAISS retrieval and their similarity scores are decomposed into a multi-factor factorization to form a confidence vector c; the confidence vector c contains the following components:
[0175] (1) Δ (candidate gap):
[0176]
[0177] in, Indicates the first 1 candidate vector; express and The cosine similarity here. ; This is the normalization function;
[0178] Δ reflects the similarity difference between the first candidate (Top-1) and the second candidate (Top-2). If the Δ value is large, it means that Top-1 is significantly better than Top-2, and the system matching result is more reliable. If the Δ value is small, it means that the top two candidates are close, and the system uncertainty is high. In order to ensure the system's discriminative power, a minimum similarity threshold δ_min is set (e.g., δ_min=0.05). When Δ is less than this threshold, it enters the manual review stage.
[0179] (2) (Cross-modal consistency): Measures the consistency between textual semantics and the graph structure context. Default implementation:
[0180]
[0181] in, The path text vector representing the first candidate; This represents the context projection of query vector A onto the graph. Represents the graph embedding vector of the first candidate; Indicates cosine similarity;
[0182] (3) (Parameter Match): This measures the degree of match between the query cost item and the candidate cost item on key parameters. Key parameters are divided into two categories:
[0183] Numeric parameters: such as diameter, thickness, strength grade, etc.
[0184] Categorical parameters: such as units of measurement, material type, etc.
[0185] formula:
[0186]
[0187] Where δ is the preset tolerance; and These represent the parameter values for the query cost item and the candidate cost item, respectively.
[0188] The above formula means that when comparing numerical parameters, if the difference between the query and the candidate is within the tolerance δ, the exponential decay function is used to calculate the value, and the smaller the difference, the closer the value is to 1; if the difference exceeds δ, it is judged as 0; when comparing enumerated parameters, it is recorded as 1 if the values are exactly the same, otherwise it is recorded as 0.
[0189] (4) (Rule conflict level):
[0190]
[0191] If the hard rule is violated, the value is 0; if the rule is fully satisfied, the value is 1.
[0192] Therefore, the confidence vector is represented as:
[0193]
[0194] Step 4.1.2: Calculate the total confidence level;
[0195] Based on confidence vector Through linear combination and after The function yields the final scalar confidence score. :
[0196]
[0197] in, Represents the weight vector. The bias term is represented by both terms, which are learned on a manually labeled training set. The function represents compressing the result of a linear combination into the interval (0,1).
[0198] Step 4.1.3: Trigger condition judgment;
[0199] Set two confidence assessment thresholds: τ_accept (acceptance threshold, the threshold for judging high confidence) and τ_ask (ask threshold, the lower limit for triggering expert review). Use the results statistics on the validation set to select reasonable values, and ensure that 0 < τ_ask < τ_accept < 1.
[0200] like ≥ τ_accept and If the value is 1, the candidate is automatically confirmed as the final result (high confidence level).
[0201] If τ_ask ≤ If the result is less than τ_accept, or the Δ value is less than the preset threshold δ_min, it is determined to be an uncertain result (medium confidence level) and triggers expert review.
[0202] like < τ_ask or If the value is 0, the application is rejected directly (low confidence level) and manual intervention is required.
[0203] Step 4.2: Comparative presentation for experts;
[0204] This step is used to present the differences between candidates in a structured way, facilitating quick expert judgment. First, the system compares the paths, parameters, and context fields of the Top-K candidates, extracting the differences, such as diameter = 25mm vs. diameter = 28mm, intensity level = HRB400 vs. HRB500. Then, based on the differences, the system automatically generates minimal queries, such as: "Please confirm whether the diameter is Φ25 or Φ28?", or "Please confirm whether the intensity level is HRB400 or HRB500?". Experts then select the correct option or add new parameter information through the interface. The expert's selection is considered a high-confidence label, and the system records this feedback.
[0205] Step 4.3: Knowledge Increment and Adaptive Optimization
[0206] The expert confirmation results are written back to the graph database in a three-part incremental manner, for example (parameter=Φ25, alias=25mm rebar, context=main structure phase), and bound to the reviewer and timestamp. The system stores the written knowledge as a new version, retaining the old version to support rollback and auditing. Newly added parameters or aliases take effect immediately in subsequent matching, reducing duplicate reviews; if experts add rules or correct erroneous parameters, the system updates the rule base and recalculates the confidence weight of the corresponding node. The system uses expert selections as training samples to participate in subsequent comparative learning and parameter consistency loss optimization of the model, gradually improving the model's discriminative ability.
[0207] This invention also provides a system for implementing the above-mentioned semantic feature adaptive matching and error correction method for construction project cost declaration, comprising:
[0208] The knowledge graph construction module is used to implement the data processing in step 1. This module is responsible for defining the graph schema of entities, relations, parameter set P, and temporal set T. It extracts knowledge from data sources such as historical procurement data and Excel, normalizes and parameterizes unstructured descriptions like "rebar (Φ25)", and finally constructs enhanced triples containing parameter set P and temporal set T. These triples are then imported in batches into a graph database to form a company-specific material knowledge graph. The output of this module is a dynamic and traceable knowledge graph, providing a data foundation for subsequent modules.
[0209] The Cost ID Tree Construction Module implements the data processing in step 2. This module receives the enterprise's cost ID data table and creates cost item nodes and parent-child relationships (HAS_CHILD) in the graph database through hierarchical traversal. After traversing to a leaf node, the module traces back the complete path to the root node, generating hierarchical path text (path_text) and path hash (path_hash), and writes them back to the leaf node as attributes. The output of this module is a cost ID tree stored in the same graph database as the material knowledge graph.
[0210] The knowledge graph-cost fusion and vector generation module is used to implement the data processing in steps 3.1 and 3.2. This module first receives the outputs from the knowledge graph construction module and the cost ID tree construction module. It then establishes the consumption (CONSUMES_MATERIAL) relationship between cost items and materials using a relation extraction model, achieving the fusion of the knowledge graph and the tree. Subsequently, for each bottom-level cost item, this module generates its graph embedding vector and path text vector, concatenating them to form a "super vector." Finally, all "super vectors" are stored in the FAISS vector retrieval library to create an index. This module outputs a vector index library that allows for fast retrieval.
[0211] The query generation and encoding module implements the query generation and encoding process in step 3.3. This module receives five structured fields of information input online by the user, including "Sub-items" and "Work Project Name". It calls a Large Language Model (LLM) to dynamically integrate these scattered field information into a coherent and natural query text, and then uses a Sentence-Transformer model to encode this text into a high-dimensional query vector. This module then passes the generated query vector to the similarity retrieval module.
[0212] The similarity retrieval module implements the similarity retrieval process in step 3.3. This module receives the query vector output by the query generation and encoding module, and efficiently searches the FAISS vector retrieval library constructed by the graph-cost fusion and vector generation module based on the cosine similarity formula to find the Top-K candidate vectors most similar to the query vector and their scores. This module then passes the Top-K candidate results and scores to the confidence evaluation module.
[0213] The confidence assessment module is used to implement the data processing in step 4.1. This module receives the Top-K candidate results returned by the similarity retrieval module and calculates the confidence vector from four dimensions: candidate gap (Δ), cross-modal consistency (Acm), parameter fit (Sparam), and rule conflict degree (Rconf). Subsequently, the final total confidence level was obtained through weighted calculation. Based on preset thresholds (τ_accept, τ_ask), the module determines whether the matching result should be automatically adopted, trigger expert review, or directly rejected. This module then transmits the evaluated results and decision instructions to the expert interaction and knowledge increment module.
[0214] The expert interaction and knowledge increment module is used to implement the data processing in steps 4.2 and 4.3. When an instruction requiring review is received, this module presents candidate differences to the experts in a comparative question format (e.g., "Please confirm whether the diameter is Φ25 or Φ28?") to assist them in making a quick decision. The results confirmed by the experts (such as correct parameters, new aliases, etc.) are written back to the knowledge base maintained by the knowledge graph construction module as triple incremental knowledge, realizing continuous optimization and closed-loop knowledge. At the same time, the experts' choices are also used as training samples to optimize the system model parameters and gradually improve the automation level of future matching.
[0215] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method for semantic feature adaptive matching and error correction for construction project cost declaration.
[0216] The embodiments described above are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments. Any obvious improvements, substitutions or modifications that can be made by those skilled in the art without departing from the essence of the present invention shall fall within the protection scope of the present invention.
Claims
1. A semantic feature adaptive matching and error correction method for construction project cost declaration, characterized in that, The process includes the following: Step 1: Construct a parameterized and temporally-based enterprise-specific material knowledge graph; Step 2: Construct a multi-level heading cost ID tree; Step 3: Establish the consumption relationship between cost items and materials, thereby integrating the cost ID tree with the knowledge graph and performing semantic matching; The specific process of step 3 is as follows: Step 3.1: Extract consumption relationship triples; The system reads historical engineering material procurement data, bills of quantities, and construction plan documents from the enterprise. Sentences from these documents are input one by one into the relation extraction model. After model processing and output, the following specific mappings and processes are executed to establish the relationship between cost items and material consumption: Relation mapping: First, parse the (head entity, relation type, tail entity) tuple generated by the relation extraction model; since the relation extraction model outputs general relations, create a mapping rule set to map it to the predefined consumption relations in the knowledge graph; Entity type constraints: Header entity constraint: Link the parsed header entity text to an existing entity in the cost ID tree whose node label is cost item; if it cannot be linked or the linked entity is not a cost item, the extraction result is invalid; Tail entity constraint: Link the parsed tail entity text to an existing entity in the knowledge graph whose node label is material; if it cannot be linked or the linked entity is not a material, the extraction result is invalid. Manual review: After filtering the mapping rule set and constraining the entity type, the initial mapping result table is constructed and confirmed by experts to be correct. The final mapping table is then loaded into the graph database. Step 3.2: Generate and index the "super vector"; Read the mapping table of the graph database and map the deepest and finest-grained nodes in the cost ID tree to the material nodes in the knowledge graph, thereby completing the fusion of the cost ID tree and the knowledge graph. On the already integrated knowledge graph, run the graph embedding algorithm to generate a graph embedding vector for each graph entity corresponding to the bottom-level cost item; for each bottom-level cost item, obtain its hierarchical path text, and use a deep learning model to generate a path text vector containing contextual information; concatenate these two vectors to form the final "super vector"; store the "super vectors" of all bottom-level cost items into the FAISS vector retrieval library to establish an index that can be quickly retrieved; Step 3.3: Process online input query requests and find matching cost items from the fused knowledge graph: Key fields are manually entered; a large language model then generates query text from the input data. Using the same deep learning model loaded in step 3.2, the query text is encoded into a query vector; in the FAISS vector retrieval library, the query vector is used to search for the top-K most similar "super vectors"; finally, the candidate vector with the highest cosine similarity to the query vector and its score are output, and then proceed to step 4; Step 4: Perform in-depth analysis on the semantic matching results of Step 3 to determine whether manual intervention for error correction is necessary; The specific process of step 4 is as follows: Step 4.1: Confidence assessment and trigger condition determination; Step 4.1.1: Calculate the confidence vector c, which contains the following components: c=[Δ, Acm, Sparam, Rconf] Where Δ represents the candidate gap, which is the probability difference between the top two candidate vectors after normalization; A cm Indicates cross-modal consistency; Sparam indicates parameter fit; Rconf indicates rule conflict. Step 4.1.2: Calculate the total confidence level p: p=sigmoid(w T c+b) Among them, w T Let b represent the weight vector, and b represent the bias term. Step 4.1.3: Trigger condition judgment; Set two confidence evaluation thresholds τ_accept and τ_ask, and satisfy 0 < τ_ask < τ_accept < 1; If p ≥ τ_accept and R conf If the value is 1, the candidate will be automatically selected as the final result. If τ_ask≤p<τ_accept, or Δ value is less than the preset threshold δ_min, it is determined to be an uncertain result and triggers expert review; If p < τ_ask or R conf =0, then directly reject, and manual intervention is required; Step 4.2: Comparative presentation for experts; The paths, parameters, and context fields of the Top-K candidates are compared, the differences are extracted, and a minimum query is automatically generated based on the differences. Experts select the correct option or add new parameter information through the interface; the expert's selection is regarded as a high confidence label and the feedback is recorded. Step 4.3: Knowledge Increment and Adaptive Optimization; The results confirmed by the experts were written back to the graph database in a three-part incremental manner.
2. The semantic feature adaptive matching and error correction method for construction project cost declaration according to claim 1, characterized in that, The specific process of step 1 is as follows: Step 1.1: Knowledge graph schema design; define the organization of data in the knowledge graph, including the type of entity, the type of relationship, and the set of attributes that need to be carried; Step 1.2: Material knowledge extraction; Based on the knowledge graph model, information is extracted from various data sources of the enterprise in a targeted manner and transformed into structured graph knowledge that conforms to the knowledge graph model specification, namely (entity, relation, entity) triples, and corresponding attribute sets are attached to entities and relations; Step 1.3: Import the processed triples and their associated parameter sets and temporal sets into the graph database in batches; wherein, the parameter set is bound to the material entity, including computable fields related to specifications, units, and material types, and the temporal set is bound to the procurement relationship, including the effective start date, the effective expiration date, the relationship background related to the information source, and the life cycle information; Step 1.4: Knowledge graph consistency verification and visualization monitoring.
3. The semantic feature adaptive matching and error correction method for construction project cost declaration according to claim 1, characterized in that, The candidate gap Δ is the probability difference between the top two candidates after softmax normalization, as follows: Δ = softmax(s1) - softmax(s2) s1 = cos(A, B_1) s2 = cos(A, B_2) Where B_1 and B_2 represent the first and second candidate vectors, respectively; s1 and s2 represent the cosine similarity between A and B_1 and between A and B_2, respectively; softmax(·) is the normalization function; and A represents the query vector.
4. The semantic feature adaptive matching and error correction method for construction project cost declaration according to claim 1, characterized in that, The cross-modal consistency A cm : Where t1 represents the path text vector of the first candidate; A g g1 represents the context projection of query vector A onto the graph; g1 represents the first candidate graph embedding vector.
5. The semantic feature adaptive matching and error correction method for construction project cost declaration according to claim 1, characterized in that, The parameter matching degree S param This is used to measure the degree of match between query cost items and candidate cost items on key parameters. Key parameters are divided into two categories: numerical parameters, including diameter, thickness, and strength grade values; and enumerated parameters, including units of measurement and material types. Parameter fit S param The calculation formula is as follows: Where δ is the preset tolerance; x and y represent the parameter values of the query cost item and the candidate cost item, respectively; Rule conflict degree R conf :R conf ∈{0,1}; if the hard rule is violated, the value is 0; if the hard rule is fully satisfied, the value is 1.
6. The semantic feature adaptive matching and error correction method for construction project cost declaration according to claim 1, characterized in that, The specific process of step 2 is as follows: The cost hierarchy is reconstructed in the graph database so that all leaf nodes carry complete context paths, facilitating subsequent matching and retrieval. The specific process is as follows: Retrieve table fields: Cost ID, Cost Item Name, Level, Parent Node ID; Starting with the "root list" as level 0, traverse downwards level by level until there is no next level; perform the following for each cost ID in the current level: Write or update nodes: When traversing to a cost ID item, if the old node exists in the database, update the node; otherwise, create a new node. Ensure that each node has four attribute information: cost ID, cost item name, level, and parent node ID. Write parent-child relationship: Establish a one-way parent→child relationship for the current node and all its child nodes. The relationship name is fixed as HAS_CHILD and the direction is consistent. Form the next level set: Collect all child nodes into the "next level set" and then proceed to the next round of processing; This loop continues until the last node is reached; After traversing to the leaf nodes, generate their path text and summary: Backtracking Path: Tracing back from the leaf node ID to the root yields a name sequence; Path Text: Connecting the name sequences with a fixed separator " / " forms the path text path_text; Path Digest: Compressing path_text into a unique, fixed-length path hash path_hash using the secure hashing algorithm SHA256 for deduplication and fast comparison; Attribute Writeback: Writing path_text and path_hash back to the leaf node attributes; Once completed, generate a "hierarchical path text" for each bottom-level cost item. The leaf nodes contain the cost ID, cost item name, level, path_text, and path_hash. At this point, the entire cost ID tree is complete.
7. A system for implementing the semantic feature adaptive matching and error correction method for construction project cost declaration as described in claim 3, characterized in that, include: The knowledge graph construction module is responsible for setting the graph pattern of entities, relationships, parameter sets and temporal sets, extracting knowledge from sources including historical procurement data and Excel data sources, normalizing and parameterizing unstructured descriptions, and finally constructing enhanced triples containing parameter sets and temporal sets, and importing them in batches into the graph database to form an enterprise-specific material knowledge graph. The cost ID tree construction module receives the enterprise's cost ID data table, creates cost item nodes and parent-child relationships in the graph database through hierarchical traversal, and after traversing to the leaf node, traces back the complete path to the root node to generate hierarchical path text and path hash, and writes them back to the leaf node as attributes. Finally, it outputs a cost ID tree stored in the same graph database as the knowledge graph. The graph-cost fusion and vector generation module is used to implement the data processing in steps 3.1 and 3.
2. This module receives the output from the knowledge graph construction module and the cost ID tree construction module, establishes the consumption relationship between cost items and materials through the relation extraction model, and realizes the fusion of graph and tree. Then, it generates a graph embedding vector and path text vector for each bottom-level cost item, and concatenates the two to form a "super vector". Finally, all "super vectors" are stored in the FAISS vector retrieval library to build an index. The query generation and encoding module is used to implement the query generation and encoding process in step 3.
3. This module receives structured field information input by the user online, calls a large language model to dynamically integrate these scattered field information into a query text, uses a deep learning model to encode the text into a query vector, and passes it to the similarity retrieval module. The similarity retrieval module is used to implement the similarity retrieval process in step 3.
3. This module receives the query vector, searches the FAISS vector retrieval library constructed by the graph-cost fusion and vector generation module based on the cosine similarity formula, finds the Top-K candidate vectors most similar to the query vector and their scores, and passes them to the confidence evaluation module. The confidence assessment module is used to implement the data processing procedure in step 4.1; This module receives the Top-K candidate results returned by the similarity retrieval module, calculates the confidence vector from four dimensions: candidate gap, cross-modal consistency, parameter fit, and rule conflict, calculates the total confidence through weighted average, and determines whether the matching result should be automatically adopted, trigger expert review, or directly rejected based on a preset threshold. The evaluation results and decision instructions are then passed to the expert interaction and knowledge increment module. The expert interaction and knowledge increment module is used to implement the data processing procedures in steps 4.2 and 4.3; When an instruction requiring review is received, the differences between the candidates are presented to the experts in a comparative questioning manner to assist them in making a quick decision. The results confirmed by the experts will be written back into the knowledge base maintained by the knowledge graph construction module as triple incremental knowledge, realizing continuous optimization and closed loop of knowledge. At the same time, the experts' selections will also be used as training samples to optimize the system model parameters.
8. A computer-readable storage medium, characterized in that, A computer program is stored on a computer-readable storage medium, which, when executed by a processor, implements the steps of the semantic feature adaptive matching and error correction method for construction project cost declaration as described in claim 3.