Reconstruction method of HBIM in digital twin technology of ancient buildings

Through fine modeling, digital-analog decoupling and attribute mapping, the problem of low accuracy and efficiency in the conversion of IFC model to OBJ model is solved, and efficient and accurate reconstruction of ancient architectural digital twins is achieved, ensuring the integrity and high precision of the model.

CN119989490BActive Publication Date: 2025-08-12BEIJING UNIV OF CIVIL ENG & ARCHITECTURE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510119513.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-08-12
Estimated Expiration
2045-01-24

AI Technical Summary

Technical Problem

In the process of digital twinning of ancient buildings, there are problems of accuracy loss and low conversion efficiency when converting IFC geometric models to OBJ models, especially the geometric details of complex components are difficult to retain, resulting in damage to the model accuracy and the conversion process takes a long time, which can easily cause system downtime.

Method used

The method of fine modeling and digital-analog decoupling combined with geometric conversion and attribute mapping is adopted. The IFC model is divided into high, medium and low risk areas through the area method, and complex areas are converted with the Delaunay triangulation algorithm, and the attribute data is established with the component unique identifier to achieve efficient and accurate HBIM reconstruction.

Benefits of technology

It improves the integrity and accuracy of model splicing, shortens the conversion time, avoids system downtime, and meets the high-precision needs of digital protection and research of ancient buildings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989490B_ABST
    Figure CN119989490B_ABST
Patent Text Reader

Abstract

This paper discloses a reconstruction method for HBIM in digital twin technology for ancient buildings. The method begins with detailed modeling, integrating a standard parametric model with an irregular triangulated network model to construct a basic geometric model. Next, digital-analog decoupling separates geometric space from semantic attribute information, generating an IFC-formatted geometric model. The method then proceeds to geometric conversion, where high-, medium-, and low-risk areas are divided based on the number of vertices per unit area and their area ratio. High-risk areas are subdivided and low-risk areas are merged. Geometric element extraction and reconstruction algorithms are then applied to convert high- and medium-risk areas into OBJ format using the Delaunay triangulation algorithm, and finally into glTF format. Finally, attribute mapping is performed, using component unique identifiers to associate attribute data with the glTF-formatted geometric model and establishing an update mechanism to maintain synchronization. This completes the HBIM reconstruction, laying a solid foundation for the digital preservation and application of ancient buildings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital twins of ancient buildings, specifically a HBIM reconstruction method, which aims to solve the technical problem of efficiently and accurately reconstructing complex architectural structures and information in the process of digital twinning of ancient buildings. Background Art

[0002] Against the backdrop of the growing demand for the preservation and digital presentation of ancient buildings, digital twin technology has become a key tool. HBIM, as one of its core technologies, facilitates the preservation of ancient architecture by constructing information-rich, highly restored architectural models. However, existing technologies face numerous difficulties in converting the original geometric model data collected from ancient buildings to adapt to the HBIM system. Complex components, due to their unique irregular shapes, fine textures, and complex internal structures, are prone to data loss during the data conversion process. This is partly due to differences in data formats between different software platforms, and the format conversion process is unable to accurately accommodate multi-dimensional data descriptions of complex components. Furthermore, traditional conversion algorithms focus on general model processing, making it difficult to accurately capture the delicate details of ancient buildings, such as carvings and mortise and tenon joints. This significantly reduces the accuracy of the converted model, severely impacting the integrity and reliability of subsequent digital twin models of ancient buildings and failing to meet the needs of high-precision preservation and research. Therefore, a new HBIM reconstruction method is urgently needed to improve the current situation.

[0003] HBIM technology is the key support for realizing the digital presentation of ancient buildings. One of its core links is the conversion of geometric model formats, especially the conversion process from IFC geometric models to OBJ models.

[0004] In the field of digital preservation and heritage preservation of ancient architecture, leveraging advanced technologies to construct high-precision digital twin models has become a key requirement for industry development. Conversion of IFC geometry models to OBJ models is a key step in achieving this goal, but existing technologies currently face a series of challenges that need to be addressed.

[0005] In terms of accuracy, existing technologies have obvious shortcomings when performing conversion tasks. This is especially true when faced with complex components that are widely found in ancient buildings, such as those with fine carvings, unique mortise and tenon structures, and irregular curved surfaces. Due to the data structure characteristics of the IFC model itself and the inherent limitations of the OBJ model in describing complex geometric forms, many fine geometric details are often difficult to be fully preserved during the conversion process. This directly leads to a serious loss of accuracy in the converted model, making it impossible to accurately reproduce the unique charm and style of the ancient buildings. This in turn has a very negative impact on the quality of subsequent ancient building research, restoration, and virtual display work based on the model, making it difficult for related results to meet professional needs.

[0006] From the perspective of conversion efficiency, the problem is equally prominent. Ancient buildings are typically large in scale and contain numerous components. Traditional conversion methods require a significant amount of computing resources to process such large-scale models. This not only makes the conversion process time-consuming but also easily causes serious problems such as system downtime and crashes, bringing the entire digital workflow to a standstill. This also results in a huge waste of manpower, material resources, and time, significantly hindering the progress of ancient building digitization projects.

[0007] In addition, it is worth noting that in order to cope with the above-mentioned difficulties, some researchers have explored and attempted to segment the IFC geometric model according to the components. However, in actual operation, it was found that this method posed new challenges. Because the components of ancient buildings themselves have complex and changeable shapes and are closely related to each other, over-reliance on the method of segmentation by component will make it difficult to clearly define the segmentation boundaries. This brings great difficulties to the subsequent splicing process. On the one hand, it is easy to have obvious geometric defects such as splicing misalignment and excessive gaps. On the other hand, complex splicing algorithms may also frequently cause data compatibility problems, further damaging the integrity and accuracy of the model, which greatly reduces the quality of the model.

[0008] To sum up, there is an urgent need to develop a new IFC geometric model conversion strategy that can ensure both high efficiency and high precision, so as to promote the steady and healthy development of digital twin technology of ancient buildings and meet the growing demand for digital protection of ancient buildings. Summary of the Invention

[0009] In order to achieve these purposes and other advantages according to the present invention, a reconstruction method of HBIM in the ancient building digital twin technology is provided, comprising the following steps:

[0010] Step 1: Fine modeling: Fusion of the standard parametric model and the irregular triangulated network model provides the basic geometric model for the entire HBIM reconstruction;

[0011] Step 2: Decoupling of digital and model: The geometric space information and semantic attribute information in the geometric model are stored and loaded separately to generate the geometric model in IFC format;

[0012] Step 3: Geometry conversion: Convert the geometric model after digital-analog decoupling into the glTF format suitable for the digital twin system.

[0013] Step 4: Attribute mapping: Establish a bidirectional link between the attribute data and the glTF-formatted geometric model through the component unique identifier, and build an update mechanism to maintain synchronization, thus completing the reconstruction of the HBIM.

[0014] The geometric transformation step includes:

[0015] a) Segment the IFC-formatted geometric model data by area, calculate the number of vertices per unit area, and then calculate the ratio of the number of vertices to the unit area. Unit areas where the ratio exceeds threshold A are considered high-risk areas, unit areas where the ratio exceeds threshold B but is less than threshold A are considered medium-risk areas, and unit areas where the ratio is less than threshold B are considered low-risk areas.

[0016] b) Continue to segment high-risk areas and merge low-risk areas;

[0017] c) converting the low-risk area into OBJ format data using a geometric element extraction and reconstruction algorithm, and converting the medium-risk area and the segmented high-risk area into OBJ format using a geometric element extraction and reconstruction algorithm, assisted by a Delaunay triangulation algorithm; and

