Tunnel quota matching reasoning method and system based on hierarchical cost knowledge graph
By constructing a hierarchical cost knowledge graph for highway tunnel engineering, and combining keyword extraction and synonym expansion, the accuracy and reliability of quota matching in highway tunnel engineering are solved by utilizing name similarity, path similarity, and hierarchical reasoning scores, thus enabling the provision and dynamic adjustment of multiple candidate quotas.
Patent Information
- Application Number
- CN202611509598.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-28
- Publication Date
- 2026-11-06
AI Technical Summary
Existing quota matching schemes have poor accuracy and reliability in highway tunnel engineering. They cannot effectively use hierarchical paths to distinguish quotas with the same name, and lack multiple candidate outputs when the input is incomplete, leading to quota selection bias.
A hierarchical cost knowledge graph for highway tunnels is constructed. Candidate cost objects are generated through keyword extraction and synonym expansion. The system combines name similarity, path similarity, and keyword hit rate, and uses hierarchical reasoning scores and rule corrections to conduct a comprehensive evaluation, ensuring the accuracy and reliability of the matching.
It improves the accuracy and reliability of quota matching for highway tunnel engineering, avoids errors in applying quotas across different parts and sub-items, provides multiple candidate quotas for selection, adapts to the completeness of input descriptions, and enables quantitative evaluation and dynamic adjustment.
Smart Images

