A Multi-Scale Data Organization and Visualization Method for Provincial Forest Small Class Digital Twin Scenes Based on Quadtree Indexing

By standardizing global quadtree slicing and scheduling camera parameters, the problems of data redundancy and rendering stability in provincial forest digital twin scenarios were solved, enabling efficient multi-scale visualization and stable rendering of provincial forest scenarios.

CN123118927APending Publication Date: 2026-11-17RES INST OF FOREST RESOURCE INFORMATION TECHN CHINESE ACADEMY OF FORESTRY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611578134.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-13
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies struggle to simultaneously achieve macro-level browsing and detailed local segment display in provincial forest digital twin scenarios, resulting in large data loading volumes, high client memory consumption, and insufficient rendering stability, thus failing to achieve multi-scale visualization effects.

Method used

The system uses the global quadtree slicing standard to generate unique slice codes, batch reads small-scale vector data for tree simulation, determines storage levels based on geometric errors, obtains elevations by combining terrain slice interpolation, and stores and distributes slice data through binary serialization. The front end schedules rendering based on camera parameters and sets memory thresholds to eliminate slices.

Benefits of technology

It enables multi-scale and efficient visualization of provincial forest scenes, reduces data redundancy, improves rendering stability and network transmission efficiency, and adapts to browsing needs of different business requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123118927A_ABST
    Figure CN123118927A_ABST
Patent Text Reader

Abstract

This invention discloses a multi-scale data organization and visualization method for a provincial forest sub-compartment digital twin scene based on quadtree indexing, relating to the fields of geographic information systems and 3D visualization technology. The method includes: hierarchical management of massive sub-compartment data using global quadtree slicing specifications; simulation generation of individual trees based on sub-compartment attributes; and reduction of data redundancy through hierarchical filtering; obtaining tree elevations using centroid coordinate interpolation; distributing data on demand after binary serialization; and reducing transmission overhead with a memory eviction mechanism to ensure stable operation of both full-area browsing and local detail viewing of the provincial forest scene; generating unique slice codes using global quadtree slicing specifications; batch reading of sub-compartment data to simulate and obtain individual tree information; determining tree storage levels based on geometric errors; obtaining tree elevations through topographic slice centroid interpolation; binary serialization of tree information for database storage; service distribution of slices; front-end scheduling and rendering; and eviction of slices based on thresholds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of geographic information systems and 3D visualization technology, specifically to a method for organizing and visualizing multi-scale data of a provincial forest sub-class digital twin scene based on a quadtree index. Background Technology

[0002] Forest compartments are the basic units for forest resource surveys and management, recording core attributes such as forest location, area, tree species, canopy density, and tree height. They are crucial data sources for constructing provincial-scale digital twin forest scenes. With the development of 3D visualization and digital twin technologies, the demand for large-scale forest scene reconstruction is constantly increasing, requiring both macroscopic, comprehensive browsing and detailed display of local compartments within a large area. Provincial areas cover vast regions and contain a massive number of compartment units. Directly performing single-tree simulation rendering on all forest compartments would generate enormous spatial data. Traditional vector data storage and rendering methods are ill-suited to multi-scale browsing needs. How to efficiently organize massive amounts of forest simulation data and achieve smooth visualization of forest scenes at different browsing levels has become a practical problem that needs to be solved for the implementation of forest digital twins.

[0003] Existing 3D forest scene construction technologies mostly employ holistic modeling or fixed-resolution simulation, which has significant shortcomings when processing provincial forest stand data. Most solutions lack a quadtree multi-scale index adapted to the global geographic tiling system. Simulation results for individual trees are not graded or filtered, loading all tree data regardless of camera distance, resulting in large data loads, high client memory consumption, and potential lag when browsing large scenes. Some technologies only visualize stand vectors, lacking logic for simulating and generating individual tree locations, species, and sizes based on stand attributes, failing to recreate the true forest stand state. Other solutions use simplistic elevation sampling methods without interpolating centroid coordinates based on terrain tile triangles, resulting in poor tree-to-ground rendering. Furthermore, many systems lack binary serialization storage and tile-based distribution scheduling mechanisms, leading to high data transmission overhead, insufficient memory management, and inadequate rendering stability in large provincial scenes.

[0004] In summary, the construction of provincial forest digital twin scenarios faces real challenges in organizing and scheduling the massive amounts of individual tree data derived from small plots. Existing technologies struggle to simultaneously meet the dual needs of macroscopic browsing across the entire province and detailed display of local small plots; they either sacrifice detail to ensure browsing speed or retain all details, leading to excessive system load. Therefore, achieving effective multi-scale visualization requires combining global quadtree slicing standards with attribute-driven tree simulation, hierarchical tree storage, precise terrain sampling, and binary slice storage scheduling to promote the practical application of forest resource digital twins. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a method for multi-scale data organization and visualization of provincial forest sub-block digital twin scenes based on quadtree indexing. This method uses the global quadtree slicing standard to generate unique slice codes; batch reads sub-block vector data, simulates and generates individual tree information including tree species, location, and size, and incorporates it into the quadtree; determines the tree storage level based on geometric error; queries terrain slices from top to bottom and obtains tree elevations through centroid coordinate interpolation; serializes the tree information into binary format and stores it in the database, and distributes slice data by the service; the visualization end combines camera parameters to schedule slice rendering and sets memory thresholds to complete slice elimination, achieving efficient multi-scale visualization of provincial forest scenes.

[0006] To address the aforementioned technical problems, this invention provides the following technical solution: a method for multi-scale data organization and visualization of provincial forest sub-class digital twin scenarios based on quadtree indexing, the method comprising:

[0007] S1. Adopt the global quadtree slicing standard, take the latitude and longitude origin as the slicing origin, determine the slicing size according to the level, calculate the slicing block index according to latitude and longitude, and use the block index and level to form a unique code for the slicing.

[0008] S2. Based on the unique encoding of the slice, read the small class objects in batches from the small class vector data, initialize the quadtree, traverse each small class to perform tree simulation calculations, obtain the information of a single tree including tree species, location and size, and add the information of the single tree to the quadtree.

