BIM model storage system and method based on lightweight data
Through tree segmentation management and multiplexed segmentation technology, the problem of low storage and rendering efficiency of BIM models is solved, and efficient data management and rendering performance is achieved.
Patent Information
- Application Number
- CN202510046784.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2045-01-13
AI Technical Summary
The existing BIM model storage technology based on lightweight data has significant shortcomings in data management and organizational capabilities, and it is difficult to meet the efficient storage, transmission and application needs of BIM models.
A tree segment management module is used to build a tree segment structure, and a parent-child segmentation relationship is managed through the attribute inheritance mechanism, multiplexed segments are created to achieve data reuse, and rendering efficiency is optimized through the parallel rendering module.
It improves the efficiency and flexibility of data storage, reduces data redundancy, optimizes rendering performance, and meets the efficient storage and reading requirements of complex model data.
Smart Images

Figure CN119442441A_ABST
Abstract
Description
Background Art
[0002] With the widespread application of Building Information Modeling (BIM) technology in the construction, water conservancy and hydropower, new energy and other industries, BIM design software of different professions has generated a variety of data formats, resulting in the increasing complexity and data volume of BIM models. Especially on mobile devices and low-performance hardware, the rendering efficiency of high-polygon models is low, which can easily lead to frame rate drops and freezes, seriously affecting the user experience. Therefore, model lightweighting has gradually become a key technology to improve rendering efficiency and performance.
[0003] However, in the related BIM model storage technology based on lightweight data, in terms of model data reuse, existing methods usually achieve model reuse by repeatedly storing the same geometric information or attribute data. This method not only increases the redundancy of data storage, but also puts higher requirements on the efficiency of data management, and is difficult to flexibly adapt in multi-scenario applications. In addition, for the drawing attributes of the model, traditional technologies are independently configured in different segments, lacking centralized management methods, resulting in redundancy in the storage and call of drawing attribute information, increasing the storage volume and processing complexity.
[0004] In terms of lightweight data organization, existing technologies mostly use a single storage structure to process BIM model data, which is difficult to meet the needs of complex models for multi-level data association. This storage method lacks flexible organization capabilities when facing diverse geometric information and attribute information, making it difficult to accurately maintain the inheritance relationship between data.
[0005] In summary, the existing BIM model storage technology based on lightweight data has significant deficiencies in data management and organization capabilities, and it is difficult to meet the efficient storage, transmission and application needs of BIM models. Summary of the invention
[0006] The present application provides a BIM model storage system based on lightweight data, a BIM model storage method based on lightweight data, an electronic device and a computer-readable storage medium, aiming to solve the technical problem that the BIM model storage technology based on lightweight data in the prior art is insufficient in data storage efficiency, organizational structure design and transmission capability, and is difficult to meet the needs of actual engineering applications.
[0007] Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
[0008] According to a first aspect of the present disclosure, a BIM model storage system based on lightweight data is provided, and the BIM model storage system based on lightweight data includes: a tree segment management module, which is used to construct a tree segment structure, take each segment as a storage unit, set a parent-child relationship between the storage units, and manage the relationship between the parent segment and the child segment through an attribute inheritance mechanism; a segment reuse creation module, which is used to create reused segments in the tree segment structure, and realize data reuse by reference, and create style segments for centralized management of drawing attribute information; a parallel rendering module, which is used to render model elements based on geometric information and attribute information in the reused segments by a parallel computing method, and manage rendering parameters; a lightweight data generation module, which is used to organize the BIM model data according to the tree segment structure, and generate a binary data file containing a data header, a data block, and a data tail; a data compression module, which is used to compress the binary data file and generate a compressed format storage file.
[0009] According to a second aspect of the present disclosure, a BIM model storage method based on lightweight data is provided, which is applied to a BIM model storage system based on lightweight data as described in any of the above embodiments, the method comprising: constructing a tree segment structure, taking each segment as a storage unit, setting a parent-child relationship between the storage units, and managing the relationship between the parent segment and the child segment through an attribute inheritance mechanism; creating a reuse segment in the tree segment structure, and realizing data reuse by reference, and creating a style segment for centralized management of drawing attribute information; based on the geometric information and attribute information in the reuse segment, using a parallel computing method to render the model primitives, and managing rendering parameters; organizing the BIM model data according to the tree segment structure, and generating a binary data file containing a data header, a data block, and a data tail; compressing the binary data file to generate a compressed format storage file.
[0010] It can be seen from the above technical solution that the present disclosure has at least one of the following advantages and positive effects: The lightweight data-based BIM model storage system disclosed in the present invention is composed of a tree segment management module, a segment reuse creation module, a parallel rendering module, a lightweight data generation module, and a data compression module. Among them: The tree segment management module organizes BIM model data into multiple associated segments according to the hierarchical structure through the tree segment management mechanism. Each segment is used as an independent storage unit, and the parent-child segment relationship is set and managed using the attribute inheritance mechanism. This design reduces redundancy in the data storage process and improves the flexibility of data organization. At the same time, it provides an effective solution for the complex association requirements of multi-level models, significantly improves the storage and reading efficiency of complex model data, and optimizes the storage and access performance of BIM models in an environment with limited hardware resources.
[0011] The segment reuse creation module avoids the problem of repeated storage of geometric information and attribute data through the reference mechanism, and introduces style segmentation to centrally manage drawing attribute information, reducing the redundant configuration of attribute data in the segment and improving the standardization and consistency of drawing attribute management. This centralized management mode enhances the flexibility of data reuse, adapts to the needs of diverse application scenarios, and reduces the complexity of drawing attribute management and storage.
[0012] The parallel rendering module uses parallel computing methods to render model primitives based on the segmented organization of geometric information and attribute information. By optimizing the allocation of computing resources, the rendering efficiency and model visualization performance are improved, so that high-polygon models can be displayed smoothly on hardware devices with limited performance. At the same time, based on the segmented organization of rendering, rendering parameters can be dynamically adjusted to improve the overall efficiency of the rendering engine.
[0013] The lightweight data generation module organically integrates geometric information, attribute information and organizational structure information through a segmented structure to generate a binary data file containing a data header, data block and data footer. The lightweight data format completely retains the key information of the model while reducing the storage volume, effectively avoiding the loss of model information, and providing a good foundation for subsequent data compression and rapid transmission.
[0014] The data compression module compresses geometric information, attribute information and organizational structure information based on the structural characteristics of lightweight data files, and generates compressed storage files. Through reasonable compression strategies, the storage volume is reduced and the model transmission efficiency is improved, avoiding the problems of low transmission efficiency and slow loading of traditional model files, while ensuring data integrity.
[0015] In summary, the lightweight data-based BIM model storage system disclosed in the present invention can solve the defects in the existing technology from multiple dimensions of data storage, reuse, management and rendering, realize a BIM model storage solution with efficient storage, fast transmission and multi-scenario adaptation, and achieve better performance on multiple terminal devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0017] Figure 1 This is a structural block diagram of a BIM model storage system based on lightweight data in one embodiment of the present disclosure; Figure 2 It is a schematic diagram of the composition of a tree-like segmented structure in one embodiment of the present disclosure; Figure 3 This is a structural block diagram of a BIM model storage system based on lightweight data in another embodiment of the present disclosure; Figure 4 This is a schematic diagram of the operation flow of a BIM model storage system based on lightweight data in one embodiment of the present disclosure; Figure 5 This is a schematic diagram of the organizational structure of an Include Segment node in one embodiment of the present disclosure; Figure 6 This is a schematic diagram of the organizational structure of a Style Segment node in an embodiment of the present disclosure; Figure 7 This is a schematic diagram of the organizational structure of a Driver Segment root node in an embodiment of the present disclosure; Figure 8 This is a schematic diagram of the application structure of a BIM model storage system based on lightweight data in one embodiment of the present disclosure; Fig. 9 A schematic diagram of a hierarchical organization of a Segment data structure in one embodiment of the present disclosure; Fig.10 This is a schematic diagram of the composition structure of a binary data file in an embodiment of the present disclosure; Fig.11 This is a schematic diagram of a writing process of a binary data file in an embodiment of the present disclosure; Fig.12 A flowchart of a BIM model storage method based on lightweight data in an embodiment of the present disclosure; Fig.13 A schematic diagram schematically shows a structure of a computer system of an electronic device according to some embodiments of the present disclosure; Fig.14 is a schematic diagram of a computer-readable storage medium according to some embodiments of the present disclosure.
[0018] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0019] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application, but are not intended to limit the scope of the present application. Similarly, the following examples are only some embodiments of the present application rather than all embodiments, and all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0020] In the description of the present invention, terms such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "clockwise", "counterclockwise", "axial", "radial", etc. indicating directions or positional relationships are based on the drawings and are only for the convenience of description and simplified description. They do not mean that the device or element must have a specific direction, be constructed and operated in a specific direction, and cannot be regarded as a limitation of the present invention.
[0021] The terms "first" and "second" are used for description only and do not indicate relative importance or imply the number of technical features. Therefore, the "first" and "second" features may explicitly or implicitly include at least one of the features. The meaning of "plurality" is at least two, unless otherwise explicitly defined.
[0022] In an exemplary embodiment of the present disclosure, firstly, a BIM model storage system based on lightweight data is provided. Figure 1 The structure block diagram of a BIM model storage system based on lightweight data in one embodiment of the present disclosure is schematically shown. Figure 1 As shown, the BIM model storage system based on lightweight data includes a tree segment management module 1, a segment reuse creation module 2, a parallel rendering module 3, a lightweight data generation module 4 and a data compression module 5. Among them, the tree segment management module 1 can be used to construct a tree segment structure, take each segment as a storage unit, set the parent-child relationship between the storage units, and manage the relationship between the parent segment and the child segment through the attribute inheritance mechanism; the segment reuse creation module 2 can be used to create a reused segment in the tree segment structure and realize data reuse by reference, and create a style segment for centralized management of drawing attribute information; the parallel rendering module 3 can be used to render the model element based on the geometric information and attribute information in the reused segment, and manage the rendering parameters by using a parallel computing method; the lightweight data generation module 4 can be used to organize the BIM model data according to the tree segment structure, and generate a binary data file containing a data header, a data block and a data tail; the data compression module 5 can be used to compress the binary data file and generate a compressed format storage file.
[0023] Below, the functional principles of the tree segment management module 1, the segment reuse creation module 2, the parallel rendering module 3, the lightweight data generation module 4 and the data compression module 5 in the BIM model storage system based on lightweight data are described in detail.
[0024] The tree segmentation management module 1 organizes the BIM model data into multi-level storage units by constructing a tree segmentation structure. The composition diagram of the tree segmentation structure can be as follows: Figure 2As shown in the figure, it contains two tree structures. The top-level node represents the root node of the entire scene graph, that is, the BIM model. The second-level and third-level nodes under the root node represent the sub-segments in the model. Each segment is defined as an independent storage unit, including geometric information, attribute information, and possible sub-segments. Its structure is represented in the form of nodes. The parent node and the child node are linked by logical relationships to form a tree-like hierarchical organization. The setting of the parent-child relationship is realized through the reference mechanism of the segment node. Each sub-segment references its parent segment to establish an inheritance chain. The attribute inheritance mechanism is realized by storing common attributes on the parent node and automatically applying these attributes in the child node, avoiding the problem of repeated configuration of the same attributes. In this way, the segment management module ensures efficient organization and access to complex model data. In addition, the module supports dynamic adjustment of the depth of the tree structure and the distribution of segment nodes to meet the storage requirements of different BIM model data. In actual operation, the storage of segment nodes adopts memory mapping, and the parent-child relationship is recorded in the form of pointers or indexes, which supports fast query and efficient operation.
[0025] The segment reuse creation module 2 introduces reuse segments on the basis of the tree segment structure to reduce the repeated storage of data. The creation process of reuse segments includes the analysis of geometric information and attribute information, classifying the same or similar data according to the repetition rate, and storing it as a shared reuse segment. The reference mechanism is used in the practical application of reuse segments. Each reference node only needs to record the unique identifier of the reuse segment to achieve data reuse. Style segmentation is used to centrally manage drawing attribute information. By associating style segmentation with segmentation nodes, redundant storage of attribute data is reduced. The attributes defined in the style segmentation include drawing information such as color, transparency, and line type, and its content is stored in a structured manner, such as in the form of key-value pairs or attribute tables. In actual operation, the creation of reuse segments calculates the unique values of geometric information and attribute information through a hash algorithm, and the management of style segments achieves efficient memory utilization and real-time updates through a reference counting method.
[0026] The parallel rendering module 3 uses the geometric information and attribute information in the reused segments to achieve efficient rendering of model primitives through task division and scheduling mechanisms. The task allocation unit in the module divides the rendering task into multiple subtasks according to the segment structure, and each subtask corresponds to a specific segment range to ensure balanced task division. The task scheduling unit sorts the task allocation results and dynamically adjusts the priority of the rendering task according to the status of hardware resources and thread pools to ensure maximum utilization of parallel computing resources. During the rendering process, the module generates rendering instructions based on the geometric information of the segment, and sets the drawing parameters in combination with the attribute information, including lighting, texture, and transparency. The management of rendering parameters is achieved through a parameter caching mechanism, which reduces the overhead of repeated calculations. In actual operation, the task scheduling of parallel rendering adopts a depth-first algorithm, and the merging of rendering results is completed through graphics hardware acceleration, supporting multi-threaded real-time rendering processing.
[0027] The lightweight data generation module 4 integrates and processes the geometric information, attribute information and organizational structure information according to the tree segmentation structure to generate a lightweight binary data file. The binary file consists of a data header, a data block and a data tail. The data header records the basic information and index table of the file. The data block contains the geometric information and attribute information of the model. The data tail is used to store the check code and metadata. The module adopts block storage, maps the segment structure into continuous binary blocks, and realizes rapid positioning through the index table. The generation of the data header analyzes the attributes of each segment node in the segment structure, extracts key metadata and encodes it into a fixed format. The generation of the data block includes compression processing of the geometric information and streamlined storage of the attribute information. The compression algorithm supports sparse matrix representation of point, line and surface data, and the attribute information is encoded in the form of binary key-value pairs. After the file generation is completed, the check value of the data tail is calculated by the hash algorithm for integrity verification. In actual operation, the module manages the multi-threaded data generation process through a dynamic buffer and supports file format adaptation of different storage media.
[0028] The data compression module 5 further optimizes the storage efficiency by compressing the geometric information, attribute information and organizational structure information on the basis of generating binary data files. It first scans the data file in segments and extracts the key information in each segment, including vertex data, attribute key-value pairs and segment indexes. The compression process is divided into three stages: geometric information compression, attribute information compression and structural information compression. The geometric information compression adopts sparse matrix representation to organize vertex and face data into sparse matrices, and significantly reduces the data volume through row and column compression algorithms. Attribute information compression realizes the merged storage of repeated attributes through the hash encoding method of attribute key-value pairs, and optimizes the storage efficiency by reference. Structural information compression is based on a tree-like segmented structure, extracts the association relationship between parent and child nodes, and generates a compact index table through depth-first traversal. The compression algorithm selection of the data compression module can be dynamically adjusted according to the structural information and data volume of the file. The file scanning stage selects the optimal compression algorithm by calculating the complexity indicators of the file, including the number of data blocks, vertex density and attribute types. For example, for geometric data with high vertex density, the module gives priority to block-encoding-based geometry compression algorithms; for files with complex attribute types, a hierarchical key-value merging compression strategy is adopted. The compressed files are finally stored in blocks, and are quickly located and decompressed through the index information in the file header. The data compression module supports parallel processing of different data blocks. Each thread is independently responsible for the compression task of geometric information, attribute information or structural information, and finally achieves unified data output through thread pool management and scheduling. The compressed binary files are stored in a fixed format, including the compression algorithm identifier, compression block index and data block verification information, to ensure the integrity and compatibility of the files in subsequent transmissions.
[0029] The tree segment management module 1, segment reuse creation module 2, parallel rendering module 3, lightweight data generation module 4 and data compression module 5 realize the efficient storage, transmission and application of lightweight data through multi-dimensional and multi-level technical methods. The modules are associated with the tree segment structure and binary data files to form a complete lightweight BIM model storage system. The overall design of the system takes into account the optimization of storage efficiency and the flexibility and scalability of data management, providing reliable technical support for the practical application of complex BIM models.
[0030] In addition, in other embodiments of the present disclosure, Figure 3As shown, the BIM model storage system based on lightweight data also includes: an attribute processing module 6, a geometry processing module 7, an update processing module 8, a multi-thread processing module 9, an event processing module 10 and an interface definition module 11. Among them, the attribute processing module 6 can be used to obtain and set the color attribute, visibility attribute and selected attribute of the BIM model; the geometry processing module 7 can be used to edit, insert and display geometric primitives, which include points, lines, surfaces, circles and ellipses; the update processing module 8 can be used to set and update the rendering state, geometry data, coloring, fonts, viewports and camera parameters; the multi-thread processing module 9 can be used to manage thread tasks, including adding, executing and ending thread tasks; the event processing module 10 can be used to manage application layer events, including adding, executing and deleting events; the interface definition module 11 can be used to provide an interface for application layer calls, and the interface supports access and operation of different module functions.
[0031] Among them, the attribute processing module 6 can be used to obtain and set the key attributes of the BIM model. The color attribute is used to define the display color of the geometric elements in the BIM model. It can be expressed by the three primary color values (RGB) or other color spaces, and supports separate color settings for different elements. The visibility attribute is used to control the display status of the geometric elements in the view, indicating whether it is visible through a Boolean value, and allowing the display status to be configured separately for different views. The selection attribute is used to identify whether the element can be selected by the user, which is represented by a state value, and can be linked with the user interaction module to respond to the user's selection behavior. The attribute processing module uses a unified operation method to consistently manage the color, visibility, and selection attributes of the target element, thereby ensuring the integrity and consistency of the model attributes in storage and use.
[0032] The geometry processing module 7 can be used to edit, insert and display geometric primitives in the BIM model. Geometric primitives include points, lines, surfaces, circles and ellipses, where points are represented by three-dimensional coordinates, lines are formed by connecting two or more points, surfaces are formed by line segments, and circles and ellipses are defined by their center points, radii or major and minor axis parameters. The geometry processing module allows the position adjustment, shape change and topological relationship maintenance of geometric primitives, supports adding geometric primitives to specified locations and rendering and displaying, and ensures the consistency and integrity of geometric data.
[0033] The update processing module 8 can be used to set and dynamically update the rendering state, geometry data, shading, fonts, viewports and camera parameters of the BIM model. The rendering state includes turning on and off rendering effects such as lighting, shadows and transparency. The geometry data update allows the modification of vertex and topology information and synchronizes the update in the rendering pipeline. The shading settings include the adjustment of parameters such as texture mapping, color gradient and transparency to meet diverse visual needs. The font setting supports the adjustment of the style, color, size and spacing of the text for the refined display of model annotations. The viewport parameter adjustment covers the zooming and panning of the view range, and the camera parameter update involves the dynamic change of the viewing angle, projection mode and focal length. Through these functions, the update processing module can quickly adapt to the visualization and interaction needs of the model.
[0034] The multithreading module 9 can be used for the management of adding, executing and terminating thread tasks. Task addition allows tasks of different modules to be added to the task queue, and the task queue is sorted according to the priority or dependency of the task. Task execution is realized by the thread pool, and different types of tasks are assigned to suitable threads to ensure the orderly processing of parallel tasks. When the task ends, the occupied resources are released and the completed tasks are removed from the task queue. The multithreading module also supports the size of the thread pool to be dynamically adjusted according to the system load to optimize the resource utilization of the system.
[0035] The event processing module 10 can be used to manage the addition, execution and deletion of application layer events. Event addition packages the captured input into a standardized event object by monitoring the input operation of the user interface or system, and stores it in the event queue. Event execution is distributed to the corresponding processing function or module according to the event type through a distribution mechanism to complete the event response operation. Event deletion supports explicit calls or automatic cleanup mechanisms to remove expired or invalid event objects. The event processing module can achieve efficient management of user input and system behavior, and improve the sensitivity of interactive responses.
[0036] The interface definition module 11 can be used to provide an interface for application layer calls, and supports access and operation of the attribute processing module, geometry processing module, update processing module, multi-thread processing module and event processing module functions. The interface design follows the modular principle, corresponds to the core functions of each functional module, and supports standardized calling procedures for parameter passing and result return. The interface definition module allows flexible selection of synchronous and asynchronous calls, ensuring efficient operation of the system under multiple scenarios and multiple requirements.
[0037] In addition, reference Figure 3As shown, the BIM model storage system based on lightweight data can also include a graphic element copy management module 12, a boundary volume calculation module 13, a picking function module 14 and an interface management module 15. Among them, the graphic element copy management module 12 can be used to store the geometric information and attribute information of the segmentation node based on the tree segmentation structure, generate the corresponding graphic element copy, and store the graphic element copy in the display list to support the rapid modification and traversal of the graphic information; the boundary volume calculation module 13 can be used to calculate the boundary volume according to the geometric information of the graphic element copy, store the boundary volume as the spatial position range of the graphic element, and remove the invisible graphic element during rendering; the picking function module 14 can be used to determine the target graphic element pointed to by the user cursor through the graphic element copy and geometric information in the display list, and generate a selection result; the interface management module 15 can be used to provide an external call interface, and the interface includes an initialization interface, an operation interface and a resource release interface.
[0038] Among them, the primitive copy management module 12 stores the geometric information and attribute information of the segmented nodes based on the tree-like segmented structure, and generates corresponding primitive copies. The primitive copy refers to the copy of the geometric and attribute data stored in the display list, which can quickly respond to the modification and access operations of the primitive information. The geometric information includes the coordinate data and topological relationship of basic geometric primitives such as points, lines, and surfaces, and the attribute information includes color, transparency, material and other content related to the appearance of the primitive. During the primitive copy generation process, the module extracts the geometric information and attribute information of the nodes in turn according to the hierarchical relationship of the segmented nodes, organizes them into a unified copy data structure, and stores them in the display list. The display list is a data structure optimized for graphics rendering, which can efficiently store and manage a large number of primitive copy data. Through the display list, when the system needs to access the primitive information, it does not need to repeatedly calculate or read from the original data, but directly calls the copy data, which greatly improves the modification and traversal efficiency of the primitive.
[0039] The boundary volume calculation module 13 calculates the boundary volume based on the geometric information of the primitive copy to store the spatial position range of the primitive and remove invisible primitives during rendering. The boundary volume refers to the minimum spatial geometric range surrounding the primitive, such as a bounding box or a bounding sphere, which can be calculated by analyzing the vertex coordinates and topological relationship of the primitive. During the calculation process, the module first extracts the geometric information of the primitive and determines the minimum and maximum boundary values of the primitive in three-dimensional space based on the coordinate data. Subsequently, the module converts these boundary values into a standardized boundary volume data structure, such as an axis-aligned bounding box or a bounding sphere, and stores it in the associated primitive copy. During the rendering process, the module spatially judges the boundary volume of each primitive with the view cone based on the range of the camera view cone, and quickly removes invisible primitives outside the view cone, thereby optimizing the rendering performance.
[0040] The picking function module 14 determines the target primitive pointed by the user cursor and generates a selection result by displaying the primitive copies and geometric information in the list. Picking refers to a function in which the graphics system responds to user input and determines the user's operation target, which is usually implemented through a ray casting algorithm. During user interaction, the picking function module quickly obtains the primitive copy data related to the user operation through the display list, and uses the geometric information to calculate the ray at the cursor position. The module performs spatial intersection detection on the ray and the geometric data of the primitive copy to determine whether the cursor intersects with a specific primitive, and selects the target primitive closest to the user's perspective based on the depth value of the intersection. The picking result includes the unique identifier and related attribute information of the target primitive, and the module passes the picking result to the user interaction module or the application layer for subsequent operations. Through the display list, the picking function module avoids repeated access to the original data, thereby significantly improving the response speed of the picking operation.
[0041] The interface management module 15 provides an external call interface, which includes an initialization interface, an operation interface, and a resource release interface. The initialization interface is used to set the basic state of the graphics system, including the initialization of the display list, memory allocation, and pre-configuration of the data structure; the operation interface supports external programs to call the core functional modules of the system, such as primitive copy management, boundary volume calculation, and picking operations; the resource release interface is used to release the allocated memory and clean up the data structure when the system is shut down or the resources are no longer used, to ensure the efficient use and security of system resources.
[0042] In the above-mentioned embodiment, the BIM model storage system based on lightweight data is based on the synergy of each module, and by optimizing the data organization, reuse, compression and rendering process, it realizes efficient storage, fast transmission and flexible application of BIM models, and significantly improves the performance and scalability of the system. The operation process of the BIM model storage system based on lightweight data can be as follows: Figure 4 As shown in the figure, the startup, operation and termination process of the BIM model storage system based on lightweight data is demonstrated, including the complete process of initialization, interface call and resource release.
[0043] When the application starts, the GS_Init_Database interface is called first to enter the system initialization phase. This phase includes the following operations: creating a Root Segment node as the root node of the entire segment tree to provide a basis for subsequent node management; creating a Driver Segment root node to manage driver module data; creating an Include Segment node to include shared data segments; creating a Style Segment node to centrally manage styles and drawing properties. Subsequently, the rendering state of the system is initialized, including setting the mixed rendering state, the clipping rendering state, and the clipping geometry rendering state to provide support for rendering performance optimization. At the same time, the state machine is initialized to manage the different states of system operation, the event handler is initialized to ensure that the system can efficiently handle user events, and finally the multi-threaded service is initialized to support parallel computing and task distribution.
[0044] After initialization, the application enters the running stage, and the system's functional modules can be called through the GS_xxx_xxx interface to perform lightweight BIM model management operations. At this stage, the system supports the following operations: creating scenes to organize the overall structure of the model, creating views to provide multiple viewing methods; setting the transformation parameters of the model, including translation, rotation, and scaling; renaming segment nodes to improve the flexibility of model management. The system allows the model's rendering properties and styles to be processed, including obtaining and setting the color, visibility, and other attribute information of the node, and supports cleaning style data to optimize storage efficiency. In addition, the system supports the reading and saving of models, as well as the insertion and operation of geometric data, such as adding lighting or inserting pictures. When rendering, the system also provides the setting and cleaning functions of visibility and text attributes to ensure the rendering effect of the model in different scenes. In addition, the system also provides functions such as updating scenes, obtaining geometry, inserting lighting, and clearing child nodes.
[0045] When the application needs to terminate, the GS_Fina_Database interface is called to complete the release of system resources. At this stage, the system stops the operation of the state machine, terminates the multi-threaded service, cleans up the event processor, and releases all allocated event resources to ensure safe system shutdown and complete resource recovery.
[0046] In addition, the organization structure of the Include Segment node is as follows Figure 5As shown, IncludeSegment is a special node used to achieve data reuse, which is a reference to a normal subsegment elsewhere in the graph database. The included subsegment is associated with the target segment through a link mechanism. The linked target segment exists as an instance and retains its geometric information, attribute information, and subsegment information. The included subsegment can be instantiated multiple times in the graph tree. As shown in the figure, multiple Instance nodes, such as Instance 1 and Instance 2, point to the same target segment through the Include instruction, that is, the included subsegment. The included subsegment can be connected to multiple segments. When the data of the target segment is modified, all associated instances are updated synchronously, thereby achieving efficient data consistency management.
[0047] The organization structure of the Style Segment node is as follows Figure 6 As shown, Style Segment is a node specifically used to store drawing attribute data. Unlike regular Segments, it usually does not contain geometric shapes and only stores attribute data used to control drawing effects. These attributes include transparency (Alpha), color (Color), texture (Texture), visibility (Visibility), selectability (Selectability), and modeling matrix (ModellingMatrix). In the model structure, changes to the Style Segment will automatically affect all Segments that reference the segment, without the need to adjust them one by one, thereby improving the efficiency and consistency of attribute management. In addition, the system provides a location defined as "Style Library" for centralized storage and management of these Style Segments.
[0048] The organizational structure of the Driver Segment root node is as follows Figure 7 As shown, the Driver Segment root node is used to manage the interaction between the system and different graphics device drivers. The root node can be defined as "driver", which contains multiple sub-segments, such as "emscripten", "opengl3", "longan gui" and other driver sub-segments, each of which corresponds to a specific graphics device driver format. The design of these sub-segments allows the system to flexibly support different types of graphics hardware or rendering environments, and simplifies the complexity of developers in dealing with these differences through a unified structure. In addition, the root node is also linked to other supporting modules, such as "include library" and "style library" to achieve effective integration of drawing instructions, styles and device drivers.
[0049] Furthermore, the lightweight data-based BIM model storage system in the disclosed embodiment can be developed based on C language, using opengl graphics rendering library and webAssembly technology, encapsulating the three development frameworks of LonganFx, LonganFx Cloud, and LonganFx Service, which are respectively used for desktop application, web front-end, and server-side graphics application development and calling. The application structure of the lightweight data-based BIM model storage system can be as follows: Figure 8 As shown in the figure, the application structure of the BIM model storage system based on lightweight data includes three main parts: graphics driver layer, development framework layer and business application layer, which respectively provide underlying rendering support, middle-layer framework functions and adaptation of upper-layer business scenarios. The graphics driver layer implements the underlying support for graphics rendering through OpenGL and WebAssembly technologies, and is responsible for converting lightweight BIM data into rendering instructions that can be understood by graphics hardware. The development framework layer includes three modules: LonganFx, LonganFx Cloud and LonganFxService, which constitute the core tools for developers to build 3D graphics applications. LonganFx is used for the development of desktop graphics applications and provides local high-performance graphics processing capabilities; LonganFx Cloud is for Web front-end graphics application development, and combines WebAssembly technology to realize online loading, interaction and display of lightweight models; LonganFxService is for server-side graphics applications, supports large-scale BIM data processing and distribution in multi-user collaboration scenarios, and provides underlying support for distributed graphics computing. The business application layer covers three scenarios: desktop graphics, front-end graphics and server-side graphics, corresponding to different business needs. Desktop graphics are suitable for high-performance local BIM model editing and visualization scenarios; front-end graphics are suitable for scenarios where lightweight BIM models are accessed through a browser, supporting real-time operations of users on low-performance devices; server-side graphics are suitable for centralized model management and rendering service scenarios, and achieve efficient processing of complex models by coordinating multi-user requests.
[0050] Next, in other embodiments, components and technical details of the tree segment management module 1, the segment reuse creation module 2, the parallel rendering module 3, the lightweight data generation module 4 and the data compression module 5 are described in detail.
[0051] In some embodiments, the tree segmentation management module includes a segmentation creation unit, a parent-child association unit, a segmentation hierarchy construction unit, and a data mapping unit. Among them, the segmentation creation unit can be used to create multiple segmentation nodes, the segmentation nodes contain geometric information, attribute information, and sub-segmentation information, and set a unique identifier for each segmentation node; the parent-child association unit can be used to establish a parent-child relationship between segmentation nodes based on the segmentation nodes, and pass the attributes of the parent segment through the attribute inheritance mechanism, while allowing the sub-segment to overwrite the inherited attributes; the segmentation hierarchy construction unit can be used to organize the segmentation nodes into a tree segmentation structure using the parent-child relationship established by the parent-child association unit, and associate corresponding sub-segmentation nodes with each parent segmentation node; the data mapping unit can be used to map the geometric information, attribute information, and organizational structure information of the BIM model to the segmentation nodes generated by the segmentation creation unit to complete the construction of the tree segmentation structure. Specifically: The segment creation unit is used to create multiple segment nodes, each of which serves as an independent unit for storing geometric information, attribute information, and sub-segment information. When creating a segment node, the system assigns a unique identifier to each node, which uses a specific data format to ensure that the segment node is identified without conflict in the entire tree segment structure. Geometric information includes vertex coordinates and topological relationships of geometric primitives such as points, lines, and surfaces. Attribute information includes characteristics that describe the appearance of geometric primitives such as color, transparency, and material. Sub-segment information is used to record the association between a segment and its subordinate segments. The creation of a segment node is completed by initializing the geometry and attribute data fields, and storage space is reserved for sub-segment information to support subsequent tree relationship construction. Through the segment creation unit, the system can organize and store multi-dimensional information in the BIM model in a standardized manner, providing an efficient storage basis for subsequent operations.
[0052] The parent-child association unit establishes a parent-child relationship based on the segment nodes, and implements attribute transfer and management through the attribute inheritance mechanism. When building a parent-child relationship, the system records each child node as an associated object of its parent node, and stores a reverse reference to the parent node in the child node, thereby forming a bidirectional association. The attribute inheritance mechanism is implemented by defining global attributes in the parent node and automatically inheriting them in the child node. The child node does not need to explicitly store duplicate attributes, thereby reducing data redundancy. When the child segment needs to override the inherited attributes, the parent-child association unit supports partial rewriting of the attributes, and ensures that the attribute settings of the child node can take effect correctly by marking the priority of the rewritten attributes. The operation logic of this unit is implemented by traversing the segment nodes, mapping the parent-child relationship into a node hierarchy, and ensuring the organization and access efficiency of the segments.
[0053] The segmentation hierarchy construction unit uses the parent-child relationship established by the parent-child association unit to organize all segmentation nodes into a tree-like segmentation structure. In the segmentation hierarchy construction process, the system associates its child nodes layer by layer starting from the root node through a recursive algorithm, and nests the segmentation nodes layer by layer to form a hierarchical tree structure. Each parent segment node maintains a list of its direct child segment nodes, and stores the depth and width information of the tree in the node structure to support subsequent traversal and rendering operations. Through the segmentation hierarchy construction unit, the system can efficiently generate a complete tree-like segmentation structure, providing a logically clear and hierarchical storage architecture for the organization and management of BIM models. In addition, the tree-like segmentation structure can also be called a Segment data structure. In the embodiment of the present disclosure, the design rules of the Segment data structure can be defined as: Segment encapsulates a common interface; Segment uses data hiding to protect the internal details it represents; Segment has properties similar to member variable objects; a Segment can have one or more child segments. The hierarchy formed by these segments in the graph database is similar to the class hierarchy in object-oriented languages; just as member variables are inherited by subclasses, attributes are also inherited by subsegments. This form of inheritance is called attribute inheritance; a segment can be reused by using include segments and style segments; a segment contains a single list of geometries belonging to the segment.
[0054] Furthermore, the hierarchical organization of the Segment data structure can be as follows Fig. 9As shown. Among them, the Segment data structure mainly consists of four parts: drawing structure, geometry data, drawing data and attribute data. The drawing structure (Structures) contains three structural units: Segment, Include and Style. Segment is the basic segmentation unit, which is used to define independent geometry information and attribute information; Include realizes data reuse by referencing other Segments, reducing redundant storage; Style is used to centrally manage style attributes, such as color, texture, etc., uniformly control the drawing style of the segment, and optimize the simplicity and flexibility of data management. Geometry (Geometries) data includes various basic geometric primitives in the model, such as points, lines, surfaces, polylines, circles, ellipses, polygons and text. Drawing (Attributes) data contains core attributes related to graphics rendering, including camera (Camera) parameters, material (Material) information, visibility (Visibility) and selectability (Selectability). Attributes (Properties) data contains the identifier (id), element type (Element Type), numerical attributes and other custom properties (Properties) of each Segment node. Through this hierarchical design, the Segment data structure ensures efficient organization and access to geometric and attribute information, minimizing the switching of hardware contexts during the drawing process. At the same time, the optimized display list improves throughput and can quickly respond to graphics rendering and update requests for complex scenes, thus meeting the efficient application of BIM models in multiple scenarios and multiple requirements.
[0055] The data mapping unit is responsible for mapping the geometric information, attribute information, and organizational structure information in the BIM model to the segment nodes generated by the segment creation unit. During the data mapping process, the system parses the source data of the BIM model, extracts geometric primitives and their attribute information, and standardizes these data according to the storage format of the segment nodes. The geometric information is mapped to the geometric field of the segment node, the attribute information is decomposed into key-value pairs and stored in the attribute field, and the organizational structure information is mapped by matching the hierarchical relationship with the segment nodes. Through the data mapping unit, the data of the BIM model can be efficiently integrated into the tree segment structure, thereby realizing the lightweight organization and management of complex model data.
[0056] In some embodiments, the segment reuse creation module includes a reuse segment generation unit, a reuse segment reference unit, a style segment definition unit and a style segment association unit. Among them, the reuse segment generation unit can be used to create reuse segments based on the tree segment structure constructed by the tree segment management module, and configure geometric information and attribute information for the reuse segments, and assign unique reference identifiers; the reuse segment reference unit can be used to reference the reuse segments to multiple segment nodes through the reference identifier generated by the reuse segment generation unit, and ensure that the geometric information and attribute information between the segment nodes are consistent; the style segment definition unit can be used to define style segments based on the segment node reference relationship completed by the reuse segment reference unit, and store drawing attributes in the style segments, including color, transparency, material and visibility information; the style segment association unit can be used to associate the style segments generated by the style segment definition unit with multiple reuse segment nodes, and apply the drawing attributes in the style segments in the segment nodes to achieve unified setting of drawing parameters. Specifically: The reused segment generation unit is used to create reused segments based on the tree segment structure constructed by the tree segment management module, configure geometric information and attribute information for the reused segments, and assign a unique reference identifier. The geometric information includes vertex coordinates, geometric body type and its topological relationship, which is used to define the geometric form of the reused segment; the attribute information covers color, transparency, material and visibility, etc., which is used to describe the visual characteristics and interactive properties of the geometric body. When generating reused segments, the unit extracts the necessary information from the tree segment structure, and encapsulates the geometric information and attribute information into the data structure of the reused segment according to the preset data organization rules. In order to ensure the consistency of reference, the unit assigns a unique reference identifier to each reused segment. The identifier is based on a hash algorithm or other unique identifier generation rules, which can uniquely mark the reused segment in the entire tree segment structure, facilitating subsequent reference and management.
[0057] The reused segment reference unit references the reused segment to multiple segment nodes through the reference identifier generated by the reused segment generation unit, and ensures that the geometric information and attribute information between segment nodes are consistent. During the reference process, the unit maps the data of the reused segment to the node through the reference identifier according to the needs of the target segment node, without the need to repeatedly store the geometric information and attribute information, thereby effectively reducing data redundancy. The reference is implemented through a pointer or index mechanism. Each target node maintains a reference relationship to the reused segment and records the scope and conditions of the reference identifier. The reference unit also verifies the integrity and consistency of the reference to ensure that all referenced segment nodes share the same geometric information and attribute information, thereby achieving consistent management of data between segments.
[0058] The style segment definition unit defines the style segment based on the segment node reference relationship completed by the reused segment reference unit, and stores the drawing attributes in the style segment, including color, transparency, material and visibility information. The style segment is used to uniformly manage the drawing attributes of the reused segment, thereby reducing the complexity of repeated storage and configuration. When defining a style segment, the unit extracts common or shared drawing attributes in the reused segment and stores them in the attribute field of the style segment. The color and transparency attributes are represented by standardized color models and transparency values. The material information includes rendering parameters such as texture mapping and lighting effects. The visibility attribute marks the display status of the segment through a Boolean value. The data structure design of the style segment allows dynamic expansion and updating of attributes to meet diverse drawing needs.
[0059] The style segmentation association unit associates the style segmentation generated by the style segmentation definition unit with multiple reused segmentation nodes, and applies the drawing attributes in the style segmentation in the segmentation nodes to achieve unified setting of drawing parameters. During the association process, the unit records the reference information of the style segmentation into the drawing attribute field of each target segmentation node, and the segmentation node obtains the drawing attributes by parsing the reference relationship of the style segment. The unit supports dynamic association operations, allowing the association relationship between the segmentation node and the style segment to be modified at runtime, so as to flexibly adjust the application scope of the drawing attributes. Through the style segmentation association unit, the update of the drawing attributes can be completed in the style segmentation without modifying the segment nodes one by one, which significantly improves the efficiency and consistency of the drawing parameter setting.
[0060] In some embodiments, the parallel rendering module includes a rendering task allocation unit, a rendering priority setting unit, a parallel computing unit, a view clipping unit, and a rendering result synthesis unit. Among them, the rendering task allocation unit can be used to analyze the rendering requirements of each segment node according to the geometric information and attribute information in the reused segment, and divide the rendering requirements into several independent rendering tasks; the rendering priority setting unit can be used to calculate the complexity of each rendering task according to the rendering tasks divided by the rendering task allocation unit, and assign rendering priorities to each task; the parallel computing unit can be used to use multi-threading technology to allocate the tasks allocated by the rendering priority setting unit to multiple threads, and perform rendering operations of geometric primitives based on geometric information and attribute information in each thread; the view clipping unit can be used to clip the invisible part of the geometric information according to the visible area of the current view before the parallel computing unit performs the rendering operation, and pass the clipped geometric information to the parallel computing unit; the rendering result synthesis unit can be used to receive the multi-threaded rendering results completed by the parallel computing unit, synthesize the partial rendering data generated by each thread, and generate a complete rendering image. Specifically: The rendering task allocation unit is used to analyze the rendering requirements of each segment node according to the geometric information and attribute information in the reused segment, and divide the rendering requirements into several independent rendering tasks. The geometric information includes the vertex coordinates, topological relationships and spatial positions of the primitives, and the attribute information includes rendering-related parameters such as material, texture, lighting and transparency. The analysis of rendering requirements is carried out by traversing each node in the tree-like segment structure and combining its geometric information and attribute information to determine the required rendering calculation amount and resource requirements. Based on the analysis results, the rendering task allocation unit splits the complex rendering requirements into multiple independent subtasks, each of which corresponds to a specific geometric primitive or attribute set. During the task division process, the unit also standardizes the input and output data of each task to facilitate subsequent parallel computing.
[0061] The rendering priority setting unit calculates the complexity of each rendering task according to the rendering tasks assigned by the rendering task assignment unit, and assigns a rendering priority to each task. The complexity is calculated based on the scale and type of geometric information and attribute information involved in the task, including the number of vertices, material complexity, resolution of texture mapping, and processing overhead of transparency parameters. By comprehensively considering these factors, the unit uses a preset priority calculation model or a dynamic weight adjustment algorithm to assign a priority to each task. The priority assignment result directly affects the scheduling order of tasks in the rendering queue. High-priority tasks will be assigned to threads with sufficient computing resources first, thereby optimizing the overall rendering efficiency.
[0062] The parallel computing unit uses multi-threading technology to distribute the tasks assigned by the rendering priority setting unit to multiple threads, and performs rendering operations of geometric primitives in each thread based on geometric information and attribute information. The number of threads is dynamically adjusted by the system's hardware resources and task size to maximize resource utilization. When tasks are assigned to threads, the unit combines the priority of the task and the current load of the thread to ensure load balancing. In the thread, the unit performs rendering processes such as vertex shading, rasterization, and pixel filling based on geometric information, and applies materials, textures, and lighting effects based on attribute information. The rendering operation is completed through GPU acceleration, and the characteristics of parallel computing are used to greatly shorten the rendering time.
[0063] Before the parallel computing unit performs rendering operations, the view clipping unit clips the invisible parts of the geometric information according to the visible area of the current view, and passes the clipped geometric information to the parallel computing unit. The clipping operation defines the visible area through the camera's view cone. The unit performs spatial judgment on the vertex coordinates of the geometric information based on the view cone and removes the primitives that are not in the view cone. In addition, the clipping unit also segments some of the obscured primitives and retains only the geometric information of the visible part. The clipped data not only reduces the amount of geometric information transmitted to the parallel computing unit, but also reduces the computational complexity of subsequent rendering operations.
[0064] The rendering result synthesis unit is used to receive the multi-threaded rendering results completed by the parallel computing unit, synthesize the partial rendering data generated by each thread, and generate a complete rendered image. The rendering results are usually stored in the form of a frame buffer. The unit extracts partial image data from the frame buffer of each thread and splices and merges them according to the spatial position of the segmented nodes or the task partition information. During the synthesis process, the unit performs depth testing and color mixing on the pixel data of the overlapping area to ensure the integrity and correctness of the image.
[0065] In some embodiments, the lightweight data generation module includes a data classification unit, a segmented data writing unit, a drawing data generation unit, and a binary file encapsulation unit. Among them, the data classification unit can be used to classify the geometric information, attribute information, structural information, and drawing information in the BIM model into geometric data, attribute data, structural data, and drawing data according to the tree segmentation structure; the segmented data writing unit can be used to write the geometric data, attribute data, and structural data classified by the data classification unit into the corresponding segmented data blocks according to the hierarchical order of the segmented nodes; the drawing data generation unit can be used to extract drawing parameters based on the geometric data and attribute data generated by the segmented data writing unit, and generate drawing data for rendering; the binary file encapsulation unit can be used to encapsulate the data generated by the segmented data writing unit and the drawing data generation unit into a binary data file according to the lightweight file format, and the binary data file includes a data header, a data block, and a data tail. Specifically: The data classification unit is used to classify the geometric information, attribute information, structural information and drawing information in the BIM model into geometric data, attribute data, structural data and drawing data according to the tree segmentation structure. The geometric information includes the spatial coordinates and topological relationships of geometric elements such as points, lines and surfaces, the attribute information includes attribute parameters related to element rendering such as color, material, transparency and visibility, the structural information includes the parent-child hierarchy and reference relationship of segment nodes, and the drawing information includes drawing parameters such as lighting, texture and rendering mode. In the classification process, the unit traverses the segment nodes level by level according to the tree segmentation structure, extracts the geometric information and attribute information associated with the nodes, and extracts the structural information by parsing the hierarchical structure and reference relationship of the segments. The classified geometric data, attribute data, structural data and drawing data are stored in the corresponding data buffers respectively to ensure the clarity of data organization and the efficiency of subsequent operations.
[0066] The segmented data writing unit is used to write the geometric data, attribute data and structural data classified by the data classification unit into the corresponding segmented data blocks according to the hierarchical order of the segmented nodes. During the writing process, the unit recursively processes from the root node according to the tree-like segmented structure. The data block of each node consists of a geometric data block, an attribute data block and a structural data block, which respectively store the geometric information, attribute information and structural information of the node. The writing order is strictly arranged according to the hierarchical relationship of the segmented nodes to ensure that the data block of the parent node is written before the data block of its child node. When writing, the unit standardizes the format of each data block, including the vertex coordinate sequence of geometric data, the key-value pair form of attribute data, and the parent-child relationship mapping table of structural data. The writing of segmented data is completed by pre-allocating memory and gradually filling, thereby optimizing the writing efficiency and reducing storage overhead.
[0067] The drawing data generation unit extracts drawing parameters and generates drawing data for rendering based on the geometric data and attribute data generated by the segmentation data writing unit. Drawing parameters include lighting information, texture mapping, rendering mode, depth test settings, etc., which are jointly determined by geometric data and attribute data. In the drawing data generation process, the unit first parses the geometric data to determine the primitive type and vertex distribution, and then extracts the drawing attributes associated with the primitive, such as material and color, in combination with the attribute data. After the extraction is completed, the unit normalizes the drawing parameters to generate a standardized drawing data format that meets the requirements of lightweight rendering. The generated drawing data is stored in binary form and associated with the corresponding segmentation node for direct call by subsequent rendering operations.
[0068] The binary file encapsulation unit is used to encapsulate the data generated by the segmented data writing unit and the drawing data generation unit into a binary data file according to the lightweight file format. The binary data file consists of a data header, a data block and a data tail. The data header contains the file identifier, version number and metadata information. The data block stores geometric data, attribute data, structural data and drawing data. The data tail contains the file's verification information and end mark. During the encapsulation process, the unit first generates the file's metadata, including the number of segments, data format and other file information, and writes it into the data header. Then the segmented data blocks are encapsulated one by one in hierarchical order, and each data block is linked through a pointer or index. Finally, the unit calculates the integrity check value of the file and writes it to the data tail to ensure data security during file transmission. Through binary encapsulation, the generated file has the characteristics of efficient storage and fast parsing, which provides support for the transmission and application of lightweight BIM models. Among them, the binary data file can be defined as a gsl file, and its composition structure can be as follows Fig.10As shown in the figure, the data header stores the basic information of the file, including metadata information such as file identifier (such as ETX), file type (such as gsl), version number, etc., which is used to identify and parse the file format. The data block contains the core data content, stores the segment and sub-segment information in the tree segment structure, including geometric data, attribute data and structural relationship, and is the main data carrier of the file. The data tail is used to mark the end of the file, and usually contains checksum information or flag bits (such as "0") to ensure the integrity and correctness of the file data.
[0069] Further, in the embodiment of the present disclosure, the writing process of the binary data file can be as follows: Fig.11 As shown. Specifically, first obtain the geometric information and attribute information of the BIM model, and organize the data structure in a tree-like segmentation. The process starts with writing the file type and version, and gradually writes the segment number, segment name, attribute data, geometric data, included data and style data. Then, it is determined whether there is a sub-segment. If so, continue to write the sub-segment data. If there is no sub-segment, complete the writing of the binary data file to ensure the hierarchy and data integrity of the entire process.
[0070] In some embodiments, the data compression module includes a compression algorithm selection unit, a data block unit, a compression processing unit, and a compressed data integration unit. Among them, the compression algorithm selection unit can be used to select a compression algorithm and set compression parameters according to the structural information and data volume of the binary data file; the data block unit can be used to divide the binary data file into multiple data blocks, wherein each data block corresponds to a segmented data block generated by the lightweight data generation module; the compression processing unit can be used to use a compression algorithm to perform block-by-block compression processing on each data block divided by the data block unit, and generate corresponding compressed data blocks; the compressed data integration unit can be used to integrate the multiple compressed data blocks generated by the compression processing unit according to the file structure, and form a complete compressed format storage file. Specifically: The compression algorithm selection unit is used to select a compression algorithm and set compression parameters based on the structural information and data volume of the binary data file. The structural information includes the organization form of the data header, data block and data tail and their association. The data volume refers to the storage size of each data part in the binary file. The unit parses the binary file structure to obtain the file's segmentation hierarchy, data redundancy and storage characteristics of each part, and determines the applicable compression algorithm based on the preset algorithm selection rules, such as based on the LZMA algorithm for high compression ratio scenarios, or based on the RLE algorithm for situations with high data duplication. After the algorithm is determined, the unit sets compression parameters based on the specific storage characteristics of the file, including dictionary size, compression level and processing buffer size. The selection process of compression algorithm and parameters is completed through the algorithm performance evaluation model to ensure a balance between compression efficiency and decompression speed.
[0071] The data block unit is used to split the binary data file into multiple data blocks, where each data block corresponds to the segmented data block generated by the lightweight data generation module. The segmentation process is completed by parsing the segmentation structure of the binary file, and the corresponding segmented data block range is determined according to the storage location and size of the geometric data, attribute data and structural data of each segment node. The unit logically divides the data blocks according to the segmentation hierarchy order in the file structure, and assigns an independent index identifier to each data block to support subsequent block management and compression operations. At the same time, the unit preprocesses the data after segmentation, including data alignment and padding operations, to ensure that the storage format of each data block meets the input requirements of the compression algorithm.
[0072] The compression processing unit is used to compress each data block segmented by the data segmentation unit block by block using a compression algorithm, and generate corresponding compressed data blocks. In the block-by-block compression process, the unit loads each data block into the compression engine for encoding based on the algorithm and parameters specified by the compression algorithm selection unit. During the encoding process, the geometric data, attribute data, and structural data are read in sequence according to the storage rules in the data block, and converted into an efficient storage format through dictionary coding, entropy coding or other compression techniques. After the compression is completed, the unit adds metadata to each compressed data block, including the original size, compressed size, and index identifier to support subsequent decompression operations and data integrity verification. The design of the compression processing unit ensures the independence of each data block, which facilitates parallel compression and independent decoding.
[0073] The compressed data integration unit is used to integrate the multiple compressed data blocks generated by the compression processing unit according to the file structure and form a complete compressed format storage file. During the integration process, the unit reassembles each compressed data block into a complete file structure according to the original segmentation hierarchy and data block index of the binary file. The unit first generates data header information according to the index order of the data blocks, including file identification, compression algorithm type and file metadata; then adds compressed data blocks in sequence, and updates the segment offset information in the file to indicate the storage location of each data block in the file; finally, adds data tail information, including file checksum and end mark. In addition, the file suffix format of the compressed format storage file can be defined as ".gsz".
[0074] In some embodiments, the compression algorithm selection unit includes a data characteristic analysis subunit, a candidate algorithm performance calculation subunit, a compression algorithm selection subunit, an optimal compression algorithm selection and dynamic parameter optimization subunit, specifically: The data characteristic analysis subunit can be used to calculate the characteristic weight index based on each data block in the binary data file. The calculation formula is: in, Indicates the data block size, represents the probability density function of the data block, express The normalization factor is based on Calculated, Represents a data block The domain of represents a single data point in a data block, express about The second-order partial derivative of represents the entropy of the data block, Represents the feature weight index.
[0075] The candidate algorithm performance calculation subunit can be used to calculate the candidate compression algorithm set based on the characteristic weight index. The comprehensive performance index of each algorithm in is calculated as follows: in, Represents a candidate compression algorithm Comprehensive performance indicators, Indicates the number of data blocks. Indicates the compression algorithm The complexity factor of Represents the second norm of the data feature matrix, which is based on Calculated, Indicates The first data block Species characteristic value.
[0076] The compression algorithm selection subunit can be used based on the comprehensive performance index, according to the formula: Select the optimal compression algorithm, where represents the optimal compression algorithm, Represents the compression parameter adjustment function, which is based on Calculated, Indicates the adjustment factor for the compression parameters.
[0077] The dynamic parameter optimization subunit can be used to adjust the compression parameters based on the optimal compression algorithm. The adjustment formula is: in, Indicates time The optimization parameters under represents the parameter adjustment weight, represents the intermediate variables at any time point in the dynamic parameter optimization process, express about The second-order partial derivative of .
[0078] The BIM model storage system based on lightweight data in the above embodiment, on the one hand, adopts a customized lightweight binary file format for storage, realizes the seamless exchange and sharing of three-dimensional model data between different BIM design software platforms and application systems, eliminates the data conversion barriers caused by format incompatibility, improves the integrity and interoperability of data, and enables teams of different professions to work on the same lightweight platform, such as architecture, structure, electromechanical and other professions, thereby promoting the collaborative work among multiple professions, simplifying the three-dimensional model processing workflow from design to construction, and then to the operation and maintenance stage, reducing the workload of data conversion and format conversion, and improving the overall work efficiency. On the other hand, by introducing the Include Segment node and the Style Segment node, the geometric and attribute data can be inherited, the efficient reuse of graphic data is realized, the redundancy of data storage is reduced, the efficiency of data processing and management is improved, and the requirements for hardware performance are reduced. On the other hand, by optimizing the tree segmented data structure and compression algorithm, the storage space and transmission bandwidth requirements of the BIM model are significantly reduced, enabling users to upload and download model data faster, while reducing the pressure of local storage. Moreover, the system provides a wealth of interfaces and functions, supports building applications on Windows and Linux systems and the Internet, and greatly simplifies the development of 3D model visualization applications. Therefore, the BIM model storage system based on lightweight data in the present disclosure enables efficient storage, transmission, and application of BIM data, which not only improves the processing efficiency and performance of three-dimensional BIM model data, but also enhances data security and interoperability, simplifies workflows, and reduces hardware requirements, which is of great significance to the application and promotion of BIM technology in various industries such as water conservancy, hydropower, and new energy.
[0079] Next, in the embodiment of the present disclosure, a BIM model storage method based on lightweight data is also provided, which can be applied to the BIM model storage system based on lightweight data in the above embodiment. Fig.12 As shown, the BIM model storage method based on lightweight data includes the following steps: Step S1201, constructing a tree-like segment structure, taking each segment as a storage unit, and setting a parent-child relationship between the storage units, and managing the relationship between the parent segment and the child segment through an attribute inheritance mechanism; Step S1202, creating a reuse segment in the tree segment structure, and implementing data reuse by reference, and creating a style segment for centralized management of drawing attribute information; Step S1203, based on the geometric information and attribute information in the reused segment, a parallel computing method is used to render the model primitives, and rendering parameters are managed; Step S1204, organizing the BIM model data according to a tree segmentation structure, and generating a binary data file including a data header, a data block, and a data footer; Step S1205, compress the binary data file to generate a compressed storage file.
[0080] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-mentioned BIM model storage method based on lightweight data is also provided.
[0081] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0082] Refer to the following Fig.13 1300 according to this embodiment of the present disclosure is described. Fig.13 The electronic device 1300 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0083] like Fig.13 As shown, the electronic device 1300 is in the form of a general computing device. The components of the electronic device 1300 may include but are not limited to: the at least one processing unit 1310, the at least one storage unit 1320, a bus 1330 connecting different system components (including the storage unit 1320 and the processing unit 1310), and a display unit 1340.
[0084] The storage unit stores program codes, which can be executed by the processing unit 1310, so that the processing unit 1310 executes the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.
[0085] The storage unit 1320 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1321 and / or a cache memory unit 1322 , and may further include a read-only memory unit (ROM) 1323 .
[0086] The storage unit 1320 may also include a program / utility 1324 having a set (at least one) of program modules 1325, such program modules 1325 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0087] Bus 1330 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0088] The electronic device 1300 may also communicate with one or more external devices 1370 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1300, and / or communicate with any device that enables the electronic device 1300 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 1350. In addition, the electronic device 1300 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 1360. As shown, the network adapter 1360 communicates with other modules of the electronic device 1300 through a bus 1330. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0089] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of the present specification.
[0090] refer to Fig.14As shown, a program product 1400 for implementing the above-mentioned BIM model storage method based on lightweight data according to an embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0091] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0092] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0093] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, electromagnetic waves, etc., or any suitable combination of the foregoing.
[0094] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0095] Finally, the above preferred embodiments are only used to illustrate the technical solutions of the present application and are not restrictive. Although the present application has been described in detail, those skilled in the art should understand that changes in form and details can be made thereto without departing from the scope defined by the claims of the present application.
Claims
1. A BIM model storage system based on lightweight data, characterized in that: include: The tree segment management module is used to construct a tree segment structure, taking each segment as a storage unit, setting the parent-child relationship between the storage units, and managing the relationship between the parent segment and the child segment through the attribute inheritance mechanism; A segment reuse creation module is used to create reused segments in the tree segment structure, and realize data reuse by reference, and create style segments for centralized management of drawing attribute information; A parallel rendering module, used to render model primitives using a parallel computing method based on the geometric information and attribute information in the reused segments, and manage rendering parameters; A lightweight data generation module is used to organize the BIM model data according to the tree segmentation structure and generate a binary data file including a data header, a data block and a data footer; The data compression module is used to compress the binary data file to generate a compressed storage file.
2. The BIM model storage system based on lightweight data according to claim 1, characterized in that: The tree segment management module includes: A segmentation creation unit, used to create a plurality of segmentation nodes, wherein the segmentation nodes include geometric information, attribute information and sub-segmentation information, and set a unique identifier for each segmentation node; A parent-child association unit, used to establish a parent-child relationship between segment nodes based on the segment nodes, and to transfer the attributes of the parent segment through an attribute inheritance mechanism, while allowing the child segment to overwrite the inherited attributes; A segmentation hierarchy construction unit, used to organize the segmentation nodes into a tree-like segmentation structure by using the parent-child relationship established by the parent-child association unit, and associate a corresponding child segmentation node with each parent segmentation node; The data mapping unit is used to map the geometric information, attribute information and organizational structure information of the BIM model to the segment nodes generated by the segment creation unit to complete the construction of the tree segment structure.
3. The BIM model storage system based on lightweight data according to claim 1 is characterized in that: The segment multiplexing creation module includes: A multiplexed segment generation unit, configured to create a multiplexed segment based on the tree segment structure constructed by the tree segment management module, configure geometric information and attribute information for the multiplexed segment, and allocate a unique reference identifier; A multiplexed segment referencing unit, used to reference the multiplexed segment to multiple segment nodes through the reference identifier generated by the multiplexed segment generating unit, and ensure that the geometric information and attribute information between the segment nodes are consistent; A style segment definition unit, used to define a style segment based on the segment node reference relationship completed by the reuse segment reference unit, and store drawing attributes in the style segment, including color, transparency, material and visibility information; The style segment associating unit is used to associate the style segment generated by the style segment defining unit with a plurality of reused segment nodes, and apply the drawing attributes in the style segment in the segment nodes to achieve unified setting of drawing parameters.
4. The BIM model storage system based on lightweight data according to claim 1, characterized in that: The parallel rendering module includes: A rendering task allocation unit, configured to analyze the rendering requirements of each segment node according to the geometric information and attribute information in the multiplexed segment, and divide the rendering requirements into a plurality of independent rendering tasks; A rendering priority setting unit, used to calculate the complexity of each rendering task according to the rendering tasks divided by the rendering task allocation unit, and allocate a rendering priority to each task; A parallel computing unit, used for allocating the tasks assigned by the rendering priority setting unit to multiple threads using multi-threading technology, and performing rendering operations of geometric primitives based on geometric information and attribute information in each thread; A view clipping unit, used for clipping the invisible part of the geometric information according to the visible area of the current view before the parallel computing unit performs the rendering operation, and transmitting the clipped geometric information to the parallel computing unit; The rendering result synthesis unit is used to receive the multi-thread rendering results completed by the parallel computing unit, synthesize the partial rendering data generated by each thread, and generate a complete rendering image.
5. The BIM model storage system based on lightweight data according to claim 1, characterized in that: The lightweight data generation module includes: A data classification unit, for classifying the geometric information, attribute information, structural information and drawing information in the BIM model into geometric data, attribute data, structural data and drawing data according to the tree segmentation structure; A segmented data writing unit, used for writing the geometric data, attribute data and structure data classified by the data classification unit into corresponding segmented data blocks according to the hierarchical order of segment nodes; A drawing data generating unit, configured to extract drawing parameters based on the geometric data and attribute data generated by the segmented data writing unit, and generate drawing data for rendering; The binary file encapsulation unit is used to encapsulate the data generated by the segmented data writing unit and the drawing data generating unit into a binary data file according to a lightweight file format. The binary data file includes a data header, a data block and a data tail.
6. The BIM model storage system based on lightweight data according to claim 1, characterized in that: The data compression module comprises: A compression algorithm selection unit, used to select a compression algorithm and set compression parameters according to the structure information and data volume of the binary data file; A data block division unit, used for dividing the binary data file into a plurality of data blocks, wherein each data block corresponds to a segmented data block generated by the lightweight data generation module; A compression processing unit, used to perform compression processing on each data block divided by the data dividing unit by using the compression algorithm, and generate a corresponding compressed data block; The compressed data integration unit is used to integrate the multiple compressed data blocks generated by the compression processing unit according to the file structure and form a complete compressed format storage file.
7. The BIM model storage system based on lightweight data according to claim 1, characterized in that: Also includes: The attribute processing module is used to obtain and set the color attribute, visibility attribute and selection attribute of the BIM model; A geometry processing module, used for editing, inserting and displaying geometric primitives, including points, lines, surfaces, circles and ellipses; Update processing module, used to set and update rendering status, geometry data, shading, fonts, viewport and camera parameters; Multithreading processing module, used to manage thread tasks, including adding, executing and ending thread tasks; The event processing module is used to manage application layer events, including event addition, execution, and deletion operations; The interface definition module is used to provide an interface called by the application layer, which supports access to and operation of functions of different modules.
8. The BIM model storage system based on lightweight data according to claim 1, characterized in that: Also includes: A primitive copy management module, for storing geometric information and attribute information of segment nodes based on the tree-like segment structure, generating corresponding primitive copies, and storing the primitive copies in a display list to support rapid modification and traversal of graphic information; A boundary volume calculation module, used for calculating the boundary volume according to the geometric information of the primitive copy, storing the boundary volume as the spatial position range of the primitive, and removing invisible primitives during rendering; A picking function module, used to determine the target graphic element pointed to by the user's cursor through the graphic element copies and geometric information in the display list, and generate a selection result; The interface management module is used to provide an external call interface, which includes an initialization interface, an operation interface and a resource release interface.
9. The BIM model storage system based on lightweight data according to claim 6, characterized in that: The compression algorithm selection unit comprises: The data characteristic analysis subunit is used to calculate the characteristic weight index based on each data block in the binary data file, and the calculation formula is: in, Indicates the data block size, represents the probability density function of the data block, express The normalization factor is based on Calculated, Represents a data block The domain of represents a single data point in a data block, express about The second-order partial derivative of represents the entropy of the data block, represents the characteristic weight index; The candidate algorithm performance calculation subunit is used to calculate the candidate compression algorithm set based on the characteristic weight index. The comprehensive performance index of each algorithm in is calculated as follows: in, Represents a candidate compression algorithm Comprehensive performance indicators, Indicates the number of data blocks. Indicates the compression algorithm The complexity factor of Represents the second norm of the data feature matrix, which is based on Calculated, Indicates The first data block Species characteristic value; The compression algorithm selection subunit is used to select the compression algorithm based on the comprehensive performance index according to the formula: Select the optimal compression algorithm, where represents the optimal compression algorithm, Represents the compression parameter adjustment function, which is based on Calculated, represents the adjustment factor of the compression parameter; The dynamic parameter optimization subunit is used to adjust the compression parameters based on the optimal compression algorithm, and the adjustment formula is: in, Indicates time The optimization parameters under represents the parameter adjustment weight, represents the intermediate variables at any time point in the dynamic parameter optimization process, express about The second-order partial derivative of .
10. A BIM model storage method based on lightweight data, applied to the BIM model storage system based on lightweight data as described in any one of claims 1 to 9, characterized in that: The method comprises: Construct a tree-like segment structure, use each segment as a storage unit, set up the parent-child relationship between storage units, and manage the relationship between parent segments and child segments through the attribute inheritance mechanism; Creating a reuse segment in the tree segment structure, and implementing data reuse by reference, while creating a style segment for centralized management of drawing attribute information; Based on the geometric information and attribute information in the reused segments, a parallel computing method is used to render the model primitives and manage rendering parameters; Organizing the BIM model data according to the tree segmentation structure, and generating a binary data file including a data header, a data block and a data footer; The binary data file is compressed to generate a compressed storage file.
Citation Information
Patent Citations
BIM data structured processing and storage method
CN110245368A
Method for rendering STEP format at WEB end
CN116977523A
Model training method and device, image segmentation method and device, equipment and medium
CN117671271A
Compression and decompression of sub-primitive presence indications for use in intersection testing in a rendering system
GB202207940D0
Cited By
Modeling method, system and device based on dynamic 3D target and storage medium
CN120491969A
Dynamic vertex compression method for BIM lightweight data processing
CN120852545A
Data processing method and device, storage medium and computer program product
CN121582421A