Map data thinning method and device, equipment, medium and program product
By adopting a multi-level thinning strategy in three-dimensional scenes and combining three-dimensional and two-dimensional sampling, the problem of losing height information in the traditional two-dimensional sampling method is solved, and better data accuracy and perspective effect are achieved.
Patent Information
- Application Number
- CN202411883134.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-11
AI Technical Summary
The traditional two-dimensional data point thinning method will lose the height information of the data point in a three-dimensional scene, resulting in an incorrect perspective effect on the map.
A multi-level thinning strategy is adopted to perform three-dimensional thinning on three-dimensional data points whose cone distance is less than or equal to the distance threshold. The maximum cone distance of the three-dimensional thinning point set is obtained, and the remaining point set is two-dimensional thinning, and the target thinning point set is merged to obtain the target thinning point set.
While reducing the amount of data, the accuracy and perspective effect of three-dimensional data is ensured, and the wrong perspective problem in traditional methods is avoided.
Smart Images

Figure CN119810355A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic maps, and in particular to a method, device, equipment, medium and program product for thinning out map data. Background Art
[0002] In the fields of urban planning, smart manufacturing, and smart transportation, the application of three-dimensional scenes is becoming more and more widespread. However, the amount of data in three-dimensional scenes is usually very large. Directly processing and displaying this data will lead to performance bottlenecks, causing processing to slow down or system crashes, affecting user experience; and the browser plug-in that displays map data is limited by the amount of data it carries and cannot load too many features and layers. Therefore, it is necessary to reduce the amount of map data through data thinning and improve the efficiency of data loading and rendering.
[0003] Although traditional 2D data thinning methods can reduce the amount of data, they often cannot guarantee the integrity and accuracy of data in 3D scenes, especially in complex 3D scenes. Because the real world is three-dimensional, traditional methods based on 2D data point thinning will lose the height information of data points, resulting in erroneous perspective effects on the map. Summary of the invention
[0004] The present invention provides a map data thinning method, device, equipment, medium and program product to solve the problem that the traditional two-dimensional data point thinning method will lose the height information of the data point, resulting in an erroneous perspective effect on the map.
[0005] In a first aspect, an embodiment of the present invention provides a method for thinning map data, comprising:
[0006] Obtain a three-dimensional data point set of the target map area;
[0007] Performing three-dimensional thinning on data points in the three-dimensional data point set whose view cone distance is less than or equal to a distance threshold to obtain a three-dimensional thinned point set, and determining a three-dimensional thinned residual point set based on the three-dimensional data point set and the three-dimensional thinned point set;
[0008] Obtaining a maximum view cone distance of the three-dimensional thinned point set, and performing two-dimensional thinning on data points in the three-dimensional thinned residual point set whose view cone distances are greater than the maximum view cone distance, to obtain a two-dimensional thinned point set;
[0009] The three-dimensional thinned point set and the two-dimensional thinned point set are merged to obtain a target thinned point set.
[0010] In a second aspect, an embodiment of the present invention provides a device for thinning map data, comprising:
[0011] A map data acquisition module, used to acquire a three-dimensional data point set of a target map area;
[0012] A three-dimensional thinning module is used to perform three-dimensional thinning on data points in the three-dimensional data point set whose view cone distance is less than or equal to a distance threshold to obtain a three-dimensional thinned point set, and determine a three-dimensional thinned residual point set based on the three-dimensional data point set and the three-dimensional thinned point set;
[0013] A two-dimensional thinning module, used for obtaining the maximum view cone distance of the three-dimensional thinning point set, and performing two-dimensional thinning on the data points in the three-dimensional thinning residual point set whose view cone distance is greater than the maximum view cone distance, to obtain a two-dimensional thinning point set;
[0014] A merging module is used to merge the three-dimensional thinning point set and the two-dimensional thinning point set to obtain a target thinning point set.
[0015] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the map data thinning method described in any embodiment of the present invention.
[0019] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the map data thinning method described in any embodiment of the present invention when executed.
[0020] In a fifth aspect, an embodiment of the present invention provides a computer program product including a computer program, and when the computer program is executed by a processor, the method for thinning map data described in any embodiment of the present invention is implemented.
[0021] The technical solution of the embodiment of the present invention is as follows: obtaining a three-dimensional data point set of a target map area; performing three-dimensional thinning on data points in the three-dimensional data point set whose viewing cone distance is less than or equal to a distance threshold to obtain a three-dimensional thinned point set, and determining a three-dimensional thinned residual point set based on the three-dimensional data point set and the three-dimensional thinned point set; obtaining a maximum viewing cone distance of the three-dimensional thinned point set, and performing two-dimensional thinning on data points in the three-dimensional thinned residual point set whose viewing cone distance is greater than the maximum viewing cone distance to obtain a two-dimensional thinned point set; and merging the three-dimensional thinned point set and the two-dimensional thinned point set to obtain a target thinned point set. By adopting a multi-level thinning strategy, three-dimensional thinning is performed on the near-end data point set whose map data cone distance is less than or equal to the distance threshold to ensure the accuracy of the near-end data; two-dimensional thinning is performed on the far-end data point set whose cone distance is greater than the maximum cone distance to retain the key data points in the far-end data. Compared with the traditional two-dimensional data point thinning method, the height information of the near-end data is taken into account, which solves the problem that the traditional two-dimensional data point thinning method will lose the height information of the data points, resulting in erroneous perspective effects on the map, thereby achieving the beneficial effect of reducing the amount of data while having a better perspective effect on the display of map data.
[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 A flowchart of a method for thinning map data provided in the first embodiment of the present invention;
[0025] Figure 2 A schematic diagram of the structure of a map data thinning device provided in the second embodiment of the present invention;
[0026] Figure 3 A schematic diagram of the structure of an electronic device for implementing the map data thinning method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] Embodiment 1
[0030] Figure 1 This is a flow chart of a map data thinning method provided in the first embodiment of the present invention. This embodiment is applicable to the case of thinning map data of a three-dimensional scene. The method can be executed by a map data thinning device. The map data thinning device can be implemented in the form of hardware and / or software. The map data thinning device can be configured in an electronic device. Figure 1 As shown, the method includes:
[0031] S110, obtaining a three-dimensional data point set of the target map area.
[0032] The target map area can be understood as the map area that needs to be rendered and displayed. The map data can be understood as data containing geographic location coordinate information. The three-dimensional data point set can be understood as a set of three-dimensional coordinate data points contained in the target map data, and the three-dimensional information of the coordinate data points includes longitude information, latitude information and altitude information. The map data can be stored in the form of tiles. It is understandable that the target map area can include one tile or multiple tiles.
[0033] For example, the original three-dimensional data point set of the target map area is obtained, and the original three-dimensional data point set is pre-processed such as cleaning and standardization to determine the three-dimensional data point set of the target map area and the tile number of the corresponding tile. Alternatively, the three-dimensional data point set and tile number of the target map area can be directly queried from the tile map pyramid model.
[0034] S120, performing three-dimensional thinning on the data points in the three-dimensional data point set whose view cone distance is less than or equal to the distance threshold to obtain a three-dimensional thinned point set, and determining a three-dimensional thinned residual point set based on the three-dimensional data point set and the three-dimensional thinned point set.
[0035] Among them, the viewing cone distance can be understood as the distance between the location of the data point and the viewing cone, which can reflect the distance of the three-dimensional data point. The viewing cone describes the scene area that the camera can see. In perspective projection, the surface of the viewing cone can be expressed as a plane equation. The three-dimensional thinned point set can be understood as a set of data points thinned out from the data points in the three-dimensional data point set whose viewing cone distance is less than or equal to the distance threshold. The three-dimensional thinned residual point set can be understood as a set of data points remaining after the three-dimensional thinned point set is thinned out from the three-dimensional data point set. Three-dimensional thinning can be understood as an operation of downsampling based on the three-dimensional coordinates (longitude, latitude and altitude) of the data points.
[0036] Specifically, a set of points to be 3D thinned is obtained, which is composed of data points whose view cone distance is less than or equal to the distance threshold in the 3D data point set. The set of points to be 3D thinned can be considered as the near-end 3D data point set. The set of points to be 3D thinned is 3D thinned, and redundant data is removed to obtain a 3D thinned point set. The remaining data points in the 3D data point set except the 3D thinned point set constitute a 3D thinned residual point set.
[0037] Exemplarily, the distance threshold may be a preset value, that is, obtaining a set of points to be 3D thinned out consisting of data points whose view cone distance is less than or equal to the preset distance value. Alternatively, the view cone distances of the data points in the 3D data point set are sorted in ascending order to obtain a preset ranking of view cone distances, which is determined as the distance threshold, that is, obtaining a preset number of data points with the smallest view cone distance to form the set of points to be 3D thinned out.
[0038] For example, the three-dimensional thinning method may be to convert the three-dimensional coordinates of the point set to be thinned into two-dimensional data and then use a thinning algorithm to perform thinning. The thinning algorithm may use a threshold-based thinning method or a clustering thinning method, etc., and the embodiment of the present invention does not limit the thinning algorithm.
[0039] This step determines the near-end three-dimensional data point set according to the viewing cone distance to perform three-dimensional thinning, which can reduce the amount of data while ensuring the accuracy of the near-end three-dimensional data.
[0040] S130, obtaining the maximum view cone distance of the three-dimensional thinning point set, and performing two-dimensional thinning on the data points whose view cone distances are greater than the maximum view cone distance in the three-dimensional thinning residual point set to obtain a two-dimensional thinning point set.
[0041] Among them, the maximum cone distance can be considered as the maximum value of the cone distances of each data point in the three-dimensional thinning point set. It can be understood that the maximum cone distance may be equal to the distance threshold, or it may be less than the distance threshold. The two-dimensional thinning point set can be understood as a set of data points thinned out from the three-dimensional thinning residual point set. Two-dimensional thinning can be understood as an operation of downsampling based on the two-dimensional coordinates (longitude and latitude) of the data points.
[0042] Specifically, the data points whose view cone distance in the three-dimensional thinning residual point set is greater than the maximum view cone distance are used as the point set to be thinned out in two dimensions, and the point set to be thinned out in two dimensions can be considered as the far-end three-dimensional data point set. The point set to be thinned out in two dimensions is thinned out in two dimensions according to the longitude and latitude of the data points to obtain the two-dimensional thinning point set.
[0043] Exemplarily, the two-dimensional thinning method may be to thin out the data points using a thinning algorithm according to the longitude and latitude coordinates of the data points. The embodiment of the present invention does not limit the thinning algorithm.
[0044] This step can retain key data points in the far-end three-dimensional data point set by performing two-dimensional thinning on the far-end three-dimensional data point set determined according to the viewing cone distance, thereby reducing the amount of data while ensuring the integrity of the far-end effect.
[0045] S140, merging the three-dimensional thinning point set and the two-dimensional thinning point set to obtain a target thinning point set.
[0046] The target thinning point set can be understood as a data set obtained after three-dimensional thinning and two-dimensional thinning, including a data point set of three-dimensional thinning data points in the three-dimensional thinning point set and two-dimensional thinning data points in the two-dimensional thinning point set. The target thinning point set can be rendered and sent to the client to display the map data.
[0047] Specifically, the three-dimensional thinned point set obtained by thinning the proximal data points and the two-dimensional thinned point set obtained by thinning the distal data points are combined to obtain the target thinned point set.
[0048] The technical solution of the embodiment of the present invention is to obtain a three-dimensional data point set of the target map area; perform three-dimensional thinning on the data points in the three-dimensional data point set whose view cone distance is less than or equal to the distance threshold to obtain a three-dimensional thinned point set, and determine a three-dimensional thinned residual point set based on the three-dimensional data point set and the three-dimensional thinned point set; obtain the maximum view cone distance of the three-dimensional thinned point set, and perform two-dimensional thinning on the data points in the three-dimensional thinned residual point set whose view cone distance is greater than the maximum view cone distance to obtain a two-dimensional thinned point set; merge the three-dimensional thinned point set and the two-dimensional thinned point set to obtain the target thinned point set. Through a multi-level thinning strategy, three-dimensional thinning is performed on the near-end data point set in the three-dimensional data point set of the map data whose view cone distance is less than or equal to the distance threshold to ensure the accuracy of the near-end data; two-dimensional thinning is performed on the far-end data point set whose view cone distance is greater than the maximum view cone distance to retain the key data points in the far-end data. Compared with the traditional two-dimensional data point thinning method, the height information of the near-end data is considered, so as to achieve a better perspective effect when displaying the map data while reducing the amount of data.
[0049] As an optional embodiment of the embodiment of the present invention, S130, performing two-dimensional thinning on the data points in the three-dimensional thinned residual point set whose viewing cone distance is greater than the maximum viewing cone distance to obtain a two-dimensional thinned point set, includes:
[0050] S131, querying the three-dimensional thinning residual point set for a two-dimensional thinning point set consisting of data points whose viewing cone distance is greater than the maximum viewing cone distance.
[0051] The point set to be two-dimensionally thinned can be understood as a set of data points that need to be two-dimensionally thinned.
[0052] Specifically, the view cone distance greater than the maximum view cone distance is used as a filtering condition to query the three-dimensional thinning residual point set, and the filtered data points constitute the two-dimensional thinning point set to be used as the remote data point set for two-dimensional thinning.
[0053] S132: If the sum of the number of data points of the point set to be two-dimensionally thinned and the point set to be three-dimensionally thinned is less than or equal to a preset total number of thinned points, the point set to be two-dimensionally thinned is determined as the two-dimensionally thinned point set.
[0054] Among them, the preset total number of thinning points can be understood as the total number of data points that need to be thinned out in the target map area during the three-dimensional thinning and two-dimensional thinning processes. The preset total number of thinning points is generally a preset value, which can be determined based on the performance of the browser that displays the map data and the map display effect.
[0055] Specifically, if the sum of the data points of the two-dimensional thinning point set and the three-dimensional thinning point set is less than or equal to the preset total number of thinning points, it means that there is no need to reduce the number of data points included in the two-dimensional thinning point set, and the number of data points of the determined target thinning point set will not exceed the preset total number of thinning points. Therefore, the two-dimensional thinning point set can be determined as a two-dimensional thinning point set, or it can be considered that there is no need to perform two-dimensional thinning on the two-dimensional thinning point set.
[0056] S133. If the sum of the number of data points in the point set to be two-dimensionally thinned and the point set to be three-dimensionally thinned is greater than the preset total number of thinned points, the number of two-dimensional thinning points of each tile is determined according to the number of data points contained in each tile within the visible range of the target map area, and for each tile, data points are randomly extracted from the data points corresponding to the tile in the point set to be two-dimensionally thinned according to the number of two-dimensional thinning points of the tile to obtain a two-dimensional thinning point subset of the tile; the two-dimensional thinning point set is constructed according to the two-dimensional thinning point subsets of each tile.
[0057] Among them, the number of two-dimensional thinning points can be understood as the number of data points that need to be thinned out in two dimensions. Tiles (Map Tiles) refer to cutting a complete large map or image into several small rectangular tiles. Each tile (tile) represents a part of the map and is organized in a pyramid structure. Each tile is identified by a tile number (z, x, y) consisting of a unique zoom level z and a row and column number (x, y). The row and column number (x, y) indicates the position of the tile in the hierarchical grid at the current zoom level. It can be understood that the number of two-dimensional thinning points of each tile within the visible range of the target map area is different. The two-dimensional thinning point subset can be understood as a set of data points obtained by two-dimensional thinning of a single tile. The visible range of the target map area can be understood as the area range that can be displayed in the display page, which is related to the zoom level of the map and the size of the display area. Specifically, if the sum of the number of data points of the two-dimensional thinning point set and the three-dimensional thinning point set is greater than the preset total number of thinning points, it means that the two-dimensional thinning point set needs to be two-dimensionally thinned to reduce the amount of data of the remote data points. The two-dimensional thinning method adopted in this embodiment is to thin according to the distribution of data points in the tile, specifically: determine each tile in the visible range of the target map area, and obtain the number of data points contained in each tile, determine the two-dimensional thinning point number of each tile according to the number of data points contained in each tile, and for each tile, randomly extract data points from the data points corresponding to the tile in the two-dimensional thinning point set according to the two-dimensional thinning point number of the tile to obtain the two-dimensional thinning point subset of the tile; form a two-dimensional thinning point set according to the two-dimensional thinning point subset of each tile.
[0058] This embodiment adopts different two-dimensional thinning strategies according to the amount of data contained in the remote point set to be two-dimensionally thinned. The point set to be two-dimensionally thinned with a small amount of data is subjected to bottom-line thinning to ensure the integrity of the remote data. For the point set to be two-dimensionally thinned with a large amount of data, the number of two-dimensional thinning points of the tile is determined according to the number of data point distributions in the tile, so that the proportion of the number of two-dimensional thinning points of the tile is consistent with the proportion of the actual number of data point distributions, thereby ensuring the integrity of the remote data while reducing the amount of data.
[0059] As an optional embodiment of the embodiment of the present application, S133, determining the number of two-dimensional thinning points of each tile according to the number of data points contained in each tile within the visible range of the target map area, includes:
[0060] A1. Determine a first point count ratio of each tile; the first point count ratio is a ratio of the number of data points contained in the tile to the total number of data points contained in each tile.
[0061] Exemplarily, the data points contained in the 8 tiles within the visible range are 5000, 2000, 1000, 900, 500, 250, 250, 100, and the corresponding first point proportions are 50%, 20%, 10%, 9%, 5%, 2.5%, 2.5%, and 1%, respectively.
[0062] A2. Determine the difference between the preset total number of thinning points and the total number of points of the three-dimensional thinning point set as the total number of two-dimensional thinning points, and determine the ratio of the two-dimensional guaranteed thinning points of each tile to the total number of two-dimensional thinning points as the two-dimensional guaranteed thinning ratio of each tile.
[0063] Among them, the total number of 2D thinning points can be understood as the total number of points that need to be thinned out for each tile in the visible range in the 2D thinning process. The 2D guaranteed thinning points can be understood as the minimum number of points that need to be thinned out for each tile in the visible range in the 2D thinning process. The 2D guaranteed thinning ratio can be understood as the minimum thinning ratio of each tile in the visible range in the 2D thinning process.
[0064] It should be noted that the two-dimensional guaranteed thinning points of each tile are the same, so the two-dimensional guaranteed thinning ratio calculated by the ratio of the two-dimensional guaranteed thinning points of each tile to the total two-dimensional thinning points is also the same. The two-dimensional guaranteed thinning points of each tile can be set according to actual needs. For example, the minimum number of points contained in all tiles within the visible range can be determined as the two-dimensional guaranteed thinning points, or a certain ratio of the minimum number of points contained in all tiles within the visible range can be determined as the two-dimensional guaranteed thinning points.
[0065] Specifically, the thinning process includes two processes: three-dimensional thinning and two-dimensional thinning. Therefore, the total number of two-dimensional thinning points is the difference between the preset total number of thinning points and the total number of points in the three-dimensional thinning point set. For example, if the preset total number of thinning points is 1200, the total number of points in the three-dimensional thinning point set is 200, and the total number of two-dimensional thinning points is 1200-200=1000.
[0066] For each tile, the 2D guaranteed thinning ratio of the tile is obtained by dividing the 2D guaranteed thinning points of the tile by the total 2D thinning points. For example, if the 2D guaranteed thinning points of each tile are 25 and the total 2D thinning points are 1000, the 2D guaranteed thinning ratio of each tile is 1000÷25=2.5%.
[0067] A3. If the first point ratio of the tile is less than or equal to the two-dimensional guaranteed minimum thinning ratio, the two-dimensional guaranteed minimum thinning points of the tile are determined as the two-dimensional thinning points of the tile.
[0068] Specifically, the reason for setting the two-dimensional guaranteed thinning points is that when two-dimensional thinning is performed with the proportion of data points of each tile as the weight, the weight of the tile containing fewer data points is very small, so that the two-dimensional thinning points are zero, which causes all key data points in the tile to be discarded, resulting in incomplete data. Therefore, by setting the two-dimensional guaranteed thinning points, this embodiment can thin out the tiles whose first point proportion is less than or equal to the two-dimensional guaranteed thinning ratio according to the guaranteed thinning points, which has the effect of each tile being able to retain key information, thereby ensuring the integrity of the remote data point set whose viewing cone distance is greater than the maximum viewing cone distance.
[0069] For example, the two-dimensional guaranteed thinning points are 25, the total two-dimensional thinning points are 1000, and the two-dimensional guaranteed thinning ratio is 2.5%. If the number of points contained in tile 1 is 250, and the first point of tile 1 accounts for 250 / 1000=2.5%, the two-dimensional guaranteed thinning points are determined as the two-dimensional thinning points of tile 1, that is, the two-dimensional thinning points are 25; if the number of points contained in tile 2 is 100, and the first point of tile 2 accounts for 100 / 1000=1.0%, the two-dimensional guaranteed thinning points are determined as the two-dimensional thinning points of tile 2, that is, the two-dimensional thinning points are 25.
[0070] A4. If the proportion of the first point number of the tile is greater than the two-dimensional guaranteed thinning ratio, the tile is determined as the target tile; the ratio of the number of data points contained in the target tile to the total number of data points contained in each target tile is determined as the two-dimensional thinning weight of the target tile, and the two-dimensional thinning points of the target tile are determined according to the two-dimensional guaranteed thinning points, the total two-dimensional thinning points and the two-dimensional thinning weight.
[0071] The target tile can be understood as a tile participating in the weighted two-dimensional thinning. The two-dimensional thinning weight can be understood as the weight of each target tile participating in the weighted two-dimensional thinning, which is used to reflect the number of data points contained in each target tile. The more data points a target tile contains, the greater the weight.
[0072] Specifically, if the first point ratio of a tile is greater than the two-dimensional guaranteed thinning ratio, the tile is determined as the target tile and participates in the weighted two-dimensional thinning. The ratio of the number of data points contained in the target tile to the total number of data points contained in each target tile is determined as the two-dimensional thinning weight of the target tile, so that the two-dimensional thinning weight of the target tile is proportional to the number of data points of the target tile.
[0073] Since a part of the total two-dimensional thinning points participate in the two-dimensional guaranteed thinning of each tile, and the other part of the thinning points participate in the two-dimensional weighted thinning of each tile, the total two-dimensional weighted thinning points participating in the two-dimensional weighted thinning of each tile can be determined according to the sum of the two-dimensional guaranteed thinning points of each tile and the total two-dimensional thinning points, and the two-dimensional thinning points of the target tile can be determined according to the total two-dimensional weighted thinning points and the two-dimensional thinning weight of the target tile.
[0074] Exemplarily, tiles whose first point proportions are 50%, 20%, 10%, 9%, and 5% are determined as target tiles, and the data points contained are 5000, 2000, 1000, 900, and 500, respectively. The corresponding two-dimensional thinning weights of the target tiles are 5000÷9400=25 / 47, 2000÷9400=10 / 47, 1000÷9400=5 / 47, 900÷9400=9 / 94, and 500÷9400=5 / 94, respectively; wherein 9400 is the sum of the data points contained in the target tiles whose first point proportions are greater than the two-dimensional guaranteed thinning ratio.
[0075] This embodiment performs guaranteed thinning on tiles whose first point ratio is less than or equal to the two-dimensional guaranteed thinning ratio, retains key information of tiles with fewer data points according to the two-dimensional guaranteed thinning points, avoids tiles with fewer data points being completely discarded and losing key information, thereby improving the integrity of remote data; for target tiles whose first point ratio is greater than the two-dimensional guaranteed thinning ratio, weighted thinning is mainly performed, so that the two-dimensional thinning weight of the target tile is proportional to the distribution of data points of the target tile, thereby improving data accuracy, so that two-dimensional thinning can reduce the amount of data while also ensuring data integrity and accuracy.
[0076] As an optional embodiment of the embodiment of the present invention, A4, determining the two-dimensional thinning points of the target tile according to the two-dimensional thinning total points, the two-dimensional thinning weight and the two-dimensional guaranteed thinning points of each tile, includes:
[0077] A41. Determine the sum of the two-dimensional guaranteed thinning points of each tile as the total two-dimensional guaranteed thinning points, and determine the difference between the total two-dimensional thinning points and the total two-dimensional guaranteed thinning points as the total two-dimensional weighted thinning points.
[0078] For example, if the 2D guaranteed thinning points for a single tile is 25, the number of tiles in the visible range is 8, and the total 2D thinning points is 1000, then the total 2D guaranteed thinning points is 25×8=200, and the total 2D weighted thinning points is 1000-200=800.
[0079] A42. Determine the two-dimensional weighted thinning points of the target tile according to the product of the two-dimensional thinning weight and the total number of two-dimensional weighted thinning points.
[0080] Specifically, the 2D thinning weight of the target tile is multiplied by the total number of 2D weighted thinning points to obtain the 2D weighted thinning points of the target tile. For example, if the thinning weight is 25 / 47 and the total number of 2D weighted thinning points is 800, the product of the 2D thinning weight and the total number of 2D weighted thinning points is 25 / 47×800=425.53. Since the 2D weighted thinning points should be an integer, the product is rounded to 426.
[0081] It should be noted that when the two-dimensional weighted thinning points of each target tile are determined by rounding, there may be a deviation between the actual two-dimensional thinning total points of each target tile and the planned two-dimensional thinning total points. In order to ensure that the actual two-dimensional thinning total points are the same as the planned two-dimensional weighted thinning total points, the two-dimensional weighted thinning points of the target tile with fewer data points can be determined first, and the two-dimensional weighted thinning points of the target tile with the most data points are determined according to the difference between the two-dimensional weighted thinning total points and the determined two-dimensional weighted thinning points. This is because the target tile with fewer data points contains fewer key points, is sensitive to changes in the thinning points, and has a great impact on data accuracy; the target tile with more data points contains more key points, is not sensitive to changes in the thinning points, and has a small impact on data accuracy.
[0082] A43. Determine the sum of the two-dimensional guaranteed thinning points and the two-dimensional weighted thinning points as the two-dimensional thinning points of the target tile.
[0083] Specifically, the two-dimensional guaranteed thinning points and the two-dimensional weighted thinning points of the target tile are summed to obtain the two-dimensional thinning points of the target tile. For example, the two-dimensional guaranteed thinning points of the target tile are 25, the two-dimensional weighted thinning points are 426, and the two-dimensional thinning points are 426+25=451.
[0084] In this embodiment, the two-dimensional thinning points of the target tile whose first point ratio is greater than the two-dimensional guaranteed thinning ratio include two-dimensional weighted thinning points and two-dimensional guaranteed thinning points, which can ensure that the remote data points in each tile are thinned according to the weight while also ensuring that the tiles with fewer points have a guaranteed thinning points, thereby ensuring that each tile can retain key data points and improving the integrity of the thinning of remote data points.
[0085] As an optional embodiment of the embodiment of the present invention, S133, for each tile, randomly extracting data points from the data points corresponding to the tile in the to-be-two-dimensionally thinned point set according to the two-dimensionally thinned points of the tile, to obtain the two-dimensionally thinned point subset of the tile, includes:
[0086] B1. For each tile, determine the second point ratio of the target level tiles contained in the tile at the target zoom level; the target zoom level is greater than the current zoom level of the tile, and the second point ratio is the ratio of the number of data points contained in the target level tile to the number of data points contained in the tile.
[0087] Among them, the zoom level of the tile indicates the zoom level of the map. At different zoom levels, the geographical range covered by the tile and the degree of detail provided will be different. As the zoom level increases, the geographical range covered by the tile will decrease, the degree of detail will increase, and accordingly, the number of tiles required will also increase. Generally, the number of tiles contained in each zoom level is 4 to the power of n, where n is the zoom level. For example, the 0th zoom level contains 1 tile; the 1st zoom level contains 4 tiles; the 2nd zoom level contains 16 tiles, and so on.
[0088] The current zoom level indicates the zoom level of the tile corresponding to the target map area. The target zoom level is a level greater than the current zoom level of the tile. The purpose of selecting the target zoom level is to further reduce the area range of the tile so that the proportion of the two-dimensional thinning points of the target level tiles in the tile is consistent with the proportion of the actual data point distribution number. The target level tile is the tile covered by the tile of the current zoom level at the target zoom level. A target zoom level that is too high may cause a decrease in the thinning effect, so the higher the target zoom level, the better. The target zoom level can be set according to actual needs. Preferably, the target zoom level is the next level of the current zoom level. For example, the current zoom level is level 3, and the target zoom level is selected as level 4. Then, according to the number of tiles contained in each zoom level is 4 to the power of n, the number of target level tiles contained in each tile at the target zoom level is 4.
[0089] Specifically, the tile contains multiple target-level tiles, and the number of data points contained in the tile is equal to the total number of data points contained in each target-level tile. For each target-level tile, the ratio of the number of data points contained in the target-level tile to the number of data points contained in the tile is determined as the second point ratio of the target-level tile. For example, the current zoom level of the tile is level 3, the target zoom level is selected as level 4, the tile contains 4 target-level tiles at the target zoom level, the number of data points contained in the tile is 5000, and the number of data points contained in each target-level tile is 1500, 800, 2200, and 500, respectively. The corresponding second point ratios of the target-level tiles are 30%, 16%, 44%, and 10%, respectively.
[0090] B2. Determine the product of the second point ratio and the two-dimensional thinning point number of the tile as the target two-dimensional thinning point number of the target level tile.
[0091] The target two-dimensional thinning point number can be understood as the number of points that each target level tile should be two-dimensionally thinned.
[0092] Specifically, for each target-level tile, the second point ratio is multiplied by the two-dimensional thinning point number of the tile to obtain the target two-dimensional thinning point number of the target-level tile.
[0093] For example, the number of 2D thinning points of a tile is 451, and the second point ratios are 30%, 16%, 44%, and 10% of the target level tiles, and the corresponding target 2D thinning points are 451×30%≈135, 451×16%≈72, 451×44%≈199, and 451×10%≈45. In order to ensure that the sum of the target 2D thinning points of each target level tile is equal to the 2D thinning points of the corresponding tile, the target 2D thinning points of the target level tile with fewer data points can also be rounded off preferentially, and the target 2D thinning points of the target level tile with the most data points are determined according to the difference between the 2D thinning points of the tile and the determined target 2D thinning points.
[0094] B3. For each of the target level tiles, randomly extract data points from the data points corresponding to the target level tiles in the to-be-two-dimensionally thinned point set according to the two-dimensional thinning points of the target level tiles, to obtain a target two-dimensional thinning point subset of the target level tiles.
[0095] The target two-dimensional thinning point subset can be understood as a set of data points obtained by two-dimensional thinning of each target level tile.
[0096] Specifically, for each target level tile, data points of two-dimensional thinning points are randomly extracted from data points corresponding to the target level tile in the to-be-two-dimensional thinning point set to obtain a target two-dimensional thinning point subset of the target level tile.
[0097] B4. Constructing a two-dimensional thinned point subset of the tile according to the target two-dimensional thinned point subsets of each target level tile contained in the tile.
[0098] Specifically, for each tile, the target two-dimensional thinned point subsets of each target level tile contained in the tile are aggregated to obtain the two-dimensional thinned point subset of the tile.
[0099] This embodiment determines to perform two-dimensional thinning on target level tiles included in the tile, so that the proportion of the two-dimensional thinning points of each target level tile included in the tile is further consistent with the proportion of the number of actual distributed data points, thereby further improving data accuracy while reducing the amount of data.
[0100] As an optional embodiment of the embodiment of the present invention, S120, performing three-dimensional thinning on the data points in the three-dimensional data point set whose view cone distance is less than or equal to the distance threshold to obtain a three-dimensional thinned point set, includes:
[0101] S121, obtaining the viewing cone distance of each data point in the three-dimensional data point set.
[0102] Exemplarily, the viewing cone distance of each data point can be obtained by calculating the distance between the data point and the near plane of the viewing cone using a point-to-plane distance formula.
[0103] S122, obtaining a point set to be three-dimensionally thinned out from the three-dimensional data point set, which is composed of data points whose viewing cone distance is less than or equal to a distance threshold; the distance threshold is a viewing cone distance ranked as a preset total number of thinned out points obtained by sorting the viewing cone distances of the data points in the three-dimensional data point set in ascending order.
[0104] The point set to be 3D thinned can be understood as a data point set that needs to be 3D thinned. In this embodiment, the point set to be 3D thinned is composed of data points whose viewing cone distance is less than or equal to the distance threshold, and can also be understood as a point set composed of proximal data points.
[0105] Exemplarily, if the total number of points to be thinned out is preset to be 1200, the data points in the three-dimensional data point set are sorted in ascending order according to the viewing cone distance, and the first 1200 data points are obtained to form the three-dimensional thinning point set.
[0106] S123, converting the three-dimensional coordinates of the point set to be three-dimensionally thinned into plane pixel values according to the pitch angle of the viewing cone.
[0107] The cone pitch angle can be understood as the angle between the cone from the camera's perspective and the horizontal plane in three-dimensional space. The cone pitch angle is usually determined by the camera's focal length and sensor size.
[0108] Specifically, according to the pitch angle of the viewing cone, the three-dimensional coordinates of the point set to be three-dimensionally thinned in the three-dimensional space are converted into plane pixel values in the two-dimensional image coordinate system through perspective projection transformation.
[0109] S124. Perform threshold clustering thinning on the point set to be three-dimensionally thinned based on the plane pixel values to obtain a three-dimensional thinned point set.
[0110] The threshold value of the threshold clustering thinning can be set according to actual needs, and this embodiment does not limit this.
[0111] Specifically, threshold clustering is performed on the three-dimensional thinned point set based on the plane pixel value, all points within the threshold pixels around each data point are clustered to obtain cluster clusters, and a preset number of data points are thinned out from each cluster to form a three-dimensional thinned point set.
[0112] This embodiment converts the three-dimensional coordinates of proximal data points whose viewing cone distance is less than or equal to the distance threshold into plane pixel values for threshold clustering and thinning, thereby achieving three-dimensional thinning of proximal data, removing redundant data of the proximal data, and ensuring the accuracy of the proximal data. The height information of the proximal data is taken into account in the three-dimensional thinning, thereby achieving the goal of reducing the amount of data while further improving the perspective effect of map data display.
[0113] Embodiment 2
[0114] Figure 2 This is a schematic diagram of the structure of a map data thinning device provided in the second embodiment of the present invention. Figure 2 As shown, the device includes: a map data acquisition module 210, a three-dimensional thinning module 220, a two-dimensional thinning module 230 and a merging module 240; wherein,
[0115] A map data acquisition module 210 is used to acquire a three-dimensional data point set of a target map area;
[0116] A three-dimensional thinning module 220 is used to perform three-dimensional thinning on data points in the three-dimensional data point set whose view cone distance is less than or equal to a distance threshold to obtain a three-dimensional thinned point set, and determine a three-dimensional thinned residual point set based on the three-dimensional data point set and the three-dimensional thinned point set;
[0117] A two-dimensional thinning module 230 is used to obtain the maximum view cone distance of the three-dimensional thinning point set, and perform two-dimensional thinning on the data points in the three-dimensional thinning residual point set whose view cone distance is greater than the maximum view cone distance to obtain a two-dimensional thinning point set;
[0118] The merging module 240 is used to merge the three-dimensional thinned point set and the two-dimensional thinned point set to obtain a target thinned point set.
[0119] The technical solution of the embodiment of the present invention is to obtain a three-dimensional data point set of the target map area; perform three-dimensional thinning on the data points in the three-dimensional data point set whose view cone distance is less than or equal to the distance threshold to obtain a three-dimensional thinned point set, and determine a three-dimensional thinned residual point set based on the three-dimensional data point set and the three-dimensional thinned point set; obtain the maximum view cone distance of the three-dimensional thinned point set, and perform two-dimensional thinning on the data points in the three-dimensional thinned residual point set whose view cone distance is greater than the maximum view cone distance to obtain a two-dimensional thinned point set; merge the three-dimensional thinned point set and the two-dimensional thinned point set to obtain a target thinned point set. The embodiment of the present invention adopts a multi-level thinning strategy, performs three-dimensional thinning on the near-end data point set in the three-dimensional data point set of the map data whose view cone distance is less than or equal to the distance threshold to ensure the accuracy of the near-end data; performs two-dimensional thinning on the far-end data point set whose view cone distance is greater than the maximum view cone distance to retain the key data points in the far-end data. Compared with the traditional two-dimensional data point thinning method, the height information of the near-end data is considered, so as to achieve a better perspective effect when displaying the map data while reducing the amount of data.
[0120] Optionally, the two-dimensional thinning module 230 includes:
[0121] A unit for determining a point set to be thinned out in two dimensions, used for searching for a point set to be thinned out in two dimensions, which is composed of data points whose view cone distance is greater than the maximum view cone distance, from the three-dimensional thinning residual point set;
[0122] A first thinning unit, configured to determine the to-be-two-dimensionally thinned point set as the two-dimensional thinned point set if the sum of the number of data points of the to-be-two-dimensionally thinned point set and the three-dimensional thinned point set is less than or equal to a preset total number of thinned points;
[0123] The second thinning unit is used to determine the two-dimensional thinning point number of each tile according to the number of data points contained in each tile in the visible range of the target map area if the sum of the number of data points of the point set to be two-dimensionally thinned and the point set to be three-dimensionally thinned is greater than the preset total number of thinning points, and for each tile, randomly extract data points from the data points corresponding to the tile in the point set to be two-dimensionally thinned according to the two-dimensional thinning point number of the tile to obtain the two-dimensional thinning point subset of the tile; and construct the two-dimensional thinning point set according to the two-dimensional thinning point subsets of each tile.
[0124] Optionally, the second thinning unit includes:
[0125] A first point count ratio determination subunit is used to determine a first point count ratio of each of the tiles; the first point count ratio is a ratio of the number of data points included in the tile to the total number of data points included in each of the tiles;
[0126] A guaranteed minimum thinning ratio determination subunit is used to determine the difference between the preset total number of thinning points and the total number of points of the three-dimensional thinning point set as the total number of two-dimensional thinning points, and determine the ratio of the two-dimensional guaranteed minimum thinning points of each tile to the two-dimensional thinning total number of points as the two-dimensional guaranteed minimum thinning ratio of each tile;
[0127] A guaranteed bottom thinning point determination subunit is used to determine the two-dimensional guaranteed bottom thinning point number of the tile as the two-dimensional thinning point number of the tile if the first point ratio of the tile is less than or equal to the two-dimensional guaranteed bottom thinning ratio;
[0128] The weighted thinning subunit is used to determine the tile as the target tile if the proportion of the first point number of the tile is greater than the two-dimensional guaranteed thinning ratio; determine the ratio of the number of data points contained in the target tile to the total number of data points contained in each of the target tiles as the two-dimensional thinning weight of the target tile, and determine the two-dimensional thinning points of the target tile according to the total number of two-dimensional thinning points, the two-dimensional thinning weight and the two-dimensional guaranteed thinning points of each of the tiles.
[0129] Optionally, the weight thinning subunit is specifically used for:
[0130] The sum of the two-dimensional guaranteed bottom thinning points of each tile is determined as the total two-dimensional guaranteed bottom thinning points, and the difference between the total two-dimensional thinning points and the total two-dimensional guaranteed bottom thinning points is determined as the total two-dimensional weighted thinning points;
[0131] The product of the two-dimensional thinning total number of points and the two-dimensional weighted thinning ratio is determined as the two-dimensional weighted thinning total number of points; the sum of the two-dimensional weighted thinning ratio and the two-dimensional guaranteed thinning ratio of each tile is 1;
[0132] Determining the two-dimensional weighted thinning points of the target tile according to the product of the two-dimensional thinning weight and the total number of two-dimensional weighted thinning points;
[0133] The sum of the two-dimensional guaranteed minimum thinning points and the two-dimensional weighted thinning points is determined as the two-dimensional thinning points of the target tile.
[0134] Optionally, the second thinning unit includes:
[0135] A second point ratio subunit is used to determine, for each tile, a second point ratio of target level tiles contained in the tile at a target zoom level; the target zoom level is greater than the current zoom level of the tile, and the second point ratio is a ratio of the number of data points contained in the target level tile to the number of data points contained in the tile;
[0136] a target tile thinning point number determining subunit, configured to determine the product of the second point number ratio and the two-dimensional thinning point number of the tile as the target two-dimensional thinning point number of the target level tile;
[0137] The target tile thinning subunit is used to randomly extract data points from the data points corresponding to the target level tile in the to-be-two-dimensional thinning point set for each target level tile according to the two-dimensional thinning point number of the target level tile, so as to obtain a target two-dimensional thinning point subset of the target level tile;
[0138] The two-dimensional thinning point set determination subunit is used to form the two-dimensional thinning point subset of the tile according to the target two-dimensional thinning point subsets of each target level tile contained in the tile.
[0139] Optionally, the three-dimensional thinning module 220 is specifically used for:
[0140] Get the view cone distance of each data point in the three-dimensional data point set;
[0141] Acquire a set of points to be three-dimensionally thinned from the three-dimensional data point set, which are data points whose view cone distance is less than or equal to a distance threshold; the distance threshold is a view cone distance whose ranking is a preset total number of thinned points obtained by sorting the view cone distances of the data points in the three-dimensional data point set in ascending order;
[0142] Converting the three-dimensional coordinates of the point set to be three-dimensionally thinned into plane pixel values according to the pitch angle of the viewing cone;
[0143] The point set to be three-dimensionally thinned is subjected to threshold clustering thinning based on the plane pixel values to obtain a three-dimensional thinned point set.
[0144] The map data thinning device provided in the embodiment of the present invention can execute the map data thinning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0145] Embodiment 3
[0146] Figure 3 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0147] like Figure 3 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0148] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0149] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for thinning map data.
[0150] In some embodiments, the method for thinning map data may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for thinning map data described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the method for thinning map data in any other appropriate manner (e.g., by means of firmware).
[0151] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0152] In some embodiments, the method for thinning map data may be implemented as a computer program, which is invisibly included in a computer program product. When the computer program is executed by a processor, the method for thinning map data of the present invention is implemented. The computer program product can be understood as a software product that implements its solution mainly through a computer program. The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as an independent software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0153] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0154] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0155] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0156] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0157] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0158] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for thinning map data, characterized in that: include: Obtain a three-dimensional data point set of the target map area; Performing three-dimensional thinning on data points in the three-dimensional data point set whose view cone distance is less than or equal to a distance threshold to obtain a three-dimensional thinned point set, and determining a three-dimensional thinned residual point set based on the three-dimensional data point set and the three-dimensional thinned point set; Obtaining a maximum view cone distance of the three-dimensional thinned point set, and performing two-dimensional thinning on data points in the three-dimensional thinned residual point set whose view cone distances are greater than the maximum view cone distance, to obtain a two-dimensional thinned point set; The three-dimensional thinned point set and the two-dimensional thinned point set are merged to obtain a target thinned point set.
2. The method according to claim 1, characterized in that: The step of performing two-dimensional thinning on the data points in the three-dimensional thinned residual point set whose viewing cone distance is greater than the maximum viewing cone distance to obtain a two-dimensional thinned point set comprises: Querying the two-dimensional thinning point set to be formed by data points whose view cone distance is greater than the maximum view cone distance from the three-dimensional thinning residual point set; If the sum of the number of data points of the to-be-two-dimensional thinned point set and the three-dimensional thinned point set is less than or equal to the preset total number of thinned points, the to-be-two-dimensional thinned point set is determined as the two-dimensional thinned point set; If the sum of the number of data points in the point set to be two-dimensionally thinned and the point set to be three-dimensionally thinned is greater than the preset total number of thinned points, the number of two-dimensional thinning points of each tile is determined according to the number of data points contained in each tile within the visible range of the target map area, and for each tile, data points are randomly selected from the data points corresponding to the tile in the point set to be two-dimensionally thinned according to the two-dimensional thinning point number of the tile to obtain a two-dimensional thinning point subset of the tile; the two-dimensional thinning point set is constructed according to the two-dimensional thinning point subsets of each tile.
3. The method according to claim 2, characterized in that The step of determining the number of two-dimensional thinning points of each tile according to the number of data points contained in each tile within the visible range of the target map area includes: Determine a first point count ratio of each of the tiles; the first point count ratio is a ratio of the number of data points included in the tile to the total number of data points included in each of the tiles; The difference between the preset total number of thinning points and the total number of points of the three-dimensional thinning point set is determined as the total number of two-dimensional thinning points, and the ratio of the two-dimensional guaranteed thinning points of each tile to the total number of two-dimensional thinning points is determined as the two-dimensional guaranteed thinning ratio of each tile; If the first point ratio of the tile is less than or equal to the two-dimensional guaranteed minimum thinning ratio, the two-dimensional guaranteed minimum thinning points of the tile are determined as the two-dimensional thinning points of the tile; If the first point ratio of the tile is greater than the two-dimensional guaranteed thinning ratio, the tile is determined as the target tile; the ratio of the number of data points contained in the target tile to the total number of data points contained in each target tile is determined as the two-dimensional thinning weight of the target tile, and the two-dimensional thinning points of the target tile are determined according to the total number of two-dimensional thinning points, the two-dimensional thinning weight and the two-dimensional guaranteed thinning points of each tile.
4. The method according to claim 3, characterized in that The determining the two-dimensional thinning points of the target tile according to the two-dimensional thinning total points, the two-dimensional thinning weight and the two-dimensional guaranteed thinning points of each tile includes: The sum of the two-dimensional guaranteed bottom thinning points of each tile is determined as the total two-dimensional guaranteed bottom thinning points, and the difference between the total two-dimensional thinning points and the total two-dimensional guaranteed bottom thinning points is determined as the total two-dimensional weighted thinning points; Determining the two-dimensional weighted thinning points of the target tile according to the product of the two-dimensional thinning weight and the total number of two-dimensional weighted thinning points; The sum of the two-dimensional guaranteed minimum thinning points and the two-dimensional weighted thinning points is determined as the two-dimensional thinning points of the target tile.
5. The method according to any one of claims 2 to 4, characterized in that: For each tile, randomly extracting data points from the data points corresponding to the tile in the to-be-two-dimensionally thinned point set according to the two-dimensionally thinned points of the tile to obtain the two-dimensionally thinned point subset of the tile includes: For each tile, determine a second point ratio of target level tiles included in the tile at a target zoom level; the target zoom level is greater than the current zoom level of the tile, and the second point ratio is a ratio of the number of data points included in the target level tile to the number of data points included in the tile; Determine the product of the second point ratio and the two-dimensional thinning point number of the tile as the target two-dimensional thinning point number of the target level tile; For each of the target level tiles, data points are randomly extracted from the data points corresponding to the target level tiles in the point set to be two-dimensionally thinned according to the number of two-dimensional thinning points of the target level tiles, so as to obtain a target two-dimensional thinning point subset of the target level tiles; and the two-dimensional thinning point subset of the tile is constructed according to the target two-dimensional thinning point subsets of each target level tile contained in the tile.
6. The method according to claim 1, characterized in that The three-dimensional thinning is performed on the data points in the three-dimensional data point set whose view cone distance is less than or equal to the distance threshold to obtain a three-dimensional thinned point set, including: Get the view cone distance of each data point in the three-dimensional data point set; Acquire a set of points to be three-dimensionally thinned from the three-dimensional data point set, which are data points whose view cone distance is less than or equal to a distance threshold; the distance threshold is a view cone distance whose ranking is a preset total number of thinned points obtained by sorting the view cone distances of the data points in the three-dimensional data point set in ascending order; Converting the three-dimensional coordinates of the point set to be three-dimensionally thinned into plane pixel values according to the pitch angle of the viewing cone; The point set to be three-dimensionally thinned is subjected to threshold clustering thinning based on the plane pixel values to obtain a three-dimensional thinned point set.
7. A map data thinning device, characterized in that: include: A map data acquisition module, used to acquire a three-dimensional data point set of a target map area; A three-dimensional thinning module is used to perform three-dimensional thinning on data points in the three-dimensional data point set whose view cone distance is less than or equal to a distance threshold to obtain a three-dimensional thinned point set, and determine a three-dimensional thinned residual point set based on the three-dimensional data point set and the three-dimensional thinned point set; A two-dimensional thinning module, used for obtaining the maximum view cone distance of the three-dimensional thinning point set, and performing two-dimensional thinning on the data points in the three-dimensional thinning residual point set whose view cone distance is greater than the maximum view cone distance, to obtain a two-dimensional thinning point set; A merging module is used to merge the three-dimensional thinning point set and the two-dimensional thinning point set to obtain a target thinning point set.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the map data thinning method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the map data thinning method according to any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the method for thinning map data according to any one of claims 1 to 6.