[0009] S3. Using the information of a single tree as input, calculate the geometric error and the minimum screening size of the block according to the slice level. Determine whether the size of each tree is smaller than the minimum screening size of the block at the current level. If the size of the tree is smaller than the minimum screening size of the block at the current level, store the tree in the next level sub-block until the storage level of the tree is determined. The storage level corresponds to the unique code of the slice.

[0010] S4. Sampling elevation from terrain slices based on tree latitude and longitude, searching for terrain slices containing latitude and longitude from the highest level of terrain, parsing the triangular data of terrain slices, obtaining tree elevation values ​​through interpolation of the centroid coordinate system, and associating tree elevation values ​​with individual tree information.

[0011] S5. Using storage level and tree elevation values ​​as serialization input, the tree information in the quadtree node is serialized according to the binary protocol and stored in the database. The service distributes slice data to the visualization end according to the slice index. The visualization end calculates the slice projection pixels according to the camera parameters, recursively schedules slices and creates rendering components, and discards slices according to the memory threshold.

[0012] Furthermore, the specific implementation method of the global quadtree slicing specification is as follows: the slicing origin is set to longitude -180° and latitude -90°, the slice size varies with the level, the level starts from 0 and increases, and the slices of each level have the same coverage in the longitude and latitude directions; assuming For the current slice level, Size of the slice at the current level. Longitude Latitude For longitude direction block index, Let the latitude direction block index be used; then the formulas for calculating the slice size, longitude direction block index, and latitude direction block index are: , , Where 180 represents half of the total longitude range; 90 represents half of the total latitude range; and 2 represents the quadtree splitting factor. The value starts from 0. When the value is 0, the slice size is 180. For every 1 increase, the slice size is halved; The value range is -180≤ <180; The value range is -90≤ <90; and Take the integer part as the block index; , and The segments are combined into triplets and used as the unique encoding of the slice. Slices at different levels form a quadtree structure, with one node of the parent slice corresponding to four child slice nodes.

[0013] Furthermore, the batch reading method for small-class vector data is as follows: 1000 small-class objects are read from the small-class vector data file each time. When no small-class objects are read or the end of the file is reached, it is determined that all small-class objects have been processed. When the reading is successful, a quadtree object is initialized, and each small-class object in the current batch is traversed. Tree simulation calculations are performed on each small-class object. The total number of trees in the small-class area calculated by the tree simulation is obtained through... Determined, where N is the total number of plants in the small class; S represents the number of trees per hectare in the sub-compartment; S represents the area of ​​the sub-compartment in hectares; when a sub-compartment object lacks necessary attributes, has an area of ​​zero, or the tree simulation calculation is abnormal, the tree simulation calculation is determined to have failed. When the tree simulation calculation fails, the corresponding sub-compartment object is skipped and the next sub-compartment object is traversed; when the tree simulation calculation is successful, an array of individual tree information for the corresponding sub-compartment object is obtained. The array of individual tree information contains the tree species, location, and size of each tree. Each tree in the array of individual tree information is traversed and the tree information is added to the quadtree object.

[0014] Furthermore, the location calculation method for tree simulation is as follows: the average spacing between trees is calculated based on the number of trees per hectare of the small plot, and the number of trees per square kilometer is... The number of rows is The line spacing is Using the bounding box boundary of the small class object as the range, candidate points are generated in a step-by-step loop in the horizontal and vertical directions according to the line spacing D. A random position offset is added to each candidate point, and the random offset is in the range of [-0.5D, 0.5D]. It is determined whether the candidate point after adding the random offset is located within the polygonal area of ​​the small class object. Candidate points located within the polygonal area are retained as tree positions, and candidate points located outside the polygonal area are discarded.

[0015] Furthermore, the tree species generation method for tree simulation calculation is as follows: Based on the dominant tree species information of the small class objects, determine multiple tree species corresponding to the dominant tree species and the configuration ratio of each tree species; generate a random number within the interval [0,1) for each tree location; divide the interval [0,1) into multiple probability intervals according to the configuration ratio of multiple tree species, and determine the probability interval into which the random number falls; determine the tree species corresponding to the probability interval as the tree species of the tree location. When the dominant tree species are Chinese fir and Castanopsis fargesii, the configuration ratio of Chinese fir to Castanopsis fargesii is 2:1, and the probability of Chinese fir is... The probability of a red cone is When the random number is less than 2 / 3, the tree species is Chinese fir; when the random number is greater than or equal to 2 / 3, the tree species is Castanopsis fargesii.

[0016] Furthermore, the size calculation method for tree simulation is as follows: The horizontal proportion of the trees is calculated based on the canopy closure of the small group of trees, and the horizontal scaling ratio is... ; Calculate the tree's proportion in the height direction based on the average tree height of the small class objects, with a height scaling ratio of . ; Horizontal size of tree species model Tree species model height Read from a pre-made tree species model resource; row spacing D is calculated from the position; canopy closure. and average tree height Read the attribute information of the small class object; store the horizontal scaling ratio and the height scaling ratio as the size information of a single tree in the single tree information array.

[0017] Furthermore, the geometric error and the minimum block screening size are calculated as follows: Let... For the current slice level, For the Earth's radius, This represents the metric dimensions of the current level slice on the Earth's surface. The geometric error of the current level slice. If the minimum filter size for the current level slice is: , , ,in, Pi; The radius of the Earth; half the circumference of the Earth is equal to ; 512 is the pixel size determined by the visualization end scheduling rules; 10 is the screen projection pixel threshold; when the tree size is smaller than If a tree is not retained in the current level slice, it is added to the next level sub-block of the current level slice until a tree with a size greater than or equal to [the specified size] is found. The trees are stored in level slices.