[0018] d) Convert the geometric model in OBJ format to glTF format.

[0019] Furthermore, the HBIM reconstruction method in the ancient building digital twin technology further includes, in step c), merging the geometric model areas converted into the OBJ format, and then further includes the following steps:

[0020] e) Set the check accuracy and tolerance values to detect the topological manifold of the merged OBJ format geometric model, including: self-intersection, non-manifold edges or non-manifold vertices, non-manifold geometry, overlapping faces, and / or open edges;

[0021] f) determining the unit area where the topology error occurs, distinguishing whether the topology error occurs at the edge or non-edge of the unit area, and forming a topology error database for the edge of the unit area and a topology error database for the non-edge of the unit area respectively; and

[0022] g) If the topological error data of the edge exceeds the threshold C, then return to step a); if the topological error data of the non-edge exceeds the threshold D, then return to step b).

[0023] Furthermore, the reconstruction method of HBIM in the ancient building digital twin technology includes a conversion process from a component coordinate system to a model coordinate system in the construction of a standard parameter model, which specifically includes the following steps:

[0024] h) Describes the curved body in the component, where x, y, and z are three-dimensional coordinates, r represents the average radius of the bottom surface of the curved body, θ represents the angle parameter, and h(θ) is a function that describes the change of the curved body with angle in the height direction:

[0025]

[0026] Calculate the second-order derivative: In the range of θ from 0 to 2π, go to a point every π / 10, and get a total of 20 discrete points. At each discrete point, calculate the second-order derivative:

[0027]

[0028] The absolute values of the second-order derivatives at these discrete points are added together and then divided by the total number of discrete points to obtain the average value of the curvature change, which is used as a value to measure the magnitude of the curvature change.

[0029] i) Then calculate the standard deviation of the curvature change, where i represents the discrete point and n represents the number of discrete points. is the second-order derivative of the ith discrete point, is the average value of the second-order derivative, which is used as a measure of the frequency of curvature change:

[0030]

[0031] j) Comparing the average value of the curvature change with a threshold value E; if it is greater than the threshold value E, the curved surface body is determined to be a complex component; comparing the standard deviation of the curvature change with a threshold value F; if it is greater than the threshold value F, the curved surface body is determined to be a complex component; if the average value of the curvature change is not greater than the threshold value E, but the standard deviation of the curvature change is greater than the threshold value F by more than 20% to 30%, the curved surface body is determined to be a complex component; if the standard deviation of the curvature change is not greater than the threshold value F, but the average value of the curvature change is greater than the threshold value E by more than 30% to 50%, the curved surface body is determined to be a complex component;

[0032] k) Perform coordinate transformation on complex components, calculate the distance measurement between the surface point clouds of complex components before and after transformation, and judge whether the shape is consistent by calculating the root mean square error between the point clouds. If the root mean square error is greater than the threshold F, then

[0033] l) Subdivide the complex-shaped component into smaller geometric units, including using a triangulation algorithm to divide its surface into multiple small triangles, determining the vertex coordinates of each triangle in the component coordinate system, then transforming these vertices into the model coordinate system through coordinate transformation, and finally reassembling these triangles in the model coordinate system.

[0034] Furthermore, in the reconstruction method of HBIM in the ancient building digital twin technology, the digital-analog decoupling step includes:

[0035] Identify simple components in the geometric model. Simple components are defined as components without holes or composite structures, including walls, columns, and beams. Use conventional query statements to directly read the geometric information and related attribute data of these simple components from the IFC model. Convert the read data into a preset format to achieve preliminary coupling and docking with the target digital model.

[0036] The digital-model coupling steps for components with holes are as follows: locating the component with holes in the building information model. The holes of the component with holes are represented by "Opening" entities in the IFC model. Based on the basic geometric information of the component read using a conventional query statement, a hole field is embedded. Through the association between the hole field and the "Opening" entity, the detailed geometric shape, position and size information of the hole are further read. The component data containing the hole information is processed into a format suitable for the target digital model, completing the coupling with the target digital model.

[0037] The digital-analog coupling steps for objects containing aggregate components are as follows: Identify the components containing aggregate components based on the Aggregates attribute in the IFC model. After obtaining the main geometric information of the component using conventional queries, deeply read the geometric features, relative positions and assembly relationships of each sub-component in the aggregate component according to its associated attributes, integrate the information of the component body and aggregate components and convert it into a format acceptable to the target digital model to achieve digital-analog coupling.

[0038] Furthermore, in the digital-analog coupling method of the building information model based on component classification, in the digital-analog coupling step for simple component types, the conventional query statement follows the query syntax for simple geometric entities in the IFC standard specification, and the relevant attribute data read includes at least the material, dimensional tolerance and surface texture properties of the component.

[0039] Furthermore, in the reconstruction method of HBIM in the digital twin technology of ancient buildings, in the digital-analog coupling step for component types with holes, the operation of embedding the hole field is implemented by adding a specific data item in the data structure, and the reading of the association relationship is carried out with the help of the object reference mechanism built into the IFC model, and the detailed geometric shape information of the hole read includes the contour curve type and surface curvature information of the hole.

[0040] Furthermore, the HBIM reconstruction method in the ancient building digital twin technology and the attribute mapping method include:

[0041] Relational database selection and data table design steps: Select a relational database as the tool for performing attribute mapping operations. Based on the application requirements of the ancient building digital twin and the attribute definitions in IFC semantics, comprehensively analyze the non-geometric information types and then classify and design attribute data tables, including at least an identification information table, a geometry information table, a material information table, and a location information table. Each table is used to accurately store the corresponding type of attribute information to build a structured attribute storage system.

[0042] Attribute information extraction and storage steps: Parse the JSON file generated by digital-analog decoupling to accurately extract attribute information. According to the designed attribute data table structure, the extracted attribute information is stored in a relational database to achieve structured storage of attribute information based on component IDs, ensuring that the attribute information of each component can be organized in an orderly manner and efficiently retrieved.

[0043] Steps for establishing a bidirectional link and updating mechanism: Use component unique identifiers to establish a bidirectional link between attribute data and glTF geometric models, enabling the attribute data to be associated and interact with the geometric models. On this basis, an update mechanism is built to monitor the status of database attribute information and glTF models in real time. Once either changes, an update process is immediately initiated to ensure that the two remain synchronized, providing accurate and consistent data support for the ancient building digital twin model.

[0044] Attribute information classification and analysis steps: During the HBIM model data processing process, attribute information is subdivided into direct attributes, derived attributes and inverse attributes according to its source and definition method. Direct attributes are scalars or direct information, which are directly used to describe the basic characteristics of the object entity; derived attributes are attributes expressed by other entities, which enrich the description of the object entity by associating other entities; inverse attributes are attributes linked with the help of associated entities. Through the detailed classification and analysis of attribute information, a deep understanding and precise management of the attributes of the ancient building model can be achieved.

[0045] Furthermore, in the reconstruction method of HBIM in the digital twin technology of ancient buildings, in the relational database selection and data table design steps, the identification information table is used to store the unique identifier, name, number and other information of the component for identifying the identity of the component, and the primary key constraint is used to ensure the uniqueness of the data; the geometric information table stores the geometric shape description information of the component, including vertex coordinates, face information, etc., and realizes efficient utilization of geometric information by interfacing with the geometric modeling algorithm; the material information table records in detail the material name, material properties, material source and other information of the component, and combines with the material database to provide a data basis for the analysis of ancient building materials; the position information table records the spatial position information of the component in the building model, including coordinate values, relative position relationships, etc., to facilitate spatial layout analysis.

