3D Scene Data Loading and Display Method and Electronic Device
By dividing the three-dimensional scene data into data blocks of multiple precision levels and using spatial indexing technology to dynamically load the target data blocks and compress the data, the problems of slow loading speed and large rendering delay in traditional three-dimensional loading technology are solved, and efficient data access and real-time rendering are achieved.
Patent Information
- Application Number
- CN202510411157.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-04-02
AI Technical Summary
Traditional three-dimensional loading technology is slow to load and has a large rendering delay when processing PeB-level data, making it difficult to meet the needs of real-time rendering. In addition, traditional spatial index management cannot effectively deal with frequent data modification or update, resulting in a decrease in loading efficiency.
The three-dimensional scene data is divided into data blocks of multiple precision levels, and the spatial indexing technology is used to establish the index structure of the data blocks, dynamically load the target data blocks according to user operations, and compress the geometric data and texture data.
It significantly improves data access and loading efficiency, reduces loading latency, ensures real-time rendering, and improves user experience.
Smart Images

Figure CN119917687B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and particularly to a method for loading and displaying three-dimensional scene data and an electronic device. Background Art
[0002] With the explosion of data volume, traditional three-dimensional loading technologies have problems such as slow loading speed and large rendering latency when processing PB-level data, seriously affecting the user experience.
[0003] For example, in application scenarios such as natural resources, smart cities, and urban planning, a large amount of three-dimensional real-scene data needs to be loaded and browsed. When facing PB-level massive data, traditional three-dimensional loading solutions often have problems such as stuttering, slow loading, and inability to browse smoothly. Especially when rendering three-dimensional scenes with rich details and a wide area, the demand for real-time rendering is often not met, directly affecting the efficiency of various business operations such as decision support, natural resource investigation and monitoring, and urban planning approval.
[0004] For another example, traditional three-dimensional loading technologies generally adopt the block storage (Tile) method, dividing three-dimensional data into multiple root nodes. However, due to the wide model space range and large data volume, the model is divided into many root nodes, and it takes a long time to read these root nodes, resulting in slow model loading. Traditional systems usually rely on automatic selection when merging root nodes. Although this method is simple, it lacks flexibility in practical applications and is difficult to dynamically adjust according to different application scenarios. At the same time, traditional spatial index management cannot effectively handle the problems brought by frequent data modification or update, and fails to optimize the index in real time, resulting in a gradual decline in loading efficiency as the data increases. Summary of the Invention
[0005] In view of this, the embodiments of the present application provide a method, device, and electronic device for loading and displaying three-dimensional scene data, which can improve data access and loading efficiency, reduce loading latency, and ensure real-time rendering.
[0006] To achieve the above object, the present application adopts the following technical solutions:
[0007] In a first aspect, the embodiments of the present application provide a method for loading and displaying three-dimensional scene data, including:
[0008] Performing spatial partitioning on the three-dimensional scene data to be processed, dividing it into data blocks of multiple precision levels, the number of data blocks at each level of precision being multiple, and all data blocks can be independently stored and loaded from each other;
[0009] Using a spatial index technology to establish a spatial index structure for all data blocks;
[0010] Obtain the operations applied by the user in the user-side interaction interface, and determine the view range and zoom level for loading the 3D scene data according to the operations;
[0011] Determine the target data blocks according to the zoom level, the view range, and the spatial index structure, and send the target data blocks to the user side for loading and display.
[0012] Based on the first aspect, in some embodiments, the spatial partitioning of the to-be-processed 3D scene data into multiple data blocks of different precision levels includes:
[0013] Based on the coverage range and the preset precision of the to-be-processed 3D scene data, use a quadtree or an octree to perform spatial partitioning on the to-be-processed 3D scene data to obtain multiple independently stored and loaded data blocks;
[0014] Wherein, each data block corresponds to a spatial coordinate range, and the spatial coordinate ranges of all data blocks at the same precision level do not overlap and are joined together to form a complete region. The preset precision includes multiple different precision levels, and each data block corresponds to one preset precision.
[0015] Based on the first aspect, in some embodiments, the spatial partitioning of the to-be-processed 3D scene data includes: determining the data distribution density within the coverage range of the to-be-processed 3D scene data; dividing the entire region into multiple sub-regions according to the data distribution density, dividing the sub-regions with a larger data distribution density into data blocks with a smaller spatial coordinate range, dividing the sub-regions with a smaller data distribution density into data blocks with a larger spatial coordinate range, and the precision level of the data blocks corresponding to the sub-regions with a larger data distribution density is greater than the precision level of the data blocks corresponding to the sub-regions with a smaller data distribution density;
[0016] Alternatively, the spatial partitioning of the to-be-processed 3D scene data includes: performing spatial partitioning on the to-be-processed 3D scene data according to a spatial coordinate range of a fixed size;
[0017] Alternatively, the spatial partitioning of the to-be-processed 3D scene data includes: performing spatial partitioning on the to-be-processed 3D scene data according to the actual geographical boundaries, where the actual geographical boundaries include at least one of administrative region boundaries, road networks, and natural landforms.
[0018] Based on the first aspect, in some embodiments, the establishment of the spatial index structure of the multiple data blocks by using the spatial index technology includes:
[0019] Obtain the spatial coordinate ranges, storage paths, and metadata in each data block, where the metadata includes a data block identifier, a precision level, and a data volume;
[0020] Construct an R-tree within each leaf node of the quadtree. The R-tree is used to store the spatial coordinate ranges, storage paths, and metadata of all data blocks within the precision level corresponding to the leaf node.
[0021] Write the spatial coordinate ranges and data block representations of all data blocks within the precision level corresponding to the quadtree leaf node into the nodes of the corresponding R-tree, and determine the spatial coordinate ranges of each node in the R-tree according to the spatial coordinate ranges of the data blocks in each node of the R-tree.
[0022] When the number of data blocks in the first node of the R-tree exceeds a preset threshold, split the first node into two child nodes, and re-determine the spatial coordinate ranges of the two child nodes according to the spatial coordinate ranges of the data blocks in the two child nodes. The first node is any node in the R-tree.
[0023] Based on the first aspect, in some embodiments, the determining the target data block according to the zoom level, the view range, and the spatial index structure, and sending the target data block to the client for loading and display includes:
[0024] Determine the target leaf node in the quadtree according to the zoom level, where the zoom level corresponds to a precision level;
[0025] Query the target node of the R-tree that intersects with the view range from the R-tree of the target leaf node according to the spatial coordinate ranges of each node in the R-tree of the target leaf node;
[0026] Query the target data block that intersects with the view range from the target node of the R-tree according to the spatial coordinate range of the data block;
[0027] Retrieve the data in the target data block according to the storage path and metadata of the target data block, and send it to the client for loading and display.
[0028] Based on the first aspect, in some embodiments, the data stored in the data block includes geometric data and texture data. The sending the target data block to the client for loading and display includes:
[0029] Compress the geometric data and texture data in the target data block;
[0030] Send the compressed target data block to the client for loading and display.
[0031] Based on the first aspect, in some embodiments, the compressing the geometric data and texture data in the target data block includes:
[0032] Determine a compression level based on the zoom level, where the compression level includes low level, medium level, and high level; wherein, when the zoom level indicates that the user zooms in on the view, it is determined that the compression level increases; when the zoom level indicates that the user zooms out on the view, it is determined that the compression level decreases; wherein, the zoom level includes a zoom - out level and a zoom - in level, the zoom - out level indicates zooming out on the view, and the zoom - in level indicates zooming in on the view;
[0033] Compress the geometric data and texture data in the target data block according to the determined compression level.
[0034] Based on the first aspect, in some embodiments, the sending the target data block to the client for loading and display includes:
[0035] When the view range is greater than the preset coordinate range, merge multiple adjacent first data blocks in the target data block into a new data block to obtain multiple merged data blocks; wherein, the first database is a data block in the lowest precision level or two precision levels in the target data block, and multiple first data blocks at the same precision level are merged into a new data block;
[0036] Send the target data block and the multiple merged data blocks to the client for loading and display.
[0037] Based on the first aspect, in some embodiments, the sending the target data block to the client for loading and display includes:
[0038] If the zoom level indicates that the user zooms in or out on the view, the client loads and displays a second data block and a third data block; wherein, each zoom level corresponds to a precision level, the spatial coordinate range of the second data block corresponds to the middle area of the view range, and the precision level of the second data block corresponds to the zoom level; the spatial coordinate range of the third data block corresponds to the edge area of the view range, and the precision level of the third data block is less than the precision level of the second data block; the second data block is one or more, and the third data block is one or more;
[0039] If the zoom level indicates that the user performs a zoom - in view operation, call a second data block with a higher precision level for loading and display; if the zoom level indicates that the user performs a zoom - out view operation, call a second data block with a lower precision level for loading and display.
[0040] In a second aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where a computer program that can run on the processor is stored in the memory, and when the processor executes the computer program, it implements the three - dimensional scene data loading and display method according to any one of the first aspect.
[0041] The beneficial effects of the embodiments of the present application compared with the prior art include:
[0042] In the embodiments of the present application, large-scale three-dimensional scene data is divided into multiple data blocks, each data block can be independently loaded, and the loaded content can be dynamically adjusted according to user needs, avoiding unnecessary data transmission, which can greatly improve the data loading efficiency; a spatial index structure is constructed by using the spatial index technology. By accurately positioning each data block and reducing unnecessary calculations, the efficiency of data access and loading can be significantly improved, and the target data can be quickly found under a large dataset, reducing the loading delay and ensuring real-time rendering. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0044] Figure 1 is a schematic flowchart of a method for loading and displaying three-dimensional scene data provided by an embodiment of the present application;
[0045] Figure 2 is a schematic structural diagram of a device for loading and displaying three-dimensional scene data provided by an embodiment of the present application;
[0046] Figure 3 is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0047] The following will further clarify the present application with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the role of the present application, but do not limit the present application in any form. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several deformations and improvements can be made. These all belong to the protection scope of the present application.
[0048] To make the objectives, technical solutions, and advantages of the present application clearer, the following will be described through specific embodiments with reference to the drawings.
[0049] See Figure 1 , the method for loading and displaying three-dimensional scene data provided by the embodiments of the present application may include the following steps:
[0050] Step 101: Perform spatial partitioning on the three-dimensional scene data to be processed, dividing it into multiple data blocks at different precision levels. The number of data blocks at each precision level is multiple, and all data blocks can be stored and loaded independently of each other.
[0051] In some embodiments, the above-mentioned spatial partitioning of the three-dimensional scene data to be processed into multiple data blocks at different precision levels may include: Based on the coverage range and preset precision of the three-dimensional scene data to be processed, use a quadtree or octree to perform spatial partitioning on the three-dimensional scene data to be processed, obtaining multiple data blocks that can be stored and loaded independently of each other. Among them, each data block corresponds to a spatial coordinate range. The spatial coordinate ranges of all data blocks at the same precision level do not overlap and are joined together to form a complete area. The preset precision includes multiple different precision levels, and each data block corresponds to a preset precision.
[0052] Specifically, the goal of performing spatial partitioning on the three-dimensional scene data to be processed is to balance data loading efficiency and detail presentation. The following several spatial partitioning strategies can be adopted:
[0053] (1) Hierarchical partitioning based on quadtree / octree: The number of partitioning levels is mainly dynamically adjusted according to the data coverage range and precision requirements. For example, city-level data can be divided into 5-6 levels. The high-precision areas (such as urban areas) have more levels, and the low-precision areas (such as suburban areas) have fewer levels.
[0054] (2) Perform spatial partitioning on the three-dimensional scene data to be processed according to the data distribution density, that is, the size of the data block file is determined by the data distribution density. Among them, the data distribution density corresponding to the building-intensive area is relatively high, while the data distribution density corresponding to the open area is relatively low. Therefore, the building-intensive area can be divided into smaller data blocks, while the open area can be divided into larger data blocks.
[0055] (3) When the distribution of the three-dimensional scene data is relatively uniform, the three-dimensional scene data to be processed can be divided into uniform grids according to a fixed size (such as 1km×1km), obtaining multiple data blocks with the same spatial coordinate range. This fixed size can be set according to the resolution and loading requirements of the data, and is not limited to 1km×1km.
[0056] (4) Perform spatial partitioning on the three-dimensional scene data to be processed according to the actual geographical boundaries (such as administrative divisions, road networks, natural landforms, etc.), aligning the data blocks with the business scenario logic to achieve on-demand loading of data for specific areas.
[0057] The above several spatial partitioning strategies can be used alone or in combination.
[0058] In some scenarios, the above-mentioned spatial partitioning of the three-dimensional scene data to be processed may include: determining the data distribution density within the coverage range of the three-dimensional scene data to be processed; dividing the entire area into multiple sub-regions according to the data distribution density, dividing the sub-regions with a larger data distribution density into data blocks with a smaller spatial coordinate range, and dividing the sub-regions with a smaller data distribution density into data blocks with a larger spatial coordinate range, and the accuracy level of the data blocks corresponding to the sub-regions with a larger data distribution density is higher than that of the data blocks corresponding to the sub-regions with a smaller data distribution density.
[0059] In some other scenarios, the above-mentioned spatial partitioning of the three-dimensional scene data to be processed may include: performing spatial partitioning on the three-dimensional scene data to be processed according to a spatial coordinate range of a fixed size.
[0060] In some other scenarios, the above-mentioned spatial partitioning of the three-dimensional scene data to be processed may include: determining the data distribution density within the coverage range of the three-dimensional scene data to be processed; performing spatial partitioning on the three-dimensional scene data to be processed according to a spatial coordinate range of a fixed size, and the accuracy level of the data blocks corresponding to the sub-regions with a larger data distribution density is higher than that of the data blocks corresponding to the sub-regions with a smaller data distribution density.
[0061] In some other scenarios, the above-mentioned spatial partitioning of the three-dimensional scene data to be processed may include: performing spatial partitioning on the three-dimensional scene data to be processed according to the actual geographical boundaries, where the actual geographical boundaries include at least one of administrative region boundaries, road networks, and natural landforms.
[0062] In some other scenarios, the above-mentioned spatial partitioning of the three-dimensional scene data to be processed may include: determining the data distribution density within the coverage range of the three-dimensional scene data to be processed; performing spatial partitioning on the three-dimensional scene data to be processed according to the actual geographical boundaries, the accuracy level of the data blocks corresponding to the sub-regions with a larger data distribution density is higher than that of the data blocks corresponding to the sub-regions with a smaller data distribution density, and the actual geographical boundaries include at least one of administrative region boundaries, road networks, and natural landforms.
[0063] Each of the above data blocks may contain multiple accuracy levels, and an appropriate accuracy level needs to be dynamically loaded according to the user's perspective. For example, when the user's perspective is zoomed out, the data blocks with a lower accuracy level are loaded, and when the user's perspective is zoomed in, the data blocks with a higher accuracy level are loaded, so as to ensure the loading speed and detail display.
[0064] Exemplarily, the reduction of the user perspective can be that the user performs a view reduction operation on the user-side interaction interface, so that a view with a larger spatial coordinate range can be displayed in the interaction interface. The magnification of the user perspective can be that the user performs a view magnification operation on the interaction interface, so that a view with a smaller spatial range can be displayed in the interaction interface, thereby viewing more display details. The view reduction operation can be a reduction gesture, and the view magnification operation can be a magnification gesture. The user can view the view in the above-mentioned interaction interface.
[0065] In the embodiments of the present application, the size of each data block is controlled within a reasonable range to avoid excessive loading latency caused by an overly large single data block. The boundaries between adjacent data blocks should ensure seamless connection to avoid cracks or misalignment during loading. Consistency can be ensured by reserving overlapping areas and using spatial indexing.
[0066] In addition, multiple adjacent data blocks can be merged into a new data block as needed, which can reduce I / O (Input / Output, write / read) operations and loading time, and ensure that the size of the merged data block is reasonable without affecting accuracy.
[0067] The above-mentioned merging of multiple adjacent data blocks into a new data block as needed has the following beneficial effects:
[0068] (1) When loading a large amount of data, if multiple data blocks are read and loaded each time, it will require more I / O operations. However, by merging multiple adjacent data blocks into a new data block, the number of reads can be reduced to improve the efficiency of data loading.
[0069] (2) When the data blocks are relatively small, it may lead to data fragmentation in storage, increasing disk query time and reducing read efficiency. While the data in the merged data block is stored continuously, which can effectively reduce the fragmentation problem and improve the read speed.
[0070] (3) The merged data block covers an area with a wider spatial coordinate range. When the user performs view panning or zooming, the required data is more likely to be already stored in the cache, thereby reducing repeated loading and improving the response speed.
[0071] (4) When multiple smaller data blocks are loaded, priority confusion may occur due to network or I / O competition. However, the merged database can be loaded according to the spatial range priority (such as the view center area first) to ensure that critical data is presented quickly.
[0072] Step 102, establish a spatial index structure for all data blocks using spatial indexing technology.
[0073] In this step, an efficient spatial indexing technique (such as a quadtree, an R-tree, etc.) can be adopted to index the data blocks after chunking. The spatial index structure enables each data block to be quickly located, so that the client can quickly obtain the data in a specific area.
[0074] In some embodiments, the implementation process of step 102 may include:
[0075] Obtain the spatial coordinate ranges, storage paths, and metadata in each data block, where the metadata includes a data block identifier, a precision level, and the data volume;
[0076] Construct an R-tree within each leaf node of the quadtree, and the R-tree is used to store the spatial coordinate ranges, storage paths, and metadata of all data blocks within the precision level corresponding to the leaf node;
[0077] Write the spatial coordinate ranges and data block representations of all data blocks within the precision level corresponding to the quadtree leaf nodes into the corresponding nodes of the R-tree, and determine the spatial coordinate ranges of each node of the R-tree according to the spatial coordinate ranges of the data blocks in each node of the R-tree;
[0078] When the number of data blocks in the first node of the R-tree exceeds a preset threshold, split the first node into two child nodes, and re-determine the spatial coordinate ranges of the two child nodes according to the spatial coordinate ranges of the data blocks in the two child nodes, where the first node is any node in the R-tree.
[0079] Exemplarily, the above spatial coordinate range can be a range composed of spatial coordinates converted to a unified spatial reference system (such as CGCS2000).
[0080] In this embodiment, by establishing a spatial index structure for all data blocks, when a user requests to load a certain area, the system can locate the corresponding leaf node from the quadtree according to the zoom level of the user's perspective, then perform a range query in the R-tree associated with the leaf node, find the data blocks intersecting the requested loading area, and return the storage paths and metadata of the data blocks, so as to achieve rapid positioning and dynamic loading.
[0081] In this embodiment, efficient spatial index structures such as a linear quadtree and an R-tree are adopted to establish an image pyramid structure for three-dimensional scene data such as terrain and images, and a sequential index is established through an association model. The optimized spatial index structure can support batch reconstruction, compress the storage space, improve the indexing efficiency of data blocks, so as to achieve rapid access in a massive data environment, reduce the loading delay, and ensure real-time rendering.
[0082] Step 103, obtain the operations applied by the user in the user-side interaction interface, and determine the view range and zoom level for loading the three-dimensional scene data according to the operations.
[0083] Among them, the view range is the three-dimensional scene area that the user can see in the interaction interface, which is affected by the viewing angle and the screen size.
[0084] Exemplarily, the operations applied by the user in the user-side interaction interface can be zoom-in view operation, zoom-out view operation, pan view operation, etc. The zoom-in view operation can enable the interaction interface to display a view of a smaller spatial range, so as to view more display details. The zoom-out view operation can enable the interaction interface to display a view of a larger spatial range, so that the user can find the area to be viewed more quickly. The pan view operation is an operation to pan the view and will not cause the spatial range to shrink or expand.
[0085] The zoom-in view operation corresponds to a zoom level, and the zoom level after the execution of the zoom-in view operation can be determined according to the current zoom level before the execution of the zoom-in view operation and the zoom-in view operation. Similarly, the zoom-out view operation also corresponds to a zoom level, and the zoom level after the execution of the zoom-out view operation can be determined according to the current zoom level before the execution of the zoom-out view operation and the zoom-out view operation. The pan view operation does not change the zoom level. After determining the zoom level, the corresponding precision level can be determined, and then the data block can be retrieved in the corresponding precision level.
[0086] Step 104: Determine the target data block according to the zoom level, the view range, and the spatial index structure, and send the target data block to the user side for loading and display.
[0087] In some embodiments, step 104 may specifically include: determining the target leaf node in the quadtree according to the zoom level, where the zoom level corresponds to a precision level; querying the target node of the R-tree in the target leaf node that intersects with the view range according to the spatial coordinate ranges of the nodes of the R-tree in the target leaf node; querying the target data block that intersects with the view range from the target node of the R-tree according to the spatial coordinate range of the data block; retrieving the data in the target data block according to the storage path and metadata of the target data block, and sending it to the user side for loading and display.
[0088] Exemplarily, the data stored in the data block includes geometric data and texture data. The above-mentioned sending the target data block to the user side for loading and display may include: compressing the geometric data and texture data in the target data block; sending the compressed target data block to the user side for loading and display.
[0089] In this embodiment, the data stored in the data block may include geometric data, texture data, attribute data, metadata, index data, animation data, lighting material data, etc. Geometric materials and texture data are the key points for compression because they have a large amount of data, while the volumes of attribute materials, metadata, and index data are relatively small, and the compression effect is not obvious. Animation data and lighting material data are usually calculated in real time and are not suitable for compression.
[0090] Optionally, the compression of the geometric data and texture data in the target data block may include: determining a compression level based on the zoom level, where the compression level includes low level, medium level, and high level; among them, when the zoom level indicates that the user zooms in on the view, it is determined that the compression level increases; when the zoom level indicates that the user zooms out on the view, it is determined that the compression level decreases; the zoom level includes a zoom-out level and a zoom-in level, the zoom-out level indicates zooming out on the view, and the zoom-in level indicates zooming in on the view; and compressing the geometric data and texture data in the target data block according to the determined compression level.
[0091] Specifically, the compression level may include low level, medium level, and high level. The compression level refers to the level that controls the compression ratio and compression speed by adjusting the complexity of the algorithm and computing resources during the file compression process. The high compression level uses a more complex algorithm and more computing resources to maximize the compression ratio and provide the highest compression ratio, but the compression speed is slow; the low compression level and the medium compression level balance between the compression ratio and the compression speed.
[0092] In this embodiment, when compressing data, for geometric data, the quantization accuracy and simplification rate can be appropriately reduced; for texture data, an efficient compression format can be selected and the resolution can be appropriately reduced; in terms of general compression, a medium compression level and a reasonable block size are selected to balance the compression ratio and decompression speed and improve the I / O efficiency.
[0093] In this embodiment, the geometric data and texture data in the data block are efficiently compressed, the data structure and texture are optimized to make them more lightweight; at the same time, the compression level is dynamically adjusted according to the zoom level, which can greatly improve the loading speed and access efficiency without losing data accuracy.
[0094] Optionally, sending the target data block to the client for loading and display may include: when the view range is greater than the preset coordinate range, merging multiple adjacent first data blocks in the target data block into a new data block to obtain multiple merged data blocks; wherein, the first data block is a data block with the lowest precision level or two precision levels in the target data block, and multiple first data blocks at the same precision level are merged into a new data block; sending the target data block and the multiple merged data blocks to the client for loading and display.
[0095] Specifically, when the user needs to view a view with a larger spatial coordinate range, the user can perform a view reduction operation, and the system can merge multiple adjacent data blocks (with the same precision level) in the determined target data block into a new data block to optimize the loading performance of large-scale 3D scenes.
[0096] Exemplarily, when the user views the public facility service coverage in a larger area (such as a 15-minute living circle) on the interaction interface, the system can merge multiple data blocks with low precision levels into a new data block, thereby optimizing the large-range data loading performance and ensuring a better experience for the user during browsing.
[0097] In this embodiment, the system only loads the data blocks in the currently visible area on the interaction interface through on-demand loading and cache management, and caches the already loaded data blocks to avoid repeated loading.
[0098] Optionally, sending the target data block to the client for loading and display may include:
[0099] If the zoom level indicates that the user zooms in or out of the view, the client loads and displays the second data block and the third data block; wherein, each zoom level corresponds to a precision level, the spatial coordinate range of the second data block corresponds to the middle area of the view range, and the precision level of the second data block corresponds to the zoom level; the spatial coordinate range of the third data block corresponds to the edge area of the view range, and the precision level of the third data block is less than the precision level of the second data block; the second data block is one or more, and the third data block is one or more;
[0100] If the zoom level indicates that the user performs a view zoom-in operation, a second data block with a higher precision level is called for loading and display; if the zoom level indicates that the user performs a view zoom-out operation, a second data block with a lower precision level is called for loading and display.
[0101] Specifically, the system can dynamically adjust the data loading strategy according to the user's operations. When the user's view zoom-in and view zoom-out operations bring about perspective changes, different-precision data can be automatically switched. For example, when the user performs a view zoom-in operation, the system loads high-precision hierarchical data; when the user performs a view zoom-out operation, the system loads low-precision hierarchical data to improve the loading speed and optimize the user experience. Combining dynamic precision adjustment and priority scheduling, the system can flexibly load different-precision hierarchical data according to the user's perspective and display requirements, ensuring a smooth and efficient interaction experience without sacrificing data precision.
[0102] Taking the urban living circle analysis as an example, when the user views the public facility service coverage within a certain time range (such as a 10-minute living circle) in the interaction interface, the system preferentially loads high-precision hierarchical data within the area of this time range and delays loading low-precision hierarchical data in the areas far from this time range to improve the response efficiency.
[0103] Exemplarily, taking the 15-minute living circle scenario as an example, the system dynamically loads data blocks of different precisions to analyze the public service facility coverage in different time ranges. At the initial loading, the system uses low-precision data blocks to display an overview of the public service facilities within the city in the user-side interaction interface; when the user performs a view zoom-in operation, the system loads medium-precision data blocks to display more detailed facility data; when the user further performs a view zoom-in operation, the system loads high-precision data blocks to display more details of the facilities, such as building models and textures, etc. As the user performs view zoom-in or view zoom-out operations, the system dynamically adjusts the loading range and precision to ensure a smooth interaction experience.
[0104] The above three-dimensional scene data loading and display method has at least the following beneficial effects:
[0105] (1) Divide the large-scale three-dimensional scene data into multiple data blocks, each of which can be independently loaded, and dynamically adjust the loaded content according to the user's needs, avoiding unnecessary data transmission, and can greatly improve the data loading efficiency;
[0106] (2) Adopt the spatial index technology to construct a spatial index structure. By accurately positioning each data block and reducing unnecessary calculations, it can significantly improve the efficiency of data access and loading, quickly find the target data under a large dataset, reduce the loading delay, and ensure real-time rendering;
[0107] (3) Introduce a data block merging mechanism, support flexibly adjusting the precision of the loaded content according to different display requirements, thereby improving the loading speed without sacrificing data precision;
[0108] (4) Compressing the geometric data and texture data reduces the storage space and transmission bandwidth while maintaining high data accuracy and rendering quality.
[0109] Through the above improvements and optimizations, the three-dimensional scene data loading and display method in the embodiments of this application can significantly improve the loading and rendering efficiency of PB-level massive data, and is widely applicable to various application scenarios that require real-time display of large-scale three-dimensional data, enabling users to still obtain a smooth and efficient browsing experience when facing complex data.
[0110] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application.
[0111] Corresponding to the three-dimensional scene data loading and display method described in the above embodiments, Figure 2 The structural block diagram of the three-dimensional scene data loading and display device provided by the embodiments of this application is shown. For the sake of convenience of description, only the parts related to the embodiments of this application are shown.
[0112] See Figure 2 , the embodiments of this application provide a three-dimensional scene data loading and display device, including a space division module 201, an index establishment module 202, an operation determination module 203, and a data block determination module 204.
[0113] The space division module 201 is used to perform space division on the three-dimensional scene data to be processed, and divide it into data blocks of multiple precision levels. The number of data blocks at each level of precision is multiple, and all data blocks can be independently stored and loaded from each other.
[0114] The index establishment module 202 is used to establish a spatial index structure for all data blocks by using spatial index technology.
[0115] The operation determination module 203 is used to obtain the operations applied by the user in the user-side interaction interface, and determine the view range and zoom level for which the three-dimensional scene data needs to be loaded according to this operation.
[0116] The data block determination module 204 is used to determine the target data block according to the zoom level, the view range, and the spatial index structure, and send the target data block to the user side for loading and display.
[0117] Figure 3 is a schematic diagram of an electronic device provided by an embodiment of the present invention. As Figure 3As shown, the electronic device 300 of this embodiment includes a processor 310 and a memory 320. A computer program that can run on the processor 310 is stored in the memory 320, such as a three-dimensional scene data loading and display program. When the processor 310 executes the computer program, the steps in the above-mentioned embodiment of the three-dimensional scene data loading and display method are implemented, such as Figure 1 101 to 104 shown. Alternatively, when the processor 310 executes the computer program, the functions of each module in the above-mentioned device embodiments are implemented, such as Figure 2 the functions of the modules 201 to 204 shown.
[0118] Exemplarily, the computer program may be divided into one or more modules / units. The one or more modules / units are stored in the memory 320 and executed by the processor 310 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the electronic device 300. For example, the computer program may be divided into a space division module, an index establishment module, an operation determination module, and a data block determination module.
[0119] The electronic device 300 may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The electronic device may include, but is not limited to, a processor 310 and a memory 320. Those skilled in the art can understand that Figure 3 this is only an example of the electronic device 300 and does not limit the electronic device 300. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the electronic device may further include input / output devices, network access devices, a bus, etc.
[0120] The processor 310 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0121] The memory 320 may be an internal storage unit of the electronic device 300, such as a hard disk or memory of the electronic device 300. The memory 320 may also be an external storage device of the electronic device 300, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 300. Further, the memory 320 may also include both an internal storage unit and an external storage device of the electronic device 300. The memory 320 is used to store the computer program and other programs and data required by the electronic device. The memory 320 may also be used to temporarily store data that has been output or is to be output.
[0122] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for loading and displaying three-dimensional scene data, characterized in that Including: Performing spatial partitioning on the three-dimensional scene data to be processed, dividing it into data blocks at multiple precision levels, with multiple data blocks at each precision level, and all data blocks can be independently stored and loaded from each other; Establishing a spatial index structure for all data blocks using a spatial indexing technique; Obtaining the operations applied by the user in the user-side interaction interface, and determining the view range and zoom level for loading the three-dimensional scene data in the interaction interface according to this operation; Determining target data blocks according to the zoom level, the view range, and the spatial index structure, and sending the target data blocks to the user side for loading and display; The data stored in the data block includes geometric data and texture data. The sending the target data block to the user side for loading and display includes: compressing the geometric data and texture data in the target data block; sending the compressed target data block to the user side for loading and display.
2. The three-dimensional scene data loading and display method according to claim 1, wherein The performing spatial partitioning on the three-dimensional scene data to be processed, dividing it into data blocks at multiple precision levels, includes: Based on the coverage range and the preset precision of the three-dimensional scene data to be processed, using a quadtree or an octree to perform spatial partitioning on the three-dimensional scene data to be processed, obtaining multiple data blocks that are independently stored and loaded from each other; Wherein, each data block corresponds to a spatial coordinate range, the spatial coordinate ranges of all data blocks at the same precision level do not overlap and are joined to form a complete area, the preset precision includes multiple different precision levels, and each data block corresponds to a preset precision.
3. The three-dimensional scene data loading and display method according to claim 2, wherein The performing spatial partitioning on the three-dimensional scene data to be processed includes: determining the data distribution density within the coverage range of the three-dimensional scene data to be processed; dividing the entire area into multiple sub-regions according to the data distribution density, dividing the sub-regions with a large data distribution density into data blocks with a small spatial coordinate range, dividing the sub-regions with a small data distribution density into data blocks with a large spatial coordinate range, and the precision level of the data blocks corresponding to the sub-regions with a large data distribution density is higher than the precision level of the data blocks corresponding to the sub-regions with a small data distribution density; Alternatively, the performing spatial partitioning on the three-dimensional scene data to be processed includes: performing spatial partitioning on the three-dimensional scene data to be processed according to a spatial coordinate range of a fixed size; Alternatively, the performing spatial partitioning on the three-dimensional scene data to be processed includes: performing spatial partitioning on the three-dimensional scene data to be processed according to the actual geographical boundary, and the actual geographical boundary includes at least one of an administrative region boundary, a road network, and a natural landform.
4. The three-dimensional scene data loading and display method according to claim 2, wherein The establishing a spatial index structure for all data blocks using a spatial indexing technique includes: Obtaining the spatial coordinate range, storage path, and metadata in each data block, and the metadata includes a data block identifier, a precision level, and the data volume; Constructing an R-tree within each leaf node of the quadtree, and the R-tree is used to store the spatial coordinate range, storage path, and metadata of all data blocks within the precision level corresponding to this leaf node; Write the spatial coordinate ranges and data block representations of all data blocks within the precision level corresponding to the quadtree leaf node into the corresponding nodes of the R-tree, and determine the spatial coordinate ranges of each node of the R-tree according to the spatial coordinate ranges of the data blocks in each node of the R-tree; When the number of data blocks in the first node of the R-tree exceeds the preset threshold, split the first node into two child nodes, and re-determine the spatial coordinate ranges of the two child nodes according to the spatial coordinate ranges of the data blocks in the two child nodes, where the first node is any node in the R-tree.
5. The three-dimensional scene data loading and display method according to claim 4, characterized in that, The determining the target data block according to the zoom level, the view range, and the spatial index structure, and sending the target data block to the client for loading and display includes: Determine the target leaf node in the quadtree according to the zoom level, where the zoom level corresponds to a precision level; According to the spatial coordinate ranges of each node of the R-tree of the target leaf node, query the target node of the R-tree that intersects with the view range from the R-tree of the target leaf node; Query the target data block that intersects with the view range from the target node of the R-tree according to the spatial coordinate range of the data block; Retrieve the data in the target data block according to the storage path and metadata of the target data block, and send it to the client for loading and display.
6. The three-dimensional scene data loading and display method according to claim 1, characterized in that The compressing the geometric data and texture data in the target data block includes: Determine the compression level based on the zoom level, where the compression level includes low, medium, and high; among them, when the zoom level indicates that the user zooms in on the view, determine that the compression level increases; when the zoom level indicates that the user zooms out on the view, determine that the compression level decreases; the zoom level includes a zoom-out level and a zoom-in level, the zoom-out level indicates zooming out on the view, and the zoom-in level indicates zooming in on the view; Compress the geometric data and texture data in the target data block according to the determined compression level.
7. The three-dimensional scene data loading and display method according to claim 1, characterized in that The sending the target data block to the client for loading and display includes: When the view range is greater than the preset coordinate range, merge multiple adjacent first data blocks in the target data block into a new data block to obtain multiple merged data blocks; where the first database is the data block in the lowest precision level or two precision levels in the target data block, and multiple first data blocks in the same precision level are merged into a new data block; Send the target data block and the multiple merged data blocks to the client for loading and display.
8. The three-dimensional scene data loading and display method according to claim 7, wherein The sending the target data block to the client for loading and display includes: If the zoom level indicates that the user zooms in or out of the view, the client loads and displays the second data block and the third data block; wherein, each zoom level corresponds to a precision level, the spatial coordinate range of the second data block corresponds to the middle area of the view range, and the precision level of the second data block corresponds to the zoom level; the spatial coordinate range of the third data block corresponds to the edge area of the view range, and the precision level of the third data block is less than that of the second data block; the second data block is one or more, and the third data block is one or more; If the zoom level indicates that the user performs a view zoom-in operation, a second data block with a higher precision level is called to be loaded and displayed; if the zoom level indicates that the user performs a view zoom-out operation, a second data block with a lower precision level is called to be loaded and displayed.
9. An electronic device, comprising a memory and a processor, the memory storing a computer program that can run on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the three-dimensional scene data loading and display method described in any one of claims 1 to 8 above.
Citation Information
Patent Citations
Three-dimensional scene rendering algorithm based on LOD (Levels of Detail) model and quadtree level structure
CN104751505A
Underground space three-dimensional visual management method and system
CN118674888A