[0018] Furthermore, the specific method for sampling elevation from terrain tiles is as follows: The metadata information of the terrain tiles is cached, including the range, level, and tile index of each level. When sampling elevation for any latitude and longitude point, the system traverses downwards from the highest level of the terrain. During each level traversal, the tile index corresponding to that level is calculated based on the latitude and longitude. The system checks if the corresponding terrain tile exists; if it does, the traversal stops and the terrain tile is returned; otherwise, the traversal continues to the next level. After obtaining the terrain tile, the tile data is parsed to obtain triangle data. All triangles are traversed, and the latitude and longitude are determined using the barycentric coordinate system to determine if they are inside the triangle. If they are inside, the elevation value corresponding to the latitude and longitude is interpolated on the triangle. The elevation value is then processed... Calculate, where, Let P be the elevation value; , , Let A, B, and C be the elevation values ​​of the three vertices A, B, and C of the triangle; β and γ are the coordinate coefficients of point P in the barycentric coordinate system, α = 1 - β - γ; the barycentric coordinate system is determined by representing any point in the plane containing the triangle as follows: The three weight coefficients satisfy α+β+γ=1, and the point is inside the triangle when α≥0, β≥0, and γ≥0.

[0019] Furthermore, the tree information within the quadtree node is serialized and stored in the database using a binary protocol as follows: the binary protocol includes 3D vector messages, individual tree messages, tree species list messages, plot annotation messages, place name points messages, and slice messages; slice messages contain tree lists separated by tree species, plot annotation lists, place name point lists, minimum elevation, and maximum elevation; the database uses an SQLite database, and the database tables contain level fields, longitude direction block index fields, latitude direction block index fields, minimum elevation fields, maximum elevation fields, and binary data fields; the HTTP service provides top-level slice index interfaces and slice data interfaces, and the visualization end calculates the slice projection pixels based on camera parameters, and the slice projection pixels are transmitted through... Calculate, where, For slice projection pixels; World dimensions of the slice bounding box in the vertical direction; For screen vertical resolution; The distance from the camera to the center of the slice bounding box; Define the camera's vertical field of view; when the slice's projected pixels are greater than 512, recursively determine the sub-slices; when the projected pixels are less than or equal to 512, load the current slice; for each slice, set it to visible when the rendering resource has been created; send an HTTP request when slice data has not been requested; skip when the request is in progress; create an instantiated rendering component when the request succeeds; retry once when the request fails; count the memory of all slices; when it exceeds 128MB, evict the least used slice and destroy the component and sub-slices.

[0020] Compared with existing technologies, this method for multi-scale data organization and visualization of provincial forest sub-class digital twin scenarios based on quadtree indexing has the following advantages:

[0021] I. This invention constructs unique geographic tile codes using the global quadtree slicing standard, and completes single-tree simulation calculations using a batch processing mode for small-block data. Tree objects are assigned to corresponding tile levels according to scale characteristics, achieving hierarchical organization and management of massive forest small-block data across a province. Based on the attributes of the small-block itself, it simulates and generates tree location, species, and size, directly driving forest stand scene construction from business survey data. This eliminates the need for manual creation of individual tree models, enabling rapid generation of large-area forest scene content. Tree objects are hierarchically filtered according to geometric error judgment logic; smaller trees far from the observation viewpoint are assigned to higher-level tiles, while finer-level data is loaded when closer to the observation viewpoint. This avoids data redundancy caused by synchronous loading of all tree data, reduces backend data storage pressure, and lays the data foundation for multi-scale browsing on the front end.

[0022] Second, this invention finds corresponding terrain blocks from top to bottom based on terrain slices, obtains tree elevation information using centroid coordinate interpolation, and completes the matching of tree objects with terrain, improving the realism of 3D forest scene reconstruction. After serializing the tree information inside the quadtree according to the binary protocol, it is stored in the database. The service interface enables on-demand distribution of slice data. The front end combines camera-related parameters to complete slice scheduling and instantiation rendering, and a memory eviction mechanism manages the scale of memory usage. Only the slice content required by the current viewpoint is loaded, reducing the amount of data transmitted over the network. It maintains stable operation of the rendering end during large-scale provincial scene browsing, which can support browsing of large-scale forest scenes and also realize detailed display of local small areas, adapting to different business viewing needs in forest digital twin scenarios.

[0023] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination or study, or may be learned from the practice of the invention. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is the overall flowchart of this method;

[0026] Figure 2 This is a flowchart of the small-class tree simulation calculation sub-process of this method;

[0027] Figure 3 This is a flowchart of the terrain slice elevation sampling sub-process of this method. Detailed Implementation

[0028] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0029] Example 1

[0030] This embodiment is applied to the three-dimensional verification scenario after the annual update of provincial forest resources. It constructs a multi-scale digital twin scenario based on the vector data of forest plots within the province, supporting forest resource managers to browse and verify step by step from the macro scale to the micro scale of individual trees, and ensuring the spatial consistency and attribute accuracy of the forest resource data update results.

[0031] First, the global quadtree slicing specification is executed, setting the slicing origin to longitude -180° and latitude -90°, and the slicing level... Starting from 0 and increasing incrementally, each level of tile maintains consistent coverage in both longitude and latitude directions. Execute the tile size calculation formula. Derive the slice size TS corresponding to each level, where 180 is half of the total longitude range; 2 is the quadtree splitting factor; when When the value is 0, the slice size is 180. For every increment of 1, the slice size is halved. (For any longitude) with latitude coordinates, where The value range is -180≤ <180, The value range is -90≤ <90; Execute the longitude direction block index calculation formula Latitude Direction Block Index Calculation Formula The longitude direction block index is calculated. With latitude direction block index After the calculation is completed, take and The integer part is used as the final block index. The longitude direction block index is then used. Latitude and Direction Block Index With slice level The slices are combined into triplets, serving as unique codes for the corresponding slices. Slices at different levels collectively form a quadtree structure, with each parent slice node corresponding to four child slice nodes, creating a hierarchical spatial indexing system. This slicing system covers the entire global latitude and longitude range, ensuring that provincial forest data falls entirely within its coverage. No additional spatial projection transformation is required; slice indexing can be performed directly using latitude and longitude, reducing accuracy loss due to coordinate transformation and guaranteeing the spatial registration accuracy between forest stand data and topographic data. The unified slice coding system provides a standardized spatial alignment benchmark for provincial forest stand data, eliminating spatial matching biases between different batches and sources of stand data. It provides a unified spatial framework for subsequent batch data spatial indexing and multi-scale scheduling, supporting rapid location and retrieval of cross-level data and adapting to the spatial coverage needs of large-scale provincial forest resource data.