[0046] Furthermore, in the reconstruction method of HBIM in the digital twin technology of ancient buildings, in the attribute information extraction and storage steps, when parsing the JSON file, a recursive algorithm is used to traverse the file structure to ensure that no attribute information is missed. For attribute information with complex nested structures, a temporary cache area is established for temporary storage and organization, and then stored according to the data table structure to improve storage efficiency and accuracy.

[0047] Furthermore, in the attribute mapping method of the digital twin model of ancient buildings, in the steps of establishing a bidirectional link and an update mechanism, the bidirectional link is implemented using a pointer- or index-based technology, and link information pointing to each other is established in the database and the glTF model respectively. When an update requirement is detected, the transaction processing mechanism is used to ensure the atomicity of the update process.

[0048] The technical solution proposed in the present invention of using the area method to divide the IFC geometric model and selecting an adaptive data conversion method based on the complexity of the components has brought many significant beneficial effects.

[0049] First, in terms of solving the problem of model splicing, the area method adopted in this invention is different from the traditional method of segmenting by components, which leads to blurred segmentation boundaries and difficulty in subsequent splicing. By accurately calculating the number of vertices in a unit area, the IFC geometric model is rationally divided into different risk areas based on this. This area-based segmentation has clear logic and clear boundaries, laying a solid foundation for subsequent splicing operations, effectively avoiding geometric defects such as splicing dislocation and excessive gaps, ensuring the overall integrity and coherence of the model, greatly improving the success rate of model construction, and effectively ensuring the accurate restoration of the digital twin model of the ancient building from the local to the whole.

[0050] Secondly, from the perspective of accuracy assurance, the different areas segmented are treated according to the complexity of the components. For areas with complex components, such as those containing exquisite carvings, unique mortise and tenon joints, a geometric element extraction and reconstruction algorithm combined with a Delaunay triangulation algorithm is used to assist in the conversion. This can delicately capture every detail of the complex geometric shapes, fully preserve the key features of the ancient buildings, and ensure that the converted model remains accurate at the microscopic level. For areas with simple components, a relatively simple and efficient conversion method is used, which not only ensures the accurate transmission of basic geometric information, but also avoids the waste of resources caused by excessive processing. This fully guarantees that the model can highly restore the original appearance of the ancient buildings at both macro and micro scales, meeting the stringent requirements of high-precision research, restoration, and virtual display.

[0051] Furthermore, in terms of improving conversion efficiency, the area-based segmentation method combined with differentiated data conversion strategies achieves optimal allocation of computing resources. Instead of the traditional, inefficient, uniform processing of entire large-scale ancient building models, this method prioritizes the conversion of complex component areas based on their complexity, focusing limited computing resources on the detailed conversion of complex component areas while rapidly converting simple component areas. This significantly shortens overall conversion time and reduces the system's computational load, effectively avoiding system downtime and crashes caused by processing large-scale models. This makes the construction of ancient building digital twin models more efficient and smoother, providing strong support for the rapid advancement of large-scale ancient building digitization projects.

[0052] The innovative approach adopted by the present invention of performing coordinate transformation separately for complex components and simple components and providing a scientific method to distinguish between the two further expands the significant beneficial effects.

[0053] First, it achieves improvement in terms of precision. By implementing differentiated coordinate transformation specifically for complex components and simple components, we can precisely focus on their respective characteristics. For complex components, due to their unique irregular shapes, fine textures and complex internal structures, the traditional unified conversion method is very likely to cause precision loss. The present invention tailors a conversion process for them, deeply considering the high-precision restoration requirements of details such as carvings and mortise and tenon structures of complex components, and uses an adaptation algorithm to ensure that every subtle feature in the conversion process is accurately mapped, preserving the exquisite craftsmanship and unique style of ancient buildings to the greatest extent. The key part of the complex component lays a solid foundation for the high-precision construction of the overall model; for simple components, an efficient coordinate conversion method that matches them is used to ensure that the basic geometric shapes are accurate while avoiding precision deviations caused by overly complex processing, so that the model can achieve fidelity in both macro-structure and micro-details, fully meeting the precision requirements of the digitization of ancient buildings.

[0054] Secondly, the conversion efficiency is improved. Different from the indiscriminate overall coordinate conversion in the past, the present invention implements diversion processing based on the complexity of the components, thus realizing the refined allocation of computing resources. The large amount of computing resources required for the conversion of complex components are concentrated and accurately invested to ensure the quality of the conversion of complex components. At the same time, a simple and fast conversion path is adopted for simple components, avoiding unnecessary complex calculations on simple components, reducing the time cost of the overall conversion, making the entire coordinate conversion process collaborative and smooth, and accelerating the construction of digital twin models of ancient buildings.

[0055] Third, the scientific method for distinguishing complex from simple components imbues the entire technical system with stability and operability. Based on mathematical models and analysis of the structural characteristics of ancient buildings, this method, for example, quantitatively calculates the amplitude and frequency of curvature changes in component surfaces, combined with threshold judgment, to define the boundary between complex and simple components. This distinction is objective, accurate, and universal. It reduces human judgment errors and uncertainties, enhancing the adaptability and reliability of this invention in practical applications.

[0056] Other advantages, objectives and features of the present invention will be reflected in part through the following description, and in part will be understood by those skilled in the art through study and practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 Flowchart of the present invention DETAILED DESCRIPTION

[0058] The present invention will be described in further detail below in conjunction with the accompanying drawings so that those skilled in the art can implement the invention with reference to the description.

[0059] It should be understood that terms such as “having”, “including” and “comprising” used herein do not preclude the existence or addition of one or more other elements or combinations thereof.

[0060] It should be noted that the experimental methods described in the following embodiments are conventional methods unless otherwise specified, and the reagents and materials are commercially available unless otherwise specified. In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "set" should be understood in a broad sense, for example, they can be fixedly connected or set, or detachably connected or set, or integrally connected or set. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. The orientations or positional relationships indicated by the terms "transverse", "longitudinal", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description. They do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention.

[0061] like Figure 1 As shown, the present invention provides a method for reconstructing HBIM (Historical Building Information Modeling) in the digital twin technology of ancient buildings. This method achieves efficient and accurate digital representation of ancient building information through a series of detailed steps. The following is a detailed description of the specific implementation of this method:

[0062] Step 1: Detailed modeling

[0063] Data collection: First, collect relevant design drawings, historical documents, on-site survey data, etc. of ancient buildings to ensure the comprehensiveness and accuracy of the information.

[0064] Model Fusion: Using professional modeling software (such as AutoCAD and Revit), we combine standard parametric models (e.g., the dimensions and materials of standard components like walls, doors, and windows) with triangulated irregular networks (TINs, used to represent complex terrain or curved structures) to create a detailed model of the ancient building. This step aims to provide a basic and accurate geometric model for HBIM reconstruction.

[0065] Step 2: Digital-Analog Decoupling

[0066] Information separation: Geometric spatial information (such as position, shape, and size) and semantic attribute information (such as material, age, and function) in a geometric model are stored and loaded separately. This improves data processing efficiency and model flexibility.

[0067] IFC format generation: Generates a geometric model that complies with the Industry Foundation Classes (IFC) standard based on the separated geometric space information. IFC is an open and extensible data standard widely used in the field of building information modeling.

[0068] Step 3: Geometric transformation

[0069] Regional segmentation and risk assessment (a):

[0070] The geometric model data in IFC format is segmented according to the preset area size to ensure that each segmented area has similar complexity.

[0071] Count the number of vertices in each unit area and calculate the ratio of the number of vertices to the unit area. This ratio reflects the geometric complexity of the area.

[0072] According to the set thresholds A and B (A>B), areas with a ratio exceeding A are considered high-risk areas, areas with a ratio between B and A are considered medium-risk areas, and areas with a ratio less than B are considered low-risk areas.

