Map data processing method, device, electronic device and storage medium

By dividing multi-level grids on the map and judging the aggregation nodes based on the viewing angle position, the calculation pressure is reduced, and the problem of low processing efficiency of map data in the prior art is solved, and more efficient rendering performance is achieved.

CN115374229BActive Publication Date: 2025-08-29AERIAL PHOTOGRAMMETRY & REMOTE SENSING CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211010971.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2025-08-29
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

When processing large amounts of interest map data, the prior art has high computing pressure, resulting in low computing efficiency and affecting computer performance, especially when real-time point aggregation is prone to lag.

Method used

By pre-dividing the map into a multi-level grid, we judge whether it is an aggregation node based on the distance between the grid node and the viewing angle position, and display the target aggregation point on the aggregation node, obtain the grid child node step by step until the position information of the last level is displayed, reducing the traversal calculation of all points.

Benefits of technology

It reduces the performance loss of the computer, avoids lag problems during the rendering process, and improves the efficiency of map data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115374229B_ABST
    Figure CN115374229B_ABST
Patent Text Reader

Abstract

The present application provides a map data processing method, device, electronic device, and storage medium. The method includes: determining the distance between each grid node in the first-level grid of the map and the viewing position; determining whether the grid node is an aggregatable node based on the distance between each grid node in the first-level grid and the viewing position; if so, displaying a target aggregation point at the location of the aggregatable node on the map; if not, obtaining each grid subnode of the grid node, and displaying the target aggregation point or obtaining the next-level grid subnode of the grid subnode based on the distance between the grid subnode and the viewing position, and looping through these steps until the current grid subnode is the last-level grid subnode. The method can calculate aggregated content by determining the distance between the grid node and the viewing position, thereby reducing computing pressure, lowering computer performance loss, and avoiding lag issues during rendering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of map point aggregation, and more specifically, to a map data processing method, device, electronic device, and storage medium. Background Art

[0002] When implementing map-based services and displaying too many points of interest (POIs) on a map, the general approach is to display complete business data at a large scale and aggregated data at a smaller scale, based on considerations of image quality and rendering performance. When dealing with POIs of varying numbers and distribution patterns, achieving more reasonable aggregation results through algorithms is becoming increasingly important.

[0003] In the existing technology, when performing real-time point aggregation, it is necessary to continuously re-traverse all points on the map, perform real-time calculations on all points on the map to obtain point aggregation content, and display the calculated point aggregation content. However, when the number of point data is large, the computational pressure of traversing all points in the existing technology to calculate the point aggregation content is large, and it affects the computing performance of the computer, resulting in low computing efficiency. Summary of the Invention

[0004] The purpose of this application is to address the deficiencies in the above-mentioned prior art and provide a map data processing method, device, electronic device and storage medium to improve the efficiency of calculating point aggregation.