[0032] Next, batch reading of small-class vector data and tree simulation calculations were performed. Small-class objects were read from the small-class vector data file according to a set batch size, with 1000 objects read per batch. The file reading progress was continuously checked during the reading process; if no small-class objects were read or the end of the file was reached, it was determined that all small-class objects had been processed. For each successfully read batch of small-class objects, a quadtree object was initialized, and all small-class objects in the current batch were traversed, with tree simulation calculations performed one by one. The tree simulation calculations sequentially completed the calculation of the total number of trees in the small-class, the calculation of tree location, the calculation of tree species generation, and the calculation of tree size. In the calculation of the total number of trees in the small-class, the formula for calculating the total number of trees in the small-class was executed. Derive the total number of trees N in the corresponding sub-compartment, and calculate the number of trees per hectare in the sub-compartment. The area S of each sub-class is used, where S is in hectares. When a sub-class object lacks necessary attributes, has an area of ​​zero, or encounters an anomaly in the tree simulation calculation, the corresponding sub-class object is skipped, and the process continues to the next sub-class object, avoiding interruption of the overall processing flow due to a single data anomaly. During batch processing, the quadtree objects in each batch are independent of each other. An anomaly in one batch will not affect the data results of other batches, facilitating the location and reprocessing of abnormal data and improving the fault tolerance of the overall data processing flow. In the tree location calculation stage, the conversion formula is executed first. Complete the conversion of the number of plants per square kilometer to obtain the number of plants per square kilometer. Then execute the row number calculation formula. Line spacing calculation formula The number of forest stand rows R and the row spacing D are obtained. Using the bounding box boundary of the sub-compartment object as the generation range, candidate points are generated iteratively in both the horizontal and vertical directions according to the row spacing D. A random position offset within a set range is added to each candidate point, controlled within the interval [-0.5D, 0.5D]. Then, it is determined whether the candidate point after adding the random offset is located inside the polygonal region of the sub-compartment object. Candidate points within the polygonal region are retained as tree locations, while those outside the region are discarded. This location generation method ensures consistency between forest stand density and sub-compartment attributes, and restores the irregular distribution characteristics of natural forest stands through random offsets, avoiding visual distortion caused by regular grid layouts. In the tree species generation calculation stage, the corresponding tree species set and the configuration ratio of each tree species are determined based on the dominant tree species information of the sub-compartment object. The dominant tree species correspond to Chinese fir and redbud, with a configuration ratio of 2:1; the probability of Chinese fir is... The probability of a red cone is For each tree location, a random number within the interval [0,1) is generated. This interval is then divided into corresponding probability intervals according to the tree species configuration ratio. The probability interval into which the random number falls is determined: if the random number is less than 2 / 3, the tree species is Chinese fir; if the random number is greater than or equal to 2 / 3, the tree species is Castanopsis fargesii. This probability allocation method automatically generates the tree species composition within the plot, accurately restoring the structural proportion of dominant tree species within the plot. This eliminates the need for manual tree species configuration for each tree, improving the simulation efficiency of large-scale plot data. In the tree size calculation stage, the horizontal scaling ratio calculation formula is executed. Height scaling ratio calculation formula Derive the corresponding scaling parameters; horizontal scaling ratio Combining small class occupancy Calculate the canopy cover of the stand with the row spacing D; height scaling ratio. Combined with the average tree height of the small class Calculate and reconstruct the vertical growth pattern of the forest stand. Horizontal size of the tree species model. Tree species model height All data is read from pre-made tree species model resources to ensure accurate representation of the morphological differences between different tree species. After calculation, an array of individual tree information containing tree species, location, and size is obtained. Each tree in the individual tree information array is traversed, and the tree information is added to the quadtree object corresponding to the current batch. The batch reading and batch processing mode controls the memory usage of a single batch, adapting to the batch processing needs of hundreds of thousands of small class data in a province, and avoiding memory overflow problems caused by loading the full data.

[0033] Next, the tree storage level is determined, using the generated individual tree information as input, combined with the current slice level. The calculations for slice metric dimensions, geometric errors, and minimum block size are performed sequentially. The slice metric dimension calculation formula is then executed. Derive the metric dimensions of the current level slice on the Earth's surface. During the calculation process, Pi The radius of the Earth is equal to half the circumference of the Earth. and The product of these factors, combined with the quadtree splitting factor and slice level, is used to complete the derivation. The geometric error calculation formula is then applied. Obtain the geometric error of the current level slice. Where 512 is the pixel size determined by the visualization end scheduling rules, and the geometric error corresponds to the actual ground size of a single pixel on the visualization end under the current level slice. The formula for calculating the minimum filter size of the execution block is as follows. The minimum selection size (MFS) for the current level slice is obtained, where 10 is the screen projection pixel threshold, and the minimum selection size is 10 times the geometric error, serving as the tree retention threshold for the current level slice. Each tree's size is compared to the current level slice's minimum selection size (MFS). If a tree's size is smaller than the MFS, it means the tree cannot be clearly displayed at the current level slice's visualization resolution. The tree is then stored in the next level slice's sub-block. This process continues at the next level until a level slice with a tree size greater than or equal to the MFS is found, and the tree is stored in that level slice. Each tree is stored only within its matching corresponding level slice, avoiding data redundancy between slice levels. This also ensures that the tree density of each level slice matches the corresponding visualization resolution, preventing visual clutter and rendering performance degradation caused by excessively dense trees at long distances. Tree data at each level of slice complement each other. Higher-level slices retain larger trees, while lower-level slices supplement smaller trees. This ensures both the accuracy of the overall forest stand outline from a distance and the integrity of individual tree details from a close-up perspective, achieving a dynamic balance between scene rendering accuracy and smooth operation.

