Map hierarchy-based adaptive large-scale data aggregation method
By using an adaptive data aggregation method that integrates front-end and back-end collaboration, and dynamically adjusting grid granularity and aggregation strategies, the problem of balancing performance and accuracy in large-scale geospatial data processing is solved, achieving efficient and flexible data rendering effects.
Patent Information
- Application Number
- CN202510895054.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-31
AI Technical Summary
Existing data aggregation methods suffer from performance degradation due to insufficient front-end processing capabilities when handling large-scale geospatial data. Furthermore, back-end fixed grid aggregation cannot dynamically adapt to the user's view zoom level, resulting in over-aggregation at high levels and insufficient accuracy at low levels.
We adopt a map-level adaptive data aggregation method, which monitors user interaction in real time through a front-end and back-end collaboration mechanism, dynamically adjusts grid granularity and aggregation strategy, and combines a nonlinear grid granularity control model and a weighted average algorithm to achieve map-level adaptive data aggregation.
It effectively solves the problems of front-end performance bottlenecks and insufficient flexibility of fixed grid aggregation, and realizes a seamless scaling experience from global overview to local details, improving geospatial data rendering efficiency and user experience.
Smart Images

Figure CN120873047A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Geographic Information System (GIS) technology, and specifically to a method for large-scale data aggregation based on map hierarchy adaptive aggregation. Background Technology
[0002] With the rapid development of Geographic Information Systems (GIS) and Location Services (LBS), the demand for analysis and visualization of large-scale geospatial data is increasing. In fields such as map applications, transportation planning, and environmental monitoring, it is often necessary to process millions or even hundreds of millions of high-density data points. Data aggregation technology, as a key means to solve the problems of rendering and computational efficiency of high-density points, can merge adjacent data points into representative aggregated points, thereby reducing the amount of data and improving visualization performance. Currently, data aggregation technology has been widely applied in various geospatial analysis scenarios, but its implementation still has many limitations.
[0003] Existing aggregation methods are mainly divided into two categories: front-end aggregation and back-end fixed grid aggregation. Front-end aggregation relies on the client to directly process raw data. Although it offers high flexibility, it can lead to a sharp drop in browser performance and a deterioration in user experience when dealing with large amounts of data. Back-end fixed grid aggregation divides data into predefined grids, which can reduce the burden on the front-end, but it cannot dynamically adapt to the user's view scaling level, resulting in over-aggregation at high levels and insufficient accuracy at low levels. Summary of the Invention
[0004] To address the above technical problems, this invention provides a method for large-scale data aggregation based on map hierarchy adaptive aggregation.
[0005] The technical problem solved by this invention can be achieved by the following technical solutions:
[0006] A method for large-scale data aggregation based on map hierarchy includes:
[0007] Step S1: The front end monitors the user's map interaction operations in real time, including map movement and zooming;
[0008] Step S2: The front end obtains the latitude and longitude range and zoom level of the current device screen, and passes the latitude and longitude range and the zoom level as parameters to the back end;
[0009] Step S3: The backend queries the point data based on the latitude and longitude range and the scaling level, and determines whether the total amount of data exceeds a preset threshold; if the total amount of data exceeds the preset threshold, then proceed to step S4; otherwise, proceed to step S5.
[0010] Step S4: The backend performs server-side dynamic aggregation calculations based on the nonlinear grid granularity control model and returns the aggregation results to the frontend, then proceeds to step S6.
[0011] Step S5: The front end performs client-side aggregation calculations, then proceeds to step S6;
[0012] Step S6: The front end displays the aggregation results.
[0013] Preferably, step S4 includes:
[0014] Step S41: Divide the map into multiple grids based on the latitude and longitude information;
[0015] Step S42: Dynamically adjust the grid granularity according to the scaling level, and use a nonlinear grid granularity control model to allocate data points to the grid;
[0016] Step S43: Use the latitude and longitude of the center point of each grid as the initial aggregation point;
[0017] Step S44: Calculate the latitude and longitude distance between each data point in the grid and the initial aggregation point, and count the number of data points in the grid;
[0018] Step S45: Calculate the mean coordinates of all data points within the grid, which will be used as the location of the final aggregation point;
[0019] Step S46: Return the aggregation result to the front end.
[0020] Preferably, the formula for the nonlinear grid granularity control model in step S42 is:
[0021]
[0022] Where Φ is the reference particle size constant, z max Where z is the maximum scaling level of the system, k is the scaling level, and k is the density attenuation coefficient.
[0023] Preferably, the nonlinear grid granularity control model adjusts the baseline granularity constant Φ and the density decay coefficient k such that:
[0024] When the scaling level z is a high scaling level, the actual geographic accuracy corresponding to the grid granularity (z) is 0.1-5 meters;
[0025] When the scaling level z is a low scaling level, the actual geographic accuracy corresponding to the grid granularity (z) is 10-50 kilometers.
[0026] Preferably, in step S45, when calculating the coordinate mean, a weighted average algorithm is used, and the weights are dynamically adjusted according to the spatial density distribution of the data points.
[0027] Preferably, step S5 includes:
[0028] Step S51: The front end matches the corresponding clustering display strategy from the preset rules according to the scaling level.
[0029] Step S52: According to the clustering display strategy, configure the initial clustering radius parameters through the ArcGIS CSV layer clustering renderer and generate the initial clustering results;
[0030] Step S53: When the user zooms or moves the map, the ArcGIS CSV layer clustering renderer recalculates the aggregation state in real time based on the point density within the current view range, and dynamically updates the distribution and display of the aggregation clusters.
[0031] Preferably, in step S51, the clustering behavior is dynamically adjusted through a three-level strategy:
[0032] Basic strategy: Divide the map zoom levels into multiple intervals, and bind default clustering parameters to each interval;
[0033] Adaptive adjustment strategy: Within the scope of the basic strategy, fine-tune the aggregation granularity based on the real-time data density of the current view;
[0034] Degradation strategy: Under high-level or low-performance devices, ignore the basic strategy and the adaptive adjustment strategy, and force the low-precision aggregation mode to be enabled.
[0035] Preferably, in step S3, when the backend queries the location data, it prioritizes retrieving data within the latitude and longitude range from the R-tree index of the spatial database.
[0036] Preferably, the preset threshold is 20,000 data entries.
[0037] Preferably, the execution process of steps S4 and S5 is monitored in real time to assess system load and dynamically adjust the preset threshold, specifically including:
[0038] When client performance degrades, the threshold is automatically lowered to trigger backend aggregation earlier.
[0039] When the server load is too high, the threshold is automatically increased to increase the front-end aggregation ratio.
[0040] Beneficial Effects: By adopting the above technical solution, this invention achieves map-level adaptive data aggregation processing through a front-end and back-end collaborative dynamic aggregation mechanism. The back-end dynamically adjusts the grid granularity based on the view parameters transmitted from the front-end in real time, avoiding the performance bottleneck of the front-end processing massive amounts of data and solving the problems of insufficient accuracy and adaptability of fixed grid aggregation. In addition, the nonlinear grid granularity control model ensures a seamless scaling experience from global overview to local details, maintaining visualization rationality while reducing data transmission volume, and significantly improving the efficiency and user experience of large-scale geospatial data rendering. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the method steps of the present invention;
[0042] Figure 2 This is a flowchart of the method of the present invention;
[0043] Figure 3 This is a flowchart of method step S4 of the present invention;
[0044] Figure 4 This is a flowchart of step S5 of the method of the present invention. Detailed Implementation
[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0046] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0047] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.
[0048] Reference Figure 1 and Figure 2 This invention provides a method for adaptive large-scale data aggregation based on map hierarchy, comprising:
[0049] Step S1: The front end monitors the user's map interaction operations in real time, including map movement and zooming;
[0050] Step S2: The front end obtains the latitude and longitude range and zoom level of the current device screen, and passes the latitude and longitude range and the zoom level as parameters to the back end;
[0051] Step S3: The backend queries the point data based on the latitude and longitude range and the scaling level, and determines whether the total amount of data exceeds a preset threshold; if the total amount of data exceeds the preset threshold, then proceed to step S4; otherwise, proceed to step S5.
[0052] Step S4: The backend performs server-side dynamic aggregation calculations based on the nonlinear grid granularity control model and returns the aggregation results to the frontend, then proceeds to step S6.
[0053] Step S5: The front end performs client-side aggregation calculations, then proceeds to step S6;
[0054] Step S6: The front end displays the aggregation results.
[0055] Specifically, in order to address the issues of front-end performance bottlenecks and insufficient flexibility of fixed grid aggregation in large-scale geospatial data visualization, this invention effectively avoids the performance degradation problem of traditional methods when the amount of data surges by combining a front-end and back-end collaborative adaptive aggregation mechanism with nonlinear dynamic grid partitioning technology, while also solving the limitations of fixed grids in adapting to multiple scales.
[0056] More specifically, in this embodiment of the invention, the backend dynamically adjusts the grid granularity based on the view to ensure sufficient aggregation at high levels and preservation of details at low levels; the aggregation mode is intelligently switched by threshold judgment, realizing real-time and accurate visualization of hundreds of millions of data points at different scaling levels, taking into account both system performance and user experience.
[0057] In a preferred embodiment of the present invention, in step S3, when the backend queries the location data, it prioritizes retrieving data within the latitude and longitude range from the R-tree index of the spatial database.
[0058] Specifically, in this embodiment of the invention, the R-tree index is optimized using a four-layer hybrid index structure: the top layer establishes a coarse-grained index based on administrative regions (province / city level); the middle layer uses a standard R-tree structure to store geographic elements; the bottom layer combines grid spatial partitioning (Geohash encoding); and the innermost layer uses a B+ tree to store attribute data.
[0059] Furthermore, the spatial database query process implements the following optimization strategies:
[0060] 1. The dynamic query optimizer automatically selects the index path based on the size of the query range:
[0061] When the range is >100km 2 When the administrative region index is enabled; when the range is 1-100km 2 Enable R-tree indexing when the range is <1km; 2 Enable Geohash grid indexing at that time.
[0062] 2. Employ batch prefetching technology to preload surrounding area data while returning requested data;
[0063] 3. Establish a hot data caching mechanism to keep data in memory for frequently accessed areas (such as city centers).
[0064] As a preferred embodiment of the present invention, to address the problem of aggregation point offset caused by directly taking the coordinates of the grid center point in existing methods, a dynamic aggregation point calculation method is proposed. (Refer to...) Figure 3 Step S4 includes:
[0065] Step S41: Divide the map into multiple grids based on the latitude and longitude information;
[0066] Step S42: Dynamically adjust the grid granularity according to the scaling level, and use a nonlinear grid granularity control model to allocate data points to the grid;
[0067] Step S43: Use the latitude and longitude of the center point of each grid as the initial aggregation point;
[0068] Step S44: Calculate the latitude and longitude distance between each data point in the grid and the initial aggregation point, and count the number of data points in the grid;
[0069] Step S45: Calculate the mean coordinates of all data points within the grid, which will be used as the location of the final aggregation point;
[0070] Step S46: Return the aggregation result to the front end.
[0071] Specifically, in this embodiment of the invention, the formula for the nonlinear grid granularity control model in step S42 is:
[0072]
[0073] Where Φ is the reference particle size constant, z max Where z is the maximum scaling level of the system, k is the scaling level, and k is the density attenuation coefficient.
[0074] The nonlinear grid granularity control model adjusts the baseline granularity constant Φ and the density decay coefficient k to achieve the following:
[0075] When the scaling level z is a high scaling level, the actual geographic accuracy corresponding to the grid granularity (z) is 0.1-5 meters;
[0076] When the scaling level z is a low scaling level, the actual geographic accuracy corresponding to the grid granularity (z) is 10-50 kilometers.
[0077] More specifically, in this embodiment of the invention, the nonlinear grid granularity control model achieves optimal aggregation of map data at different scaling levels by dynamically adjusting the grid division accuracy. At high scaling levels (e.g., z=18), the model automatically adopts fine-grained grid division (0.1-5 meter accuracy) to ensure accurate positioning of fine geographic features; at low scaling levels (e.g., z=5), it switches to coarse-grained grid division (10-50 km accuracy), effectively reducing data density while maintaining regional distribution characteristics.
[0078] Furthermore, the dynamic aggregation point calculation method significantly improves aggregation accuracy through the following innovative design:
[0079] 1. A two-stage aggregation point calculation mechanism is adopted. First, the initial grid center point is used for rapid positioning, and then a weighted average calculation is performed based on the spatial distribution characteristics of the data points. Compared with traditional methods, the position accuracy is greatly improved.
[0080] 2. By introducing a density attenuation coefficient k, the grid partitioning strategy can be automatically adjusted according to the data density of different areas. The grid size can be automatically reduced in dense data areas (such as urban centers) and the grid size can be appropriately increased in sparse areas (such as suburbs).
[0081] 3. The reference granularity constant Φ supports dynamic configuration and can be flexibly adjusted according to the specific needs of different application scenarios (such as traffic monitoring, meteorological observation, etc.).
[0082] Taking the backend aggregation scenario of Example 1 as an example:
[0083] When displaying the distribution of fire hydrants throughout the city on a map, the sheer volume of data can cause significant lag if aggregated by the front end. However, the dynamic aggregation point calculation method described in this invention allows the back end to dynamically generate a grid based on the coordinates and hierarchy of the current view window. It then iterates through the coordinates of the data points of all fire hydrants in the city and assigns them to the nearest grid, calculates the number of points in each grid, and then calculates the average latitude and longitude of the points in each grid. Finally, it returns this aggregated data to the front end for display, effectively solving the performance bottleneck encountered by the front end during data aggregation and rendering. This fully demonstrates the efficiency and practicality of this method in complex real-world scenarios.
[0084] In a preferred embodiment of the present invention, when calculating the coordinate mean in step S45, a weighted average algorithm is used, and the weights are dynamically adjusted according to the spatial density distribution of the data points.
[0085] Specifically, in this embodiment of the invention, the weighted average algorithm is implemented as follows: For each data point within a grid, its spatial distance to the initial aggregation point is first calculated, and then weights are assigned based on the inverse distance weighting (IDW) principle, with data points closer to the initial aggregation point having greater weights. Simultaneously, a local density factor ρ is introduced to appropriately reduce the weights of data points in high-density areas, preventing dense point clusters from excessively influencing the aggregation point location.
[0086] As a preferred embodiment of the present invention, refer to Figure 4 Step S5 includes:
[0087] Step S51: The front end matches the corresponding clustering display strategy from the preset rules according to the scaling level.
[0088] Step S52: According to the clustering display strategy, configure the initial clustering radius parameters through the ArcGIS CSV layer clustering renderer (such as FeatureReductionCluster) and generate the initial clustering results;
[0089] Step S53: When the user zooms or moves the map, the ArcGIS CSV layer clustering renderer recalculates the aggregation state in real time based on the point density within the current view range, and dynamically updates the distribution and display of the aggregation clusters.
[0090] Among them, the ArcGIS CSV Layer Cluster Renderer is a client-side aggregation and visualization tool provided by the Esri ArcGIS platform specifically for CSV format spatial data. Its core function is to aggregate raw point data in CSV format into visual clusters in real time to optimize the rendering performance of large-scale point data.
[0091] Specifically, in this embodiment of the invention, in step S51, the clustering behavior is dynamically adjusted through a three-level strategy:
[0092] Basic strategy: Divide the map zoom levels into multiple intervals, and bind default clustering parameters to each interval;
[0093] Adaptive adjustment strategy: Within the scope of the basic strategy, fine-tune the aggregation granularity based on the real-time data density of the current view;
[0094] Degradation strategy: Under high-level or low-performance devices, ignore the basic strategy and the adaptive adjustment strategy, and force the low-precision aggregation mode to be enabled.
[0095] More specifically, in this embodiment of the invention, the ArcGIS clustering renderer achieves intelligent aggregation display through the following innovative mechanism:
[0096] 1. Dynamic clustering radius adjustment technique:
[0097] 1.1 Automatically adjust clustering calculation frequency based on device performance score (CPU / GPU capability);
[0098] 1.2. An adaptive window algorithm is adopted to temporarily increase the clustering radius during rapid translation and restore fine calculation when stationary.
[0099] 1.3 Built-in multi-level caching system to pre-calculate and store the aggregation results of adjacent levels.
[0100] 2. Intelligent symbolic rendering scheme:
[0101] 2.1 Automatically classify clusters based on the number of points they contain (1-10, 10-100, 100+, etc.);
[0102] 2.2 Configure differentiated visual styles (size / color / transparency) for different levels of aggregated clusters;
[0103] 2.3 Supports dynamic label display, showing detailed statistics of aggregated clusters when the mouse hovers over them.
[0104] 3. Real-time performance optimization engine:
[0105] 3.1. Employ Web Worker multi-threaded computing to avoid UI lag;
[0106] 3.2 Implement incremental data updates, re-aggregating only the changed areas;
[0107] 3.3 Automatically enable simplified computing mode on mobile devices to ensure smooth 60fps interaction.
[0108] Taking the front-end aggregation scenario in Example 2 as an example:
[0109] When displaying the distribution of hospitals in the city on a map, since the amount of hospital data is relatively small (usually a few hundred to a few thousand records), if the data is aggregated by the backend, it will consume additional server computing power and network bandwidth, resulting in improper use of resources. At this point, the front-end can fully undertake the data aggregation and rendering tasks through the dynamic aggregation point calculation method described in this embodiment of the invention: the front-end matches the clustering strategy of "low zoom level, small data volume" from the preset rules according to the current map zoom level (e.g., z=12) (e.g., enabling lightweight clustering, setting a larger aggregation radius to reduce the number of clusters); the hospital data points are loaded through ArcGIS's FeatureReductionCluster renderer, and an initial aggregation result is generated by setting a fixed clustering radius based on pixels or map units; when the user zooms or pans the map, the renderer automatically adjusts the aggregation state according to the point density within the view range—for example, when zoomed to z=15, the view range shrinks and the point density decreases, and the renderer dynamically reduces the clustering radius to display a more detailed hospital distribution; conversely, when the map is zoomed out, the clustering radius is increased and adjacent clusters are merged, while the calculation frequency is optimized in combination with the device performance score (e.g., maintaining real-time updates on high-performance PCs, and reducing calculation accuracy but ensuring smoothness on mobile devices). Ultimately, the front end uses intelligent symbolic rendering to display different levels of clusters (e.g., a single hospital displays an icon, 10-100 hospitals display blue dots with the number marked, and 100+ hospitals display large red dots with the label "dense area"), and pops up statistical information (e.g., total number of hospitals in the area, average service radius, etc.) when the mouse hovers over them.
[0110] This solution not only avoids unnecessary resource consumption on the backend, but also achieves low-latency and highly interactive map display effects through localized computing and efficient rendering on the frontend, fully demonstrating the practicality and economy of this invention in frontend aggregation scenarios.
[0111] In a preferred embodiment of the present invention, the preset threshold is 20,000 data entries. This threshold is a critical value set based on the computing power, memory limitations, and user interaction smoothness requirements of the front-end device (such as mainstream browsers and mobile devices).
[0112] Specifically, in this embodiment of the invention, when the amount of data to be aggregated is less than or equal to 20,000, the front end can directly undertake the aggregation and rendering tasks. On the one hand, ArcGIS's clustering renderer (such as FeatureReductionCluster) can control its memory usage and computation time (usually less than 100ms) within the range imperceptible to the user when processing point data of less than 20,000. Even if the user zooms or pans the map quickly, the front end can still ensure smooth interaction at 60fps through Web Worker multi-threaded computation and incremental update mechanism. On the other hand, compared with back-end aggregation, front-end localization avoids network transmission latency (data does not need to travel to and from the server) and can dynamically adjust the clustering strategy according to device performance (such as automatically reducing the aggregation radius and symbol complexity for low-performance mobile phones), ensuring that users on different terminals can obtain a consistent experience. For example, in the city-wide hospital aggregation scenario of Example 2, the amount of hospital data is typically only a few hundred to a few thousand records (far below the 20,000-record threshold). The front-end can complete the initial aggregation calculation in milliseconds by loading the data and calling the clustering renderer, while responding in real time during user interaction. This avoids the ineffective consumption of back-end resources and significantly improves the smoothness of operation for end users. If the amount of data exceeds 20,000 records (such as urban traffic flow monitoring points), the system automatically triggers the back-end aggregation mechanism, completing efficient aggregation through dynamic grid partitioning and a two-stage calculation model. This achieves intelligent matching of "data volume - processing method," balancing performance and resource utilization.
[0113] In addition, as a preferred embodiment of the present invention, the execution process of steps S4 and S5 can be monitored in real time to adjust the system load and dynamically adjust the preset threshold, specifically including:
[0114] When client performance degrades (e.g., CPU usage consistently exceeds 80%, memory usage exceeds 70%, or frame rate falls below 50fps), the threshold is automatically lowered (e.g., from 20,000 to 10,000) to trigger backend aggregation earlier and reduce frontend computational pressure.
[0115] When the server load is too high (such as CPU load continuously exceeding 90%, request queue backlog exceeding 1000, or network latency exceeding 200ms), the threshold is automatically increased (e.g., from 20,000 to 30,000) to increase the front-end aggregation ratio and reduce server resource consumption.
[0116] Specifically, in this embodiment of the invention, the system collects client CPU, memory, and frame rate data in real time through a front-end performance monitoring API (such as the Performance API), and combines this with server-side monitoring systems (such as Prometheus) to obtain server load, memory usage, and network status. An adaptive adjustment algorithm (such as mean filtering based on a sliding window and step-by-step threshold correction) is used to dynamically calculate a new preset threshold, ensuring a smooth and seamless adjustment process. For example, when a user is detected browsing a hospital distribution map on a low-performance mobile phone, if the phone's CPU usage rises to 85% due to front-end aggregation calculation, the system immediately lowers the threshold to 10,000 records. The front-end only needs to process 10,000 records to ensure smooth 60fps display, and the remaining data automatically triggers back-end aggregation. Conversely, if the server load is only 30% during the early morning off-peak period, the system raises the threshold to 30,000 records. At this time, all traffic flow monitoring points in the city (approximately 25,000 records) can be rendered by front-end aggregation, reducing server requests by approximately 40%, while users still receive a real-time interactive experience. This dynamic threshold adjustment mechanism further achieves optimal allocation of "end-cloud" resources, ensuring that the system maintains efficient and stable operation across all scenarios.
[0117] In summary, this invention provides a method for large-scale data aggregation based on map hierarchy adaptive aggregation. Through a front-end and back-end collaborative intelligent aggregation mechanism, it achieves efficient visualization of massive geospatial data. This method innovatively employs a nonlinear grid granularity control model to dynamically adjust aggregation accuracy, ensuring detailed display at high zoom levels (0.1-5 meter accuracy) and optimizing performance at low zoom levels (10-50 km accuracy). It improves the accuracy of aggregation point locations through a weighted average algorithm and accelerates spatial queries using R-tree indexing. Furthermore, it intelligently switches front-end and back-end aggregation strategies based on a data volume threshold (default 20,000 records). When client performance is insufficient, it automatically lowers the threshold to trigger server-side aggregation; when server load is too high, it raises the threshold to increase the front-end computation ratio, effectively solving the performance-accuracy balance problem in large-scale geographic data visualization. The following is a typical application example:
[0118] Example 3: Front-end and back-end hybrid polymerization
[0119] When displaying the distribution of fire hydrants in the city on a map, if the local layer level is high and the data volume is large (such as displaying tens of thousands of fire hydrants in the city), the system automatically triggers the backend aggregation mechanism to generate accurate aggregation points through non-linear grid division and weighted average algorithm; while if the local layer level is low and the data volume is small (such as displaying a small number of fire hydrants in a single street), the system intelligently switches to frontend aggregation display and uses ArcGIS's native clustering capabilities to achieve fast rendering.
[0120] This adaptive switching mechanism not only optimizes the efficiency of computing resource utilization, but also ensures the best visualization effect at all levels, from macro to micro.
[0121] The above description is merely a preferred embodiment of the present invention and does not limit the implementation and protection scope of the present invention. Those skilled in the art should realize that any equivalent substitutions and obvious changes made based on the description and illustrations of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for large-scale data aggregation based on map hierarchy, characterized in that, include: Step S1: The front end monitors the user's map interaction operations in real time, including map movement and zooming; Step S2: The front end obtains the latitude and longitude range and zoom level of the current device screen, and passes the latitude and longitude range and the zoom level as parameters to the back end; Step S3: The backend queries the point data based on the latitude and longitude range and the scaling level, and determines whether the total amount of data exceeds a preset threshold; if the total amount of data exceeds the preset threshold, then proceed to step S4; otherwise, proceed to step S5. Step S4: The backend performs server-side dynamic aggregation calculations based on the nonlinear grid granularity control model and returns the aggregation results to the frontend, then proceeds to step S6. Step S5: The front end performs client-side aggregation calculations, then proceeds to step S6; Step S6: The front end displays the aggregation results.
2. The method for large-scale data aggregation based on map hierarchy according to claim 1, characterized in that, Step S4 includes: Step S41: Divide the map into multiple grids based on the latitude and longitude information; Step S42: Dynamically adjust the grid granularity according to the scaling level, and use a nonlinear grid granularity control model to allocate data points to the grid; Step S43: Use the latitude and longitude of the center point of each grid as the initial aggregation point; Step S44: Calculate the latitude and longitude distance between each data point in the grid and the initial aggregation point, and count the number of data points in the grid; Step S45: Calculate the mean coordinates of all data points within the grid, which will be used as the location of the final aggregation point; Step S46: Return the aggregation result to the front end.
3. The method for adaptive large-scale data aggregation based on map hierarchy according to claim 2, characterized in that, The formula for the nonlinear grid granularity control model in step S42 is as follows: Where Φ is the reference particle size constant, z max Where z is the maximum scaling level of the system, k is the scaling level, and k is the density attenuation coefficient.
4. The method for adaptive large-scale data aggregation based on map hierarchy according to claim 3, characterized in that, The nonlinear grid granularity control model adjusts the baseline granularity constant Φ and the density decay coefficient k to achieve the following: When the scaling level z is a high scaling level, the actual geographic accuracy corresponding to the grid granularity (z) is 0.1-5 meters; When the scaling level z is a low scaling level, the actual geographic accuracy corresponding to the grid granularity (z) is 10-50 kilometers.
5. The method for adaptive large-scale data aggregation based on map hierarchy according to claim 2, characterized in that, In step S45, when calculating the coordinate mean, a weighted average algorithm is used, and the weights are dynamically adjusted according to the spatial density distribution of the data points.
6. The method for adaptive large-scale data aggregation based on map hierarchy according to claim 1, characterized in that, Step S5 includes: Step S51: The front end matches the corresponding clustering display strategy from the preset rules according to the scaling level. Step S52: According to the clustering display strategy, configure the initial clustering radius parameters through the ArcGIS CSV layer clustering renderer and generate the initial clustering results; Step S53: When the user zooms or moves the map, the ArcGIS CSV layer clustering renderer recalculates the aggregation state in real time based on the point density within the current view range, and dynamically updates the distribution and display of the aggregation clusters.
7. The method for adaptive large-scale data aggregation based on map hierarchy according to claim 6, characterized in that, In step S51, the clustering behavior is dynamically adjusted through a three-level strategy: Basic strategy: Divide the map zoom levels into multiple intervals, and bind default clustering parameters to each interval; Adaptive adjustment strategy: Within the scope of the basic strategy, fine-tune the aggregation granularity based on the real-time data density of the current view; Degradation strategy: Under high-level or low-performance devices, ignore the basic strategy and the adaptive adjustment strategy, and force the low-precision aggregation mode to be enabled.
8. The method for adaptive large-scale data aggregation based on map hierarchy according to claim 1, characterized in that, In step S3, when the backend queries location data, it prioritizes retrieving data within the latitude and longitude range from the R-tree index of the spatial database.
9. The method for adaptive large-scale data aggregation based on map hierarchy according to claim 1, characterized in that, The preset threshold is 20,000 data entries.
10. The method for adaptive large-scale data aggregation based on map hierarchy according to claim 9, characterized in that, The execution process of steps S4 and S5 is monitored in real time to assess system load and dynamically adjust the preset threshold, specifically including: When client performance degrades, the threshold is automatically lowered to trigger backend aggregation earlier. When the server load is too high, the threshold is automatically increased to increase the front-end aggregation ratio.
Citation Information
Patent Citations
Real-time mass map point location aggregation method and device
CN110019622A
Item position aggregation method and system based on risk analysis, terminal and medium
CN113793066A
Method for displaying mass position points of electronic map
CN113849588A
Map interest point configuration type aggregation display method and device
CN119149844A
Density-based data clustering method
US20110055212A1