[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of the present application are as follows:

[0006] In a first aspect, an embodiment of the present application provides a map data processing method, the method comprising:

[0007] Get the current view position in the map;

[0008] Determining a distance between each grid node in a first-level grid of the map and the viewing position, wherein the map is pre-divided into multiple levels of grids, and each level of grid includes at least one grid node;

[0009] Determining whether each grid node in the first-level grid is an aggregatable node according to the distance between the grid node and the viewing angle position;

[0010] If so, displaying a target aggregation point at the location of the aggregatable node on the map, the target aggregation point being the aggregation point corresponding to the aggregatable node;

[0011] If not, obtain each grid sub-node of the grid node, and display the target aggregation point according to the distance between the grid sub-node and the viewing position, or obtain the next-level grid sub-node of the grid sub-node, and repeat this step until the current grid sub-node is the last-level grid sub-node, and display the position information corresponding to the current grid sub-node.

[0012] Optionally, determining whether each grid node in the first-level grid is an aggregatable node according to a distance between the grid node and the viewing angle position includes:

[0013] Determining whether a distance between a center of the grid node and the viewing angle position is greater than a boundary distance corresponding to the grid node;

[0014] If so, it is determined that the grid node is an aggregatable node; otherwise, it is determined that the grid node is not an aggregatable node.

[0015] Optionally, before determining whether each grid node in the first-level grid is an aggregatable node based on the distance between the grid node and the viewing angle position, the method further includes:

[0016] Determining a viewing angle inclination corresponding to the grid node according to the viewing angle position and the center position of the grid node;

[0017] The boundary distance corresponding to the grid node is determined according to a point data density coefficient corresponding to the grid node, an area of ​​the grid node, and a viewing angle inclination corresponding to the grid node.

[0018] Optionally, displaying a target aggregation point at the location of the aggregatable node on the map includes:

[0019] Determine an aggregation position of the aggregatable node on the map, where the aggregation position includes: a center position of the aggregatable node on the map, or a weighted average point position of the aggregatable node on the map;

[0020] The target aggregation point is displayed at the aggregation position.

[0021] Optionally, before obtaining the current viewing position in the map, the method further includes:

[0022] Get multiple point data in the map;

[0023] A grid pyramid is constructed according to the plurality of point data to obtain a multi-level grid, where each level of the grid includes at least one grid node.

[0024] Optionally, constructing a grid pyramid based on the plurality of point data to obtain a multi-level grid includes:

[0025] Calculating outer bounding boxes of the plurality of point data to obtain first geographic bounding rectangles of the plurality of point data;

[0026] Evenly dividing the first geographic boundary rectangle to obtain a plurality of grid nodes in a first-level grid;

[0027] Recursively divide each grid node in the first-level grid one by one to obtain the multi-level grid.

[0028] Optionally, recursively dividing each grid node in the first-level grid one by one to obtain the multi-level grid includes:

[0029] According to the number of preset grid point data and the preset grid area, each grid node in the first-level grid is recursively divided one by one until the number of point data in each grid node after division is less than the number of preset grid point data or the grid area of ​​each grid node after division is less than the preset grid area, thereby obtaining the multi-level grid.

[0030] In a second aspect, an embodiment of the present application further provides a map data processing device, the device comprising:

[0031] The acquisition module is used to obtain the current viewing position in the map;

[0032] a determination module, configured to determine a distance between each grid node in a first-level grid of the map and the viewing position, wherein the map is pre-divided into multiple levels of grids, and each level of grid includes at least one grid node;

[0033] a determination module, configured to determine whether each grid node in the first-level grid is an aggregatable node based on a distance between the grid node and the viewing angle position;

[0034] If yes, a display module is configured to display a target aggregation point at the location of the aggregatable node on the map, where the target aggregation point is the aggregation point corresponding to the aggregatable node;

[0035] If not, the acquisition module is used to obtain each grid sub-node of the grid node, and display the target aggregation point or obtain the next-level grid sub-node of the grid sub-node according to the distance between the grid sub-node and the viewing position, and repeat this step until the current grid sub-node is the last-level grid sub-node, and the position information corresponding to the current grid sub-node is displayed.

[0036] Optionally, the determining module is specifically configured to:

[0037] Determining whether a distance between a center of the grid node and the viewing angle position is greater than a boundary distance corresponding to the grid node;

[0038] If so, it is determined that the grid node is an aggregatable node; otherwise, it is determined that the grid node is not an aggregatable node.

[0039] Optionally, the determining module is specifically configured to:

[0040] Determining a viewing angle inclination corresponding to the grid node according to the viewing angle position and the center position of the grid node;

[0041] The boundary distance corresponding to the grid node is determined according to a point data density coefficient corresponding to the grid node, an area of ​​the grid node, and a viewing angle inclination corresponding to the grid node.

[0042] Optionally, the display module is specifically used to:

[0043] Determine an aggregation position of the aggregatable node on the map, where the aggregation position includes: a center position of the aggregatable node on the map, or a weighted average point position of the aggregatable node on the map;

[0044] The target aggregation point is displayed at the aggregation position.

[0045] Optionally, the acquisition module is specifically configured to:

[0046] Get multiple point data in the map;

[0047] A grid pyramid is constructed according to the plurality of point data to obtain a multi-level grid, where each level of the grid includes at least one grid node.

[0048] Optionally, the acquisition module is specifically configured to:

[0049] Calculating outer bounding boxes of the plurality of point data to obtain first geographic bounding rectangles of the plurality of point data;

[0050] Evenly dividing the first geographic boundary rectangle to obtain a plurality of grid nodes in a first-level grid;

[0051] Recursively divide each grid node in the first-level grid one by one to obtain the multi-level grid.

[0052] Optionally, the acquisition module is specifically configured to:

[0053] According to the number of preset grid point data and the preset grid area, each grid node in the first-level grid is recursively divided one by one until the number of point data in each grid node after division is less than the number of preset grid point data or the grid area of ​​each grid node after division is less than the preset grid area, thereby obtaining the multi-level grid.

[0054] In a third aspect, an embodiment of the present application further provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor. When an application is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the map data processing method described in the first aspect above.

[0055] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program is read and executes the steps of the map data processing method described in the first aspect above.

[0056] The beneficial effects of this application are:

[0057] The present application provides a map data processing method, device, electronic device and storage medium, which obtain the current viewing angle position in the map; determine the distance between each grid node in the first-level grid of the map and the viewing angle position, wherein the map is pre-divided into multiple levels of grids, and each level of grid includes at least one grid node; determine whether the grid node is an aggregatable node based on the distance between each grid node in the first-level grid and the viewing angle position; if so, display a target aggregation point at the position of the aggregatable node on the map, and the target aggregation point is the aggregation point corresponding to the aggregatable node; if not, obtain each grid sub-node of the grid node, and display the target aggregation point based on the distance between the grid sub-node and the viewing angle position or obtain the next-level grid sub-node of the grid sub-node, and repeat this step until the current grid sub-node is the last-level grid sub-node, and display the position information corresponding to the current grid sub-node. By judging the distance between each grid node and the viewing position, the target aggregation point to be displayed or the next-level grid child node of the grid node can be obtained. This can achieve the goal of only judging the distance from the grid node to the viewing position, without traversing all points on the map to calculate the aggregation content. This can reduce computing pressure, reduce computer performance loss, and avoid freezes during rendering. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0059] Figure 1 A flowchart of a map data processing method provided in an embodiment of the present application;