[0034] Subsequently, terrain slice elevation sampling is performed. Metadata information for all terrain slices is pre-cached, including the spatial extent, level number, and slice index for each level. This allows for rapid target slice location without loading the full terrain data, improving elevation sampling efficiency. For the latitude and longitude points of each tree, the search proceeds downwards from the highest terrain level. At each level, the slice index corresponding to that level is calculated based on the tree's latitude and longitude. The existence of the corresponding terrain slice is checked; if it exists, the search stops and the slice is returned; otherwise, the search continues to the next level. This top-down search strategy prioritizes matching the most accurate available terrain slice, minimizing the amount of terrain data loaded while ensuring elevation sampling accuracy and improving the efficiency of calculating the elevation of a single tree. After obtaining the target terrain slice, the slice data is parsed to obtain the internal triangular mesh data. All triangles within the slice are traversed, and the presence of the tree's latitude and longitude points within a triangle is determined using the barycentric coordinate system. The formula is: In the barycentric coordinate system, any point in the plane containing a triangle can be represented as a weighted combination of three vertices, with weight coefficients α, β, and γ, satisfying α + β + γ = 1 and α = 1 - β - γ. When α ≥ 0, β ≥ 0, and γ ≥ 0, the point is determined to be inside the triangle. When the point is inside the triangle, the barycentric coordinate system interpolation formula is applied. The elevation value corresponding to this point was calculated. ;in , , Here, α represents the elevation values ​​of the three vertices A, B, and C of the triangle, and β and γ are the coordinate coefficients of the point in the barycentric coordinate system. The calculated tree elevation values ​​are directly associated with the corresponding individual tree information, serving as the vertical placement benchmark for the tree model. This ensures that the base of all trees accurately conforms to the terrain surface, adapting to the undulating changes in complex terrains such as mountains and hills, eliminating the visual deviation of trees floating or penetrating the terrain, and improving the spatial realism and data accuracy of the 3D scene.

[0035] Finally, data serialization and visualization rendering are performed. Tree storage level and tree elevation values ​​are used as serialization inputs, and a pre-defined binary protocol is employed to serialize the tree information within the quadtree nodes. The binary protocol includes 3D vector messages, individual tree messages, tree species list messages, plot annotation messages, place name points messages, and slice messages. Slice messages internally organize tree lists by tree species, and also include plot annotation lists, place name point lists, and the lowest and highest elevations within the slice area. The binary serialization format effectively compresses data volume, improving database read / write and network transmission efficiency. Serialized data is stored in an SQLite database. The database table has six fields: level, longitude block index, latitude block index, lowest elevation, highest elevation, and binary data. The level and block index fields allow for quick retrieval of corresponding slice data, supporting high-concurrency data query requests. An HTTP service is deployed on the backend, providing top-level slice index and slice data interfaces, allowing the visualization client to request corresponding slice data on demand without downloading the entire provincial forest data, reducing the initial loading burden on the frontend. During visualization runtime, the distance from the camera to the center of the slice bounding box is read in real time. Camera vertical field of view (FOV) and screen vertical resolution Parameters, formula for calculating slice projection pixels Calculate the screen projection pixel value (Pixel) of each slice at the current viewing distance, incorporating the world size of the slice bounding box in the vertical direction during the calculation. The derivation is completed by combining the field of view tangent. When the slice projection pixel is greater than 512, it means that the slice resolution is insufficient to present clear tree details at the current viewing distance, and the next level sub-slice is recursively scheduled; when the slice projection pixel is less than or equal to 512, the current level slice data is loaded directly. During the slice loading process, slices with created rendering resources are directly set to visible state; HTTP data requests are initiated for slices that have not initiated data requests; duplicate requests are skipped for slices in the request process to avoid redundant network overhead; data parsing is completed and instantiated rendering components are created for slices with successful requests; a retry operation is performed for slices with failed requests to avoid loading anomalies caused by temporary network fluctuations. Instantiated rendering components support efficient rendering of batch trees, further improving the rendering frame rate of large-scale forest scenes and ensuring the smoothness of interactive operations during the verification process. During operation, the total memory occupied by all loaded slices is continuously counted. When the memory usage exceeds the 128MB threshold, the least recently used slice is eliminated according to the least recently used principle, and the corresponding rendering components and sub-slice data are destroyed to release memory space. The entire multi-scale scheduling mechanism supports smooth browsing at any viewing distance during the provincial forest resource verification process, rapidly zooming in from the macroscopic forest stand distribution to the details of individual trees. Various interactive operations such as zooming, panning, and rotating respond stably, providing precise 3D digital twin scene support for the spatial verification and attribute validation of annual forest resource updates. Figure 1 As shown.

[0036] Example 2

[0037] This embodiment is applied to the forest fire risk early warning simulation scenario. Based on the vector data of forest plots, a multi-scale forest digital twin scenario is constructed to adapt to the switching needs of macro-scale situation display and micro-scale tree detail presentation during the fire risk simulation process, providing a three-dimensional spatial carrier for the assessment of the fire risk impact range and the simulation of the spread trend.

[0038] First, a global quadtree tiling system is constructed, using longitude -180° and latitude -90° as the tiling origin. Tile levels increase progressively from 0, with each level maintaining equal coverage in both longitude and latitude directions. The tile size calculation formula is used to calculate the spatial dimensions of each level; for each level increase, the tile size is halved. For any spatial coordinates, block indices in both directions are calculated using the longitude and latitude block index calculation formulas, and the integer part of the result is taken as the final block index value. The longitude and latitude block indices are combined with the tile level to form a triplet code, serving as the unique identifier for the corresponding tile. Tiers at each level are organized in a quadtree structure, with each parent tile node corresponding to four child tile nodes, forming a hierarchical spatial grid covering the entire globe. Different levels of slices naturally correspond to fire risk assessment units of different scales. High-level slices support the overall fire risk situation assessment across a province, while low-level slices support fire spread simulation at the small-scale scale. There is no need to additionally divide the fire risk assessment grid; the quadtree slicing system can be directly reused to complete the spatial mapping of multi-scale fire risk units. The unified quadtree slicing system provides standardized spatial computing units for fire risk simulation, ensuring accurate alignment between fire risk simulation data and the spatial grid, and providing a unified spatial benchmark for subsequent multi-scale data scheduling and fire risk situation display.

