An engineering procedure specialty classification method, system, device, and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CSCEC DIGITAL TECH CO LTD
- Filing Date
- 2026-03-20
- Publication Date
- 2026-08-07
AI Technical Summary
例如,同样的工序描述在“地下室筏板”与“屋面梁”中可能分属地下与地上钢筋工程,但现有模型难以区分
1,本发明通过从项目名称中抽取公共上下文并与原子化工序片段拼接,为工序片段重建了准确的领域语境,有效解决了因上下文缺失导致的跨专业误判问题。实验表明,该方法使跨专业误分类率降低57%,显著提升了分类准确性,尤其适用于复合工程量清单中多专业语义混杂的场景。
Smart Images

Figure FT_1 
Figure FT_2
Abstract
Description
Technical Field
[0001] This invention belongs to the field of natural language processing and engineering cost estimation technology, specifically relating to a method, system, equipment, and medium for classifying engineering procedures. Background Technology
[0002] Currently, in construction project cost management, the bill of quantities is the core basis. Its entries consist of project names and characteristics, describing specific construction content. As project complexity increases, bill of quantities entries are becoming increasingly complex, often including multiple procedures belonging to different professional categories (such as plastering and waterproofing). The traditional method of relying on manual experience for professional division suffers from inefficiency, poor consistency, and susceptibility to errors, making it difficult to meet the needs of modern project management.
[0003] In recent years, natural language processing (NLP) technology has been introduced into engineering text classification to improve automation levels. However, general text classification methods face three major challenges in engineering scenarios: First, process descriptions are highly context-dependent; the same operation (such as "rebar tying") may belong to different specialties in different construction locations, and isolated text classification is prone to misclassification. Second, professional categories exhibit a severe long-tail distribution, with abundant samples in the head category and scarce samples in the long-tail category, resulting in extremely low recall rates for the latter. Third, the professional terminology system is complex and has blurred boundaries, making it difficult for general word vectors to accurately capture the deep relationship between terms and professional categories.
[0004] Specifically, contextual dependence necessitates that models combine key information such as project name and construction location to accurately determine the professional affiliation of a work process. Existing methods often ignore this context, classifying based solely on fragmented text, thus generating numerous misclassifications in cross-disciplinary scenarios. For example, the same work process description might belong to underground and above-ground reinforcement engineering in "basement raft slab" and "roof beam," respectively, but existing models struggle to distinguish between them.
[0005] Meanwhile, the long-tail distribution and terminology complexity further exacerbate the difficulty of classification. Mainstream deep learning models are insufficient in recognizing long-tail categories such as "karst treatment" due to imbalanced training data; and professional terms such as "cement-based penetrating crystalline waterproof coating" are strongly associated with "waterproofing projects" but are often misclassified into irrelevant categories such as "decoration projects" due to the limitations of word vector models.
[0006] In existing technical solutions, rule matching methods rely on manually maintained keyword dictionaries and cannot handle semantic variations; end-to-end deep semantic models (such as BERT) directly classify complete bills of quantities, but due to the mixture of professional semantics, the accuracy is difficult to exceed 85%. Therefore, there is an urgent need for a technical solution that performs professional classification at the atomic process granularity to solve the classification inaccuracy problem caused by the mixture of multi-professional semantics in composite bills of quantities, and to provide accurate professional anchors for the intelligent parsing of bills of quantities. Summary of the Invention
[0007] In view of this, the present invention provides a method, system, equipment and medium for professional classification of engineering processes, which can perform professional classification at the atomic process granularity, and provide accurate professional anchor points for the intelligent analysis of bill of quantities.
[0008] To achieve the objectives of this invention, the following technical solutions are provided.
[0009] A method for classifying engineering procedures by specialty, including: Obtain the atomization process segment and the original project name; Extract common context from the original project name, which includes the engineering part but excludes specific materials, thickness and process parameters; The atomized process fragments are concatenated with a common context to form a context-enhanced input. The context-enhanced input is predicted through a professional classification model to output a professional category; wherein the professional classification model is trained using a focus loss function and uses a category-specific dynamic threshold determined based on the F1 score of the validation set during inference.
[0010] The extraction of common context from the original project name includes a rule engine-based extraction method: matching the project name from a preset engineering part keyword library, prioritizing the longest matching item, and removing descriptions containing specific values and units, as well as text that semantically overlaps with the atomic process fragment.
[0011] The extraction of common context from the original project name includes an extraction method based on a large language model: constructing a structured prompt word input large language model, obtaining the engineering parts of its output, and automatically reverting to the rule engine method if the model output does not conform to the preset format.
[0012] When the professional classification model makes predictions, it uses a category-specific dynamic threshold, which specifically includes: for each professional category, iterating through the confidence thresholds on the validation set and selecting the threshold that maximizes the F1 value as the optimal threshold for that category; during inference, when the predicted probability is greater than or equal to the optimal threshold, the category is output.
[0013] The professional classification model uses a focus loss function during training, where the class weights are inversely proportional to the square root of the number of training samples, and the focus parameter is set to 2.0.
[0014] The present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the engineering process professional classification method of the present invention.
[0015] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the engineering process professional classification method described in the present invention.
[0016] Beneficial effects 1. This invention extracts common context from project names and concatenates it with atomic process fragments, reconstructing accurate domain context for process fragments and effectively solving the problem of cross-disciplinary misclassification caused by missing context. Experiments show that this method reduces the cross-disciplinary misclassification rate by 57% and significantly improves classification accuracy, especially suitable for scenarios with mixed semantics across multiple disciplines in composite bills of quantities.
[0017] 2. This invention employs a category-specific dynamic threshold based on the F1 score of the validation set, adaptively determining the optimal confidence threshold for each professional category, significantly improving the recall capability of long-tail professional categories. Experimental data shows that the recall rate for long-tail categories such as doors and windows, demolition and renovation, etc., increased from 75.1% to 92.2%, achieving accurate classification covering all professional categories and overcoming the shortcomings of traditional models in terms of low recognition rate for long-tail categories.
[0018] 3. This invention supports a dual-mode approach of large language model and rule engine for common context extraction, balancing semantic generalization ability and system robustness. The large language model approach achieves 18% higher accuracy than the rule engine approach, and is particularly adept at handling non-standard terminology such as mapping "basement" to "basement," further enhancing the method's adaptability and reliability.
[0019] 4. This invention employs a focus loss function to train a specialized classification model. By reducing the weight of easily classified head categories, the model focuses on difficult-to-classify long-tail samples, effectively alleviating the class imbalance problem in the training data. Combined with a dynamic threshold strategy, the overall classification accuracy reaches 99.3%, providing a highly reliable professional anchor for the intelligent parsing of bills of quantities, and significantly improving the automation level and consistency of engineering cost management. Attached Figure Description
[0020] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.
[0021] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0022] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0023] The terminology definitions involved in this invention are as follows: Atomized process fragment: A text unit representing a single construction action, without complex descriptions (such as "10mm thick polymer cement mortar plastering").
[0024] Public context: Common fields in the project name that are strongly related to the professional classification, including engineering parts (such as "basement", "roof") and structural types (such as "basement", "side wall").
[0025] Long-tail professional categories: Professional categories that appear less frequently in the training data (less than 100 samples).
[0026] Large Language Model (LMM): A pre-trained language model with no fewer than 7 billion parameters.
[0027] This invention provides a method for classifying engineering procedures. It extracts common fields such as engineering parts from project names through common context extraction, reconstructing the domain context for procedure fragments. It employs a category-specific dynamic threshold based on the F1 score of the validation set, significantly improving the recall capability of long-tail professional categories. It supports dual-mode implementation of context extraction using a large language model and a rule engine, balancing semantic generalization and system robustness. The method flow of this invention is as follows: Figure 1 As shown, it includes the following steps: Step 1. Obtain the atomization process segment and the original project name; Step 2. Extract the common context from the original project name. The common context includes the engineering part, but excludes specific materials, thickness and process parameters. Step 3. Concatenate the atomized process fragment with the common context to form a context-enhanced input; Step 4. The context-enhanced input is used to output the professional category through the professional classification model; wherein the professional classification model is trained using the focus loss function and uses a category-specific dynamic threshold determined based on the F1 value of the validation set during inference.
[0028] Specifically, the atomized process fragment is provided by an external, independent process decomposition system and is a text description of a single construction action; the original project name is directly taken from the "Project Name" field of the bill of quantities.
[0029] The common context extraction step aims to eliminate noisy information (such as specific materials, thickness, and processes) in project names, retaining only common classification criteria, including the implementation methods of the rule engine and large language model: The common context extraction based on the rule engine is as follows: (1) Extraction of engineering parts: Match project names from a pre-defined keyword database for engineering parts. The keyword database includes standard engineering part terms such as "basement," "underground," "basement," "roof," "exterior wall," and "bathroom." The longest matching term is prioritized during matching (e.g., "basement" takes precedence over "underground").
[0030] (2) Noise filtering: Remove descriptions containing specific values and units in the project name (such as "1.5mm", "20mm thick", "C30"), as well as text that is semantically redundant with the atomization process segment (such as removing "brush paint" from the name if the process segment is "brush paint").
[0031] (3) Output: Generate a public context containing the engineering parts, leaving missing fields blank.
[0032] The common context extraction based on the Large Language Model (LLM) is as follows: (1) Construction of prompt words: Construct structured prompts and explicitly require the model to: Output only the project part type; Details such as filter materials, thickness, and construction process; Use standardized terminology (e.g., "basement" is mapped to "basement"); The output format is a standardized data structure.
[0033] (2) Model reasoning: Input the project name and prompt words into the large language model to obtain its generated common context.
[0034] (3) Robustness Guarantee: If the model output does not conform to the preset format or contains invalid content, it will automatically fall back to the rule engine mode to ensure system reliability.
[0035] The input construction in context enhancement involves concatenating a common context with atomic process fragments according to a preset template to form categorized input text. The template structure is: "[Location] Engineering Location [Process] Atomic Process Fragment", where missing engineering location or structure type fields are left blank. For example: Input: Location = "Basement ceiling", Procedure = "Apply 1.2mm waterproof coating" Output: "[Location] Basement ceiling slab [Process] Apply 1.2mm waterproof coating" Step 4, the professional classification step, also includes long-tail optimization, the specific implementation process of which is as follows: Step 41, Semantic Encoding: The context-enhanced input text is fed into a pre-trained language model (such as BERT-base-Chinese, chinese-roberta-wwm-ext, etc.) to obtain its semantic vector representation.
[0036] Step 42, Professional Category Prediction: The semantic vectors are mapped to the predicted probabilities of each professional category through a classification layer. The professional category system covers the main professional fields in construction engineering, including but not limited to waterproofing engineering, decoration engineering, concrete engineering, masonry engineering, formwork engineering, and steel reinforcement engineering.
[0037] Step 43, Dynamic Threshold Classification: Step 431: Construct the validation set Independent validation sets are divided from the training data, containing labeled samples from each professional category.
[0038] Step 432: Calculate the optimal threshold for each category For each professional category c: (1) Traverse the confidence threshold τ c (e.g., from 0.1 to 0.95, with a step size of 0.01); (2) Compute each τ on the validation set. c The corresponding F1 value; (3) Choose τ that maximizes the F1 value c * The optimal threshold for category c.
[0039] Step 433: Apply the optimal threshold during inference. The predicted probability p of the input sample c : If p c ≥τ c If so, then the output category is c; Otherwise, reject the category.
[0040] Step 44, Model Training Optimization: When training the specialized classification model, the Focal Loss function is used. This loss function reduces the weight of easily classified samples (head classes), making the model training process more focused on difficult-to-classify samples (long-tail classes). The class weights are inversely proportional to the square root of the number of training samples, and the focal parameter is set to 2.0.
[0041] The method of this invention was validated on a test set of 15,000 real engineering lists. The results showed that: common context extraction reduced the cross-professional misclassification rate by 57% (e.g., "thermal insulated rigid waterproof roof; 40mm thick C20 fine stone concrete plastering, with φ4@100 bidirectional steel mesh" was no longer misclassified as "waterproofing project"); the large language model scheme had an 18% higher accuracy in context extraction than the rule engine (especially good at handling non-standard expressions such as "basement" → "basement"); the long-tail optimization strategy increased the recall rate of long-tail professional categories such as doors and windows, demolition and renovation from 75.1% to 92.2%; and the overall classification accuracy reached 99.3%.
[0042] This invention also provides a process specialty classification system for bill of quantities, used to implement the method of this invention. This system achieves context-aware, atomic process specialty classification through modular design, effectively solving the problem of semantic confusion among multiple specialties in composite bills of quantities. It includes the following functional modules: The common context extraction module is responsible for extracting common fields strongly related to the professional classification from the original project name, i.e., the common context, including engineering parts (such as "basement" and "roof"), and excluding noisy information such as specific materials, thickness, and process parameters. The module supports two implementation methods: Rule-based engine approach: This approach uses a pre-defined keyword library for engineering parts to perform longest-lasting matching, while filtering numerical values and units using regular expressions and removing text that semantically overlaps with atomic process fragments. This method is lightweight, efficient, and suitable for standardized expressions.
[0043] Large Language Model (LLM) approach: This approach guides the large language model to extract engineering parts using structured prompts and requires the output of standardized terms (e.g., mapping "basement" to "basement"). If the model output does not conform to the expected format, the system automatically reverts to the rule engine approach to ensure robustness.
[0044] The module takes the original project name as input and outputs structured data containing the project parts (which may be missing).
[0045] The context enhancement module receives atomized process fragments (provided by an external process splitting system) and public context output by the public context extraction module. It then concatenates these two fragments according to a preset template to form context-enhanced input text. A typical template is: "[Location] Engineering Location [Process] Atomized Process Fragment". If the engineering location is missing, the corresponding field is left blank. For example, inputting "Location = Basement Roof Slab, Process = Apply 1.2mm Waterproof Coating" will generate "[Location] Basement Roof Slab [Process] Apply 1.2mm Waterproof Coating". The module outputs enhanced text that can be directly used for classification.
[0046] The specialty classification module takes context-enhanced text as input and outputs the predicted specialty category and confidence score using a trained specialty classification model. The module includes: Semantic encoder: Uses a pre-trained language model (such as BERT-base-Chinese) to convert input text into semantic vectors.
[0047] Classification layer: The semantic vector is mapped to the probability distribution of each professional category. The professional category system covers the main areas of construction engineering (such as waterproofing engineering, decoration engineering, etc.).
[0048] Dynamic threshold classifier: During inference, an optimal threshold τ, pre-computed based on the F1 score on the validation set, is applied to each class. c When the predicted probability p c ≥τ c Output the category if it is active, otherwise reject it, thereby improving the recall rate of long-tail categories.
[0049] Model training mechanism: During training, the Focal Loss function is used to focus on long-tail samples that are difficult to classify, thereby alleviating the class imbalance problem.
[0050] The system workflow is as follows: The atomized process fragment is input into the common context extraction module along with the original project name, which extracts the common context from it; The common context and atomic process fragments are fed into the context enhancement module and concatenated to generate context enhancement input; The context-enhanced input is passed to the professional classification module, which ultimately outputs the professional category and confidence level to which the process segment belongs.
[0051] The three modules work in sequence to form an automated processing pipeline from the original bill of quantities items to the professional categories of the work processes. This system can be integrated into engineering cost management software, providing precise professional anchors for the intelligent analysis of the bill of quantities.
[0052] This application also provides an electronic device. Figure 2The structure of an electronic device provided in an embodiment of the present invention is illustrated. For example, the electronic device 2 may include a processor 21, a memory 22, and a transmission device 23. The processor 21 is used to execute the engineering process professional classification method mentioned in the above embodiments. The processor and the memory can be connected via a bus or other means, taking a bus connection as an example. The transmission device can be connected to the processor and the memory via wired or wireless means. The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the engineering process professional classification method in the embodiments of this application. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory, thereby implementing the engineering process professional classification method in the above method embodiments. The memory may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created by the processor, etc. In addition, the memory may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, and this remote memory may be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The one or more modules stored in the memory, when executed by the processor, perform the engineering process professional classification method in the embodiments.
[0053] In another aspect, this application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus described in the above embodiments; or it may be a standalone computer-readable storage medium not assembled into the device. The computer-readable storage medium may be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, floppy disk, hard disk, removable storage disk, CD-ROM, or any other form of storage medium known in the art. The computer-readable storage medium stores one or more programs, which are used by one or more processors to execute the engineering process professional classification method described in this application.
[0054] This invention includes, but is not limited to, the above embodiments. Any equivalent substitutions or partial improvements made under the spirit and principles of this invention shall be considered within the scope of protection of this invention.
Claims
1. A method for classifying engineering procedures by specialty, characterized in that, include: Obtain the atomization process segment and the original project name; Extract common context from the original project name, which includes the engineering part but excludes specific materials, thickness and process parameters; The atomized process fragments are concatenated with a common context to form a context-enhanced input. The context-enhanced input is predicted through a professional classification model to output a professional category; wherein the professional classification model is trained using a focus loss function and uses a category-specific dynamic threshold determined based on the F1 score of the validation set during inference.
2. The method for classifying engineering procedures according to claim 1, characterized in that, The extraction of common context from the original project name includes a rule engine-based extraction method: matching the project name from a preset engineering part keyword library, prioritizing the longest matching item, and removing descriptions containing specific values and units, as well as text that semantically overlaps with the atomic process fragment.
3. The method for classifying engineering procedures according to claim 1, characterized in that, The extraction of common context from the original project name includes an extraction method based on a large language model: constructing a structured prompt word input large language model, obtaining the engineering parts of its output, and automatically reverting to the rule engine method if the model output does not conform to the preset format.
4. The method for classifying engineering procedures according to claim 1, characterized in that, When the professional classification model makes predictions, it uses a category-specific dynamic threshold, which specifically includes: for each professional category, iterating through the confidence thresholds on the validation set and selecting the threshold that maximizes the F1 value as the optimal threshold for that category; during inference, when the predicted probability is greater than or equal to the optimal threshold, the category is output.
5. The method for classifying engineering procedures according to any one of claims 1-4, characterized in that, The specialized classification model employs a focus loss function during training, where the class weights are inversely proportional to the square root of the number of training samples, and the focus parameter is set to 2.
0.
6. An electronic device, characterized in that, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the engineering process professional classification method as described in any one of claims 1 to 5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the engineering process professional classification method as described in any one of claims 1 to 5.