[0060] Figure 2 A schematic diagram of constructing a grid pyramid provided in an embodiment of the present application;

[0061] Figure 3 A complete schematic diagram of a map data processing method provided in this application;

[0062] Figure 4 A schematic diagram of a device for a map data processing method provided in an embodiment of the present application;

[0063] Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of illustration and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can be implemented out of sequence, and steps without logical context can be reversed or implemented simultaneously. In addition, those skilled in the art, under the guidance of the contents of this application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.

[0065] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0066] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0067] Real-time point aggregation is a dynamic process that continuously updates the aggregation points as the viewing angle changes. When a large number of points are aggregated in real time, how to improve map rendering performance is a problem that this application needs to solve. During the map rendering process, since the position of the viewing angle changes with each frame, the corresponding map aggregation effect in each frame also needs to be updated in real time. Map rendering refers to the process of calculating the point aggregation content in real time based on the change in viewing angle and displaying the calculated point aggregation content.

[0068] In the prior art, two methods are generally used to calculate point aggregation content. One method is to arbitrarily select a preset number of point data from the point data set in the map as the initial cluster centroids, and for the remaining other point data, they are assigned to the cluster centroids that are most similar to them based on their similarity (generally distance) with these cluster centroids; after the above steps, each cluster centroid has a corresponding "data cluster", and then a new cluster centroid is calculated based on the "data cluster" of each cluster centroid; the cluster centroids are continuously iterated to be calculated as aggregation points.

[0069] However, the cluster centroid points calculated by the above method are calculated through multiple iterations, which is computationally intensive and consumes computer performance. Especially when a large number of points are aggregated in real time, each change in perspective requires recalculation, which can easily cause page update delays. The larger the amount of point data, the more likely it is to cause lag.

[0070] Another method is to divide the screen range into grids and select cluster centroids. Specifically, there are direct grid algorithms and grid centroid merging algorithms. The direct grid algorithm divides the map into several grids and displays an aggregation point at the center of each grid; the grid centroid merging algorithm uses the grid centroid as the aggregation point position and merges cluster points that are close to each other to avoid serious collision and coverage.

[0071] However, in another method, when the aggregation status is updated in real time, it is necessary to traverse all points to find the grid point where the aggregation point is located. When the amount of data is large, a large amount of real-time calculation is involved, which results in high computing pressure and low map rendering efficiency, affecting computer performance.

