Lightweight method and system based on BIM and GIS
By spatially segmenting and LOD hierarchical allocation of BIM and GIS data, dynamically adjusting data loading accuracy, creating a smooth transition, and ensuring data consistency through a distributed consistency protocol, the balance of data accuracy and loading speed in large-scale application scenarios is solved, and the consistency and consistency of data in hierarchical loading is achieved, and the system efficiency and user experience are improved.
Patent Information
- Application Number
- CN202411874997.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-18
AI Technical Summary
In large-scale application scenarios, how to balance the accuracy and loading speed of data, and how to ensure that data remains consistent and consistent during the hierarchical loading process has become an urgent problem.
By spatially segmenting BIM and GIS data, different LOD levels are allocated according to complexity, and dynamically adjusting the LOD levels of loading data based on user viewpoint changes, achieving a balance between accuracy and loading speed. Create smooth transitions between different LOD levels to avoid visual breaks during data switching, and ensure data consistency and synchronization through distributed consistency protocols and incremental updates.
It achieves avoiding unnecessary data loading without sacrificing accuracy, thereby accelerating rendering and displaying, ensuring seamless connection and consistency of data when loading in layers, improving the overall efficiency and user experience of the system.
Smart Images

Figure CN119807319A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of BIM / CIM integration, and in particular to a lightweight method and system based on BIM and GIS. Background Art
[0002] With the widespread application of BIM (Building Information Modeling) and GIS (Geographic Information System) technologies, especially in complex projects such as large-scale urban construction and planning, the amount of data processed by these systems has become increasingly large and complex. BIM models contain a large amount of fine geometric data of buildings, facilities and structures, while GIS systems involve a wider range of geographic spatial data and environmental information. In the process of user views constantly changing and scaling, the system needs to load data with appropriate accuracy according to different perspectives and needs. However, due to the huge amount of data, if all the details are included in each load, it will cause serious performance bottlenecks and loading delays. That is, how to avoid unnecessary data loading without sacrificing accuracy, thereby accelerating rendering and display, is a key problem that needs to be solved. In addition, large-scale BIM and GIS data are usually divided into multiple levels of details (LOD), each LOD representing a data layer of different precision. As the user's viewpoint changes, the system will switch between different LODs. If the switch is improper, it may cause visual "seams" or inconsistencies, affecting the user experience. At the same time, in a multi-user collaborative environment, different data sources and LOD levels may have synchronization problems, resulting in inconsistent or conflicting displays of updated data. How to ensure that data is seamlessly connected and consistent during layered loading is a necessary condition to ensure system stability and user satisfaction.
[0003] Therefore, in large-scale application scenarios, how to balance data accuracy and loading speed, and how to ensure that data remains coherent and consistent during the layered loading process have become issues that need to be urgently addressed. Summary of the invention
[0004] In order to solve the problem of how to balance data accuracy and loading speed in large-scale application scenarios, and how to ensure that data remains coherent and consistent during the layered loading process, the present invention provides a lightweight method and system based on BIM and GIS.
[0005] To achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0006] On the one hand, the present invention discloses a lightweight method based on BIM and GIS, comprising:
[0007] Spatially segment BIM and GIS data and assign different LOD levels according to complexity;
[0008] Based on the user's viewpoint changes, the LOD level of the loaded data is dynamically adjusted to ensure that low-precision data is loaded at a long distance and high-precision data is loaded at a close distance, achieving a balance between accuracy and loading speed;
[0009] Create smooth transitions between different LOD levels to avoid visual discontinuities when switching data;
[0010] Identify the user's browsing history, load the area data that the user may need to view in advance, and unload the data that is no longer needed in time when the user's viewpoint changes;
[0011] Through distributed consistency protocols and incremental updates, data between different LOD levels are kept consistent and synchronized to avoid multi-level data conflicts;
[0012] Through global occlusion culling and viewpoint-based visibility judgment, combined with regionalized data stratification, the visible area within the current viewpoint is dynamically identified, and the rendering calculation of irrelevant areas is reduced based on the caching mechanism and data consistency model.
[0013] Further: the spatial segmentation of BIM and GIS data and the allocation of different LOD levels according to complexity include:
[0014] The space is divided into eight equal small cubes, and the subspace is recursively subdivided until the amount of data in each spatial area is small enough. Each child node represents a cube area, stores the BIM and GIS element information within the area, and assigns different LOD levels.
[0015] Further: The LOD level of the loaded data is dynamically adjusted based on the change of the user's viewpoint to ensure that low-precision data is loaded at a long distance and high-precision data is loaded at a close distance, so as to achieve a balance between accuracy and loading speed, including:
[0016] The accuracy requirement of the data is determined by the viewing distance, where the calculation of the viewing distance includes setting the user's viewpoint position and the center of gravity position of the target area. The viewing distance from the user to the target area is obtained by the Euclidean distance:
[0017] The LOD level is dynamically selected based on the view distance. The switching rule is defined by the following formula:
[0018]
[0019] Among them, T3 and T4 are the view distance thresholds, which are used to control when to switch to low-precision or high-precision LOD;
[0020] Set the user's viewing angle to θ view, which represents the relative angle between the user's perspective and a certain area in the spatial data; when the user's perspective changes, progressive loading is performed, and the progressive loading process is described by the following formula:
[0021]
[0022] Among them, Δθ view is the change in user’s viewing angle, Δθ threshold It is a set threshold. When the viewing angle changes beyond the threshold, higher precision data is loaded;
[0023] To avoid lags during loading, a buffering mechanism is used to load the data of the next LOD level in advance when the user's perspective changes, and unload data areas that are no longer visible when they are no longer needed.
[0024] Further: Creating a smooth transition between different LOD levels to avoid visual discontinuity when switching data includes:
[0025] Set the low-precision LOD surface and the high-precision LOD surface at the LOD switching point and generate a smooth transition surface S trans , the transition surface is determined by the control points, based on a set of control points P0, P1, ..., P n , generates a smooth surface, expressed as:
[0026]
[0027] Among them, N i (u) is the i-th basis function, u is the interpolation parameter, P i is a control point, representing the transition point between low-precision LOD and high-precision LOD, and the basis function N i (u) Control the influence of each control point to ensure smooth transition;
[0028] Basis function N i (u) is obtained by the following algorithm:
[0029] N0(u)=(1-u) 3 / 6
[0030] N1(u)=(3u 3 -6u 2 +4) / 6
[0031] N2(u)=(-3u 3 +3u 2 +3u+1) / 6
[0032] N0(u)=u 3 / 6
[0033] Control points P0, P1, ..., Pn It is the key node between low-precision and high-precision geometry. Through these control points, a smooth transition is made and S is finally generated. trans (u), the transition surface between two LOD levels;
[0034] In the process of dynamically switching LOD, if the LOD level difference ΔLOD=LOD new -LOD current >1, where LOD new and LOD current Indicates the difference between the selected target LOD and the current rendering LOD at the current view distance, triggering the generation of a smooth transition surface S trans (u).
[0035] Further: the identifying of the browsing track of the user, loading in advance the regional data that the user may need to view, and unloading the data that is no longer needed when the user's viewpoint changes includes:
[0036] Based on the user's current viewing angle and movement direction, predict the area A that the user will browse in the future future , assuming that the user's current viewpoint is P current , and the user's browsing trajectory has a certain direction and speed v view , then within a certain period of time, the user's future viewpoint position P future Estimated by the following formula:
[0037] P future =P current +v view ·Δt
[0038] Among them, v view represents the moving speed of the user's viewpoint, Δ represents the predicted time interval;
[0039] Combined with the user's viewpoint prediction results, for the predicted area A future Preload data and cache multiple LOD levels in this area. The cache includes short-term cache and long-term cache.
[0040] Among them, short-term cache includes storing the area data that the user is about to browse; long-term cache includes storing the area data that has been browsed in the past. Cache allocation includes:
[0041] Assume that the area A near the current viewpoint near If caching is required, the cache size is R cache It is expressed as:
[0042]
[0043] Among them, D iIndicates the data size of the ith region, L i Indicates the LOD level of the area;
[0044] Assume that the region data in the current cache is C cache ={A1, A2, ..., A n}, for each region A i , through its distance R from the current viewpoint i To determine whether uninstallation is necessary;
[0045] Assume that the available memory is M available , the data size of each cache area is D i , then the total cache memory size M cache for:
[0046]
[0047] Among them, loaded indicates the currently loaded cache area.
[0048] Further: the method of maintaining consistency and synchronization of data between different LOD levels through distributed consistency protocol and incremental update to avoid multi-level data conflicts includes:
[0049] Assume that the cache area R i The corresponding data block is When its LOD level changes, the incremental update mechanism only updates the changed part The updated part is synchronized to all relevant nodes through the consistency protocol;
[0050] For data synchronization between different LOD levels, perform layered consistency verification:
[0051]
[0052] Among them, C sync (L x , L y ) represents the two LOD levels (L x and L y ) is a consistency verification process between and They are cache areas R at different LOD levels. i data.
[0053] Further: the global occlusion culling and viewpoint-based visibility judgment, combined with regionalized data stratification, dynamically identifies the visible area within the current viewpoint, and reduces the rendering calculation of irrelevant areas based on the cache mechanism and data consistency model, including:
[0054] Based on the user's historical interactions and current viewing angle, predict the area the user may view and remove invisible areas in advance;
[0055] Combined with viewing distance, object occlusion and LOD accuracy, the rendering area is accurately judged to eliminate areas that are far away from the user or do not require high-precision rendering;
[0056] After determining the area that needs to be rendered, progressive LOD loading is used to smoothly load and render details.
[0057] On the other hand, the present invention discloses a lightweight system based on BIM and GIS, comprising:
[0058] Spatial data division and hierarchical management module: spatially divide BIM and GIS data and assign different LOD levels according to complexity;
[0059] Dynamic LOD management and precision adaptation module: Based on the user's viewpoint changes, the LOD level of the loaded data is dynamically adjusted to ensure that low-precision data is loaded at a long distance and high-precision data is loaded at a close distance, achieving a balance between accuracy and loading speed;
[0060] Smooth transition module: Create smooth transitions between different LOD levels to avoid visual breaks when switching data;
[0061] Preloading and intelligent unloading module: Combined with user interaction history, preload the data that users may need through prediction and memory pool mechanism, and unload it when it is no longer needed;
[0062] Dynamic data consistency verification and synchronization mechanism module: through distributed consistency protocol and incremental update, the data between different LOD levels are kept consistent and synchronized to avoid multi-level data conflicts;
[0063] Rendering optimization and occlusion culling module: Through global occlusion culling and viewpoint-based visibility judgment, combined with regionalized data stratification, it dynamically identifies the visible area within the current viewpoint, and reduces rendering calculations in irrelevant areas based on the caching mechanism and data consistency model.
[0064] Compared with the prior art, the present invention has the following technical advances:
[0065] Firstly, the present invention utilizes multi-level spatial segmentation technology to perform fine division of large-scale BIM and GIS data at the city level through division and hierarchical management, and allocates different LOD levels according to the complexity of different areas. This strategy lays the foundation for the subsequent balance between accuracy and loading speed. Through dynamic loading and layer-by-layer refinement, unnecessary loading of high-precision data in long-distance or low-demand scenarios is avoided, thereby improving the loading speed. At the same time, it ensures that high-precision data can be loaded in real time when the user approaches or focuses on a specific area to meet the accuracy requirements.
[0066] Secondly, the dynamic LOD management and precision adaptive algorithm achieves a dynamic balance between data loading speed and precision by selecting appropriate LOD level data according to the user's viewpoint in real time. Through the progressive loading strategy, the data precision is gradually improved as the viewing distance changes, avoiding performance bottlenecks and unnecessary resource waste caused by instantaneous switching. Through this adaptive precision management, it can effectively respond to data loading requirements in different user interaction scenarios and balance loading speed and precision. In terms of ensuring the coherence and consistency of data during layered loading, geometric interpolation technology is introduced to create smooth transitions between different LOD levels to avoid "jumps" or unnatural transitions between low-precision and high-precision data. This not only improves the user experience, but also ensures the visual coherence of buildings and urban features when switching between different LOD levels. In addition, the preloading and unloading system based on the cache mechanism ensures that when users browse data, the system can identify and unload data that is no longer needed, reducing memory consumption and maintaining data coherence.
[0067] Finally, by introducing a dynamic data consistency verification and synchronization mechanism, the data consistency problem in the case of multi-user collaboration and data source synchronization is effectively solved. The distributed consistency protocol and incremental update algorithm are used to ensure that data at different LOD levels remain consistent when updated, avoiding data conflicts or inconsistencies during the layered loading process, thereby further ensuring the stability of the system and the integrity of the data.
[0068] In summary, the present invention not only balances the loading speed and data accuracy, but also ensures the consistency and coherence of data during the layered loading process, thereby greatly improving the overall efficiency of the system and user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0070] In the attached picture:
[0071] Figure 1 is a flow chart of the present invention;
[0072] Figure 2 It is a system structure diagram of the present invention. DETAILED DESCRIPTION
[0073] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0074] Example 1
[0075] like Figure 1 As shown, the present invention discloses a lightweight method based on BIM and GIS, comprising:
[0076] Step 1: Spatially segment BIM and GIS data and assign different LOD levels according to complexity;
[0077] Step 2: Based on the user's viewpoint changes, dynamically adjust the LOD level of the loaded data to ensure that low-precision data is loaded at a long distance and high-precision data is loaded at a close distance, achieving a balance between accuracy and loading speed;
[0078] Step 3: Create smooth transitions between different LOD levels to avoid visual discontinuities when switching data.
[0079] Step 4: Identify the user's browsing trajectory, load the area data that the user may need to view in advance, and unload the data that is no longer needed in time when the user's viewpoint changes;
[0080] Step 5: Use distributed consistency protocols and incremental updates to keep data between different LOD levels consistent and synchronized to avoid multi-level data conflicts;
[0081] Step 6: Through global occlusion culling and viewpoint-based visibility judgment, combined with regionalized data stratification, dynamically identify the visible area within the current viewpoint, and reduce the rendering calculation of irrelevant areas based on the caching mechanism and data consistency model.
[0082] The specific step 1 includes:
[0083] The first step is to intelligently divide and hierarchically manage large-scale city-level BIM and GIS data. In this embodiment, an octree is used to divide the space into multiple refined grid units, and different LOD (Level of Detail) levels are assigned according to the complexity of the elements contained in each grid unit.
[0084] 1.1 Octree method
[0085] Octree is a 3D space segmentation technology suitable for large-scale BIM and GIS data sets, especially city-level data. Octree divides the space into eight equal small cubes, recursively subdividing the subspace until the amount of data in each spatial area is small enough. Each child node represents a cube area, stores BIM and GIS element information in the area, and assigns different LOD levels. The LOD level is determined by the refinement of the node (the depth of segmentation) and the complexity of the elements contained in the area (such as the number of buildings, road density, etc.).
[0086] 1.2 Specific implementation steps
[0087] 1. Initialize the space range and root node:
[0088] Assume there is a three-dimensional space range S = [x min , x max ]×[y min ,y max ]×[z min , z max ], which is the maximum spatial range of BIM and GIS datasets. The root node of the octree represents the entire spatial range, that is, the entire city or region. The data of this root node includes the set D = {d1, d2, ..., d n}, where d i Represents a specific building or facility.
[0089] 2. Divide the space:
[0090] The root node divides the space into 8 sub-regions, each of which represents a small cube C. i (i∈1, 2, ..., 8). The side length of each small cube is The side length of the root node, that is, the size of each sub-cube is
[0091] 3. LOD allocation of nodes:
[0092] For each subcube C i , calculate the complexity of the BIM and GIS elements it contains. The complexity metric can be based on the number of elements or the geometric complexity. For example, the complexity C can be calculated by the following formula complexity (C i ):
[0093]
[0094] Among them, f(d j ) is the element d jA measure of the complexity of an object, which could be its geometric complexity, number of faces, or level of detail.
[0095] 4. Determine the LOD level:
[0096] Based on complexity C complexity (C i ), assign LOD levels to each sub-cube, and the selection rules of LOD levels are as follows:
[0097] For low complexity areas (such as empty areas or areas without buildings), assign a lower LOD (LODO);
[0098] For areas with higher complexity (such as dense urban areas or areas with complex buildings), higher LODs (LOD2, LOD3, etc.) are assigned.
[0099] The specific LOD level selection rules can be based on the following formula:
[0100]
[0101] Among them, T1 and T2 are preset complexity thresholds, which are adjusted according to actual needs.
[0102] 5. Recursive Segmentation:
[0103] For each subcube C i Repeat the above segmentation and LOD assignment process. If the element complexity of a sub-cube is still high, continue to recursively segment the sub-area and assign it a higher precision LOD level. The recursive depth d is determined by the accuracy requirements of spatial segmentation and the limitations of computing resources.
[0104] 6. Build the final data structure:
[0105] Through recursive subdivision, an octree data structure is finally obtained, in which each node contains detailed information of all BIM and GIS elements in the spatial area and is organized according to LOD levels. The LOD level of each node is determined by the complexity of the elements it contains, thus providing a basis for subsequent data loading and rendering.
[0106] The specific step 2 includes:
[0107] In step 1, the octree method is used to spatially divide the BIM and GIS data and assign different LOD levels. Step 2 relies on this spatial division result to implement a dynamic LOD management and precision adaptive algorithm. The algorithm dynamically selects to load the appropriate LOD level according to the user's viewpoint position, zoom level, and perspective changes, thereby reducing unnecessary detail loading when viewing from a distance and providing more detailed building and environmental information when the view is close.
[0108] 2.1 User Viewing Distance and LOD Switching
[0109] To achieve dynamic LOD switching, it is necessary to decide which level of LOD data should be loaded based on the relative position of the user and the spatial data, the change in viewing angle and the zoom level, and to judge the data accuracy requirements by the viewing distance (the distance from the viewpoint to the target object).
[0110] 1. View distance calculation: Set the user's viewpoint position P viewer =(x viewer ,y viewer , z viewer ) and the centroid position P of the target area (such as a building or a grid cell) target =(x target ,y target ,z target ). The visual distance from the user to the target area D view It can be calculated by the Euclidean distance formula:
[0111]
[0112] This distance determines the LOD level that is loaded.
[0113] 2. LOD switching strategy: Dynamically select the LOD level based on the viewing distance. The specific switching rules can be defined by the following formula:
[0114]
[0115] Among them, T3 and T4 are the view distance thresholds, which are used to control when to switch to low-precision or high-precision LOD. view It is suitable for loading low-precision (LOD0) data, while a smaller view distance is suitable for loading higher-precision (LOD2) data.
[0116] 2.2 Progressive loading strategy based on perspective change
[0117] In addition to viewing distance, changes in user perspective are also an important factor. For the same viewing distance, the user's perspective (such as viewing angle or direction) will also affect the loading accuracy. For example, when the user gradually zooms or rotates the view, the system should gradually load more details to ensure the accuracy and smoothness of rendering.
[0118] 1. Dynamic management of perspective changes: Set the user's perspective to θ view , which represents the relative angle between the user's perspective and a certain area in the spatial data. When the user's perspective changes, the system needs to adjust the loaded LOD to adapt to a more accurate geometric shape.
[0119] 2. Progressive loading strategy: When the user's perspective changes greatly, it is necessary to gradually improve the accuracy of the loaded data. The progressive loading process can be described by the following formula:
[0120]
[0121] Among them, Δθ view is the change in user’s viewing angle, Δθ threshold is a set threshold. When the viewing angle changes beyond a certain threshold, higher-precision data is loaded. This formula enables the system to dynamically load more details as the user gradually approaches a certain viewing angle.
[0122] 3. Buffer loading: In order to avoid obvious lag during loading, a buffer mechanism is used to load the data of the next LOD level in advance when the user's perspective changes, and unload the data area that is no longer visible in time when it is no longer needed. Specifically, the size of the buffer can be controlled using the following formula:
[0123]
[0124] Among them, R max is the maximum threshold of viewing distance. Through this formula, the system can reasonably control the size of the cache to ensure that each time the viewing angle changes, the system will not cause delays due to excessive data loading.
[0125] 2.3 Data loading and unloading strategies
[0126] To ensure the efficiency of the system, data loading should be intelligently scheduled based on factors such as viewing distance, perspective changes, and user interaction history. During the loading process, the system's response speed and stability must be maintained.
[0127] 1. Loading scheduling based on viewing distance and viewing angle:
[0128] When the user approaches an area, the system will dynamically adjust the data loading level according to the change in viewing distance and perspective. High precision (LOD2) is used for close areas, and low precision (LODO) is used for distant areas.
[0129] When data is unloaded, the system needs to determine whether the LOD of the current area is still suitable for continued rendering. If the view distance increases, the lower precision data is automatically unloaded to ensure efficient use of memory.
[0130] 2. Data loading algorithm: Use the progressive loading algorithm to calculate the loading priority of each area based on the viewing distance and viewing angle. The calculation formula for loading priority is as follows:
[0131]
[0132] Among them, P loadIndicates loading priority, D view is the viewing distance between the user and the target area, Δθ view is the change in viewing angle, Δθ threshold is the maximum threshold of the viewing angle change. Through this formula, the system can prioritize loading those areas with smaller viewing distance or larger viewing angle change.
[0133] This step realizes dynamic loading and precision adjustment of data by calculating the user's viewing distance and perspective changes and adopting a progressive loading strategy, combined with the spatial division in the first step and the LOD level allocation rules, thereby balancing data accuracy and loading speed.
[0134] The specific step 3 includes:
[0135] In step 2, the LOD switching strategy has dynamically selected the appropriate LOD level, but obvious visual inconsistencies (such as "seams" or jumps) may occur during the switching process from low precision to high precision.
[0136] 1. Determine the LOD switching point:
[0137] Based on the logic of dynamic LOD switching in step 2, the current LOD level to be switched to is known. view and the viewing angle change Δθ view The LOD level that should be displayed is calculated, and the difference in accuracy when switching may cause visual inconsistency. On this basis, a smooth transition geometry is generated between low precision (such as LOD1) and high precision (such as LOD2).
[0138] LOD level difference formula:
[0139] ΔLOD=LOD new -LOD current
[0140] Among them, LOD new and LOD current Indicates the difference between the selected target LOD and the current rendering LOD at the current view distance. If ΔLOD>1, a smooth transition is required.
[0141] 2. Interpolation:
[0142] Assume that there are two geometric surfaces near the LOD switching point: a low-precision LOD surface (such as LOD1) and a high-precision LOD surface (such as LOD2). A smooth transition surface S needs to be generated by interpolation. trans , this transition surface is determined by control points (several important positions between low precision and high precision).
[0143] The interpolation specifically includes a set of control points P0, P1, ..., P n , generating a smooth surface, the mathematical expression is:
[0144]
[0145] Among them, N i (u) is the i-th basis function, u is the interpolation parameter (usually between 0 and 1), P i is a control point, representing the transition point between low-precision LOD and high-precision LOD, and the basis function N i (u) Control the influence of each control point to ensure smooth transition.
[0146] Basis function N i (u) is calculated by the following algorithm, which is recursive and ensures the smoothness and stability of the interpolation:
[0147] N0(u)=(1-u) 3 / 6
[0148] N1(u)=(3u 3 -6u 2 +4) / 6
[0149] N2(u)=(-3u 3 +3u 2 +3u+1) / 6
[0150] N0(u)=u 3 / 6
[0151] Control points P0, P1, ..., P n It is the key node between low-precision and high-precision geometry. Through these control points, a smooth transition is made and S is finally generated. trans (u), which is the transition surface between two LOD levels.
[0152] 4. Implement transition geometry:
[0153] In the process of dynamically switching LOD, if ΔLOD>1, the system will trigger interpolation to generate a smooth transition surface S trans (u). This surface is rendered as the transition stage of LOD switching to ensure a smooth visual transition.
[0154] 5. Smooth transition visual effect:
[0155] When the user's viewpoint changes, the system calculates whether to trigger LOD switching based on the current viewing distance and viewing angle. If there is a significant difference between the LOD switching points, B-spline interpolation will avoid "seams" or "jumps" between LOD levels by creating a smooth transition area.
[0156] In step 3, the transition surface S between low precision and high precision is dynamically generated through the interpolation algorithm. trans (u), smooth transition during LOD switching, avoiding visual inconsistency or jumps. By dynamically adjusting the control points, the system can automatically adjust the transition accuracy according to the current LOD switching requirements to ensure smooth and natural rendering effects.
[0157] The specific step 4 includes:
[0158] In step 3, smooth LOD level transition is achieved through geometric interpolation technology, ensuring visual consistency and smoothness between different LOD levels. In step 4, the response speed of the system needs to be further improved, especially when performing layered loading of large-scale city-level BIM and GIS data, to avoid loading delays caused by large amounts of data.
[0159] 1. User behavior prediction and regional preloading algorithm:
[0160] In order to achieve efficient preloading, we first need to predict the user's browsing trajectory and viewpoint changes. By analyzing the user's historical interaction data, such as historical viewpoint location and zoom level, we can estimate the area that the user may browse in the future. For example, based on the user's current viewpoint and movement direction, we can predict the area A that the user will browse in the next few seconds. future .
[0161] Assume that the user's current viewpoint position is P current , and the user's browsing trajectory has a certain direction and speed v view , then within a certain period of time, the user's future viewpoint position P future It can be estimated by the following formula:
[0162] P future =P current +v view ·Δt
[0163] Among them, v view represents the moving speed of the user's viewpoint, Δ represents the predicted time interval, and P is predicted future , it is possible to infer the areas that users may need to view and load the relevant data of these areas in advance.
[0164] 2. Caching mechanism for regional data:
[0165] In step 1, the BIM and GIS data have been spatially divided and different LOD levels have been assigned to each area. Therefore, in step 4, combined with the user's viewpoint prediction results, it is necessary to target the predicted area A. futurePreload data and cache multiple LOD levels of these areas. The cache can be divided into two levels: short-term cache and long-term cache.
[0166] Short-term cache: Stores data for the area that the user is about to browse, usually the area that is close to the user's viewpoint.
[0167] Long-term cache: Stores data about previously browsed areas so that when a user returns to that area, it can be loaded directly to avoid repeated loading.
[0168] Cache allocation formula:
[0169] Assume that the area A near the current viewpoint near If caching is required, the cache size is R cache It can be expressed as:
[0170]
[0171] Among them, D i Indicates the data size of the ith region, L i Indicates the LOD level of the area. The cache priority is usually sorted from high to low by LOD level.
[0172] 3. Intelligent uninstallation and delayed uninstallation strategies:
[0173] When the user's viewpoint changes and he no longer pays attention to certain areas, he needs to unload the data that is no longer needed in time to free up memory and optimize performance. In order to avoid frequent unloading and loading operations, a delayed unloading strategy can be adopted, that is, the data is unloaded only when certain conditions are met, rather than unloading immediately. The conditions may include: the data is no longer in the field of view, or the user has stopped interacting in the area.
[0174] Uninstall decision formula:
[0175] Assume that the region data in the current cache is C cache ={A1, A2, ..., A n}, for each region A i , which can be determined by its distance R from the current viewpoint i To determine whether uninstallation is necessary.
[0176] 4. Memory pool management and resource optimization:
[0177] In the implementation of the cache mechanism, memory pool management plays a key role. By properly scheduling cache data, memory waste and repeated data loading can be avoided. The memory pool mechanism manages the memory of different cache areas, prioritizes loading the area data that the current user may need, and unloads the area data that is no longer needed, thereby ensuring efficient use of system memory.
[0178] Memory pool management formula:
[0179] Assume that the system available memory is M available , the data size of each cache area is D i , then the total cache memory size M cache for:
[0180]
[0181] Among them, loaded represents the currently loaded cache area. In order to ensure the stability and responsiveness of the system, it is necessary to ensure that M cache ≤M available And clean up unnecessary data in time through intelligent uninstallation strategy.
[0182] 5. Multi-level cache and distributed data management:
[0183] In complex city-level BIM and GIS data scenarios, data may be distributed on multiple servers or computing nodes. Therefore, in addition to local caching, it is necessary to combine distributed storage and multi-level caching systems to improve data loading speed. Through the distributed caching system, data can be scheduled in real time according to the user's geographic location and behavior, thereby improving the efficiency of data access. The distributed cache management formula is:
[0184] In a multi-node distributed cache system, each node N i There is a cache area R i , the total cache can be expressed as:
[0185]
[0186] Where n is the number of nodes, and each node is dynamically scheduled based on the user's geographic location and data request to ensure the shortest data loading path.
[0187] In step 4, the preloading and intelligent unloading technology based on the cache mechanism ensures that the system can efficiently utilize memory and storage resources through user behavior prediction, regional preloading, intelligent unloading strategy and memory pool management, thereby speeding up data loading, reducing latency and improving overall performance. At the same time, through the distributed cache system, data can be dynamically scheduled between multiple computing nodes, further optimizing resource utilization and ensuring smooth operation of the system.
[0188] Specifically, step 5 includes:
[0189] In step 4, the preloading and intelligent unloading technology based on the cache mechanism has divided the data to be loaded into different cache areas R i, and implemented the memory pool management and delayed unloading strategy. Next, in step 5, it is necessary to ensure the consistency and synchronization of data, especially in a multi-user, multi-device environment, where the layered loaded data will face the situation where different versions of data exist between different LOD levels. Therefore, it is necessary to introduce a dynamic data consistency verification and synchronization mechanism to ensure that all interactions between users and the system will not cause data conflicts and inconsistencies.
[0190] 1. Multi-level data synchronization mechanism design:
[0191] In a multi-user and distributed environment, each cache area R i The data in the cache will be dynamically loaded and updated according to its LOD level, user needs and view changes. In order to ensure the synchronization of multiple data sources, the data must first be divided into multiple data blocks and the synchronization between the cache areas must be guaranteed through a consistency protocol.
[0192] 2. Application of distributed consistency protocol:
[0193] In order to ensure the cache area R i To ensure the consistency of data among multiple user devices, the Paxos protocol is used. The Paxos protocol avoids data conflicts by ensuring the consistency of each data block among multiple nodes. For example, when the Raft protocol modifies data, it elects a leader node to be responsible for data synchronization to ensure that all user devices can obtain updated and synchronized data.
[0194] The Paxos protocol can ensure that each node (here is the data block or cache area R i ) can reach consensus in a distributed system. When the data in a cache area is updated, the Paxos protocol ensures that all nodes accept the change unanimously.
[0195] 3. Incremental update mechanism:
[0196] In order to ensure that data updates do not cause performance degradation or inconsistency problems, this embodiment designs an incremental update algorithm, which only updates the changed data blocks. And ensure that during the layered loading process, when the data content changes, the incremental update only involves the changed part without reloading the entire data area.
[0197] Assume that the cache area R i The corresponding data block is When its LOD level or geometry changes, the incremental update mechanism updates only the changed parts (for example, LOD level switches from L1 to L2):
[0198]
[0199] This incremental update section It will be synchronized to all relevant nodes through the consistency protocol.
[0200] 4. Layered data consistency verification:
[0201] For data synchronization between different LOD levels, special attention should be paid to avoid data inconsistency during the update process. For example, when the user goes from a long distance to a close distance, it may switch from LOD1 to LOD3. During this process, the data in LOD1 and LOD3 needs to be consistent to ensure that when the viewpoint changes, whether high-precision data or low-precision data is loaded, it can be seamlessly transitioned. The layer consistency verification formula is:
[0202]
[0203] Among them, C sync (L1, L2) represents the consistency verification process between two LOD levels (L1 and L2), and They are cache areas R at different LOD levels. i data.
[0204] 5. Real-time data synchronization and conflict detection:
[0205] In a multi-user environment, multiple users may modify the same data at the same time. In order to avoid data conflicts, a conflict detection mechanism is designed. When the system finds that two users have modified different versions of the same data block, the system will initiate a conflict resolution process to ensure data consistency. When a conflict occurs, the system will select an appropriate conflict resolution method based on the consistency protocol (for example, resolving conflicts by priority or timestamp).
[0206] In step 5, the Paxo protocol is used to ensure the consistency and synchronization of hierarchical data, the incremental update mechanism is adopted to optimize the data update efficiency, and the consistency of data between different LODs is ensured through hierarchical consistency verification. At the same time, the real-time conflict detection mechanism ensures data consistency in a multi-user environment and avoids potential data conflict problems during hierarchical loading.
[0207] The specific step 6 includes:
[0208] In step 5, the consistency of data at different LOD levels has been ensured through dynamic data consistency verification and synchronization mechanisms, and incremental update technology has been used to optimize data update efficiency. Next, in step 6, the rendering performance needs to be further optimized. Especially in large-scale city-level BIM+GIS data, how to avoid rendering unnecessary objects and areas is the key to improving system response speed and efficiency.
[0209] During the rendering process, especially in large-scale, highly complex data such as BIM+GIS, many buildings and objects will still be calculated and rendered even when they are not visible from the user's perspective. This not only wastes computing resources, but may also cause system delays and affect user experience. Therefore, it is necessary to design a more intelligent and efficient rendering optimization and occlusion culling solution that can dynamically determine which areas need to be rendered and which areas can be culled based on the user's real-time perspective, data loading status, and viewpoint prediction.
[0210] 1. Viewpoint prediction and intelligent occlusion culling
[0211] Based on the user's historical interactions and current viewing angle information, we can predict the area that the user is most likely to view next, calculate in advance which areas will appear in the user's field of view, and thus eliminate those areas that are currently invisible or will not be viewed in advance. In this way, we can reduce unnecessary calculations before the user reaches the area and avoid wasting computing resources.
[0212] Viewpoint prediction: Based on the user’s interaction pattern (for example, the user usually tends to move in a certain direction) and combined with spatial distribution information (such as the arrangement of buildings and terrain), it is possible to intelligently predict the area that the user is likely to view next.
[0213] Smart occlusion culling: Combined with viewpoint prediction, spatial data layering technology (such as quadtree or octree) is used to identify which areas are completely occluded and which areas are visible from the current perspective. In this way, it is possible to determine which areas can be culled before the user's viewpoint reaches a certain area, thereby reducing invalid rendering.
[0214] 2. Multi-dimensional occlusion culling
[0215] Traditional occlusion culling algorithms are mainly based on the view frustum to determine whether an object is in the user's field of view. However, in large-scale BIM+GIS data, in addition to the view frustum and physical occlusion, other factors need to be considered, such as the distance between the object and the user and the LOD level of the object.
[0216] Distance-based occlusion culling: If an area is too far away from the user, even if the area is not completely blocked by other objects, it is difficult for the user to see these distant areas, so they can be culled. The spatial distance attenuation model can quantify the relationship between viewing distance and occlusion and decide whether to render the area.
[0217] Occlusion culling based on data granularity: For low-precision data areas at the edge of the viewing angle, even if part of the area is visible, unnecessary calculations can be avoided by reducing the rendering precision. At this time, the system will determine whether the data precision of the area is high enough to meet the rendering requirements. If not, the area will be culled.
[0218] 3.LOD rendering refinement and progressive loading
[0219] After determining the area that needs to be rendered, combined with the LOD management strategy proposed in step 2, progressive LOD loading is used to smoothly load and render details. Through progressive loading, when the user views the building from a distance, the system only loads rough low-precision data. As the user's viewpoint approaches, higher-precision detail data is gradually loaded to ensure a smooth visual experience.
[0220] Progressive LOD loading: Gradually load higher-precision detail information from lower-precision LODs, so that when the user's perspective changes, the details gradually appear instead of changing instantly.
[0221] Detail level adjustment: When the user moves quickly, the system automatically adjusts the level of rendering detail to adapt to different viewing angles and loading requirements, ensuring that the rendered details are always adapted to current needs at different movement speeds and viewing angles.
[0222] 4. Dynamic batch processing and multi-threaded rendering
[0223] In order to further improve rendering performance, especially when processing large-scale urban data, dynamic batch processing and multi-threaded rendering technology are introduced: objects in multiple visible areas are batch rendered to reduce the number of rendering calls, especially for low-precision data or objects in distant areas, batch rendering is performed to reduce the computing burden; in an environment that supports multi-core processing, multi-threading is used to process rendering tasks in different areas in parallel. This can make full use of computing resources and improve rendering efficiency.
[0224] In step 6, by predicting the user's viewpoint, invisible areas are eliminated in advance; through multi-dimensional occlusion culling, the areas that need to be rendered are judged more accurately under the influence of different factors; through progressive LOD loading, details are added smoothly to enhance the visual experience; at the same time, through dynamic batch processing and multi-threaded rendering technology, the rendering performance is further improved.
[0225] Example 2
[0226] like Figure 2 As shown, the present invention discloses a lightweight system based on BIM and GIS, including:
[0227] Spatial data division and hierarchical management module: spatially divide BIM and GIS data and assign different LOD levels according to complexity;
[0228] Dynamic LOD management and precision adaptation module: Based on the user's viewpoint changes, the LOD level of the loaded data is dynamically adjusted to ensure that low-precision data is loaded at a long distance and high-precision data is loaded at a close distance, achieving a balance between accuracy and loading speed;
[0229] Smooth transition module: Create smooth transitions between different LOD levels to avoid visual breaks when switching data;
[0230] Preloading and intelligent unloading module: Combined with user interaction history, preload the data that users may need through prediction and memory pool mechanism, and unload it when it is no longer needed;
[0231] Dynamic data consistency verification and synchronization mechanism module: through distributed consistency protocol and incremental update, the data between different LOD levels are kept consistent and synchronized to avoid multi-level data conflicts;
[0232] Rendering optimization and occlusion culling module: Through global occlusion culling and viewpoint-based visibility judgment, combined with regionalized data stratification, it dynamically identifies the visible area within the current viewpoint, and reduces rendering calculations in irrelevant areas based on the caching mechanism and data consistency model.
[0233] The module in the embodiment 2 is used to implement the function in the embodiment 1. This embodiment can be implemented by a system, the system includes a processor and a memory, the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the lightweight method based on BIM and GIS described in the embodiment 1 of the present application is implemented. The system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their settings and functions are known in the art, so they are not repeated here.
[0234] In the present application, the aforementioned memory may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, system, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in this application may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.
[0235] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein with equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of protection of the claims of the present invention.
Claims
1. A lightweight method based on BIM and GIS, characterized by: include: Spatially segment BIM and GIS data and assign different LOD levels according to complexity; Based on the user's viewpoint changes, the LOD level of the loaded data is dynamically adjusted to ensure that low-precision data is loaded at a long distance and high-precision data is loaded at a close distance, achieving a balance between accuracy and loading speed; Create smooth transitions between different LOD levels to avoid visual discontinuities when switching data; Identify the user's browsing history, load the area data that the user may need to view in advance, and unload the data that is no longer needed in time when the user's viewpoint changes; Through distributed consistency protocols and incremental updates, data between different LOD levels are kept consistent and synchronized to avoid multi-level data conflicts; Through global occlusion culling and viewpoint-based visibility judgment, combined with regionalized data stratification, the visible area within the current viewpoint is dynamically identified, and the rendering calculation of irrelevant areas is reduced based on the caching mechanism and data consistency model.
2. The lightweight method based on BIM and GIS according to claim 1, characterized in that: The spatial segmentation of BIM and GIS data and the allocation of different LOD levels according to complexity include: The space is divided into eight equal small cubes, and the subspace is recursively subdivided until the amount of data in each spatial area is small enough. Each child node represents a cube area, stores the BIM and GIS element information within the area, and assigns different LOD levels.
3. The lightweight method based on BIM and GIS according to claim 2, characterized in that: The method of dynamically adjusting the LOD level of the loaded data based on the change of the user's viewpoint to ensure that low-precision data is loaded at a long distance and high-precision data is loaded at a close distance, so as to achieve a balance between accuracy and loading speed includes: The accuracy requirement of the data is determined by the viewing distance, where the calculation of the viewing distance includes setting the user's viewpoint position and the center of gravity position of the target area. The viewing distance from the user to the target area is obtained by the Euclidean distance: The LOD level is dynamically selected based on the view distance. The switching rule is defined by the following formula: Among them, T3 and T4 are the view distance thresholds, which are used to control when to switch to low-precision or high-precision LOD; Set the user's viewing angle to θ view , which represents the relative angle between the user's perspective and a certain area in the spatial data; when the user's perspective changes, progressive loading is performed, and the progressive loading process is described by the following formula: Among them, Δθ view is the change in user’s viewing angle, Δθ threshold It is a set threshold. When the viewing angle changes beyond the threshold, higher precision data is loaded; To avoid lags during loading, a buffering mechanism is used to load the data of the next LOD level in advance when the user's perspective changes, and unload data areas that are no longer visible when they are no longer needed.
4. The lightweight method based on BIM and GIS according to claim 3 is characterized in that: Creating a smooth transition between different LOD levels to avoid visual discontinuity when switching data includes: Set the low-precision LOD surface and the high-precision LOD surface at the LOD switching point and generate a smooth transition surface S trans The transition surface is determined by the control points, based on a set of control points P0, P1, ..., P n , generates a smooth surface, expressed as: Among them, N i (u) is the i-th basis function, u is the interpolation parameter, P i It is a control point, representing the transition point between low-precision LOD and high-precision LOD, basis function N i (u) Control the influence of each control point to ensure smooth transition; Basis function N i (u) is obtained by the following algorithm: N0(u)=(1-u) 3 / 6 N1(u)=(3u 3 -6u 2 +4) / 6 <h2 style=";text-align:left;direction:ltr">N2(u) = (-3u<h2 style=";text-align:left;direction:ltr"> 3 <h2 style=";text-align:left;direction:ltr"> +3u<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> +3u+1) / 6 N0(u)=u 3 / 6 Control points P0,P1,...,P n It is the key node between low-precision and high-precision geometry. Through these control points, a smooth transition is made and S is finally generated. trans (u), the transition surface between two LOD levels; In the process of dynamically switching LOD, if the LOD level difference ΔLOD=LOD new -LOD current >1, where LOD new and LOD current Indicates the difference between the selected target LOD and the current rendering LOD at the current view distance, triggering the generation of a smooth transition surface S trans (u).
5. The lightweight method based on BIM and GIS according to claim 4 is characterized in that: The identifying of the browsing track of the user, loading in advance the regional data that the user may need to view, and unloading the data that is no longer needed when the user's viewpoint changes includes: Based on the user's current viewing angle and movement direction, predict the area A that the user will browse in the future future , assuming that the user's current viewpoint is P current , and the user's browsing trajectory has a certain direction and speed v view , then within a certain period of time, the user's future viewpoint position P future Estimated by the following formula: P future =P current +v view ·Δt Among them, v view represents the moving speed of the user's viewpoint, Δ represents the predicted time interval; Combined with the user's viewpoint prediction results, for the predicted area A future Preload data and cache multiple LOD levels in this area. The cache includes short-term cache and long-term cache. Among them, short-term cache includes storing the area data that the user is about to browse; long-term cache includes storing the area data that has been browsed in the past. Cache allocation includes: Assume that the area A near the current viewpoint near If caching is required, the cache size is R cache It is expressed as: Among them, D i Indicates the data size of the ith region, L i Indicates the LOD level of the area; Assume that the region data in the current cache is C cache ={A1,A2,...,A n }, for each region A i , through its distance R from the current viewpoint i To determine whether uninstallation is necessary; Assume that the available memory is M available , the data size of each cache area is D i , then the total cache memory size M cache for: Among them, loaded indicates the currently loaded cache area.
6. The lightweight method based on BIM and GIS according to claim 5, characterized in that: The distributed consistency protocol and incremental update are used to make the data between different LOD levels consistent and synchronized, and avoid multi-level data conflicts, including: Assume that the cache area R i The corresponding data block is When its LOD level changes, the incremental update mechanism only updates the changed part The updated part is synchronized to all relevant nodes through the consistency protocol; For data synchronization between different LOD levels, perform layered consistency verification: Among them, C sync (L x ,L y ) represents the two LOD levels (L x and L y ) is a consistency verification process between and They are cache areas R at different LOD levels. i data.
7. The lightweight method based on BIM and GIS according to claim 6, characterized in that: The method of dynamically identifying the visible area within the current viewpoint through global occlusion culling and viewpoint-based visibility judgment combined with regionalized data stratification, and reducing the rendering calculation of irrelevant areas based on the cache mechanism and data consistency model includes: Based on the user's historical interactions and current viewing angle, predict the area the user may view and remove invisible areas in advance; Combined with viewing distance, object occlusion and LOD accuracy, the rendering area is accurately judged to eliminate areas that are far away from the user or do not require high-precision rendering; After determining the area that needs to be rendered, progressive LOD loading is used to smoothly load and render details.
8. The lightweight system based on BIM and GIS is characterized by: include: Spatial data division and hierarchical management module: spatially divide BIM and GIS data and assign different LOD levels according to complexity; Dynamic LOD management and precision adaptation module: Based on the user's viewpoint changes, the LOD level of the loaded data is dynamically adjusted to ensure that low-precision data is loaded at a long distance and high-precision data is loaded at a close distance, achieving a balance between accuracy and loading speed; Smooth transition module: Create smooth transitions between different LOD levels to avoid visual breaks when switching data; Preloading and intelligent unloading module: Combined with user interaction history, preload the data that users may need through prediction and memory pool mechanism, and unload it when it is no longer needed; Dynamic data consistency verification and synchronization mechanism module: through distributed consistency protocol and incremental update, the data between different LOD levels are kept consistent and synchronized to avoid multi-level data conflicts; Rendering optimization and occlusion culling module: Through global occlusion culling and viewpoint-based visibility judgment, combined with regionalized data stratification, it dynamically identifies the visible area within the current viewpoint, and reduces rendering calculations in irrelevant areas based on the caching mechanism and data consistency model.
Citation Information
Patent Citations
High-speed and high-precision interpolation method for laser cutting
CN114296398A
City-level BIM (Building Information Modeling) data lightweight method and system based on multistage shelling algorithm
CN114419256A
Augmented reality visualization technical scheme in cable line inspection process
CN118397228A
Method for simulating large space through small-site XR
CN118429581A
Cited By
Visual lightweight linkage method and system based on intelligent identification and BIM
CN121581557A
Methods for Editing and Customizing Construction 3D Reports Based on BIM+GIS
CN122672986A