WO2024061327A1 - 矢量地图生成方法、装置、电子设备和可读存储介质 - Google Patents
矢量地图生成方法、装置、电子设备和可读存储介质 Download PDFInfo
- Publication number
- WO2024061327A1 WO2024061327A1 PCT/CN2023/120472 CN2023120472W WO2024061327A1 WO 2024061327 A1 WO2024061327 A1 WO 2024061327A1 CN 2023120472 W CN2023120472 W CN 2023120472W WO 2024061327 A1 WO2024061327 A1 WO 2024061327A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- map
- vector
- grid
- grids
- root
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/05—Geographic models
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4038—Image mosaicing, e.g. composing plane images from plane sub-images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20016—Hierarchical, coarse-to-fine, multiscale or multiresolution image processing; Pyramid transform
Definitions
- This application belongs to the field of map processing technology, and specifically relates to a vector map generation method, device, electronic equipment and readable storage medium.
- vector maps i.e. electronic maps
- slicing vector maps people can obtain finer map details.
- Existing vector map slicing methods usually use a pyramid model to slice vector maps in a top-down or bottom-up manner.
- the purpose of the embodiments of the present application is to provide a vector map generation method, device, electronic device and readable storage medium, which can solve the problem of low efficiency of vector map slicing.
- embodiments of the present application provide a method for generating a vector map.
- the method includes: based on the density distribution information of the vector data to be sliced corresponding to the target area, obtaining a root grid set corresponding to the vector data to be sliced.
- the root grid includes multiple root grids, each of the multiple root grids corresponds to a map level, and the vector data density in each root grid is less than or equal to the preset data density; based on each root grid
- the vector data in the map and the corresponding map level are used to generate a target vector map tile set; based on the target vector map tile set, a regional vector map corresponding to the target area is obtained.
- inventions of the present application provide a device for generating a vector map.
- the device includes: an acquisition module and a processing module; the acquisition module is used to acquire the density distribution information of the vector data to be sliced corresponding to the target area.
- the root grid set corresponding to the vector data.
- the root grid set includes multiple root grids.
- Each root grid among the multiple root grids corresponds to a map level, and the density of vector data in each root grid is less than or Equal to the preset data density; the processing module is used to generate a set of target vector map tiles based on the vector data in each root grid and the map level obtained by the corresponding acquisition module; the processing module is also used to generate a set of target vector map tiles based on the target vector map tiles Set the slices to obtain the regional vector map corresponding to the target area.
- embodiments of the present application provide an electronic device, which includes a processor and a memory,
- the memory stores programs or instructions executable on the processor, which when executed by the processor implement the steps of the method according to the first aspect.
- embodiments of the present application provide a readable storage medium.
- Programs or instructions are stored on the readable storage medium.
- the steps of the method described in the first aspect are implemented. .
- inventions of the present application provide a chip.
- the chip includes a processor and a communication interface.
- the communication interface is coupled to the processor.
- the processor is used to run programs or instructions to implement the first aspect. the method described.
- embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the method as described in the first aspect.
- a root grid set corresponding to the vector data to be sliced is obtained, the root grid set includes multiple root grids, each of the multiple root grids corresponds to a map level, and the vector data density in each root grid is less than or equal to the preset data density; based on the vector data in each root grid and the corresponding map level, a target vector map tile set is generated; based on the target vector map tile set, a regional vector map corresponding to the target area is obtained.
- the electronic device can more reasonably split the slicing task, so that the vector data density in each root grid in the grid set is less than the preset data density, and the split vector data is adaptively split for slicing, thereby improving the efficiency of vector map slicing, and further improving the efficiency of generating vector maps.
- Figure 1 is a schematic structural diagram of the pyramid model
- Figure 2 is one of the flow charts of a vector map generation method provided by an embodiment of the present application.
- Figure 3 is a schematic diagram of a root grid set in a vector map generation method provided by an embodiment of the present application
- Figure 4 is a schematic diagram comparing the top-down slicing method in the related art and the adaptive vector map slicing method in the vector map generation method provided by the embodiment of the present application;
- Figure 5 is the second flow chart of a vector map generation method provided by an embodiment of the present application.
- Figure 6 is a schematic structural diagram of a vector map generation device provided by an embodiment of the present application.
- Figure 7 is one of the schematic diagrams of the hardware structure of an electronic device provided by an embodiment of the present application.
- FIG. 8 is a second schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
- first, second, etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances so that the embodiments of the application can be practiced in sequences other than those illustrated or described herein, and that "first,” “second,” etc. are distinguished Objects are usually of one type, and the number of objects is not limited. For example, the first object can be one or multiple.
- “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the related objects are in an "or” relationship.
- Vector layer The data displayed as a base map in the map.
- most of the layers except satellite images are vector layers, such as street maps, traffic route maps, and administrative maps.
- Zoning maps, etc. usually the layer range is 0-18, with layer 0 being the global scale. With each additional layer, the field of view becomes smaller and the display effect becomes more detailed, and the details of the building can be seen at the 18th level.
- the process of zooming in with your finger or using the mouse wheel is the process of loading and displaying higher-level layers.
- Vector tiles The basic display units that constitute the vector map layer are obtained by slicing the vector map.
- the vector layer is composed of vector tile units that are spliced together in order of spatial position.
- Vector map slicing The process of segmenting geographical vector data according to certain spatial division rules (such as longitude and latitude grids) and allocating data falling within the same grid unit to form a vector tile unit is Vector map slices.
- Vector map slicing will result in vector tiles of different levels. Usually the number of global tiles in layer 0 is 1, and layer 1 is obtained by dividing the tiles in layer 0 into 4 equal parts. The pixel size of each tile remains unchanged, but The spatial range represented is smaller and the display effect is more refined.
- the n+1th layer tiles are equally divided from each tile of the nth layer. The number is 4 times that of the nth layer. Finally, all tiles at all levels are obtained through slicing. .
- Each grid can correspond to a spatial range, and the grid also corresponds to a map level. Among them, the larger the map level corresponding to the grid, the smaller the spatial range corresponding to the grid.
- the spatial range corresponding to each n+1th layer grid includes the spatial range corresponding to 4 (n+1)th layer grids, and the spatial range corresponding to each (n+1)th layer grid is The spatial range includes the spatial range corresponding to the 4 (n+2)th layer grids.
- the vector map generation method, device, electronic device and readable storage medium provided by the embodiments of the present application are used in the scenario of generating a vector map corresponding to the area or spatial range based on the vector data corresponding to the area or spatial range, so as to solve the problem of generating vector maps The problem of lower efficiency.
- the geographical vector data used in vector map tiles is usually stored in the corresponding server.
- a device When a device needs to generate a vector map of the corresponding geographical area, it can first obtain the geographical vector data from the server through network transmission (Input/Output, IO).
- Existing vector map slicing methods usually use a pyramid model to slice vector maps in a top-down or bottom-up manner. For example, as shown in Figure 1, in the pyramid model, the spatial range of the tiles at the upper level is equal to the set of the spatial ranges of the four tiles at the next level. Take the 5-18 level map level slicing requirements as an example:
- the corresponding 5-level grid set can be calculated based on the spatial range of the vector data as the root grid set, and the vector data falling within each 5-level grid can be obtained and converted into 5 levels respectively.
- Level tiles then divide each level 5 grid equally according to the spatial range to obtain four level 6 grids, and obtain the corresponding level 6 tiles based on the level 6 grid; then perform the same process for the level 6 grids
- the 7-level grid is obtained by equal division, and the corresponding 7-level tiles are obtained based on the 7-level grid, and so on, and finally 18-level tiles are obtained.
- the corresponding 18-level grid set can be calculated according to the spatial range of the vector data as the root grid set, and each data in the vector data set to be sliced is summarized into the corresponding 18-level grid. Then we get the 18th level tiles; aggregate every four of the 18th level tiles according to the spatial distribution to get the 17th level tiles, and so on to finally get the 5th level tiles.
- the "tiles" here are "vector tiles”. The two have the same meaning and can be interchanged.
- vector map slicing is uniformly performed starting from a certain level. slice. That is, the vector data in each grid corresponding to the same map level is transmitted to the device in sequence, and then after the device completes receiving the vector data in a grid, it can perform vector map slicing based on the vector data to obtain the corresponding vector tiles. piece.
- the map levels corresponding to the grids are the same, and the amount of data contained in the maps at the same level is not necessarily the same, the amount of vector data in some grids may exceed the carrying capacity of the slicing program, resulting in vector Map slicing failed. It can be seen that the slicing method in the related technology is only suitable for scenes where the vector data is small or distributed evenly.
- the vector map generation method provided by the embodiment of the present application can solve the problem of map vector map slicing in the case of large range and large data volume.
- the embodiment of the present application can adaptively select grids of different map levels as the basis of the distribution density information of the vector data.
- the map levels corresponding to the root grids under the corresponding spatial range, that is, the root grids in the root grid set, are no longer unified. This can avoid the problem of low efficiency of vector map slicing caused by excessive data volume in a single root grid, thereby improving slicing efficiency.
- this application introduces an adaptive segmentation threshold (ie, threshold data density). Based on the adaptive segmentation threshold, data evaluation is performed on the vector data to be sliced, and the root grid set for optimal segmentation is determined based on the evaluation results. Therefore, IO resources and device memory can be reasonably utilized, and the device's computing resources can be fully utilized; While improving slicing speed, it also reduces memory usage, thereby improving slicing efficiency and reducing the risk of slicing failure.
- an adaptive segmentation threshold ie, threshold data density
- the adaptive segmentation threshold can be flexibly changed or specified according to the type of task to be sliced (city, suburb, desert), data volume, slicing requirements, etc. It can adapt to vector map slicing in different scenarios and needs, and has a wide range of applications.
- the grid division in the vector map generation method provided by the embodiment of the present application can be divided into 4 equal parts of the pyramid model used (quadtree slicing, that is, dividing a rectangular grid into four rectangular grids of the same size and shape) , of course, can also be any form of equal division applicable to any parent grid that happens to be completely divided by the child grid.
- the vector map generation method provided by the embodiments of this application is suitable for various vector slicing processes such as single-threaded, multi-threaded or distributed.
- the embodiment of the present application provides a vector map generation method.
- Figure 2 shows a schematic flow chart of the vector map generation method provided by the embodiment of the present application. As shown in Figure 2, the vector map generation method provided by the embodiment of the present application The following steps 201 to 203 may be included. The method is illustrated below by taking a vector map generating device to perform this method as an example.
- Step 201 The vector map generating device obtains the root grid set corresponding to the vector data to be sliced based on the density distribution information of the vector data to be sliced corresponding to the target area.
- the root grid set may include multiple root grids, each root grid in the multiple root grids corresponds to a map level, and the vector data density in each root grid is less than or equal to Preset data density.
- the vector map generating device may be a server or a terminal.
- different root grids in the above multiple root grids may correspond to different map levels; that is, the root grid set includes root grids corresponding to at least one map level.
- the root grid set includes root grids corresponding to three map levels. These three map layers The levels are map level a, map level b, and map level c, and a ⁇ b ⁇ c. It can be seen that in the root grid set shown in Figure 3, the vector map spatial range corresponding to the root grid corresponding to map level a is the largest, and the vector map spatial range corresponding to the root grid corresponding to map level b is the smallest.
- the vector map generating device in the subsequent map vector map slicing process, can perform top-down vector map slicing using each root grid in the root grid set as a unit. That is, the root grid is the basic unit for vector map slicing.
- the above-mentioned preset data density can be determined based on any of the following: determined based on the configuration information of the device and the evaluation results of the tasks to be sliced, also known as artificial designation; determined based on the vector data to be sliced and the number of targets, Also called algorithm-based specification; where the target number is: the number of initial grids corresponding to the vector data to be sliced. This increases flexibility in determining provisioned data density.
- an average vector data can be determined based on the ratio of the vector data to be sliced to the number of targets, and the average vector data can be used as the preset data density.
- step 201 can be specifically implemented through the following steps 201a to 201c.
- Step 201a The vector map generating device obtains an initial grid set corresponding to the vector data to be sliced, and the vector data in each initial grid in the initial grid set.
- Each initial grid corresponds to the first map level. It can be seen that the initial grids in the initial grid set correspond to the same map level; that is, the vector map space ranges corresponding to different initial grids are the same.
- the first map level is determined by one of the following: randomly assigned; determined by geographical parameters of the target area.
- the geographical parameters of the target area may include at least one of the following: a longitude difference of the target area and a latitude difference of the target area.
- step 201a can be implemented through the following steps a) to step c).
- Step a): The vector map generating device can obtain the total spatial range after projection of the vector data to be sliced, and the total spatial range can represent the spatial range of the target area.
- a reasonable map level w is randomly designated, w ⁇ [0, 30], w is a positive integer, and the minimum grid required to cover the total spatial range under this level is calculated as Root grid set.
- the first rule may include: the closest grid or second closest grid to the longitude difference or latitude difference (or longitude difference and latitude difference) of the total spatial range etc., any rules that help determine the map hierarchy.
- Step 201b The vector map generating device divides the vector data in the target initial grid based on the density distribution information of the vector data to be sliced, so as to obtain a plurality of first grids at the next map level of the target initial grid.
- the target initial grid is an initial grid whose vector data density in the initial grid set is greater than the preset data density.
- the vector map generation device can first obtain the vector data density in an initial grid. If the vector data density is greater than the preset data density, the vector data in the initial grid can be equally divided to obtain A plurality of first grids at the next map level of the initial grid.
- the vector map generating device can divide the vector data in the initial grid into four parts to obtain four first grids.
- the data distribution density within the initial grid can be represented by the number of vector data within the corresponding initial grid.
- the number of vector data falling within the spatial range corresponding to each initial grid is queried and counted;
- the data storage size of vector data falling within the spatial range corresponding to each initial grid is queried and counted;
- the slice vector data is sampled according to certain rules, and the number of samples falling within each initial grid is calculated;
- the slice vector data is sampled according to certain rules, and the data storage size of the sample falling within each root grid is calculated.
- Step 201c If the vector data density in the target first grid among the plurality of first grids is greater than the preset data density, the vector map generating device may continue to segment the vector data in the target first grid until segmentation. The vector data density in all grids obtained is less than or equal to the preset data density to obtain the root grid set.
- the root grid set may include: grids obtained after dividing the first grid of each target, and other initial grids in the initial grid set except the target initial grid.
- the number of target first grids is determined based on the density distribution information of the vector data to be sliced.
- steps 201b and 201c after the vector map generation device divides the data in a grid, it can directly delete the grid from the initial grid and divide the data into grids are added to the initial grid set. In this way, the final initial grid set can be used as the root grid set.
- the vector map generation device can evenly divide the vector data in grid 1 according to the spatial position, that is, divide grid 1 into four grids of the next map level of grid 1, namely, grid 4 to grid 7, and grid 4 to grid 7 all correspond to map level 3; if the vector data density in grid 7 is still greater than the threshold data density, then the vector map generation device can evenly divide the vector data in grid 7 according to the spatial position, that is, divide grid 7 into four grids of the next map level of grid 7, namely, grid 8 to grid 11, and grid 8 to grid 11 all correspond to map level 4.
- the root grid set includes: grid 2, grid 3, grid 4 to grid 6, and grid 8 to grid 11. It can be seen that the root grid set includes grids under three map levels.
- the vector map generation device obtains the root grid set, it can also determine the map level corresponding to each root grid and the upper limit map level j. relation.
- the spatial range corresponding to the root grid needs to be adjacent to the root grid and The spatial range corresponding to at least one root grid of the corresponding map level n is aggregated to obtain the parent grid a of the root grid corresponding to the map level (n-1).
- the parent grid a includes the root grid. The vector data and the vector data within the at least one root grid.
- the root grid set will remain unchanged. If the vector data density 1 is less than or equal to the preset data density, the root grid participating in the aggregation will be deleted from the root grid set. And add the parent grid a to the root grid set; and aggregate it accordingly to obtain the parent grid b corresponding to the map level (m-2) of the parent grid a, and determine the vector in the parent grid b The relationship between data density 2 and preset data density.
- the vector data density 2 is greater than the preset data density, it will remain in the root grid set; if the vector data density 2 is less than or equal to the preset data density, all grids participating in the aggregation will be deleted from the root grid set, and Add the parent grid b to the root grid set, and so on, until the vector data density in the aggregated parent grid c corresponding to the map level (mw) is greater than the preset data density, add the parent grid c The subgrid corresponding to the map level (m-w+1) is added to the root grid set, and all grids participating in the aggregation of the subgrid are deleted from the root grid set. In this way, the excessive number of root grids can be avoided, thereby further improving the efficiency of vector map slicing.
- the vector map generation device can first determine whether each initial grid in the initial grid set needs to be aggregated based on the above-mentioned grid aggregation method. After the initial grids that need to be aggregated in the initial grid set are aggregated, the above-mentioned steps 101ab and 101c are performed.
- the above-mentioned preset map level set may include a continuous map level range.
- the map level set may be: [i, j], i ⁇ j, and both i and j are positive integers.
- the above-mentioned preset map level set may include multiple discontinuous map levels, such as map level 1, map level 3, map level 8, and map level 10.
- the above-mentioned preset map level set may include at least two discontinuous map level ranges, such as: [1, 5], [7, 13].
- Step 202 The vector map generating device generates a target vector map tile set based on the vector data in each root grid and the corresponding map level.
- the vector map generation device can perform vector map slicing processing on each root grid according to the vector data in each root grid and the corresponding map level, and obtain all the required data within its corresponding spatial range. Hierarchical vector map tiles. Then, for the root grid whose map level is greater than the lower limit map level of the required tile level set, the vector map generation device can continue to obtain the required vector tiles by aggregating the obtained corresponding vector tiles. Vector map tiles for all map levels. This can better cope with the situation where the data density of the vector data to be sliced is large. Details will be described in the following examples.
- the above step 202 may include the following steps A1 to A2.
- the first condition includes: the map level corresponding to the root grid is greater than the lower limit map level i in the preset map level set, and is less than the upper limit map level j in the preset map level set, i, j and n are all positive integers. .
- Step A1 The vector map generating device converts vector data in a root grid into vector map tiles corresponding to the root grid.
- the vector map tile corresponding to the root grid also corresponds to map level n. That is to say, if a vector map tile corresponds to a grid, then the vector map tile corresponds to the same map level as the grid.
- Step A2 The vector map generating device divides the vector data in a root grid until a plurality of second grids corresponding to the map level f of a root grid are obtained; and divides the vector data in the plurality of second grids.
- the vector data is converted into a plurality of vector map tiles corresponding to the plurality of second grids, until the vector data in the plurality of third grids is converted into a plurality of vector map tiles corresponding to the plurality of third grids. vector map tiles.
- the plurality of third grids may include all grids corresponding to the upper limit map level j of a root grid.
- the target vector map tile set may include: a vector map tile corresponding to a root grid, a plurality of vector map tiles corresponding to a plurality of second grids, and a plurality of third grids.
- Map level f is the map level with the smallest difference from map level n in the preset map level set.
- n, i, j and f are all positive integers, and i ⁇ n ⁇ f ⁇ j. That is, the target vector map tile set may include all vector tiles obtained in steps A1 and A2.
- the release time of the vector data in the plurality of third grids is determined by the first time, and the first time is the time to obtain a plurality of vector map tiles corresponding to the plurality of third grids.
- the vector data in each second grid can be converted into a vector map tile corresponding to the map level f, that is, each second grid corresponds to a vector map tile corresponding to the map level f.
- the vector data in each third grid can be converted into a vector map tile corresponding to the upper limit map level j, that is, each third grid corresponds to a vector map tile corresponding to the upper limit map level j.
- the release time of the vector data in the plurality of third grids is determined by the first time
- the vector map generating device releasing the vector data in the plurality of third grids can be understood as: the vector map generating device deletes the vector data in the plurality of third grids from the memory or disk to avoid unnecessary Vector data takes up too much memory and affects the efficiency of slicing processing of subsequent vector data in the root grid.
- the vector map generating device may perform the above steps A1 to A2 on all root grids whose map levels in the root grid set satisfy the first condition.
- the vector data in the root grid in map level 5 is converted into a vector map tile corresponding to the root grid. Then, the vector data in the root grid is divided to obtain multiple grids 1 corresponding to map level 6 (i.e. map level f) of the root grid, and the vector data in the multiple grids 1 are converted into A plurality of vector map tiles corresponding to the plurality of grids 1 one-to-one. Then divide the vector data in each grid 1 to obtain multiple grids 2 corresponding to the map level 7 of each grid 1, and convert the vector data in the multiple grids 2 into the same vector data as the multiple grids 2.
- Grid 2 is a one-to-one correspondence between multiple vector map tiles.
- the vector data in each grid 2 is then divided to obtain multiple grids 3 corresponding to the map level 8 of each grid 2, and the vector data in the multiple grids 3 are converted into the same vector data as the multiple grids 3.
- Grid 3 has one-to-one correspondence between multiple vector map tiles.
- the vector map generating device can release vector data in multiple grids 3 , that is, the first time and the second time are the same.
- the target vector map tile set may include: a vector map tile corresponding to the root grid, a plurality of vector map tiles corresponding to the plurality of grids 1, and a vector map tile corresponding to the plurality of grids 1.
- a plurality of vector map tiles corresponding one-to-one to grid 2 and a plurality of vector map tiles corresponding one-to-one to grid 3.
- vector map slicing can be processed according to the above example. In order to avoid duplication, it will not be described again here.
- the above step 202 may include the following steps B1 to B2.
- the second condition includes: the map level corresponding to the root grid is less than the lower limit map level i in the preset map level set, i and n are positive integers, and n ⁇ i.
- Step B1 the vector map generating device divides the vector data in a root grid until a plurality of fourth grids corresponding to the lower limit map level i of the root grid are obtained; and the vector data in the plurality of fourth grids are converted into a plurality of vector map tiles corresponding to the plurality of fourth grids one by one.
- Step B2 The vector map generating device divides the vector data in multiple fourth grids until multiple fifth grids corresponding to the map level g of a root grid are obtained; and divides the vector data in multiple fifth grids into The vector data in the multiple fifth grids are in one-to-one correspondence with multiple vector map tiles, until the vector data in the multiple third grids are converted into multiple vector maps that are in one-to-one correspondence with the multiple third grids. tiles.
- the plurality of third grids may include all grids corresponding to the upper limit map level j of a root grid.
- the map level g is the map level with the smallest difference from the lower limit map level i in the preset map level set, and g is positive Integer, n ⁇ i ⁇ g ⁇ j, and n, i, g, j are positive integers.
- the target vector map tile set may include: a plurality of vector map tiles in one-to-one correspondence with a plurality of fourth grids, a plurality of vector map tiles in a one-to-one correspondence with a plurality of fifth grids, and a plurality of vector map tiles in one-to-one correspondence. Multiple vector map tiles in one-to-one correspondence with the third grid.
- the release time of the vector data in the plurality of third grids is determined by a first time, and the first time is to obtain a plurality of vector map tiles corresponding to the plurality of third grids one-to-one. film time.
- the first time is to obtain a plurality of vector map tiles corresponding to the plurality of third grids one-to-one. film time.
- the vector map generating device may perform the above-mentioned steps B1 to B2 for all root grids whose map levels in the root grid set satisfy the second condition.
- the root grid can be Split the vector data within the root grid to obtain multiple grids corresponding to map level 4 of the root grid; then split the vector data within each grid in the multiple grids respectively to obtain the corresponding grids of the root grid.
- the vector data in each grid 4 in the plurality of grids 4 is then divided to obtain multiple grids 5 corresponding to the map level 6 (i.e. map level g) of the root grid, and the multiple grids 5 are
- the vector data in the grid 5 is converted into a plurality of vector map tiles corresponding to the plurality of grids 5 one-to-one.
- the vector data in each grid 5 in the plurality of grids 5 is divided to obtain a plurality of grids 6 at the map level 7 corresponding to each root grid, and the vector data in the plurality of grids 6 are Convert into a plurality of vector map tiles corresponding to the plurality of grids 6 one-to-one.
- the target vector map tile set may include: a plurality of vector map tiles that correspond to the plurality of grids 4 in a one-to-one manner, and a plurality of vector map tiles that correspond to the plurality of grids 5 in a one-to-one manner. , and a plurality of vector map tiles corresponding to the plurality of grids 6 one-to-one.
- All root grids with a map level less than 5 in the root grid collection can be processed according to the above example. In order to avoid duplication, they will not be described again here.
- the vector data in the root grid can be directly divided at least once to obtain the corresponding map level of the root grid.
- Multiple fourth grids at the lower limit of the map level and then perform slicing processing based on the vector data in the multiple fourth grids. processing, that is, there is no need to generate vector tiles between map level n and the lower limit map level; therefore, not only can vector tiles of each map level within the default map level set corresponding to the root grid be obtained, but the vector map can also be further reduced The duration of the slice. This can further improve the efficiency of vector map slicing.
- the above step 202 may include the following step C1.
- the third condition includes: the map level corresponding to the root grid is greater than or equal to the upper limit map level j in the preset map level set, n and j are both positive integers, and n ⁇ j.
- Step C1 The vector map generating device converts vector data in a root grid into vector map tiles corresponding to the root grid.
- the target vector map tile set includes: vector map tiles corresponding to a root grid; the release time of vector data in a root grid is determined by the time to obtain the vector map tiles corresponding to a root grid. .
- the release time of the vector data in the root grid please refer to the relevant description of "the release time of the vector data in multiple third grids" in the above-mentioned possible implementation manner.
- the vector map generating device may perform the above-mentioned step C1 for all root grids whose map levels in the root grid set satisfy the third condition.
- map level 10 can be The vector data in each root grid in is converted into vector map tiles corresponding to map level 10. Then release the vector data within that root grid.
- vector map tiles in yet another possible implementation described above are used to obtain vector map tiles of corresponding map levels in the preset map level set through tile aggregation.
- the vector data in the root grid can be directly converted into vector map tiles, so that the vector map generating device
- the tile aggregation method can be used to obtain the vector map tile corresponding to the corresponding parent grid of the root grid; thus, there is no need to convert the vector data in the corresponding parent grid to obtain the vector corresponding to the corresponding parent grid.
- Map tiles so you can avoid vector map slicing taking a long time or vector map slicing failing due to too large vector data in the grid.
- the lightweight map tile corresponding to the parent grid is based on the Sub-vector map tiles are directly aggregated, which can reduce memory overflow and avoid the possibility of IO transmission timeout, thereby increasing system robustness.
- the vector map generating device generates vector data in a root grid in the root grid set according to one of the above possible implementations, another possible implementation, or yet another possible implementation. After the vector map slicing process, the vector map generating device can continue to perform corresponding vector map slicing processing on the vector data in the next root grid in the root grid set until the last root grid in the root grid set is completed. Vector map tile processing of vector data within.
- the above step 202 may also include the following steps D1 and D2.
- Step D1 If the map level n corresponding to a root grid is greater than the lower limit map level i, the vector map generation device aggregates the vector map tiles corresponding to at least two first root grids to obtain the vector map tiles corresponding to the first parent grid. The corresponding first vector map tile; and replace at least two first root grids in the root grid collection with the first parent grid.
- the at least two first root grids include: the one root grid, and the first parent grid is the parent grid of the corresponding map level (n-1) of the one root grid.
- Step D2 If the map level (n-1) is greater than the lower limit map level i, the vector map generating device aggregates the vector map tiles corresponding to at least two second root grids to obtain the vector map tiles corresponding to the second parent grid. second vector map tiles; and replace the at least two second root grids in the root grid set with the second parent grids until a vector map tile corresponding to the third parent grid is obtained by aggregation.
- the at least two second root grids include a first parent grid
- the second parent grid is the parent grid of the corresponding map level (n-2) of the one root grid
- the third parent grid is The root grid is the parent grid corresponding to the lower limit map level i.
- steps D1 and D2 can be executed after the above three possible implementation methods, that is, after the electronic device completes the release of the vector data of all grids in the root grid set.
- the vector map generation device can determine the relationship between the maximum map level and the lower limit map level i corresponding to the root grid set. If the maximum map level is less than or equal to the lower limit map level i, the vector map generation device can determine that the map slicing is completed, which means that all the information needed to generate the vector map corresponding to the target area can be obtained through top-down slicing. Vector map tiles. If the maximum map level is greater than the lower limit map level i, the vector map generation device can find the root grid in the root grid set whose map level is greater than the lower limit map level i, and perform the above steps D1 and steps on the found root grid. D2.
- the lower limit map level i in the preset map level set is 4, and assume that root grid 1 in the root grid set corresponds to map level 6, and the parent grid of root grid 1 corresponding to map level 5 is Grid A, and the other subgrids of grid A corresponding to map level 6 include the root grid set corresponding to map level 6: root grid 2, root grid 3 and root grid 4, then: vector map generation
- the vector map generating device can generate vector map tiles corresponding to root grid 1, vector map tiles corresponding to root grid 2,
- the vector map tiles corresponding to root grid 3 and the vector map tiles corresponding to root grid 4 are aggregated to obtain the vector map tiles corresponding to grid A.
- the parent grid of grid A corresponding to map level 4 is grid B
- other sub-grids of grid B corresponding to map level 5 include the root grid corresponding to map level 4 in the root grid set: 5.
- Root Grid 6 and Root Grid 7 then: Since the map level 5 corresponding to Grid A is > 4, the vector map generation device can convert the vector map tiles corresponding to Grid A to those corresponding to Root Grid 5.
- the vector map tiles of , the vector map tiles corresponding to root grid 6 and the vector map tiles corresponding to root grid 7 are aggregated to obtain the vector map tiles corresponding to grid B; and the root grid is concentrated Root Grid 5 to Root Grid 7 and Grid A replaced with Grid B.
- the vector map generation device can continue to determine whether the root grid set includes a root grid whose corresponding map level is less than the lower limit map level i. If so, the corresponding vector map tiles are aggregated until the root grid set contains The map levels corresponding to all root grids are greater than or equal to the lower limit map level i.
- steps D1 and D2 obtain the corresponding vector map tiles in a bottom-up manner.
- target vector map tile set may also include vector map tiles obtained through steps D1 and D2.
- the root grid set when the root grid set includes a root grid whose map level is greater than the lower limit map level in the preset map level set, it can be directly aggregated by the vector map tiles corresponding to the corresponding root grid to obtain the required Map-level vector map tiles, instead of reading all the data in the corresponding grid to obtain the required map-level vector map tiles, thus avoiding network transmission timeouts and reducing memory overflow, thereby improving vector Map slicing efficiency.
- the process of generating a target vector map tile set based on the vector data in each root grid and the corresponding map level in the present application can also be called a process of adaptive vector map slicing.
- FIG. 4 is a schematic diagram of slicing efficiency and memory usage corresponding to the top-down slicing method in the related art
- FIG. 4 is an adaptive vector in an embodiment of the present application. Schematic diagram of slicing efficiency and memory usage corresponding to the map slicing method.
- the length of each box in the row corresponding to "IO” in Figure 4 indicates: the transmission time of vector data within a root grid.
- the length of each filled box in the row corresponding to "CPU” in Figure 4 represents: the spatial duration of the processing unit of the vector map generation device; the length of each blank box in the row corresponding to "CPU” represents: one The processing time of vector data in the root grid; the total length of all blank boxes in the row corresponding to "CPU” indicates: the total time of data processing by the processing unit in the corresponding slicing mode.
- Different blank boxes in the rows corresponding to "IO” and “CPU” in Figure 4 represent different root grids.
- the value corresponding to "memory” in Figure 4 is: the amount of memory occupied by vector data per unit time, and the larger the number, the greater the amount of memory occupied.
- the transmission of vector data in each root grid in this application takes less time, and the processing unit of the vector map generation device has less idle time during the entire slicing process. Moreover, the vector data in each grid occupies less time and less memory on the vector map generating device. Therefore, the adaptive vector map slicing method provided by the embodiment of the present application can make more reasonable use of various resources of the vector map generation device, such as computing resources.
- the adaptive vector map slicing method in the embodiment of the present application significantly reduces the memory usage during the slicing process and improves the slicing efficiency by three points when the data volume is large and the spatial range is large. About one.
- Step 203 The vector map generating device obtains a regional vector map corresponding to the target area based on the target vector map tile set.
- the preset map level set corresponding to the vector data to be sliced includes M map levels, and M is an integer greater than 1.
- the above step 203 can be specifically implemented through the following step 203a.
- Step 203a Based on the M map levels, the vector map generating device splices the vector tiles corresponding to the same map level in the target vector map tile set to obtain M map layers.
- M map levels include: map level 3 and map level 4
- the target vector map tile set includes: vector map tiles corresponding to map level 3, vector map tiles corresponding to map level 4, and corresponding
- the vector map generation device can splice the vector map tiles corresponding to map level 3 into map layer 3, and splice the vector map tiles corresponding to map level 4 into map layer 4. It can be seen that the vector map tiles corresponding to map level 5 are only used to participate in the aggregation of the corresponding vector map tiles corresponding to map level 4, that is, the vector map tiles corresponding to map level 5 belong to the intermediate amount.
- Step 203b The vector map generating device obtains a regional vector map corresponding to the target area based on the M map layers.
- the vector map generating device can arrange or combine the M map layers in an order of increasing map levels to obtain a regional vector map corresponding to the target area.
- the vector map generating device may convert M The map layers are arranged or combined in order of decreasing map levels to obtain a regional vector map corresponding to the target area.
- the electronic device can split the slicing task more reasonably, so that the grid set can The vector data density in each root grid is smaller than the preset data density, and the split vector data is adaptively split and sliced, thereby improving the efficiency of vector map slicing, and thus improving the efficiency of generating vector maps.
- the vector map generating device may perform the above step 201 after receiving a vector map request, where the vector map request is used to request a regional vector map corresponding to the target area, and the vector map request may include a vector map indicating the target area.
- the vector map generating device can send the area vector map to the target terminal, so that the target terminal can output the area corresponding to the target area after receiving the target vector map tile set.
- Vector map where the target terminal is the terminal that sends the vector map request, such as a mobile phone.
- the vector map generating device can directly output the regional vector map.
- the vector map generating device can also directly send the target vector map tile set to the target terminal, so that after the target terminal receives the target vector map tile set, based on the target vector map tile set, the target terminal obtains the combined Output the regional vector map corresponding to the target area.
- levels all refer to “map levels”, and they have the same meaning and are interchangeable; the "tiles” below all refer to “vector map tiles”, and they have the same meaning and are interchangeable.
- Embodiments of the present application provide a high-efficiency vector map generation method to solve the problem of low efficiency of vector map slicing in large-scale and large-data situations.
- This method can be summarized as follows: after the user specifies the required map level set (i.e., the preset map level set) and the vector data to be sliced, this method can adaptively obtain the data density of the root grid set based on the data range and data volume. , and then select grids at different levels as the root grid under the corresponding spatial range (that is, the spatial range corresponding to the target area). After that, each root grid is segmented in a top-down manner to obtain all required levels of tiles within its spatial range.
- the required map level set i.e., the preset map level set
- this method can adaptively obtain the data density of the root grid set based on the data range and data volume. , and then select grids at different levels as the root grid under the corresponding spatial range (that is, the spatial range corresponding to the target area). After that,
- the level of the root grid i.e., the map level corresponding to the root grid
- the minimum level of the required tile level range i.e., the lower limit map level
- the vector map generation method provided by the embodiment of the present application may include the following steps 501 to 508.
- Step 501 Obtain the root grid set.
- the subsequent map slicing process can be performed from top to bottom with each root grid in the root grid set as a unit.
- step 501 can be specifically implemented through the following steps 501a and 501b.
- Step 501a Obtain the total spatial range after projection of the vector data to be sliced.
- the total spatial range is the spatial range corresponding to the target area.
- Step 501b Acquire a root grid set according to the total spatial range.
- the acquisition of the root grid set can be randomly assigned or determined by the geographical parameters of the target area.
- random assignment means randomly assigning a reasonable map level n (n ⁇ [0,30]) and calculating the total number of The minimum grid required to cover the total spatial range is taken as the root grid set; the geographical parameters of the target area are determined based on the total spatial range, the longitude and latitude differences of the spatial range are calculated, and the level n where the grids that meet certain rules are located are found based on the longitude or latitude differences, and the minimum grid required to cover the spatial range at level n is calculated as the root grid set.
- Certain rules can refer to the grid whose longitude or latitude difference (or longitude and latitude difference) is closest to the longitude or latitude difference (or longitude and latitude difference) of the total spatial range obtained, or the grid that is second closest, etc. These rules or conditions are conducive to determining the map level.
- Step 502 Obtain the adaptive segmentation threshold.
- the "adaptive segmentation threshold" is the above-mentioned preset data density.
- the adaptive segmentation threshold is the number of vector data or a value representing a specific space size. That is, when the density of vector data in a root grid exceeds the threshold, the root grid is evenly divided to obtain a hierarchically larger grid. subgrid.
- the adaptive segmentation threshold can be obtained manually or algorithmically.
- Manual designation refers to determining a reasonable value based on experience after evaluating the machine's processing power and memory configuration combined with the task to be sliced;
- algorithm designation refers to calculation or estimation based on parameters such as the total amount of data to be sliced and the range of the number of root grids.
- the average data volume in each root grid can be obtained through the total data volume/number of root grids, and the average data volume is used as adaptive slicing. threshold.
- Step 503 Obtain the data density distribution information of the root grid.
- the data distribution density information of the root grid can be represented by the amount of data within the root grid.
- the number of vector data falling within the spatial range corresponding to each root grid is queried and counted
- the data storage size of vector data falling within the spatial range corresponding to each root grid is queried and counted;
- the slice vector data is sampled according to certain rules, and the number of samples falling within each root grid is calculated;
- the slice vector data is sampled according to certain rules, and the data storage size of the sample falling within each root grid is calculated.
- root grid set in step 503 can also be called the "initial grid set”.
- Step 504 Determine the relationship between the amount of data in the root grid and the adaptive segmentation threshold.
- step 506 when the amount of data in a root grid is less than or equal to the adaptive segmentation threshold, perform the following steps 506; when the amount of data in a root grid is greater than the adaptive segmentation threshold, perform the following steps 505, and after step 505 is executed, step 504 is continued.
- Step 505 Equalize the root grid.
- the root grid when the amount of data in a root grid is greater than the adaptive splitting threshold, the root grid can be divided into four sub-grids, and The root grid is removed from the root grid collection and the four subgrids are added to the root grid collection. And jump to step 503 to continue execution to determine the relationship between the amount of data in each of the four sub-grids and the adaptive segmentation threshold, until the amount of data in all sub-grids obtained by segmentation is less than or equal to Adaptive segmentation threshold.
- map levels k and j corresponding to the subgrid that was most recently added to the root grid set If k>j, you need to aggregate the spatial ranges corresponding to the adjacent k-level root grids to obtain k-1
- the parent grid of the layer get The amount of data in the parent grid and determine the relationship with the adaptive segmentation threshold. If the amount of data in the parent grid is less than or equal to the segmentation threshold, the grids participating in the aggregation will be deleted from the root grid set and the aggregated parent grid will be deleted.
- the grid is added to the root grid set; if the data volume of the parent grid is greater than the segmentation threshold, the spatial range aggregation of the k-level root grid and adjacent root grids is cancelled, the k-1 level parent grid is deleted, and the root grid The set remains unchanged.
- Step 506 Vector map slicing.
- the vector map slicing in the embodiment of the present application is not limited to the 4 equal divisions of the pyramid model used (quadtree slicing, that is, dividing a rectangular grid into four rectangular grids of the same size and shape), but is applicable to any Any form of equal division in which the parent grid happens to be completely split by child tiles.
- the vector map slicing in the embodiment of this application is suitable for various vector slicing processes such as single-threaded, multi-threaded or distributed.
- the above step 506 may specifically include the following steps 506a to 506g.
- Step 506a Obtain the vector data in a root grid in the root grid set and treat each root grid as a normal grid.
- Step 506b If the map level n of the grid is less than i, then the following step 506g is executed.
- Step 506c If the map level n of the grid is equal to i, then the vector data in the grid is saved as tiles, and the following step 506g is continued;
- Step 506d When the map level n of the grid belongs to any level in the (i, j) interval, the vector data in the grid is saved as tiles, and the following step 506g is continued;
- Step 506e If the map level n is equal to j, then the vector data in the grid is saved as tiles, and the above step 506a is continued, that is, step 506a is performed on the next root grid. And so on until all root grids in the root grid set are traversed.
- Step 506f When the map level n of the grid is equal to j and it is the last grid under the corresponding root grid, the vector data in the grid is saved as a tile, and all the data of the corresponding root grid is released.
- Step 506g Divide the vector data in the grid into four n+1-level subgrids of the same size and shape according to the spatial range, and continue to perform the above step 506b for each subgrid.
- Step 507 Determine the relationship between the maximum map level in the root grid set and the required map level set [i, j].
- the maximum map level in the root grid set is map level n
- the map level n is less than or equal to the lower limit map level i
- the map slicing ends.
- the map level n is greater than the lower limit map level i
- the following step 508 is executed.
- Step 508 Aggregate tiles corresponding to corresponding root grids in the root grid set.
- step 508a first find an n-level grid in the root grid set whose map level is greater than the lower limit map level i;
- Step 508b Obtain other n-level subgrids corresponding to the (n-1)-level parent grid of the n-level grid; and combine the vector map tiles corresponding to the n-level grid with the other n-level subgrids.
- the vector map tiles corresponding to the grid are aggregated.
- the n-level grid and the other n-level sub-grids are deleted from the root grid set, and the aggregated (n-1) level grids are added to the root grid set. And continue to perform the above step 508a.
- step 508 the map levels corresponding to all root grids in the root grid set are less than or equal to the lower limit map level i.
- Steps 502 to 505 obtain a root grid set that changes adaptively according to the density distribution of the vector data to be sliced, and reasonably split the slicing tasks according to the data volume to reasonably utilize IO;
- Step 506 makes full use of computing resources and timely releases completed slicing tasks based on the reasonably split tasks, reducing memory usage and improving slicing efficiency;
- Steps 507 and 508 can well cope with the situation of large data volume in a single grid.
- the tiles corresponding to the grid with large data volume no longer need to read all the data in the grid, but are directly aggregated from lightweight sub-tiles, which reduces the possibility of memory overflow and IO transmission timeout, and increases the robustness of the system.
- the above adaptive segmentation threshold can be implemented by an artificial intelligence algorithm.
- the artificial intelligence algorithm can calculate the most reasonable threshold based on the slicing task type, slicing data type, slicing data range, slicing data amount, etc.
- the adaptive slicing threshold can even directly calculate the most reasonable root grid set, that is, adaptive vector slicing is more artificially intelligent.
- the execution subject may be a vector map generation device.
- the method of generating a vector map performed by a vector map generation device is taken as an example to illustrate the device for generating a vector map provided by the embodiment of this application.
- Figure 6 shows a possible structural schematic diagram of the vector map generating device involved in the embodiment of the present application.
- the vector map generating device 60 may include: an acquisition module 61 and a processing module 62 .
- Figure 6 shows a possible structural schematic diagram of the vector map generating device involved in the embodiment of the present application.
- the application icon display device 60 may include: an acquisition module 61 and a processing module 62 .
- the acquisition module 61 is used to obtain a root grid set corresponding to the vector data to be sliced based on the density distribution information of the vector data to be sliced corresponding to the target area.
- the root grid set includes multiple root grids. Each root grid in corresponds to a map level, and the vector data density in each root grid is less than or equal to the preset data density; the processing module 62 is used to based on the vector data in each root grid and the corresponding Obtain and generate a target vector map tile set; the processing module is also used to obtain a regional vector map corresponding to the target area based on the target vector map tile set.
- the above-mentioned acquisition module 61 includes an acquisition sub-module and a processing sub-module; the acquisition sub-module is used to acquire the initial grid set corresponding to the vector data to be sliced, and each initial grid set in the initial grid set.
- each initial grid corresponds to the first map level; the processing sub-module is used to segment the vector data in the target initial grid based on the density distribution information obtained by the above-mentioned acquisition sub-module to obtain the target
- the target initial grid is the initial grid whose vector data density is greater than the preset data density in the initial grid set; and if the target in the multiple first grids If the density of vector data in the first grid is greater than the preset data density, continue to divide the vector data in the first grid of the target until the density of vector data in all grids obtained after division is less than or equal to the preset data. Density to get the root grid set.
- the above first map level is determined by one of the following:
- the geographical parameters include at least one of the following: longitude difference of the target area and latitude difference of the target area.
- the above-mentioned processing module 62 is specifically used for one of the root grids in the root grid set, when the map level n corresponding to a root grid is greater than the lower limit map in the preset map level set.
- level i is smaller than the upper limit map level j in the default map level set:
- the target vector map tile set includes: a vector map tile corresponding to the one root grid, a plurality of vector map tiles corresponding to the plurality of second grids, and the vector map tiles corresponding to the plurality of second grids.
- Multiple vector map tiles in one-to-one correspondence with multiple third grids map level f is the map level with the smallest difference from map level n in the preset map level set, n, i, j and f are all positive integers, And i ⁇ n ⁇ f ⁇ j; the release time of the vector data in the plurality of third grids is determined by the first time, and the first time is to obtain the data one by one with the plurality of third vector map tiles. Corresponding times for multiple vector map tiles.
- the processing module 62 is specifically configured to, for one of the root grids in the root grid set, when the map level n is less than the lower limit map level i:
- the vector data in the plurality of fourth grids are respectively divided until a plurality of fifth grids corresponding to the map level g of a root grid are obtained; and the vector data in the plurality of fifth grids are respectively converted into vector map tiles corresponding to the map level g, until the vector data in the plurality of third grids are respectively converted into vector map tiles corresponding to the upper limit map level j; the plurality of third grids include all grids of the root grid corresponding to the upper limit map level j;
- the map level g is the map level with the lower limit difference from the lower limit map level i in the preset map level set, n ⁇ i ⁇ g ⁇ j, and n, i, g, j are positive integers;
- the target vector map tile set includes: a plurality of vector map tiles corresponding to the plurality of fourth grids, and a plurality of vector map tiles corresponding to the plurality of fifth grids. , a plurality of vector map tiles corresponding one-to-one to the plurality of third grids;
- the release time of the vector data in the plurality of third grids is determined by a first time, and the first time is to obtain a plurality of vector map tiles that correspond one-to-one to the plurality of third vector map tiles. time.
- the above-mentioned processing module 62 is specifically configured to target one of the root grids in the root grid set, when the map level n is greater than or equal to the upper limit map level j:
- the target vector map tile set includes: vector map tiles corresponding to the one root grid;
- the release time of the vector data in the one root grid is determined by the time when the vector map tile corresponding to the one root grid is obtained.
- the above-mentioned processing module 62 is also configured to: after completing the release of the vector data of all grids in the root grid set:
- the vector map tiles converted from the vector data in at least two first root grids are aggregated to obtain the first vector map tile corresponding to the map level (n-1) piece; and replace at least two first root grids in the root grid set with the first parent grid; at least two first root grids include one root grid, and the first parent grid is at least two The parent grid of the first grid corresponding to the map level (n-1);
- map level (n-1) is greater than the lower limit map level i
- the vector map tiles converted from the vector data in at least two second root grids are aggregated to obtain the corresponding map level (n-2).
- the grid includes the first parent grid, and the second parent grid is The parent grids of at least two second root grids corresponding to map level (n-2).
- the preset map level set corresponding to the vector data to be sliced includes M map levels, where M is an integer greater than 1;
- the above processing module 62 is specifically used for:
- the above preset data density is determined according to any of the following:
- the target number is: the number of initial grids corresponding to the vector data to be sliced.
- Embodiments of the present application provide a vector map slicing generation device. Since the root grid set can be obtained according to the density distribution information of the vector data to be sliced, the electronic device can split the slicing task more reasonably, so that the grid set can The vector data density in each root grid is smaller than the preset data density, and the split vector data is adaptively split and sliced, thereby improving the efficiency of vector map slicing, and thus improving the efficiency of generating vector maps.
- the vector map generating device in the embodiment of the present application may be an electronic device or a component in the electronic device, such as an integrated circuit or a chip.
- the electronic device may be a terminal or other devices other than the terminal.
- the electronic device can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a mobile internet device (Mobile Internet Device, MID), or augmented reality (AR)/virtual reality (VR).
- the vector map generating device in the embodiment of the present application may be a device with an operating system.
- the operating system can be an Android operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of this application.
- the vector map generation device provided by the embodiment of the present application can implement various processes implemented by the method embodiments of Figures 2 to 5. To avoid duplication, they will not be described again here.
- this embodiment of the present application also provides an electronic device 700, including a processor 701 and a memory 702.
- the memory 702 stores programs or instructions that can be run on the processor 701.
- each step of the above embodiment of the vector map generation method is implemented, and the same technical effect can be achieved. To avoid duplication, the details will not be described here.
- FIG. 8 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
- the electronic device 800 includes but is not limited to: radio frequency unit 801, network module 802, audio output unit 803, input unit 804, sensor 805, display unit 806, user input unit 807, interface unit 808, memory 809, processor 810, etc. part.
- the electronic device 800 may also include a power supply (such as a battery) that supplies power to various components.
- the power supply may be logically connected to the processor 810 through a power management system, thereby managing charging, discharging, and function through the power management system. Consumption management and other functions.
- the structure of the electronic device shown in Figure 8 does not constitute a limitation on the electronic device.
- the electronic device may include more or fewer components than those shown in the figure, or some components may be combined. Or different component arrangements, which will not be described again here.
- the input unit 804 is used to obtain the root grid set corresponding to the vector data to be sliced based on the density distribution information of the vector data to be sliced corresponding to the target area, the root grid set includes multiple root grids, each of the multiple root grids corresponds to a map level, and the vector data density in each root grid is less than or equal to the preset data density; the processor 810 is used to generate a target vector map tile set based on the vector data in each root grid and the corresponding acquisition; the processing module is also used to obtain the regional vector map corresponding to the target area based on the target vector map tile set.
- the processor 810 is used to obtain an initial grid set corresponding to the vector data to be sliced, and the vector data in each initial grid in the initial grid set, each initial grid corresponding to the first map level; the processor 810 is also used to segment the vector data in the target initial grid based on the density distribution information to obtain multiple first grids of the next map level of the target initial grid, the target initial grid being an initial grid in the initial grid set whose vector data density is greater than a preset data density; and if the vector data density in the target first grid in the multiple first grids is greater than the preset data density, the vector data in the target first grid continues to be segmented until the vector data density in all grids obtained after segmentation is less than or equal to the preset data density to obtain a root grid set.
- the above-mentioned first map level is determined by one of the following:
- the geographical parameters include at least one of the following: longitude difference of the target area and latitude difference of the target area.
- the above-mentioned processor 810 is specifically configured to target one of the root grids in the root grid set, and the map level n corresponding to a root grid is greater than the lower limit map level i in the preset map level set, and is less than In the case of the upper limit map level j in the default map level set:
- the target vector map tile set includes: a vector map tile corresponding to the one root grid, a plurality of vector map tiles corresponding to the plurality of second grids, and the vector map tiles corresponding to the plurality of second grids.
- Multiple vector map tiles in one-to-one correspondence with multiple third grids map level f is the map level with the smallest difference from map level n in the preset map level set, n, i, j and f are all positive integers, And i ⁇ n ⁇ f ⁇ j; the release time of the vector data in the plurality of third grids is determined by the first time, and the first time is to obtain the data one by one with the plurality of third vector map tiles. Corresponding times for multiple vector map tiles.
- the above processor 810 is specifically configured to target one of the root grids in the root grid set, when the map level n is less than the lower limit map level i:
- the map level g is the map level with the lower limit difference from the lower limit map level i in the preset map level set, n ⁇ i ⁇ g ⁇ j, and n, i, g, j are positive integers;
- the target vector map tile set includes: a plurality of vector map tiles corresponding to the plurality of fourth grids, and a plurality of vector map tiles corresponding to the plurality of fifth grids. , a plurality of vector map tiles corresponding one-to-one to the plurality of third grids;
- the release time of the vector data in the plurality of third grids is determined by a first time, and the first time is to obtain a plurality of vector map tiles that correspond one-to-one to the plurality of third vector map tiles. time.
- the above processor 810 is specifically configured to target one of the root grids in the root grid set, when the map level n is greater than or equal to the upper limit map level j:
- the target vector map tile set includes: vector map tiles corresponding to the one root grid;
- the release time of the vector data in the one root grid is determined by the time when the vector map tile corresponding to the one root grid is obtained.
- the above-mentioned processor 810 is also configured to: after completing the release of the vector data of all grids in the root grid set:
- the vector map tiles converted from the vector data in at least two first root grids are aggregated to obtain the first vector map tile corresponding to the map level (n-1) piece; and replace at least two first root grids in the root grid set with the first parent grid; at least two first root grids include one root grid, and the first parent grid is at least two The parent grid of the first grid corresponding to the map level (n-1);
- the vector map tiles converted from the vector data in at least two second root grids are aggregated to obtain the second vector map tiles corresponding to the map level (n-2); and at least two second root grids in the root grid set are replaced with the second parent grid until the vector map tiles corresponding to the lower limit map level i are aggregated; the at least two second root grids include the first parent grid, and the second parent grid is the parent grid of the corresponding map level (n-2) of the at least two second root grids.
- the preset map level set corresponding to the vector data to be sliced includes M map levels, where M is an integer greater than 1;
- the above-mentioned processor 810 is specifically used for:
- the preset data density is determined according to any one of the following items:
- the target number is: the number of initial grids corresponding to the vector data to be sliced.
- Embodiments of the present application provide a vector map slicing generation device. Since the root grid set can be obtained according to the density distribution information of the vector data to be sliced, the electronic device can split the slicing task more reasonably, so that the grid set can The vector data density in each root grid is smaller than the preset data density, and the split vector data is adaptively split and sliced, thereby improving the efficiency of vector map slicing, and thus improving the efficiency of generating vector maps.
- the input unit 804 may include a graphics processing unit (GPU) 8041 and a microphone 8042.
- GPU graphics processing unit
- the display unit 806 may include a display panel 8061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
- the input unit 804 includes a touch panel 8071 and at least one of other input devices 8072 .
- Touch panel 8071 also known as touch screen.
- the touch panel 8071 may include two parts: a touch detection device and a touch controller.
- Other input devices 8072 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be described again here.
- Memory 809 can be used to store software programs as well as various data.
- the memory 809 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, Image playback function, etc.) etc.
- memory 809 may include volatile memory or non-volatile memory, or memory 809 may include both volatile and non-volatile memory.
- non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory.
- Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM) , SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM).
- RAM Random Access Memory
- SRAM static random access memory
- DRAM dynamic random access memory
- synchronous dynamic random access memory Synchronous DRAM, SDRAM
- Double data rate synchronous dynamic random access memory Double Data Rate SDRAM, DDRSDRAM
- Enhanced SDRAM, ESDRAM synchronous link dynamic random access memory
- Synch link DRAM synchronous link dynamic random access memory
- SLDRAM direct memory bus random access memory
- the processor 810 may include one or more processing units; optionally, the processor 810 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface, application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the above modem processor may not be integrated into the processor 810.
- Embodiments of the present application also provide a readable storage medium.
- Programs or instructions are stored on the readable storage medium.
- each process of the vector map generation method embodiment is implemented, and can achieve The same technical effects are not repeated here to avoid repetition.
- the processor is the processor in the electronic device described in the above embodiment.
- the readable storage medium includes computer readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disk or optical disk, etc.
- An embodiment of the present application further provides a chip.
- the chip includes a processor and a communication interface.
- the communication interface is coupled to the processor.
- the processor is used to run programs or instructions to implement the above embodiment of the vector map generation method. Each process can achieve the same technical effect. To avoid repetition, we will not go into details here.
- chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-a-chip.
- Embodiments of the present application provide a computer program product, which is stored in a storage medium.
- the program product is executed by at least one processor to implement each process of the above vector map generation method embodiment, and can achieve the same technology. The effect will not be described here to avoid repetition.
- the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation.
- the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to the existing technology.
- the computer software product is stored in a storage medium (such as ROM/RAM, disk , optical disk), including several instructions to cause a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- Remote Sensing (AREA)
- Computer Graphics (AREA)
- Processing Or Creating Images (AREA)
Abstract
本申请公开了一种矢量地图生成方法、装置、电子设备及可读存储介质,属于地图处理技术领域,该方法包括:基于目标区域对应的待切片矢量数据的密度分布信息,获取待切片矢量数据对应的根网格集合,根网格集合包括多个根网格,多个根网格中的每个根网格对应一个地图层级,且每个根网格内的矢量数据密度小于或等于预置数据密度;基于每个根网格内的矢量数据以及相应的地图层级,生成目标矢量地图瓦片集合;基于目标矢量地图瓦片集合,得到目标区域对应的区域矢量地图。
Description
相关申请的交叉引用
本申请主张在2022年09月23日在中国提交的中国专利申请号202211165875.8的优先权,其全部内容通过引用包含于此。
本申请属于地图处理技术领域,具体涉及一种矢量地图生成方法、装置、电子设备和可读存储介质。
随着互联网的迅速发展,矢量地图(即电子地图)成为人们生活中不可或缺的一部分。通过对矢量地图进行切片使得人们可以获取到更加精细的地图细节,现有的矢量地图切片方法通常是采用金字塔模型以自上而下或自下而上的方式对矢量地图进行切片。
然而,当采用自上而下的方式进行矢量地图切片时,由于根网格集的层级较小,因此单个根网格对应的矢量地图空间范围较大,从而使得单个根网格内数据量过大,而根网格内数据量越大,对根网格的切片效率越低,如此导致整体切片效率较低。当采用自下而上的方式进行矢量地图切片时,由于根网格集层级较大,因此单个根网格对应的矢量地图空间范围较大,从而导致根网格集中的根网格数量较多;而根网格的数量越大,在整个切片过程中,对落入每个根网格内的数据的计算次数越多,从而严重影响整体切片效率。可见,相关技术中的矢量地图切片效率较低。
发明内容
本申请实施例的目的是提供一种矢量地图生成方法、装置、电子设备和可读存储介质,能够解决矢量地图切片效率较低的问题。
第一方面,本申请实施例提供了一种矢量地图生成方法,该方法包括:基于目标区域对应的待切片矢量数据的密度分布信息,获取待切片矢量数据对应的根网格集合,根网格集合包括多个根网格,多个根网格中的每个根网格对应一个地图层级,且每个根网格内的矢量数据密度小于或等于预置数据密度;基于每个根网格内的矢量数据以及相应的地图层级,生成目标矢量地图瓦片集合;基于目标矢量地图瓦片集合,得到目标区域对应的区域矢量地图。
第二方面,本申请实施例提供了一种矢量地图生成的装置,该装置包括:获取模块和处理模块;获取模块,用于基于目标区域对应的待切片矢量数据的密度分布信息,获取待切片矢量数据对应的根网格集合,根网格集合包括多个根网格,多个根网格中的每个根网格对应一个地图层级,且每个根网格内的矢量数据密度小于或等于预置数据密度;处理模块,用于基于每个根网格内的矢量数据以及相应的获取模块获得的地图层级,生成目标矢量地图瓦片集合;处理模块,还用于基于目标矢量地图瓦片集合,得到目标区域对应的区域矢量地图。
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器和存储器,
所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。
第六方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的方法。
在本申请实施例中,基于目标区域对应的待切片矢量数据的密度分布信息,获取待切片矢量数据对应的根网格集合,根网格集合包括多个根网格,多个根网格中的每个根网格对应一个地图层级,且每个根网格内的矢量数据密度小于或等于预置数据密度;基于每个根网格内的矢量数据以及相应的地图层级,生成目标矢量地图瓦片集合;基于目标矢量地图瓦片集合,得到目标区域对应的区域矢量地图。通过该方案,由于可以根据待切片矢量数据的密度分布信息获取根网格集合,因此可以使得电子设备可以更合理地拆分切片任务,以使得网格集合内的各根网格内的矢量数据密度小于预置数据密度,并自适应的拆对拆分后的矢量数据进行切片,从而可以提高矢量地图切片的效率,进而可以提高生成矢量地图的效率。
图1是金字塔模型的结构示意图;
图2是本申请实施例提供的一种矢量地图生成方法的流程图之一;
图3是本申请实施例提供的一种矢量地图生成方法中的根网格集合示意图;
图4是相关技术中自上而下的切片方式与本申请实施例提供的矢量地图生成方法中的自适应矢量地图切片方式的对比示意图;
图5是本申请实施例提供的一种矢量地图生成方法的流程图之二;
图6是本申请实施例提供的一种矢量地图生成装置的结构示意图;
图7是本申请实施例提供的一种电子设备的硬件结构示意图之一;
图8是本申请实施例提供的一种电子设备的硬件结构示意图之二。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。
下面对本申请实施例中涉及的一些术语/名词进行解释说明。
1、矢量图层:地图中作为底图展示的数据,手机应用程序或浏览器日常浏览的地图中,除卫星图外大部分图层都是矢量图层,如街道图、交通路线图、行政区划图等,通常图层范围为0-18层,第0层为全球范围,每增加一层,视野范围就越小,显示效果就越精细,而第18层级能够看到房屋建筑的细节。浏览地图时,手指放大或鼠标滚轮放大的过程就是加载并展示更高层级图层的过程。
2、矢量瓦片:构成矢量地图图层的基本展示单元,由矢量地图切片得到,矢量图层就是由一个个矢量瓦片单元按照空间位置顺序拼接而成的。
矢量瓦片对应的层级越低,单个矢量瓦片所表示的空间范围就越大,所包含的数据量也可能越多。
3、矢量地图切片:对地理矢量数据按照一定的空间划分规则(如经纬度网格)进行切分,将落在同一个网格单元范围内的数据分配到一起组成一个矢量瓦片单元的过程就是矢量地图切片。矢量地图切片会得到不同层级的矢量瓦片,通常第0层为全球范围瓦片数量为1,第1层由第0层瓦片均分成4份得到,每个瓦片像素大小不变,但表示的空间范围更小显示效果更精细,依次类推第n+1层瓦片由第n层每个瓦片均分得到,数量为n层的4倍,最终通过切片得到所有层级的所有瓦片。
4、网格或网格单元:每个网格可以对应一个空间范围,且网格还对应一个地图层级。其中,网格对应的地图层级越大,该网格对应的空间范围越小。
例如,如图1所示,每个第n+1层网格对应的空间范围包括4个第(n+1)层网格对应的空间范围,每个第(n+1)网格对应的空间范围包括4个第(n+2)层网格对应的空间范围。
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的矢量地图生成方法、装置、电子设备及可读存储介质进行详细地说明。
本申请实施例提供的矢量地图生成方法、装置、电子设备和可读存储介质应用于基于区域或空间范围对应的矢量数据,生成对应区域或空间范围的矢量地图的场景中,以解决生成矢量地图效率较低的问题。
矢量地图切片所用的地理矢量数据通常保存在对应服务器中,当一个设备需要生成对应地理区域的矢量地图时,可以先通过网络传输(Input/Output,IO)从服务器获取该地理的矢量数据。
现有的矢量地图切片方法通常是采用金字塔模型以自上而下或自下而上的方式对矢量地图进行切片。例如,如图1所示,在金字塔模型中,上一层级瓦片的空间范围等于下一层级四个瓦片的空间范围的集合。以5-18级地图层级切片需求为例:
在自上而下的切片方式中,可以基于矢量数据的空间范围计算对应的5级网格集作为根网格集,获取落入每个5级网格内的矢量数据,并分别转换为5级瓦片;然后对每个5级网格按照空间范围进行均分分别得到4个6级网格,且基于6级网格得到对应的6级瓦片;再对6级网格进行同样的均分得到7级网格,且基于7级网格得到对应的7级瓦片,以此类推,最终得到18级瓦片。
在自下而上的切片方式中,可以依照矢量数据的空间范围计算对应的18级网格集作为根网格集,将待切片的矢量数据集中每个数据归纳到对应的18级网格中便得到了18级的瓦片;将18级瓦片按照空间分布每四个聚合到一起得到17级的瓦片,依次类推最终得到5级瓦片。需要说明的是,此处的“瓦片”即“矢量瓦片”,两者意思相同,可以互换。
基于上述描述可知,在相关技术中,矢量地图切片都是统一从某一层级开始进行
切片。即依次将对应相同地图层级的各网格内的矢量数据传输至设备,然后设备完成对一个网格内的矢量数据的接收之后,才能基于该矢量数据进行矢量地图切片,以得到对应的矢量瓦片。然而,由于网格对应的地图层级相同,而相同层级的地图中所包含的数据量并不一定相同,因此有些网格内的矢量数据的数据量可能会超出切片程序的承载能力,从而导致矢量地图切片失败。可见,相关技术中的切片方式仅适用于矢量数据较小或分布较为均匀的场景中。
进一步地,由于在各网格内的所有数据都传输完成,且保存到设备的内存或磁盘时,设备才能基于各网格内的所有数据进行切片;切片完成才能从内存中释放或删除对应网格内的矢量数据,因此在网格内的矢量数据传输到该网格内的矢量数据对应的矢量瓦片的过程中,该网格内的矢量数据将始终存在于设备的内存中,如此可能导致内存占用过高,从而进一步降低矢量效率。
本申请实施例提供的矢量地图生成方法,可以解决大范围、大数据量情况下的地图矢量地图切片问题。
在用户指定需要的瓦片层级范围(例如预设地图层级集合)以及要切片的矢量数据后,本申请实施例能够自适应的根据矢量数据的分布密度信息,选择选择不同地图层级的网格作为对应空间范围下的根网格,即根网格集中的根网格对应的地图层级不再统一。如此可以避免单个根网格内的数据量过大,而导致矢量地图切片的效率低下的问题,从而可以提高切片效率。
具体而言,本申请引入自适应切分阈值(即阈值数据密度)。基于自适应切分阈值,对待切片矢量数据进行数据评估,并根据评估结果确定最佳剖分的根网格集,因此可以合理利用IO资源和设备的内存,且充分利用设备的计算资源;在提升切片速度的同时,减少内存占用,进而提升切片效率、降低切片失败的风险。
可选地,自适应切分阈值可根据待切片任务类型(城市、郊区、沙漠)、数据量和切片需求等灵活变化或指定,能适应不同场景和需求的矢量地图切片,适用范围广。
本申请实施例提供的矢量地图生成方法中的网格分割可以为使用的金字塔模型的4等均分(四叉树切片,即将一个矩形网格切分成四份大小形状完全相同的矩形网格),当然还可以为适用于任何父网格恰好能被子网格完全分割的任何形式的均分。
本申请实施例提供的矢量地图生成方法适用于单线程、多线程或分布式等多种矢量切片过程。
本申请实施例提供了一种矢量地图生成方法,图2示出了本申请实施例提供的矢量地图生成方法的一种流程示意图,如图2所示,本申请实施例提供的矢量地图生成方法可以包括下述的步骤201至步骤203。下面以矢量地图生成装置执行该方法为例进行示意。
步骤201、矢量地图生成装置基于目标区域对应的待切片矢量数据的密度分布信息,获取该待切片矢量数据对应的根网格集合。
本申请实施例中,根网格集合可以包括多个根网格,该多个根网格中的每个根网格对应一个地图层级,且每个根网格内的矢量数据密度小于或等于预置数据密度。
可选地,矢量地图生成装置可以为服务器或终端。
可以理解,为了满足“每个根网格内的矢量数据密度小于或等于阈值数据密度”,上述多个根网格内的不同根网格对应的地图层级可以不同;即根网格集中包括对应至少一个地图层级的根网格。
例如,如图3所示,根网格集中包括对应3个地图层级的根网格,这3个地图层
级分别为地图层级a、地图层级b、地图层级c,且a<b<c。可以看出,在图3所示的根网格集合中,对应地图层级a的根网格所对应的矢量地图空间范围最大,对应地图层级b的根网格所对应的矢量地图空间范围最小。
本申请实施例中,在后续地图矢量地图切片过程中,矢量地图生成装置可以以根网格集里的每个根网格为单元进行自上而下的矢量地图切片。即根网格为进行矢量地图切片的基础单元。
可选地,上述预置数据密度可以根据以下任一项确定:根据对设备的配置信息和待切片任务的评估结果确定,也称为人为指定;根据所述待切片矢量数据和目标数量确定,也称为基于算法指定;其中,目标数量为:待切片矢量数据对应的初始网格的数量。如此可以提高确定预置数据密度的灵活性。
例如,可以通过待切片矢量数据与目标数量的比值,确定一个平均矢量数据,并将该平均矢量数据作为预置数据密度。
可选地,上述步骤201具体可以通过下述的步骤201a至步骤201c实现。
步骤201a、矢量地图生成装置获取待切片矢量数据对应的初始网格集合,以及该初始网格集合中的每个初始网格内的矢量数据。
其中,每个初始网格对应第一地图层级。可以看出,初始网格集合中的初始网格对应的地图层级相同;即不同初始网格对应的矢量地图空间范围相同。
可选地,第一地图层级由以下之一确定:随机指定;由目标区域的地理参数确定。其中,目标区域的地理参数可以包括以下至少之一:目标区域的经度差、目标区域的纬度差。
可选地,上述步骤201a可以通过下述的步骤a)至步骤c)实现。
步骤a)、矢量地图生成装置可以获取待切片矢量数据投影后的总空间范围,该总空间范围可以表示目标区域的空间范围。
步骤b)、矢量地图生成装置基于该总空间范围,获取初始网格集。
具体的,一种方式中,随机指定一个合理地图层级w,w∈[0,30],w为正整数,并计算该层级下全部覆盖该总空间范围时所需的最少网格将其作为根网格集。
另一种方式中,根据上述总空间范围,计算该总空间范围的经差和纬差,根据该经差或纬差,寻找满足第一规则的网格所在的层级,计算在该层级下全部覆盖该总空间范围所需的最少网格作为根网格集。
其中,第一规则可以包括:经差或纬差(或者经差和纬差)与总空间范围的经差或纬差(或者经差和纬差)最接近的网格或次接近的网格等,任意有利于确定地图层级的规则。
步骤c)、矢量地图生成装置将待切片矢量数据中处于各初始网格对应的空间范围内的矢量数据,作为对应初始网格的矢量数据。
步骤201b、矢量地图生成装置基于待切片矢量数据的密度分布信息,对目标初始网格内的矢量数据进行分割,以得到目标初始网格的下一地图层级的多个第一网格。
其中,目标初始网格为初始网格集中矢量数据密度大于预置数据密度的初始网格。
本申请实施例中,矢量地图生成装置可以先获取一个初始网格内的矢量数据密度,若该矢量数据密度大于预置数据密度,则对该初始网格内的矢量数据进行均分,以得到该初始网格的下一地图层级的多个第一网格。
例如,矢量地图生成装置可以将初始网格内的矢量数据均分为4份,得到4个第一网格。
本申请实施例中,初始网格内的数据分布密度可以由对应初始网格内的矢量数据的数量表示。
下面对获取初始网格内的矢量数据的数量的方法进行说明。
一种方式中,查询并统计落在每个初始网格对应的空间范围内的矢量数据的条数;
一种方式中,查询并统计落在每个初始网格对应的空间范围内的矢量数据的数据存储大小;
一种方式中,按照一定规则对待切片矢量数据进行抽样,计算样本落在每个初始网格内的数量;
一种方式中,按照一定规则对待切片矢量数据进行抽样,计算样本落在每个根网格内的数据存储大小。
可选地,当通过抽样的方式估算初始网格内的矢量数据密度时,可以先确定抽样比率,再将抽样比率*每个初始网格内的实际抽样数据量,得到的值作为该网格的最终数据量。
步骤201c、若多个第一网格中的目标第一网格内的矢量数据密度大于预置数据密度,则矢量地图生成装置可以继续对目标第一网格内的矢量数据进行分割,直至分割后得到的所有网格内的矢量数据密度均小于或等于预置数据密度,以得到根网格集合。
本申请实施例中,根网格集合中可以包括:每个目标第一网格分割后得到的网格、初始网格集中除目标初始网格以外的其他初始网格。
需要说明的是,目标第一网格的数量根据待切片矢量数据的密度分布信息确定。
需要说明的是,实际实现中,在步骤201b和步骤201c中,矢量地图生成装置在对一个网格内的数据进行分割后,可以直接将该网格从初始网格中删除,并将分割得到的网格添加至初始网格集中。如此,可以将最终得到的初始网格集作为根网格集。
下面结合具体示例对本申请实施例提供的矢量地图生成方法进行示例性地说明。
示例性地,假设初始网格集中包括对应地图层级2的3个初始网格,分别为:网格1~网格3,若网格1内的矢量数据密度大于阈值数据密度,则:矢量地图生成装置可以按照空间位置,对网格1内的矢量数据进行均分,即将网格1分割为网格1的下一地图层级的4个网格,分别为:网格4~网格7,且网格4~网格7均对应地图层级3;若网格7内的矢量数据密度仍然大于阈值数据密度,则矢量地图生成装置可以按照空间位置,对网格7内的矢量数据进行均分,即将网格7分割为网格7的下一地图层级的4个网格,分别为:网格8~网格11,且网格8~网格11均对应地图层级4。若网格8~网格11内的矢量数据密度均小于或等于预置数据密度,则可以确定根网格集合中包括:网格2、网格3、网格4~网格6,以及网格8~网格11。可见,根网格集合中包括3个地图层级下的网格。
可选地,假设预设地图层级集合中的上限地图层级为上限地图层级j,则矢量地图生成装置得到根网格集之后,还可以判断各根网格对应的地图层级与上限地图层级j的关系。以根网格集合中的一个根网格为例,若一个根网格所对应的地图层级n>地图层级j,则需要将该根网格对应的空间范围、与该根网格相邻且对应地图层级n的至少一个根网格所对应的空间范围进行聚合,得到该根网格的对应地图层级(n-1)的父网格a,该父网格a内包括该根网格内的矢量数据和该至少一个根网格内的矢量数据。
然后,获取该父网格a内的矢量数据密度1,并判断该矢量数据密度1与预置数据密度的关系。若该矢量数据密度1大于预置数据密度,则保持根网格集不变。若矢量数据密度1小于或等于预置数据密度,则将参与聚合的根网格从根网格集中删除,
且将该父网格a添加至根网格集;并以相应地方式聚合得到该父网格a的对应地图层级(m-2)的父网格b,并判断父网格b内的矢量数据密度2与预置数据密度的关系。若矢量数据密度2大于预置数据密度,则保持在根网格集合不变;若矢量数据密度2小于或等于预置数据密度,则将参与聚合的所有网格从根网格集中删除,且将该父网格b添加至根网格集,以此类推,直至聚合得到的对应地图层级(m-w)的父网格c内的矢量数据密度大于预置数据密度时,将该父网格c的对应地图层级(m-w+1)的子网格添加至根网格集,并从根网格集合中删除参与聚合该子网格的所有网格。如此,可以避免因根网格的数量过多,从而可以进一步提高矢量地图切片效率。
需要说明的是,实际实现中,矢量地图生成装置可以直接在获取到初始网格集之后,可以先基于上述网格聚合方式,判断初始网格集中的各初始网格是否需要进行聚合。并在对初始网格集中需求聚合的初始网格聚合完成后,再执行上述的步骤101ab和步骤101c。
可选地,上述预设地图层级集合可以包括一个连续地图层级范围,如地图层级集合可以为:[i,j],i<j,i和j均为正整数。或者,上述预设地图层级集合可以包括多个不连续的地图层级,如地图层级1、地图层级3、地图层级8、地图层级10。或者,上述预设地图层级集合可以包括至少两个不连续的地图层级范围,如包括:[1,5]、[7,13]。
步骤202、矢量地图生成装置基于每个根网格内的矢量数据以及相应的地图层级,生成目标矢量地图瓦片集合。
本申请实施例中,矢量地图生成装置可以根据每个根网格内的矢量数据以及相应的地图层级,对每个根网格进行矢量地图切片处理,得到其对应的空间范围内的所有所需层级的矢量地图瓦片。然后,对于根网格对应的地图层级大于所需瓦片层级集合的下限地图层级的根网格,矢量地图生成装置可以继续通过对对已得到的相应矢量瓦片进行聚合,以得到所需的所有地图层级的矢量地图瓦片。如此可以以更好地应待切片矢量数据的数据密度较大的情况。具体将在下述实施例中进行详细描述。
一种可能的实现方式
可选地,针对根网格集合中的其中一个根网格,在一个根网格对应的地图层级n满足第一条件的情况下,上述步骤202可以包括下述的步骤A1至步骤A2。其中,第一条件包括:根网格对应的地图层级大于预设地图层级集合中的下限地图层级i,且小于预设地图层级集合中的上限地图层级j,i、j和n均为正整数。
步骤A1、矢量地图生成装置将一个根网格内的矢量数据转换为与该一个根网格对应的矢量地图瓦片。
本申请实施例中,假设一个根网格对应地图层级n,则与该根网格对应的矢量地图瓦片也对应地图层级n。也就是说,若一个矢量地图瓦片与一个网格对应,则该矢量地图瓦片与该网格对应相同的地图层级。
步骤A2、矢量地图生成装置对一个根网格内的矢量数据进行分割,直至分割得到一个根网格的对应地图层级f的多个第二网格;并将该多个第二网格内的矢量数据转换为与该多个第二网格一一对应的多个矢量地图瓦片,直至将多个第三网格内的矢量数据转换为与该多个第三网格一一对应的多个矢量地图瓦片。
其中,多个第三网格可以包括一个根网格的对应上限地图层级j的所有网格。
本申请实施例中,目标矢量地图瓦片集合中可以包括:与一个根网格对应的矢量地图瓦片、与多个第二网格一一对应的多个矢量地图瓦片、与多个第三网格一一对应
的多个矢量地图瓦片。地图层级f为预设地图层级集合中与地图层级n之差最小的地图层级,n、i、j和f均为正整数,且i≤n<f≤j。即目标矢量地图瓦片集合中可以包括步骤A1和步骤A2中得到的所有矢量瓦片。
本申请实施例中,多个第三网格内的矢量数据的释放时间由第一时间确定,第一时间为得到与多个第三网格一一对应的多个矢量地图瓦片的时间。
本申请实施例中,每个第二网格内的矢量数据可以转换为一个对应地图层级f的矢量地图瓦片,即每个第二网格对应一个对应地图层级f的矢量地图瓦片。相应地,每个第三网格内的矢量数据可以转换为一个对应上限地图层级j的矢量地图瓦片,即每个第三网格对应一个对应上限地图层级j的矢量地图瓦片。
本申请实施例中,“多个第三网格内的矢量数据的释放时间由第一时间确定”可以理解为:矢量地图生成装置在第一时间时释放多个第三网格内的矢量数据,即多个第三网格内的矢量数据的释放时间与第一时间相同;或者,矢量地图生成装置在第一时间后的预设时长后释放多个第三网格内的矢量数据,即多个第三网格内的矢量数据的释放时间=第一时间+预设时长。
本申请实施例中,矢量地图生成装置释放多个第三网格内的矢量数据可以理解为:矢量地图生成装置从内存或磁盘中删除该多个第三网格内的矢量数据,以避免因矢量数据占用过多内存而影响对后续根网格内的矢量数据的切片处理效率。
需要说明的是,矢量地图生成装置可以对根网格集中地图层级满足第一条件的所有根网格分别执行上述的步骤A1至步骤A2。
下面对一种可能的实现方式进行示例性地说明。
示例性地,假设预设地图层级包括:地图层级范围[1,8],即i=1,j=8,那么:
若根网格集合中的一个根网格的地图层级n=5,则将地图层级5中的根网格内的矢量数据转换为与该根网格对应的的矢量地图瓦片。然后,该根网格内的矢量数据进行分割,得到该根网格的对应地图层级6(即地图层级f)的多个网格1,并将该多个网格1内的矢量数据转换为与该多个网格1一一对应的多个矢量地图瓦片。再对每个网格1内的矢量数据进行分割,得到各网格1的对应地图层级7的多个网格2,并将该多个网格2内的矢量数据分别转换为与该多个网格2一一对应的多个矢量地图瓦片。再对每个网格2内的矢量数据进行分割,得到各网格2的对应地图层级8的多个网格3,并将该多个网格3内的矢量数据分别转换为与该多个网格3一一对应的多个矢量地图瓦片。此时,矢量地图生成装置可以释放多个网格3内的矢量数据,即第一时间与第二时间相同。需要说明的是,目标矢量地图瓦片集合中可以包括:与该根网格对应的矢量地图瓦片、与该多个网格1一一对应的多个矢量地图瓦片、与该多个网格2一一对应的多个矢量地图瓦片,以及与该多个网格3一一对应的多个矢量地图瓦片。
对于根网格集合中地图层级大于或等于1且小于8的所有根网格均可以按照上述示例的方法进行矢量地图切片处理,为了避免重复,此处不再赘述。
如此,由于可以以根网格为单位,对各根网格内的矢量数据进行切片处理,并及时释放已完成切片任务的矢量数据,因此可以减少内存的占用,并提升切片效率。
另一种可能的实现方式
可选地,针对根网格集合中的其中一个根网格,在一个根网格对应的地图层级n满足第二条件的情况下,上述步骤202可以包括下述的步骤B1至步骤B2。其中,第二条件包括:根网格对应的地图层级小于预设地图层级集合中的下限地图层级i,i和n为正整数,n<i。
步骤B1、矢量地图生成装置对一个根网格内的矢量数据进行分割,直至分割得到一个根网格的对应下限地图层级i的多个第四网格;且将多个第四网格内的矢量数据转换为与多个第四网格一一对应的多个矢量地图瓦片。
步骤B2、矢量地图生成装置分别对多个第四网格内的矢量数据进行分割,直至得到一个根网格的对应地图层级g的多个第五网格;且将多个第五网格内的矢量数据与多个第五网格一一对应的多个矢量地图瓦片,直至将多个第三网格内的矢量数据转换为与多个第三网格一一对应的多个矢量地图瓦片。
其中,多个第三网格可以包括一个根网格的对应上限地图层级j的所有网格,地图层级g为预设地图层级集合中与下限地图层级i之差最小的地图层级,g为正整数,n<i<g≤j,且n、i、g、j为正整数。
所述目标矢量地图瓦片集合中可以包括:与多个第四网格一一对应的多个矢量地图瓦片、与多个第五网格一一对应的多个矢量地图瓦片、与多个第三网格一一对应的多个矢量地图瓦片。
本申请实施例中,多个第三网格内的矢量数据的释放时间由第一时间确定,所述第一时间为得到与所述多个第三网格一一对应的多个矢量地图瓦片的时间。对于多个第三网格内的矢量数据的释放时间的其他描述参见上述一种可能的实现方式中对多个第三网格内的矢量数据的释放时间的相关描述。
需要说明的是,矢量地图生成装置可以对根网格集中地图层级满足第二条件的所有根网格分别执行上述的步骤B1至步骤B2。
下面对另一种可能的实现方式进行示例性地说明。
示例性地,假设预设地图层级包括:地图层级范围[5,7],即i=5,j=7,那么:若一个根网格对应地图层级n=3,则可以对该根网格内的矢量数据进行分割,得到该根网格的对应地图层级4的多个网格;再对该多个网格中各网格内的矢量数据分别进行分割,以得到该根网格的对应地图层级5的多个网格4,即上述多个第四网格;并将该多个网格4内的矢量数据转换为与该多个网格4一一对应的多个矢量地图瓦片。再对该多个网格4中的各网格4内的矢量数据进行分割,得到该根网格的对应地图层级6(即地图层级g)的多个网格5,并将该多个网格5内的矢量数据转换为与该多个网格5一一对应的多个矢量地图瓦片。再对该多个网格5中的各网格5内的矢量数据进行分割,得到各根网格对应的地图层级7的多个网格6,并将该多个网格6内的矢量数据转换为与该多个网格6一一对应的多个矢量地图瓦片。需要说明的是,目标矢量地图瓦片集合中可以包括:与该多个网格4一一对应的多个矢量地图瓦片、与该多个网格5一一对应的多个矢量地图瓦片,以及与该多个网格6一一对应的多个矢量地图瓦片。
对于根网格集合中地图层级小于5的所有根网格均可以按照上述示例的方法进行处理,为了避免重复,此处不再赘述。
对于另一种可能的实现方式的其他描述,可以参见上述一种可能的实现方式中的相关描述,为了避免重复,此处不再赘述。
如此,由于可以以根网格为单位,对各根网格内的矢量数据进行切片处理,并及时释放已完成切片任务的矢量数据,因此可以减少内存的占用,并提升切片效率。
进一步地,当根网格对应的地图层级小于预设地图层级集合中的下限地图层级时,由于可以直接对该根网格内的矢量数据进行至少一次分割,以得到该根网格的对应该下限地图层级的多个第四网格,然后再基于该多个第四网格内的矢量数据进行切片处
理,即无需生成地图层级n至下限地图层级之间的矢量瓦片;因此不但可以得到根网格对应的预设地图层级集合内个各地图层级的矢量瓦片,而且可以进一步减小矢量地图切片的时长。如此可以进一步提高矢量地图切片效率。
又一种可能的实现方式
可选地,针对根网格集合中的其中一个根网格,在一个根网格对应的地图层级n满足第三条件的情况下,上述步骤202可以包括下述的步骤C1。其中,第三条件包括:根网格对应的地图层级大于或等于预设地图层级集合中的上线上限地图层级j,n和j均为正整数,n≥j。
步骤C1、矢量地图生成装置将一个根网格内的矢量数据转换为与该根网格对应的矢量地图瓦片。
其中,目标矢量地图瓦片集合中包括:与一个根网格对应的矢量地图瓦片;一个根网格内的矢量数据的释放时间由得到与一个根网格对应的矢量地图瓦片的时间确定。对于根网格内的矢量数据的释放时间的其他描述,具体可以参见上述一种可能的实现方式中对“多个第三网格内的矢量数据的释放时间”的相关描述。
需要说明的是,矢量地图生成装置可以对根网格集中地图层级满足第三条件的所有根网格分别执行上述的步骤C1。
下面对又一种可能的实现方式进行示例性地说明。
示例性地,假设预设地图层级集合包括:图层级范围[5,8],即i=5,j=8,那么:若一个根网格对应地图层级n=10,则可以将地图层级10中的每个根网格内的矢量数据转换为对应地图层级10的矢量地图瓦片。然后释放该根网格内的矢量数据。
可以理解,上述又一种可能的实现方式中的矢量地图瓦片用于:通过瓦片聚合的方式得到预设地图层级集合中相应地图层级的矢量地图瓦片。
对于另一种可能的实现方式的其他描述,可以参见上述一种可能的实现方式中的相关描述,为了避免重复,此处不再赘述。
如此,当一个根网格对应的地图层级n大于预设地图层级集合中的上限地图层级时,由于可以直接将该根网格内的矢量数据转换成矢量地图瓦片,从而使得矢量地图生成装置能够采用瓦片聚合的方式,得到与该根网格的相应父网格对应的矢量地图瓦片;从而无需再基于该相应父网格内的矢量数据转换得到与该相应父网格对应的矢量地图瓦片,因此可以避免因网格内矢量数据过大而导致矢量地图切片耗时较长或矢量地图切片失败。
进一步地,针对父网格内矢量数据较大时,由于与该父网格对应的矢量地图瓦片不再需要读取该网格内全部数据得到,而基于该父网格对应的轻量的子矢量地图瓦片直接聚合得到,从而可以减少内存溢出、避免IO传输超时的可能,从而增加了系统鲁棒性。
需要说明的是,矢量地图生成装置在按照上述一种可能的实现方式、另一可能的实现方式或又一种可能的实现方式,对根网格集合中的一个根网格内的矢量数据进行矢量地图切片处理后,矢量地图生成装置可以继续对根网格集合中的下一个根网格内的矢量数据进行相应地矢量地图切片处理,直至完成对根网格集合中的最后一个根网格内的矢量数据的矢量地图切片处理。
可以理解,上述三种可能的实现方式是通过自上而下方式获取相应的矢量地图瓦片。
可选地,在矢量地图生成装置完成根网格集中所有网格的矢量数据的释放之后,
上述步骤202还可以包括下述的步骤D1和步骤D2。
步骤D1、若一个根网格对应的地图层级n大于下限地图层级i,则矢量地图生成装置对与至少两个第一根网格对应的矢量地图瓦片进行聚合,得到与第一父网格对应的第一矢量地图瓦片;且将根网格集合中的至少两个第一根网格替换为第一父网格。其中,该至少两个第一根网格包括:该一个根网格,第一父网格为该一个根网格的对应地图层级(n-1)的父网格。
步骤D2、若地图层级(n-1)大于下限地图层级i,则矢量地图生成装置对与至少两个第二根网格对应的矢量地图瓦片进行聚合,得到与第二父网格对应的的第二矢量地图瓦片;且将根网格集合中的该至少两个第二根网格替换为第二父网格,直至聚合得到与第三父网格对应的矢量地图瓦片。其中,该至少两个第二根网格中包括第一父网格,第二父网格为该一个根网格的对应地图层级(n-2)的父网格,第三父网格为该一个根网格的对应下限地图层级i的父网格。
可以理解,上述步骤D1和步骤D2可以在上述三种可能的实现方式之后,即在电子设备完成根网格集中所有网格的矢量数据的释放之后执行。
可选地,矢量地图生成装置在对根网格集合中的所有根网格进行矢量地图切片处理后,可以判断根网格集合对应的最大地图层级与下限地图层级i之间的关系。若该最大地图层级小于或等于下限地图层级i,则矢量地图生成装置可以确定地图切片结束,即表示通过自上而下的切片方式即可得到用于生成目标区域对应的矢量地图所需的全部矢量地图瓦片。若该最大地图层级大于下限地图层级i,则矢量地图生成装置可以找出根网格集合中地图层级大于下限地图层级i的根网格,并对找出的根网格执行上述步骤D1和步骤D2。
下面对步骤D1和步骤D2进行示例性地说明。
示例性地,假设预设地图层级集合中的下限地图层级i=4,又假设根网格集合中的根网格1对应地图层级6,根网格1的对应地图层级5的父网格为网格A,且网格A的对应地图层级6的其他子网格包括根网格集合中对应地图层级6的:根网格2、根网格3和根网格4,那么:矢量地图生成装置在对根网格集合中的所有根网格进行矢量地图切片处理后,矢量地图生成装置可以将与根网格1对应的矢量地图瓦片、与根网格2对应的矢量地图瓦片、与根网格3对应的矢量地图瓦片以及与根网格4对应的矢量地图瓦片进行聚合,得到与网格A对应的矢量地图瓦片。并将根网格集中的根网格1至根网格4替换为网格A。
进一步地,假设网格A的对应地图层级4的父网格为网格B,且网格B的对应地图层级5的其他子网格包括根网格集合中对应地图层级4的:根网格5、根网格6和根网格7,那么:由于网格A对应的地图层级5>4,因此矢量地图生成装置可以将与网格A对应的矢量地图瓦片、与根网格5对应的矢量地图瓦片、与根网格6对应的矢量地图瓦片以及与根网格7对应的矢量地图瓦片进行聚合,得到与网格B对应的矢量地图瓦片;并将根网格集中的根网格5至根网格7以及网格A替换为网格B。
然后,矢量地图生成装置可以继续判断根网格集合中是否包括对应的地图层级小于下限地图层级i的根网格,若有,则对相应矢量地图瓦片进行聚合,直至根网格集合中的所有根网格对应的地图层级均大于或等于下限地图层级i。
可以看出,步骤D1和步骤D2是通过自下而上的方式获取相应的矢量地图瓦片。
需要说明的是,上述目标矢量地图瓦片集合中还可以包括通过步骤D1和步骤D2得到的矢量地图瓦片。
如此,当根网格集合中包括地图层级大于预设地图层级集合中的下限地图层级的根网格时,由于可以直接由与相应根网格对应的矢量地图瓦片进行聚合,以得到所需地图层级的矢量地图瓦片,而不需要再通过读取对应网格内的全部数据的方式得到所需地图层级的矢量地图瓦片,因此可以避免网络传输超时,减少内存溢出,从而可以提高矢量地图切片效率。
需要说明的是,本申请基于每个根网格内的矢量数据以及相应的地图层级,生成目标矢量地图瓦片集合的过程也可以称为自适应矢量地图切片的过程。
下面结合附图对相关技术中自上而下的切片方式与本申请实施例中自适应矢量地图切片方式进行对比。如图4所示,图4中的(a)为相关技术中自上而下的切片方式对应的切片效率和内存占示意图,图4中的(b)为本申请实施例中的自适应矢量地图切片方式对应的切片效率和内存占示意图。
其中,图4中的“IO”对应的行中的每个方框的长度表示:一个根网格内的矢量数据的传输耗时。图4中的“CPU”对应的行中的每个填充方框的长度表示:矢量地图生成装置的处理单元的空间时长;“CPU”对应的行中的每个空白方框的长度表示:一个根网格内的矢量数据的处理时长;“CPU”对应的行中的所有空白方框的总长度表示:对应切片方式下处理单元进行数据处理的总时长。图4中的“IO”和“CPU”对应的行中的不同空白方框表示不同根网格。图4中的“内存”对应的数值为:单位时间内矢量数据对内存的占用量,且数字越大表示对内存的占用量越大。
由图4可以看出,与相关技术相比,本申请中各根网格内的矢量数据的传输耗时更少,且矢量地图生成装置的处理单元在整个切片过程中的空闲长更少,并且各根网格内的矢量数据对矢量地图生成装置的内存占用时长以及占用量均更少。从而本申请实施例提供的自适应矢量地图切片方式能够更加合理的利用矢量地图生成装置的各种资源,如计算资源。
如此,从图4可以看出,与相关技术相比,本申请实施例中自适应矢量地图切片方式在大数据量大空间范围情况下,切分过程中内存占用显著减少,切片效率提升三分之一左右。
步骤203、矢量地图生成装置基于目标矢量地图瓦片集合,得到目标区域对应的区域矢量地图。
可选地,假设待切片矢量数据对应的预设地图层级集合中包括M个地图层级,M为大于1的整数。上述步骤203具体可以通过下述的步骤203a实现。
步骤203a、矢量地图生成装置基于M个地图层级,将目标矢量地图瓦片集合中对应相同地图层级的矢量瓦片进行拼接,得到M个地图层。
具体而言,假设M个地图层级包括:地图层级3和地图层级4,而目标矢量地图瓦片集合中包括:对应地图层级3的矢量地图瓦片、对应地图层级4的矢量地图瓦片以及对应地图层级5的矢量地图瓦片,那么:矢量地图生成装置可以将对应地图层级3的矢量地图瓦片拼接成地图层3,并将对应地图层级4的矢量地图瓦片拼接成地图层4。可以看出,对于对应地图层级5的矢量地图瓦片仅用于参与聚合相应的对应地图层级4的矢量地图瓦片,即对应地图层级5的矢量地图瓦片属于中间量。
步骤203b、矢量地图生成装置基于M个地图层,得到目标区域对应的区域矢量地图。
可选地,矢量地图生成装置可以将M个地图层按照地图层级依次增大的顺序排列或组合,以得到目标区域对应的区域矢量地图。或者,矢量地图生成装置可以将M个
地图层按照地图层级依次减小的顺序排列或组合,以得到目标区域对应的区域矢量地图。
在本申请实施例提供的矢量地图生成方法中,由于可以根据待切片矢量数据的密度分布信息获取根网格集合,因此可以使得电子设备可以更合理地拆分切片任务,以使得网格集合内的各根网格内的矢量数据密度小于预置数据密度,并自适应的拆对拆分后的矢量数据进行切片,从而可以提高矢量地图切片的效率,进而可以提高生成矢量地图的效率。
可选地,矢量地图生成装置可以在接收到矢量地图请求之后,执行上述步骤201,其中,该矢量地图请求用于请求目标区域对应的区域矢量地图,该矢量地图请求中可以包括指示目标区域的标识、预设地图层级集合。
可选地,矢量地图生成装置在得到目标区域对应的区域矢量地图之后,可以向目标终端发送该区域矢量地图,从而目标终端在接收到目标矢量地图瓦片集合之后,可以输出目标区域对应的区域矢量地;其中,目标终端为发送该矢量地图请求的终端,例如手机。或者,矢量地图生成装置在得到目标区域对应的区域矢量地图之后,可以直接输出该区域矢量地图。
当然,实际实现中,矢量地图生成装置还可以直接向目标终端发送目标矢量地图瓦片集合,使得目标终端在接收到目标矢量地图瓦片集合之后,基于所述目标矢量地图瓦片集合,得到并输出目标区域对应的区域矢量地图。
下面再结合附图对本申请实施例提供的矢量地图生成方法进行示例性地说明。
下述的“层级”均是指“地图层级”,两者意思相同,可以互换;下述的“瓦片”均是指“矢量地图瓦片”,两者意思相同,可以互换。
本申请实施例提供一种高效率的矢量地图生成方法,以解决大范围、大数据量情况下的矢量地图切片效率低的问题。该方法可以概括性描述为:用户指定需要的地图层级集合(即预设地图层级集合)以及待切片矢量数据后,本方法能自适应的根据数据范围、数据量获得根网格集的数据密度,进而选择不同层级的网格作为对应空间范围(即目标区域对应的空间范围)下的根网格。之后,先按照自上而下的方式,对每个根网格进行切分得到其空间范围内所有所需层级的瓦片。如果根网格的层级(即根网格对应的地图层级)大于所需瓦片层级范围的最小层级(即下限地图层级),则会对与相应根网格对应的瓦片进行聚合,以得到瓦片层级范围中各瓦片层级的所有瓦片,以更好应对大数据量情况。通过上述步骤可以实现对IO、计算资源和内存的高效率利用,进而提升切片效率,减少切片失败的风险。
示例性地,如图5所示,本申请实施例提供的矢量地图生成方法可以包括下述的步骤501至508。
步骤501、获取根网格集。
本申请实施例中,后续的地图切片过程,可以以根网格集里的每个根网格为单元进行自上而下的切分。
可选地,步骤501具体可以通过下述的步骤501a和步骤501b实现。
步骤501a、获取待切片矢量数据投影后的总空间范围。
可以理解,该总空间范围为目标区域对应的空间范围。
步骤501b、根据总空间范围获取根网格集。
根网格集的获取可以由随机指定或由目标区域的地理参数确定。
其中,随机指定是指随即指定一个合理地图层级n(n∈[0,30]),计算该层级下全
部覆盖总空间范围时所需的最少网格将其作为根网格集;由目标区域的地理参数确定是根据总空间范围,计算该空间范围的经差和纬差,根据该经差或纬差寻找满足某些规则的网格所在的层级n,计算在层级n下全部覆盖该空间范围所需的最少网格作为根网格集。某些规则可以指经差或纬差(或者经差和纬差)与获取的总空间范围的经差或纬差(或者经差和纬差)最接近的网格或次接近的网格等这些有利于确定地图层级的规则或条件。
步骤502、获取自适应切分阈值。
本申请实施例中,“自适应切分阈值”即上述预置数据密度。
自适应切分阈值是矢量数据条数或代表特定空间大小的数值,即当某个根网格内的矢量数据密度超过该阈值时,就对该根网格进行均分得到层级大一级的子网格。
自适应切分阈值的获取可以由人为指定或算法指定。人为指定是指通过对机器的处理能力和内存等配置结合要切片的任务评估后根据经验确定合理的值;算法指定是指根据待切片的总数据量、根网格数量范围等参数计算或估算得到,比如获取待切片的总数据量和根网格集内网格数量,通过总数据量/根网格数量可以得到每个根网格内平均数据量,将该平均数据量作为自适应切片阈值。
步骤503、获取根网格的数据密度分布信息。
根网格的数据分布密度信息可以由根网格内的数据量表示。
下面对获取根网格内的数据量的方法进行说明。
一种方式中,查询并统计落在每个根网格对应的空间范围内的矢量数据的条数;
一种方式中,查询并统计落在每个根网格对应的空间范围内的矢量数据的数据存储大小;
一种方式中,按照一定规则对待切片矢量数据进行抽样,计算样本落在每个根网格内的数量;
一种方式中,按照一定规则对待切片矢量数据进行抽样,计算样本落在每个根网格内的数据存储大小。
可选地,当通过抽样的方式估算根网格内的矢量数据密度时,可以先确定抽样比率,再将抽样比率*每个根网格内的实际抽样数据量,得到的值作为该网格的最终数据量。
可以理解,步骤503中的“根网格集合”也可以称为“初始网格集合”。
步骤504、判断根网格内的数据量和自适应切分阈值的关系。
本申请实施例中,假设需要的地图层级集合为[i,j],i和j均为正整数,j大于i。那么:当一个根网格内的数据量小于或等于自适应切分阈值时,执行下述的步骤506,当一个根网格内的数据量大于自适应切分阈值时,执行下述的步骤505,且在执行完步骤505之后,继续执行步骤504。
步骤505、根网格均分。
示例性地,假设需要的地图层级集合为[i,j],当一个根网格内的数据量大于自适应切分阈值时,可以将该根网格均分为四个子网格,且将该根网格从根网格集合中移除,并将这四个子网格加入根网格集合。并跳转到步骤503继续执行,以判断这四个子网格中各子网格内的数据量与自适应切分阈值的关系,直到分割得到的所有子网格内的数据量均小于或等于自适应切分阈值。
然后,判断最近一次加入根网格集合的子网格对应的地图层级k与j的关系,若k>j,则需要对相邻的k级根网格对应的空间范围进行聚合得到k-1层的父网格,获取
父网格内的数据量并判断与自适应切分阈值的关系,若父网格数据量小于或等于切分阈值,则将参与聚合的网格从根网格集中删除并将聚合得到的父网格加入根网格集;若父网格数据量大于切分阈值,则取消该k级根网格和相邻根网格的空间范围聚合,删除k-1层父网格,根网格集保持不变。
步骤506、矢量地图切片。
本申请实施例中的矢量地图切片不局限于使用的金字塔模型的4等均分(四叉树切片,即将一个矩形网格切分成四份大小形状完全相同的矩形网格),而适用于任何父网格恰好能被子瓦片完全分割的任何形式的均分。
本申请实施例中的矢量地图切片适用于单线程、多线程或分布式等多种矢量切片过程。
可选地,上述步骤506具体可以包括下述的步骤506a至步骤506g。
步骤506a、获取根网格集中一个根网格内的矢量数据并将各根网格作为普通网格看待。
步骤506b、该网格的地图层级n小于i,则执行下述的步骤506g。
步骤506c、该网格的地图层级n等于i,则将该网格内的矢量数据保存成瓦片,继续执行下述的步骤506g;
步骤506d、该网格的地图层级n属于(i,j)区间中任意层级时,则将该网格内的矢量数据保存成瓦片,继续执行下述的步骤506g;
步骤506e、该地图层级n等于j,则将网格内的矢量数据保存成瓦片,继续执行上述步骤506a,即对下一个根网格执行步骤506a。以此类推,直至遍历根网格集中的所有根网格。
步骤506f、该网格的地图层级n等于j,且为对应根网格下最后一个网格时,将该网格内的矢量数据保存成瓦片,并释放对应根网格的所有数据。
步骤506g、将网格内的矢量数据按照空间范围切分成四个同等大小和形状的n+1级的子网格,对每个子网格继续执行上述的步骤506b。
可以理解,对于每个根网格均是按照上述步骤进行执行的。
步骤507、判断根网格集中的最大地图层级与需要的地图层级集合[i,j]之间的关系。
具体的,假设根网格集合中的最大地图层级为地图层级n,那么:当地图层级n小于或等于下限地图层级i时,地图切片结束。当地图层级n大于下限地图层级i时,则执行下述的步骤508。
步骤508、对与根网格集合中相应根网格对应的瓦片进行聚合。
具体的,步骤508a,先找出根网格集合中地图层级大于下限地图层级i的一个n级网格;
步骤508b,获取该n级网格的(n-1)级父网格对应的其他n级子网格;并将与该n级网格对应的矢量地图瓦片、与该其他n级子网格对应的矢量地图瓦片进行聚合。然后,将该n级网格和该其他n级子网格从根网格集合中删除,并将聚合成的(n-1)级网格加入根网格集合。并继续执行上述步骤508a。
可以看出,在执行完步骤508之后,根网格集合中的所有根网格对应的地图层级均小于或等于下限地图层级i。
本示例中,1、步骤502至505得到了根据待切片矢量数据的密度分布而自适应变化的根网格集,根据数据量合理拆分切片任务进而合理利用IO;
2、步骤506根据合理拆分后的任务,充分利用计算资源并及时释放已完成的切片任务,减少了内存占用进而提升切片效率;
3、步骤507和步骤508能很好的应对单网格大数据量情况,与大数据量的网格对应的瓦片不再需要读取网格内全部数据得到,而是从轻量的子瓦片直接聚合得到,减少内存溢出、避免IO传输超时的可能,增加了系统鲁棒性。
可选地,上述自适应切分阈值可以由人工智能算法实现,人工智能算法在经过大量地图切片后,可以从切片任务类型、切片数据类型、切片数据范围、切片数据量等,计算出最合理的自适应切分阈值,甚至直接计算出最合理的根网格集,即自适应矢量切片更加人工智能化。
可选地,面对父网格无法被多个子网格完全彻底分割或存在一个子网格包含两个父网格内容的切片情况,如何实施自适应矢量地图切片。
需要说明的是,本申请实施例提供的矢量地图生成方法,执行主体可以为矢量地图生成装置。本申请实施例中以矢量地图生成装置执行矢量地图生成的方法为例,说明本申请实施例提供的矢量地图生成的装置。
图6示出了本申请实施例中涉及的矢量地图生成装置的一种可能的结构示意图。如图6所示,该矢量地图生成装置60可以包括:获取模块61和处理模块62。图6示出了本申请实施例中涉及的矢量地图生成装置的一种可能的结构示意图。如图6所示,该应用图标显示装置60可以包括:获取模块61和处理模块62。
其中,获取模块61,用于基于目标区域对应的待切片矢量数据的密度分布信息,获取待切片矢量数据对应的根网格集合,根网格集合包括多个根网格,多个根网格中的每个根网格对应一个地图层级,且每个根网格内的矢量数据密度小于或等于预置数据密度;处理模块62,用于基于每个根网格内的矢量数据以及相应的获取,生成目标矢量地图瓦片集合;处理模块,还用于基于目标矢量地图瓦片集合,得到目标区域对应的区域矢量地图。
在一种可能的实现方式中,上述获取模块61包括获取子模块和处理子模块;获取子模块,用于获取待切片矢量数据对应的初始网格集合,以及初始网格集合中的每个初始网格内的矢量数据,每个初始网格对应第一地图层级;处理子模块,用于基于上述获取子模块获取的密度分布信息,对目标初始网格内的矢量数据进行分割,以得到目标初始网格的下一地图层级的多个第一网格,目标初始网格为初始网格集合中矢量数据密度大于预置数据密度的初始网格;并且若多个第一网格中的目标第一网格内的矢量数据密度大于预置数据密度,则继续对目标第一网格内的矢量数据进行分割,直至分割后得到的所有网格内的矢量数据密度均小于或等于预置数据密度,以得到根网格集合。
在一种可能的实现方式中,上述第一地图层级由以下之一确定:
随机指定;
由目标区域的地理参数确定;
其中,地理参数包括以下至少之一:目标区域的经度差、目标区域的纬度差。
在一种可能的实现方式中,上述处理模块62,具体用于针对根网格集合中的其中一个根网格,在一个根网格对应的地图层级n大于预设地图层级集合中的下限地图层级i,且小于预设地图层级集合中的上限地图层级j的情况下:
将一个根网格内的矢量数据转换为对应地图层级n的矢量地图瓦片;
对一个根网格内的矢量数据进行分割,直至分割得到一个根网格的对应地图层级
f的多个第二网格;并将多个第二网格内的矢量数据分别转换为对应地图层级f的矢量地图瓦片,直至将多个第三网格内的矢量数据分别转换为对应上限地图层级j的矢量地图瓦片;多个第三网格包括一个根网格的对应上限地图层级j的所有网格;
其中,所述目标矢量地图瓦片集合中包括:与所述一个根网格对应的矢量地图瓦片、与所述多个第二网格一一对应的多个矢量地图瓦片、与所述多个第三网格一一对应的多个矢量地图瓦片;地图层级f为预设地图层级集合中与地图层级n之差最小的地图层级,n、i、j和f均为正整数,且i≤n<f≤j;所述多个第三网格内的矢量数据的释放时间由第一时间确定,所述第一时间为得到与所述多个第三矢量地图瓦片一一对应的多个矢量地图瓦片的时间。
在一种可能的实现方式中,上述处理模块62,具体用于针对所述根网格集合中的其中一个根网格,在地图层级n小于下限地图层级i的情况下:
对一个根网格内的矢量数据进行分割,直至分割得到一个根网格的对应下限地图层级i的多个第四网格;将多个第四网格内的矢量数据分别转换为对应下限地图层级i的矢量地图瓦片;
分别对多个第四网格内的矢量数据进行分割,直至得到一个根网格的对应地图层级g的多个第五网格;且将多个第五网格内的矢量数据分别转换为对应地图层级g的矢量地图瓦片,直至将多个第三网格内的矢量数据分别转换为对应上限地图层级j的矢量地图瓦片;所述多个第三网格包括所述一个根网格的对应所述上限地图层级j的所有网格;
其中,所述地图层级g为所述预设地图层级集合中与下限地图层级i之差下限的地图层级,n<i<g≤j,且n、i、g、j为正整数;
所述目标矢量地图瓦片集合中包括:与所述多个第四网格一一对应的多个矢量地图瓦片、与所述多个第五网格一一对应的多个矢量地图瓦片、与所述多个第三网格一一对应的多个矢量地图瓦片;
所述多个第三网格内的矢量数据的释放时间由第一时间确定,所述第一时间为得到与所述多个第三矢量地图瓦片一一对应的多个矢量地图瓦片的时间。
在一种可能的实现方式中,上述处理模块62,具体用于针对所述根网格集合中的其中一个根网格,在地图层级n大于或等于上限地图层级j的情况下:
将一个根网格内的矢量数据转换为对应地图层级n的矢量地图瓦片;
其中,所述目标矢量地图瓦片集合中包括:与所述一个根网格对应的矢量地图瓦片;
所述一个根网格内的矢量数据的释放时间由得到与所述一个根网格对应的矢量地图瓦片的时间确定。在一种可能的实现方式中,上述处理模块62,还用于在完成所述根网格集中所有网格的矢量数据的释放之后:
若地图层级n大于下限地图层级i,则对由至少两个第一根网格内的矢量数据转换得到的矢量地图瓦片进行聚合,得到对应地图层级(n-1)的第一矢量地图瓦片;且将根网格集合中的至少两个第一根网格替换为第一父网格;至少两个第一根网格中包括一个根网格,第一父网格为至少两个第一根网格的对应地图层级(n-1)的父网格;
若地图层级(n-1)大于下限地图层级i,则对由至少两个第二根网格内的矢量数据转换得到的矢量地图瓦片进行聚合,得到对应地图层级(n-2)的第二矢量地图瓦片;且将根网格集合中的至少两个第二根网格替换为第二父网格,直至聚合得到对应下限地图层级i的矢量地图瓦片;至少两个第二根网格中包括第一父网格,第二父网格为
至少两个第二根网格的对应地图层级(n-2)的父网格。
在一种可能的实现方式中,上述待切片矢量数据对应的预设地图层级集合中包括M个地图层级,M为大于1的整数;
上述处理模块62,具体用于:
基于M个地图层级,将目标矢量地图瓦片集合中对应相同地图层级的矢量瓦片进行拼接,得到M个地图层;并
基于M个地图层,得到区域矢量地图。
在一种可能的实现方式中,上述预置数据密度根据以下任一项确定:
根据对设备的配置信息和待切片任务的评估结果确定;
根据待切片矢量数据和目标数量确定;
其中,目标数量为:待切片矢量数据对应的初始网格的数量。
本申请实施例提供一种矢量地图切片生成装置,由于可以根据待切片矢量数据的密度分布信息获取根网格集合,因此可以使得电子设备可以更合理地拆分切片任务,以使得网格集合内的各根网格内的矢量数据密度小于预置数据密度,并自适应的拆对拆分后的矢量数据进行切片,从而可以提高矢量地图切片的效率,进而可以提高生成矢量地图的效率。
本申请实施例中的矢量地图生成装置可以是电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,还可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例中的矢量地图生成装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。
本申请实施例提供的矢量地图生成装置能够实现图2至图5的方法实施例实现的各个过程,为避免重复,这里不再赘述。
可选地,如图7所示,本申请实施例还提供一种电子设备700,包括处理器701和存储器702,存储器702上存储有可在所述处理器701上运行的程序或指令,该程序或指令被处理器701执行时实现上述矢量地图生成方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。
图8为实现本申请实施例的一种电子设备的硬件结构示意图。
该电子设备800包括但不限于:射频单元801、网络模块802、音频输出单元803、输入单元804、传感器805、显示单元806、用户输入单元807、接口单元808、存储器809、以及处理器810等部件。
本领域技术人员可以理解,电子设备800还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器810逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图8中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,
或者不同的部件布置,在此不再赘述。
其中,输入单元804,用于基于目标区域对应的待切片矢量数据的密度分布信息,获取待切片矢量数据对应的根网格集合,根网格集合包括多个根网格,多个根网格中的每个根网格对应一个地图层级,且每个根网格内的矢量数据密度小于或等于预置数据密度;处理器810,用于基于每个根网格内的矢量数据以及相应的获取,生成目标矢量地图瓦片集合;处理模块,还用于基于目标矢量地图瓦片集合,得到目标区域对应的区域矢量地图。
可选地,上述处理器810,用于获取待切片矢量数据对应的初始网格集合,以及初始网格集合中的每个初始网格内的矢量数据,每个初始网格对应第一地图层级;上述处理器810,还用于基于密度分布信息,对目标初始网格内的矢量数据进行分割,以得到目标初始网格的下一地图层级的多个第一网格,目标初始网格为初始网格集合中矢量数据密度大于预置数据密度的初始网格;并且若多个第一网格中的目标第一网格内的矢量数据密度大于预置数据密度,则继续对目标第一网格内的矢量数据进行分割,直至分割后得到的所有网格内的矢量数据密度均小于或等于预置数据密度,以得到根网格集合。
可选地,上述第一地图层级由以下之一确定:
随机指定;
由目标区域的地理参数确定;
其中,地理参数包括以下至少之一:目标区域的经度差、目标区域的纬度差。
可选地,上述处理器810,具体用于针对根网格集合中的其中一个根网格,在一个根网格对应的地图层级n大于预设地图层级集合中的下限地图层级i,且小于预设地图层级集合中的上限地图层级j的情况下:
将一个根网格内的矢量数据转换为对应地图层级n的矢量地图瓦片;
对一个根网格内的矢量数据进行分割,直至分割得到一个根网格的对应地图层级f的多个第二网格;并将多个第二网格内的矢量数据分别转换为对应地图层级f的矢量地图瓦片,直至将多个第三网格内的矢量数据分别转换为对应上限地图层级j的矢量地图瓦片;多个第三网格包括一个根网格的对应上限地图层级j的所有网格;
其中,所述目标矢量地图瓦片集合中包括:与所述一个根网格对应的矢量地图瓦片、与所述多个第二网格一一对应的多个矢量地图瓦片、与所述多个第三网格一一对应的多个矢量地图瓦片;地图层级f为预设地图层级集合中与地图层级n之差最小的地图层级,n、i、j和f均为正整数,且i≤n<f≤j;所述多个第三网格内的矢量数据的释放时间由第一时间确定,所述第一时间为得到与所述多个第三矢量地图瓦片一一对应的多个矢量地图瓦片的时间。
可选地,上述处理器810,具体用于针对所述根网格集合中的其中一个根网格,在地图层级n小于下限地图层级i的情况下:
对一个根网格内的矢量数据进行分割,直至分割得到一个根网格的对应下限地图层级i的多个第四网格;将多个第四网格内的矢量数据分别转换为对应下限地图层级i的矢量地图瓦片;
分别对多个第四网格内的矢量数据进行分割,直至得到一个根网格的对应地图层级g的多个第五网格;且将多个第五网格内的矢量数据分别转换为对应地图层级g的矢量地图瓦片,直至将多个第三网格内的矢量数据分别转换为对应上限地图层级j的矢量地图瓦片;所述多个第三网格包括所述一个根网格的对应所述上限地图层级j的
所有网格;
其中,所述地图层级g为所述预设地图层级集合中与下限地图层级i之差下限的地图层级,n<i<g≤j,且n、i、g、j为正整数;
所述目标矢量地图瓦片集合中包括:与所述多个第四网格一一对应的多个矢量地图瓦片、与所述多个第五网格一一对应的多个矢量地图瓦片、与所述多个第三网格一一对应的多个矢量地图瓦片;
所述多个第三网格内的矢量数据的释放时间由第一时间确定,所述第一时间为得到与所述多个第三矢量地图瓦片一一对应的多个矢量地图瓦片的时间。
可选地,上述处理器810,具体用于针对所述根网格集合中的其中一个根网格,在地图层级n大于或等于上限地图层级j的情况下:
将一个根网格内的矢量数据转换为对应地图层级n的矢量地图瓦片;
其中,所述目标矢量地图瓦片集合中包括:与所述一个根网格对应的矢量地图瓦片;
所述一个根网格内的矢量数据的释放时间由得到与所述一个根网格对应的矢量地图瓦片的时间确定。可选地,上述处理器810,还用于在完成所述根网格集中所有网格的矢量数据的释放之后:
若地图层级n大于下限地图层级i,则对由至少两个第一根网格内的矢量数据转换得到的矢量地图瓦片进行聚合,得到对应地图层级(n-1)的第一矢量地图瓦片;且将根网格集合中的至少两个第一根网格替换为第一父网格;至少两个第一根网格中包括一个根网格,第一父网格为至少两个第一根网格的对应地图层级(n-1)的父网格;
若地图层级(n-1)大于下限地图层级i,则对由至少两个第二根网格内的矢量数据转换得到的矢量地图瓦片进行聚合,得到对应地图层级(n-2)的第二矢量地图瓦片;且将根网格集合中的至少两个第二根网格替换为第二父网格,直至聚合得到对应下限地图层级i的矢量地图瓦片;至少两个第二根网格中包括第一父网格,第二父网格为至少两个第二根网格的对应地图层级(n-2)的父网格。
可选地,上述待切片矢量数据对应的预设地图层级集合中包括M个地图层级,M为大于1的整数;
上述处理器810,具体用于:
基于M个地图层级,将目标矢量地图瓦片集合中对应相同地图层级的矢量瓦片进行拼接,得到M个地图层;并
基于M个地图层,得到区域矢量地图。
可选地,上述预置数据密度根据以下任一项确定:
根据对设备的配置信息和待切片任务的评估结果确定;
根据待切片矢量数据和目标数量确定;
其中,目标数量为:待切片矢量数据对应的初始网格的数量。
本申请实施例提供一种矢量地图切片生成装置,由于可以根据待切片矢量数据的密度分布信息获取根网格集合,因此可以使得电子设备可以更合理地拆分切片任务,以使得网格集合内的各根网格内的矢量数据密度小于预置数据密度,并自适应的拆对拆分后的矢量数据进行切片,从而可以提高矢量地图切片的效率,进而可以提高生成矢量地图的效率。
应理解的是,本申请实施例中,输入单元804可以包括图形处理器(Graphics Processing Unit,GPU)8041和麦克风8042,图形处理器8041对在视频捕获模式或图
像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元806可包括显示面板8061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板8061。输入单元804包括触控面板8071以及其他输入设备8072中的至少一种。触控面板8071,也称为触摸屏。触控面板8071可包括触摸检测装置和触摸控制器两个部分。其他输入设备8072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
存储器809可用于存储软件程序以及各种数据。存储器809可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器809可以包括易失性存储器或非易失性存储器,或者,存储器809可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器809包括但不限于这些和任意其它适合类型的存储器。
处理器810可包括一个或多个处理单元;可选的,处理器810集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器810中。
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述矢量地图生成方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述矢量地图生成方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。
本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述矢量地图生成方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、
物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。
Claims (20)
- 一种矢量地图生成方法,所述方法包括:基于目标区域对应的待切片矢量数据的密度分布信息,获取所述待切片矢量数据对应的根网格集合,所述根网格集合包括多个根网格,所述多个根网格中的每个根网格对应一个地图层级,且所述每个根网格内的矢量数据密度小于或等于预置数据密度;基于所述每个根网格内的矢量数据以及相应的地图层级,生成目标矢量地图瓦片集合;基于所述目标矢量地图瓦片集合,得到所述目标区域对应的区域矢量地图。
- 根据权利要求1所述的矢量地图生成方法,其中,所述基于目标区域对应的待切片矢量数据的密度分布信息,获取所述待切片矢量数据对应的根网格集合,包括:获取所述待切片矢量数据对应的初始网格集合,以及所述初始网格集合中的每个初始网格内的矢量数据,每个初始网格对应第一地图层级;基于所述密度分布信息,对目标初始网格内的矢量数据进行分割,以得到所述目标初始网格的下一地图层级的多个第一网格,所述目标初始网格为所述初始网格集合中矢量数据密度大于所述预置数据密度的初始网格;若所述多个第一网格中的目标第一网格内的矢量数据密度大于所述预置数据密度,则继续对所述目标第一网格内的矢量数据进行分割,直至分割后得到的所有网格内的矢量数据密度均小于或等于所述预置数据密度,以得到所述根网格集合。
- 根据权利要求2所述的矢量地图生成方法,其中,所述第一地图层级由以下之一确定:随机指定;由所述目标区域的地理参数确定;其中,所述地理参数包括以下至少之一:所述目标区域的经度差、所述目标区域的纬度差。
- 根据权利要求1所述的方法,其中,所述基于所述每个根网格内的矢量数据以及相应的地图层级,生成目标矢量地图瓦片集合,包括:针对所述根网格集合中的其中一个根网格,在所述一个根网格对应的地图层级n大于预设地图层级集合中的下限地图层级i,且小于所述预设地图层级集合中的上限地图层级j的情况下:将所述一个根网格内的矢量数据转换为与所述一个根网格对应的矢量地图瓦片;对所述一个根网格内的矢量数据进行分割,直至分割得到所述一个根网格的对应地图层级f的多个第二网格;并将所述多个第二网格内的矢量数据转换为与所述多个第二网格一一对应的多个矢量地图瓦片,直至将多个第三网格内的矢量数据转换为与所述多个第三网格一一对应的多个矢量地图瓦片;所述多个第三网格包括所述一个根网格的对应所述上限地图层级j的所有网格;其中,所述目标矢量地图瓦片集合中包括:与所述一个根网格对应的矢量地图瓦片、与所述多个第二网格一一对应的多个矢量地图瓦片、与所述多个第三网格一一对应的多个矢量地图瓦片;所述地图层级f为所述预设地图层级集合中与所述地图层级n之差最小的地图层级,n、i、j和f均为正整数,且i≤n<f≤j;所述多个第三网格内的矢量数据的释放时间由第一时间确定,所述第一时间为得 到与所述多个第三网格一一对应的多个矢量地图瓦片的时间。
- 根据权利要求1所述的方法,其中,所述基于所述每个根网格内的矢量数据以及相应的地图层级,生成目标矢量地图瓦片集合,包括:针对所述根网格集合中的其中一个根网格,在所述地图层级n小于所述下限地图层级i的情况下,对所述一个根网格内的矢量数据进行分割,直至分割得到所述一个根网格的对应所述下限地图层级i的多个第四网格;将所述多个第四网格内的矢量数据转换为与所述多个第四网格一一对应的多个矢量地图瓦片;分别对所述多个第四网格内的矢量数据进行分割,直至得到所述一个根网格的对应地图层级g的多个第五网格;将所述多个第五网格内的矢量数据转换为与所述多个第五网格一一对应的多个矢量地图瓦片,直至将多个第三网格内的矢量数据转换为与所述多个第三网格一一对应的多个矢量地图瓦片;所述多个第三网格包括所述一个根网格的对应所述上限地图层级j的所有网格;其中,所述地图层级g为所述预设地图层级集合中与下限地图层级i之差最小的地图层级,n<i<g≤j,且n、i、g、j为正整数;所述目标矢量地图瓦片集合中包括:与所述多个第四网格一一对应的多个矢量地图瓦片、与所述多个第五网格一一对应的多个矢量地图瓦片、与所述多个第三网格一一对应的多个矢量地图瓦片;所述多个第三网格内的矢量数据的释放时间由第一时间确定,所述第一时间为得到与所述多个第三网格一一对应的多个矢量地图瓦片的时间。
- 根据权利要求1所述的方法,其中,所述基于所述每个根网格内的矢量数据以及相应的地图层级,生成目标矢量地图瓦片集合,包括:针对所述根网格集合中的其中一个根网格,在所述地图层级n大于或等于所述上限地图层级j的情况下:将所述一个根网格内的矢量数据转换为与所述一个根网格对应的矢量地图瓦片;其中,所述目标矢量地图瓦片集合中包括:与所述一个根网格对应的矢量地图瓦片;所述一个根网格内的矢量数据的释放时间由得到与所述一个根网格对应的矢量地图瓦片的时间确定。
- 根据权利要求4至6中任一项所述的方法,其中,在完成所述根网格集中所有网格的矢量数据的释放之后,所述方法还包括:若所述地图层级n大于所述下限地图层级i,则对与至少两个第一根网格对应的矢量地图瓦片进行聚合,得到与第一父网格对应的第一矢量地图瓦片;且将所述根网格集合中的所述至少两个第一根网格替换为所述第一父网格;所述至少两个第一根网格中包括所述一个根网格,所述第一父网格为所述一个根网格的对应所述地图层级(n-1)的父网格;若所述地图层级(n-1)大于所述下限地图层级i,则对与至少两个第二根网格对应的矢量地图瓦片进行聚合,得到与第二父网格对应的第二矢量地图瓦片;且将所述根网格集合中的所述至少两个第二根网格替换为所述第二父网格,直至聚合得到与第三父网格对应的矢量地图瓦片;所述至少两个第二根网格中包括所述第一父网格,所述第二父网格为所述一个根网格的对应所述地图层级(n-2)的父网格,所述第三父网格为所述一个根网格的对应所述下限地图层级i的父网格。
- 根据权利要求1所述的方法,其中,所述待切片矢量数据对应的预设地图层级集合中包括M个地图层级,M为大于1的整数;所述基于所述目标矢量地图瓦片集合,得到所述目标区域对应的区域矢量地图,包括:基于所述M个地图层级,将所述目标矢量地图瓦片集合中对应相同地图层级的矢量瓦片进行拼接,得到M个地图层;基于所述M个地图层,得到所述区域矢量地图。
- 根据权利要求1所述的方法,其中,所述预置数据密度根据以下任一项确定:根据对设备的配置信息和待切片任务的评估结果确定;根据所述待切片矢量数据和目标数量确定;其中,所述目标数量为:所述待切片矢量数据对应的初始网格的数量。
- 一种矢量地图生成装置,所述装置包括:获取模块和处理模块;所述获取模块,用于基于目标区域对应的待切片矢量数据的密度分布信息,获取所述待切片矢量数据对应的根网格集合,所述根网格集合包括多个根网格,所述多个根网格中的每个根网格对应一个地图层级,且所述每个根网格内的矢量数据密度小于或等于预置数据密度;所述处理模块,用于基于所述每个根网格内的矢量数据以及相应的所述获取模块获得的地图层级,生成目标矢量地图瓦片集合;所述处理模块,还用于基于所述目标矢量地图瓦片集合,得到所述目标区域对应的区域矢量地图。
- 根据权利要求10所述的装置,其中,所述获取模块包括获取子模块和处理子模块;所述获取子模块,用于获取所述待切片矢量数据对应的初始网格集合,以及所述初始网格集合中的每个初始网格内的矢量数据,每个初始网格对应第一地图层级;所述处理子模块,用于基于所述获取子模块获取的所述密度分布信息,对目标初始网格内的矢量数据进行分割,以得到所述目标初始网格的下一地图层级的多个第一网格,所述目标初始网格为所述初始网格集中矢量数据密度大于所述预置数据密度的初始网格;并且,若所述多个第一网格中的目标第一网格内的矢量数据密度大于所述预置数据密度,则继续对所述目标第一网格内的矢量数据进行分割,直至分割后得到的所有网格内的矢量数据密度均小于或等于所述预置数据密度,以得到所述根网格集合。
- 根据权利要求11所述的装置,其中,所述第一地图层级由以下之一确定:随机指定;由所述目标区域的地理参数确定;其中,所述地理参数包括以下至少之一:所述目标区域的经度差、所述目标区域的纬度差。
- 根据权利要求10所述的装置,其中,所述处理模块,具体用于针对所述根网格集合中的其中一个根网格,在所述一个根网格对应的地图层级n大于预设地图层级集合中的下限地图层级i,且小于所述预设地图层级集合中的上限地图层级j的情况下:将所述一个根网格内的矢量数据转换为对应地图层级n的矢量地图瓦片;对所述一个根网格内的矢量数据进行分割,直至分割得到所述一个根网格的对应 地图层级f的多个第二网格;并将所述多个第二网格内的矢量数据分别转换为对应地图层级f的矢量地图瓦片,直至将多个第三网格内的矢量数据分别转换为对应所述上限地图层级j的矢量地图瓦片;所述多个第三网格包括所述一个根网格的对应所述上限地图层级j的所有网格;其中,所述目标矢量地图瓦片集合中包括:与所述一个根网格对应的矢量地图瓦片、与所述多个第二网格一一对应的多个矢量地图瓦片、与所述多个第三网格一一对应的多个矢量地图瓦片;所述地图层级f为所述预设地图层级集合中与所述地图层级n之差最小的地图层级,n、i、j和f均为正整数,且i≤n<f≤j;所述多个第三网格内的矢量数据的释放时间由第一时间确定,所述第一时间为得到与所述多个第三矢量地图瓦片一一对应的多个矢量地图瓦片的时间。
- 根据权利要求10所述的装置,其中,所述处理模块,具体用于针对所述根网格集合中的其中一个根网格,在所述地图层级n小于所述下限地图层级i的情况下,对所述一个根网格内的矢量数据进行分割,直至分割得到所述一个根网格的对应所述下限地图层级i的多个第四网格;且将所述多个第四网格内的矢量数据分别转换为对应所述下限地图层级i的矢量地图瓦片;分别对所述多个第四网格内的矢量数据进行分割,直至得到所述一个根网格的对应地图层级g的多个第五网格;且将所述多个第五网格内的矢量数据分别转换为对应所述地图层级g的矢量地图瓦片,直至将所述多个第三网格内的矢量数据分别转换为对应所述上限地图层级j的矢量地图瓦片;所述多个第三网格包括所述一个根网格的对应所述上限地图层级j的所有网格;其中,所述地图层级g为所述预设地图层级集合中与下限地图层级i之差下限的地图层级,n<i<g≤j,且n、i、g、j为正整数;所述目标矢量地图瓦片集合中包括:与所述多个第四网格一一对应的多个矢量地图瓦片、与所述多个第五网格一一对应的多个矢量地图瓦片、与所述多个第三网格一一对应的多个矢量地图瓦片;所述多个第三网格内的矢量数据的释放时间由第一时间确定,所述第一时间为得到与所述多个第三矢量地图瓦片一一对应的多个矢量地图瓦片的时间。
- 根据权利要求10所述的装置,其中,所述处理模块,具体用于针对所述根网格集合中的其中一个根网格,在所述地图层级n大于或等于所述上限地图层级j的情况下:将所述一个根网格内的矢量数据转换为对应地图层级n的矢量地图瓦片;其中,所述目标矢量地图瓦片集合中包括:与所述一个根网格对应的矢量地图瓦片;所述一个根网格内的矢量数据的释放时间由得到与所述一个根网格对应的矢量地图瓦片的时间确定。
- 根据权利要求13至15中任一项所述的装置,其中,所述处理模块,还用于在完成所述根网格集中所有网格的矢量数据的释放之后,在所述地图层级n大于所述下限地图层级i的情况下:对由至少两个第一根网格内的矢量数据转换得到的矢量地图瓦片进行聚合,得到对应地图层级(n-1)的第一矢量地图瓦片;且将所述根网格集合中的所述至少两个第一根网格替换为第一父网格;所述至少两个第一根网格中包括所述一个根网格,所述 第一父网格为所述至少两个第一根网格的对应所述地图层级(n-1)的父网格;若所述地图层级(n-1)大于所述下限地图层级i,则对由至少两个第二根网格内的矢量数据转换得到的矢量地图瓦片进行聚合,得到对应地图层级(n-2)的第二矢量地图瓦片;且将所述根网格集合中的所述至少两个第二根网格替换为第二父网格,直至聚合得到对应下限地图层级i的矢量地图瓦片;所述至少两个第二根网格中包括所述第一父网格,所述第二父网格为所述至少两个第二根网格的对应所述地图层级(n-2)的父网格。
- 根据权利要求10所述的装置,其中,所述待切片矢量数据对应的预设地图层级集合中包括M个地图层级,M为大于1的整数;所述处理模块,具体用于:基于所述M个地图层级,将所述目标矢量地图瓦片集合中对应相同地图层级的矢量瓦片进行拼接,得到M个地图层;并基于所述M个地图层,得到所述区域矢量地图。
- 根据权利要求10所述的装置,其中,所述预置数据密度根据以下任一项确定:根据对设备的配置信息和待切片任务的评估结果确定;根据所述待切片矢量数据和目标数量确定;其中,所述目标数量为:所述待切片矢量数据对应的初始网格的数量。
- 一种电子设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至9中任一项所述的矢量地图生成方法的步骤。
- 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至9中任一项所述的矢量地图生成方法的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211165875.8 | 2022-09-23 | ||
CN202211165875.8A CN115457226A (zh) | 2022-09-23 | 2022-09-23 | 矢量地图生成方法、装置、电子设备和可读存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024061327A1 true WO2024061327A1 (zh) | 2024-03-28 |
Family
ID=84306810
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/120472 WO2024061327A1 (zh) | 2022-09-23 | 2023-09-21 | 矢量地图生成方法、装置、电子设备和可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115457226A (zh) |
WO (1) | WO2024061327A1 (zh) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115457226A (zh) * | 2022-09-23 | 2022-12-09 | 维沃移动通信有限公司 | 矢量地图生成方法、装置、电子设备和可读存储介质 |
CN116541479B (zh) * | 2023-07-06 | 2023-09-19 | 深圳依时货拉拉科技有限公司 | 瓦块数据编译方法、装置、计算机设备和存储介质 |
CN116628123B (zh) * | 2023-07-19 | 2023-12-12 | 深圳市易图资讯股份有限公司 | 基于空间数据库的动态切片生成方法和系统 |
CN117827915B (zh) * | 2024-03-01 | 2024-06-25 | 昆明麦普空间科技有限公司 | 一种快速矢量切片系统及方法 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100321399A1 (en) * | 2009-06-18 | 2010-12-23 | Patrik Ellren | Maps from Sparse Geospatial Data Tiles |
CN111061729A (zh) * | 2019-11-29 | 2020-04-24 | 武汉大学 | 顾及粒度的矢量瓦片组织方法 |
CN111737393A (zh) * | 2020-07-01 | 2020-10-02 | 自然资源部四川基础地理信息中心(自然资源部四川测绘资料档案馆) | 一种web环境下矢量数据自适管理方法及系统 |
CN115457226A (zh) * | 2022-09-23 | 2022-12-09 | 维沃移动通信有限公司 | 矢量地图生成方法、装置、电子设备和可读存储介质 |
-
2022
- 2022-09-23 CN CN202211165875.8A patent/CN115457226A/zh active Pending
-
2023
- 2023-09-21 WO PCT/CN2023/120472 patent/WO2024061327A1/zh unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100321399A1 (en) * | 2009-06-18 | 2010-12-23 | Patrik Ellren | Maps from Sparse Geospatial Data Tiles |
CN111061729A (zh) * | 2019-11-29 | 2020-04-24 | 武汉大学 | 顾及粒度的矢量瓦片组织方法 |
CN111737393A (zh) * | 2020-07-01 | 2020-10-02 | 自然资源部四川基础地理信息中心(自然资源部四川测绘资料档案馆) | 一种web环境下矢量数据自适管理方法及系统 |
CN115457226A (zh) * | 2022-09-23 | 2022-12-09 | 维沃移动通信有限公司 | 矢量地图生成方法、装置、电子设备和可读存储介质 |
Non-Patent Citations (1)
Title |
---|
ZHU XIAOXIAO, ZHANG FENG, DU ZHENHONG, LIU RENYI, YU HUAFEN: "A Method of the Dense-Sparse Vector Tile Generation Accounting for the Spatial Distribution of Features", JOURNAL OF ZHEJIANG UNIVERSITY (SCIENCE EDITION), vol. 44, no. 5, 1 September 2017 (2017-09-01), pages 591 - 598, XP093150523, DOI: 10.3785/j.issn.1008-9497.2017.05.015 * |
Also Published As
Publication number | Publication date |
---|---|
CN115457226A (zh) | 2022-12-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2024061327A1 (zh) | 矢量地图生成方法、装置、电子设备和可读存储介质 | |
US11361483B2 (en) | Graph partitioning for massive scale graphs | |
CN114862656A (zh) | 基于多gpu的分布式深度学习模型训练代价的获取方法 | |
CN107678531B (zh) | 应用清理方法、装置、存储介质及电子设备 | |
CN111752691B (zh) | Ai计算图的排序方法、装置、设备及存储介质 | |
US12141229B2 (en) | Techniques for accelerating matrix multiplication computations using hierarchical representations of sparse matrices | |
US20220229809A1 (en) | Method and system for flexible, high performance structured data processing | |
CN113392863A (zh) | 一种机器学习训练数据集的获取方法、获取装置及终端 | |
CN117992242B (zh) | 一种数据处理方法、装置、电子设备及存储介质 | |
CN112799599B (zh) | 一种数据存储方法、计算核、芯片和电子设备 | |
CN117787358A (zh) | 一种基于阻变存储器的模型量化方法、装置以及设备 | |
US7953705B2 (en) | Autonomic retention classes | |
CN115525394A (zh) | 容器数量的调整方法及装置 | |
CN113626426B (zh) | 一种生态网格数据的采集传输方法及系统 | |
Niu et al. | User-aware partitioning algorithm for mobile cloud computing based on maximum graph cuts | |
CN110674134B (zh) | 一种地理信息数据存储方法、查询方法及装置 | |
CN117421129A (zh) | 一种基于异构存储集群的业务执行方法、装置及电子设备 | |
CN106406766A (zh) | 一种数据存储方法及装置 | |
Hussein et al. | Dynamic Resource Allocation in Cloud Networks Using Deep Learning: A review | |
CN119202342B (zh) | 一种数据可视化大屏的实现方法及系统 | |
US12211080B2 (en) | Techniques for performing matrix computations using hierarchical representations of sparse matrices | |
US11709812B2 (en) | Techniques for generating and processing hierarchical representations of sparse matrices | |
US20250037186A1 (en) | Techniques for performing matrix computations using hierarchical representations of sparse matrices | |
CN118312465B (zh) | 广域网大模型训练的方法、装置、电子设备及存储介质 | |
CN118378726B (zh) | 一种模型训练系统、方法、存储介质及电子设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23867612 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |