A real-time sampling method and system for mass data visualization
By constructing a three-dimensional spatial hierarchical data structure and a screen space network, and combining octree indexing and view frustum culling, efficient real-time sampling in three-dimensional virtual space is achieved, solving the problem of low rendering performance for massive data and improving rendering efficiency and visual effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 上海漂视网络股份有限公司
- Filing Date
- 2026-05-12
- Publication Date
- 2026-07-21
AI Technical Summary
When displaying massive amounts of data in a three-dimensional virtual space, existing technologies suffer from high computational demands, low rendering performance, and difficulty in achieving efficient real-time processing.
A three-dimensional spatial hierarchical data structure is constructed. Combining an octree index and a screen space network, and through view frustum culling and sampling index allocation, coordinate transformation is performed on only a portion of the data to achieve efficient real-time sampling.
It reduces computational complexity, improves rendering efficiency and visual effects, ensures the real-time performance and smooth interaction of 3D scenes, and avoids visual chaos caused by excessive data point density.
Smart Images

Figure CN122176254B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology and relates to the visualization of massive spatial location data in three-dimensional scenes. Specifically, it relates to a real-time sampling method and system for visualization of massive data. Background Technology
[0002] In various application scenarios such as geographic information systems, virtual cities, 3D monitoring, and location-based services, it is necessary to mark and present massive amounts of relevant information at precise locations in 3D virtual space.
[0003] When the number of data points to be displayed is small, all data points are usually loaded and rendered directly on the screen. However, as the data scale increases dramatically, when the number of data points reaches thousands, tens of thousands, or even higher, rendering all data points to the screen without filtering presents several problems: First, a large amount of graphic or text information is densely stacked on the screen, making the information difficult to distinguish and severely impacting the visual experience and information acquisition efficiency. Second, when rendering a large number of information points, each data point needs to be converted from three-dimensional world coordinates to two-dimensional screen coordinates. This process involves massive matrix operations, which places a huge computational burden on the central processing unit (CPU) and graphics processing unit (GPU), while also consuming a large amount of memory resources, resulting in a significant drop in the rendering frame rate, which cannot meet the needs of real-time interaction.
[0004] To address the aforementioned issues, existing technologies typically employ data sampling methods, which involve selecting representative data from massive datasets for display to alleviate rendering pressure. However, in implementing this application, the inventors discovered that traditional sampling methods often still require traversing large amounts of data and performing complex spatial relationship judgments and coordinate conversions. When the data volume is extremely large, the time consumption of the sampling algorithm remains significant, making it difficult to achieve efficient real-time processing.
[0005] Therefore, how to achieve efficient real-time sampling and smooth visual presentation with extremely low computational cost in scenarios with large amounts of data is a technical challenge that urgently needs to be solved in this field. Summary of the Invention
[0006] To address the aforementioned problems in the prior art, namely the high computational load and low rendering performance when displaying massive spatial data, the first aspect of this application proposes a real-time sampling method for massive data visualization, the method comprising the following steps:
[0007] Based on the spatial distribution of massive location data, a three-dimensional spatial hierarchical data structure is constructed, and the screen space network is divided based on the parameters of the current display interface.
[0008] In each frame update, nodes of the three-dimensional spatial hierarchical data structure are removed according to the camera's view frustum parameters to obtain the set of nodes within the view frustum;
[0009] Establish the mapping relationship between the cells of the screen space network and each node in the node set;
[0010] Based on a preset limit for simultaneous display, sampling metrics are assigned to each cell of the screen space network;
[0011] Based on the mapping relationship, only the location data corresponding to the number of sampling indicators allocated to each cell is extracted from the nodes associated with each cell as the data to be displayed in the current frame, and only the coordinate transformation is performed on the data to be displayed in the current frame for display.
[0012] In some preferred embodiments, the three-dimensional spatial hierarchical data structure is an octree index, and the construction of the three-dimensional spatial hierarchical data structure specifically includes:
[0013] Using the minimum axis-aligned bounding box of the location data as the root node, recursively subdivide the nodes whose data volume exceeds the preset capacity limit into eight equal parts until the data volume of all leaf nodes does not exceed the capacity limit.
[0014] The value of the preset capacity limit is determined based on the balance requirements of memory usage, query speed and sampling accuracy of the octree index.
[0015] In some preferred embodiments, the nodes of the three-dimensional spatial hierarchical data structure are removed, specifically including:
[0016] Obtain the camera frustum parameters of the display terminal;
[0017] Determine whether the bounding box of the parent node in the three-dimensional spatial hierarchical data structure intersects with or is contained within the view frustum. If neither condition is met, then remove the parent node and all its child nodes.
[0018] Otherwise, continue to recursively check its child nodes, and synchronously calculate and cache the screen area and visibility status of the node to avoid repeatedly checking the visibility or calculating the screen area of the node in the same frame.
[0019] In some preferred embodiments, a mapping relationship is established between each node in the node set and a cell in the screen space network, specifically as follows:
[0020] The projected position of each node in the set of computing nodes in screen space;
[0021] Traverse each cell in the screen space network and determine a matching node for each cell based on the principle of minimizing the Euclidean distance between the center of each cell and the projection position;
[0022] This allows multiple different cells to match the same node.
[0023] In some preferred embodiments, coordinate transformation is performed only on the data to be displayed in the current frame for display purposes, specifically as follows:
[0024] In the three-dimensional spatial hierarchical data structure, only nodes that are determined to be located within the view frustum and matched by at least one cell of the screen space network are selected as valid data source nodes.
[0025] For each valid data source node, a corresponding number of location data points are randomly selected from that node based on the sum of the sampling indicators assigned to all cells associated with that node.
[0026] All selected position data points undergo a 3D to screen space coordinate transformation, which is then displayed as the final sampling result. The total number of position data points undergoing coordinate transformation within a single frame is constrained to the upper limit of simultaneous screen display.
[0027] A second aspect of this application proposes a real-time sampling system for visualization of massive amounts of data, comprising:
[0028] The index and grid construction module is configured to construct a three-dimensional spatial hierarchical data structure based on the spatial distribution of massive location data, and to divide the screen space network based on the parameters of the current display interface.
[0029] The view frustum processing module is configured to remove nodes from the three-dimensional spatial hierarchical data structure based on the camera view frustum parameters during each frame update, so as to obtain the set of nodes within the view frustum;
[0030] The node matching module is configured to establish a mapping relationship between cells of the screen space network and nodes within the node set;
[0031] The indicator allocation module is configured to allocate sampling indicators to each cell of the screen space network based on a preset upper limit for simultaneous display.
[0032] The data processing module is configured to extract the position data of the number of sampling indicators corresponding to the cell from the nodes associated with each cell according to the mapping relationship, and to perform coordinate transformation only on the data to be displayed in the current frame for display.
[0033] Compared with the prior art, the technical solutions in the embodiments provided in this application have at least the following beneficial effects:
[0034] 1) Through a unique dual-screening mechanism (spatial index culling + screen space sampling index allocation), the sampling process is pushed down to the spatial node level, and the sampling index allocation is driven by the screen space network. This achieves complete decoupling of computational complexity and the scale of the original data. The number of data points that need to be transformed from 3D to 2D coordinates is strictly constrained from the massive data (potentially tens of thousands) within the view frustum to a preset upper limit for simultaneous display (usually in the hundreds). This improves computational and rendering efficiency in the context of massive data, providing a definite performance guarantee for real-time interaction in ultra-large-scale mixed reality (MR) and digital twin scenarios.
[0035] 2) By combining octree spatial indexing, parent frustum culling, and screen space-based secondary sampling strategy, the data filtering work for each frame can be completed with extremely high efficiency. The time consumed in a single sampling process is significantly reduced, ensuring that the 3D scene can maintain a high refresh rate, guaranteeing the real-time performance of the application and the smoothness of the interaction, and achieving efficient real-time processing. At the same time, the index structure reduces the time for data lookup and avoids unnecessary calculations and data traversal.
[0036] 3) By associating data sampling with the screen space network and the upper limit of the object pool, while ensuring that the data covers the main area of the screen, it effectively avoids visual confusion and occlusion caused by excessive data point density, resulting in a clearer and more beautiful visual presentation effect, and improving rendering efficiency and visual effect. Attached Figure Description
[0037] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0038] Figure 1 This is a flowchart of a real-time sampling method for visualization of massive data provided in one embodiment of this application;
[0039] Figure 2 This is a schematic diagram of the spatial distribution of nodes in a three-dimensional spatial hierarchical data structure provided in one embodiment of this application;
[0040] Figure 3 This is a schematic diagram of the logical structure of a three-dimensional spatial hierarchical data structure node provided in one embodiment of this application;
[0041] Figure 4 This is a schematic diagram of data indexed by an octree space according to an embodiment of this application, where the space is subdivided into subspaces to accommodate the data;
[0042] Figure 5 This is a schematic diagram of the structure of a computer system used to implement the methods, apparatus, and electronic devices of this application. Detailed Implementation
[0043] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0044] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0045] To address the problems of visual clutter and enormous computational overhead caused by the dense stacking of data points with precise 3D spatial locations when displaying massive amounts (e.g., tens of thousands, hundreds of thousands, or even more) of data points in a 3D scene, this application provides a real-time sampling method for massive data visualization. First, a 3D spatial hierarchical data structure is constructed based on the spatial distribution of the massive location data. Next, during the rendering of each frame, the data structure is rapidly culled according to the camera's view frustum to obtain a set of nodes within the view frustum. Then, the screen space is divided into a 2D network, and for each cell in the network, the nearest node is matched from the node set within the view frustum. Based on a preset limit for simultaneous screen display, sampling indicators are assigned to each cell using strategies such as random allocation. Finally, only the nodes matched by the cells that have obtained sampling indicators are used to extract the corresponding number of location data points, and only this extracted data is subjected to coordinate transformation and displayed.
[0046] To more clearly explain the real-time sampling method for massive data visualization in this application, the following will combine... Figure 1 The steps in the embodiments of this application are described in detail.
[0047] The first embodiment of this application provides a real-time sampling method for visualization of massive data, including steps S1 to S5, as follows: Figure 1 As shown, each step is described in detail below:
[0048] S1. Based on the spatial distribution of massive location data, construct a three-dimensional spatial hierarchical data structure, and divide the screen space network based on the parameters of the current display interface.
[0049] Preferably, the method further includes a preprocessing step:
[0050] The system loads location data and parses it into structured data. Simultaneously, it calculates and caches the overall minimum axis-aligned bounding box of the location data in one go, and stores the structured data in a contiguous memory array that supports direct access via indexes. This massive amount of acquired location data can be in formats such as JSON or XML; after loading, it is parsed into structured objects in memory.
[0051] Preferably, the three-dimensional spatial hierarchical data structure is an octree index, and the construction of the three-dimensional spatial hierarchical data structure specifically includes:
[0052] Using the minimum axis-aligned bounding box of the location data as the root node, recursively subdivide the nodes whose data volume exceeds the preset capacity limit into eight equal parts until the data volume of all leaf nodes does not exceed the capacity limit C (for example, C can be set to 50).
[0053] The value of the preset capacity limit is determined based on the balance requirements of memory usage, query speed and sampling accuracy of the octree index.
[0054] In this embodiment, while parsing the data, all data points are traversed, and the smallest axis-aligned bounding box (AABB) that can completely surround all data points is calculated and determined. This bounding box defines the total boundary of the entire three-dimensional data space.
[0055] More preferably, a three-dimensional spatial hierarchical data structure is constructed, such as... Figure 2 , 3 As shown, the method is as follows:
[0056] For the current node, determine the number of data points it contains. If the number of data points does not exceed the capacity limit C, then the node is marked as a leaf node and the recursion terminates.
[0057] If the data volume exceeds the capacity limit C, the node is considered a non-leaf node and needs to be further subdivided.
[0058] The bounding box space of the node is divided into two halves along the X, Y, and Z axes, thereby generating eight child nodes of equal volume (corresponding to left front top, right front top, left rear top, right rear top, left front bottom, right front bottom, left rear bottom, and right rear bottom, respectively).
[0059] All data points within the current node are assigned to their corresponding child nodes based on their three-dimensional coordinates.
[0060] Repeat the above judgment and subdivision process for each of the eight child nodes until the data volume contained in all the last nodes (i.e., leaf nodes) does not exceed the preset capacity limit C. At this point, an octree (such as...) capable of hierarchically organizing and indexing massive amounts of data in three-dimensional space is formed. Figure 4(As shown) the construction is complete.
[0061] In a specific implementation, the choice of the capacity limit C directly affects the depth of the octree, the total number of nodes (memory usage), and the final sampling accuracy. Under an idealized uniform data distribution, we can estimate its impact using the following formula:
[0062] The relationship between the number of leaf nodes and the depth h is as follows:
[0063] ;
[0064] Where h is the maximum depth of the tree (counting from 0, with the root being the 0th level), N is the total amount of data, and C is the upper limit of data capacity for a single node.
[0065] The total number of nodes depends on the number of levels; the node tree at level i is... The sum of the number of nodes across layers 0-h, and the relationship between the total number of nodes (Total Nodes) and the depth (h) are as follows:
[0066] ;
[0067] A smaller C value results in a larger h value and Total Nodes, increasing index memory usage but allowing for finer sampling (e.g., C=5 selects one node from five, while C=80 selects one node from 80). Conversely, a larger C value results in smaller memory usage but lower sampling precision. In practical applications, a balanced C value, such as 50, needs to be chosen based on hardware performance and business requirements.
[0068] The relationship between the number of node tree levels, the upper limit of data per node C, and the total data volume N (affecting memory usage and query speed) is shown in Table 1. The calculated level number is rounded up to obtain the final determined level number.
[0069] Table 1 Number of Node Tree Levels
[0070]
[0071] The relationship between the total number of nodes in the node tree and the upper limit of data per node C and the total amount of data N (affecting memory usage and query speed) is shown in Table 2.
[0072] Table 2 Total number of nodes in the node tree
[0073]
[0074] Preferably, the screen space network is a two-dimensional grid. In this embodiment, it is further preferred that the screen space network be divided based on the parameters of the current display interface, and the method is as follows:
[0075] Based on the screen resolution of the current display interface, the smaller of the screen width and height is used as the reference side length, and the cell size is calculated based on the reference side length, thereby dividing the screen space into a preset number of cells to form a screen space network.
[0076] More preferably, the cell size is calculated based on the reference side length, and the method is as follows:
[0077] Based on the desired grid density (e.g., predefined as dividing the grid into 10 cells along the shorter side), the actual side length of each cell is obtained by dividing the baseline side length by the desired number.
[0078] Divide the screen width and screen height by the calculated cell side length, and round up to determine the number of columns and rows of the two-dimensional grid.
[0079] Furthermore, it monitors changes in screen or window resolution, and immediately recalculates and initializes the screen space index structure once a change occurs to ensure that it always matches the size of the display area.
[0080] More preferably, to efficiently reuse UI (graphical interface) objects and strictly control the number displayed on the same screen, a specified number of object arrays are created to form an object pool. The size of this pool is the upper limit for displaying on the same screen (e.g., 100). During rendering, UI objects are directly retrieved from the pool to display data, and returned after use, avoiding the performance overhead caused by frequently creating and destroying objects.
[0081] After the initialization preparation phase is completed, it prepares for efficient sampling of each subsequent frame and enters the real-time rendering loop, repeatedly executing the frame update phase.
[0082] The three-dimensional spatial hierarchical data structure constructed in this application has dynamic scalability. In dynamic data flow scenarios, when a new sample point enters or an old sample point becomes invalid, the system only needs to incrementally update the affected leaf nodes based on their three-dimensional coordinates, without needing to reconstruct the entire index tree.
[0083] Furthermore, the sampling logic of this embodiment can be combined with multi-scale (LOD) display requirements. In the distant view of the camera, nodes with shallower depth (larger bounding boxes) can be selected for mapping to achieve rapid depiction of macroscopic distribution; in the close view, they are mapped to leaf nodes with deeper depth to show detailed distribution. In addition, the sampling process is not limited to random extraction. In massive data containing attribute weights (such as wind speed levels at meteorological monitoring points, heat values of traffic flow, etc.), this method can perform weighted sampling according to the weight of each point to ensure that, under the constraint of the upper limit of display on the same screen, the most representative feature points are retained first.
[0084] S2. In each frame update, nodes of the three-dimensional spatial hierarchical data structure are removed according to the camera's view frustum parameters to obtain the set of nodes within the view frustum.
[0085] In each frame refresh cycle of a 3D rendering application, in order to determine which data needs to be displayed, a frustum is formed in 3D space based on parameters such as the current virtual camera's position, orientation, and field of view.
[0086] Preferably, nodes in the three-dimensional spatial hierarchical data structure are culled. In this embodiment, a hierarchical culling strategy is adopted, specifically including:
[0087] Obtain the camera frustum parameters for the current frame on the display terminal;
[0088] Determine whether the bounding box of a node intersects with or is contained within the view frustum. If neither condition is met, then remove the node and all its child nodes.
[0089] Otherwise, continue to recursively check its child nodes, while simultaneously calculating and caching the screen area and visibility status of the node to avoid repeatedly checking the visibility or calculating the screen area of the node within the same frame.
[0090] Using the above method, all nodes whose bounding boxes intersect with the camera's view frustum are quickly selected, forming a set of nodes within the view frustum.
[0091] S3. Establish the mapping relationship between the cells of the screen space network and each node in the node set.
[0092] Preferably, the mapping relationship between each node in the node set and the cell of the screen space network is established, specifically as follows:
[0093] For each node in the set of nodes within the view frustum, calculate the projected position of its bounding box center point in the two-dimensional screen space after view and projection transformations.
[0094] For each cell in the screen space network, based on the two-dimensional coordinates of each cell, the Euclidean distances to the projection position are traversed, and a unique matching node is determined for each cell based on the principle of minimizing the Euclidean distance.
[0095] Once the mapping relationship is established, each screen cell corresponds to the nearest octree node that is within the field of view. It's worth noting that multiple different cells are allowed to match the same node.
[0096] S4. Based on the preset upper limit of simultaneous display, allocate sampling indicators to each cell of the screen space network (i.e., how many data points are allowed to be extracted from each cell).
[0097] Preferably, the allocation of sampling metrics to the cells of the screen space network specifically involves:
[0098] If the total number of cells in the screen space network is greater than the upper limit of simultaneous display, then cells equal to the upper limit of simultaneous display are randomly selected from all cells, and a sampling index is assigned to each selected cell.
[0099] If the total number of cells is not greater than the upper limit of simultaneous display, then a sampling index is first assigned to each cell, and the remaining index obtained by subtracting the total number of cells from the upper limit of simultaneous display is randomly assigned to each cell in the screen space network. The total number of sampling indexes assigned to any cell is not limited.
[0100] In one specific implementation, sampling metrics are assigned to the cells. For example, there are 160 cells, but the upper limit is 100. From these 160 cells, 100 cells are randomly selected, and one sampling metric is assigned to each selected cell. The remaining 60 unselected cells are not assigned any metrics.
[0101] In one specific implementation, sampling metrics are assigned to the cells. For example, there are 80 cells, with a maximum of 100. First, one basic sampling metric is assigned to each of these 80 cells. Then, the remaining 20 metrics are randomly assigned to these 80 cells. Ultimately, some cells may have multiple metrics, while others may have only one.
[0102] More preferably, the upper limit of simultaneous display is determined by the size of the object pool used for cyclically reusing interface display objects. For example, if the object pool size is 100, then a maximum of 100 data points can be displayed simultaneously.
[0103] S5. Based on the mapping relationship, extract the position data corresponding to the number of sampling indicators allocated to each cell from the nodes associated with each cell as the data to be displayed in the current frame, and perform coordinate transformation only on the data to be displayed in the current frame for display.
[0104] Preferably, coordinate transformation is performed only on the data to be displayed in the current frame for display purposes, specifically as follows:
[0105] In the three-dimensional spatial hierarchical data structure, only nodes that are determined to be located within the view frustum and matched by at least one cell of the screen space network are selected as valid data source nodes.
[0106] For each valid data source node, based on the sum of the sampling indicators assigned to all cells associated with that node, the total number of data points to be extracted from that node is obtained, and a corresponding number of location data points are randomly selected from that node.
[0107] All selected position data points undergo a 3D to screen space coordinate transformation, which is then displayed as the final sampling result. The total number of position data points undergoing coordinate transformation within a single frame is constrained to the upper limit of simultaneous screen display.
[0108] More preferably, based on the sampling indicators of each cell, the total amount of data to be extracted from each matched node is calculated, and a corresponding amount of position data is randomly extracted from each node to form the data to be displayed in the current frame. Coordinate transformation is performed only on the data to be displayed in the current frame for final display. For example, if node N is matched by both cell A (assigned 1 indicator) and cell B (assigned 2 indicators), the system calculates the total extraction amount for node N to be 3, and then randomly selects 3 data points from node N at once. After summing the data points from all valid data source nodes, the final set of data to be displayed in the current frame is formed, and the total number of data points in this set does not exceed the upper limit for simultaneous display.
[0109] More preferably, only the data points in the final set undergo a complete transformation calculation from 3D world coordinates to 2D screen coordinates, and the result is passed to the UI object in the object pool for rendering and display. For the tens of thousands of other data points within the view frustum, no coordinate transformation calculation is performed. Through these steps, the computational load of coordinate transformation is changed from being related to the "total number of nodes within the view frustum" to being related to the "single batch extraction of each sampled node," and ultimately bound to a controllable upper limit for simultaneous display, thereby achieving extreme sampling efficiency and smooth rendering performance in the context of massive amounts of data.
[0110] A second embodiment of this application proposes a real-time sampling system for visualization of massive amounts of data, comprising:
[0111] The index and grid construction module is configured to construct a three-dimensional spatial hierarchical data structure based on the spatial distribution of massive location data, and to divide the screen space network based on the parameters of the current display interface.
[0112] The view frustum processing module is configured to remove nodes from the three-dimensional spatial hierarchical data structure based on the camera view frustum parameters during each frame update, so as to obtain the set of nodes within the view frustum;
[0113] The node matching module is configured to establish a mapping relationship between cells of the screen space network and nodes within the node set;
[0114] The indicator allocation module is configured to allocate sampling indicators to each cell of the screen space network based on a preset upper limit for simultaneous display.
[0115] The data processing module is configured to extract the position data of the number of sampling indicators corresponding to the cell from the nodes associated with each cell according to the mapping relationship, and to perform coordinate transformation only on the data to be displayed in the current frame for display.
[0116] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process and related descriptions of the system described above can be found in the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0117] It should be noted that the real-time sampling system for massive data visualization provided in the above embodiments is only an example of the division of the above functional units. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of this application can be further decomposed or combined. For example, the modules in the above embodiments can be merged into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of this application are only for distinguishing the various modules or steps and are not considered as an improper limitation of this application.
[0118] A device according to a third embodiment of this application includes:
[0119] At least one processor;
[0120] and a memory communicatively connected to at least one of the processors;
[0121] The memory stores instructions that can be executed by the processor to implement the aforementioned real-time sampling method for visualization of massive amounts of data.
[0122] A computer-readable storage medium according to a fourth embodiment of this application stores computer instructions that are executed by a computer to implement the above-described real-time sampling method for visualization of massive data.
[0123] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process and related descriptions of the storage device and processing device described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0124] The following is for reference. Figure 5It shows a schematic diagram of the structure of a computer system for implementing the methods, apparatus, and electronic devices of this application. Figure 5 The server shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0125] like Figure 5 As shown, the computer system includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes based on programs stored in Read Only Memory (ROM) 502 or loaded from storage into Random Access Memory (RAM) 503. RAM 503 also stores various programs and data required for system operation. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An Input / Output (I / O) interface 505 is also connected to the bus 504.
[0126] The following components are connected to the input / output interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.
[0127] Specifically, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined in the methods of this application. It should be noted that the computer-readable medium described above in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0128] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0129] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0130] The terms “first”, “second”, etc., are used to distinguish similar objects, not to describe or indicate a specific order or sequence.
[0131] The term "comprising" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent in such process, method, article, or apparatus / device.
[0132] The technical solutions of this application have been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of this application is obviously not limited to these specific embodiments. Without departing from the principles of this application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of this application.
Claims
1. A real-time sampling method for visualization of massive amounts of data, characterized in that, Includes the following steps: Based on the spatial distribution of massive location data, a three-dimensional spatial hierarchical data structure is constructed, and the screen space network is divided based on the parameters of the current display interface. In each frame update, nodes of the three-dimensional spatial hierarchical data structure are removed according to the camera's view frustum parameters to obtain the set of nodes within the view frustum; Establish the mapping relationship between the cells of the screen space network and each node in the node set; Based on a preset limit for simultaneous display, sampling metrics are assigned to each cell of the screen space network; Based on the mapping relationship, only the position data of the number of sampling indicators assigned to each cell are extracted from the nodes associated with each cell as the data to be displayed in the current frame, and only the coordinate transformation is performed on the data to be displayed in the current frame for display.
2. The real-time sampling method for visualization of massive data according to claim 1, characterized in that, The method further includes a preprocessing step: The location data is loaded and parsed into structured data. At the same time, the overall minimum axis-aligned bounding box of the location data is calculated and cached at once, and the structured data is stored in a contiguous memory array that can be directly accessed by subscript.
3. A real-time sampling method for visualization of massive data according to claim 1 or 2, characterized in that, The three-dimensional spatial hierarchical data structure is an octree index. The construction of the three-dimensional spatial hierarchical data structure specifically includes: Using the minimum axis-aligned bounding box of the location data as the root node, recursively subdivide the nodes whose data volume exceeds the preset capacity limit into eight equal parts until the data volume of all leaf nodes does not exceed the capacity limit. The value of the preset capacity limit is determined based on the balance requirements of memory usage, query speed and sampling accuracy of the octree index.
4. The real-time sampling method for visualization of massive data according to claim 1, characterized in that, The nodes of the three-dimensional spatial hierarchical data structure are removed, specifically including: Obtain the camera frustum parameters of the display terminal; Determine whether the bounding box of the parent node in the three-dimensional spatial hierarchical data structure intersects with or is contained within the view frustum. If neither condition is met, then remove the parent node and all its child nodes. Otherwise, continue to recursively check its child nodes, and synchronously calculate and cache the screen area and visibility status of the node to avoid repeatedly checking the visibility or calculating the screen area of the node in the same frame.
5. A real-time sampling method for visualization of massive data according to claim 1, characterized in that, Establish the mapping relationship between each node in the node set and the cell of the screen space network, specifically as follows: The projected position of each node in the set of computing nodes in screen space; Traverse each cell in the screen space network and determine a matching node for each cell based on the principle of minimizing the Euclidean distance between the center of each cell and the projection position; This allows multiple different cells to match the same node.
6. The real-time sampling method for visualization of massive data according to claim 1, characterized in that, The screen space network is a two-dimensional grid, and the screen space network is divided based on the parameters of the current display interface, including: Based on the screen resolution of the current display interface, the smaller of the screen width and height is used as the reference side length, and the cell size is calculated based on the reference side length, thereby dividing the screen space into a preset number of cells to form a screen space network.
7. A real-time sampling method for visualization of massive data according to claim 1, characterized in that, The allocation of sampling metrics to cells of the screen space network specifically involves: If the total number of cells in the screen space network is greater than the upper limit of simultaneous display, then cells equal to the upper limit of simultaneous display are randomly selected from all cells, and a sampling index is assigned to each selected cell. If the total number of cells is not greater than the upper limit of simultaneous display, then a sampling index is first assigned to each cell, and the remaining index obtained by subtracting the total number of cells from the upper limit of simultaneous display is randomly assigned to each cell in the screen space network. The total number of sampling indexes assigned to any cell is not limited.
8. A real-time sampling method for visualization of massive data according to claim 7, characterized in that, The upper limit for simultaneous display is determined by the size of the object pool used for cyclically reusing interface display objects.
9. A real-time sampling method for visualization of massive data according to claim 1, characterized in that, Coordinate transformation is performed only on the data to be displayed in the current frame for display purposes, specifically as follows: In the three-dimensional spatial hierarchical data structure, only nodes that are determined to be located within the view frustum and matched by at least one cell of the screen space network are selected as valid data source nodes. For each valid data source node, a corresponding number of location data points are randomly selected from that node based on the sum of the sampling indicators assigned to all cells associated with that node. Perform a 3D to screen space coordinate transformation on all selected location data points and display it as the final sampling result; The total number of position data points undergoing coordinate transformation within a single frame is constrained by the upper limit of simultaneous display.
10. A real-time sampling system for visualization of massive amounts of data, characterized in that, include: The index and grid construction module is configured to construct a three-dimensional spatial hierarchical data structure based on the spatial distribution of massive location data, and to divide the screen space network based on the parameters of the current display interface. The view frustum processing module is configured to remove nodes from the three-dimensional spatial hierarchical data structure based on the camera view frustum parameters during each frame update, so as to obtain the set of nodes within the view frustum; The node matching module is configured to establish a mapping relationship between cells of the screen space network and nodes within the node set; The indicator allocation module is configured to allocate sampling indicators to each cell of the screen space network based on a preset upper limit for simultaneous display. The data processing module is configured to extract the position data of the number of sampling indicators corresponding to the cell from the nodes associated with each cell according to the mapping relationship, and to perform coordinate transformation only on the data to be displayed in the current frame for display.