Figure CN123048681A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of engineering cost technology, specifically to a tunnel quota matching reasoning method and system based on a hierarchical cost knowledge graph. Background Technology
[0002] In the cost estimation of highway tunnel projects, the quantity table typically describes the contents of each item in natural language, such as "masonry drainage ditch outside the tunnel" or "steel plates for the steel frame." The estimator needs to select the corresponding quota items from the highway tunnel project budget item table based on these descriptions. This process relies on the estimator's understanding of the "item-section-detail-quota" hierarchical structure in the item table, the meaning of quota names, and the adjustment rules.
[0003] Currently, existing technical solutions mainly focus on the structured recognition of cost estimates. For example, OCR, word segmentation, and knowledge graphs are used to perform structured recognition of cost estimates, breaking down unstructured text into fields such as project name, features, units, and quantities. However, the main goal of these solutions is to normalize the text data, without further addressing the question of which specific quota item should be matched with the project description.
[0004] Furthermore, some existing solutions achieve semantic retrieval of cost data through historical semantic queries and storage mechanisms, which can improve the reuse efficiency of existing query results similar to user input. However, its essence is still information retrieval, and the retrieval results are similar historical data or historical query results, which cannot directly answer which quota item should be applied to a certain project description in the engineering quantity table.
[0005] Application publication number CN116629949A discloses a method for intelligently matching quota sub-items in hydropower construction engineering. This method achieves matching between text descriptions and quota sub-items by constructing a quota library keyword, performing similarity analysis, extracting sub-item feature vectors, and employing a scoring matching mechanism. However, when applied to the field of hydropower construction engineering, the quota hierarchy structure differs from the "item-section-detail-quota" multi-layer path structure of the budget item table for highway tunnel engineering. Due to the lack of hierarchical path information corresponding to highway tunnel engineering, this method cannot utilize the hierarchical affiliation between project sections, details, and sub-details for path-based positioning; its matching logic can only be based on pure text similarity calculation. When quotas with the same or similar names are distributed under different detail paths in highway tunnel engineering (for example, the "drainage ditch" quota may appear under the "tunnel entrance slope drainage" path or the "tunnel interior drainage" path), keyword similarity alone cannot distinguish which part the quota belongs to, easily leading to incorrect quota application across parts and details. Meanwhile, the scheme lacks the identification and utilization of constraint terms for engineering locations, and cannot distinguish the semantic differences of generalized terms such as "reinforced steel" and "concrete" in different locations. In addition, the scoring mechanism of the scheme is based on keyword matching. When the input description itself lacks distinguishing information such as materials, structure or process, it will still output the single result with the highest score, failing to identify whether the input information is sufficient, and failing to provide multiple candidate quotas for compilers to choose from when information is insufficient, which can easily lead to quota selection bias.
[0006] In summary, existing quota matching schemes are based on plain text similarity calculations, which cannot distinguish between quotas with the same name using hierarchical paths, lack multiple candidate outputs when the input is incomplete, and require manual checking of matching quotas, resulting in poor accuracy and reliability of quota matching in highway tunnel engineering. Summary of the Invention
[0007] This invention aims to address the problem of poor accuracy and reliability in existing quota matching schemes, and proposes a tunnel quota matching reasoning method and system based on hierarchical cost knowledge graph.
[0008] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:
[0009] In a first aspect, the present invention provides a tunnel quota matching and reasoning method based on a hierarchical cost knowledge graph, the method comprising:
[0010] Construct a hierarchical cost knowledge graph for highway tunnels, and generate candidate quota objects based on the hierarchical cost knowledge graph;
[0011] The process involves obtaining a user-inputted engineering description as the input question, extracting keywords and expanding synonyms related to highway tunnel engineering, and dividing the expanded keyword set into a set of strongly constrained words and a set of weakly constrained words. The name similarity and path similarity between the input question and each candidate quota object are calculated. The hit rate of each keyword in each candidate quota object is calculated. Finally, the input question is identified to determine its question type.
[0012] The target item is determined in the hierarchical cost knowledge graph based on the set of strong constraint words, and an initial set of candidate quota objects is generated within the subtree of the target item. For each candidate quota object in the initial set of candidate quota objects, the hierarchical reasoning score of the candidate quota object is calculated based on whether the candidate quota object is located within the subtree of the target item and whether the name of the parent item of the candidate quota object matches the domain words of the input question.
[0013] Business mapping rules and strong constraint rules are introduced to correct the scoring items and output order of candidate quota objects. The business mapping rules are used to prioritize returning candidate quota objects from a pre-set set of target quota numbers when the input question hits the trigger mode. The strong constraint rules are used to calculate the strong constraint rule hit score of the candidate quota object based on the number of strong constraint words hit in the candidate quota object path or quota name and the number of rules that trigger strong constraints but are not hit in the candidate path. The rules are then used to correct the score of the candidate quota object through a weak generic word penalty item, and the rule correction score of the candidate quota object is calculated.
[0014] For each candidate quota object, the name similarity, path similarity, keyword hit ratio, hierarchical reasoning score, and rule correction score of the candidate quota object are integrated to obtain the comprehensive score of the candidate quota object. The candidate quota objects are sorted from high to low according to the comprehensive score. When the business mapping rule is hit, the business mapping rule priority score is added to the comprehensive score and then the objects are re-sorted.
[0015] Based on the problem type, output the corresponding candidate quota objects according to the sorting results.
[0016] Furthermore, the hierarchical cost knowledge graph is based on the cost document template of highway tunnel engineering projects. It organizes the engineering cost data into a graph structure that includes item nodes, project section nodes, detailed item nodes, quota nodes and explanation adjustment nodes, and stores the inclusion relationship and explanation adjustment relationship between nodes.
[0017] The path for each candidate quota object is denoted as:
[0018] ;
[0019] in, Indicates the first One candidate quota recipient, Indicates the first One candidate quota object The path, Indicates the destination node. Indicates the node of the project. Indicates the first Layer detail nodes, , This indicates the total number of detail nodes. Indicates the quota node;
[0020] Each candidate quota object It should at least include the following: the category name, the section number of the project, the sub-category path, the quota number, the quota name, the quota unit, the parent sub-category number, the parent sub-category name, and the explanation / adjustment content; the path text is obtained by concatenating the category name, the section name of the project, and the sub-category path in hierarchical order. The candidate full text is obtained by splicing together the path text, quota number, quota name, and explanatory adjustment content. .
[0021] Furthermore, the input question undergoes keyword extraction and synonym expansion within the field of highway tunnel engineering to obtain an expanded keyword set. This expanded keyword set is then divided into a strongly constrained keyword set and a weakly constrained keyword set, specifically including:
[0022] For the input problem Domain term extraction is performed on a pre-constructed thesaurus for highway tunnel engineering. Each domain term in ,like Appeared In the middle, then Included in the initial keyword set :
[0023] ;
[0024] in, The first in the domain vocabulary Domain-specific terms, This indicates that it is contained within a substring;
[0025] According to the thesaurus Expanding the set of keywords yields an expanded keyword set. :
[0026] ;
[0027] in, This represents a thesaurus mapping function. Domain words a collection of synonyms Indicates synonyms, This indicates that it exists. Represents the union;
[0028] The extended keyword set Divided into a set of strongly constrained words and weak constraint word set :
[0029] ;
[0030] ;
[0031] in, This indicates a strongly bound vocabulary. This indicates a weakly constrained vocabulary. Indicates intersection.
[0032] Furthermore, the name similarity and path similarity are calculated based on string sequence matching similarity, and the calculation formula is as follows:
[0033] ;
[0034] ;
[0035] in, Indicates input problem With candidate quota objects Name similarity between them Indicates input problem With candidate quota objects Path similarity between Representing text With text The sequence matching ratio, with a value range of . , Indicates candidate quota objects The name of the quota. Indicates candidate quota objects Path text;
[0036] The keyword hit rate includes:
[0037] Hit rate of extended keyword set in quota name :
[0038] ;
[0039] Hit rate of extended keyword set in path text :
[0040] ;
[0041] Hit rate of expanded keyword set in candidate full text :
[0042] ;
[0043] The hit rate of the extended keyword set in the section name of the project :
[0044] ;
[0045] Hit rate of extended keyword set in detail path names :
[0046] ;
[0047] in, Represents an expanded set of keywords Any keyword in, Indicates candidate quota objects The name of the quota. Indicates candidate quota objects Path text, Indicates candidate quota objects The candidate full text, Indicates candidate quota objects The name of the section to which the project belongs. Indicates candidate quota objects Detailed path, Indicates the number of elements in the set. This indicates that it is contained within a substring. This indicates taking the maximum value; if If the value is empty, then the hit rate of each of the above keywords is 0.
[0048] Furthermore, the question types include single-item type, multiple-candidate type, subtree type, and matching type. Question type identification for the input question specifically includes:
[0049] The input problem The input question is matched one by one with the preset matching question patterns, subtree question patterns, and multiple candidate question patterns. If a match is successful, the input question is... Problem types Determine the corresponding matching type, subtree type, or multiple candidate type;
[0050] If none of the above preset modes are matched, then proceed to constraint missing identification: for the first... Rules for identifying missing constraints ,in Indicates parent level details, This represents the set of necessary constraint terms used to distinguish candidates at the same level, and is used to determine the input problem. Did it hit? And it missed. If any of the constraint terms is present, then the constraint identifier is missing. Otherwise Simultaneously determine the input problem. Does it contain a quota inquiry intent? If so, then mark the quota inquiry intent. Otherwise ;
[0051] like And there exists at least one Then the input problem Problem types It is determined to be a multiple candidate type; if And it does not exist. Then the input problem Problem types It has been determined to be a single item type.
[0052] Furthermore, based on the aforementioned set of strongly constrained terms, target details are determined in the hierarchical cost knowledge graph, specifically including:
[0053] Based on the set of strong constraint words, the degree of context matching between each sub-node and the input question is calculated in the hierarchical cost knowledge graph, and the sub-node with the highest degree of matching is selected as the target sub-node.
[0054] The method for calculating the degree of context matching includes:
[0055] For any sub-node in the hierarchical cost knowledge graph Concatenate the project section name containing the sub-node with the sub-node path name to form the context text. Calculate the context matching score for this detail node. :
[0056] ;
[0057] ;
[0058] ;
[0059] ;
[0060] in, Indicates input problem initial keyword set Each keyword In the context of this detail The weighted sum of hits in the middle, Keywords The weight, This is an indicator function that takes the value 1 if the condition is true and 0 otherwise. This indicates that a question has been entered. The set of strongly constrained rules that are triggered Each rule Hit count in the context of this item. Representation rules The constraint words in The number of hits in the game; Indicates input problem Penalty items where strong constraint rules have been triggered but the specific context has not been hit at all; , , , Indicates configurable parameters;
[0061] The target details are as follows: The largest detail is denoted as In the target details Generate a set of candidate quota objects within the subtree range. :
[0062] ;
[0063] The hierarchical reasoning score Represented as:
[0064] ;
[0065] in, This indicates that points are awarded for hitting a subtree. Bonus points are awarded for accurate hits of parent-level details. Indicates the coefficient of the additional correction term. Additional modification items indicating the parent item name, Indicates candidate quota objects The parent item name, This indicates that it exists. This indicates that it is contained within a substring.
[0066] Furthermore, each business mapping rule Represented as:
[0067] ;
[0068] in, Indicates the use of matching input questions Triggering mode, This represents the set of target quota numbers, i.e., one or more target quota numbers that are returned first after the rule is hit. This indicates the reason for the recommendation output after the rule is met;
[0069] The hit score of the strong constraint rule Represented as:
[0070] ;
[0071] in, This indicates that the rule triggers the base score. Indicates candidate quota objects The number of strongly constrained terms hit in the path or quota name. This represents the number of rules that trigger strong constraints due to the input problem but whose candidate paths are not matched. and These represent the bonus coefficient and the penalty coefficient, respectively.
[0072] Weak general term penalty item Represented as:
[0073] ;
[0074] The rule-corrected score Represented as:
[0075] ;
[0076] in, This indicates the penalty weight for weak generic terms.
[0077] Furthermore, the comprehensive score Represented as:
[0078] ;
[0079] in, and These represent the text similarity dimension and keyword hit dimension in the overall score, respectively. Indicates the score for hierarchical reasoning. Indicates the score after rule correction;
[0080] Text similarity dimension Represented as:
[0081] ;
[0082] in, , Indicates the weighting coefficient. Indicates name similarity. Indicates path similarity. This indicates that it directly includes bonus points. This indicates that the identifier is directly included. This indicates an indicator function, which is used when the input question... The full text or the valid segments after removing the query terms are selected as candidate full texts. When the substring is completely contained ,otherwise ;
[0083] Keyword hit dimensions Represented as:
[0084] ;
[0085] ;
[0086] ;
[0087] in, to Indicates the weighting coefficient. Represents the initial set of keywords The hit rate of original domain terms in quota names. Represents the initial set of keywords The proportion of original domain terms in the path text;
[0088] When the business mapping rule is matched, it is based on the candidate quota object. Business mapping score The candidate quota objects are reordered from high to low, and the business mapping score is... Represented as:
[0089] ;
[0090] in, This indicates that points are awarded for matching business mapping rules. Indicates candidate quota objects The order of the quota number in the target quota number set. This indicates the deduction amount used to maintain the target quota order.
[0091] Furthermore, based on the problem type, outputting the corresponding candidate quota objects according to the sorting results also includes:
[0092] A risk warning rule is introduced, which is used to generate risk warning information in the output stage; the output stage also outputs the recommendation reasons and the explanation and adjustment content corresponding to the candidate quota object;
[0093] When the problem type is a single item, the sorted candidate quota objects will be used as the baseline candidate quota objects. Search for the benchmark candidate quota object in the initial candidate quota object set. Other candidate quota objects within the same parent sub-category or the same superior subtree form a set of optional items at the same level. :
[0094] ;
[0095] in, Indicates the benchmark candidate quota object Parent-level details, Indicates the benchmark candidate quota object The set of parent sub-nodes, This refers to any other candidate quota object in the initial candidate quota object set besides the benchmark candidate quota object. Indicates logical OR;
[0096] Candidate quota objects in the same-level selectable set are output according to the neighborhood hierarchy, from nearest to farthest, and duplicate quota numbers are removed; the neighborhood hierarchy Defined as:
[0097] .
[0098] Secondly, the present invention provides a tunnel quota matching and reasoning system based on a hierarchical cost knowledge graph, used to implement the tunnel quota matching and reasoning method based on a hierarchical cost knowledge graph as described in the first aspect, the system comprising:
[0099] The knowledge graph construction module is used to construct a hierarchical cost knowledge graph for highway tunnels and generate candidate quota objects based on the hierarchical cost knowledge graph.
[0100] The semantic parsing and matching module is used to obtain the engineering description input by the user as the input question, extract keywords and expand synonyms in the field of highway tunnel engineering to obtain an expanded keyword set, and divide the expanded keyword set into a strong constraint word set and a weak constraint word set; calculate the name similarity and path similarity between the input question and each candidate quota object; calculate the keyword hit ratio of the expanded keyword set in each candidate quota object; and identify the question type of the input question to determine the question type.
[0101] The hierarchical reasoning module is used to determine the target item in the hierarchical cost knowledge graph based on the set of strong constraint words, and generate an initial set of candidate quota objects within the subtree of the target item; for each candidate quota object in the initial set of candidate quota objects, the hierarchical reasoning score of the candidate quota object is calculated based on whether the candidate quota object is located within the subtree of the target item and whether the name of the parent item of the candidate quota object matches the domain words of the input question;
[0102] The rule correction module is used to introduce business mapping rules and strong constraint rules to correct the scoring items and output order of candidate quota objects. The business mapping rules are used to prioritize returning candidate quota objects from a pre-set set of target quota numbers when the input question hits the trigger mode. The strong constraint rules are used to calculate the strong constraint rule hit score of the candidate quota object based on the number of strong constraint words hit in the candidate quota object path or quota name and the number of rules that trigger strong constraints but are not hit in the candidate path, and to correct the score of the candidate quota object through a weak generic word penalty item, and calculate the rule correction score of the candidate quota object.
[0103] The comprehensive scoring and ranking module is used to integrate the name similarity, path similarity, keyword hit ratio, hierarchical reasoning score, and rule correction score of each candidate quota object to obtain a comprehensive score for the candidate quota object, and to rank the candidate quota objects from high to low according to the comprehensive score; when the business mapping rule is hit, the business mapping rule priority score is added to the comprehensive score and then re-ranked.
[0104] The output module is used to output the corresponding candidate quota objects according to the sorting results based on the problem type.
[0105] The beneficial effects of this invention are as follows: By constructing a hierarchical cost knowledge graph for highway tunnel engineering and generating candidate quota objects, this invention establishes a calculable data foundation for quota matching; by extracting keywords and dividing strong and weak constraints on the input question, and combining a matching mechanism based on name similarity, path similarity, and multi-field keyword hit ratio, the comprehensiveness of the matching between engineering description and candidate quotas is improved; simultaneously, by determining the target sub-items and generating an initial set of candidate quota objects, and by using hierarchical reasoning scores to introduce the path hierarchy structure of the knowledge graph into the matching process, this effectively distinguishes quotas with the same or similar names under different sub-items, avoiding... This approach addresses the errors in applying quotas across different locations and sub-items. By introducing business mapping rules and strong constraint rules to score and correct candidate quota objects, it can identify missing constraints and provide multiple candidate quotas when the input description is incomplete, avoiding quota selection bias caused by directly outputting a single result. Furthermore, by comprehensively ranking the scores and adding priority scores when the business mapping rule is hit, it achieves quantitative evaluation and dynamic adjustment of the matching results. Finally, it outputs the corresponding quota object according to the problem type, ensuring that the output strategy matches the completeness of the input description, thus improving the accuracy and reliability of quota matching in highway tunnel engineering. Attached Figure Description
[0106] Figure 1 A flowchart illustrating the tunnel quota matching and reasoning method based on a hierarchical cost knowledge graph provided for this embodiment;
[0107] Figure 2 This is a schematic diagram of the tunnel quota matching and reasoning system based on a hierarchical cost knowledge graph, provided as an example. Detailed Implementation
[0108] To improve the accuracy and reliability of quota matching in highway tunnel engineering, this invention, based on a hierarchical cost knowledge graph for highway tunnel engineering, transforms the matching problem of engineering descriptions into a hierarchical path location problem. Specifically, through keyword extraction and strong / weak constraint division, the engineering location information in the input problem is used as path constraints. Utilizing the hierarchical relationship of "item-section-detail-quota" in the knowledge graph, the contextual matching degree between each detail node and the input problem is calculated to determine the target detail, thus limiting the matching scope to the subtree of the target detail. This allows quotas with the same name under different details to be distinguished through parent paths. Furthermore, the matching degree between candidates and the input problem is measured at the text level through name similarity, path similarity, and multi-field keyword hit ratio. Hierarchical reasoning scores introduce the hierarchical relationship of the path into the scoring system, and rule-corrected scores incorporate business jargon and weak generic word suppression. Finally, these are integrated into a comprehensive score and ranked, allowing multiple relevant candidates to be presented simultaneously even when the input is incomplete. Thus, by constraining the matching path through the hierarchical structure of the knowledge graph, achieving candidate ranking through a multi-dimensional scoring system, and controlling the output strategy through problem type identification, a complete matching process from engineering description to quota sub-item is completed.
[0109] The technical solutions in this embodiment will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0110] Figure 1 A flowchart illustrating a tunnel cost quota matching reasoning method based on a hierarchical cost knowledge graph is shown. Please refer to [link / reference]. Figure 1 The method includes the following steps:
[0111] Step 1: Knowledge Graph Construction
[0112] Construct a hierarchical cost knowledge graph for highway tunnels, and generate candidate quota objects based on the hierarchical cost knowledge graph.
[0113] In practical applications, the project cost document template for highway tunnel engineering projects is used as the basic data source. This template can be obtained from the project cost document exported by Tongwang Cost Software. The project cost data is organized according to the project section and quota level organization method in the relevant template. The project cost data is organized into a graph structure that includes item nodes, project section nodes, detailed item nodes, quota nodes and explanatory adjustment nodes, and the inclusion relationship and explanatory adjustment relationship between nodes are stored.
[0114] The engineering hierarchical cost knowledge graph is stored in a graph database. The node types include item nodes, project section nodes, sub-item nodes, quota nodes, and description adjustment nodes. Among them, item nodes, project section nodes, sub-item nodes, and quota nodes are connected to quota nodes through inclusion relationships according to the hierarchical classification of "item-project section-sub-item-quota". Quota nodes and description adjustment nodes are connected through description adjustment relationships.
[0115] Based on the aforementioned hierarchical cost knowledge graph, the hierarchical path of "item-project section-detail item-quota" is read from the graph database, and the explanatory adjustment content corresponding to the parent detail item of the quota is read to generate candidate quota objects. Specifically, the complete path from the item node, project section node, several detail item nodes to the quota node is obtained through graph path query. At the same time, the corresponding explanatory adjustment node is read according to the parent detail item number of the candidate quota, so that the candidate quota object carries the quota name, hierarchical path and explanatory adjustment basis.
[0116] In this embodiment, the path of each candidate quota object is denoted as:
[0117] ;
[0118] in, Indicates the first One candidate quota recipient, Indicates the first One candidate quota object The path, Indicates the destination node. Indicates the node of the project. Indicates the first Layer detail nodes, , This indicates the total number of detail nodes. Indicates the quota node;
[0119] Each candidate quota object It should at least include the following: the category name, the section number of the project, the sub-category path, the quota number, the quota name, the quota unit, the parent sub-category number, the parent sub-category name, and the explanation / adjustment content; the path text is obtained by concatenating the category name, the section name of the project, and the sub-category path in hierarchical order. The candidate full text is obtained by splicing together the path text, quota number, quota name, and explanatory adjustment content. .
[0120] Step 2, Semantic parsing and matching:
[0121] The process involves obtaining a user-inputted engineering description as the input question, extracting keywords and expanding synonyms related to highway tunnel engineering, and dividing the expanded keyword set into a set of strongly constrained words and a set of weakly constrained words. The process also includes calculating the name similarity and path similarity between the input question and each candidate quota object; calculating the hit rate of each keyword in each candidate quota object; and identifying the question type to determine the question's type.
[0122] In this embodiment, the input problem is first addressed. Domain term extraction is performed on a pre-constructed thesaurus for highway tunnel engineering. Each domain term in ,like Appeared In the middle, then Included in the initial keyword set :
[0123] ;
[0124] in, The first in the domain vocabulary Domain-specific terms, This indicates that it is contained within a substring;
[0125] According to the thesaurus Expanding the set of keywords yields an expanded keyword set. :
[0126] ;
[0127] in, This represents a thesaurus mapping function. Domain words a collection of synonyms Indicates synonyms, This indicates that it exists. Represents the union;
[0128] The extended keyword set Divided into a set of strongly constrained words and weak constraint word set :
[0129] ;
[0130] ;
[0131] in, This indicates a strongly bound vocabulary. This indicates a weakly constrained vocabulary. Indicates intersection.
[0132] Among them, synonym expansion is used to improve the recall rate of matching. For example, when the question contains "slope", it can be expanded to "slope surface, slope protection, uphill slope"; when the question contains "sprayed concrete", it can be expanded to "sprayed concrete, sprayed concrete".
[0133] Strong constraint terms are used to determine the path or subtree where candidate quotas are located, such as tunnel entrance slope, central drainage ditch, tunnel portal wall, open tunnel, tunnel lining, and invert backfill; weak constraint terms only participate in candidate ranking, such as concrete, steel reinforcement, anchor bolts, backfill, transportation, and excavation. This division helps reduce the misleading influence of generalized keywords on quota ranking.
[0134] Then, the name similarity and path similarity between the input question and each candidate quota object are calculated. Name similarity and path similarity are calculated based on string sequence matching similarity, using the following formula:
[0135] ;
[0136] ;
[0137] in, Indicates input problem With candidate quota objects Name similarity between them Indicates input problem With candidate quota objects Path similarity between Representing text With text The sequence matching ratio, with a value range of . , Indicates candidate quota objects The name of the quota. Indicates candidate quota objects The path text.
[0138] Then, calculate the expanded keyword set separately. The keyword hit rate for each candidate quota object includes the following five items:
[0139] Hit rate of extended keyword set in quota name :
[0140] ;
[0141] Hit rate of extended keyword set in path text :
[0142] ;
[0143] Hit rate of expanded keyword set in candidate full text :
[0144] ;
[0145] The hit rate of the extended keyword set in the section name of the project :
[0146] ;
[0147] Hit rate of extended keyword set in detail path names :
[0148] ;
[0149] in, Represents an expanded set of keywords Any keyword in, Indicates candidate quota objects The name of the quota. Indicates candidate quota objects Path text, Indicates candidate quota objects The candidate full text, Indicates candidate quota objects The name of the section to which the project belongs. Indicates candidate quota objects Detailed path, Indicates the number of elements in the set. This indicates that it is contained within a substring. This indicates taking the maximum value; if If the value is empty, then the hit rate of each of the above keywords is 0.
[0150] Name similarity reflects the degree of direct correspondence between the project description and the quota name; path similarity reflects the degree of correspondence between the project description and the "item-project section-detail" path; keyword hit ratio in the quota name reflects the degree of direct matching between the project description and the quota name; keyword hit ratio in the path text reflects the degree of matching between the project description and the hierarchical path; keyword hit ratio in the candidate full text reflects the overall hit rate of keywords in the candidate full text composed of path, quota number, quota name, and explanatory adjustment content; keyword hit ratio in the name of the project section and keyword hit ratio in the name of the detail path are used to enhance the influence of the project section and detail path on the ranking results when the candidate quota names are similar.
[0151] Finally, the input questions are identified by question type, which includes single-option, multiple-candidate, subtree, and complementary types. Question type identification specifically includes:
[0152] The input problem The input question is matched one by one with preset matching question patterns, subtree question patterns, and multiple candidate question patterns. Matching question patterns identify question patterns requiring the output of matching quotas; subtree question patterns identify question patterns requiring the output of all quotas within a specific sub-category; and multiple candidate question patterns identify question patterns requiring the output of multiple candidates due to a lack of constraints. If a match is successful, the input question is... Problem types Determine the corresponding matching type, subtree type, or multiple candidate type;
[0153] If none of the above preset modes are matched, then proceed to constraint missing identification: for the first... Rules for identifying missing constraints ,in Indicates parent level details, This represents the set of necessary constraint terms used to distinguish candidates at the same level, and is used to determine the input problem. Did it hit? And it missed. If any of the constraint terms is present, then the constraint identifier is missing. Otherwise Simultaneously determine the input problem. Does it contain a quota inquiry intent? If so, then mark the quota inquiry intent. Otherwise ;
[0154] like And there exists at least one Then the input problem Problem types It is determined to be a multiple candidate type; if And it does not exist. Then the input problem Problem types It has been determined to be a single item type.
[0155] For example, when the input question is "What quota should be applied to the drainage ditch outside the tunnel?", the missing constraint identification rule can be set. It is a "drainage ditch outside the cave". Distinguishing terms include "mortar-grouted rubble masonry," "cast-in-place concrete," and "end-end." When the input question matches... But it missed. If any of the constraint words in the input question are present, the question is determined to be a multiple-candidate type. If the input question further contains distinguishing constraint words such as "mortar-grouted rubble masonry", it is determined to be a single-candidate type.
[0156] Through the above problem type identification mechanism, the subsequent output strategy can be matched with the completeness of the input problem: when the input description contains sufficient constraints, a single candidate quota object is output; when the input description can only locate the parent item but lacks distinguishing constraints, multiple candidate quota objects are output.
[0157] Step 3: Hierarchical Reasoning Score Calculation:
[0158] The target item is determined in the hierarchical cost knowledge graph based on the set of strong constraint words, and an initial set of candidate quota objects is generated within the subtree of the target item. For each candidate quota object in the initial set of candidate quota objects, the hierarchical reasoning score of the candidate quota object is calculated based on whether the candidate quota object is located within the subtree of the target item and whether the name of the parent item of the candidate quota object matches the domain words of the input question.
[0159] In this embodiment, the context matching degree between each sub-node and the input question is calculated in the hierarchical cost knowledge graph based on the set of strong constraint words, and the sub-node with the highest matching degree is selected as the target sub-node;
[0160] The method for calculating the degree of context matching includes:
[0161] For any sub-node in the hierarchical cost knowledge graph Concatenate the project section name containing the sub-node with the sub-node path name to form the context text. Calculate the context matching score for this detail node. :
[0162] ;
[0163] ;
[0164] ;
[0165] ;
[0166] in, Indicates input problem initial keyword set Each keyword In the context of this detail The weighted sum of hits in the middle, Keywords The weight, This is an indicator function that takes the value 1 if the condition is true and 0 otherwise. This indicates that a question has been entered. The set of strongly constrained rules that are triggered Each rule Hit count in the context of this item. Representation rules The constraint words in The number of hits in the game; Indicates input problem Penalty items where strong constraint rules have been triggered but the specific context has not been hit at all; , , , This indicates configurable parameters.
[0167] Specifically, context matching It integrates three factors: keyword hit weighting, strong constraint rule hit bonus, and strong constraint rule miss penalty. The keyword hit weighting part gives higher scores to subcategories containing more keywords from the input question; the strong constraint rule hit bonus part gives extra points to candidate subcategories whose triggered strong constraint rules are matched in the subcategorie context; the strong constraint rule miss penalty part deducts points for cases where the input question has triggered a strong constraint rule but the subcategorie context does not match the constraint words of that rule at all, thereby suppressing subcategories that do not meet the engineering part constraints.
[0168] The target details are as follows: The largest detail is denoted as In the target details Generate a set of candidate quota objects within the subtree range. :
[0169] .
[0170] That is, from all the candidate quota objects generated in step 1, select those whose paths contain the target details. The candidate quota objects are selected to form an initial candidate quota object set. All candidate quota objects in the initial candidate quota object set are located within the hierarchical subtree of the target item. Subsequent hierarchical reasoning scores, rule corrections, and comprehensive scores are all performed on the candidate quota objects in the initial candidate quota object set.
[0171] For each candidate quota object in the initial candidate quota object set, calculate its hierarchical reasoning score. :
[0172] ;
[0173] in, This indicates that points are awarded for hitting a subtree. Bonus points are awarded for accurate hits of parent-level details. Indicates the coefficient of the additional correction term. Additional modification items indicating the parent item name, Indicates candidate quota objects The parent item name, This indicates that it exists. This indicates that it is contained within a substring.
[0174] The hierarchical reasoning score consists of three components: the first is the subtree hit bonus, due to the set of candidate quota objects. The candidate quota object path in the document all contains the target details. This first item applies to all candidate quota objects in the set, used to strengthen the priority of candidate quota objects within the target sub-tree. The second item is a bonus for accurate matching of the parent sub-category; when the input question... The candidate quota objects are directly included. The parent category name, or the initial keyword set. This item takes effect when any keyword appears as a substring in the parent item name, granting extra points to candidate quota objects whose parent item names match the input question. The third item is an additional correction for the parent item name. It takes a small positive value when the parent item name contains structural qualifiers such as "I-beam" or "section steel," and a small negative value when the parent item name only reflects more generalized descriptions of sub-item materials or processes such as "steel plate," "channel steel," "grouting," "anchor rod," or "reinforcing bar." If no such cases exist, the value is 0. This correction item is used to further refine the scoring adjustment of candidate quota objects at the parent item name level.
[0175] Through the above hierarchical reasoning steps, the retrieval process of "first locating the project section or engineering part, then locating the specific sub-item" in manual quota application is simulated. This effectively introduces hierarchical structure information into the matching scoring system, avoiding cross-item matching based solely on general terms such as "concrete," "reinforcing steel," and "excavation." For example, for the input question "What quota should be applied to the masonry drainage ditch outside the tunnel?", the path of the drainage ditch outside the tunnel under the slope drainage of the tunnel entrance is first located by "outside the tunnel" and "drainage ditch." Then, "masonry" matches the parent sub-item or sub-item name, so that the candidate quotas of the path containing "masonry drainage ditch" receive a higher hierarchical reasoning score. Similarly, for the input question "What quota should be applied to the steel plate of the steel frame?", the candidate subtree is first limited by "steel frame," and then "steel plate" is combined to participate in the parent sub-item or candidate full-text matching, avoiding the generalization of "steel plate" to steel-related items under paths other than steel frame.
[0176] Step 4: Calculate the rule correction score:
[0177] Business mapping rules and strong constraint rules are introduced to correct the scoring items and output order of candidate quota objects. The business mapping rules are used to prioritize returning candidate quota objects from a pre-set set of target quota numbers when the input question hits the trigger mode. The strong constraint rules are used to calculate the strong constraint rule hit score of the candidate quota object based on the number of strong constraint words hit in the candidate quota object path or quota name and the number of rules that trigger strong constraints but are not hit in the candidate path. The rule correction score of the candidate quota object is calculated by correcting the score of the candidate quota object through a weak generic word penalty item.
[0178] In this embodiment, each business mapping rule Represented as:
[0179] ;
[0180] in, Indicates the use of matching input questions Triggering mode, This represents the set of target quota numbers, i.e., one or more target quota numbers that are returned first after the rule is hit. This indicates the reason for the recommendation output after the rule is met.
[0181] Business mapping rules are used to handle scenarios where a stable cost standard has been confirmed through manual verification, or where relying solely on text similarity and hierarchical reasoning is prone to bias. Business mapping rules are not mandatory for all inputs; rather, they are set for scenarios confirmed through manual verification that require fixed target quotas, correction of candidate ranking biases, or supplementary quota outputs.
[0182] The hit score of the strong constraint rule Represented as:
[0183] ;
[0184] in, This indicates that the rule triggers the base score. Indicates candidate quota objects The number of strongly constrained terms hit in the path or quota name. This represents the number of rules that trigger strong constraints due to the input problem but whose candidate paths are not matched. and These represent the bonus coefficient and the penalty coefficient, respectively.
[0185] Specifically, the score for hitting a strong constraint rule consists of three components: the rule trigger base score. The base score assigned when each strong constraint rule is triggered; bonus points. The weighting is applied based on the number of strong constraint terms actually matched in the candidate quota object path or quota name, so that candidate quotas that meet the engineering part constraints receive higher scores; penalty items. In cases where the input problem has triggered a strong constraint rule but the candidate path does not match the constraint word of that rule, a deduction is made to suppress candidate quotas that do not meet the constraints.
[0186] Weak general term penalty item Represented as:
[0187] ;
[0188] Specifically, when the input question only matches a weak generic word (such as "concrete", "reinforcing bar", "transportation", "excavation", etc.) and the candidate text matches that weak generic word, the weak generic word penalty term is set to 1; otherwise, it is 0. This penalty term is used to identify candidate matches driven solely by weak generic words, reducing the risk of weak generic words dominating candidate ranking.
[0189] The rule-corrected score Represented as:
[0190] ;
[0191] in, This indicates the penalty weight for weak generic terms.
[0192] Specifically, the rule correction score is obtained by subtracting the product of the weak generic term penalty and the penalty weight from the strong constraint rule hit score, so that the candidate quota that meets the strong constraint gets a higher rule correction score, while suppressing the candidate quota that only hits the weak generic term.
[0193] Furthermore, this embodiment introduces risk warning rules, which are used to generate risk warning information during the output stage. These risk warning rules are not directly incorporated into the comprehensive score, but are displayed as verification prompts during the recommendation result output stage. Examples include classifying surrounding rock levels and tunnel lengths, standardizing the load-bearing capacity of dump trucks, differentiating between slope and tunnel sections for shotcrete application, replacing steel mesh with wire mesh, and addressing the risk of omissions in the mixing, transportation, and grouting processes.
[0194] Through the above rule correction steps, in addition to text similarity and hierarchical positioning, the system further aligns with the actual cost itemization criteria. The business mapping rules can correct inconsistencies between natural language descriptions, graph paths, and cost compilation criteria based on manual verification and rule maintenance mechanisms. Strong constraint rule hit scores and weak generic term penalties prioritize candidate quotas that conform to engineering location constraints, while suppressing candidate quotas that do not conform to location constraints or are driven solely by generic terms, reducing the risk of incorrect cross-location quota application.
[0195] Step 5: Overall Scoring and Ranking:
[0196] For each candidate quota object, the name similarity, path similarity, keyword hit ratio, hierarchical reasoning score, and rule correction score of the candidate quota object are integrated to obtain the comprehensive score of the candidate quota object. The candidate quota objects are sorted from high to low according to the comprehensive score. When the business mapping rule is hit, the business mapping rule priority score is added to the comprehensive score and then the objects are re-sorted.
[0197] In this embodiment, the comprehensive score Represented as:
[0198] ;
[0199] in, and These represent the text similarity dimension and keyword hit dimension in the overall score, respectively. Indicates the score for hierarchical reasoning. This indicates the score for rule correction.
[0200] Text similarity dimension Represented as:
[0201] ;
[0202] in, , Indicates the weighting coefficient. Indicates name similarity. Indicates path similarity. This indicates that it directly includes bonus points. This indicates that the identifier is directly included. This indicates an indicator function, which is used when the input question... The full text or the valid segments after removing the query terms are selected as candidate full texts. When the substring is completely contained ,otherwise .
[0203] Keyword hit dimensions Represented as:
[0204] ;
[0205] ;
[0206] ;
[0207] in, to Indicates the weighting coefficient. Represents the initial set of keywords The hit rate of original domain terms in quota names. Represents the initial set of keywords The hit rate of original domain terms in the path text.
[0208] The keyword hit dimension comprehensively reflects the degree of matching between the input question and the candidate quota object from different granularities and different text fields by weighted summation of five hit ratios. The hit ratio in the quota name reflects the direct correspondence between the project description and the quota name; the hit ratio in the path text reflects the matching degree between the project description and the hierarchical path; the hit ratio in the candidate full text reflects the overall hit degree of the keyword in all searchable text; and the hit ratio in the project section name and the hit ratio in the sub-item path name provide additional matching signals at the project section level and sub-item level, respectively, making the candidate ranking more accurately reflect the matching relationship between the project description and the candidate quota object in the hierarchical structure.
[0209] In a preferred embodiment, the values of each weight coefficient are: name similarity weight. Path similarity weight The hit weight of the fixed quota name keywords Keyword hit weight Candidate full-text keyword hit weight Keyword hit weight of the project section Keyword hit weight for detailed path names The initial keyword hit weight in the quota name The hit weight of initial keywords in the path text The aforementioned weighting coefficients can be configured and adjusted based on the size of the quota database, the number of manually verified samples, and business preferences, and are not limited to the specific values mentioned above.
[0210] The comprehensive scoring system integrates information from three dimensions—text matching, hierarchical reasoning, and rule correction—into a single quantitative indicator. The text similarity dimension measures the degree of matching between the input question and candidate quota objects at the text level, including similarity at both the name and path levels, as well as direct inclusion bonuses. The hierarchical reasoning score introduces the hierarchical path structure of "item-project section-detail-quota" from the knowledge graph into the scoring system, constraining the matching results by hierarchical affiliation. The rule correction score adjusts the candidate ranking through strong constraint rules and weak generic word penalties, prioritizing candidate quotas that conform to the constraints of the engineering part. These three dimensions together constitute the entire source of the comprehensive score, realizing a complete scoring process from text matching to hierarchical positioning and then to rule correction.
[0211] According to the overall score The candidate quota objects are sorted from highest to lowest score, with higher scores indicating a higher degree of match between the candidate quota object and the input problem.
[0212] When the business mapping rule is matched, it is based on the candidate quota object. Business mapping score The candidate quota objects are reordered from high to low, and the business mapping score is... Represented as:
[0213] ;
[0214] in, This indicates that points are awarded for matching business mapping rules. Indicates candidate quota objects The order of the quota number in the target quota number set. This indicates the deduction amount used to maintain the target quota order.
[0215] Specifically, when a business mapping rule is matched, the candidate quota object that matches the business mapping rule receives an additional score on top of its overall score. At the same time, small deductions are applied in order of the target quota number set. This ensures that multiple candidate quota objects in the target quota number set are arranged in a preset order. Business mapping scoring prioritizes manually verified cost estimates in the ranking results, correcting inconsistencies between natural language descriptions, graphical paths, and cost estimates. When a business mapping rule is not matched, the overall score is used for direct ranking without re-sorting.
[0216] Step 6: Output candidate quota objects:
[0217] Based on the problem type, output the corresponding candidate quota objects according to the sorting results.
[0218] Specifically, when the problem type is a single-item type, the first candidate quota object with the highest comprehensive score in the output ranking results is used as the primary recommended quota. When the problem type is a multi-candidate type, multiple candidate quota objects with high comprehensive scores in the output ranking results are provided for cost estimators to manually review and select based on the actual situation. The triggering condition for multi-candidate types has been determined in step 2 through constraint missing identification, that is, the input problem can be located to a certain parent sub-item or engineering part, but lacks the material, construction, or process constraints required to distinguish candidates at the same level. In this case, outputting multiple candidate quota objects can avoid the quota selection bias caused by directly outputting a single result under insufficient information. When the problem type is a subtree type, all relevant candidate quota objects under a certain parent sub-item or engineering part are output for cost estimators to batch review and select after determining the specific part. When the problem type is a matching type, the primary quota and its matching quotas are output first according to the target quota number set hit by the business mapping rules in step 4. Matching types usually trigger business linkage rules such as mixing, transportation, and grouting, requiring the simultaneous output of the primary quota and the matching quotas that need to be considered simultaneously.
[0219] In this embodiment, risk warning rules are introduced to generate risk warning information during the output stage. These rules do not participate in the comprehensive scoring and ranking; instead, they are displayed as supplementary verification information during the output stage. For example, when the output results involve rock mass classification and tunnel length grading, the applicable conditions for these gradings are indicated; when dump truck transportation is involved, the uniform requirements for transport load specifications are indicated; when shotcrete is involved, the distinction between slope and tunnel body is indicated; when steel mesh is involved, the substitution relationship between steel mesh and wire mesh is indicated; and when mixing, transportation, grouting, and other processes are involved, the risk of omissions in matching components is indicated. These risk warning information allows cost estimators to be aware of potential verification items related to the current quota while selecting it, reducing the risk of omissions during subsequent manual checks.
[0220] When the question type is a single-item type, further filtering of the same-level optional items is performed to improve the completeness and verifiability of the results.
[0221] Specifically, the sorted candidate quota objects are used as the benchmark candidate quota objects. Search for the benchmark candidate quota object in the initial candidate quota object set. Other candidate quota objects within the same parent sub-category or the same superior subtree form a set of optional items at the same level. :
[0222] ;
[0223] in, Indicates the benchmark candidate quota object Parent-level details, Indicates the benchmark candidate quota object The set of parent sub-nodes, This refers to any other candidate quota object in the initial candidate quota object set besides the benchmark candidate quota object. This indicates a logical OR.
[0224] Specifically, candidate quota objects in the same layer of the optional set are under the same parent item or the same superior item sequence as the benchmark candidate quota object. They are optional quotas that are adjacent to the benchmark candidate quota object on the hierarchical path. They usually correspond to different material, structure or construction technology options under the same engineering part (e.g., "mortar-grouted rubble drainage ditch" and "cast-in-place concrete drainage ditch").
[0225] Candidate quota objects in the same-level selectable set are output according to the neighborhood hierarchy, from nearest to farthest, and duplicate quota numbers are removed; the neighborhood hierarchy Defined as:
[0226] .
[0227] Specifically, neighborhood hierarchy This indicates that the candidate quota object and the benchmark candidate quota object have the same parent item, belonging to the closest same-level relationship; neighborhood level. This indicates that the candidate quota object and the benchmark candidate quota object have the same parent item sequence but different parent items, belonging to the second closest same-level relationship; an infinite neighborhood level indicates that the candidate quota object and the benchmark candidate quota object do not have a same-level neighborhood relationship and are not included in the output.
[0228] Finally, the candidate quota objects at the same level are output in ascending order of neighborhood hierarchy, so that after determining the main recommended quota, users can easily view other selectable quotas under the same project part, which is convenient for cost engineers to make horizontal comparisons and reviews.
[0229] The output stage simultaneously outputs the reasons for recommendation and the corresponding explanations and adjustments for the candidate quota objects. The reasons for recommendation may include: which business mapping rule the candidate quota object is preferentially recommended because it matches, the composition of its scores in the comprehensive evaluation, and its matching status with the input question. The explanations and adjustments are a set of explanations and adjustments matching the parent item of the candidate quota object, including the explanation information and adjustment rules attached to the quota sub-item (such as surrounding rock grade classification, tunnel length coefficient adjustment, etc.), for cost estimators to directly refer to after selecting a quota without needing to consult the quota book separately.
[0230] The above output strategy ensures that the output method matches the completeness of the input problem: when the input description contains sufficient constraints, a single main recommended quota is directly output along with selectable quotas at the same level for review; when the input description lacks discriminative constraints, multiple candidate quotas are output for selection; and when the input description requires coordinated linkage, the main quota and supporting quotas are output. Thus, output results that are appropriate to the completeness of information can be provided under different input conditions.
[0231] In summary, this embodiment constructs a hierarchical cost knowledge graph for highway tunnel engineering and generates candidate quota objects, transforming the matching of engineering descriptions into a hierarchical path location problem. It determines the target sub-item by calculating the contextual matching degree between the sub-item node and the input question, thus limiting the range of candidate quotas to the subtree of the target sub-item. The hierarchical path effectively distinguishes quotas with the same name under different sub-items, avoiding errors in cross-part application. The candidate matching degree is measured at the text level through name similarity, path similarity, and multi-field keyword hit ratio. Hierarchical reasoning scores are combined to introduce path hierarchical constraints, and rules are applied to further refine the process. The revised scoring incorporates business-specific criteria and weak generic term suppression, and the multi-dimensional integrated scoring mechanism makes candidate ranking more accurate. Through problem type identification and constraint deficiency judgment mechanisms, multiple candidate quotas are output instead of a single result when the input is incomplete, avoiding quota selection bias under insufficient information conditions. Priority score superposition and reordering when business mapping rules are hit ensure that manually verified cost calibers are prioritized. Simultaneously, risk warning rules output risk warning information, recommendation reasons, and explanations of adjustments during the output stage, reducing the risk of missing matching quotas and insufficient verification. This embodiment effectively improves the accuracy and reliability of quota matching in highway tunnel engineering.
[0232] Based on the above technical solutions, this embodiment also proposes a tunnel quota matching and reasoning system based on a hierarchical cost knowledge graph, used to implement the tunnel quota matching and reasoning method based on a hierarchical cost knowledge graph as described in the embodiment. Please refer to [link to relevant documentation]. Figure 2 The system includes:
[0233] The knowledge graph construction module is used to construct a hierarchical cost knowledge graph for highway tunnels and generate candidate quota objects based on the hierarchical cost knowledge graph.
[0234] The semantic parsing and matching module is used to obtain the engineering description input by the user as the input question, extract keywords and expand synonyms in the field of highway tunnel engineering to obtain an expanded keyword set, and divide the expanded keyword set into a strong constraint word set and a weak constraint word set; calculate the name similarity and path similarity between the input question and each candidate quota object; calculate the keyword hit ratio of the expanded keyword set in each candidate quota object; and identify the question type of the input question to determine the question type.
[0235] The hierarchical reasoning module is used to determine the target item in the hierarchical cost knowledge graph based on the set of strong constraint words, and generate an initial set of candidate quota objects within the subtree of the target item; for each candidate quota object in the initial set of candidate quota objects, the hierarchical reasoning score of the candidate quota object is calculated based on whether the candidate quota object is located within the subtree of the target item and whether the name of the parent item of the candidate quota object matches the domain words of the input question;
[0236] The rule correction module is used to introduce business mapping rules and strong constraint rules to correct the scoring items and output order of candidate quota objects. The business mapping rules are used to prioritize returning candidate quota objects from a pre-set set of target quota numbers when the input question hits the trigger mode. The strong constraint rules are used to calculate the strong constraint rule hit score of the candidate quota object based on the number of strong constraint words hit in the candidate quota object path or quota name and the number of rules that trigger strong constraints but are not hit in the candidate path, and to correct the score of the candidate quota object through a weak generic word penalty item, and calculate the rule correction score of the candidate quota object.
[0237] The comprehensive scoring and ranking module is used to integrate the name similarity, path similarity, keyword hit ratio, hierarchical reasoning score, and rule correction score of each candidate quota object to obtain a comprehensive score for the candidate quota object, and to rank the candidate quota objects from high to low according to the comprehensive score; when the business mapping rule is hit, the business mapping rule priority score is added to the comprehensive score and then re-ranked.
[0238] The output module is used to output the corresponding candidate quota objects according to the sorting results based on the problem type.
[0239] It is understood that the tunnel quota matching reasoning system based on hierarchical cost knowledge graph described in this embodiment is a system used to implement the tunnel quota matching reasoning method based on hierarchical cost knowledge graph described in the embodiment. As the system disclosed in the embodiment corresponds to the method disclosed in the embodiment, the description is relatively simple. For relevant parts, please refer to the description of the method. It will not be repeated here.
Claims
1. A tunnel quota matching and reasoning method based on hierarchical cost knowledge graph, characterized in that, The method includes: Construct a hierarchical cost knowledge graph for highway tunnels, and generate candidate quota objects based on the hierarchical cost knowledge graph; The process involves obtaining a user-inputted engineering description as the input question, extracting keywords and expanding synonyms related to highway tunnel engineering, and dividing the expanded keyword set into a set of strongly constrained words and a set of weakly constrained words. The name similarity and path similarity between the input question and each candidate quota object are calculated. The hit rate of each keyword in each candidate quota object is calculated. Finally, the input question is identified to determine its question type. The target item is determined in the hierarchical cost knowledge graph based on the set of strong constraint words, and an initial set of candidate quota objects is generated within the subtree of the target item. For each candidate quota object in the initial set of candidate quota objects, the hierarchical reasoning score of the candidate quota object is calculated based on whether the candidate quota object is located within the subtree of the target item and whether the name of the parent item of the candidate quota object matches the domain words of the input question. Business mapping rules and strong constraint rules are introduced to correct the scoring items and output order of candidate quota objects. The business mapping rules are used to prioritize returning candidate quota objects from a pre-set set of target quota numbers when the input question hits the trigger mode. The strong constraint rules are used to calculate the strong constraint rule hit score of the candidate quota object based on the number of strong constraint words hit in the candidate quota object path or quota name and the number of rules that trigger strong constraints but are not hit in the candidate path. The rules are then used to correct the score of the candidate quota object through a weak generic word penalty item, and the rule correction score of the candidate quota object is calculated. For each candidate quota object, the name similarity, path similarity, keyword hit ratio, hierarchical reasoning score, and rule correction score of the candidate quota object are integrated to obtain the comprehensive score of the candidate quota object. The candidate quota objects are sorted from high to low according to the comprehensive score. When the business mapping rule is hit, the business mapping rule priority score is added to the comprehensive score and then the objects are re-sorted. Based on the problem type, output the corresponding candidate quota objects according to the sorting results.
2. The tunnel quota matching and reasoning method based on hierarchical cost knowledge graph as described in claim 1, characterized in that, The hierarchical cost knowledge graph is based on the cost document template for highway tunnel engineering projects. It organizes the engineering cost data into a graph structure that includes item nodes, project section nodes, detailed item nodes, quota nodes, and explanation adjustment nodes, and stores the inclusion relationship and explanation adjustment relationship between nodes. The path for each candidate quota object is denoted as: ; in, Indicates the first One candidate quota recipient, Indicates the first One candidate quota object The path, Indicates the destination node. Indicates the node of the project. Indicates the first Layer detail nodes, , This indicates the total number of detail nodes. Indicates the quota node; Each candidate quota object It should at least include the following: the category name, the section number of the project, the sub-category path, the quota number, the quota name, the quota unit, the parent sub-category number, the parent sub-category name, and the explanation / adjustment content; the path text is obtained by concatenating the category name, the section name of the project, and the sub-category path in hierarchical order. The candidate full text is obtained by splicing together the path text, quota number, quota name, and explanatory adjustment content. .
3. The tunnel quota matching and reasoning method based on hierarchical cost knowledge graph as described in claim 2, characterized in that, The input problem is subjected to keyword extraction and synonym expansion in the field of highway tunnel engineering to obtain an expanded keyword set. The expanded keyword set is then divided into a strongly constrained keyword set and a weakly constrained keyword set, specifically including: For the input problem Domain term extraction is performed on a pre-constructed thesaurus for highway tunnel engineering. Each domain term in ,like Appeared In the middle, then Included in the initial keyword set : ; in, The first in the domain vocabulary Domain-specific terms, This indicates that it is contained within a substring; According to the thesaurus Expanding the set of keywords yields an expanded keyword set. : ; in, This represents a thesaurus mapping function. Domain words a collection of synonyms Indicates synonyms, This indicates that it exists. Represents the union; The extended keyword set Divided into sets of strongly constrained words and weak constraint word set : ; ; in, This indicates a strongly bound vocabulary. This indicates a weakly constrained vocabulary. Indicates intersection.
4. The tunnel quota matching and reasoning method based on hierarchical cost knowledge graph as described in claim 3, characterized in that, The name similarity and path similarity are calculated based on string sequence matching similarity, and the calculation formula is as follows: ; ; in, Indicates input problem With candidate quota objects Name similarity between Indicates input problem With candidate quota objects Path similarity between Representing text With text The sequence matching ratio, with a value range of 100%. , Indicates candidate quota objects The name of the quota. Indicates candidate quota objects Path text; The keyword hit rate includes: Hit rate of extended keyword set in quota name : ; Hit rate of extended keyword set in path text : ; Hit rate of expanded keyword set in candidate full text : ; The hit rate of the extended keyword set in the section name of the project : ; Hit rate of extended keyword set in detail path names : ; in, Represents an expanded set of keywords Any keyword in Indicates candidate quota objects The name of the quota. Indicates candidate quota objects Path text, Indicates candidate quota objects The candidate full text, Indicates candidate quota objects The name of the section to which the project belongs. Indicates candidate quota objects Detailed path, Indicates the number of elements in the set. This indicates that it is contained within a substring. This indicates taking the maximum value; if If the value is empty, then the hit rate of each of the above keywords is 0.
5. The tunnel quota matching and reasoning method based on hierarchical cost knowledge graph according to claim 2, characterized in that, The question types include single-item type, multiple-candidate type, subtree type, and matching type. Question type identification for the input question specifically includes: The input problem The input question is matched one by one with the preset matching question patterns, subtree question patterns, and multiple candidate question patterns. If a match is successful, the input question is... Problem types Determine the corresponding matching type, subtree type, or multiple candidate type; If none of the above preset modes are matched, then proceed to constraint missing identification: for the first... Rules for identifying missing constraints ,in Indicates parent level details, This represents the set of necessary constraint terms used to distinguish candidates at the same level, and is used to determine the input problem. Did it hit? And it missed. If any of the constraint terms is present, then the constraint identifier is missing. Otherwise Simultaneously determine the input problem. Does it contain a quota inquiry intent? If so, then mark the quota inquiry intent. Otherwise ; like And there exists at least one Then the input problem Problem types It is determined to be a multiple candidate type; if And it does not exist. Then the input problem Problem types It has been determined to be a single item type.
6. The tunnel quota matching and reasoning method based on hierarchical cost knowledge graph according to claim 3, characterized in that, Based on the aforementioned set of strongly constrained terms, target details are determined in the hierarchical cost knowledge graph, specifically including: Based on the set of strong constraint words, the degree of context matching between each sub-node and the input question is calculated in the hierarchical cost knowledge graph, and the sub-node with the highest degree of matching is selected as the target sub-node. The method for calculating the degree of context matching includes: For any sub-node in the hierarchical cost knowledge graph Concatenate the project section name containing the sub-node with the sub-node path name to form the context text. Calculate the context matching score for this detail node. : ; ; ; ; in, Indicates input problem initial keyword set Each keyword In the context of this detail The weighted sum of hits in the middle, Keywords The weight, This is an indicator function that takes the value 1 if the condition is true and 0 otherwise. This indicates that a question has been entered. The set of strongly constrained rules that are triggered Each rule Hit count in the context of this item. Representation rules The constraint words in The number of hits in the game; Indicates input problem Penalty items where strong constraint rules have been triggered but the specific context has not been hit at all; , , , Indicates configurable parameters; The target details are as follows: The largest detail is denoted as In the target details Generate a set of candidate quota objects within the subtree range. : ; The hierarchical reasoning score Represented as: ; in, This indicates that points are awarded for hitting a subtree. Bonus points are awarded for accurate hits of parent-level details. Indicates the coefficient of the additional correction term. Additional modification items indicating the parent item name, Indicates candidate quota objects The parent item name, This indicates that it exists. This indicates that it is contained within a substring.
7. The tunnel quota matching and reasoning method based on hierarchical cost knowledge graph as described in claim 2, characterized in that, Each business mapping rule Represented as: ; in, Indicates the use of matching input questions Triggering mode, This represents the set of target quota numbers, i.e., one or more target quota numbers that are returned first after the rule is hit. This indicates the reason for the recommendation output after the rule is met; The hit score of the strong constraint rule Represented as: ; in, This indicates that the rule triggers the base score. Indicates candidate quota objects The number of strongly constrained terms hit in the path or quota name. This represents the number of rules that trigger strong constraints due to the input problem but whose candidate paths are not matched. and These represent the bonus coefficient and the penalty coefficient, respectively. Weak general term penalty item Represented as: ; The rule-corrected score Represented as: ; in, This indicates the penalty weight for weak generic terms.
8. The tunnel quota matching and reasoning method based on hierarchical cost knowledge graph as described in claim 4, characterized in that, The overall score Represented as: ; in, and These represent the text similarity dimension and keyword hit dimension in the overall score, respectively. Indicates the score for hierarchical reasoning. Indicates the score after rule correction; Text similarity dimension Represented as: ; in, , Indicates the weighting coefficient. Indicates name similarity. Indicates path similarity, This indicates that it directly includes bonus points. This indicates that the identifier is directly included. This indicates an indicator function, which is used when the input question... The full text or the valid segments after removing the query terms are selected as candidate full texts. When the substring is completely contained ,otherwise ; Keyword hit dimensions Represented as: ; ; ; in, to Indicates the weighting coefficient. Represents the initial set of keywords The hit rate of original domain terms in quota names. Represents the initial set of keywords The proportion of original domain terms in the path text; When the business mapping rule is matched, it is based on the candidate quota object. Business mapping score The candidate quota objects are reordered from high to low, and the business mapping score is... Represented as: ; in, This indicates that points are awarded for matching business mapping rules. Indicates candidate quota objects The order of the quota number in the target quota number set. This indicates the deduction amount used to maintain the target quota order.
9. The tunnel quota matching and reasoning method based on hierarchical cost knowledge graph according to claim 2, characterized in that, Based on the problem type, the corresponding candidate quota objects are output according to the sorting results, and the following are also included: A risk warning rule is introduced, which is used to generate risk warning information in the output stage; the output stage also outputs the recommendation reasons and the explanation and adjustment content corresponding to the candidate quota object; When the problem type is a single item, the sorted candidate quota objects will be used as the baseline candidate quota objects. Search for the benchmark candidate quota object in the initial candidate quota object set. Other candidate quota objects within the same parent sub-category or the same superior subtree form a set of optional items at the same level. : ; in, Indicates the benchmark candidate quota object Parent-level details, Indicates the benchmark candidate quota object The set of parent sub-nodes, This refers to any other candidate quota object in the initial candidate quota object set besides the benchmark candidate quota object. Indicates logical OR; Candidate quota objects in the same-level selectable set are output according to the neighborhood hierarchy, from nearest to farthest, and duplicate quota numbers are removed; the neighborhood hierarchy Defined as: 。 10. A tunnel quota matching and reasoning system based on a hierarchical cost knowledge graph, characterized in that, The system is used to implement the tunnel quota matching and reasoning method based on hierarchical cost knowledge graph as described in any one of claims 1 to 9, the system comprising: The knowledge graph construction module is used to construct a hierarchical cost knowledge graph for highway tunnels and generate candidate quota objects based on the hierarchical cost knowledge graph. The semantic parsing and matching module is used to obtain the engineering description input by the user as the input question, extract keywords and expand synonyms in the field of highway tunnel engineering to obtain an expanded keyword set, and divide the expanded keyword set into a strong constraint word set and a weak constraint word set; calculate the name similarity and path similarity between the input question and each candidate quota object; calculate the keyword hit ratio of the expanded keyword set in each candidate quota object; and identify the question type of the input question to determine the question type. The hierarchical reasoning module is used to determine the target item in the hierarchical cost knowledge graph based on the set of strong constraint words, and generate an initial set of candidate quota objects within the subtree of the target item; for each candidate quota object in the initial set of candidate quota objects, the hierarchical reasoning score of the candidate quota object is calculated based on whether the candidate quota object is located within the subtree of the target item and whether the name of the parent item of the candidate quota object matches the domain words of the input question; The rule correction module is used to introduce business mapping rules and strong constraint rules to correct the scoring items and output order of candidate quota objects. The business mapping rules are used to prioritize returning candidate quota objects from a pre-set set of target quota numbers when the input question hits the trigger mode. The strong constraint rules are used to calculate the strong constraint rule hit score of the candidate quota object based on the number of strong constraint words hit in the candidate quota object path or quota name and the number of rules that trigger strong constraints but are not hit in the candidate path, and to correct the score of the candidate quota object through a weak generic word penalty item, and calculate the rule correction score of the candidate quota object. The comprehensive scoring and ranking module is used to integrate the name similarity, path similarity, keyword hit ratio, hierarchical reasoning score, and rule correction score of each candidate quota object to obtain a comprehensive score for the candidate quota object, and to rank the candidate quota objects from high to low according to the comprehensive score; when the business mapping rule is hit, the business mapping rule priority score is added to the comprehensive score and then re-ranked. The output module is used to output the corresponding candidate quota objects according to the sorting results based on the problem type.
Citation Information
Patent Citations
Intelligent matching quota sub-purpose pricing method for hydropower construction engineering
CN116629949A