[0072] Figure 1 A flowchart of a map data processing method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:

[0073] S101. Obtain the current viewing position in the map.

[0074] The viewing angle position is the viewing angle of the ground surface on the map when the map is displayed. The viewing angle position may include the geographical coordinate position of the viewing angle in spatial geography, and may also include information such as the viewing direction at the viewing angle position.

[0075] S102: Determine the distance between each grid node in the first-level grid of the map and the viewing position.

[0076] The map can be pre-divided into multiple levels of grids, each level of grid includes at least one grid node, and there is a hierarchical relationship between the grids at each level.

[0077] Optionally, after obtaining the viewing angle position, a preset distance calculation method may be used to determine the distance between each grid node in the first-level grid and the viewing angle position. The distances between each grid node and the viewing angle position may be the same or different.

[0078] S103. Determine whether the grid node is an aggregatable node based on the distance between each grid node in the first-level grid and the viewing position. If so, execute the following step S104; if not, execute the following step S105.

[0079] Among them, the aggregatable node can indicate that the grid node is a node that can directly display the aggregation point. Specifically, an aggregation point can be used to display the point data information in the grid node. The aggregation point can be marked with information such as the number of point data in the grid node, the area of ​​the grid node, and the grid number.

[0080] Optionally, a preset method is used to determine whether each grid node in the first-level grid is an aggregatable node according to the distance between each grid node and the viewing angle position.

[0081] S104: If the grid node is an aggregatable node, a target aggregation point is displayed at the location of the aggregatable node on the map.

[0082] Among them, the target aggregation point is the aggregation point corresponding to the aggregatable node, and the target aggregation point can be an aggregation point calculated using a preset method through the point data in the aggregatable node; for example, the aggregation point can be an aggregation point representing all the point data in the aggregatable node, for example, it can be represented by a red identification point, and the number of all the point data in the aggregatable node and other information can be marked on the aggregation point; the aggregation point can also be the identification of all the point data in the aggregatable node, for example, if there are 6 point data in the aggregatable node, then the target aggregation point can be the point identified by 6 red dots.

[0083] S105. If the grid node is not an aggregatable node, obtain each grid sub-node of the grid node, and display the target aggregation point or obtain the next-level grid sub-node of the grid sub-node based on the distance between the grid sub-node and the viewing position. Repeat this step until the current grid sub-node is the last-level grid sub-node, and display the position information corresponding to the current grid sub-node.

[0084] Among them, this step indicates that if the grid node is not an aggregatable node, each grid sub-node of the grid node is obtained, and the target aggregation point is displayed according to the distance between the grid sub-node and the viewing position, or the next level grid sub-node of the grid sub-node is obtained.

[0085] Optionally, after obtaining each grid sub-node of the grid node, determine whether each grid sub-node is an aggregatable node based on the distance between each grid sub-node and the viewing position. If it is an aggregatable node, the grid sub-node displays the target aggregation point. If it is not an aggregatable node, continue to obtain the next level grid sub-node of the grid sub-node. Repeat the above steps, and after each grid sub-node is obtained, determine whether the grid sub-node is an aggregatable node, that is, you can first determine whether the grid sub-node needs to continue to dig down to the next-level grid sub-node of the grid sub-node; if the obtained grid sub-node is an aggregatable node, then the grid sub-node does not need to continue to dig down to its next-level grid sub-node, and the target aggregation point of the grid sub-node is directly displayed; if the obtained grid sub-node is not an aggregatable point, that is, the grid sub-node needs to continue to dig down to its next-level grid sub-node, then the next-level grid sub-node of the grid sub-node can be obtained by reading the grid sub-node attributes of the grid sub-node, until the current grid sub-node obtained is the last-level sub-node, at this time, stop digging down to the next-level grid sub-node and display the real location information contained in the obtained last-level grid sub-node.

[0086] In this embodiment, by judging the distance between each grid node and the viewing position, the display target aggregation point or the next-level grid child node of the grid node is determined, so that only the judgment of the distance from the grid node to the viewing position is required, and there is no need to traverse all the points on the map to calculate the aggregation content. This can reduce the computing pressure, reduce the performance loss of the computer, and avoid the problem of jamming during the rendering process.