[0073] Regional optimization (b):

[0074] The high-risk areas are further segmented to reduce their geometric complexity.

[0075] Low-risk areas are merged to reduce data redundancy and improve processing efficiency.

[0076] Format conversion (c):

[0077] Using geometric element extraction and reconstruction algorithms, the geometric information of low-risk areas is converted into OBJ format data. OBJ format is a simple and widely used 3D model format.

[0078] For medium-risk areas and segmented high-risk areas, a geometric element extraction and reconstruction algorithm is first used for preliminary conversion, followed by optimization using the Delaunay triangulation algorithm. The Delaunay triangulation algorithm can generate high-quality triangular meshes suitable for representing complex surfaces.

[0079] glTF format conversion (d):

[0080] Convert OBJ geometric model data to glTF. glTF is a 3D model format optimized for web and mobile applications, with efficient data compression and rendering performance.

[0081] Step 4: Attribute Mapping

[0082] Unique identifier: Assign a unique identifier (such as a UUID) to each component to facilitate accurate identification and location in subsequent steps.

[0083] Bidirectional linking: Using the component's unique identifier, a bidirectional link is established between the attribute data and the glTF format geometry model. This allows for easy querying and updating of component attribute information.

[0084] Update mechanism: Build an update mechanism to ensure that when attribute data changes, it can be automatically synchronized to the glTF format geometry model. This helps maintain the real-time and accuracy of HBIM.

[0085] By implementing the above steps, the present invention provides an efficient and accurate HBIM reconstruction method for ancient building digital twin technology. This method not only improves the efficiency and accuracy of ancient building information digitization, but also provides strong technical support for the protection, restoration, and reuse of ancient buildings.

[0086] The present invention also provides the following method:

[0087] 1. Merging the geometric model regions in step c

[0088] When executing step c, when merging the geometric model areas converted to OBJ format, you need to use professional 3D model processing software tools. For example, using the relevant plug-ins in the Rhinoceros software, through the precise alignment and fusion functions it provides, the various scattered OBJ format geometric model areas are spliced according to the pre-set spatial coordinate rules. First, mark and classify each model area to be merged, and sort out the geometric model areas corresponding to different components such as walls, roofs, beams and columns according to the structural logic of the ancient building. Then, in the software environment, turn on the capture function to accurately locate the connection points of each area to ensure that the merged model is seamless in geometry, forming a complete preliminary overall geometric model to prepare for subsequent topology checks.

[0089] Step 2: Check the topological manifold

[0090] Choosing the right testing tool

[0091] Use professional geometric model analysis software, such as MeshLab, to perform topological manifold detection tasks. In the MeshLab software interface, open the merged OBJ format geometric model file and enter its topology analysis module.

[0092] Set the checking precision and tolerance values

[0093] According to the actual accuracy requirements of the ancient building model and the previous experience in processing similar models, the inspection accuracy parameters are reasonably set. Generally speaking, for ancient building models with high accuracy requirements and complex structures, the inspection accuracy can be set between 0.1mm-0.5mm to ensure that subtle topological problems can be accurately captured. The setting of the tolerance value should take into account the model construction method and the possible error range. For example, if measurement data of different accuracy are used for modeling during the model construction process, the tolerance value can be appropriately relaxed to 0.5mm-1mm. In the corresponding parameter setting column of the MeshLab software, enter the set inspection accuracy and tolerance value values respectively.

[0094] Perform detection operations

[0095] Click the "Check Topological Manifoldity" button in the software, and the software will perform a comprehensive scan for topological issues within the model, including self-intersections, non-manifold edges or vertices, non-manifold geometry, overlapping faces, and open edges, based on the specified parameters. During the inspection, the software will color-code problematic areas (for example, red for self-intersections, yellow for non-manifold edges, and green for overlapping faces), facilitating subsequent review and analysis.

[0096] Step 3: Build a topology error database

[0097] Unit area division

[0098] The combined geometric model is divided into several unit areas according to specific rules. This division can be based on the functional zoning of the ancient building, such as dividing a house into a unit area; or according to structural modules, such as using the model area corresponding to a roof truss and its associated components as a unit area. In the model processing software, precise division can be achieved by creating a virtual grid or using the software's built-in segmentation function.

[0099] Determine the location of topology errors

[0100] Based on the topological error markers detected in step e, check each unit area for errors one by one. For areas with topological errors, further determine whether the error occurs at the edge or non-edge location. Using the spatial coordinate query and geometric analysis functions of the model software, if the adjacent geometric elements of the topological error point or surface involve the area boundary line, it is determined to be an edge topological error; conversely, if it is completely within the area, it is a non-edge topological error.

[0101] Database creation and entry

[0102] Using database management software such as MySQL or SQLite, create two dedicated database tables to store topological error information for unit area edges and non-edge areas, respectively. The database table structure should include fields such as unit area number, topological error type, error coordinate range, and error severity rating. Identified topological error information should be entered into the corresponding database tables according to the corresponding fields.

[0103] 4. Step g error backtracking

[0104] Threshold setting and monitoring

[0105] Based on the quality standards of the ancient building model and actual application requirements, a threshold for edge topology errors, C, and a threshold for non-edge topology errors, D, are pre-set. The thresholds can be determined by referring to historical project experience data and industry standards. For example, for general ancient building digital twin projects, the edge topology error threshold, C, can be set to no more than three critical errors (such as severe self-intersections and large overlapping surfaces) per unit area, and the non-edge topology error threshold, D, can be set to no more than five general errors (such as a small number of non-manifold vertices and short open edges) per unit area. During the actual processing process, a script program is written to monitor the constructed topology error database in real time and count the number of instances in each unit area where the thresholds are exceeded.

[0106] Retrospective Adjustment

[0107] If topological error data detected at the edge exceeds threshold C, it indicates serious issues at key connections in the model, necessitating a return to step a) to re-collect data and rebuild the initial model. Factors such as the measurement plan and acquisition equipment accuracy should be reviewed to ensure more accurate data for building the foundational model. If topological error data outside the edge exceeds threshold D, it indicates significant inconsistencies in the model's internal structure. Return to step b) to optimize the preprocessing phase, such as adjusting the model simplification algorithm and rechecking the integrity of the data cleansing process, to correct the model issues until the topological manifold requirements are met and a high-quality HBIM geometric model of the ancient building is obtained.

[0108] The following is an implementation of the HBIM reconstruction method in the construction of a standard parametric model for the ancient building digital twin technology:

[0109] 1. Step h describes the curved surface in the component and the values related to the calculated curvature

[0110] Surface description and discrete point selection

[0111] When dealing with curved surfaces in ancient architectural components, you first need to import the component model containing the curved surface using professional 3D modeling software, such as Blender or 3dsMax. For each curved surface to be analyzed, a local coordinate system (component coordinate system) is established with its bottom center as the coordinate origin. Here, x, y, and z represent the three-dimensional coordinates in this coordinate system. Based on the geometric characteristics of the surface, the average radius r of its base is determined by measuring the distance from multiple points on the base to the center of the circle and taking the average. For the angle parameter θ, its value range is set from 0 to 2π, and a total of 20 discrete points are selected at equal intervals. In the software, using scripting or built-in mathematical operations, the geometric information of the surface can be accurately extracted at each discrete point.

[0112] Second-order derivative calculation

[0113] For each selected discrete point, a numerical calculation method is used to solve the second-order derivative of the surface height function h(θ). For example, using the central difference method, we can approximate the second-order derivative based on the difference in function values between adjacent points before and after a discrete point. Within the software's scripting environment, we can write a loop that iterates through each discrete point, calculating its second-order derivative value in turn and storing these values in an array for subsequent processing.