[0039] Next, batch processing of small-plot vector data and tree simulation construction were advanced. A batch reading method was used to extract small-plot objects from the small-plot vector data files, with 1000 small-plot objects extracted in each batch. The file reading progress was monitored in real time, and the overall processing flow was terminated when no valid small-plot objects were read or the end of the file was reached. After each batch of small-plot objects was read, an independent quadtree object was initialized. All small-plot objects in the current batch were traversed, and tree simulation calculations were performed sequentially. Tree simulation calculations included four stages: calculating the total number of trees in the small-plot, calculating tree location, calculating tree species generation, and calculating tree size. The calculation of the total number of trees in the small-plot was based on the formula for calculating the total number of trees in the small-plot, with calculation parameters taken from the number of trees per hectare and the area of ​​the small-plot. If a small-plot lacked necessary attributes, had an area value of zero, or encountered an anomaly in the simulation calculation, that small-plot object was skipped, and the next small-plot was processed, ensuring the stability of batch processing. Each batch of quadtree objects was independent, supporting parallel processing of multiple batches, further shortening the construction time of large-scale forest scenarios, improving the preparation efficiency of fire risk simulation scenarios, and ensuring the timeliness of fire risk early warning responses. In the tree location calculation stage, the number of trees per square kilometer is first converted to obtain the forest density parameters per unit area. Then, the number of rows and columns of the stand and the spacing between adjacent trees are derived by calculating the correspondence between the number of rows and the row spacing. Using the bounding box of the sub-compartment as the boundary, candidate points are generated by stepping horizontally and vertically according to the predetermined row spacing. A random position offset of a set interval is applied to each candidate point, with the offset controlled within a range of plus or minus half a row spacing. Subsequently, the positional relationship between the candidate points and the polygonal area of ​​the sub-compartment is verified. Candidate points falling inside the polygon are retained as the final tree locations, and invalid points outside the area are eliminated. This location generation method ensures that the stand density conforms to the sub-compartment attributes while restoring the random distribution characteristics of natural forest stands, providing a spatial distribution of combustibles that closely resembles reality for fire spread simulation. In the tree species generation calculation stage, the corresponding tree species combination and configuration ratio are determined based on the information of the dominant tree species of the sub-compartment. The dominant tree species correspond to Chinese fir and redbud, with a configuration ratio of 2:1. A random number between 0 and 1 is generated for each tree location. This range is then divided into two probability intervals based on the tree species configuration ratio. The tree species is matched according to the probability interval the random number falls into. This probabilistic tree species generation method efficiently recreates the tree species composition structure within the stand. The differences in combustion characteristics among different tree species provide a differentiated basis for combustible material parameters for fire risk simulation. In the tree size calculation stage, the corresponding calculations for horizontal and height scaling ratios are used to obtain scaling coefficients in two directions. The horizontal scaling coefficient is calculated based on the stand canopy closure and row spacing to match the actual canopy coverage level of the forest stand. The height scaling coefficient is calculated based on the average tree height of the stand to recreate the vertical growth dimension of the forest stand. The baseline horizontal dimensions and baseline heights of the tree species model are read from a pre-built tree species model resource library to ensure accurate differentiation of the morphological characteristics of different tree species.After all calculations are completed, an array of individual tree information containing tree species, location, and size information is generated. Each tree in the array is traversed, and its information is added to the current batch of quadtree objects. This batch processing mode effectively controls memory usage in a single stage, enabling efficient processing of massive amounts of small-scale data within a large-scale fire risk simulation area, and shortening the construction cycle of digital twin scenarios. Figure 2 As shown.

[0040] Next, the tree storage level classification and filtering are completed. Taking the information of a single tree as input, the corresponding calculations of the slice's metric size, geometric error, and minimum block selection size are performed sequentially based on the current slice level. The actual metric size of the ground surface corresponding to the current level slice is derived through the corresponding formula, and then the geometric error of the current level slice is calculated. The geometric error corresponds to the actual ground size represented by a single pixel on the visualization screen. Subsequently, the minimum block selection size of the current level slice is obtained, which is set to 10 times the geometric error as the tree admission threshold for the current level slice. The tree size is compared with the minimum block selection size one by one. When the tree size is smaller than the threshold, it means that the tree cannot be effectively identified at the current level of visualization resolution. The tree is then transferred to the next level sub-block of the current level slice, and the size comparison and level determination are continued until a slice level with a tree size greater than or equal to the threshold is found, and the tree is stored in the slice of that level. The hierarchical storage mechanism automatically matches forest data of corresponding precision to fire risk simulation scenarios at different viewing distances. At macroscopic viewing distances, only high-level slice data is loaded, reducing rendering load and ensuring a smooth display of the overall fire situation. At microscopic viewing distances, low-level fine data is automatically loaded, clearly presenting the spatial location and size of individual trees, supporting detailed simulation of fire spread down to the individual tree scale. The hierarchical storage mechanism avoids loading all fine data at once. During fire risk simulation, low-level fine data is automatically unloaded when the viewpoint is zoomed out, and the corresponding level of data is automatically loaded when the viewpoint is zoomed in, dynamically balancing rendering load and scene precision, achieving a balance between fire risk simulation efficiency and scene precision.