[0087] Optionally, in step S103, determining whether a grid node is an aggregatable node based on the distance between each grid node in the first-level grid and the viewing position may include:

[0088] Optionally, determine whether the distance between the center of the grid node and the viewing position is greater than the boundary distance corresponding to the grid node. Specifically, the center position coordinate information of the grid node can be determined first, and the distance between the grid node and the viewing position can be calculated based on the center position coordinates of the grid node and the viewing position coordinates.

[0089] Optionally, if the distance between the center of the grid node and the viewing position is greater than the boundary distance corresponding to the grid node, the grid node is an aggregatable node; if the distance between the center of the grid node and the viewing position is less than the boundary distance corresponding to the grid node, the grid node is not an aggregatable node.

[0090] Optionally, in step S103, determining whether a grid node is an aggregatable node based on the distance between each grid node in the first-level grid and the viewing position may include:

[0091] Optionally, the viewing angle tilt corresponding to the grid node is determined based on the viewing angle position and the center position of the grid node, wherein the viewing angle tilt is the viewing angle tilt from the viewing angle position to the grid node. For example, the viewing angle tilt can be 30°, 45°, 60°, 75°, and other different values. Specifically, the viewing angle tilt corresponding to the grid node can be determined by calculation based on the coordinates of the viewing angle position and the coordinates of the center position of the grid node. The viewing angle tilt can be calculated, for example, using P view To express.

[0092] Optionally, the boundary distance corresponding to the grid node is determined according to a point data density coefficient corresponding to the grid node, an area of ​​the grid node, and a viewing angle inclination corresponding to the grid node.

[0093] Among them, the point data density coefficient corresponding to the grid node can indicate the density or sparsity of the point data contained in the grid node, which can be represented by data between 0 and 1. The larger the value, the denser the point data corresponding to the grid node, and the smaller the value, the sparser the point data corresponding to the grid node. The point data density coefficient corresponding to the grid node can be represented by C.

[0094] Optionally, the area of ​​the grid nodes can be calculated using S node To indicate that the area of ​​the grid node can be calculated in advance by a preset method.

[0095] Optionally, the boundary distance corresponding to the grid node can be specifically calculated using formula (1), which is as follows:

[0096]

[0097] Among them, D is the boundary distance corresponding to the grid node, C is the point data density coefficient corresponding to the grid node, S node is the area of ​​the grid node, P view is the viewing angle tilt corresponding to the grid node. The boundary distance calculated according to the above formula (1) is not uniform for all grid nodes. At the same time, whether a grid node is an aggregatable point is determined based on the boundary distance corresponding to each grid node and the distance from the grid node to the viewing angle position. This can more flexibly display the point aggregation information of each grid node.

[0098] In this embodiment, by calculating the boundary distance corresponding to each grid node, the obtained boundary distance can be not uniform for each grid node, so that the aggregation information of the point data of each grid node displayed according to the boundary distance of each grid node is also different, so that each grid node can flexibly display the point aggregation information of each grid node.

[0099] Optionally, in the above S104, if the grid node is an aggregatable node, displaying the target aggregation point at the location of the aggregatable node on the map may include:

[0100] Optionally, an aggregation position of the aggregatable nodes on the map is determined, wherein the aggregation position may include a center position of the aggregatable nodes on the map or a weighted average point position of the aggregatable nodes on the map.

[0101] Optionally, the center position of the aggregatable node on the map indicates the position coordinates of the average center of all point data in the aggregatable node on the map. Specifically, the average value of the coordinates of each point data in the aggregatable node can be calculated, and the calculated coordinate average value can be used as the position coordinates of the average center of the aggregatable node on the map.

[0102] Optionally, the weighted average point position of the aggregatable node on the map indicates the weighted average point calculated under the weight of each point data, that is, the weight value of each point data in the aggregatable node is taken into account when calculating the weighted average point, wherein, if the point data is more important, its weight value is higher, and the position of the obtained weighted average point is closer to the point with a high weight value. Specifically, the weighted average algorithm can be used to obtain the position coordinates of the weighted average point.

[0103] Optionally, a target aggregation point is displayed at the aggregation position. The aggregation position refers to the center position of the aggregatable node determined above or the weighted average point position of the aggregatable node. If the aggregation position is determined to be the center position of the aggregatable node, the target aggregation point is displayed at the center position of the aggregatable node.

