A cross-region quota matching method, device and equipment and a storage medium
Patent Information
- Application Number
- CN202611090596.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-10-13
AI Technical Summary
然而,这类方案普遍面向单一地区构建,当需要迁移至新地区时,由于不同地区定额库的条目划分和描述方式存在差异,需重新训练模型或重新构建知识库,导致部署成本高、部署周期长
[0016]本申请提供的跨地区的定额匹配方法、装置、设备及存储介质,具有以下有益效果:(1)提高跨地区定额匹配迁移效率:通过构建跨地区的通用工作项集合以作为知识迁移的锚点,将源地区已验证的通用工作项与定额条目之间的映射关系转化为历史匹配知识,在新的目标地区匹配过程中作为增强上下文引入,实现历史匹配知识从源地区到目标地区的快速复用;(2)实现定额语义结构的自动发现:通过在章节组内进行多层次聚类,自动发现语义相似的定额簇,并为定额簇自动生成簇摘要,从而构建目标地区定额库的结构化语义索引,无需人工标注或预建知识图谱;(3)实现多源异质知识有效融合:将专家规则、历史匹配知识、簇摘要,按统一的知识上下文格式注入大语言模型的提示词prompt中,形成“语义匹配+规则约束”双重校验机制;(4)提升大规模定额匹配效率:采用渐进式两步匹配流水线,第一步进行章节级匹配,在大幅缩小候选集后,第二步在匹配章节内进行条目级精匹配,避免在大规模全库范围内进行高开销的逐条语义匹配。
Smart Images

