AI-based bim component automatic coding method and device, and medium
By using an AI-based automatic coding method for BIM components, and leveraging AI-optimized models and Revit API interfaces, the automatic coding of BIM components is achieved. This solves the problems of low efficiency and numerous errors in existing technologies, and improves the efficiency of digital management and the standardization of quality control in engineering projects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG SURVEY & DESIGN INST OF WATER CONSERVANCY
- Filing Date
- 2026-04-09
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, BIM component coding lacks automation, resulting in low efficiency, numerous errors, and difficulty in effectively linking with engineering project classification systems and industry coding standards, thus affecting the efficiency of digital management and control of projects and the standardization of quality control.
An AI-based automatic coding method for BIM components is adopted. By acquiring coding configuration data and the industry category of the project, the AI optimizes the model to build industry coding rules, and extracts target elements from the BIM model document using the Revit API interface for automatic coding. The uniqueness of the code is ensured through hash verification and string matching verification, thus achieving automated coding.
It improves coding efficiency, reduces error rate, ensures coding compliance and uniqueness, supports digital management of engineering projects, and reduces reliance on manual operations and rework costs.
Smart Images

Figure CN122286918A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to coding technology, and more particularly to an AI-based automatic coding method, apparatus and medium for BIM components. Background Technology
[0002] In the process of advancing digital engineering, mainstream tools such as Revit generally lack automatic coding functions adapted to engineering hierarchical divisions, requiring manual coding of massive amounts of components. This manual coding not only involves a large amount of repetitive work, resulting in low efficiency and difficulty in matching project schedules, but also easily introduces coding errors due to human factors, affecting the accuracy and standardization of coding. In addition, existing coding technologies are not effectively linked with engineering project division systems and industry coding standard data, leading to insufficient practicality of coding results and failing to meet the needs of domestic applications. This has become a key technical bottleneck restricting the efficiency of digital engineering management and affecting the implementation of quality control standards. Summary of the Invention
[0003] In order to overcome the shortcomings of the existing technology, one of the objectives of this invention is to provide an AI-based automatic coding method for BIM components, which can solve the problems of repetitive work, low efficiency and errors in the existing manual coding.
[0004] The second objective of this invention is to provide an AI-based automatic coding device for BIM components, which can solve the problems of repetitive work, low efficiency, and errors in existing manual coding.
[0005] The third objective of this invention is to provide a computer-readable storage medium that can solve the problems of repetitive work, low efficiency, and errors in existing manual coding.
[0006] One of the objectives of this invention is achieved through the following technical solution: An AI-based automatic coding method for BIM components, comprising: Configuration optimization steps: Obtain the coding configuration data and the industry category to which the project belongs, and perform AI optimization on the coding configuration data based on historical coding data and industry coding standard data to obtain optimized coding configuration data; Element extraction steps: Obtain user coding requirements and filter target elements from the BIM model document according to user coding requirements, and traverse each target element to obtain the attribute information of each target element. Encoding steps: Obtain the encoding method according to the user's encoding requirements, and encode each target element sequentially by combining the optimized encoding configuration data and the encoding method; Judgment steps: After obtaining the encoded value of each target element, determine whether there is a conflict between the encoded values of the corresponding target elements. If so, adjust the encoded value of the target element according to the reason for the conflict and generate a new encoded value, and then execute the judgment steps; if not, encode the next target element. Attribute update steps: After all target elements have been encoded, update the encoded value of each target element to the corresponding attribute information.
[0007] Furthermore, the determination of whether the encoded value of the corresponding target element has a conflict specifically includes: Step 1, determining whether the encoded value of the corresponding target element has a conflict according to the hash verification method; if yes, the encoded value of the target element has a conflict; if no, proceed to Step 2. Step 2: Determine whether there is a conflict in the encoding value of the corresponding target element according to the string matching verification method. If yes, the encoding value of the target element has a conflict; if no, the encoding value of the target element does not have a conflict. The step of determining whether there is a conflict in the encoded value of the corresponding target element according to the hash verification method specifically includes: converting the string of the encoded value of the corresponding target element into a hash value of fixed length and matching the hash value of the corresponding target element with the encoded value of each element in the same project in the system to determine whether there is a conflict in the encoded value of the corresponding target element; The step of determining whether there is a conflict in the encoded value of the corresponding target element according to the string matching verification method specifically includes: matching the string of the encoded value of the corresponding target element with the encoded value of each element in the same project in the system according to the string matching verification method to determine whether there is a conflict in the corresponding target element.
[0008] Furthermore, the step of adjusting the encoding value of the target element according to the cause of the conflict to generate a new encoding value specifically includes: first, determining the adjustment parameters according to the cause of the conflict; then, matching the corresponding preset adjustment rules according to the adjustment parameters; then, adjusting the corresponding parameters according to the preset adjustment rules; and finally, concatenating the adjusted parameters with the remaining encoding value parameters to generate a new encoding value. The conflict causes include duplicate serial numbers, conflicts between encoding formats and industry rules, and encoding length overflow. When the conflict cause is duplicate serial numbers, the adjustment parameter is the serial number. When the conflict cause is a conflict between the encoding format and industry standards, the adjustment parameter is a preset constant / connector dimension. When the conflict cause is encoding length overflow, the adjustment parameter is a preset zero-padding number. When the adjustment parameter is the serial number, a global counter is incremented to generate a new serial number. When the adjustment parameter is a preset constant / connector, the preset constant / connector is replaced with the industry standard value recommended by the AI optimization model. When the adjustment parameter is a preset zero-padding number, the preset zero-padding number is expanded to the corresponding number of bits according to the total number of target elements to be encoded. In the judgment step, when there is a conflict in the encoding value of the corresponding target element, the Revit API interface exception is captured to find out the cause of the conflict, and the transaction rollback and error log are triggered.
[0009] Furthermore, the encoding step specifically includes: Step 1: Based on the optimized encoding configuration parameters, determine the preset zero-padding length, preset constants, and connectors, and determine the encoding method based on the user's encoding requirements; Step 2: Construct a global counter based on the system's internal counters, and set the starting value of the global counter in combination with the encoding method. Then, generate the serial number of each target element in sequence based on the starting value, the preset zero padding number, and the global counter. Step 3: Generate the encoded value of each target element by concatenating the preset constants, connectors, and serial numbers according to the encoding concatenation rules.
[0010] Furthermore, when the encoding method is a sequential encoding method, generating the serial number of each target element according to the starting value, the preset zero-padding number and the global counter specifically includes: sequentially traversing the target elements, and while traversing the target elements, incrementing the global counter by 1 from the starting value, and generating the serial number of the corresponding target element in combination with the preset zero-padding number. When the encoding method is a non-sequential encoding method, generating the serial number of each target element according to the starting value, the preset zero padding number and the global counter specifically includes: selecting the starting value of the global counter according to the user-preset number range, then traversing each target element and sequentially selecting the numbers in the corresponding range and the preset zero padding number to generate the serial number of each target element.
[0011] Furthermore, the element extraction steps are as follows: First, the user-configured filtering conditions are obtained from the UI interface of the coding configuration to obtain the user coding requirements, and the user coding requirements are converted into filtering rules of the Revit API interface; then, a filter is constructed using the FilteredElementCollector class of the Revit API interface to extract elements that meet the filtering conditions from the element database of the BIM model document and use them as target elements; finally, the BIM model document is traversed according to the filtered target elements to obtain the attribute information of each target element.
[0012] Furthermore, prior to the attribute update step, the method includes: validating the encoded value of each target element, and generating a rollback Revit transaction and an error message when the validation fails. The validity verification includes format verification, rule verification, and data adaptation verification. Format verification uses regular expression matching to check the encoded value, including verifying the character composition and length of the encoded value to ensure consistency with the optimized encoding configuration data and the presence of illegal characters. Rule verification compares character slices with preset rules one by one, including verifying whether the concatenation order of the encoded value conforms to preset encoding concatenation rules and whether preset constant segments contain the professional code corresponding to the project type. Data adaptation verification checks the format by calling the metadata of the BIM model attribute fields, including verifying whether the format of the encoded value matches the data type and character length limits of the corresponding attribute fields in the BIM model.
[0013] Furthermore, the configuration optimization step specifically includes: Data mining is performed on industry coding standard data and historical coding data for each industry category, and AI optimization models for different industry categories are constructed by combining them with large AI models. By providing a UI interface for coding configuration to users, the system obtains the coding configuration data and project type input by the users, and then matches and derives the corresponding AI optimization model based on the project type. The system performs a validity check on the user-input encoding configuration data based on the corresponding AI optimization model, generates optimization suggestions based on the validation results, and pushes the optimization suggestions to the user so that the user can optimize the encoding configuration data according to the optimization suggestions to obtain the optimized encoding configuration data. The encoding configuration data includes encoding value parameters, which include preset constants, connectors, and preset zero-padding digits. The validation of the user-input encoding configuration data includes: validation of the preset constants, validation of the connectors, and validation of the preset zero-padding digits. The validation of the preset constants includes determining whether the user-input preset constants contain the professional code corresponding to the project type. The validation of the connectors includes determining whether the connectors conform to industry coding standards. The validation of the preset zero-padding digits includes determining whether the preset zero-padding digits meet the requirements.
[0014] The second objective of this invention is achieved by the following technical solution: The AI-based automatic coding device for BIM components includes a memory and a processor. The memory stores an automatic coding program for BIM components that runs on the processor. The automatic coding program for BIM components is a computer program. When the processor executes the automatic coding program for BIM components, it implements the steps of the AI-based automatic coding method for BIM components as one of the objectives of this invention.
[0015] The third objective of this invention is achieved by the following technical solution: A computer-readable storage medium storing a BIM component automatic coding program thereon, the BIM component automatic coding program being a computer program, wherein when executed by a processor, the BIM component automatic coding program implements the steps of an AI-based BIM component automatic coding method as one of the objectives of this invention.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention optimizes coding configuration parameters by analyzing historical coding data and industry coding standard data. The optimized coding configuration parameters are then applied to the automatic coding of BIM model construction, replacing traditional manual coding. This solves the problems of cumbersome operation, low efficiency, and high error rate associated with manual coding. Attached Figure Description
[0017] Figure 1 A flowchart of the AI-based automatic coding method for BIM components provided by the present invention. Detailed Implementation
[0018] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments. It should be noted that, without conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments. Example 1
[0019] To address the shortcomings of existing BIM component coding methods, this invention provides an AI-based automatic BIM component coding method, such as... Figure 1 As shown, it includes: Step S1: Obtain the coding configuration data and the industry category to which the project belongs, and perform AI optimization on the coding configuration data based on historical coding data and industry coding standard data to obtain optimized coding configuration data.
[0020] By providing users with a UI interface for corresponding coding configurations, the system obtains the coding configuration data input by the user and the industry category to which the project belongs. Then, it optimizes the coding configuration data input by the user by combining historical coding data and industry coding standard data, so that the coding configuration data is more in line with the actual coding needs.
[0021] This invention employs a large-scale AI model to assist in learning coding rules for different industry categories. Coding rules are mined from historical coding data and industry coding standard data, among other data related to coding rules, to construct AI optimization models for different industry categories. These AI optimization models are then used to optimize and standardize user-input coding configuration data, making the coding configuration data more compliant with industry standards. In other words, by performing data mining based on industry coding standard data and historical coding data, and combining this with a large-scale AI model, AI optimization models for different industries are constructed and pre-stored in the system for later use in configuration optimization.
[0022] Meanwhile, after optimizing the user-input encoding configuration data through the AI optimization model, the optimization results will generate optimization suggestions and push these suggestions to the user so that the user can optimize and adjust the encoding configuration data according to the suggestions.
[0023] More preferably, the coding configuration data includes attribute names and coding value parameters. The coding value parameters include preset constants, connectors, and preset zero-padding digits. The attribute name refers to the target attribute field name used to store BIM components in the BIM model. It is generally the editable attribute name of the BIM component in the Revit tool, supporting system presets or user-defined names. For example, fields such as "Component Code" and "Professional Code" in the BIM model, or user-defined attribute field names such as "JL-Code" and "SL-Component Number" based on project requirements, are all attribute names in the coding configuration data. The attribute name is the core positioning identifier in the entire system. Without an attribute name, the coding of BIM components cannot be completed, and the binding of the coded value to the BIM component cannot be achieved; that is, the coding of the BIM component cannot be completed. Specifically, the system can accurately match the corresponding editable field in the attribute set of the BIM component based on the attribute name in the coding configuration parameters, using it as the unique storage location for the generated coded value. If no attribute name is configured or the attribute name is empty, the system will not be able to determine which attribute field of the BIM component the coded value should be written to, directly leading to the failure of the coded value implementation.
[0024] Furthermore, during the validity verification phase, the system can check if the attribute name is not empty. If so, it automatically queries the corresponding BIM component's attribute metadata based on the attribute name, pre-checking if the attribute field is editable (excluding read-only attributes). If it is read-only, the validity verification fails, and the user is prompted to change the attribute name. This avoids transaction rollbacks caused by the attribute being unwritable after subsequent code value generation, improving coding process efficiency. Moreover, the attribute name can also serve as a unified identifier for batch updates and traceability of code values: BIM components under the same project type store their code values using a unified attribute name, enabling batch reading, batch updating, and batch verification of code values. Simultaneously, in subsequent project management (such as cost accounting, construction control, and model traceability), staff can quickly retrieve the code values of BIM components using this attribute name, ensuring the retrievability and management consistency of the code data.
[0025] The encoded value parameters include preset constants, connectors, and preset zero-padding positions, which serve as the rules for generating the encoded value. When the encoded value parameters input by the user are obtained, an AI optimization model is also used to verify the reasonableness of the user-input encoded value parameters to ensure that the encoded value parameters conform to industry standards and historical encoded data.
[0026] The rationality verification of preset constants includes determining whether the preset constants input by the user contain the professional code corresponding to the project type; for example, for water conservancy projects, the preset constants need to include the professional code SL-, and for beam components in building construction projects, the preset constants need to include L-. When the AI optimization model receives the coded configuration data, it automatically verifies the configuration definition of the preset constants in the coded configuration data. If the verification fails, it will provide a prompt suggesting that the professional code preset constants be added, such as adding SL-. Through this optimization suggestion, the coded configuration data can be made to comply with the coding requirements of the "Code for Inspection and Evaluation of Construction Quality of Water Conservancy and Hydropower Engineering".
[0027] The validity check of connectors includes determining whether the connectors conform to industry coding standards. For example, if the user currently selects "_" as the connector, but the usage rate of the connector "-" in similar projects reaches 85% and conforms to industry coding standards, the system will suggest changing the connector to "-" to improve code readability and industry compatibility.
[0028] The validity check of the preset zero-padding digits includes determining whether the preset zero-padding digits meet the requirements; and by counting the total number of target elements to be encoded in the current project. If the user sets the zero-padding digits to 2, but the total number of elements to be encoded is 150, it is obvious that the serial number needs at least 3 zero-padding digits. Therefore, the AI suggests: There are approximately 150 elements to be encoded, and a 2-digit serial number may overflow. It is recommended to adjust it to 3 zero-padding digits, as shown in the example format: SL-001.
[0029] After verifying and optimizing the user-input coding configuration data using an AI optimization model, optimization suggestions are pushed to the user so that they can further optimize their coding configuration data to obtain the optimized configuration data for subsequent optimization. This invention uses data mining to extract coding requirements for corresponding industry categories by loading industry coding standard data and historical coding data. Then, it automatically optimizes the coding configuration data to ensure compliance with industry standards, guaranteeing both coding compliance and the preservation of the user's personalized coding.
[0030] Step S2: Obtain user coding requirements and filter target elements from the BIM model document according to user coding requirements, and traverse each target element to obtain the attribute information of each target element.
[0031] User coding requirements are determined by the user and can be specifically defined through the preset "element filtering conditions" in the coding configuration UI. The specific filtering logic is as follows: While inputting the coding configuration data, users can simultaneously select the corresponding target element category on the UI interface. For example, in the construction industry, users can select: beams, columns, slabs, walls, doors and windows, etc.; in the water conservancy industry, users can select: sluice gates, corridors, spillways, etc. Alternatively, users can input element type IDs and family name keywords as filtering conditions to determine the coding requirements, that is, the category of the target element that needs to be coded.
[0032] After receiving the user-configured filter conditions, the system converts these conditions into filtering rules recognizable by the Revit API interface. Then, it constructs a filter using the FilteredElementCollector class to select elements from the BIM model document that meet the filter conditions as target elements. Temporary auxiliary components and hidden invalid components are not included in the coding scope.
[0033] Furthermore, while filtering out the corresponding target elements according to the filtering conditions, this invention also obtains the attribute information of the target elements, including attribute category, specific data items, data source, and core function, as shown in Table 1: Attribute Category Specific data items Data source core role Identity identification class Element ID, Unique GUID Revit model built-in metadata Uniquely locates the target element for precise matching during code conflict comparison and attribute updates. Category Classification Element category, such as structural column, curtain wall; family name, such as concrete rectangular column; type name, such as C40-600×600 The Category property of the Revit API interface Differentiate element types, support grouping and coding by category, and ensure a strong correlation between coding and component type. Basic attribute class Creation time, creator, view ID, visibility Revit Model Basic Properties Selecting valid components facilitates coding, traceability, and management. Geometric parameter class Cross-sectional dimensions, length / height, material name The Parameters property of the Revit API interface Providing physical characteristic data of components can serve as a basis for business classification using non-sequential coding. Spatial location class Floor, zone, and coordinates Location property of the Revit API interface Supports spatial location grouping and encoding, adapting to the requirements of non-sequential encoding for interval division. Preset attribute class Component number, professional code Revit Model Preset Property Fields Compare with the generated encoded value to avoid collisions. Attribute Category Specific data items Data source core role Custom attribute class Project custom fields Users can customize properties through Revit. As a supplementary basis for coding classification, such as assigning coding intervals according to construction work teams. Encoding association class The current value, data type, and character length limit of the target attribute field. The LookupParameter method of the Revit API interface Determine the storage location of the encoded value and verify its compatibility with the field, such as whether the character length exceeds the limit. Table 1 This invention utilizes the Revit API interface to traverse BIM model files. The Revit API is an application programming interface provided by Autodesk Revit tools for secondary development, automated tasks, and functional extensions. The FilteredElementCollector class is the core filtering tool of the Revit API interface. In this invention, filtering of target elements does not involve document segmentation, but rather precisely locates the target element through the API's built-in filtering mechanism, eliminating the need to traverse the entire BIM model document and improving traversal efficiency. Specifically, the FilteredElementCollector class supports multiple filtering modes, including category filtering, family filtering, and rule filtering. After determining the category of the user-defined target element based on the user's filtering criteria, the system calls API methods such as OfCategory(BuiltInCategory.OST_StructuralColumns) to directly extract the element set of the corresponding category from the element database of the BIM model document, without scanning elements of other categories. Because Revit model element data is stored indexed by dimensions such as category and ID, the filter can directly locate the target element set through the index, and then traverse each target element. The traversal efficiency is more than 80% higher than traversing the entire document. For example, for a model with 10,000 elements, when filtering the element "structural column", only 1,500 elements need to be traversed, instead of all 10,000 elements.
[0034] When the target elements are selected, the selected target element set is traversed to extract the attribute information of each element. This way, elements that do not meet the selection criteria will not enter the traversal process, thus avoiding blindly traversing the entire BIM model document from the source, which would lead to low overall traversal efficiency.
[0035] More preferably, when traversing the target elements, the present invention also extracts the attribute information of the target elements through the Revit API interface, and derives the key information of each target element based on the attribute information.
[0036] Among them, attribute information is the complete data set of the target element, containing all extractable attribute data such as the element's identity, category, geometric features, spatial location, and custom fields, and is the foundation for key information. Key information is the core subset of data extracted from the attribute information of the target element, containing only the key fields necessary for the encoding process, used to quickly support core operations such as code generation and conflict detection, and avoiding efficiency impacted by data redundancy.
[0037] When the attribute information of each target element is obtained through iteration, the attribute information is also encapsulated into an ElementInfo data structure and stored in the element collection in memory.
[0038] Step S3: Obtain the encoding method according to the user's encoding requirements, and encode each target element in sequence with the optimized encoding configuration data and encoding method.
[0039] Encoding methods include sequential encoding and non-sequential encoding. Sequential encoding generates serial numbers according to the traversal order, pads them with zeros according to a preset number of zeros, and then concatenates them with preset constants and connectors to form the code for each target element.
[0040] For example: Based on the encoding configuration parameters, when the preset constant is JL-, the connector is -, the preset zero padding number is 3, and the encoding method is sequential encoding: set the global counter to start at 1, and traverse the three target elements of beam, column, and slab in sequence according to the preset zero padding number and sequential encoding method to generate serial numbers as 001, 002, and 003. Then, concatenate the preset constant, connector, and serial number to generate the encoding value of each target element, which are JL-001, JL-002, and JL-003 respectively.
[0041] Non-sequential encoding refers to generating a serial number by selecting numbers within a range of numbers preset by the user (the range of numbers is a continuous / segmented range of numbers set by the user according to the business requirements such as the hierarchy and partitioning of project components), and then concatenating it with preset constants and connectors to form the code for each target element.
[0042] For example: Based on the encoding configuration parameters, the preset constant is JL-, the connector is -, and the preset zero padding is 3. When the user sets the non-sequential encoding range to 100-199 (Zone 1) and 200-299 (Zone 2) according to the project partition: the global counter starts at 100. For beam and column elements in Zone 1, serial numbers 101 and 102 are generated, corresponding to the encoding values JL-101 and JL-102. For slab and wall elements in Zone 2, serial numbers 201 and 202 are generated, corresponding to the encoding values JL-201 and JL-202.
[0043] The specific encoding method can be selected according to the user's settings.
[0044] That is, step S3 also includes: first, obtaining the preset zero-padding number, preset constant, and connector based on the optimized encoding configuration parameters, and obtaining the encoding method based on the user's encoding requirements; then, constructing a global counter based on the system's internal counter, and setting the starting value of the global counter in conjunction with the encoding method, and then generating the serial number of each target element sequentially based on the starting value, the preset zero-padding number, and the global counter; and finally, generating the encoded value of each target element by concatenating the preset constant, connector, and serial number according to the encoding concatenation rules. The preferred encoding concatenation order is preset constant + connector + serial number.
[0045] Step S4: After obtaining the encoded value of each target element, determine whether there is a conflict between the encoded values of the corresponding target elements. If so, proceed to step S5; otherwise, encode the next target element.
[0046] To ensure the uniqueness of the encoded values of target elements, this invention also performs conflict detection on the encoded values of each generated target element. A conflict prediction algorithm is constructed within the system to determine whether the encoded values of each generated target element conflict. Specifically, when determining whether a conflict exists, the system compares and matches already encoded elements of the same item type to ensure the uniqueness of the encoded values of different elements.
[0047] Preferably, the encoding conflict prediction algorithm used in this invention includes a hash verification method and a string matching verification method. The hash verification method involves converting the encoded string into a fixed-length hash value (e.g., 20 bytes) based on a non-encrypted hash function, and then comparing the hash value of the encoded string with the hash value of the encoded string of each element in the same project within the system to determine if a conflict exists. The hash verification method can quickly determine whether a target element's encoding has a conflict, improving judgment efficiency. By accurately identifying the uniqueness of the encoding, subsequent write failures can be avoided.
[0048] When the hash verification method determines that the target element's encoding does not conflict, this invention further verifies the target element's encoding value using a string matching verification method to eliminate false judgments caused by hash collisions and ensure the accuracy of conflict identification. That is, the string matching verification method matches the string of the target element's encoding value with the encoding value of each element in the same project within the system to determine whether the corresponding target element conflicts. Furthermore, in the string matching verification method, if the character sequences are completely identical and the target element's attribute information overlaps with similar components in the same project, the target element's encoding value is considered to conflict. Conversely, if the characters in the character sequences are inconsistent, or the target element's attribute information does not overlap with similar components in the same project, the target element's encoding value is considered not to conflict. In other words, if the characters in the character sequences are completely identical but the element's attribute information does not overlap (e.g., they belong to the same type of component at different project levels), this situation is considered a pseudo-conflict, and its encoding value will not be adjusted.
[0049] More preferably, when performing string matching and verification, the present invention also adopts a short-circuit comparison mechanism. Once a mismatch is found, the comparison of the remaining characters is immediately terminated, reducing invalid operations and improving computational efficiency.
[0050] This invention first achieves fast collision detection through hash verification, and then further supplements the hash verification method with string matching verification, which can ensure both the efficiency and accuracy of collision detection.
[0051] Step S5: Adjust the encoding value of the target element according to the cause of the conflict to generate a new encoding value, and then execute step S4.
[0052] When there is a conflict in the encoding value of the target element, it is necessary to adjust its encoding value to generate a new encoding value. Specifically, step S5 also includes: first, determining the adjustment dimension based on the cause of the conflict, then obtaining the preset adjustment rule based on the adjustment dimension, then adjusting the parameters of the corresponding dimension according to the preset adjustment rule, and then generating a new encoding value according to the splicing rule.
[0053] Conflicts can be caused by factors such as duplicate encoded values, conflicts between encoding formats and industry standards, and overflowing encoding length. Specifically, when the conflict is caused by duplicate encoded values, the adjustment dimension is the serial number dimension. When the conflict is caused by a conflict between the encoding format and industry standards, the adjustment dimension is the preset constant / connector dimension. When the conflict is caused by overflowing encoding length, the adjustment dimension is the preset zero-padding dimension.
[0054] When the adjustment dimension is the serial number dimension, a global counter is used to increment to form a new serial number to avoid conflicts; when the adjustment dimension is the preset constant / connector dimension, the preset constant / connector is replaced with the industry standard value recommended by the AI optimization model; when the adjustment dimension is the preset zero-padding dimension, the number of bits is expanded to the appropriate number of bits according to the total number of elements to be encoded.
[0055] Once the adjustment is complete, return to step S5 to determine if the new encoded value conflicts, and repeat this process until no conflict occurs.
[0056] Furthermore, when a conflict exists between target elements, while adjusting their encoded values, the system also triggers a transaction rollback and generates an error log by capturing Revit API interface exceptions (such as read-only attributes or insufficient permissions) so that exceptions can be traced later.
[0057] Step S6: After the encoding of each target element is completed, update the encoding value of each target element to the attribute information of the corresponding target element.
[0058] More preferably, to ensure the legality of the encoded values of target elements, this invention also performs legality verification on the encoded values of each target element after encoding. The core of conflict verification is to verify the uniqueness of the encoded values, avoiding duplicate encoded values within the same encoding system; while the core of legality verification is to verify the compliance of the encoded values, ensuring that the encoded values conform to preset encoding rules, industry standards, and the format requirements of BIM model attribute data. The two verification dimensions and purposes are completely different. This invention, through these two verification methods, can ensure the rationality and legality of the encoded values.
[0059] More specifically, validity verification includes format verification, rule verification, and data compatibility verification. Format verification uses regular expression matching to check the encoded value, including verifying the character composition and length of the encoded value to ensure consistency with the optimized encoding configuration data and the presence of illegal characters. Rule verification compares character slices against preset rules one by one, including verifying whether the concatenation order of the encoded value conforms to preset encoding concatenation rules and whether preset constant segments contain the professional codes corresponding to the project type. Data compatibility verification checks the format by calling the metadata of the BIM model attribute fields, including verifying whether the format of the encoded value matches the data type and character length limits of the corresponding attribute fields in the BIM model.
[0060] When the validity check of the target element's encoded value fails, the system also needs to roll back the Revit API interface and display an error message. The Revit API interface serves as the interaction bridge between the Revit tool and the BIM model document. It enables core operations such as reading the BIM model document, traversing and extracting target elements, reading and writing element attribute information, writing and updating encoded values, and starting / committing / rolling back transactions. It is the technical foundation for this method to be implemented in the Revit tool.
[0061] This invention utilizes an AI module to learn from historical coding data and industry coding standards, generating personalized optimization suggestions for coding configuration data. This avoids issues caused by users lacking industry experience or failing to consider project specifics, resulting in unreasonable coding configuration data. The goal is to make the coding configuration data more aligned with actual project needs, reducing subsequent coding adjustment costs and improving data adaptability. Furthermore, the system automates element coding, replacing traditional manual coding methods. This reduces coding work that previously took hours or even days to minutes, increasing efficiency by tens of times. It also avoids omissions, duplications, and formatting errors common in manual input, ensuring the completeness and consistency of the coding. This invention enables matching coding of BIM components and provides a unified coding standard, improving component standardization and providing a reliable data foundation for subsequent cost accounting, construction management, and operation and maintenance management. Simultaneously, it guarantees the uniqueness of element codes, enhancing the retrievalability of model data.
[0062] This invention also eliminates the subjectivity and randomness of manual coding through automated calculation and writing mechanisms, uniqueness verification and transaction rollback mechanisms, reducing the error rate from about 5%-10% of manual operation to close to 0, reducing rework costs caused by coding errors, and reducing reliance on human expertise.
[0063] This invention enables element traversal and attribute reading / writing based on the Revit API interface, achieving deep integration with Revit tools. It eliminates the need for frequent export / import of external data, maintaining the integrity and relevance of BIM component data. Simultaneously, it employs a transaction mechanism to handle data updates, ensuring the atomicity of coding operations. In case of an anomaly, it can automatically roll back, avoiding damage to the stability of Revit project files. Example 2
[0064] Based on Embodiment 1, the present invention also provides an AI-based automatic encoding device for BIM components, including a memory and a processor. The memory stores an automatic encoding program for BIM components that runs on the processor. The automatic encoding program for BIM components is a computer program. When the processor executes the automatic encoding program for BIM components, it performs the following steps: Configuration optimization steps: Obtain coding configuration data and the industry category to which the project belongs, and perform AI optimization on the coding configuration data based on historical coding data and industry coding standard data to obtain optimized coding configuration data; Element extraction steps: Obtain user coding requirements and filter target elements from the BIM model document according to user coding requirements, and traverse each target element to obtain the attribute information of each target element. Encoding steps: Obtain the encoding method according to the user's encoding requirements, and encode each target element in sequence based on the optimized encoding configuration data and the encoding method; Judgment steps: After obtaining the encoded value of each target element, determine whether there is a conflict between the encoded values of the corresponding target elements. If so, adjust the encoded value of the target element according to the reason for the conflict and generate a new encoded value, and then execute the judgment steps; if not, encode the next target element. Attribute update steps: After all target elements have been encoded, update the encoded value of each target element to the corresponding attribute information.
[0065] Furthermore, determining whether there is a conflict in the encoded value of the corresponding target element specifically includes: Step 1: Determine whether there is a conflict in the encoded value of the corresponding target element according to the hash verification method. If yes, then there is a conflict in the encoded value of the target element; if no, proceed to Step 2. Step 2: Determine whether there is a conflict in the encoding value of the corresponding target element according to the string matching verification method. If yes, the encoding value of the target element has a conflict; if no, the encoding value of the target element does not have a conflict. Determining whether there is a conflict in the encoded value of the corresponding target element according to the hash verification method specifically includes: converting the string of the encoded value of the corresponding target element into a fixed-length hash value, and matching the hash value of the corresponding target element with the encoded value of each element in the same project in the system to determine whether there is a conflict in the encoded value of the corresponding target element; Determining whether there is a conflict in the encoded value of the corresponding target element according to the string matching verification method specifically includes: matching the string of the encoded value of the corresponding target element with the encoded value of each element in the same project in the system to determine whether there is a conflict in the corresponding target element.
[0066] Furthermore, the process of adjusting the encoding value of the target element according to the cause of the conflict to generate a new encoding value specifically includes: first, determining the adjustment parameters according to the cause of the conflict; then, matching the corresponding preset adjustment rules according to the adjustment parameters; then, adjusting the corresponding parameters according to the preset adjustment rules; and finally, concatenating the adjusted parameters with the remaining encoding value parameters to generate a new encoding value. Conflict causes include duplicate serial numbers, conflicts between encoding formats and industry rules, and encoding length overflow. When the conflict is due to duplicate serial numbers, the parameter is adjusted to the serial number. When the conflict is due to conflicts between encoding formats and industry standards, the parameter is adjusted to a preset constant / connector dimension. When the conflict is due to encoding length overflow, the parameter is adjusted to a preset number of zero-padding bits. When the parameter is a serial number, a global counter is incremented to generate a new serial number. When the parameter is a preset constant / connector, the preset constant / connector is replaced with the industry standard value recommended by the AI optimization model. When the parameter is a preset number of zero-padding bits, the preset number of zero-padding bits is expanded to the corresponding number of bits based on the total number of target elements to be encoded. When a conflict occurs in the encoding value of the corresponding target element during the judgment step, a Revit API interface exception is captured to determine the cause of the conflict, and a transaction rollback and error log are generated.
[0067] Furthermore, the encoding steps specifically include: Step 1: Based on the optimized encoding configuration parameters, determine the preset zero-padding length, preset constants, and connectors, and determine the encoding method based on the user's encoding requirements; Step 2: Construct a global counter based on the system's internal counters, and set the starting value of the global counter in combination with the encoding method. Then, generate the serial number of each target element in sequence based on the starting value, the preset zero padding number, and the global counter. Step 3: Generate the encoded value of each target element by concatenating the preset constants, connectors, and serial numbers according to the encoding concatenation rules.
[0068] Furthermore, when the encoding method is sequential encoding, generating the serial number of each target element according to the starting value, the preset zero-padding number and the global counter specifically includes: traversing the target elements sequentially, and incrementing the global counter by 1 from the starting value while traversing the target elements, and generating the serial number of the corresponding target element in combination with the preset zero-padding number. When the encoding method is non-sequential encoding, the serial number of each target element is generated sequentially based on the starting value, the preset zero padding number, and the global counter. Specifically, this includes: selecting the starting value of the global counter according to the user-preset number range, then traversing each target element and sequentially selecting the numbers in the corresponding range and the preset zero padding number to generate the serial number of each target element.
[0069] Further, the element extraction steps are as follows: First, obtain the user-configured filtering conditions from the coding configuration UI to obtain the user coding requirements, and convert the user coding requirements into filtering rules of the Revit API interface; then, construct a filter using the FilteredElementCollector class of the Revit API interface to extract elements that meet the filtering conditions from the element database of the BIM model document, and use them as target elements; finally, traverse the BIM model document according to the filtered target elements to obtain the attribute information of each target element.
[0070] Furthermore, prior to the attribute update step, the following steps are also included: validating the encoded value of each target element, and generating a rollback Revit transaction and an error message when the validation fails; The validity verification includes format verification, rule verification, and data adaptation verification. Format verification verifies the encoded value through regular expression matching, including checking whether the character composition and length of the encoded value are consistent with the optimized encoding configuration data and whether it contains illegal characters. Rule verification verifies the value by comparing character slices with preset rules one by one, including checking whether the concatenation order of the encoded value conforms to the preset encoding concatenation rules and whether the preset constant segment contains the professional code corresponding to the project type. Data adaptation verification verifies the format by calling the metadata of the BIM model attribute fields, including checking whether the format of the encoded value matches the data type and character length limit of the corresponding attribute field in the BIM model.
[0071] Furthermore, the configuration optimization steps specifically include: Data mining is performed on industry coding standard data and historical coding data for each industry category, and AI optimization models for different industry categories are constructed by combining them with large AI models. By providing users with a UI interface for coding configuration, the system obtains the coding configuration data and project type input by the user, and then matches the corresponding AI optimization model based on the project type. The AI optimization model is used to verify the rationality of the user's input encoding configuration data and generate optimization suggestions based on the verification results. The optimization suggestions are then pushed to the user so that the user can optimize the encoding configuration data according to the optimization suggestions to obtain the optimized encoding configuration data. The encoding configuration data includes encoding value parameters, which include preset constants, connectors, and preset zero-padding digits. The validity verification of user-input encoding configuration data includes: validity verification of preset constants, validity verification of connectors, and validity verification of preset zero-padding digits. The validity verification of preset constants includes determining whether the user-input preset constants contain the professional code corresponding to the project type; the validity verification of connectors includes determining whether the connectors conform to industry coding standards; and the validity verification of preset zero-padding digits includes determining whether the preset zero-padding digits meet the requirements. Example 3
[0072] Based on Embodiment 1, the present invention also provides a computer-readable storage medium storing a BIM component automatic coding program thereon. The BIM component automatic coding program is a computer program, and when executed by a processor, it performs the following steps: Configuration optimization steps: Obtain coding configuration data and the industry category to which the project belongs, and perform AI optimization on the coding configuration data based on historical coding data and industry coding standard data to obtain optimized coding configuration data; Element extraction steps: Obtain user coding requirements and filter target elements from the BIM model document according to user coding requirements, and traverse each target element to obtain the attribute information of each target element. Encoding steps: Obtain the encoding method according to the user's encoding requirements, and encode each target element in sequence based on the optimized encoding configuration data and the encoding method; Judgment steps: After obtaining the encoded value of each target element, determine whether there is a conflict between the encoded values of the corresponding target elements. If so, adjust the encoded value of the target element according to the reason for the conflict and generate a new encoded value, and then execute the judgment steps; if not, encode the next target element. Attribute update steps: After all target elements have been encoded, update the encoded value of each target element to the corresponding attribute information.
[0073] Furthermore, determining whether there is a conflict in the encoded value of the corresponding target element specifically includes: Step 1: Determine whether there is a conflict in the encoded value of the corresponding target element according to the hash verification method. If yes, then there is a conflict in the encoded value of the target element; if no, proceed to Step 2. Step 2: Determine whether there is a conflict in the encoding value of the corresponding target element according to the string matching verification method. If yes, the encoding value of the target element has a conflict; if no, the encoding value of the target element does not have a conflict. Determining whether there is a conflict in the encoded value of the corresponding target element according to the hash verification method specifically includes: converting the string of the encoded value of the corresponding target element into a fixed-length hash value, and matching the hash value of the corresponding target element with the encoded value of each element in the same project in the system to determine whether there is a conflict in the encoded value of the corresponding target element; Determining whether there is a conflict in the encoded value of the corresponding target element according to the string matching verification method specifically includes: matching the string of the encoded value of the corresponding target element with the encoded value of each element in the same project in the system to determine whether there is a conflict in the corresponding target element.
[0074] Furthermore, the process of adjusting the encoding value of the target element according to the cause of the conflict to generate a new encoding value specifically includes: first, determining the adjustment parameters according to the cause of the conflict; then, matching the corresponding preset adjustment rules according to the adjustment parameters; then, adjusting the corresponding parameters according to the preset adjustment rules; and finally, concatenating the adjusted parameters with the remaining encoding value parameters to generate a new encoding value. Conflict causes include duplicate serial numbers, conflicts between encoding formats and industry rules, and encoding length overflow. When the conflict is due to duplicate serial numbers, the parameter is adjusted to the serial number. When the conflict is due to conflicts between encoding formats and industry standards, the parameter is adjusted to a preset constant / connector dimension. When the conflict is due to encoding length overflow, the parameter is adjusted to a preset number of zero-padding bits. When the parameter is a serial number, a global counter is incremented to generate a new serial number. When the parameter is a preset constant / connector, the preset constant / connector is replaced with the industry standard value recommended by the AI optimization model. When the parameter is a preset number of zero-padding bits, the preset number of zero-padding bits is expanded to the corresponding number of bits based on the total number of target elements to be encoded. When a conflict occurs in the encoding value of the corresponding target element during the judgment step, a Revit API interface exception is captured to determine the cause of the conflict, and a transaction rollback and error log are generated.
[0075] Furthermore, the encoding steps specifically include: Step 1: Based on the optimized encoding configuration parameters, determine the preset zero-padding length, preset constants, and connectors, and determine the encoding method based on the user's encoding requirements; Step 2: Construct a global counter based on the system's internal counters, and set the starting value of the global counter in combination with the encoding method. Then, generate the serial number of each target element in sequence based on the starting value, the preset zero padding number, and the global counter. Step 3: Generate the encoded value of each target element by concatenating the preset constants, connectors, and serial numbers according to the encoding concatenation rules.
[0076] Furthermore, when the encoding method is sequential encoding, generating the serial number of each target element according to the starting value, the preset zero-padding number and the global counter specifically includes: traversing the target elements sequentially, and incrementing the global counter by 1 from the starting value while traversing the target elements, and generating the serial number of the corresponding target element in combination with the preset zero-padding number. When the encoding method is non-sequential encoding, the serial number of each target element is generated sequentially based on the starting value, the preset zero padding number, and the global counter. Specifically, this includes: selecting the starting value of the global counter according to the user-preset number range, then traversing each target element and sequentially selecting the numbers in the corresponding range and the preset zero padding number to generate the serial number of each target element.
[0077] Further, the element extraction steps are as follows: First, obtain the user-configured filtering conditions from the coding configuration UI to obtain the user coding requirements, and convert the user coding requirements into filtering rules of the Revit API interface; then, construct a filter using the FilteredElementCollector class of the Revit API interface to extract elements that meet the filtering conditions from the element database of the BIM model document, and use them as target elements; finally, traverse the BIM model document according to the filtered target elements to obtain the attribute information of each target element.
[0078] Furthermore, prior to the attribute update step, the following steps are also included: validating the encoded value of each target element, and generating a rollback Revit transaction and an error message when the validation fails; The validity verification includes format verification, rule verification, and data adaptation verification. Format verification verifies the encoded value through regular expression matching, including checking whether the character composition and length of the encoded value are consistent with the optimized encoding configuration data and whether it contains illegal characters. Rule verification verifies the value by comparing character slices with preset rules one by one, including checking whether the concatenation order of the encoded value conforms to the preset encoding concatenation rules and whether the preset constant segment contains the professional code corresponding to the project type. Data adaptation verification verifies the format by calling the metadata of the BIM model attribute fields, including checking whether the format of the encoded value matches the data type and character length limit of the corresponding attribute field in the BIM model.
[0079] Furthermore, the configuration optimization steps specifically include: Data mining is performed on industry coding standard data and historical coding data for each industry category, and AI optimization models for different industry categories are constructed by combining them with large AI models. By providing users with a UI interface for coding configuration, the system obtains the coding configuration data and project type input by the user, and then matches the corresponding AI optimization model based on the project type. The AI optimization model is used to verify the rationality of the user's input encoding configuration data and generate optimization suggestions based on the verification results. The optimization suggestions are then pushed to the user so that the user can optimize the encoding configuration data according to the optimization suggestions to obtain the optimized encoding configuration data. The encoding configuration data includes encoding value parameters, which include preset constants, connectors, and preset zero-padding digits. The validity verification of user-input encoding configuration data includes: validity verification of preset constants, validity verification of connectors, and validity verification of preset zero-padding digits. The validity verification of preset constants includes determining whether the user-input preset constants contain the professional code corresponding to the project type; the validity verification of connectors includes determining whether the connectors conform to industry coding standards; and the validity verification of preset zero-padding digits includes determining whether the preset zero-padding digits meet the requirements.
[0080] The above embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of protection of the present invention. Any non-substantial changes and substitutions made by those skilled in the art based on the present invention shall fall within the scope of protection claimed by the present invention.
Claims
1. An AI-based automatic coding method for BIM components, characterized in that, The automatic coding method for BIM components includes: Configuration optimization steps: Obtain the coding configuration data and the industry category to which the project belongs, and perform AI optimization on the coding configuration data based on historical coding data and industry coding standard data to obtain optimized coding configuration data; Element extraction steps: Obtain user coding requirements and filter target elements from the BIM model document according to user coding requirements, and traverse each target element to obtain the attribute information of each target element. Encoding steps: Obtain the encoding method according to the user's encoding requirements, and encode each target element sequentially by combining the optimized encoding configuration data and the encoding method; Judgment steps: After obtaining the encoded value of each target element, determine whether there is a conflict between the encoded values of the corresponding target elements. If so, adjust the encoded value of the target element according to the reason for the conflict and generate a new encoded value, and then execute the judgment steps; if not, encode the next target element. Attribute update steps: After all target elements have been encoded, update the encoded value of each target element to the corresponding attribute information.
2. The AI-based automatic coding method for BIM components according to claim 1, characterized in that, The determination of whether the encoded value of the corresponding target element has a conflict specifically includes: Step 1: Determine whether the encoded value of the corresponding target element has a conflict according to the hash verification method. If yes, the encoded value of the target element has a conflict; if no, proceed to Step 2. Step 2: Determine whether there is a conflict in the encoding value of the corresponding target element according to the string matching verification method. If yes, the encoding value of the target element has a conflict; if no, the encoding value of the target element does not have a conflict. The step of determining whether there is a conflict in the encoded value of the corresponding target element according to the hash verification method specifically includes: converting the string of the encoded value of the corresponding target element into a hash value of fixed length and matching the hash value of the corresponding target element with the encoded value of each element in the same project in the system to determine whether there is a conflict in the encoded value of the corresponding target element; The step of determining whether there is a conflict in the encoded value of the corresponding target element according to the string matching verification method specifically includes: matching the string of the encoded value of the corresponding target element with the encoded value of each element in the same project in the system according to the string matching verification method to determine whether there is a conflict in the corresponding target element.
3. The AI-based automatic coding method for BIM components according to claim 1, characterized in that, The process of adjusting the encoding value of the target element according to the cause of the conflict to generate a new encoding value specifically includes: first, determining the adjustment parameters according to the cause of the conflict; then, matching the corresponding preset adjustment rules according to the adjustment parameters; then, adjusting the corresponding parameters according to the preset adjustment rules; and finally, concatenating the adjusted parameters with the remaining encoding value parameters to generate a new encoding value. The conflict causes include duplicate serial numbers, conflicts between encoding formats and industry rules, and encoding length overflow. When the conflict cause is duplicate serial numbers, the adjustment parameter is the serial number. When the conflict cause is a conflict between the encoding format and industry standards, the adjustment parameter is a preset constant / connector dimension. When the conflict cause is encoding length overflow, the adjustment parameter is a preset zero-padding number. When the adjustment parameter is the serial number, a global counter is incremented to generate a new serial number. When the adjustment parameter is a preset constant / connector, the preset constant / connector is replaced with the industry standard value recommended by the AI optimization model. When the adjustment parameter is a preset zero-padding number, the preset zero-padding number is expanded to the corresponding number of bits according to the total number of target elements to be encoded. In the judgment step, when there is a conflict in the encoding value of the corresponding target element, the Revit API interface exception is captured to find out the cause of the conflict, and the transaction rollback and error log are triggered.
4. The AI-based automatic coding method for BIM components according to claim 1, characterized in that, The encoding steps specifically include: Step 1: Based on the optimized encoding configuration parameters, determine the preset zero-padding length, preset constants, and connectors, and determine the encoding method based on the user's encoding requirements; Step 2: Construct a global counter based on the system's internal counters, and set the starting value of the global counter in combination with the encoding method. Then, generate the serial number of each target element in sequence based on the starting value, the preset zero padding number, and the global counter. Step 3: Generate the encoded value of each target element by concatenating the preset constants, connectors, and serial numbers according to the encoding concatenation rules.
5. The AI-based automatic coding method for BIM components according to claim 4, characterized in that, When the encoding method is sequential encoding, generating the serial number of each target element according to the starting value, the preset zero padding number and the global counter specifically includes: sequentially traversing the target elements, and while traversing the target elements, incrementing the global counter by 1 from the starting value, and generating the serial number of the corresponding target element in combination with the preset zero padding number. When the encoding method is a non-sequential encoding method, generating the serial number of each target element according to the starting value, the preset zero padding number and the global counter specifically includes: selecting the starting value of the global counter according to the user-preset number range, then traversing each target element and sequentially selecting the numbers in the corresponding range and the preset zero padding number to generate the serial number of each target element.
6. The AI-based automatic coding method for BIM components according to claim 1, characterized in that, The element extraction steps are as follows: First, obtain the user-configured filtering conditions from the UI interface of the coding configuration to obtain the user coding requirements, and convert the user coding requirements into filtering rules of the Revit API interface; then, construct a filter through the FilteredElementCollector class of the Revit API interface to extract elements that meet the filtering conditions from the element database of the BIM model document and use them as target elements. Finally, the BIM model document is traversed based on the selected target elements to obtain the attribute information of each target element.
7. The AI-based automatic coding method for BIM components according to claim 1, characterized in that, The attribute update step is preceded by: validating the encoded value of each target element, and generating a rollback Revit transaction and an error message when the validation fails; The validity verification includes format verification, rule verification, and data adaptation verification. Format verification uses regular expression matching to check the encoded value, including verifying the character composition and length of the encoded value to ensure consistency with the optimized encoding configuration data and the presence of illegal characters. Rule verification compares character slices with preset rules one by one, including verifying whether the concatenation order of the encoded value conforms to preset encoding concatenation rules and whether preset constant segments contain the professional code corresponding to the project type. Data adaptation verification checks the format by calling the metadata of the BIM model attribute fields, including verifying whether the format of the encoded value matches the data type and character length limits of the corresponding attribute fields in the BIM model.
8. The AI-based automatic coding method for BIM components according to claim 1, characterized in that, The configuration optimization steps specifically include: Data mining is performed on industry coding standard data and historical coding data for each industry category, and AI optimization models for different industry categories are constructed by combining them with large AI models. By providing a UI interface for coding configuration to users, the system obtains the coding configuration data and project type input by the users, and then matches and derives the corresponding AI optimization model based on the project type. The system performs a validity check on the user-input encoding configuration data based on the corresponding AI optimization model, generates optimization suggestions based on the validation results, and pushes the optimization suggestions to the user so that the user can optimize the encoding configuration data according to the optimization suggestions to obtain the optimized encoding configuration data. The encoding configuration data includes encoding value parameters, which include preset constants, connectors, and preset zero-padding digits. The validation of the user-input encoding configuration data includes: validation of the preset constants, validation of the connectors, and validation of the preset zero-padding digits. The validation of the preset constants includes determining whether the user-input preset constants contain the professional code corresponding to the project type. The validation of the connectors includes determining whether the connectors conform to industry coding standards. The validation of the preset zero-padding digits includes determining whether the preset zero-padding digits meet the requirements.
9. An AI-based automatic coding device for BIM components, comprising a memory and a processor, wherein the memory stores an automatic coding program for BIM components that runs on the processor, characterized in that, The BIM component automatic coding program is a computer program, and when the processor executes the BIM component automatic coding program, it implements the steps of the AI-based BIM component automatic coding method as described in any one of claims 1-8.
10. A computer-readable storage medium storing thereon an automatic coding program for BIM components, characterized in that, The BIM component automatic coding program is a computer program, and when the BIM component automatic coding program is executed by the processor, it implements the steps of the AI-based BIM component automatic coding method as described in any one of claims 1-8.