[0104] In this embodiment, by displaying the target aggregation point in the weighted average point position of the aggregatable node, the point aggregation position of the aggregatable node can be displayed more accurately.

[0105] Optionally, before the above step S101 of obtaining the current viewing position in the map, the following steps may also be included:

[0106] Optionally, multiple point data in the map are obtained. The multiple point data may be the location coordinates of each point data in the map. The obtained multiple point data may be cleaned, specifically, point data that exceeds a preset range of coordinates may be removed, and the remaining point data may be used as new multiple point data.

[0107] Optionally, a grid pyramid is constructed based on the plurality of point data to obtain a multi-level grid, where each level of grid includes at least one grid node. The plurality of point data is the new plurality of point data obtained above, and a preset method can be used to construct the grid pyramid for the new plurality of point data.

[0108] Figure 2A schematic diagram of constructing a grid pyramid provided in an embodiment of the present application is shown in FIG. Figure 2 As shown above, the grid pyramid is constructed based on multiple point data to obtain a multi-level grid, which may include:

[0109] Optionally, the outer bounding box of the plurality of point data is calculated to obtain the first geographic bounding rectangle of the plurality of point data. The outer bounding box may indicate the coordinates of the corner points of the smallest rectangle enclosing the plurality of point data. According to the coordinates of each corner point, the first geographic bounding rectangle of the plurality of point data may be obtained using a preset method, such as Figure 2 The left figure shows a schematic diagram of the outer bounding box of multiple point data.

[0110] Optionally, the first geographic boundary rectangle is evenly divided to obtain multiple grid nodes in the first-level grid. Specifically, the first geographic boundary rectangle can be evenly divided into four grid nodes, and the four grid nodes can be R1, R2, R3, and R4 respectively. Then, the first geographic boundary rectangle can be the first-level grid, and the four divided grids are four grid nodes in the first-level grid, such as Figure 2 The figure on the right shows a schematic diagram of how the grid is divided.

[0111] Optionally, each grid node in the first level grid is recursively divided one by one to obtain a multi-level grid. Figure 2 As shown in the figure on the right, the grid node R3 is recursively divided to obtain four grid nodes, namely R 31 、R 32 、R 33 、R 34 , then these four grid nodes are the next level grid of R3.

[0112] Optionally, the above recursive partitioning of each grid node in the first-level grid one by one to obtain a multi-level grid may include:

[0113] According to the preset number of grid point data and the preset grid area, each grid node in the first-level grid is recursively divided one by one until the number of point data in each grid node after division is less than the preset number of grid point data or the grid area of ​​each grid node after division is less than the preset grid area, thereby obtaining a multi-level grid.

[0114] Optionally, if the number of point data in each divided grid node is less than the preset number of grid point data, the division is discontinued and each grid node is used as the last level grid; if the grid area of ​​each divided grid node is less than the preset grid area, the division is discontinued and each grid node is used as the last level grid. If any of the above situations occurs, the grid node is no longer divided.

[0115] For example, the number of preset grid point data may be, for example, 11, 10, 9, etc., and the preset grid area may be, for example, 2000m*2000m.

[0116] Figure 3 A complete schematic diagram of a map data processing method provided in this application, such as Figure 3 As shown, after obtaining multiple point data in the map, the data is cleaned and reconstructed, and the reconstructed new point data is put into a sub-thread for processing. Then, a grid pyramid is constructed based on the multiple point data: a threshold is set, where the threshold can include the number of preset grid point data and the preset grid area; the first layer of grids is calculated, that is, the outer bounding box of the multiple point data is calculated and evenly divided into four grids; the division is continued downward to construct a grid pyramid, which is a process of recursively dividing each grid node of the first layer of grids one by one according to the set threshold; when the pyramid is constructed, the main thread is returned. When the set threshold is reached during the grid division, the division is stopped, the sub-thread is exited, and the main thread is returned. After the grid pyramid is constructed, real-time point aggregation can be performed. In the real-time point aggregation process, the boundary distance is first determined, where the boundary distance is the boundary distance corresponding to each grid node; the aggregation point is calculated in real time, which is a process of determining whether the grid node is an aggregatable node based on the distance from each grid node to the viewing position and the boundary distance; and the aggregation point or real point is then drawn.