Figure CN122903604A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, device and storage medium for cross-regional quota matching. Background Technology
[0002] In the field of construction cost estimation, quota matching refers to mapping the work items of a construction project to quota entries in the official quota library to determine the pricing basis for that work item in the target region. Quota libraries in different regions differ in their item classification and description methods.
[0003] Existing quota matching schemes mainly rely on deep learning or large language models to semantically match work items with quota entries. However, these schemes are generally designed for a single region. When migrating to a new region, the differences in the item classification and description methods of quota libraries in different regions require retraining the model or rebuilding the knowledge base, resulting in high deployment costs and long deployment cycles.
[0004] Therefore, how to achieve rapid migration of quota matching across regions has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a method, apparatus, device and storage medium for cross-regional quota matching, which can improve the efficiency and accuracy of large-scale quota matching.
[0006] To achieve the above objectives, this application provides a method for cross-regional quota matching, the method comprising: Obtain a quota library for the target region and a set of general work items for cross-regional use; wherein the quota library for the target region contains multiple quota items, and the set of general work items contains multiple general work items; First, quota items with the same chapter identifier in the quota library of the target region are divided into the same chapter group. Then, in each chapter group, quota items with similar semantics are clustered into the same quota cluster, and a corresponding cluster summary is generated for each quota cluster. A multi-source knowledge context is generated based on the cluster summary of each quota cluster, preset expert rules, and historical matching knowledge; wherein, the historical matching knowledge includes the matching relationship between general work items and quota entries in quota libraries of other regions; Each general work item in the general work item set is traversed sequentially, and the target chapter group matching the currently traversed general work item is first determined from the quota library of the target region using the multi-source knowledge context and large language model. Then, the target quota item matching the currently traversed general work item is determined within the target chapter group. Output the matching relationship between the general work items in the determined set of general work items and the quota entries in the quota library of the target region.
[0007] Optionally, the step of clustering semantically similar quota items into the same quota cluster within each chapter group, and generating a corresponding cluster summary for each quota cluster, includes: For a chapter group, the description text of each quota item in the chapter group is vectorized to obtain the corresponding quota text vector; Calculate the cosine distance between any two quota text vectors in this chapter group; Based on the calculated cosine distance, the average linking algorithm is used to cluster all quota items in the chapter group to obtain multiple quota clusters; By using a large language model, semantic analysis is performed on the descriptive text of all quota entries in each quota cluster to obtain a cluster summary of the common semantic information representing the corresponding quota cluster.
[0008] Optionally, the step of sequentially traversing each general work item in the set of general work items, and using the multi-source knowledge context and large language model to first determine the target chapter group matching the currently traversed general work item from the quota library of the target region, and then determining the target quota item matching the currently traversed general work item within the target chapter group, includes: Retrieve the name and description of the currently traversed general work item from the set of general work items; Based on the work item name and work item explanation, as well as the cluster summary corresponding to each chapter group, the target chapter group and its corresponding first confidence level that match the currently traversed general work item are determined from the quota library of the target region using the multi-source knowledge context and large language model; Based on the work item name and work item explanation, and the cluster summary of each quota cluster in the target chapter group, the target quota cluster matching the currently traversed general work item and the corresponding second confidence level are determined from the target chapter group using the multi-source knowledge context and large language model. Obtain the description text of each quota item in the target quota cluster from the quota library of the target region; Based on the work item name and work item explanation, as well as the description text of each quota item in the target quota cluster, the target quota item that matches the currently traversed general work item and its corresponding third confidence level are determined from the target quota cluster using the multi-source knowledge context and large language model.
[0009] Optionally, after sequentially traversing each general work item in the set of general work items, and using the multi-source knowledge context and large language model to first determine the target chapter group matching the currently traversed general work item from the quota library of the target region, and then determining the target quota item matching the currently traversed general work item within the target chapter group, the method further includes: Exclusion rules, enhancement rules, adjustment rules, and constraint rules are parsed from the preset expert rules; Obtain the matching relationship between the general work items in the determined set of general work items and the quota entries in the quota library of the target region, and the corresponding third confidence level; Determine whether each identified matching relationship satisfies the exclusion rule, and delete the matching relationships that satisfy the exclusion rule; Determine whether each identified matching relationship satisfies the enhancement rule, and increase the third confidence of the matching relationship that satisfies the enhancement rule; Determine whether each identified matching relationship meets the adjustment rules, and adjust the quota items in the matching relationships that meet the adjustment rules to more granular quota items; Determine whether each identified matching relationship satisfies the constraint rules, and delete or modify the matching relationships that do not satisfy the constraint rules.
[0010] Optionally, after outputting the matching relationship between the general work items in the determined set of general work items and the quota entries in the quota library of the target region, the method further includes: Obtain a matching relationship and calculate the engineering cost of the general work items in the target area based on the quota items in the matching relationship.
[0011] To achieve the above objectives, this application also provides a cross-regional quota matching device, the device comprising: The acquisition module is used to acquire a quota library for a target region and a set of general work items across regions; wherein, the quota library for the target region contains multiple quota items, and the set of general work items contains multiple general work items; The partitioning module is used to first partition quota items with the same chapter identifier in the quota library of the target region into the same chapter group, and then cluster semantically similar quota items into the same quota cluster in each chapter group, and generate a corresponding cluster summary for each quota cluster. The generation module is used to generate a multi-source knowledge context based on the cluster summary of each quota cluster, preset expert rules, and historical matching knowledge; wherein, the historical matching knowledge includes the matching relationship between general work items and quota entries in quota libraries of other regions; The processing module is used to sequentially traverse each general work item in the general work item set, and use the multi-source knowledge context and large language model to first determine the target chapter group that matches the currently traversed general work item from the quota library of the target region, and then determine the target quota item that matches the currently traversed general work item within the target chapter group. The output module is used to output the matching relationship between the general work items in the determined set of general work items and the quota entries in the quota library of the target region.
[0012] Optionally, the partitioning module is used for: For a chapter group, the description text of each quota item in the chapter group is vectorized to obtain the corresponding quota text vector; Calculate the cosine distance between any two quota text vectors in this chapter group; Based on the calculated cosine distance, the average linking algorithm is used to cluster all quota items in the chapter group to obtain multiple quota clusters; By using a large language model, semantic analysis is performed on the descriptive text of all quota entries in each quota cluster to obtain a cluster summary of the common semantic information representing the corresponding quota cluster.
[0013] Optionally, the device further includes: The cost estimation module is used to obtain a matching relationship and calculate the engineering cost of the general work items in the matching relationship in the target area based on the quota items in the matching relationship.
[0014] To achieve the above objectives, this application also provides a computer device, which specifically includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the cross-regional quota matching method described above.
[0015] To achieve the above objectives, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the cross-regional quota matching method described above.
[0016] The cross-regional quota matching method, apparatus, equipment and storage medium provided in this application have the following beneficial effects: (1) Improve the efficiency of cross-regional quota matching migration: By constructing a set of general work items across regions as the anchor point for knowledge migration, the mapping relationship between the verified general work items and quota items in the source region is transformed into historical matching knowledge, which is introduced as an enhanced context in the matching process of the new target region, so as to realize the rapid reuse of historical matching knowledge from the source region to the target region; (2) Realize the automatic discovery of quota semantic structure: By performing multi-level clustering within the chapter group, quota clusters with similar semantics are automatically discovered, and quota clusters are automatically generated. Clustered summaries are used to construct a structured semantic index for the target region quota library without manual annotation or pre-built knowledge graph; (3) Effective integration of multi-source heterogeneous knowledge is achieved: expert rules, historical matching knowledge, and cluster summaries are injected into the prompt words of the large language model in a unified knowledge context format to form a dual verification mechanism of "semantic matching + rule constraint"; (4) Improve the efficiency of large-scale quota matching: a progressive two-step matching pipeline is adopted. The first step is to perform chapter-level matching. After significantly narrowing the candidate set, the second step is to perform item-level fine matching within the matching chapter, avoiding high-overhead item-by-item semantic matching in the large-scale whole library. Attached Figure Description
[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a schematic diagram of an optional process for the cross-regional quota matching method provided in Embodiment 1; Figure 2 This is a schematic diagram of an optional component structure of the cross-regional quota matching device provided in Embodiment 2; Figure 3 This is a schematic diagram of an optional hardware structure for the computer device provided in Embodiment 3. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0019] Example 1 Existing quota matching schemes mainly fall into three categories: First, deep neural network models are trained using historical bill of quantities data, and semantic matching of the bill of quantities data is performed through word vector embedding and logistic regression to output quota matching results. Second, large language models combined with retrieval enhancement generation technology are used to retrieve relevant information from the project knowledge base and select corresponding quota items from the quota database through semantic matching. Third, pricing schemes based on large language models and retrieval enhancement generation are used, where quota categories are pre-defined through a classification model, and then semantic matching and scoring are performed by the large language model to output quota pricing results. However, existing schemes still have the following problems: First, they lack cross-regional migration capabilities, requiring the reconstruction of the knowledge base, retraining of the model, or re-labeling of data when facing new regions, resulting in high deployment costs and long deployment cycles. Second, the matching strategy lacks hierarchy, often adopting a one-step matching from work items directly to quota items, requiring the calculation of similarity item by item in a large-scale quota database, leading to low matching efficiency. Third, the knowledge sources are singular; existing methods mainly rely on document retrieval or knowledge graph reasoning, failing to effectively integrate multi-source knowledge such as expert experience rules and historical matching references to assist in matching decisions.
[0020] To address the aforementioned problems in existing solutions, embodiments of this application provide a cross-regional quota matching method, such as... Figure 1 As shown, the method specifically includes the following steps: Step S101: Obtain the quota library for the target region and the set of general work items across regions; wherein, the quota library for the target region contains multiple quota items, and the set of general work items contains multiple general work items.
[0021] The target region's quota library is derived from the official pricing standards issued by the target region (i.e., the region to be matched, such as a province), and contains multiple quota items. Each quota item includes at least the following fields: quota code (e.g., "1-1"), quota name (e.g., "manual earthwork excavation"), chapter identifier (e.g., "Chapter 1"), and descriptive text (e.g., "manual earthwork excavation, applicable to general soil, depth not exceeding 1.5 meters"). The chapter identifier categorizes each quota item into its corresponding chapter group, and the descriptive text details the construction process, material type, and project location of the quota item. The cross-regional general work item set is pre-built independently of any single region's quota system and is decoupled from the quota libraries of each region. Each general work item in this set is derived from the national standard list coding system, and each general work item includes at least the following fields: work item name (e.g., "manual loading"), work item explanation (e.g., "using manual labor to load earthwork onto transport vehicles"), and associated standard list code. The purpose of the universal work item set is to provide a unified semantic anchor for cross-regional matching. Regardless of which province the target region is, the same universal work item set is used for matching.
[0022] Step S102: First, divide quota items with the same chapter identifier in the quota library of the target region into the same chapter group. Then, in each chapter group, cluster semantically similar quota items into the same quota cluster, and generate a corresponding cluster summary for each quota cluster.
[0023] After obtaining the quota library for the target region, the first step is to read the chapter identifiers of each quota item and group all quota items with the same chapter identifier into the same chapter group. Through this step, the quota library is divided into multiple chapter groups, each corresponding to a chapter in the quota library. For example, all quota items under "Chapter 1, Earthwork Engineering" are grouped into one chapter group, and all quota items under "Chapter 2, Pile Foundation Engineering" are grouped into another chapter group. Then, within each chapter group, quota items with similar semantics are automatically clustered into the same quota cluster. Semantic similarity refers to the similarity of the descriptive text of the quota items in terms of construction object, process type, and material characteristics. For example, the three quota items "Manual Excavation of Earth," "Manual Excavation of Silt," and "Manual Excavation of Frozen Soil" in a certain chapter group have highly similar semantics and will be clustered into the same quota cluster; although "Mechanical Excavation of Earth" also belongs to earthwork engineering, its construction method (mechanical) is significantly different from manual excavation (manual) and will be clustered into different quota clusters. Through clustering, each chapter group is divided into one or more quota clusters, and each quota cluster contains multiple quota items with similar semantics. A corresponding cluster summary is generated for each quota cluster. The cluster summary is a natural language description text used to summarize the common semantic information of all quota items within the quota cluster. For example, for a quota cluster formed by clustering "manual earthwork excavation," "manual silt excavation," and "manual frozen soil excavation," its cluster summary could be "Relevant quotas for manual earthwork excavation, applicable to excavation operations under various soil conditions."
[0024] In this embodiment, by grouping entries in the quota database according to chapters and further subdividing them into quota clusters based on semantic similarity within each chapter, a hierarchical semantic index structure is constructed for the originally flat quota database. This provides coarse-to-fine positioning guidance for the subsequent matching process, which helps to narrow the matching search scope and improve matching efficiency. Simultaneously, cluster summaries of quota clusters are automatically generated, enabling automatic discovery and indexing of quota semantic structures without relying on manual annotation or manual knowledge graph construction, thus reducing labor costs and technical barriers.
[0025] Step S103: Generate a multi-source knowledge context based on the cluster summary of each quota cluster, preset expert rules, and historical matching knowledge; wherein, the historical matching knowledge includes the matching relationship between general work items and quota entries in quota libraries of other regions.
[0026] After constructing the quota clusters and generating cluster summaries, the process further involves acquiring pre-defined expert rules and historical matching knowledge. Pre-defined expert rules are matching constraint rules pre-defined by domain experts to impose hard constraints on the matching process. For example, "If the work item name contains 'labor,' then matching to the mechanical construction quota is prohibited." Historical matching knowledge refers to verified historical matching records in matched regions (i.e., other regions where quota matching work has been completed). Each piece of historical matching knowledge contains a pairing relationship between a general work item and a quota item in a region's quota library.
[0027] Then, the cluster summary, pre-defined expert rules, and historical matching knowledge of each quota cluster are organized into a multi-source knowledge context. This multi-source knowledge context provides unified background information for subsequent large language model matching. The multi-source knowledge context systematically integrates three different types of knowledge: semantic grouping information provided by the cluster summary, hard constraints provided by the pre-defined expert rules, and verified pairing references provided by historical matching knowledge. This ensures that subsequent large language models, when performing matching, not only have semantic understanding as a foundation and rule constraints as a baseline, but also historical cases as a reference, effectively reducing potential misjudgments from pure semantic matching and improving the accuracy and reliability of matching. Furthermore, the introduction of historical matching knowledge allows for the reuse of verified matching experience from other regions, eliminating the need to accumulate matching knowledge from scratch in the target region and further reducing deployment costs in new regions.
[0028] Step S104: Iterate through each general work item in the general work item set in sequence, and use the multi-source knowledge context and large language model to first determine the target chapter group that matches the currently traversed general work item from the quota library of the target region, and then determine the target quota item that matches the currently traversed general work item within the target chapter group.
[0029] In this embodiment, each general work item in the set of general work items is traversed sequentially, and a matching operation is performed for each general work item. For the currently traversed general work item, a prompt word for the Large Language Model (LLM) is constructed based on the multi-source knowledge context. This prompt word contains the semantic scope of each chapter group reflected by the cluster summary, preset expert rules, and historical matching knowledge. Then, the prompt word is input into the Large Language Model, and a two-level matching mechanism is used to determine the target quota item that matches the general work item. Specifically, in the first-level matching, the Large Language Model, based on the multi-source knowledge context in the prompt word, first determines the target chapter group that matches the general work item from the quota library of the target region, thereby narrowing the matching scope from the entire quota library to a single chapter group. In the second-level matching, the Large Language Model performs quota item-level matching within the determined target chapter group, determining the target quota item that matches the general work item from the multiple quota items contained in the chapter group.
[0030] The two-stage matching strategy described above, which involves first locating the chapter group and then locating the quota item, transforms the problem of matching the entire quota library item by item into a local matching problem constrained by the chapter group. This significantly narrows the search range for item-level matching, reduces the number of quota items that need to be processed in a single matching while ensuring matching accuracy. This reduces the computational overhead of the large language model and improves matching efficiency.
[0031] Step S105: Output the matching relationship between the general work items in the determined set of general work items and the quota entries in the quota library of the target region.
[0032] After matching all general work items, the matching relationship between each general work item and its corresponding target quota item is output. Specifically, for each general work item in the set of general work items, the work item name and work item explanation of the general work item are associated with the quota code, quota name, and description text of the finally matched target quota item, forming a matching relationship record. All matching relationship records together constitute the complete matching result for the target region. The output format can be a structured data format, such as a table or JSON file. Each matching relationship record must contain at least the general work item identifier, the target quota item code, and the corresponding quota name. This matching relationship can be directly used for subsequent engineering cost calculations, that is, based on the official unit price corresponding to the matched quota item and the engineering quantity corresponding to the general work item, the engineering cost of the general work item in the target region can be calculated. At the same time, this matching relationship can also be reviewed and manually confirmed by the user so as to make fine adjustments when necessary and ensure the reliability of the matching results.
[0033] The cross-regional quota matching method formed by steps S101 to S105 above has the following beneficial effects: (1) Improve the efficiency of cross-regional quota matching migration: By constructing a set of general work items across regions as the anchor point for knowledge migration, the mapping relationship between the verified general work items and quota items in the source region is transformed into historical matching knowledge, which is introduced as an enhanced context in the matching process of the new target region, so as to realize the rapid reuse of historical matching knowledge from the source region to the target region; (2) Realize the automatic discovery of quota semantic structure: By performing multi-level clustering within the chapter group, the quota clusters with similar semantics are automatically discovered, and the quota clusters are automatically... Generate cluster summaries to construct a structured semantic index for the target region quota library without manual annotation or pre-built knowledge graph; (3) Achieve effective fusion of multi-source heterogeneous knowledge: inject expert rules, historical matching knowledge, and cluster summaries into the prompt words of the large language model in a unified knowledge context format to form a dual verification mechanism of "semantic matching + rule constraint"; (4) Improve the efficiency of large-scale quota matching: adopt a progressive two-step matching pipeline. The first step is to perform chapter-level matching. After significantly narrowing the candidate set, the second step is to perform item-level fine matching within the matching chapter, avoiding high-overhead item-by-item semantic matching in the large-scale full library.
[0034] Furthermore, step S102, which involves clustering semantically similar quota items into the same quota cluster within each chapter group and generating a corresponding cluster summary for each quota cluster, specifically includes: Step A1: For a chapter group, vectorize the description text of each quota item in the chapter group to obtain the corresponding quota text vector; For example, the description text of each quota item can be vectorized into a corresponding quota text vector using TF-IDF (Term Frequency–Inverse Document Frequency).
[0035] Step A2: Calculate the cosine distance between any two quota text vectors in this chapter group; The preferred formula for calculating the cosine distance is as follows: ; in, Let p be the quota text vector. Let q be the quota text vector.
[0036] Step A3: Based on the calculated cosine distance, cluster all quota items in the chapter group using the average linking algorithm to obtain multiple quota clusters; It should be noted that there is no need to preset the number of clusters during the formation of quota clusters; the granularity of the clusters is adaptively adjusted through a preset distance threshold. Initially, each quota item is treated as a quota cluster. Then, multiple rounds of merging are performed on each quota cluster according to the following formula until the cosine distance between any two merged quota clusters is greater than the preset distance threshold: ; Among them, A and B are two quota clusters to be merged; Let i be the quota text vector of quota item i in quota cluster A. Let be the quota text vector of quota item j in quota cluster B; The preset distance threshold, and ; Preferred, The value is 0.38.
[0037] Step A4: Use a large language model to perform semantic analysis on the description text of all quota items in each quota cluster to obtain a cluster summary of the common semantic information representing the corresponding quota cluster; The cluster summary encapsulates key semantic information such as the core construction objects, process types, and material characteristics of the corresponding quota cluster, serving as a semantic index for the quota cluster in subsequent matching operations.
[0038] In this embodiment, for any chapter group, the descriptive text of each quota item within that chapter group is first vectorized, converting the text into numerical quota text vectors. Then, the cosine distance between any two quota text vectors within the chapter group is calculated; a smaller cosine distance indicates greater semantic similarity between the two quota items. Next, based on the calculated cosine distance, the average linking algorithm is used to perform hierarchical agglomerative clustering of all quota items within the chapter group: initially, each quota item forms its own cluster; then, the two clusters with the smallest average cosine distance are iteratively merged until the average cosine distance between any two clusters is greater than or equal to a preset distance threshold, at which point merging stops, resulting in multiple quota clusters, each composed of semantically similar quota items. Finally, a large language model is used to perform semantic analysis on the descriptive text of all quota items within each quota cluster, generating a natural language cluster summary to summarize the common semantic information of each quota item within that cluster.
[0039] This embodiment achieves automatic discovery and indexing of quota semantic structure. It can automatically generate structured semantic grouping information for the quota database of the target region without relying on manual annotation or pre-built knowledge graph, thus reducing manual costs and technical barriers. At the same time, through the combination of cosine distance and average linking algorithm, the clustering granularity can be flexibly controlled by preset threshold to adapt to the semantic distribution characteristics of quota databases in different regions.
[0040] Furthermore, step S104, which involves sequentially traversing each general work item in the general work item set and using the multi-source knowledge context and large language model to first determine the target chapter group matching the currently traversed general work item from the quota library of the target region, and then determining the target quota item matching the currently traversed general work item within the target chapter group, specifically includes: Step B1: Obtain the work item name and work item description of the currently traversed general work item from the general work item set; Step B2: Based on the work item name and work item explanation, and the cluster summary corresponding to each chapter group, use the multi-source knowledge context and large language model to determine the target chapter group and the corresponding first confidence level that match the currently traversed general work item from the quota library of the target region; Step B3: Based on the work item name and work item explanation, and the cluster summary of each quota cluster in the target chapter group, use the multi-source knowledge context and large language model to determine the target quota cluster that matches the currently traversed general work item and the corresponding second confidence level from the target chapter group; Step B4: Obtain the description text of each quota item in the target quota cluster from the quota library of the target region; Step B5: Based on the work item name and work item explanation, and the description text of each quota item in the target quota cluster, use the multi-source knowledge context and large language model to determine the target quota item that matches the currently traversed general work item and its corresponding third confidence level from the target quota cluster.
[0041] In this embodiment, during the matching phase, the work item name and explanation of the currently traversed general work item are first obtained from the general work item set as the input basis for matching. Subsequently, a three-stage localization mechanism is executed. The first stage is chapter group localization: the work item name, work item explanation, and the cluster summary corresponding to each chapter group are input into the large language model. Based on the semantic range reflected by the cluster summaries within each chapter group, the large language model determines the target chapter group that best matches the general work item from multiple chapter groups in the target region and outputs the corresponding first confidence score, which is used to quantify the reliability of the matching result. The second stage is quota cluster localization: within the determined target chapter group, the work item name, work item explanation, and the cluster summary of each quota cluster within the chapter group are input into the large language model. Based on the semantic information of each cluster summary, the large language model determines the target quota cluster that best matches the general work item from multiple quota clusters in the target chapter group and outputs the corresponding second confidence score, which is used to quantify the reliability of the cluster localization result. The third stage is quota item localization: obtain the description text of each quota item in the target quota cluster from the quota library of the target region, and then input the work item name, work item explanation and description text of each quota item in the target quota cluster into the big language model. The big language model compares the semantic consistency of each quota item one by one, determines the target quota item that best matches the general work item, and outputs the corresponding third confidence score.
[0042] The beneficial effects of the above three-stage positioning mechanism are as follows: by refining the matching path step by step from chapter groups to quota clusters and then to quota items, the matching scope is gradually narrowed from the entire quota library to the target quota cluster, and finally the item-level fine matching is completed within the cluster. Compared with the method of directly matching from the entire library, the number of candidate items that need to be processed in a single matching is greatly reduced. At the same time, each stage outputs the corresponding confidence level, providing users with a quantifiable evaluation indicator of matching quality, which is convenient for subsequent review and adjustment.
[0043] Furthermore, after step S104, the method further includes: Step C1: Parse the exclusion rules, enhancement rules, adjustment rules, and constraint rules from the preset expert rules; Among them, exclusion rules are used to detect and delete obviously erroneous matching results such as inconsistent material types and conflicting engineering parts; enhancement rules are used to increase the confidence of highly reliable matching results such as default quota items that match completely; adjustment rules are used to adjust quota items in the matching results to more detailed quota items; and constraint rules are used to ensure that the matching results comply with industry standards and policy requirements.
[0044] Step C2: Obtain the matching relationship and corresponding third confidence level between the general work items in the determined set of general work items and the quota entries in the quota library of the target region.
[0045] Step C3: Determine whether each identified matching relationship satisfies the exclusion rule, and delete the matching relationships that satisfy the exclusion rule; Among them, the exclusion rules are used to detect and delete obviously erroneous matching results. For example, when the material type used in the matched quota item (such as ready-mixed concrete) is inconsistent with the material type required by the general work item (such as on-site mixed concrete), or when the engineering part corresponding to the matched quota item (such as foundation engineering) conflicts with the actual engineering part of the general work item (such as main structure), the matching relationship is determined to not meet the exclusion rules and is deleted.
[0046] Step C4: Determine whether each identified matching relationship satisfies the enhancement rule, and increase the third confidence of the matching relationship that satisfies the enhancement rule; Among them, the enhancement rules are used to detect and strengthen highly reliable matching results. For example, when there is a completely matching default quota sub-item correspondence between a general work item and a quota item, the matching relationship is determined to meet the enhancement rules and the confidence of the matching relationship is increased so that it is presented first in the output results.
[0047] Step C5: Determine whether each of the identified matching relationships meets the adjustment rules, and adjust the quota items in the matching relationships that meet the adjustment rules to more detailed quota items; Among them, the adjustment rules are used to refine the matching results. For example, when the specific thickness or strength level involved in a general work item is not reflected in the matched quota item, but there are more specific quota items in the quota library that are subdivided by thickness or strength level, the quota item in the matching relationship is replaced with a more subdivided quota item according to the adjustment rules.
[0048] Step C6: Determine whether each of the determined matching relationships satisfies the constraint rules, and delete or modify the matching relationships that do not satisfy the constraint rules; Among them, the constraint rules are used to ensure that the matching results comply with industry standards and policy requirements. For example, when the construction technology on which the matching result is based has been eliminated by the current standards or the engineering parameters used exceed the policy's allowable range, the matching relationship is determined to not meet the constraint rules and is deleted or corrected.
[0049] In this embodiment, by filtering out obvious erroneous results that may be generated by pure semantic matching through exclusion rules, strengthening highly reliable results through enhancement rules, refining the matching granularity through adjusting rules, and ensuring compliance through constraint rules, a dual guarantee mechanism of "semantic matching + rule verification" is formed, which improves the accuracy and reliability of the final matching results.
[0050] Furthermore, after step S105, the method further includes: Obtain a matching relationship and calculate the engineering cost of the general work items in the target area based on the quota items in the matching relationship.
[0051] In this embodiment, for a complete matching result for the target region, the current general work item and its corresponding target quota item are obtained from the general work item set. Then, the official unit price information corresponding to the quota item is obtained, and the unit price is multiplied by the engineering quantity corresponding to the work item in the target region to obtain the engineering cost of the general work item in the target region. By performing the above calculation on each matching relationship, the engineering cost of each general work item in the target region is finally output. This step applies the quota matching result to the actual cost calculation, providing users with directly usable engineering cost data.
[0052] This embodiment has the following beneficial effects: (1) It enables rapid migration of quota matching capabilities across regions: Using a unified general work item across regions as a semantic anchor, the quota matching knowledge accumulated in the source region can be rapidly migrated to the new region through historical mapping reuse and knowledge enhancement retrieval, which significantly reduces the deployment cost in the new region; (2) It automatically discovers the quota semantic structure: No need to pre-build a knowledge graph. Using TF-IDF hierarchical clustering to automatically analyze the inherent semantic grouping of the new regional quota database, and combining it with LLM to automatically generate cluster summaries, the semantic index of the quota can be constructed without manual annotation or pre-built knowledge graph; (3) Systematic fusion of multi-source knowledge: For the first time, the systematic fusion of three types of heterogeneous knowledge, namely "cluster summary (semantic grouping information) + expert rules (domain constraints) + historical mapping (experience reference)," was realized in the quota matching scenario. LLM is subject to rule constraints while performing semantic matching, which solves the problem of misjudgment caused by the lack of domain rule guidance in the pure LLM scheme, as well as the problem that the pure rule scheme cannot handle semantic ambiguity; (4) Progressive matching strategy: The progressive matching pipeline from coarse positioning at the chapter level to fine screening at the item level transforms the full database search of the large-scale quota database into a local search constrained by chapters.
[0053] Example 2 This application provides a cross-regional quota matching device, such as... Figure 2 As shown, the device specifically includes the following components: The acquisition module 201 is used to acquire a quota library for a target region and a set of general work items across regions; wherein, the quota library for the target region contains multiple quota items, and the set of general work items contains multiple general work items; The segmentation module 202 is used to first segment quota items with the same chapter identifier in the quota library of the target region into the same chapter group, and then cluster semantically similar quota items into the same quota cluster in each chapter group, and generate a corresponding cluster summary for each quota cluster. The generation module 203 is used to generate a multi-source knowledge context based on the cluster summary of each quota cluster, preset expert rules, and historical matching knowledge; wherein, the historical matching knowledge includes the matching relationship between general work items and quota entries in quota libraries of other regions; The processing module 204 is used to sequentially traverse each general work item in the general work item set, and use the multi-source knowledge context and large language model to first determine the target chapter group that matches the currently traversed general work item from the quota library of the target region, and then determine the target quota item that matches the currently traversed general work item within the target chapter group. The output module 205 is used to output the matching relationship between the general work items in the determined set of general work items and the quota items in the quota library of the target region.
[0054] Specifically, module 202 is used for: For a chapter group, the description text of each quota item in the chapter group is vectorized to obtain the corresponding quota text vector; Calculate the cosine distance between any two quota text vectors in this chapter group; Based on the calculated cosine distance, the average linking algorithm is used to cluster all quota items in the chapter group to obtain multiple quota clusters; By using a large language model, semantic analysis is performed on the descriptive text of all quota entries in each quota cluster to obtain a cluster summary of the common semantic information representing the corresponding quota cluster.
[0055] Furthermore, processing module 204 is specifically used for: Retrieve the name and description of the currently traversed general work item from the set of general work items; Based on the work item name and work item explanation, as well as the cluster summary corresponding to each chapter group, the target chapter group and its corresponding first confidence level that match the currently traversed general work item are determined from the quota library of the target region using the multi-source knowledge context and large language model; Based on the work item name and work item explanation, and the cluster summary of each quota cluster in the target chapter group, the target quota cluster matching the currently traversed general work item and the corresponding second confidence level are determined from the target chapter group using the multi-source knowledge context and large language model. Obtain the description text of each quota item in the target quota cluster from the quota library of the target region; Based on the work item name and work item explanation, as well as the description text of each quota item in the target quota cluster, the target quota item that matches the currently traversed general work item and its corresponding third confidence level are determined from the target quota cluster using the multi-source knowledge context and large language model.
[0056] Furthermore, the processing module 204 is also used for: Exclusion rules, enhancement rules, adjustment rules, and constraint rules are parsed from the preset expert rules; Obtain the matching relationship between the general work items in the determined set of general work items and the quota entries in the quota library of the target region, and the corresponding third confidence level; Determine whether each identified matching relationship satisfies the exclusion rule, and delete the matching relationships that satisfy the exclusion rule; Determine whether each identified matching relationship satisfies the enhancement rule, and increase the third confidence of the matching relationship that satisfies the enhancement rule; Determine whether each identified matching relationship meets the adjustment rules, and adjust the quota items in the matching relationships that meet the adjustment rules to more granular quota items; Determine whether each identified matching relationship satisfies the constraint rules, and delete or modify the matching relationships that do not satisfy the constraint rules.
[0057] Furthermore, the device also includes: The cost estimation module is used to obtain a matching relationship and calculate the engineering cost of the general work items in the matching relationship in the target area based on the quota items in the matching relationship.
[0058] Example 3 This embodiment also provides a computer device, such as a smartphone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server, or cabinet server (including a standalone server or a server cluster composed of multiple servers), etc., capable of executing programs. Figure 3 As shown, the computer device 30 in this embodiment includes, but is not limited to, a memory 301 and a processor 302 that are communicatively connected to each other via a system bus. It should be noted that... Figure 3 Only a computer device 30 with components 301-302 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0059] In this embodiment, the memory 301 (i.e., the readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 301 may be an internal storage unit of the computer device 30, such as the hard disk or memory of the computer device 30. In other embodiments, the memory 301 may also be an external storage device of the computer device 30, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 30. Of course, the memory 301 may include both the internal storage unit and the external storage device of the computer device 30. In this embodiment, the memory 301 is typically used to store the operating system and various application software installed on the computer device 30. In addition, the memory 301 may also be used to temporarily store various types of data that have been output or will be output.
[0060] In some embodiments, processor 302 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. This processor 302 is typically used to control the overall operation of the computer device 30.
[0061] Specifically, in this embodiment, the processor 302 is used to execute the program of the cross-regional quota matching method stored in the memory 301. When the program of the cross-regional quota matching method is executed, it performs the following steps: Obtain a quota library for the target region and a set of general work items for cross-regional use; wherein the quota library for the target region contains multiple quota items, and the set of general work items contains multiple general work items; First, quota items with the same chapter identifier in the quota library of the target region are divided into the same chapter group. Then, in each chapter group, quota items with similar semantics are clustered into the same quota cluster, and a corresponding cluster summary is generated for each quota cluster. A multi-source knowledge context is generated based on the cluster summary of each quota cluster, preset expert rules, and historical matching knowledge; wherein, the historical matching knowledge includes the matching relationship between general work items and quota entries in quota libraries of other regions; Each general work item in the general work item set is traversed sequentially, and the target chapter group matching the currently traversed general work item is first determined from the quota library of the target region using the multi-source knowledge context and large language model. Then, the target quota item matching the currently traversed general work item is determined within the target chapter group. Output the matching relationship between the general work items in the determined set of general work items and the quota entries in the quota library of the target region.
[0062] For a detailed description of the above method steps, please refer to Example 1. This example will not be repeated here.
[0063] Example 4 This embodiment also provides a computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, app store, etc., which stores a computer program. When the computer program is executed by a processor, it implements the following method steps: Obtain a quota library for the target region and a set of general work items for cross-regional use; wherein the quota library for the target region contains multiple quota items, and the set of general work items contains multiple general work items; First, quota items with the same chapter identifier in the quota library of the target region are divided into the same chapter group. Then, in each chapter group, quota items with similar semantics are clustered into the same quota cluster, and a corresponding cluster summary is generated for each quota cluster. A multi-source knowledge context is generated based on the cluster summary of each quota cluster, preset expert rules, and historical matching knowledge; wherein, the historical matching knowledge includes the matching relationship between general work items and quota entries in quota libraries of other regions; Each general work item in the general work item set is traversed sequentially, and the target chapter group matching the currently traversed general work item is first determined from the quota library of the target region using the multi-source knowledge context and large language model. Then, the target quota item matching the currently traversed general work item is determined within the target chapter group. Output the matching relationship between the general work items in the determined set of general work items and the quota entries in the quota library of the target region.
[0064] For a detailed description of the above method steps, please refer to the first embodiment. This embodiment will not repeat the details here.
[0065] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0066] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0067] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0068] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for cross-regional quota matching, characterized in that, The method includes: Obtain a quota library for the target region and a set of general work items for cross-regional use; wherein the quota library for the target region contains multiple quota items, and the set of general work items contains multiple general work items; First, quota items with the same chapter identifier in the quota library of the target region are divided into the same chapter group. Then, in each chapter group, quota items with similar semantics are clustered into the same quota cluster, and a corresponding cluster summary is generated for each quota cluster. A multi-source knowledge context is generated based on the cluster summary of each quota cluster, preset expert rules, and historical matching knowledge; wherein, the historical matching knowledge includes the matching relationship between general work items and quota entries in quota libraries of other regions; Each general work item in the general work item set is traversed sequentially, and the target chapter group matching the currently traversed general work item is first determined from the quota library of the target region using the multi-source knowledge context and large language model. Then, the target quota item matching the currently traversed general work item is determined within the target chapter group. Output the matching relationship between the general work items in the determined set of general work items and the quota entries in the quota library of the target region.
2. The cross-regional quota matching method according to claim 1, characterized in that, The process of clustering semantically similar quota items into the same quota cluster within each chapter group and generating a corresponding cluster summary for each quota cluster includes: For a chapter group, the description text of each quota item in the chapter group is vectorized to obtain the corresponding quota text vector; Calculate the cosine distance between any two quota text vectors in this chapter group; Based on the calculated cosine distance, the average linking algorithm is used to cluster all quota items in the chapter group to obtain multiple quota clusters; By using a large language model, semantic analysis is performed on the descriptive text of all quota entries in each quota cluster to obtain a cluster summary of the common semantic information representing the corresponding quota cluster.
3. The cross-regional quota matching method according to claim 2, characterized in that, The process of sequentially traversing each general work item in the set of general work items, and using the multi-source knowledge context and large language model to first determine the target chapter group matching the currently traversed general work item from the quota library of the target region, and then determining the target quota item matching the currently traversed general work item within the target chapter group, includes: Retrieve the name and description of the currently traversed general work item from the set of general work items; Based on the work item name and work item explanation, as well as the cluster summary corresponding to each chapter group, the target chapter group and its corresponding first confidence level that match the currently traversed general work item are determined from the quota library of the target region using the multi-source knowledge context and large language model; Based on the work item name and work item explanation, and the cluster summary of each quota cluster in the target chapter group, the target quota cluster matching the currently traversed general work item and the corresponding second confidence level are determined from the target chapter group using the multi-source knowledge context and large language model. Obtain the description text of each quota item in the target quota cluster from the quota library of the target region; Based on the work item name and work item explanation, as well as the description text of each quota item in the target quota cluster, the target quota item that matches the currently traversed general work item and its corresponding third confidence level are determined from the target quota cluster using the multi-source knowledge context and large language model.
4. The cross-regional quota matching method according to claim 3, characterized in that, After sequentially traversing each general work item in the set of general work items, and using the multi-source knowledge context and large language model to first determine the target chapter group matching the currently traversed general work item from the quota library of the target region, and then determining the target quota item matching the currently traversed general work item within the target chapter group, the method further includes: Exclusion rules, enhancement rules, adjustment rules, and constraint rules are parsed from the preset expert rules; Obtain the matching relationship between the general work items in the determined set of general work items and the quota entries in the quota library of the target region, and the corresponding third confidence level; Determine whether each identified matching relationship satisfies the exclusion rule, and delete the matching relationships that satisfy the exclusion rule; Determine whether each identified matching relationship satisfies the enhancement rule, and increase the third confidence level of the matching relationship that satisfies the enhancement rule; Determine whether each identified matching relationship meets the adjustment rules, and adjust the quota items in the matching relationships that meet the adjustment rules to more granular quota items; Determine whether each identified matching relationship satisfies the constraint rules, and delete or modify the matching relationships that do not satisfy the constraint rules.
5. The cross-regional quota matching method according to any one of claims 1 to 4, characterized in that, After determining the matching relationship between the general work items in the set of general work items and the quota entries in the quota library of the target region, the method further includes: Obtain a matching relationship and calculate the engineering cost of the general work items in the target area based on the quota items in the matching relationship.
6. A cross-regional quota matching device, characterized in that, The device includes: The acquisition module is used to acquire a quota library for a target region and a set of general work items across regions; wherein, the quota library for the target region contains multiple quota items, and the set of general work items contains multiple general work items; The partitioning module is used to first partition quota items with the same chapter identifier in the quota library of the target region into the same chapter group, and then cluster semantically similar quota items into the same quota cluster in each chapter group, and generate a corresponding cluster summary for each quota cluster. The generation module is used to generate a multi-source knowledge context based on the cluster summary of each quota cluster, preset expert rules, and historical matching knowledge; wherein, the historical matching knowledge includes the matching relationship between general work items and quota entries in quota libraries of other regions; The processing module is used to sequentially traverse each general work item in the general work item set, and use the multi-source knowledge context and large language model to first determine the target chapter group that matches the currently traversed general work item from the quota library of the target region, and then determine the target quota item that matches the currently traversed general work item within the target chapter group. The output module is used to output the matching relationship between the general work items in the determined set of general work items and the quota entries in the quota library of the target region.
7. The cross-regional quota matching device according to claim 6, characterized in that, The partitioning module is used for: For a chapter group, the description text of each quota item in the chapter group is vectorized to obtain the corresponding quota text vector; Calculate the cosine distance between any two quota text vectors in this chapter group; Based on the calculated cosine distance, the average linking algorithm is used to cluster all quota items in the chapter group to obtain multiple quota clusters; By using a large language model, semantic analysis is performed on the descriptive text of all quota entries in each quota cluster to obtain a cluster summary of the common semantic information representing the corresponding quota cluster.
8. The cross-regional quota matching device according to claim 6 or 7, characterized in that, The device further includes: The cost estimation module is used to obtain a matching relationship and calculate the engineering cost of the general work items in the matching relationship in the target area based on the quota items in the matching relationship.
9. A computer device, the computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the method according to any one of claims 1 to 5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.