[0114] Calculation of average curvature change

[0115] Extract all elements from the array storing the second-order derivatives, calculate the sum of their absolute values using the programming language's built-in summation function, and divide this sum by the total number of discrete points, 20, to obtain the average curvature variation. This value intuitively reflects the overall magnitude of the curvature variation along the entire circumference of the surface and serves as a key indicator of its complexity. During code implementation, ensure the accuracy of numerical calculations to avoid biased results due to floating-point arithmetic errors.

[0116] 2. Step i. Calculate the standard deviation of curvature change

[0117] Utilize statistical library functions (such as the numpy library in Python), combine the second-order derivative array calculated previously and the calculated second-order derivative average, and perform calculations according to the standard deviation calculation formula. Specifically, for each discrete point i (i=0,1,…,19), we calculate the square of the difference between and , sum all these squared differences and divide them by the number of discrete points n (i.e., 20). Finally, we take the square root of the result to obtain the standard deviation of the curvature variation. This standard deviation represents the degree of discreteness of the curvature variation, that is, the frequency of curvature variation, which can reflect the complex characteristics of the surface from another perspective.

[0118] Step 3: Determine complex components

[0119] Threshold setting basis

[0120] The setting of thresholds E and F requires comprehensive consideration of the type, historical age, structural characteristics, and subsequent application scenarios of the digital twin model. For ancient buildings with exquisite carvings and unique shapes, such as components of imperial gardens from the Ming and Qing dynasties, thresholds E and F can be appropriately relaxed due to the typically complex curved surfaces. However, for relatively simple, structurally regular components of residential buildings, thresholds should be set more strictly to avoid misjudgments. This is typically achieved through preliminary analysis and testing of sample data from a large number of different types of ancient building components, combined with the experience of industry experts, to initially determine the threshold range. This is then fine-tuned in actual projects based on feedback from model quality.

[0121] Complex component decision logic

[0122] Based on the calculated mean and standard deviation of the curvature change, determine whether the surface body is a complex component according to the following rules:

[0123] When the average value of the curvature change is greater than the threshold E, the curved surface body is directly judged as a complex component, because this indicates that its overall curvature change range is large and the shape is relatively complex.

[0124] If the standard deviation of the curvature change is greater than the threshold F, it is also judged as a complex component, which means that the curvature of the curved surface changes frequently in the circumferential direction and is highly irregular.

[0125] If the average curvature variation is no greater than threshold E, but the standard deviation of the curvature variation exceeds threshold F by more than 20-30%, this indicates that while the overall curvature variation is acceptable, the local curvature changes too frequently, and the component should also be classified as complex. This range is based on considerations of the diversity of ancient architectural components and can be adjusted based on specific needs in actual projects.

[0126] Similarly, if the standard deviation of the curvature change is not greater than the threshold F, but the average value of the curvature change is greater than the threshold E by more than 30-50%, the curved surface is also classified as a complex component because the overall curvature change exceeds a certain proportion.

[0127] Because the frequency of curvature change has a greater impact on accuracy when the numerical value is transformed, the requirements for the frequency of curvature change are higher.

[0128] Step 4: Complex component coordinate transformation and shape consistency judgment

[0129] Coordinate transformation implementation

[0130] Once a curved surface is determined to be a complex component, a specialized coordinate transformation library (such as the coordinate transformation module in the OpenCV library, developed in C++, or the scikit-image library in Python, suitable for Python environments) is used to convert between the component coordinate system and the model coordinate system. First, the translation and rotation relationship between the two coordinate systems is determined. This is typically determined based on the overall layout of the historic building and the component's position within the structure. By calling the corresponding transformation function in the library and inputting the known transformation parameters, the coordinates of the complex component in the component coordinate system are converted to those in the model coordinate system.

[0131] Shape consistency judgment

[0132] After completing the coordinate transformation, point cloud processing technology is used to verify that the shape of complex components remains consistent before and after the transformation. The surface point cloud data in the component coordinate system before the transformation and the point cloud data in the model coordinate system after the transformation are extracted separately. Using point cloud processing software (such as CloudCompare) or a custom point cloud processing algorithm, the root mean square error (RMSE) between the two point clouds is calculated. The specific calculation process is to calculate the square sum of the coordinate differences for each pair of corresponding points (determined by a spatial position matching algorithm). The sum of the square sums of all corresponding points is divided by the total number of points, and the square root is taken to obtain the RMSE value. If the RMSE value is greater than the threshold F, it indicates poor shape consistency and requires further processing.

[0133] Step 1: Subdivision and Recombination of Complex Components

[0134] Application of triangulation algorithm

[0135] For complex components with poor shape consistency, triangulation algorithms are used for subdivision. For example, the Delaunay triangulation algorithm can be used to divide the surface of a complex component into multiple small triangles within specialized geometry processing software (such as the tools provided by the CGAL library, which supports multiple programming languages). The algorithm constructs a triangular mesh based on the discrete point cloud data of the component surface, ensuring that each triangle is as close to an equilateral triangle as possible to ensure the quality of the subdivided geometric units.

[0136] Coordinate transformation and recombination

[0137] In the component coordinate system, the software's geometric query function is used to accurately determine the vertex coordinates of each triangle and record them. Next, the coordinate conversion method used in step k is used to convert these vertex coordinates from the component coordinate system to the model coordinate system. Finally, in the model coordinate system environment, the modeling software's model building function is used to reassemble the converted triangle vertices according to the original topological relationships, forming a subdivided complex component model to meet the subsequent requirements for constructing a high-precision digital twin model of the ancient building.

[0138] Through the above detailed implementation steps, it is possible to accurately handle the conversion of component coordinate system to model coordinate system during the HBIM reconstruction process of the ancient building digital twin technology, especially the effective identification and proper processing of complex components, to ensure the construction of high-quality, high-precision standard parameter models.

[0139] The present invention also provides a digital-analog decoupling step, comprising:

[0140] Digital-analog decoupling of simple components

[0141] Identification and Query: Use professional Building Information Modeling (BIM) software, such as Autodesk Revit or ArchiCAD, to open the IFC file containing the historical building model. Within the software's model browser or query tool, filter by defining simple components (those without holes or composite structures, such as walls, columns, and beams) using regular query statements that adhere to IFC standards. For example, in Revit, use query code based on its API to search by component category properties and locate all simple components.

[0142] Data reading and conversion: For identified simple components, the software's built-in IFC data reading function is used to read their geometric information (such as the length, height, and thickness of walls, the diameter and height of columns, and the cross-sectional dimensions and length of beams) and related attribute data (including material, whose specific material name and parameters can be obtained from the material library; dimensional tolerances, which are read based on the model's accuracy settings; and surface texture properties, which are obtained through texture mapping information). The read data is organized into a pre-set format, such as XML or CSV, for preliminary coupling and docking with the target digital model to ensure data compatibility.

[0143] Digital-analog decoupling of components with holes

[0144] Component Locating and Basic Information Retrieval: Also within the BIM software environment, components with holes are searched for in the IFC model based on the "Opening" entity identifier. Basic geometric information about the component, such as its main shape and dimensions, can be retrieved using a regular query. For example, for a wall of a historic building with a circular hole, a query can retrieve the length, width, and height of the wall, as well as a geometric description of the wall itself.

[0145] Embedding and reading hole information: At the data structure level, specific data items are added as hole fields through programming (e.g., using Python data processing libraries within the code that handles IFC data structures). Leveraging the IFC model's built-in object reference mechanism, an association is established between the hole field and the "Opening" entity. Following this association, detailed hole geometry (e.g., radius and center coordinates for circular holes; for irregular holes, the contour curve type, described by mathematical expressions or discrete point coordinates; surface curvature, derived using geometric calculation algorithms), position (coordinate offset relative to the component body), and size information are retrieved. Finally, the component data containing hole information is processed into a format compatible with the target digital model (e.g., the format required by specific rendering engines or analysis software), completing the coupling process.