[0041] Subsequently, terrain elevation sampling and tree elevation association were performed. Metadata information for all terrain tiles was pre-cached, encompassing the spatial extent, level classification, and index information of each level. This allowed for rapid target tile location without loading the full terrain data, improving the response speed of elevation sampling. For each tree's latitude and longitude coordinates, the search proceeded level by level, starting from the highest level. At each level, the corresponding tile index was calculated based on the tree's latitude and longitude, and the existence of the corresponding terrain tile was verified. The search stopped once the highest-level terrain tile was found. The target terrain tile data was parsed to obtain internal triangular mesh data. All triangles within the tile were traversed, and the location of the tree's latitude and longitude points was determined using the barycentric coordinate system. After locating the triangle containing the point, the elevation value of that point was calculated through interpolation. The calculated elevation value was directly bound to the corresponding individual tree information, serving as the vertical placement reference for the tree model, ensuring the tree accurately conforms to the terrain surface and adapts to the undulating mountainous terrain. Precise elevation data provides fundamental support for calculating the slope and aspect factors influencing fire spread, making the fire spread simulation results more closely resemble the combustion propagation patterns under real terrain conditions, and ensuring the terrain adaptability of the fire spread simulation. Figure 3 As shown.

[0042] Finally, data serialization, storage, and dynamic scheduling for visualization are implemented. Tree storage levels and elevation values ​​are used as serialization inputs, and a pre-defined binary protocol is employed to serialize and encode tree information within quadtree nodes. The binary protocol includes 3D vector messages, individual tree messages, tree species list messages, plot annotation messages, place name point messages, and slice messages. Slice messages organize tree data by tree species and integrate plot annotation lists, place name point lists, and the lowest and highest elevations within the slice area. The binary encoding format significantly compresses data volume, improving data transmission and loading speed, and adapting to the rapid update requirements of dynamic data during fire hazard simulations. Serialized data is stored in an SQLite database. The database table has six fields: level, longitude block index, latitude block index, lowest elevation, highest elevation, and binary data. The level and block index allow for quick location of corresponding slice data, supporting high-frequency data query requests. An HTTP service is deployed on the backend, providing top-level slice index and slice data interfaces. The visualization client requests corresponding slice data as needed based on the current simulation perspective, avoiding startup delays caused by loading full data. During visualization runtime, the system acquires camera distance, vertical field of view, and screen vertical resolution parameters in real time, calculating the screen projection pixel value of each slice from the current viewpoint. When a slice's projected pixel value is greater than 512, it indicates insufficient precision for that slice from the current viewpoint, and the next level of sub-slices is recursively loaded. When a slice's projected pixel value is less than or equal to 512, the current level of slice data is loaded directly. During slice loading, slices with created rendering components are immediately switched to a visible state; slices that have not requested data immediately initiate HTTP requests; slices in the process of requesting data skip repetitive operations to reduce redundant network overhead; slices with successful requests complete parsing and generate instantiated rendering components; slices with failed requests undergo one retry to reduce the interference of network fluctuations on the simulation process. During runtime, the total memory usage of loaded slices is counted in real time. When memory usage exceeds the 128MB threshold, the least recently accessed slice is discarded according to the least recently used principle, and the corresponding rendering components and sub-slice data are destroyed to release memory space. The dynamic slice scheduling mechanism adapts to the frequent switching of viewpoints during fire hazard simulations, supporting simulation personnel to quickly jump between macroscopic situations and microscopic details, improving the efficiency and accuracy of fire hazard assessment. The entire multi-scale scheduling mechanism provides stable and smooth three-dimensional digital twin scene support for assessing the impact range of fire risks and simulating the spread path, ensuring the efficient conduct of fire risk early warning simulation.

[0043] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A method for multi-scale data organization and visualization of provincial forest sub-class digital twin scenarios based on quadtree indexing, characterized in that, The method includes: S1. Adopt the global quadtree slicing standard, take the latitude and longitude origin as the slicing origin, determine the slicing size according to the level, calculate the slicing block index according to latitude and longitude, and use the block index and level to form a unique code for the slicing. S2. Based on the unique encoding of the slice, read the small class objects in batches from the small class vector data, initialize the quadtree, traverse each small class to perform tree simulation calculations, obtain the information of a single tree including tree species, location and size, and add the information of the single tree to the quadtree. S3. Using the information of a single tree as input, calculate the geometric error and the minimum screening size of the block according to the slice level. Determine whether the size of each tree is smaller than the minimum screening size of the block at the current level. If the size of the tree is smaller than the minimum screening size of the block at the current level, store the tree in the next level sub-block until the storage level of the tree is determined. The storage level corresponds to the unique code of the slice. S4. Sampling elevation from terrain slices based on tree latitude and longitude, searching for terrain slices containing latitude and longitude from the highest level of terrain, parsing the triangular data of terrain slices, obtaining tree elevation values ​​through interpolation of the centroid coordinate system, and associating tree elevation values ​​with individual tree information. S5. Using storage level and tree elevation values ​​as serialization input, the tree information in the quadtree node is serialized according to the binary protocol and stored in the database. The service distributes slice data to the visualization end according to the slice index. The visualization end calculates the slice projection pixels according to the camera parameters, recursively schedules slices and creates rendering components, and discards slices according to the memory threshold.

2. The method for multi-scale data organization and visualization of a provincial forest sub-class digital twin scenario based on quadtree indexing as described in claim 1, characterized in that, In S1, the specific implementation method of the global quadtree slicing specification is as follows: the slicing origin is set to longitude -180° and latitude -90°, the slice size varies with the level, the level starts from 0 and increases, and the slices of each level have the same coverage in the longitude and latitude directions; let... For the current slice level, Size of the slice at the current level. Longitude Latitude For longitude direction block index, Let the latitude direction block index be used; then the formulas for calculating the slice size, longitude direction block index, and latitude direction block index are: , , Where 180 represents half of the total longitude range; 90 represents half of the total latitude range; and 2 represents the quadtree splitting factor. The value starts from 0. When the value is 0, the slice size is 180. For every 1 increase, the slice size is halved; The value range is -180≤ <180; The value range is -90≤ <90; and Take the integer part as the block index; , and The segments are combined into triplets and used as the unique encoding of the slice. Slices at different levels form a quadtree structure, with one node of the parent slice corresponding to four child slice nodes.

