A method for automatically generating unit engineering codes through CAD drawings
Automatically generate unit engineering coding through CAD drawings, solving the problems of coding inconsistency, update lag and complexity in the existing technology, realizing the automation, consistency and timely update of coding, and improving management efficiency and construction progress.
Patent Information
- Application Number
- CN202411762745.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-04-08
AI Technical Summary
The existing unit engineering coding methods have problems such as coding inconsistency, update lag, complexity and low availability in large-scale hydropower projects, resulting in increased management complexity, waste of resources and impact on construction progress.
Automatically generate unit engineering coding through CAD drawings, including building a unit engineering hierarchical coding model based on the set encoding division rules, extracting parameter data in the CAD drawings, determining the specific rules of the hierarchical coding structure, and coding matching based on the unit engineering hierarchical coding model, and outputting unit engineering hierarchical coding.
It realizes the automation, consistency and timely update of coding, reduces human errors, improves management efficiency and construction progress, and simplifies the update and maintenance process of coding.
Smart Images

Figure CN119783192A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of engineering management informationization, and in particular to a method for automatically generating unit engineering codes through CAD drawings. Background Art
[0002] In the construction process of hydropower projects, unit project coding is an indispensable part of project management. Unit project coding not only helps the organization, management and monitoring of the project, but also plays an important role in construction, progress control, quality inspection, cost accounting and other links. The existing unit project coding methods mainly include sequential numbering, classification numbering, structural hierarchy coding, geographic location coding and mixed coding. These methods can meet the needs of project management to a certain extent, but there are also some problems that need to be solved in practical applications.
[0003] In large-scale hydropower projects, various coding methods are often used in parallel due to the large number of unit projects involved in the project and their complex structure. Different departments and units may adopt different coding standards and methods according to their respective needs, resulting in inconsistent coding of the same unit project in different systems. This not only increases the complexity of project management, but also easily leads to errors, waste of resources, and even affects the construction progress. Hydropower projects usually last for a long time. During the implementation of the project, the unit projects are frequently increased, modified, and split. Existing coding methods often cannot respond to these changes in a timely manner. Especially when the coding system is not effectively updated and maintained, the coding of the project may no longer conform to the actual situation, resulting in the loss of the coding system, or even confusion and duplication, which increases the difficulty of management and query. Although many coding methods strive to achieve systematization and standardization, in specific applications, overly long or complex coding may lead to poor readability of the coding and make it difficult for engineering personnel to quickly understand and remember it. Especially when using sequential numbering methods, structural hierarchical coding methods, etc., as the scale of the project expands, the length and level of the coding may be too complex, thus affecting the actual work efficiency. At present, in the field of hydropower engineering, there is no unified unit engineering coding standard and specification. Different projects, different regions and even different construction units often use their own coding systems, lacking unified specifications and standards, which makes the coding compatibility between different systems poor, increasing the complexity and difficulty of cross-department and cross-project management.
[0004] Combined with the above defects, the current unit engineering coding method has obvious shortcomings in practical applications, which are mainly manifested in the following aspects:
[0005] Lack of standardization: There is no unified coding standard and specification, and the coding methods of different departments and units are inconsistent, which leads to coding confusion and increases the cost of management and communication. Update lag: Since unit projects may change during the project, the existing coding system cannot be updated in a timely and accurate manner, resulting in inaccurate coding data, affecting project progress and management efficiency. Complexity and low availability: When the existing coding method is large-scale and complex, it may form overly long and complex codes, making it difficult for engineering managers to use them efficiently in daily work, and may even lead to misoperation due to complex coding.
[0006] Therefore, there is an urgent need for a method to automatically generate unit engineering codes through CAD drawings. Summary of the invention
[0007] The present invention provides a method for automatically generating unit engineering codes through CAD drawings to solve the above problems existing in the prior art.
[0008] In order to achieve the above object, the present invention provides the following technical solutions:
[0009] A method for automatically generating unit engineering codes through CAD drawings, characterized by comprising:
[0010] S101: constructing a unit engineering hierarchical coding model based on a set coding division rule;
[0011] S102: Obtain a CAD drawing of a target project, and extract parameter data in the CAD drawing, where the parameter data includes geometric information, hierarchical structure information, and related project attributes;
[0012] S103: Determine specific rules of the hierarchical coding structure according to parameter data in the CAD drawing, and perform coding matching according to the unit engineering hierarchical coding model to obtain coding matching results;
[0013] S104: Setting a division algorithm, the division algorithm includes reading CAD drawings, identifying unit projects, dividing sub-projects, dividing sub-items, dividing sub-unit projects, and generating codes;
[0014] S105: Write a partitioning algorithm and output the unit engineering level code according to the code matching result.
[0015] Wherein, step S101 includes:
[0016] S1011: Based on the set coding division rule, a preliminary structure of the unit engineering hierarchical coding model is obtained, where the preliminary structure includes coding rules and logical relationships of each level;
[0017] S1012: Use the 2-4-2-4 coding method to divide the unit project, clarify the four-level division standards and coding rules, and obtain the level division results;
[0018] S1013: Based on the hierarchical division result and the coding rule, the unit engineering is automatically divided using the CAD drawing, and corresponding codes are generated to obtain automatic coding results;
[0019] S1014: Combine the preliminary structure and the automatic encoding results to detect inconsistencies or redundancies in the unit engineering level encoding model. If a coding conflict is detected, the system will give corresponding prompts or suggestions.
[0020] Wherein, step S102 includes:
[0021] Based on the CAD drawing parsing model, obtain the CAD drawings of the target project;
[0022] Pre-process CAD drawings, including cleaning redundant information, correcting errors, and ensuring that CAD drawings contain complete engineering structure information;
[0023] Extract the geometric shape and size information of the engineering structure by parsing the CAD drawings;
[0024] Extract material information from CAD drawings, identify and mark the material types, specifications and properties used in engineering structures;
[0025] Parse and extract process information from CAD drawings, including welding methods, cutting methods, and assembly sequences, to guide the engineering construction process;
[0026] Extract and organize the annotation and annotation information on CAD drawings;
[0027] Identify and extract the hierarchical information of the engineering structure of the CAD drawings, and clarify the levels of unit engineering, divisional engineering, sub-project engineering, and sub-unit engineering, so as to fully understand the entire engineering structure;
[0028] Extract dimensional tolerance and surface treatment information from CAD drawings to ensure that the quality and appearance of the engineering structure meet the design requirements;
[0029] Extract plan, elevation, section and axonometric information according to the scale and view of CAD drawings to provide a comprehensive display of engineering structures;
[0030] Record and manage the number and version information of CAD drawings to facilitate tracking of changes and updates to drawings.
[0031] Wherein, step S103 includes:
[0032] S1031: Determine specific rules for unit engineering hierarchical coding according to hierarchical structure information in the CAD drawing;
[0033] S1032: performing layer-by-layer coding matching according to the set layer coding rules and in combination with the parameter data in the CAD drawing;
[0034] S1033: According to the hierarchical coding rules, the unit projects, sub-projects, sub-items and sub-unit projects in the CAD drawings are coded and matched layer by layer, and the matching results are obtained.
[0035] Wherein, step S104 includes:
[0036] Read the target CAD drawing file through the CAD software API or third-party library to extract the geometric information, spatial layout and annotation data in the CAD drawing file;
[0037] According to the overall structure and design information in the CAD drawings, identify the boundaries and relationships of each unit project, and assign a unique identifier to each unit project according to preset rules;
[0038] On the basis of each unit project, combined with the geometric information and process requirements in the CAD drawings, each unit project is divided into multiple sub-projects, and a unique identifier is assigned to each sub-project;
[0039] Based on the details of each sub-project, combined with the more detailed design data and process requirements in the CAD drawings, each sub-project is divided into multiple sub-projects, and a unique identifier is assigned to each sub-project;
[0040] Divide each sub-project into multiple sub-unit projects based on the detailed data of each sub-project, the specific structural information in the drawings and the process requirements, and assign a unique identifier to each sub-unit project;
[0041] According to the identifiers assigned to each engineering unit, the corresponding hierarchical codes are generated to ensure the uniqueness and identifiability of each level of code. The coding format includes a combination of letters, numbers or other symbols.
[0042] Wherein, step S105 includes:
[0043] Initializing multiple encoding counters, including unit counters, sub-section counters, sub-item counters and sub-unit counters, for uniquely identifying unit projects at each level;
[0044] Parse CAD drawing data and identify multiple unit projects through analysis;
[0045] Divide the unit project into component projects layer by layer;
[0046] In each component project, it is further divided into sub-projects;
[0047] Generate hierarchical codes based on unit counters, part counters, item counters and sub-unit counters;
[0048] Use structured coding to indicate the subordination and uniqueness of each unit project;
[0049] Bind the hierarchical coding matching results to the parsed project structure and store them in a data structure list.
[0050] Among them, the classification standards and coding rules of the four levels are clarified, including:
[0051] Determine the four levels of unit engineering that need to be divided and define coding rules for each level;
[0052] The first-level coding rules represent different structural types or engineering sub-items. The first-level coding uses two symbols to represent different unit engineering types;
[0053] The second-level coding rules subdivide the units of the first level to represent different regions or functional divisions. The second-level coding specifies a specific location or function for each item in the first level.
[0054] The third level coding rules represent different options for material types or construction methods in a project. The third level coding is used to further classify each item in the second level.
[0055] The fourth-level coding rules further refine the units in the third level to represent specific units or details;
[0056] After the coding rules of each layer have been clarified and executed, the engineering level division results formed by the coding rules are obtained.
[0057] The hierarchical coding rules set include:
[0058] The first unit engineering layer is defined as UE code, which uniformly represents the identifier of the unit engineering;
[0059] The second layer, the sub-project layer, is defined as PE code, which indicates the sub-project under each unit project;
[0060] The third sub-project layer is defined as IE code, which indicates the specific sub-project under the sub-project;
[0061] The fourth sub-unit engineering layer is defined as SUE code, which indicates the specific sub-unit engineering under the sub-project.
[0062] Among them, the unit projects, sub-projects, sub-items and sub-unit projects in the CAD drawings are coded and matched layer by layer, including:
[0063] Based on the preset hierarchical coding rule library, determine the coding rules corresponding to the unit engineering nodes and generate the unit engineering coding UE;
[0064] Input the unit engineering node and the corresponding encoding rule UE into the encoding matching algorithm;
[0065] For each sub-project under the unit project, generate the sub-project code PE according to the coding rule PE=UE+format(n,'02d'), and input the sub-project node and the corresponding code PE into the code matching algorithm;
[0066] For each sub-project under each branch project, generate the sub-project code IE according to the coding rule IE=PE[0]+'_'+PE[2]+format(m,'02d'), and input the sub-project node and the corresponding code IE into the code matching algorithm;
[0067] For each sub-unit project under each sub-project, generate the sub-unit project code SUE according to the coding rule SUE=IE+format(p,'04d'), and input the sub-unit project node and the corresponding code SUE into the code matching algorithm;
[0068] When all engineering nodes and their corresponding codes are input into the code matching algorithm, the hierarchical traversal of code matching begins;
[0069] During the code matching traversal process, the codes of unit projects, divisional projects, sub-item projects and sub-unit projects are matched layer by layer, and the matching paths and code relationships are recorded;
[0070] When the traversal is completed, at least one encoding matching result item fed back by the encoding matching algorithm is obtained;
[0071] Integrate the obtained encoding matching result items to obtain the final encoding matching result.
[0072] Among them, the boundaries and relationships of each unit project are identified, including:
[0073] Based on the preset recognition rule library, multiple unit projects identified in the CAD drawings are determined;
[0074] Assign a unique identifier to each identified unit project, where the unique identifier is generated based on a preset identification rule;
[0075] If the boundaries and relationships of the unit projects meet the preset rules, the corresponding unit project identifier is used as the initial identifier;
[0076] Based on the preset verification rule base, verify the uniqueness and correctness of the initial identifier of each unit project;
[0077] If the verification is successful, the initial identifier is assigned to the corresponding unit project as the final identifier;
[0078] If the verification fails, the initial identifier is adjusted according to the preset adjustment rules until the uniqueness and correctness requirements are met;
[0079] Associating the final identifier with the corresponding unit project to form unit project identification information;
[0080] Integrate the unit project identification information to form a target project identification information set;
[0081] The identification information set is used as the identification configuration information of the target project to complete the identification and identification allocation.
[0082] Compared with the prior art, the present invention has the following advantages:
[0083] A method for automatically generating unit engineering codes through CAD drawings includes: constructing a unit engineering hierarchical coding model based on set coding division rules; obtaining CAD drawings of target projects, extracting parameter data in the CAD drawings, the parameter data including geometric information, hierarchical structure information and related engineering properties; determining specific rules of hierarchical coding structure according to the parameter data in the CAD drawings, and performing coding matching according to the unit engineering hierarchical coding model to obtain coding matching results; setting a division algorithm, the division algorithm including reading CAD drawings, identifying unit engineering, dividing sub-projects, dividing sub-items, dividing sub-unit engineering, and generating codes; writing a division algorithm, and outputting the unit engineering hierarchical coding according to the coding matching results. Automatically generating codes can ensure that the same coding standards and methods are used between different departments or units, thereby improving the consistency of coding.
[0084] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present invention.
[0085] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0087] Figure 1 It is a flow chart of a method for automatically generating unit engineering codes through CAD drawings in an embodiment of the present invention;
[0088] Figure 2A flowchart of constructing a unit engineering hierarchical coding model in an embodiment of the present invention;
[0089] Figure 3 The present invention is a method for automatically generating unit engineering codes through CAD drawings in a logical step diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0090] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0091] An embodiment of the present invention provides a method for automatically generating unit engineering codes through CAD drawings, comprising:
[0092] S101: constructing a unit engineering hierarchical coding model based on a set coding division rule;
[0093] S102: Obtain a CAD drawing of a target project, and extract parameter data in the CAD drawing, where the parameter data includes geometric information, hierarchical structure information, and related project attributes;
[0094] S103: Determine specific rules of the hierarchical coding structure according to parameter data in the CAD drawing, and perform coding matching according to the unit engineering hierarchical coding model to obtain coding matching results;
[0095] S104: Setting a division algorithm, the division algorithm includes reading CAD drawings, identifying unit projects, dividing sub-projects, dividing sub-items, dividing sub-unit projects, and generating codes;
[0096] S105: Write a partitioning algorithm and output the unit engineering level code according to the code matching result.
[0097] The working principle of the above technical solution is: determine the coding division rules and define the coding rules: adopt the "2-4-2-4" coding method to determine the coding rules for each level and determine the classification standards for each level (such as structure type, location, material, etc.). For example: the first level represents the structure type, the second level represents the location or function, the third level represents the material or construction method, and the fourth level represents a more specific unit.
[0098] Coding rule matching: according to the information in the CAD drawing, it is matched to the predefined coding rules. For example, the beam structure in the CAD drawing is matched to the first-level "beam" classification in the coding rules.
[0099] Prepare CAD drawings and ensure the completeness of the drawings. Ensure that the CAD drawings contain all necessary engineering information, such as geometry, dimensions, materials, processes, etc. The drawings should be accurate to facilitate the automated processing of subsequent steps. Pre-process the drawings, clean up redundant information in the drawings, such as extra lines or annotations, and correct any errors to ensure the accuracy of the drawing information.
[0100] Matching coding rules, hierarchical structure identification, by analyzing CAD drawings, identify the hierarchical structure of the project, assign codes to each level, and ensure the uniqueness and logic of the codes, code generation, generate codes for each engineering unit according to the matching coding rules, for example: generate "11" for a unit project, generate "1101" for its sub-project, and so on.
[0101] Develop partitioning algorithms, read CAD drawings, use the API of CAD software or third-party libraries to read drawing files, extract geometric and structural information from drawings, and identify and partition engineering units: identify unit projects in drawings and assign unique identifiers to them. According to engineering requirements and drawing information, divide unit projects into section projects, sub-projects, and sub-unit projects. Generate corresponding codes for each identified engineering level to ensure the uniqueness and identifiability of the codes.
[0102] Write the algorithm and export the unit engineering code, write the code to implement the above steps, ensure automated processing and code generation, export the generated code into a usable format, and ensure that the exported code information is complete and easy to understand.
[0103] like Figure 3 As shown, receiving CAD drawings, first import the design drawings in CAD format as the basic data source for code generation. The engineering information contained in the drawings is the core basis for generating unit engineering codes; parsing drawing elements, using the drawing parsing algorithm, extracting various graphic elements (such as lines, nodes, text annotations, etc.) in the CAD drawings, and decomposing the drawing content according to predefined rules; distinguishing key information, such as "area, engineering type, sub-item" in the 4-2-4-2 code; mapping engineering coding rules, mapping the parsed drawing elements to the engineering coding rules, the rule definition: adopting the 4-2-4-2 coding structure, in which each segment of numbers represents a specific engineering feature. Key information calibration: the extracted drawing information is matched one by one with the "area, sub-item, feature" in the coding rules.
[0104] Generate unit engineering code, automatically generate corresponding unit engineering code according to matching rules: output unique code to ensure that the number of each unit engineering is unique and traceable globally. Output and verification, output the generated unit engineering code, and support export in the form of engineering list or detailed list. Verify the logic and accuracy of the code through the algorithm to ensure that the code is correct. Storage and management, data storage: store the generated engineering code data in the database to form a complete engineering code management system. Coding management: support subsequent query, update and version management to ensure the continuous availability of coding data.
[0105] The beneficial effects of the above technical solution are as follows: manual coding is prone to errors, especially in large-scale hydropower projects. Due to the complex project structure and the involvement of multiple departments and units, the consistency and accuracy of manual coding are difficult to guarantee. CAD drawings usually contain a wealth of engineering information, including the location, size, type, etc. of unit projects. Automatically generating codes through CAD drawings can ensure a high degree of consistency between the coding and engineering information, reduce human errors, and improve the accuracy of the coding. At the same time, automatic coding can ensure that the same coding standards and methods are used between different departments or units, thereby improving the consistency of coding; during the construction of hydropower projects, unit projects may change, such as additions, modifications, or deletions. Manually updating and maintaining codes requires a lot of time and manpower, and is prone to errors; automatically generating codes through CAD drawings, when the unit projects in the CAD drawings change, the codes can be automatically updated without manual modification. This greatly simplifies the updating and maintenance process of the code and improves work efficiency; when manually coding, due to the limitations of the length, structure and format of the code, it may be difficult to simultaneously meet the requirements of uniqueness, readability and ease of use of the code. The 2-4-2-4 coding rule is adopted to achieve a stronger logic relationship with the upper layer, and each system can automatically write into the system by transmitting the code through the interface; the code is automatically generated through CAD drawings, and the rules and formats of the code can be customized according to the project requirements. For example, a code with a specific meaning can be generated according to the location, type and other information of the unit project, making the code more intuitive and easy to understand. In addition, the automatic generation of the code can also adopt standardized coding formats and symbols to improve the versatility and interoperability of the code; in the process of hydropower project construction, different departments or units need to frequently share and exchange engineering information. Manual coding may lead to misunderstandings or confusion during information transmission. Automatically generating codes through CAD drawings can ensure that all departments or units use the same coding standards and methods, thereby simplifying the process of information sharing and collaborative work. The accuracy and consistency of coding can also promote effective communication and collaboration between different departments or units, and improve the overall efficiency and quality of the project. With the continuous development of digital and intelligent technologies, the demand for data management in the construction of hydropower projects is also increasing. Automatically generating codes through CAD drawings can digitize engineering information and associate and integrate it with other related data. This helps to achieve centralized management, rapid retrieval and intelligent analysis of data, providing strong support for project decision-making and management.
[0106] In another embodiment, step S101 includes:
[0107] S1011: Based on the set coding division rule, a preliminary structure of the unit engineering hierarchical coding model is obtained, where the preliminary structure includes coding rules and logical relationships of each level;
[0108] S1012: Use the 2-4-2-4 coding method to divide the unit project, clarify the four-level division standards and coding rules, and obtain the level division results;
[0109] S1013: Based on the hierarchical division result and the coding rule, the unit project is automatically divided using the CAD drawing, and corresponding codes are generated to obtain automatic coding results;
[0110] S1014: Combine the preliminary structure and the automatic encoding results to detect inconsistencies or redundancies in the unit engineering level encoding model. If a coding conflict is detected, the system will give corresponding prompts or suggestions.
[0111] The working principle of the above technical solution is: the "2-4-2-4" coding method is used to systematically organize and manage unit projects according to logical levels. The definition of the coding division rules includes the following steps:
[0112] Divide the layers and coding rules, determine the number of layers to be divided (four layers in this case), and define independent coding rules for each layer. The design of coding rules is usually combined with the characteristics, functions or management requirements of the project.
[0113] Example of layer definition: First layer (2 parts): represents the overall unit type, for example: A represents a beam and B represents a plate; Second layer (4 parts): further subdivides the first layer, for example: A1 to A4 represent different parts of the beam. Third layer (2 parts): represents more specific properties, for example: A1a and A1b represent material properties or construction methods. Fourth layer (4 parts): further subdivides specific properties, for example:
[0114] A1a1 to A1a4 represent different subunits. 2. Implementation of hierarchical division and encoding rules (S1012)
[0115] Standard “2-4-2-4” hierarchical division: Based on project requirements, four levels are defined, and each level has independent division criteria.
[0116] The coding rules must ensure uniqueness and scalability to ensure that there is no need to significantly adjust the coding system when adding engineering projects.
[0117] Example of coding structure:
[0118] The first level coding rules (11): such as engineering category.
[0119] The second level coding rules (2222): such as structural type subdivision.
[0120] The third level coding rules (33): such as construction methods or materials.
[0121] The fourth level coding rules (4444): such as the specific location or characteristics of the subunit.
[0122] Automatic division and coding of CAD drawings, based on the analysis of CAD drawings: Use graphic recognition algorithms to automatically extract geometric information and text annotations in CAD. According to the pre-set division rules (such as 2-4-2-4), match the recognition results to each level.
[0123] Automatically generate codes: Based on the division results, codes are dynamically generated according to hierarchical rules. For example, the position and properties of a beam extracted from a drawing may be coded as A1a2. Output codes as additional annotations in CAD drawings or as separate data tables.
[0124] Coding consistency and redundancy detection, detection process: Check the logical relationship between each level to avoid coding conflicts. For example, there should be no repeated coding in the same position. The sub-level coding (such as A1a1) must be consistent with its parent level coding (such as A1a). Detect redundant coding, such as repeated descriptions of the same attribute at different levels.
[0125] Feedback and optimization: The system gives hints or modification suggestions based on the detection results: marking repeated coded parts and suggesting uncoded subunits.
[0126] The adjustment and output of the comprehensive structure combines the preliminary structure (manually defined rules) with the automatic coding results to generate a unified hierarchical coding model to facilitate data flow in subsequent construction and management.
[0127] The beneficial effects of the above technical solution are: combined with CAD automated division, it can significantly improve work efficiency and data accuracy, while facilitating standardized management and multi-department collaboration.
[0128] In another embodiment, step S102 includes:
[0129] Based on the CAD drawing parsing model, obtain the CAD drawings of the target project;
[0130] Pre-process CAD drawings, including cleaning redundant information, correcting errors, and ensuring that CAD drawings contain complete engineering structure information;
[0131] Extract the geometric shape and size information of the engineering structure by parsing the CAD drawings;
[0132] Extract material information from CAD drawings, identify and mark the material types, specifications and properties used in engineering structures;
[0133] Parse and extract process information from CAD drawings, including welding methods, cutting methods, and assembly sequences, to guide the engineering construction process;
[0134] Extract and organize the annotation and annotation information on CAD drawings;
[0135] Identify and extract the hierarchical information of the engineering structure of the CAD drawings, and clarify the levels of unit engineering, divisional engineering, sub-project engineering, and sub-unit engineering, so as to fully understand the entire engineering structure;
[0136] Extract dimensional tolerance and surface treatment information from CAD drawings to ensure that the quality and appearance of the engineering structure meet the design requirements;
[0137] Extract plan, elevation, section and axonometric information according to the scale and view of CAD drawings to provide a comprehensive display of engineering structures;
[0138] Record and manage the number and version information of CAD drawings to facilitate tracking of changes and updates to drawings.
[0139] Among them, the hierarchical information of the engineering structure of the CAD drawing is identified and extracted, including:
[0140] Acquire the engineering structure information in the CAD drawing, parse the engineering structure information to build a hierarchical model, wherein the engineering structure information includes: unit engineering information, division engineering information, sub-item engineering information and sub-unit engineering information; set the nodes of the hierarchical model as the various components in the engineering structure, and the connection relationship between the nodes is the hierarchical relationship; form the hierarchical model according to the hierarchical relationship of the information of the unit engineering, division engineering, sub-item engineering and sub-unit engineering;
[0141] According to the hierarchical model, whether the hierarchical relationship of each engineering structure information meets the preset hierarchical rules is judged, and if not, adjustments are made; specifically, the hierarchical depth of each node in the hierarchical model is calculated to construct an engineering structure information-depth set; the depth represents the level of the node in the hierarchical structure; whether the depth in each engineering structure information-depth set meets the preset hierarchical rules; different hierarchical rules are set for each engineering structure information; nodes that do not meet the preset hierarchical rules are screened out, as well as the engineering structure information corresponding to the screened out nodes;
[0142] The hierarchical structure model is adjusted according to the selected nodes and their corresponding information, specifically including: setting a first weight value of all information in the current engineering structure information, the first weight value being determined by the importance of the information in the engineering structure; weighted adjustment is performed on the selected nodes and the corresponding first weight values to obtain an adjusted hierarchical structure model; and the nodes in the adjusted hierarchical structure model that meet the hierarchical rules are used as the final hierarchical structure;
[0143] According to the final hierarchical structure, the corresponding analytical model is found from the hierarchical database; the analytical model is identified and extracted through the relationship between the engineering structure information and the hierarchical structure, specifically including: constructing a hierarchical database, recording the analytical model corresponding to each hierarchical structure in the hierarchical database, the analytical model including: unit engineering-analytic model, sub-engineering-analytic model, sub-item engineering-analytic model and sub-unit engineering-analytic model; judging whether the number of nodes in the hierarchical structure is greater than or equal to 1, if greater than or equal to 1, finding greater than or equal to 1 analytical model to form an analytical model set;
[0144] Inputting the engineering structure information into the found analytical model and outputting the analytical result specifically includes: setting a second weight value for each analytical model in the analytical model set; inputting the engineering structure information into all analytical models in the analytical model set respectively, and obtaining multiple analytical results through different analytical models; corresponding to the second weight values of different analytical models and the corresponding analytical results, calculating and determining the final analytical result.
[0145] The working principle of the above technical solution is as follows: First, the CAD drawings need to contain complete engineering structure information. This requires that the drawings contain all necessary design elements, such as geometry, size, material, process, annotation, etc., and ensure that this information is consistent with the actual engineering design. The drawings will be preprocessed before parsing to clean up redundant data and correct errors to ensure the accuracy and completeness of the drawing information and avoid construction problems caused by drawing errors. CAD drawings define the geometry of engineering structures through basic elements such as lines, surfaces, and points. During the parsing process, the model extracts all geometric data, including precise dimensions such as length, width, height, and angles, which constitute the core foundation of engineering design. Whether it is a complex structure or a simple component, its precise dimensions and geometric features need to be clearly indicated in the drawing.
[0146] In CAD drawings, material information is usually indicated by annotations, legends or special symbols. Analytical models can extract and identify data such as the type, specifications and properties of the materials used. This information, including but not limited to steel type, concrete grade, wood strength, etc., is crucial to ensure the safety, durability and compliance of engineering structures with design standards.
[0147] Process information involves specific operation details such as welding, cutting, and assembly. CAD drawings often contain process information such as welding methods, cutting methods, assembly sequence, etc. This information is very critical in the construction process. By extracting this process information, the construction team can perform operations accurately to ensure that the construction process meets the design requirements.
[0148] CAD drawings usually contain a variety of annotations and notes, which provide further explanations and precautions about the engineering structure. These annotations may include dimensional tolerances, material requirements, construction methods, quality standards, etc., which are important references in engineering construction. The analytical model can automatically extract these annotations and notes to help construction personnel understand the implicit requirements and details in the drawings.
[0149] The structure of a project usually consists of multiple levels, including unit projects, sub-projects, sub-projects, and sub-unit projects. The hierarchical information in the CAD drawings is crucial to understanding the composition of the entire project. The analytical model can identify and extract these hierarchical structures, helping engineers and construction personnel to fully understand the various components of the project and accurately grasp the overall structure of the project.
[0150] Drawings may also include dimensional tolerances and surface treatment information. Dimensional tolerances ensure the allowable error range of the structure during manufacturing and construction, while surface treatment information involves the protection, decoration or corrosion resistance of the material surface. Analytical models can extract this critical information to ensure that the quality and appearance of the engineering structure meet the design standards.
[0151] CAD drawings usually contain multiple views, such as plan, elevation, section, axonometric, etc. These views show various aspects of the engineering structure from different angles and scales. The parsing process will extract relevant geometric and structural information based on different views and scales to fully display all details of the project.
[0152] In order to ensure the accuracy and consistency of drawings during the construction process, CAD drawings will have clear numbers and version information. This information helps managers track changes and updates to drawings and avoid construction deviations caused by version errors. The analytical model can extract the number and version information of the drawings for subsequent management and tracking.
[0153] Before drawing analysis, CAD drawings usually need to be preprocessed. The preprocessing steps include cleaning up redundant information (such as repeated lines, blank areas), correcting errors (such as inconsistent dimensions, missing annotations), etc. These steps ensure that the final extracted data is complete and accurate to avoid errors or omissions in the subsequent analysis process.
[0154] The beneficial effects of the above technical solution are: the CAD drawing analysis model can efficiently extract comprehensive information of the engineering structure, providing important support for engineering design, construction and later maintenance.
[0155] In another embodiment, step S103 includes:
[0156] S1031: Determine specific rules for unit engineering hierarchical coding according to hierarchical structure information in the CAD drawing;
[0157] S1032: performing layer-by-layer coding matching according to the set layer coding rules and in combination with the parameter data in the CAD drawing;
[0158] S1033: According to the hierarchical coding rules, the unit projects, sub-projects, sub-items and sub-unit projects in the CAD drawings are coded and matched layer by layer, and the matching results are obtained.
[0159] The working principle of the above technical solution is: according to the hierarchical structure information in the CAD drawing, the specific rules of the hierarchical coding structure are determined, and accurate matching is performed according to the set "2-4-2-4" coding method. For example:
[0160] Define the encoding rules: First level (unit project): UE = '11' (assuming that all unit projects are represented by '11', more complex logic may be used in practice); Second level (sub-project): PE = UE + 'XXXX', where XXXX is a four-digit incremental number (starting from 0001); Third level (sub-project): IE = PE[0] + '_' + PE[2] + 'XX', where XX is a two-digit incremental number (starting from 01), and '_' is a separator (here the underscore is used to represent the separator). The fourth layer (unit project): SUE = IE + 'YY', where YY is a four-digit increasing number (starting from 0001); logical expression: the second layer coding (sub-project), assuming that the code of the current unit project is UE, and this is the nth sub-project under the unit project (counting from 1), the code PE of the sub-project can be obtained by the following logic: PE = UE + format (n, '02d') # Format n into a four-digit string and concatenate it after UE.
[0161] The third level of coding (sub-project), assuming that the code of the current sub-project is PE, and this is the mth sub-project under the sub-project (counting from 1), the code IE of the sub-project can be obtained through the following logic: IE = PE[0] + '_' + PE[2] + format(m,'02d') # Extract the first and third digits of PE, and add a separator and a two-digit number.
[0162] Fourth level coding (unit project), assuming that the current sub-project code is IE, and this is the pth sub-unit project under the sub-project (counting from 1), the sub-unit project code SUE can be obtained by the following logic: SUE = IE + format (p, '04d') # format p into a four-digit string and concatenate it after IE. Suppose we have a unit project, which is the first unit project (ie UE = '11'), it has two sub-projects (ie n = 1, 2), the first sub-project has three sub-projects (ie m = 1, 2, 3), and the first sub-project has two sub-unit projects (ie p = 1, 2).
[0163] Section engineering code: PE1 = '1101', PE2 = '1102', item engineering code: for PE1, IE1 = '1_101', IE2 = '1_102', IE3 = '1_103', unit engineering code: for IE1, SUE1 = '1_1010001', SUE2 = '1_1010002'.
[0164] The beneficial effects of the above technical solution are: by automatically generating codes through CAD drawings, the rules and formats of codes can be customized according to engineering requirements. For example, codes with specific meanings can be generated according to information such as the location and type of the unit project, making the codes more intuitive and easy to understand. In addition, the automatically generated codes can also use standardized coding formats and symbols to improve the versatility and interoperability of the codes.
[0165] In another embodiment, step S104 includes:
[0166] Read the target CAD drawing file through the CAD software API or third-party library to extract the geometric information, spatial layout and annotation data in the CAD drawing file;
[0167] According to the overall structure and design information in the CAD drawings, identify the boundaries and relationships of each unit project, and assign a unique identifier to each unit project according to preset rules;
[0168] On the basis of each unit project, combined with the geometric information and process requirements in the CAD drawings, each unit project is divided into multiple sub-projects, and a unique identifier is assigned to each sub-project;
[0169] Based on the details of each sub-project, combined with the more detailed design data and process requirements in the CAD drawings, each sub-project is divided into multiple sub-projects, and a unique identifier is assigned to each sub-project;
[0170] Divide each sub-project into multiple sub-unit projects based on the detailed data of each sub-project, the specific structural information in the drawings and the process requirements, and assign a unique identifier to each sub-unit project;
[0171] According to the identifiers assigned to each engineering unit, the corresponding hierarchical codes are generated to ensure the uniqueness and identifiability of each level of code. The coding format includes a combination of letters, numbers or other symbols.
[0172] The working principle of the above technical solution is as follows: Read CAD drawings: Use the API of CAD software or a third-party library to read CAD drawing files and obtain geometric information (such as lines, areas, etc.); Identify unit projects: Based on the overall structure and information of the CAD drawings, identify unit projects and assign a unique identifier to each unit project (for example: U1, U2,...); Divide sub-projects: For each unit project, divide it into multiple sub-projects according to the geometric information and engineering requirements in the CAD drawings, and assign a unique identifier to each sub-project (for example: U1-P1, U1-P2,...) ; Divide the sub-project: For each sub-project, continue to divide it into multiple sub-projects according to the details in the CAD drawings and engineering requirements, and assign a unique identifier to each sub-project (for example: U1-P1-S1, U1-P1-S2,...); Divide the sub-unit project: For each sub-project, divide it into multiple sub-unit projects according to the detailed information in the CAD drawings and engineering requirements, and assign a unique identifier to each sub-unit project (for example: U1-P1-S1-C1, U1-P1-S1-C2,...); Generate the code: Generate the hierarchical code based on the assigned identifier. The code can use a combination of letters, numbers or other symbols, but ensure the uniqueness and identifiability of each layer of code.
[0173] The beneficial effects of the above technical solution are: by extracting drawing data through the API or third-party library of the CAD software, it is possible to automatically obtain geometric information, spatial layout and annotation data, greatly reducing the time and error rate of manual operation. This automated extraction significantly improves the efficiency of engineering design and management; the overall structure in the CAD drawing is decomposed into unit engineering, sub-project, sub-project and sub-unit engineering, providing a clear engineering hierarchical structure. This hierarchical method can help the team clarify the boundaries and relationships of each engineering module, avoiding project delays or errors caused by unclear responsibilities; each level of engineering is assigned a unique identifier to ensure the traceability and manageability of the data. In large-scale engineering projects, the uniqueness of the identifier helps to quickly retrieve and locate engineering modules, and effectively prevent duplication and confusion; the hierarchical coding generated based on the hierarchical structure can provide an intuitive engineering data structure to ensure that the logical relationship between different levels is clear and visible. This coding system can be used in multiple scenarios such as project management, cost control, construction planning, etc. to achieve efficient sharing and utilization of information; the division of sub-projects and sub-projects according to geometric information and process requirements can manage design details more meticulously. This approach not only improves the accuracy of the project, but also better implements the design intent during construction; by hierarchically decomposing the project and assigning identifiers, multiple teams can collaborate in parallel without worrying about data conflicts or omissions in subsequent integration. All engineering units have clear definitions and standardized coding, which greatly improves collaboration efficiency.
[0174] In another embodiment, step S105 includes:
[0175] Initializing multiple encoding counters, including unit counters, sub-section counters, sub-item counters and sub-unit counters, for uniquely identifying unit projects at each level;
[0176] Parse CAD drawing data and identify multiple unit projects through analysis;
[0177] Divide the unit project into component projects layer by layer;
[0178] In each component project, it is further divided into sub-projects;
[0179] Generate hierarchical codes based on unit counters, part counters, item counters and sub-unit counters;
[0180] Use structured coding to indicate the subordination and uniqueness of each unit project;
[0181] Bind the hierarchical coding matching results to the parsed project structure and store them in a data structure list.
[0182] The working principle of the above technical solution is as follows: The following is a simplified algorithm and code logic example; import module:
[0183] import pandas as pd
[0184] from openpyxl import Workbook
[0185] from cad_processing_module import read_cad_file,identify_units,divide_into_parts#
[0186] The code uses pandas and openpyxl modules for data processing and Excel export.
[0187] The functions read_cad_file, identify_units and divide_into_parts are defined in the custom module cad_processing_module for reading and decomposing CAD data.
[0188] Initialize the counter:
[0189] Define multiple counters (unit_counter, part_counter, item_counter, sub_unit_counter) to mark unit projects, parts, items and smaller units.
[0190] Reading CAD files:
[0191] cad_data=read_cad_file('path_to_cad_file.dwg')
[0192] units=identify_units(cad_data)
[0193] Call the read_cad_file function to load the CAD file data in the specified path.
[0194] Use the identify_units function to identify unit engineering in CAD files.
[0195] Coding structure:
[0196] Use nested loops to decompose and code unit projects, sub-projects, item projects, and smaller unit projects.
[0197]
[0198] Construct a list of encoding structures:
[0199] Save the encoded project information in a list of dictionaries and update the counter in a loop as needed.
[0200] Reset the counter:
[0201] item_counter = 1
[0202] sub_unit_counter = 1
[0203] Reset the counter after certain steps.
[0204] Export Excel file:
[0205] Finally, the structured encoded data is exported to an Excel file through pandas.
[0206] df=pd.DataFrame(coded_structure)
[0207] df.to_excel('coded_structure.xlsx',index=False)
[0208] The beneficial effects of the above technical solution are: reading the CAD file, decomposing its structure, generating hierarchical coding, and saving the result as an Excel file to facilitate subsequent project management or analysis.
[0209] In another embodiment, the four-level division criteria and coding rules are clarified, including:
[0210] Determine the four levels of unit engineering that need to be divided and define coding rules for each level;
[0211] The first-level coding rules represent different structural types or engineering sub-items. The first-level coding uses two symbols to represent different unit engineering types;
[0212] The second-level coding rules subdivide the units of the first level to represent different regions or functional divisions. The second-level coding specifies a specific location or function for each item in the first level.
[0213] The third level coding rules represent different options for material types or construction methods in a project. The third level coding is used to further classify each item in the second level.
[0214] The fourth-level coding rules further refine the units in the third level to represent specific units or details;
[0215] After the coding rules of each layer have been clarified and executed, the engineering level division results formed by the coding rules are obtained.
[0216] The working principle of the above technical solution is as follows: The first-level coding rule: structure type or engineering sub-item. The purpose of the first-level coding is to indicate different structure types or large category units in the engineering project and identify the main components of the project. Coding form: It consists of two symbols, each symbol represents a specific structure type or engineering category. For example, "A1" represents "civil engineering" and "B2" represents "mechanical and electrical engineering". According to the nature of the engineering project, a set of basic coding symbols is designed to ensure that each large engineering unit has a unique identification.
[0217] Second-level coding rules: regional or functional zoning. The second-level coding further subdivides the engineering units of the first level, and is usually used to indicate specific regional or functional zoning. For example, different floors, areas or different functional areas (such as production areas, office areas, etc.) in a building. By adding a number or letter to the first-level coding, the specific location or type of the area or function is indicated. For example, "A1-01" represents a layer of structure in "civil engineering", "A1-02" represents another layer of structure; "B2-01" represents a functional area in electromechanical engineering. By adding details on the basis of the first-level coding, the division of each area or function is clarified, so that each area or functional partition has a unique identifier.
[0218] The third level coding rules: material type or construction method. The third level coding is used to indicate different material types or construction methods in the project. This level focuses on the technical details of the project, such as the types of structural materials (such as steel, concrete) or construction processes (such as casting, prefabrication). Coding form: This level of coding uses an additional symbol (such as a letter or number) to identify the material or construction method. For example, "A1-01-1" represents the concrete part of the civil structure, "A1-01-2" represents the steel structure part; "B2-01-A" represents the prefabrication process used for mechanical and electrical installation. By adding detailed coding for materials and construction methods, different construction plans can be effectively managed and distinguished, improving the operability and construction accuracy of the project.
[0219] Fourth-level coding rules: specific units or details. The fourth-level coding further refines the third level to indicate specific units or design details. For example, specific components, size specifications, construction steps, etc. of the structure. This level provides the most accurate description to facilitate the execution of specific construction tasks or material procurement. Coding format: The fourth-level coding is usually a combination of numbers or letters to identify specific details in the engineering unit. For example, "A1-01-1-01" represents a specific component in the civil concrete structure, and "B2-01-A-01" represents a detailed unit of electromechanical equipment. Decomposing the project to the most detailed level helps to accurately manage each specific construction link or operation step, avoiding confusion and errors during the construction process.
[0220] The beneficial effects of the above technical solution are: through a multi-level coding system, the structure and characteristics of each engineering unit can be clearly defined at different stages and levels, so that the management of the entire project has a high degree of standardization and accuracy, avoiding ambiguity and confusion. Each engineering unit has a unique identifier, which can track the progress and changes of each detail during the project execution, especially when problems arise in the project, they can be quickly traced back to specific units or details. The coding system provides a unified language and standards, which helps the effective communication and collaboration between various departments in the project (such as design, procurement, construction, supervision, etc.), and avoids problems caused by information asymmetry or inconsistent definitions.
[0221] In another embodiment, the hierarchical coding rules are set, including:
[0222] The first unit engineering layer is defined as UE code, which uniformly represents the identifier of the unit engineering;
[0223] The second layer, the sub-project layer, is defined as PE code, which indicates the sub-project under each unit project;
[0224] The third sub-project layer is defined as IE code, which indicates the specific sub-project under the sub-project;
[0225] The fourth sub-unit engineering layer is defined as SUE code, which indicates the specific sub-unit engineering under the sub-project.
[0226] The working principle of the above technical solution is as follows: the first layer (unit engineering layer - UE coding), the unit engineering layer (Unit Engineering, referred to as UE) is the highest level of the entire project, usually representing a large engineering module or area. Each unit engineering has a unique identifier, usually composed of letters and numbers. Coding rules: UE coding is represented by two characters, assuming that '11' is uniformly used to represent all unit engineering. UE = '11' (in actual applications, UE coding will adopt more complex coding rules according to project requirements).
[0227] The second layer (Part Engineering layer - PE encoding), definition: Part Engineering layer (PE for short) is the engineering part that is refined under the unit engineering. It represents a sub-part in the unit engineering, and each part engineering has a unique number. Encoding rules: PE encoding is represented by combining the code of the unit engineering (UE) with a four-digit incremental number. The number starts from 0001 and increases until the last part engineering. Encoding format: PE = UE + 'XXXX', where XXXX is a four-digit incremental number starting from 0001. For example: PE = '11' + '0001' → PE = '110001', PE = '11' + '0002' → PE = '110002'.
[0228] The third layer (item engineering layer - IE code), the item engineering layer (IE for short) is a more detailed part of the sub-project, which represents the details of a specific operation or construction project. Each item engineering will also have a unique code. Coding rules: IE coding is formed by modifying certain characters in the PE code to form an identifier for the item engineering. Usually, the combination of the first two characters and the middle two characters of the PE code and an incremental number represents the item engineering. Coding format: IE = PE[0] + '_' + PE[2] + 'XX', where PE[0] is the first character of the PE code, PE[2] is the third character of the PE code, and XX is an incremental two-digit number (starting from 01). Assuming PE = '110001', then the corresponding IE = '1_0XX' (incremental numbering starts from 01), IE = '1_001' → IE = '1_00101', IE = '1_002' → IE = '1_00201'.
[0229] The fourth layer (Sub Unit Engineering layer - SUE coding), the Sub Unit Engineering layer (Sub Unit Engineering, referred to as SUE) is the most detailed unit in the sub-project, usually representing a sub-item of a specific task or operation. It further decomposes the work content of the sub-project, and each sub-unit project has an independent identifier. Coding rules: The SUE code is represented by adding a four-digit incremental number after the IE code, and the number increases from 0001. Coding format: SUE = IE + 'YY', where YY is a four-digit incremental number (starting from 0001). Assuming IE = '1_00101', then the corresponding SUE = '1_00101' + '0001' → SUE = '1_001010001', SUE = '1_001010002'.
[0230] The beneficial effects of the above technical solution are: through clear coding rules, a unique identifier can be assigned to each engineering unit, division, sub-item and sub-unit, making the project structure clearer and the management more standardized; the coding of each level provides a unified identification for project management, which is convenient for traceability, information sharing and data query between different levels; the coding rules provide flexibility for the subsequent addition of engineering units and engineering content, and new division projects or sub-items can continue to be added according to actual conditions.
[0231] In another embodiment, the unit projects, sub-projects, sub-items and sub-unit projects in the CAD drawings are coded and matched layer by layer, including:
[0232] Based on the preset hierarchical coding rule library, determine the coding rules corresponding to the unit engineering nodes and generate the unit engineering coding UE;
[0233] Input the unit engineering node and the corresponding encoding rule UE into the encoding matching algorithm;
[0234] For each sub-project under the unit project, generate the sub-project code PE according to the coding rule PE=UE+format(n,'02d'), and input the sub-project node and the corresponding code PE into the code matching algorithm;
[0235] For each sub-project under each branch project, generate the sub-project code IE according to the coding rule IE=PE[0]+'_'+PE[2]+format(m,'02d'), and input the sub-project node and the corresponding code IE into the code matching algorithm;
[0236] For each sub-unit project under each sub-project, generate the sub-unit project code SUE according to the coding rule SUE=IE+format(p,'04d'), and input the sub-unit project node and the corresponding code SUE into the code matching algorithm;
[0237] When all engineering nodes and their corresponding codes are input into the code matching algorithm, the hierarchical traversal of code matching begins;
[0238] During the code matching traversal process, the codes of unit projects, divisional projects, sub-item projects and sub-unit projects are matched layer by layer, and the matching paths and code relationships are recorded;
[0239] When the traversal is completed, at least one encoding matching result item fed back by the encoding matching algorithm is obtained;
[0240] Integrate the obtained encoding matching result items to obtain the final encoding matching result.
[0241] The working principle of the above technical solution is: according to the hierarchical structure of the project, a set of coding rule bases is preset so as to intuitively reflect the hierarchical relationship and order of the unit project and its subordinate sub-projects, sub-projects and sub-unit projects through coding. These rules include: Unit project coding rules (UE): composed of unique identification codes, for example, '11' represents the first unit project. Sub-project coding rules (PE): based on the unit project code (UE), a two-digit number format (n, '02d') is spliced after it. Sub-project coding rules (IE): extract part of the information from the sub-project code (PE), add the separator '_' and the two-digit number format (m, '02d'). Sub-unit project coding rules (SUE): based on the sub-project code (IE), a four-digit number format (p, '04d') is spliced after it.
[0242] Hierarchical coding generation, each layer of coding generation is based on the rules of the current layer and the coding results of the previous layer: Unit Engineering (UE): The unit engineering code is generated by a unique identifier set separately (for example: '11'); Partial Engineering (PE): Assuming that the current unit engineering code is UE, for the nth partial engineering under it: PE = UE + format (n, '02d'); when UE = '11', n = 1 generates PE = '1101'; n = 2 generates PE = '1102'.
[0243] Sub-project (IE): Assuming that the current sub-project code is PE, for the mth sub-project under it: IE = PE[0] + '_' + PE[2] + format(m, '02d'); Example: When PE = '1101', m = 1 generates IE = '1_101'; m = 2 generates IE = '1_102'.
[0244] Subunit engineering (SUE): Assuming that the current sub-project is coded as IE, for the pth subunit engineering under it: SUE = IE + format (p, '04d') Example: When IE = '1_101', p = 1 generates SUE = '1_1010001'; p = 2 generates SUE = '1_1010002'.
[0245] Code matching and traversal, node input: Each project node and the corresponding generated code (UE, PE, IE, SUE) are recorded and associated through the code matching algorithm. Hierarchical traversal: Match the coding relationship from top to bottom according to the hierarchy, and verify whether it meets the preset coding rules layer by layer. Record each matching path and coding relationship to build a complete hierarchical coding tree. Matching result integration: Aggregate the results of all matching paths into the final coding matching result for subsequent project management.
[0246] The beneficial effects of the above technical solution are as follows: the coding rules reflect the hierarchical relationship and logical order of the project structure, which is convenient for data management and query; the automatic generation and matching mechanism of the coding rules reduces the errors of manual coding and improves work efficiency; the coding itself reflects the hierarchical structure of the project, which is easy to understand and track the hierarchical relationship of each node; the coding format supports multi-level expansion and is suitable for the hierarchical management needs of complex projects.
[0247] In another embodiment, identifying the boundaries and relationships of the unit projects includes:
[0248] Based on the preset recognition rule library, multiple unit projects identified in the CAD drawings are determined;
[0249] Assign a unique identifier to each identified unit project, where the unique identifier is generated based on a preset identification rule;
[0250] If the boundaries and relationships of the unit projects meet the preset rules, the corresponding unit project identifier is used as the initial identifier;
[0251] Based on the preset verification rule base, verify the uniqueness and correctness of the initial identifier of each unit project;
[0252] If the verification is successful, the initial identifier is assigned to the corresponding unit project as the final identifier;
[0253] If the verification fails, the initial identifier is adjusted according to the preset adjustment rules until the uniqueness and correctness requirements are met;
[0254] Associating the final identifier with the corresponding unit project to form unit project identification information;
[0255] Integrate the unit project identification information to form a target project identification information set;
[0256] The identification information set is used as the identification configuration information of the target project to complete the identification and identification allocation.
[0257] The working principle of the above technical solution is as follows: through a set of preset rule bases, the system first parses and processes the CAD drawings to identify multiple unit projects. These rules can be automatically identified based on the geometric features, spatial relationships, etc. of the drawings; for each identified unit project, the system assigns it a unique identifier according to the preset identification rules. The identifier usually contains certain coding rules, such as project number, unit project number, serial number, etc., to ensure that the identifier of each unit project is unique; the system checks whether the boundaries of each unit project and the relationship between each other meet the preset rules. If it meets the prescribed boundary and relationship rules, the initial identifier is used as the identifier of the unit project; based on the preset verification rule base, the system verifies the uniqueness and correctness of the initial identifier of each unit project. The verification content includes whether there are duplicate identifiers, whether there is a conflict with other unit projects, etc.; if the initial identifier verification fails, the system will adjust the identifier accordingly according to the preset adjustment rules until it is ensured that the identifier meets the requirements of uniqueness and correctness. These adjustments can be made by incremental numbering, adding prefixes and suffixes, etc. When the initial identifier is adjusted and can pass the uniqueness and correctness verification, the final identifier will be determined and assigned to the corresponding unit project; the final identifier will be associated with the corresponding unit project to form the identification information of the unit project. This identification information will become the basis for subsequent workflows; the identification information of all unit projects is integrated into the identification information set of the target project. This information will be used for project management, progress tracking, quality control, etc.; finally, the system will output this identification information set as the identification configuration information of the target project to provide support for subsequent project management and information platforms.
[0258] The beneficial effects of the above technical solution are: automated identification and identification allocation greatly reduce the need for manual intervention, saving a lot of time and labor costs. Through systematic identification generation and allocation, engineers can focus more on other complex work content. Through strict verification rules, it can ensure that each unit project has a unique and correct identifier, avoiding confusion or errors in subsequent project management. The system effectively avoids identifier conflicts and duplications caused by manual operation negligence or inconsistent rules through automatic inspection and adjustment mechanisms.
[0259] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for automatically generating unit engineering codes through CAD drawings, characterized in that: include: S101: constructing a unit engineering hierarchical coding model based on a set coding division rule; S102: Obtain a CAD drawing of a target project, and extract parameter data in the CAD drawing, where the parameter data includes geometric information, hierarchical structure information, and related project attributes; S103: Determine specific rules of the hierarchical coding structure according to parameter data in the CAD drawing, and perform coding matching according to the unit engineering hierarchical coding model to obtain coding matching results; S104: Setting a division algorithm, the division algorithm includes reading CAD drawings, identifying unit projects, dividing sub-projects, dividing sub-items, dividing sub-unit projects, and generating codes; S105: Write a partitioning algorithm and output the unit engineering level code according to the code matching result.
2. The method for automatically generating unit engineering codes through CAD drawings according to claim 1, characterized in that: Step S101 includes: S1011: Based on the set coding division rule, a preliminary structure of the unit engineering hierarchical coding model is obtained, where the preliminary structure includes coding rules and logical relationships of each level; S1012: Use the 2-4-2-4 coding method to divide the unit project, clarify the four-level division standards and coding rules, and obtain the level division results; S1013: Based on the hierarchical division result and the coding rule, the unit project is automatically divided using the CAD drawing, and corresponding codes are generated to obtain automatic coding results; S1014: Combine the preliminary structure and the automatic encoding results to detect inconsistencies or redundancies in the unit engineering level encoding model. If a coding conflict is detected, the system will give corresponding prompts or suggestions.
3. The method for automatically generating unit engineering codes through CAD drawings according to claim 1, characterized in that: Step S102 includes: Based on the CAD drawing parsing model, obtain the CAD drawings of the target project; Pre-process CAD drawings, including cleaning redundant information, correcting errors, and ensuring that CAD drawings contain complete engineering structure information; Extract the geometric shape and size information of the engineering structure by parsing the CAD drawings; Extract material information from CAD drawings, identify and mark the material types, specifications and properties used in engineering structures; Parse and extract process information from CAD drawings, including welding methods, cutting methods, and assembly sequences, to guide the engineering construction process; Extract and organize the annotation and annotation information on CAD drawings; Identify and extract the hierarchical information of the engineering structure of CAD drawings, and clarify the levels of unit engineering, divisional engineering, sub-project engineering, and sub-unit engineering, so as to fully understand the entire engineering structure; Extract dimensional tolerance and surface treatment information from CAD drawings to ensure that the quality and appearance of the engineering structure meet the design requirements; Extract plan, elevation, section and axonometric information according to the scale and view of CAD drawings to provide a comprehensive display of engineering structures; Record and manage the number and version information of CAD drawings to facilitate tracking of changes and updates to drawings.
4. The method for automatically generating unit engineering codes through CAD drawings according to claim 1, characterized in that: Step S103 includes: S1031: Determine specific rules for unit engineering hierarchical coding according to hierarchical structure information in the CAD drawing; S1032: performing layer-by-layer coding matching according to the set layer coding rules and in combination with the parameter data in the CAD drawing; S1033: According to the hierarchical coding rules, the unit projects, sub-projects, sub-items and sub-unit projects in the CAD drawings are coded and matched layer by layer, and the matching results are obtained.
5. The method for automatically generating unit engineering codes through CAD drawings according to claim 1, characterized in that: Step S104 includes: Read the target CAD drawing file through the CAD software API or third-party library to extract the geometric information, spatial layout and annotation data in the CAD drawing file; According to the overall structure and design information in the CAD drawings, identify the boundaries and relationships of each unit project, and assign a unique identifier to each unit project according to preset rules; On the basis of each unit project, combined with the geometric information and process requirements in the CAD drawings, each unit project is divided into multiple sub-projects, and a unique identifier is assigned to each sub-project; Based on the details of each sub-project, combined with the more detailed design data and process requirements in the CAD drawings, each sub-project is divided into multiple sub-projects, and a unique identifier is assigned to each sub-project; Divide each sub-project into multiple sub-unit projects based on the detailed data of each sub-project, the specific structural information in the drawings and the process requirements, and assign a unique identifier to each sub-unit project; According to the identifiers assigned to each engineering unit, the corresponding hierarchical codes are generated to ensure the uniqueness and identifiability of each level of code. The coding format includes a combination of letters, numbers or other symbols.
6. The method for automatically generating unit engineering codes through CAD drawings according to claim 1, characterized in that: Step S105 includes: Initializing multiple encoding counters, including unit counters, sub-section counters, sub-item counters and sub-unit counters, for uniquely identifying unit projects at each level; Parse CAD drawing data and identify multiple unit projects through analysis; Divide the unit project into component projects layer by layer; In each component project, it is further divided into sub-projects; Generate hierarchical codes based on unit counters, part counters, item counters and sub-unit counters; Use structured coding to indicate the subordination and uniqueness of each unit project; Bind the hierarchical coding matching results to the parsed project structure and store them in a data structure list.
7. The method for automatically generating unit engineering codes through CAD drawings according to claim 2, characterized in that: Clarify the classification standards and coding rules of the four levels, including: Determine the four levels of unit engineering that need to be divided and define coding rules for each level; The first-level coding rules represent different structural types or engineering sub-items. The first-level coding uses two symbols to represent different unit engineering types; The second-level coding rules subdivide the units of the first level to represent different regions or functional divisions. The second-level coding specifies a specific location or function for each item in the first level. The third level coding rules represent different options for material types or construction methods in the project. The third level coding is used to further classify each item in the second level; The fourth-level coding rules further refine the units in the third level to represent specific units or details; After the coding rules of each layer have been clarified and executed, the engineering level division results formed by the coding rules are obtained.
8. The method for automatically generating unit engineering codes through CAD drawings according to claim 4, characterized in that: The set hierarchical encoding rules include: The first unit engineering layer is defined as UE code, which uniformly represents the identifier of the unit engineering; The second layer, the sub-project layer, is defined as PE code, which indicates the sub-project under each unit project; The third sub-project layer is defined as IE code, which indicates the specific sub-project under the sub-project; The fourth sub-unit project layer is defined as SUE code, which indicates the specific sub-unit project under the sub-project.
9. The method for automatically generating unit engineering codes through CAD drawings according to claim 4, characterized in that: Code and match the unit projects, sub-projects, sub-items and sub-unit projects in the CAD drawings layer by layer, including: Based on the preset hierarchical coding rule library, determine the coding rules corresponding to the unit engineering nodes and generate the unit engineering coding UE; Input the unit engineering node and the corresponding encoding rule UE into the encoding matching algorithm; For each sub-project under the unit project, generate the sub-project code PE according to the corresponding coding rules, and input the sub-project node and the corresponding code PE into the code matching algorithm; For each sub-project under each branch project, generate the sub-project code IE according to the corresponding coding rules, and input the sub-project node and the corresponding code IE into the code matching algorithm; For each sub-unit project under each sub-project, generate the sub-unit project code SUE according to the corresponding coding rules, and input the sub-unit project node and the corresponding code SUE into the code matching algorithm; When all engineering nodes and their corresponding codes are input into the code matching algorithm, the hierarchical traversal of code matching begins; During the code matching traversal process, the codes of unit projects, divisional projects, sub-item projects and sub-unit projects are matched layer by layer, and the matching paths and code relationships are recorded; When the traversal is completed, at least one encoding matching result item fed back by the encoding matching algorithm is obtained; Integrate the obtained encoding matching result items to obtain the final encoding matching result.
10. The method for automatically generating unit engineering codes through CAD drawings according to claim 5, characterized in that: Identify the boundaries and relationships of each unit project, including: Based on the preset recognition rule library, multiple unit projects identified in the CAD drawings are determined; Assign a unique identifier to each identified unit project, where the unique identifier is generated based on a preset identification rule; If the boundaries and relationships of the unit projects meet the preset rules, the corresponding unit project identifier is used as the initial identifier; Based on the preset verification rule base, verify the uniqueness and correctness of the initial identifier of each unit project; If the verification is successful, the initial identifier is assigned to the corresponding unit project as the final identifier; If the verification fails, the initial identifier is adjusted according to the preset adjustment rules until the uniqueness and correctness requirements are met; Associating the final identifier with the corresponding unit project to form unit project identification information; Integrate the unit project identification information to form a target project identification information set; The identification information set is used as the identification configuration information of the target project to complete the identification and identification allocation.