[0146] Decoupling of digital and analog components including aggregated components

[0147] Aggregate component identification and main body information acquisition: Based on the Aggregates property in the IFC model, use the general query function in the BIM software to identify components containing aggregate components. First, obtain the main body geometry of the component. For example, for a bracket composed of multiple wooden components, query to obtain the overall dimensions and spatial posture of the bracket.

[0148] Subcomponent information reading and integration: Based on their associated attributes, the geometric features (such as the subcomponent's shape and dimensional details), relative position (determining the subcomponent's position relative to the main component through coordinate transformation), and assembly relationships (such as the geometric constraints corresponding to the mortise and tenon joints) of each subcomponent within the aggregate assembly are deeply explored. Using specialized data integration algorithms, the information of the component body and aggregated components is integrated and converted into a format that can be accepted by the target digital model, such as a mesh model format suitable for finite element analysis software, achieving digital-model coupling and meeting the needs of subsequent structural performance analysis of ancient buildings.

[0149] The present invention also provides an attribute mapping method:

[0150] Relational database selection and data table design

[0151] Database selection: Considering the performance requirements, data size, and scalability of the ancient building digital twin application, choose a mature relational database such as MySQL or PostgreSQL. These databases offer powerful transaction processing capabilities and efficient query performance, meeting the management requirements for complex attribute data of ancient buildings.

[0152] Data table design: Based on the application requirements of the ancient building digital twin and the attribute definitions in IFC semantics, detailed non-geometric information classification is performed. An identification information table is designed, with the component's unique identifier (such as a globally unique ID, GUID), name, and number as fields. Primary key constraints are used to ensure data uniqueness, facilitating quick and accurate component location. The geometry information table stores component geometric shape descriptions, including vertex coordinates (stored in a three-dimensional array), face information (described by face vertex indices), and other information. Efficient use of geometric information is achieved through interfaces with geometric modeling algorithms (such as the OpenGL graphics library interface, which facilitates subsequent rendering and display). The material information table records in detail the component's material name (selecting standard names from the ancient building material classification system), material properties (such as the density and elastic modulus of wood, the compressive strength of masonry, etc., entered based on material test data), and material source (tracing back to the place of origin, supplier, and other information for verification of cultural relic restoration materials). The position information table records the spatial position information of components in the building model, including coordinate values (using a unified building coordinate system, such as the X, Y, and Z coordinates in the world coordinate system) and relative position relationships (such as orientation descriptions and distance values with adjacent components) to facilitate spatial layout analysis.

[0153] Attribute information extraction and storage

[0154] JSON file parsing: For the JSON files generated by digital-analog decoupling, we use a JSON parsing library in a programming language (such as Python) combined with a recursive algorithm to traverse the file structure. Starting from the top-level component object, we drill down layer by layer to sub-properties and nested properties, ensuring that no attribute information is missed. For example, for a component JSON description containing multiple layers of nested material properties (such as a material texture with multiple levels of detail parameters), the recursive algorithm can completely extract all relevant information.