3. The method for multi-scale data organization and visualization of a provincial forest sub-class digital twin scenario based on quadtree indexing as described in claim 1, characterized in that, In S2, the batch reading method for small class vector data is as follows: 1000 small class objects are read from the small class vector data file each time. When no small class object is read or the end of the file is reached, it is determined that all small class objects have been processed. When the reading is successful, a quadtree object is initialized. Each small class object in the current batch is traversed, and tree simulation calculation is performed on each small class object. When a small class object lacks necessary attributes, has an area of ​​zero, or the tree simulation calculation is abnormal, the tree simulation calculation is determined to have failed. When the tree simulation calculation fails, the corresponding small class object is skipped and the next small class object is traversed. When the tree simulation calculation is successful, the single tree information array of the corresponding small class object is obtained. The single tree information array contains the tree species, location, and size of each tree. Each tree in the single tree information array is traversed, and the tree information is added to the quadtree object.

4. The method for multi-scale data organization and visualization of provincial forest sub-class digital twin scenarios based on quadtree indexing as described in claim 1, characterized in that, In S2, the location calculation method for tree simulation is as follows: the average spacing between trees is calculated based on the number of trees per hectare of the small class object; Using the bounding box boundary of the small class object as the range, candidate points are generated in a step-by-step loop in the horizontal and vertical directions according to the line spacing. A random position offset is added to each candidate point. It is determined whether the candidate point after adding the random offset is located within the polygonal area of ​​the small class object. Candidate points located within the polygonal area are retained as tree positions, and candidate points located outside the polygonal area are discarded.

5. A method for multi-scale data organization and visualization of a provincial forest sub-class digital twin scenario based on a quadtree index, as described in claim 1, is characterized in that... In S2, the tree species generation method for tree simulation calculation is as follows: based on the dominant tree species information of the small class object, determine multiple tree species corresponding to the dominant tree species and the configuration ratio of each tree species, generate a random number in the interval [0,1) for each tree position; divide the interval [0,1) into multiple probability intervals according to the configuration ratio of multiple tree species, and determine the probability interval in which the random number falls. The tree species corresponding to the probability interval are determined as the tree species at the tree location. When the dominant tree species are Chinese fir and Japanese red oak, the ratio of Chinese fir to Japanese red oak is 2:1, and the probability of Chinese fir is... The probability of a red cone is When the random number is less than 2 / 3, the tree species is Chinese fir; when the random number is greater than or equal to 2 / 3, the tree species is Castanopsis fargesii.

6. A method for multi-scale data organization and visualization of a provincial forest sub-class digital twin scenario based on a quadtree index, as described in claim 1, is characterized in that... In S2, the size calculation method for tree simulation is as follows: calculate the proportion of trees in the horizontal direction based on the canopy closure of the small group of objects; calculate the proportion of trees in the vertical direction based on the average tree height of the small group of objects; and store the horizontal scaling ratio and the vertical scaling ratio as the size information of a single tree in the single tree information array.

7. A method for multi-scale data organization and visualization of a provincial forest sub-class digital twin scenario based on a quadtree index, as described in claim 1, is characterized in that... In S3, the geometric error and minimum block screening size are calculated as follows: Let... For the current slice level, For the Earth's radius, This represents the metric dimensions of the current level slice on the Earth's surface. The geometric error of the current level slice. If the minimum filter size for the current level slice is: , , ,in, Pi; The radius of the Earth; half the circumference of the Earth is equal to ; 512 is the pixel size determined by the visualization end scheduling rules; 10 is the screen projection pixel threshold; when the tree size is smaller than If a tree is not retained in the current level slice, it is added to the next level sub-block of the current level slice until a tree with a size greater than or equal to [the specified size] is found. The trees are stored in level slices.

8. A method for multi-scale data organization and visualization of a provincial forest sub-class digital twin scenario based on a quadtree index, as described in claim 1, is characterized in that... In S4, the specific method for sampling elevation from terrain tiles is as follows: cache the metadata information of the terrain tiles, which includes the range, level, and tile index of each level of the terrain tile; When sampling elevation for any latitude and longitude point, the system iterates downwards from the highest terrain level. For each level, it calculates the corresponding slice index based on latitude and longitude, checks if the corresponding terrain slice exists, and stops iterating if it does, returning the slice; otherwise, it continues to the next level. After obtaining the terrain slices, it parses the slice data to obtain triangle data. It then iterates through all triangles, using the barycentric coordinate system to determine if the latitude and longitude are inside the triangle. If they are inside, it interpolates the latitude and longitude to obtain the corresponding elevation value. The elevation value is then processed... Calculate, where, Let P be the elevation value; , , Let A, B, and C be the elevation values ​​of the three vertices A, B, and C of the triangle; β and γ are the coordinate coefficients of point P in the barycentric coordinate system, α = 1 - β - γ; the barycentric coordinate system is determined by representing any point in the plane containing the triangle as follows: The three weight coefficients satisfy α+β+γ=1, and the point is inside the triangle when α≥0, β≥0, and γ≥0.

9. A method for multi-scale data organization and visualization of a provincial forest sub-class digital twin scenario based on a quadtree index, as described in claim 1, is characterized in that... In S5, the tree information within a quadtree node is serialized and stored in the database according to a binary protocol as follows: the binary protocol includes three-dimensional vector messages, single tree messages, tree species list messages, plot annotation messages, place name points messages, and slice messages; slice messages contain tree lists separated by tree species, plot annotation lists, place name point lists, minimum elevation, and maximum elevation. The database uses SQLite, and the database tables contain level fields, longitude direction block index fields, latitude direction block index fields, minimum elevation fields, maximum elevation fields, and binary data fields; The HTTP service provides a top-level slice index interface and a slice data interface, and the visualization end calculates the slice projection pixels based on camera parameters. When the projected pixel count of a slice is greater than 512, the sub-slices are recursively determined. When the projected pixel count is less than or equal to 512, the current slice is loaded. For each slice, it is set to visible when the rendering resource has been created. When slice data is not requested, an HTTP request is sent. When the request is in progress, it is skipped. When the request is successful, an instantiated rendering component is created. When the request fails, it is retried once. The memory of all slices is counted. When it exceeds 128MB, the least used slice is discarded and its components and sub-slices are destroyed.