[0117] It is worth noting that each step of the above processes is described in detail in the aforementioned specification and will not be repeated here.

[0118] Figure 4 A schematic diagram of a map data processing method provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the device includes:

[0119] An acquisition module 201 is used to acquire the current viewing angle position in the map;

[0120] a determination module 202 for determining a distance between each grid node in a first-level grid of the map and the viewing position, wherein the map is pre-divided into multiple levels of grids, each level of grid including at least one grid node;

[0121] A determination module 202 is configured to determine whether each grid node in the first-level grid is an aggregatable node based on a distance between the grid node and the viewing angle position;

[0122] If yes, the display module 203 is configured to display a target aggregation point at the location of the aggregatable node on the map, where the target aggregation point is the aggregation point corresponding to the aggregatable node;

[0123] If not, the acquisition module 201 is used to obtain each grid sub-node of the grid node, and display the target aggregation point or obtain the next-level grid sub-node of the grid sub-node according to the distance between the grid sub-node and the viewing position, and repeat this step until the current grid sub-node is the last-level grid sub-node, and the position information corresponding to the current grid sub-node is displayed.

[0124] Optionally, the determining module 202 is specifically configured to:

[0125] Determining whether a distance between a center of the grid node and the viewing angle position is greater than a boundary distance corresponding to the grid node;

[0126] If so, it is determined that the grid node is an aggregatable node; otherwise, it is determined that the grid node is not an aggregatable node.

[0127] Optionally, the determining module 202 is specifically configured to:

[0128] Determining a viewing angle inclination corresponding to the grid node according to the viewing angle position and the center position of the grid node;

[0129] The boundary distance corresponding to the grid node is determined according to a point data density coefficient corresponding to the grid node, an area of ​​the grid node, and a viewing angle inclination corresponding to the grid node.

[0130] Optionally, the display module 203 is specifically configured to:

[0131] Determine an aggregation position of the aggregatable node on the map, where the aggregation position includes: a center position of the aggregatable node on the map, or a weighted average point position of the aggregatable node on the map;

[0132] The target aggregation point is displayed at the aggregation position.

[0133] Optionally, the acquisition module 201 is specifically configured to:

[0134] Get multiple point data in the map;

[0135] A grid pyramid is constructed according to the plurality of point data to obtain a multi-level grid, where each level of the grid includes at least one grid node.

[0136] Optionally, the acquisition module 201 is specifically configured to:

[0137] Calculating outer bounding boxes of the plurality of point data to obtain first geographic bounding rectangles of the plurality of point data;

[0138] Evenly dividing the first geographic boundary rectangle to obtain a plurality of grid nodes in a first-level grid;

[0139] Recursively divide each grid node in the first-level grid one by one to obtain the multi-level grid.

[0140] Optionally, the acquisition module 201 is specifically configured to:

[0141] According to the number of preset grid point data and the preset grid area, each grid node in the first-level grid is recursively divided one by one until the number of point data in each grid node after division is less than the number of preset grid point data or the grid area of ​​each grid node after division is less than the preset grid area, thereby obtaining the multi-level grid.

[0142] Figure 5 This is a structural block diagram of an electronic device 300 provided in an embodiment of the present application, such as Figure 5 As shown, the electronic device may include: a processor 301 and a memory 302.

[0143] Optionally, a bus 303 may be further included, wherein the memory 302 is used to store machine-readable instructions (for example, Figure 3 When the electronic device 300 is running, the processor 301 communicates with the memory 302 via the bus 303, and when the machine-readable instructions are executed by the processor 301, the method steps in the above method embodiment are performed.

[0144] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method steps in the above-mentioned map data processing method embodiment are executed.

[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0146] In addition, the functional units in the various embodiments of the present application can be integrated into a single processing unit, each unit can exist physically separately, or two or more units can be integrated into a single unit. If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0147] The above is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the protection scope of the present application.

Claims