[0155] Data Storage: Attribute information with complex nested structures is temporarily stored and organized in memory by establishing a temporary buffer (such as a Python list or dictionary data structure). Following the designed attribute data table structure, a database connection library (such as Python's SQLAlchemy) is used to store the extracted attribute information in a relational database, achieving structured storage of attribute information based on component IDs. During storage, database table attributes such as data types and field lengths are appropriately set to ensure data accuracy, improve storage efficiency, and facilitate subsequent retrieval and querying.

[0156] Establishment of a two-way link building and update mechanism

[0157] Bidirectional Link Implementation: Using the unique component identifier as the key link, a bidirectional link is established between the relational database and the glTF geometry model. On the database side, a new field is added to the attribute data table to store pointers or index information pointing to the corresponding component in the glTF model. On the glTF model side, the model's metadata extension mechanism is used to add links to the corresponding component property records in the database. For example, a "database_link" field is added to the JSON metadata of the glTF model and populated with the primary key value of the component property record in the database. Bidirectional links are implemented using pointer- or index-based techniques to ensure that both can quickly locate each other.

[0158] Update Mechanism: Build a real-time monitoring system, utilizing database triggers or periodic polling scripts (e.g., in Python, using a scheduled task framework) to monitor the status of both database attribute information and the glTF model in real time. Once a change is detected in either case, the update process is immediately initiated. During the update process, the database's transaction processing mechanism is leveraged to ensure atomicity, ensuring that either all updates succeed or all are rolled back, thus avoiding data inconsistencies. For example, when a component material property in the database is updated, the update process is triggered, simultaneously updating the material rendering parameters in the glTF model. This ensures that both remain synchronized, providing accurate and consistent data support for the ancient building digital twin.

[0159] Attribute information classification analysis

[0160] Direct attribute processing: During HBIM model data processing, attribute information is meticulously categorized. Direct attributes are scalar quantities or direct information that directly describe the basic characteristics of an object entity. For example, component dimensions such as length, width, and height, and appearance attributes such as color values, are directly extracted from the data obtained through digital-analog decoupling and stored in the corresponding attribute data table fields for basic model construction and display.

[0161] Derived attribute parsing: Derived attributes are properties expressed by other entities, enriching the description of an object entity by associating with other entities. For example, a component's fire rating attribute might be associated with a specific building code entity. By querying the building code database, a detailed description of the component's required fire rating can be obtained and stored in association with the component's own attributes, providing more in-depth information for fire safety analysis of historic buildings.

[0162] Application of inverse attributes: Inverse attributes are linked via associated entities. For example, the opening direction attribute of a door or window component in a historic building may need to be linked to the building's functional zoning entities or surrounding pedestrian passage entities. This link can be used to determine whether the door or window opening direction is appropriate and meets functional requirements such as evacuation. Through the detailed classification and analysis of attribute information, a deep understanding and precise management of the attributes of the historic building model can be achieved, thereby enhancing the application value of the digital twin model of the historic building.

[0163] Experimental data:

[0164] 1. Experimental Purpose

[0165] The effectiveness of the above-mentioned HBIM reconstruction method in converting ancient building models of different complexity levels was verified, its effect on improving model accuracy, conversion efficiency and data compatibility was evaluated, and compared with traditional modeling conversion methods.

[0166] 2. Experimental Samples

[0167] Three representative ancient buildings were selected as experimental samples, namely:

[0168] Small courtyard ancient buildings (relatively regular structure, fewer component types)

[0169] Medium-sized ancient temple buildings (including complex bracket structures, curved roofs, and various components)

[0170] Large-scale ancient palace buildings (large in scale, complex in spatial layout, and numerous decorative components)

[0171] 3. Experimental Setup

[0172] Hardware environment: A workstation equipped with a high-performance graphics processing unit (GPU), an Intel Core i9-10980XE processor, 128GB of memory, and an NVIDIA GeForce RTX 3090 graphics card.

[0173] Software environment: Use the independently developed HBIM modeling software, the digital twin platform adopts the Unity engine, and the auxiliary algorithm tools are developed based on Python.

[0174] IV. Experimental process and data recording

[0175] (1) Detailed modeling stage

[0176] For the three ancient buildings, we first collected on-site surveying data, historical drawings and other materials as basic input. When integrating the standard parameter model with the irregular triangulated network model:

[0177] Small courtyard ancient building: A total of 500 standard parametric component models were created, the number of vertices of the irregular triangulated network model was about 2,000, and the total modeling time was about 4 hours.

[0178] Medium-sized ancient temple building: Create 1,200 standard parametric component models, the irregular triangulated network model has approximately 8,000 vertices, and the total modeling time is approximately 10 hours.

[0179] Large-scale ancient palace buildings: 3,000 standard parametric component models were generated, the irregular triangulated network model had approximately 20,000 vertices, and the total modeling time was approximately 30 hours.

[0180] (2) Digital-analog decoupling stage

[0181] Perform digital-analog decoupling operations on the constructed geometric model to generate an IFC format geometric model:

[0182] Small courtyard ancient building: The decoupled geometric model file size is about 5MB, and the semantic attribute information file size is about 2MB.

[0183] Medium-sized ancient temple building: The geometric model file size is approximately 15MB, and the semantic attribute information file size is approximately 6MB.

[0184] Large palace ancient buildings: The geometric model file size is approximately 40MB, and the semantic attribute information file size is approximately 15MB.

[0185] (3) Geometric transformation stage

[0186] Follow the steps for geometric transformation:

[0187] Threshold A is set to 100 and Threshold B is set to 50.

[0188] 1. Risk area division

[0189] Small courtyard ancient buildings: high-risk areas account for 5% of the total area, mainly concentrated in the fine parts of carved doors and windows; medium-risk areas account for 15%, such as roof ridges and other places with a certain curvature; low-risk areas account for 80%, which are flat parts such as walls and floors.

[0190] Medium-sized temple ancient buildings: high-risk areas account for 10%, concentrated in the complex structure of brackets; medium-risk areas account for 30%, including some curved roofs; low-risk areas account for 60%, such as the ground and pillars inside the main hall.

[0191] Large palaces and ancient buildings: high-risk areas account for 15%, mostly found in the palace's eaves and decorative carved belts; medium-risk areas account for 40%, such as the slopes of multiple hip roofs; low-risk areas account for 45%, such as the palace's base and internal partition walls.

[0192] 2. Regional processing and format conversion

[0193] Small courtyard-style ancient buildings: After merging low-risk areas, conversion to OBJ format using the geometry extraction and reconstruction algorithm took one hour, resulting in a file size of approximately 3MB. Conversion of medium-risk areas took two hours, resulting in a file size of approximately 5MB. Further segmentation and conversion of high-risk areas took three hours, resulting in a file size of approximately 4MB. The final conversion to glTF format took two hours, resulting in a glTF model file size of approximately 8MB.

[0194] Medium-sized ancient temples and buildings: The low-risk area took 3 hours, with a file size of approximately 8MB; the medium-risk area took 6 hours, with a file size of approximately 12MB; and the high-risk area took 9 hours, with a file size of approximately 10MB. Conversion to glTF format took 5 hours, with the resulting glTF model file size of approximately 20MB.

[0195] Large palaces and ancient buildings: The conversion took 8 hours for low-risk areas, with a file size of approximately 15MB; 16 hours for medium-risk areas, with a file size of approximately 25MB; and 20 hours for high-risk areas, with a file size of approximately 20MB. Conversion to glTF format took 10 hours, with the generated glTF model file size of approximately 40MB.

[0196] (IV) Attribute Mapping Phase

[0197] Establish links and build update mechanisms through component unique identifiers:

[0198] Small courtyard ancient building: It took 1 hour to establish the link. In subsequent simulation update tests, the average data synchronization delay was less than 0.5 seconds.

[0199] Medium-sized ancient temple buildings: Establishing the link took 3 hours, and the data synchronization delay during simulation updates was about 1 second.

[0200] Large palaces and ancient buildings: Establishing a link takes 6 hours, and data synchronization is delayed by about 2 seconds.

[0201] 5. Comparative Experiment

[0202] The traditional method of directly converting 3D CAD models into glTF format is selected for comparison:

[0203] Model accuracy:

[0204] For small courtyard-style ancient buildings, the model converted using the traditional method exhibits obvious jaggedness and deformation in fine components (such as door and window carvings), resulting in a precision loss of approximately 20%. However, the model reconstructed using this method can be accurately restored with a precision loss of less than 5%.

[0205] For medium-sized ancient temple buildings, the traditional method has a 30% loss of accuracy in brackets and curved roofs, while this method can control the loss of accuracy within 10%.

[0206] For large ancient palace buildings, traditional conversion makes details such as eaves and decorative carvings blurred, resulting in a 40% loss of accuracy. This reconstruction method loses about 15% of accuracy.

[0207] Conversion efficiency:

[0208] For a small courtyard ancient building, the traditional method takes about 8 hours to convert, while this method takes 11 hours in total (including high-precision modeling). However, considering the improvement in model quality, it is more cost-effective.

[0209] For a medium-sized ancient temple building, the traditional conversion takes 20 hours, while this method takes 27 hours. In the long run, this method has more advantages for the maintenance and management of complex ancient buildings.

[0210] For a large ancient palace building, the traditional method takes 45 hours, while this method takes 70 hours. Although the single-time time is slightly longer, the data can be more fully utilized in subsequent digital twin applications.

[0211] Data compatibility:

[0212] After the model converted by the traditional method is imported into the digital twin system, compatibility issues such as material loss and abnormal animation effect loading often occur, with an incidence rate of about 30%; the model of this reconstruction method has good compatibility after import, and the problem incidence rate is less than 5%.

[0213] 6. Experimental Conclusion

[0214] In the application of digital twins of ancient buildings, this HBIM reconstruction method, compared with traditional modeling and conversion methods, although it takes slightly longer in the initial modeling and conversion process, has significant advantages in model accuracy, data compatibility, and adaptability to complex ancient building structures. It can provide a more reliable model foundation for the subsequent digital protection, simulation analysis, and intelligent operation and maintenance of ancient buildings.

[0215] The number of devices and processing scales described herein are intended to simplify the description of the present invention. Applications, modifications, and variations of the present invention will be readily apparent to those skilled in the art.

[0216] Although the embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the description and implementation methods. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.

Claims

1. A reconstruction method of HBIM in ancient building digital twin technology, characterized by: The following steps are involved: Step 1: Fine modeling: Fusion of the standard parametric model and the irregular triangulated network model provides the basic geometric model for the entire HBIM reconstruction; Step 2: Decoupling of digital and model: The geometric space information and semantic attribute information in the geometric model are stored and loaded separately to generate the geometric model in IFC format; Step 3: Geometry conversion: Convert the geometric model after digital-analog decoupling into the glTF format suitable for the digital twin system. Step 4: Attribute mapping: Establish a bidirectional link between the attribute data and the glTF-formatted geometric model through the component unique identifier, and build an update mechanism to maintain synchronization, thus completing the reconstruction of the HBIM. The geometric transformation step includes: a) Segment the IFC-formatted geometric model data by area, calculate the number of vertices per unit area, and then calculate the ratio of the number of vertices to the unit area. Unit areas where the ratio exceeds threshold A are considered high-risk areas, unit areas where the ratio exceeds threshold B but is less than threshold A are considered medium-risk areas, and unit areas where the ratio is less than threshold B are considered low-risk areas. b) Continue to segment high-risk areas and merge low-risk areas; c) converting the low-risk area into OBJ format data using a geometric element extraction and reconstruction algorithm, and converting the medium-risk area and the segmented high-risk area into OBJ format using a geometric element extraction and reconstruction algorithm, assisted by a Delaunay triangulation algorithm; and d) Convert the geometric model in OBJ format to glTF format; In step c), the geometric model regions converted into the OBJ format are merged, and then the following steps are included: e) Set the check accuracy and tolerance values to detect the topological manifold of the merged OBJ format geometric model, including: self-intersection, non-manifold edges or non-manifold vertices, non-manifold geometry, overlapping faces, and / or open edges; f) determining the unit area where the topology error occurs, distinguishing whether the topology error occurs at the edge or non-edge of the unit area, and forming a topology error database for the edge of the unit area and a topology error database for the non-edge of the unit area respectively; and g) If the topological error data of the edge exceeds the threshold C, then return to step a); if the topological error data of the non-edge exceeds the threshold D, then return to step b).

2. The reconstruction method of HBIM in the ancient building digital twin technology according to claim 1 is characterized in that: The construction of the standard parametric model includes the conversion process from the component coordinate system to the model coordinate system, which specifically includes the following steps: h) Describes the curved body in the component, where x, y, and z are three-dimensional coordinates, r represents the average radius of the bottom surface of the curved body, θ represents the angle parameter, and h(θ) is a function that describes the change of the curved body with angle in the height direction: Calculate the second-order derivative: In the range of θ from 0 to 2π, go to a point every π / 10, and get a total of 20 discrete points. At each discrete point, calculate the second-order derivative: The absolute values of the second-order derivatives at these discrete points are added together and then divided by the total number of discrete points to obtain the average value of the curvature change, which is used as a value to measure the magnitude of the curvature change. i) Then calculate the standard deviation of the curvature change, where i represents the discrete point and n represents the number of discrete points. is the second-order derivative of the ith discrete point, is the average value of the second-order derivative, which is used as a measure of the frequency of curvature change: j) Comparing the average value of the curvature change with a threshold value E; if it is greater than the threshold value E, the curved surface body is determined to be a complex component; comparing the standard deviation of the curvature change with a threshold value F; if it is greater than the threshold value F, the curved surface body is determined to be a complex component; if the average value of the curvature change is not greater than the threshold value E, but the standard deviation of the curvature change is greater than the threshold value F by more than 20% to 30%, the curved surface body is determined to be a complex component; if the standard deviation of the curvature change is not greater than the threshold value F, but the average value of the curvature change is greater than the threshold value E by more than 30% to 50%, the curved surface body is determined to be a complex component; k) Perform coordinate transformation on complex components, calculate the distance measurement between the surface point clouds of complex components before and after transformation, and judge whether the shape is consistent by calculating the root mean square error between the point clouds. If the root mean square error is greater than the threshold F, then l) Subdivide the complex-shaped component into smaller geometric units, including using a triangulation algorithm to divide its surface into multiple small triangles, determining the vertex coordinates of each triangle in the component coordinate system, then transforming these vertices into the model coordinate system through coordinate transformation, and finally reassembling these triangles in the model coordinate system.

3. The reconstruction method of HBIM in the ancient building digital twin technology according to claim 1 is characterized in that: The digital-analog decoupling step comprises: Identify simple components in the geometric model. Simple components are defined as components without holes or composite structures, including walls, columns, and beams. Use conventional query statements to directly read the geometric information and related attribute data of these simple components from the IFC model. Convert the read data into a preset format to achieve preliminary coupling and docking with the target digital model. The digital-model coupling steps for components with holes are as follows: Components with holes are located in the building information model. In the IFC model, the holes of the components with holes are represented by "Opening" entities. Based on the basic geometric information of the component read using a conventional query statement, a hole field is embedded. Through the association between the hole field and the "Opening" entity, the detailed geometric shape, position and size information of the hole are further read. The component data containing the hole information is processed into a format suitable for the target digital model, completing the coupling with the target digital model. The digital-analog coupling steps for objects containing aggregate components are as follows: Identify the components containing aggregate components based on the Aggregates attribute in the IFC model. After obtaining the main geometric information of the component using conventional queries, deeply read the geometric features, relative positions and assembly relationships of each sub-component in the aggregate component according to its associated attributes, integrate the information of the component body and aggregate components and convert it into a format acceptable to the target digital model to achieve digital-analog coupling.

4. The reconstruction method of HBIM in the ancient building digital twin technology according to claim 3 is characterized in that: In the digital-analog coupling step for simple component types, the conventional query statement follows the query syntax for simple geometric entities in the IFC standard specification, and the relevant attribute data read includes at least the material, dimensional tolerance and surface texture properties of the component.

5. The reconstruction method of HBIM in the ancient building digital twin technology according to claim 4 is characterized in that: In the digital-analog coupling step for component types with holes, the operation of embedding the hole field is achieved by adding a specific data item to the data structure. The reading of the association relationship is based on the object reference mechanism built into the IFC model, and the detailed geometric shape information of the hole read includes the contour curve type and surface curvature information of the hole.

6. The reconstruction method of HBIM in the ancient building digital twin technology according to claim 1 is characterized in that: The attribute mapping method includes: Relational database selection and data table design steps: Select a relational database as the tool for performing attribute mapping operations. Based on the application requirements of the ancient building digital twin and the attribute definitions in IFC semantics, comprehensively analyze the non-geometric information types and then classify and design attribute data tables, including at least an identification information table, a geometry information table, a material information table, and a location information table. Each table is used to accurately store the corresponding type of attribute information to build a structured attribute storage system. Attribute information extraction and storage steps: Parse the JSON file generated by digital-analog decoupling to accurately extract attribute information. According to the designed attribute data table structure, the extracted attribute information is stored in a relational database to achieve structured storage of attribute information based on component IDs, ensuring that the attribute information of each component can be organized in an orderly manner and efficiently retrieved. Steps for establishing a bidirectional link and updating mechanism: Use component unique identifiers to establish a bidirectional link between attribute data and glTF geometric models, enabling the attribute data to be associated and interact with the geometric models. On this basis, an update mechanism is built to monitor the status of database attribute information and glTF models in real time. Once either changes, an update process is immediately initiated to ensure that the two remain synchronized, providing accurate and consistent data support for the ancient building digital twin model. Attribute information classification and analysis steps: During the HBIM model data processing process, attribute information is subdivided into direct attributes, derived attributes and inverse attributes according to its source and definition method. Direct attributes are scalars or direct information, which are directly used to describe the basic characteristics of the object entity; derived attributes are attributes expressed by other entities, which enrich the description of the object entity by associating other entities; inverse attributes are attributes linked with the help of associated entities. Through the detailed classification and analysis of attribute information, a deep understanding and precise management of the attributes of the ancient building model can be achieved.

7. The reconstruction method of HBIM in the ancient building digital twin technology according to claim 6 is characterized in that: In the relational database selection and data table design steps, the identification information table is used to store the unique identifier, name, and number of the component to identify the component, and the primary key constraint is used to ensure the uniqueness of the data; the geometric information table stores the geometric shape description information of the component, including vertex coordinates and face information, and realizes the efficient use of geometric information by interfacing with the geometric modeling algorithm; the material information table records the material name, material properties, and material source information of the component in detail, and combines with the material database to provide a data basis for the analysis of ancient building materials; The position information table records the spatial position information of the components in the building model, including coordinate values and relative position relationships, to facilitate spatial layout analysis.

8. The HBIM reconstruction method in the ancient building digital twin technology according to claim 7 is characterized in that: In the attribute information extraction and storage steps, when parsing the JSON file, a recursive algorithm is used to traverse the file structure to ensure that no attribute information is missed. For attribute information with complex nested structures, a temporary cache area is established for temporary storage and organization, and then stored according to the data table structure to improve storage efficiency and accuracy.

9. The reconstruction method of HBIM in the ancient building digital twin technology according to claim 8 is characterized in that: In the steps of establishing a bidirectional link and updating the mechanism, bidirectional links are implemented using pointer- or index-based technologies. Link information pointing to each other is established in the database and glTF model respectively. When an update requirement is detected, a transaction processing mechanism is used to ensure the atomicity of the update process.