1. A map data processing method, characterized in that: The method comprises: Get the current view position in the map; Determining a distance between each grid node in a first-level grid of the map and the viewing position, wherein the map is pre-divided into multiple levels of grids, and each level of grid includes at least one grid node; Determining whether each grid node in the first-level grid is an aggregatable node according to the distance between the grid node and the viewing angle position; If the grid node is an aggregatable node, a target aggregation point is displayed at the location of the aggregatable node on the map, and the target aggregation point is the aggregation point corresponding to the aggregatable node; If the grid node is not an aggregatable node, the following steps are executed in a loop: obtaining each grid sub-node of the grid node, and displaying the target aggregation point or obtaining the next-level grid sub-node of the grid sub-node based on the distance between the grid sub-node and the viewing position; ending the loop when the current grid sub-node is the last-level grid sub-node, and displaying the position information corresponding to the current grid sub-node.

2. The map data processing method according to claim 1, characterized in that: Determining whether each grid node in the first-level grid is an aggregatable node according to a distance between the grid node and the viewing angle position includes: Determining whether a distance between a center of the grid node and the viewing angle position is greater than a boundary distance corresponding to the grid node; If so, it is determined that the grid node is an aggregatable node; otherwise, it is determined that the grid node is not an aggregatable node.

3. The map data processing method according to claim 2, characterized in that: Before determining whether each grid node in the first-level grid is an aggregatable node based on the distance between the grid node and the viewing angle position, the method further includes: Determining a viewing angle inclination corresponding to the grid node according to the viewing angle position and the center position of the grid node; The boundary distance corresponding to the grid node is determined according to a point data density coefficient corresponding to the grid node, an area of ​​the grid node, and a viewing angle inclination corresponding to the grid node.

4. The map data processing method according to claim 1, wherein: Displaying a target aggregation point at a location of the aggregatable node on the map, comprising: Determine an aggregation position of the aggregatable node on the map, where the aggregation position includes: a center position of the aggregatable node on the map, or a weighted average point position of the aggregatable node on the map; The target aggregation point is displayed at the aggregation position.

5. The map data processing method according to any one of claims 1 to 4, characterized in that: Before obtaining the current viewing position in the map, the method further includes: Get multiple point data in the map; A grid pyramid is constructed according to the plurality of point data to obtain a multi-level grid, where each level of the grid includes at least one grid node.

6. The map data processing method according to claim 5, characterized in that: The step of constructing a grid pyramid based on the plurality of point data to obtain a multi-level grid includes: Calculating outer bounding boxes of the plurality of point data to obtain first geographic bounding rectangles of the plurality of point data; Evenly dividing the first geographic boundary rectangle to obtain a plurality of grid nodes in a first-level grid; Recursively divide each grid node in the first-level grid one by one to obtain the multi-level grid.

7. The map data processing method according to claim 6, characterized in that: The recursive division of each grid node in the first-level grid one by one to obtain the multi-level grid includes: According to the number of preset grid point data and the preset grid area, each grid node in the first-level grid is recursively divided one by one until the number of point data in each grid node after division is less than the number of preset grid point data or the grid area of ​​each grid node after division is less than the preset grid area, thereby obtaining the multi-level grid.

8. A map data processing device, characterized in that: include: The acquisition module is used to obtain the current viewing position in the map; a determination module, configured to determine a distance between each grid node in a first-level grid of the map and the viewing position, wherein the map is pre-divided into multiple levels of grids, and each level of grid includes at least one grid node; The determining module is configured to determine whether each grid node in the first-level grid is an aggregatable node based on the distance between the grid node and the viewing angle position; If the grid node is an aggregatable node, the display module is configured to display a target aggregation point at the location of the aggregatable node on the map, where the target aggregation point is the aggregation point corresponding to the aggregatable node; If the grid node is not an aggregatable node, the acquisition module is used to loop through the following steps: acquiring each grid sub-node of the grid node, and displaying a target aggregation point or acquiring the next-level grid sub-node of the grid sub-node based on the distance between the grid sub-node and the viewing position; terminating the loop when the current grid sub-node is the last-level grid sub-node, and displaying the position information corresponding to the current grid sub-node.

9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor implements the steps of the map data processing method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the map data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for realizing gathering and scattering visualization of mass ground object mark points through layered grid division

    CN109977179A

  • Optimized display processing method and device based on map data aggregation, terminal and medium

    CN114186005A