Position data storage method, map visualization method, device and equipment

By dividing the map and time axis into multiple tile and time slices, using tile pixel coordinates and relative time to store position data, the problem of low storage efficiency in the prior art is solved, and more efficient storage is achieved.

CN119806418AActive Publication Date: 2025-04-11JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411887699.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

In the prior art, the storage efficiency of location data is low, resulting in a large amount of location data occupying too much storage space.

Method used

By dividing the map into multiple map tiles and dividing the timeline into multiple time slices, the tile pixel coordinates and relative time are used as position data for storage.

Benefits of technology

It effectively reduces the amount of storage space occupied by massive location data and improves storage efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806418A_ABST
    Figure CN119806418A_ABST
Patent Text Reader

Abstract

The invention discloses a position data storage method, a map visualization method, a device and equipment. The method comprises the steps of determining to-be-stored map tiles matched with original latitude and longitude coordinates of a map object in a maximum map level in a pyramid model according to a conversion function between a geographic coordinate system and a map coordinate system; converting the original latitude and longitude coordinates into to-be-stored tile pixel coordinates under a tile coordinate system corresponding to the to-be-stored map tiles; according to the map starting moment and the time slice interval, determining a to-be-stored time slice matched with the original timestamp of the map object in the time slice set; converting the original timestamp into to-be-stored relative time corresponding to the to-be-stored time slice; the position index fields constructed according to the to-be-stored time slices and the to-be-stored map tiles and the to-be-stored position data constructed according to the to-be-stored tile pixel coordinates and the to-be-stored relative time are correspondingly stored in the position storage model, so that the occupation amount of the storage space is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a location data storage method, a map visualization method, a device, and equipment. Background Art

[0002] With the popularization of mobile Internet devices and the development of satellite positioning technology, location data continues to be generated over time, such as taxi trajectory data and point reporting data uploaded by clients.

[0003] In the traditional storage model, location data consists of the map object (oid) that generates the location, spatial coordinates (position), and timestamp (time), which can be expressed as:

[0004] location=<oid,position,time> =<oid,lon,lat,time> ;

[0005] Where lon represents the longitude of the map object, -180.0≤lon≤180.0, and lat represents the latitude of the map object, -90.0≤lat≤90.0.

[0006] In the process of implementing the present invention, it was found that the prior art has at least the following technical problems:

[0007] Nowadays, the amount of location data is getting larger and larger, and the location data in the traditional storage model is<lon,lat,time> It requires 24 bytes to store, which takes up too much storage space. Summary of the Invention

[0008] Embodiments of the present invention provide a location data storage method, a map visualization method, an apparatus, and a device to solve the problem of massive location data occupying too much storage space.

[0009] According to one embodiment of the present invention, a method for storing location data is provided, the method comprising:

[0010] Determine, based on a conversion function between a geographic coordinate system and a map coordinate system, a map tile to be stored in a maximum map level in a pyramid model that matches the original latitude and longitude coordinates of the map object;

[0011] Converting the original longitude and latitude coordinates into pixel coordinates of the tile to be stored in the tile coordinate system corresponding to the map tile to be stored;

[0012] Determine, according to the map start time and the time slice interval, a time slice to be stored in the time slice set that matches the original timestamp of the map object;

[0013] Converting the original timestamp into a relative time to be stored corresponding to the time slice to be stored;

[0014] Constructing a location index field according to the time slice to be stored and the map tile to be stored, and constructing the location data to be stored according to the pixel coordinates of the tile to be stored and the relative time to be stored;

[0015] Storing the location index field and the location data to be stored in a location storage model in correspondence;

[0016] The time slice set includes at least one preset time slice obtained by dividing the time axis starting from the map start time according to the time slice interval.

[0017] According to another embodiment of the present invention, a map visualization method is provided, the method comprising:

[0018] In response to detecting a map visualization request, determining an index map tile set based on a query map level corresponding to the map visualization request and query map tiles at the query map level; wherein the index map tiles in the index map tile set are preset map tiles at a maximum map level in a pyramid model;

[0019] Obtaining a query location dataset from a map storage model according to the index time slice set corresponding to the map visualization request and the index map tile set;

[0020] Converting each query location data in the query location data set into map location data to obtain a map location data set;

[0021] Visually displaying the map location dataset in the query map tile;

[0022] In which, the map storage model is constructed using the location data storage method provided in any embodiment of the present invention, and the map location data includes target tile pixel coordinates and target timestamps, and the target tile pixel coordinates represent the location coordinates in the tile coordinate system corresponding to the query map tile.

[0023] According to another embodiment of the present invention, a device for storing position data is provided, the device comprising:

[0024] A module for determining a map tile to be stored, configured to determine a map tile to be stored that matches the original latitude and longitude coordinates of the map object in the maximum map level in the pyramid model according to a conversion function between the geographic coordinate system and the map coordinate system;

[0025] An original longitude and latitude coordinate conversion module, configured to convert the original longitude and latitude coordinates into pixel coordinates of the tile to be stored in the tile coordinate system corresponding to the map tile to be stored;

[0026] A module for determining a time slice to be stored, configured to determine a time slice to be stored in a time slice set that matches an original timestamp of the map object according to a map start time and a time slice interval;

[0027] An original timestamp conversion module, configured to convert the original timestamp into a relative time to be stored corresponding to the time slice to be stored;

[0028] A module for constructing location data to be stored, configured to construct a location index field based on the time slice to be stored and the map tile to be stored, and to construct location data to be stored based on the pixel coordinates of the tile to be stored and the relative time to be stored;

[0029] A location data storage module to be stored, configured to store the location index field and the location data to be stored in a location storage model in correspondence thereto;

[0030] The time slice set includes at least one preset time slice obtained by dividing the time axis starting from the map start time according to the time slice interval.

[0031] According to another embodiment of the present invention, a map visualization device is provided, the device comprising:

[0032] An index map tile set determining module is configured to, in response to detecting a map visualization request, determine an index map tile set based on a query map level corresponding to the map visualization request and query map tiles at the query map level; wherein the index map tiles in the index map tile set are preset map tiles at the maximum map level in the pyramid model;

[0033] A query location data set acquisition module, configured to acquire a query location data set from a map storage model according to an index time slice set and an index map tile set corresponding to the map visualization request;

[0034] a query location data set conversion module, configured to convert each query location data in the query location data set into map location data to obtain a map location data set;

[0035] A first tile map display module, configured to visually display the map location dataset in the query map tile;

[0036] In which, the map storage model is constructed using the location data storage method as described in any embodiment of the present invention, and the map location data includes target tile pixel coordinates and target timestamp, and the target tile pixel coordinates represent the location coordinates of the query map tile in the tile coordinate system.

[0037] According to another embodiment of the present invention, a map terminal is provided, which includes:

[0038] at least one processor; and

[0039] a memory communicatively connected to the at least one processor; wherein,

[0040] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the location data storage method described in any embodiment of the present invention and / or the map visualization method described in any embodiment of the present invention.

[0041] According to another embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the location data storage method described in any embodiment of the present invention and / or the map visualization method described in any embodiment of the present invention when executed.

[0042] According to another embodiment of the present invention, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the location data storage method described in any embodiment of the present invention and / or the map visualization method described in any embodiment of the present invention.

[0043] The technical solution of the embodiment of the present invention divides a geographical map into multiple map tiles to convert the original latitude and longitude coordinates of a map object into tile pixel coordinates to be stored in a tile coordinate system corresponding to the map tile to be stored in the largest map level in a pyramid model; divides the time axis into multiple time slices to convert the original timestamp of the map object into relative time to be stored corresponding to the time slice to be stored in a time slice set; and uses tile pixel coordinates and relative time with a smaller data granularity as position data for storage, thereby reducing the storage space occupied by massive position data.

[0044] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0046] Figure 1 A schematic diagram of a pyramid model provided by one embodiment of the present invention;

[0047] Figure 2 A schematic diagram of tile coordinates provided by one embodiment of the present invention;

[0048] Figure 3 A schematic diagram of conversion between row and column numbers and z-values ​​of a map tile provided by one embodiment of the present invention;

[0049] Figure 4 A flowchart of a method for storing location data provided by one embodiment of the present invention;

[0050] Figure 5 A schematic diagram of conversion between map pixel coordinates and tile pixel coordinates provided by one embodiment of the present invention;

[0051] Figure 6 A flowchart of another method for storing location data provided by one embodiment of the present invention;

[0052] Figure 7 A flowchart of a map visualization method provided by one embodiment of the present invention;

[0053] Figure 8 A flowchart of another map visualization method provided by one embodiment of the present invention;

[0054] Figure 9 A schematic diagram of matching between a query map level and a reference map level provided by one embodiment of the present invention;

[0055] Figure 10 A flowchart of a specific example of a map visualization method provided by one embodiment of the present invention;

[0056] Figure 11 A visualization diagram of querying map tiles and data volume change curves provided by an embodiment of the present invention;

[0057] Figure 12 A schematic structural diagram of a location data storage device provided by one embodiment of the present invention;

[0058] Figure 13A schematic structural diagram of a map visualization device provided by one embodiment of the present invention;

[0059] Figure 14 The present invention provides a schematic structural diagram of a map terminal according to an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make those skilled in the art better understand the present invention, at least some of the terms in the embodiments of the present invention are explained. Unless otherwise defined, the meanings of all scientific and technical terms used in the embodiments of the present invention are the same as those generally understood by those skilled in the art.

[0061] Electronic Map

[0062] In the embodiment of the present invention, the electronic map within the geographical area is defined as a spatial range consisting of square pixels. The side length of the electronic map is n square pixels. With the upper left corner of the electronic map as the coordinate origin, the horizontal rightward direction is the x-axis, and the vertical downward direction is the y-axis, the electronic map is constructed as a map coordinate system. The square pixels on the map coordinate system can be expressed as (map x ,map y ), named map pixel coordinates, where 0≤map x ,map y ≤n.

[0063] The geographical area may be a global area, a country area, a community area, etc. The maps mentioned below all refer to electronic maps of the global area.

[0064] Pyramid Model

[0065] The map size is represented by the map level zoomLevel. Maps of different map levels are organized from small to large to form Figure 1 The pyramid model shown. The pyramid model divides the map into 4 zoomLevel A grid of squares is called a map tile. The tile side length of each map tile in each map level is the same, expressed as extent square pixels. The map size of the tile map corresponding to each map level is determined by the map level zoomLevel. In the map level zoomLevel, the map side length of the tile map is n = extent × 2 zoomLevel .

[0066] The pyramid model can be formally defined as Pyramid =<maxLevel,extent> , where maxLevel represents the maximum map level. The larger the extent, the higher the resolution of the tile map.

[0067] Tile Coordinate

[0068] In the map level zoomLevel, tile coordinates are used to describe the position coordinates of map tiles in the tile map. Figure 2 The tile coordinates at the 1st map level (zoomLevel=1) and the 2nd map level (zoomLevel=2) in the pyramid model are shown.

[0069] like Figure 2 As shown, the column number col and row number row on the tile map can be used to describe the tile coordinates. The tile coordinates in row and column form are tile =<zoomLevel,col,row> All the map tiles in the tile map are connected by Z filling curves and numbered starting from 0. Then the tile coordinates can also be expressed in the form of z value. For example, the tile coordinates in the form of z value can be expressed as tile=<zoomLevel,z> , where 0≤z<4 zoomLevel .

[0070] Among them, the tile coordinates in row and column form<col,row> With the tile coordinates in the form of z values <z>Satisfies the binary crossover algorithm. Figure 3 As shown, the binary value of col=19 is 010011, and the binary value of row=47 is 101111.<col,row> The binary crossover calculation result is 100110101111, that is, z=2479.

[0071] Tile maps of different map levels correspond to the same geographical area, so the tile coordinates corresponding to the map level zoomLevel<zoomLevel,z> Tile coordinates corresponding to the map level zoomLevel′<zoomLevel′,z′> The following corresponding relationship exists:

[0072] <zoomLevel,z> ={<zoomLevel′,z′> |z×4 step ≤z′<(z+1)×4 step }

[0073] Wherein, zoomLevel′=zoomLevel+step, step represents the level step (step≥0).

[0074] like Figure 2 As shown, the tile coordinate <1,1> at map level 1 corresponds to the tile coordinate set {<2,4>, <2,5>, <2,6>, <2,7>} at map level 2.

[0075] In the following embodiments of the present invention, map tiles are all referred to by tile coordinates in the form of z values.

[0076] Time Slice Collection

[0077] Location data is time-sensitive. This paper uses the time interval period as the minimum time granularity. Starting from the map start time, the time axis is divided into at least one time slice, resulting in a time slice set B = {bin|bin∈N}. The unit of the time slice interval period is seconds, and the parameter value can be 1 minute, 1 hour, 1 day, 1 week, or 1 month. The map tile composed of the location data within a time slice bin is defined as a spatiotemporal tile binTile =<bin,zoomLevel,z> .

[0078] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0079] It should be noted that the terms "target," "to be stored," "reference," and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including," "having," and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatuses.

[0080] Figure 4 This is a flowchart of a method for storing location data provided by one embodiment of the present invention. This embodiment is applicable to the case of storing location data. The method can be executed by a location data storage device. The location data storage device can be implemented in the form of hardware and / or software. The location data storage device can be configured in a terminal device. Figure 4 As shown, the method includes:

[0081] S110 : Determine, based on a conversion function between a geographic coordinate system and a map coordinate system, a map tile to be stored in a maximum map level in a pyramid model that matches the original latitude and longitude coordinates of the map object.

[0082] In this embodiment, the pyramid model defines at least one tile map corresponding to each map level, and the tile map corresponding to the maximum map level is composed of a preset number of preset map tiles, and the preset number is a positive integer power of 4. Figure 1 As shown, the maximum map level is a map level greater than the 0 map level.

[0083] Specifically, the map coordinate system is the map coordinate system corresponding to the maximum map level, and the map tiles to be stored are used to represent the map tiles of the original latitude and longitude coordinates in the map coordinate system corresponding to the maximum map level.

[0084] In another specific embodiment, determining a map tile to be stored in a maximum map level in a pyramid model that matches the original longitude and latitude coordinates of a map object based on a conversion function between a geographic coordinate system and a map coordinate system includes: converting the original longitude and latitude coordinates of the map object into tile row and column coordinates using the conversion function between the geographic coordinate system and the map coordinate system; and representing the map tile to be stored in the maximum map level in the pyramid model that matches the original longitude and latitude coordinates of the map object using the tile row and column coordinates.

[0085] Specifically, the tile row and column coordinates are used to represent the row and column coordinates of the map tile to be stored in the map coordinate system corresponding to the maximum map level. In this embodiment, the tile coordinates of the map tile to be stored are expressed in the form of row and column numbers.

[0086] In another specific embodiment, determining a map tile to be stored in a maximum map level in a pyramid model that matches the original longitude and latitude coordinates of a map object based on a conversion function between a geographic coordinate system and a map coordinate system includes: converting the original longitude and latitude coordinates of the map object into tile row and column coordinates using the conversion function between the geographic coordinate system and the map coordinate system; and determining, based on the tile row and column coordinates, a map tile to be stored in the maximum map level in the pyramid model that matches the original longitude and latitude coordinates of the map object.

[0087] In this embodiment, the tile coordinates of the map tiles to be stored are represented in the form of z values. The following embodiment uses the z value form to represent the map tiles for illustrative purposes.

[0088] On the basis of the above embodiment, specifically, a conversion function between the geographic coordinate system and the map coordinate system is used to convert the original latitude and longitude coordinates of the map object into tile row and column coordinates, including: using a conversion function between the geographic coordinate system and the plane projection coordinate system to convert the original latitude and longitude coordinates into plane projection coordinates; using a conversion function between the plane projection coordinate system and the map coordinate system to convert the plane projection coordinates into map pixel coordinates; determining the tile row and column coordinates according to the map pixel coordinates and the tile size corresponding to the preset map tile.

[0089] Specifically, the original longitude and latitude coordinates represent the location coordinates in the geographic coordinate system. In order to facilitate display on the map plane, the original longitude and latitude coordinates (lon, lat) need to be converted into the plane projection coordinates (projection coordinates) in the plane projection coordinate system. x ,project y ), and then converted into map pixel coordinates in the map coordinate system corresponding to the maximum map level

[0090] Among them, the plane projection coordinates (project x ,project y ) is a continuous floating point value in meters, map pixel coordinates It is a discrete value of integer type, the unit is pixel, the plane projection coordinate (project x ,project y ) converted to map pixel coordinates This is a discretization process, which results in a loss of precision. The larger the maximum map level, the smaller the loss of precision. For example, when extent = 512, the plane distance corresponding to one pixel in the map coordinate system corresponding to map level 18 is approximately 0.597 meters, meaning the loss of precision is less than 0.597 meters.

[0091] For example, the tile row and column coordinates (col m ,row m ) satisfies the following formula:

[0092]

[0093] in, Indicates rounding down.

[0094] Use Figure 3 The binary crossover algorithm shown in the figure converts the tile row and column coordinates (col m ,row m ) is converted to the z value form of the map tile to be stored, which can be used m express.

[0095] S120: Convert the original longitude and latitude coordinates into pixel coordinates of the tile to be stored in a tile coordinate system corresponding to the map tile to be stored.

[0096] In a specific embodiment, the original latitude and longitude coordinates are converted into pixel coordinates of the tile to be stored in the tile coordinate system corresponding to the map tile to be stored, including: determining the tile origin coordinates of the tile coordinate system corresponding to the map tile to be stored based on the tile row and column coordinates and the tile size corresponding to the preset map tile; and using the coordinate difference between the map pixel coordinates and the tile origin coordinates as the pixel coordinates of the tile to be stored.

[0097] Figure 5 A schematic diagram of the conversion between map pixel coordinates and tile pixel coordinates provided by an embodiment of the present invention. Specifically, Figure 5 The map coordinate system corresponding to the map level 1 with extent=8 is shown. The map pixel coordinates of the hollow red dot in the map coordinate system corresponding to the map level 1 are <12,13>. The hollow red dot is located at<col=1,row=1> In the map tile, the tile pixel coordinates corresponding to the tile coordinate system corresponding to the map tile are <4,5>.

[0098] For example, the pixel coordinates of the tile to be stored are Satisfies the following formula:

[0099]

[0100] in, <col m ×extent,row m ×extent> represents the tile origin coordinates of the tile coordinate system corresponding to the map tile to be stored.

[0101] S130: Determine, according to the map start time and the time slice interval, a time slice to be stored in the time slice set that matches the original timestamp of the map object.

[0102] In this embodiment, the time slice set includes at least one preset time slice obtained by dividing the time axis starting from the map start time according to the time slice interval. In a specific embodiment, the map start time is the time epoch, that is, 00:00:00 on January 1, 1970.

[0103] In a specific embodiment, determining the time slice to be stored in the time slice set corresponding to the original timestamp of the map object based on the map start time and the time slice interval includes: taking the time difference between the original timestamp of the map object and the map start time as the time length; and determining the time slice to be stored in the time slice set corresponding to the original timestamp of the map object based on the time length and the time slice interval.

[0104] For example, the time slice bin to be stored satisfies the following formula:

[0105]

[0106] Among them, time represents the original timestamp, and epochTime represents the starting time of the map.

[0107] S140: Convert the original timestamp into a relative time to be stored corresponding to the time slice to be stored.

[0108] In a specific embodiment, the original timestamp is converted into a relative time to be stored corresponding to the time slice to be stored, including: taking the product result of the time slice to be stored and the time slice interval as a reference timestamp; taking the difference result between the original timestamp and the reference timestamp as the relative time to be stored relative to the time slice to be stored.

[0109] Exemplarily, the relative time offset to be stored satisfies the following formula:

[0110] offset = time - bin × period

[0111] Where bin×period represents the reference timestamp.

[0112] S150: Construct a location index field according to the time slice to be stored and the map tile to be stored, and construct location data to be stored according to the pixel coordinates of the tile to be stored and the relative time to be stored.

[0113] In a specific embodiment, the position index field can be represented as <bin,z m >, the location data to be stored can be expressed as

[0114] In another specific embodiment, the location data to be stored also includes the object identifier corresponding to the map object. For example, the location data to be stored can be represented as

[0115] S160: Store the location index field and the location data to be stored in the location storage model in correspondence.

[0116] In a specific embodiment, the table structure of the location data table in the location storage model is:

[0117] In the traditional storage model, location data location =<oid,lon,lat,time> Among them, longitude lon, latitude lat and timestamp time each require 8 bytes to store, that is, a location data location requires 24 bytes of storage space.

[0118] In the embodiment of the present invention, the tile pixel coordinates in the position data The value range is [0extent], where extent generally does not exceed the range of a short integer, that is, less than 32767, so the tile pixel coordinates It occupies 4 bytes of storage space, which is 25% less than the 16 bytes occupied by longitude lon and latitude lat, which also represent spatial information.

[0119] In this embodiment of the present invention, the relative time offset in the location data is expressed in seconds. Assuming a one-hour time interval, the relative time offset ranges from 0 to 3600 seconds, occupying only 2 bytes of storage space. Compared to the 8 bytes occupied by the timestamp, this achieves a 25% storage compression rate. Assuming a one-minute time interval, the relative time offset ranges from 0 to 60 seconds, occupying only 1 byte of storage space. Compared to the 8 bytes occupied by the timestamp, this achieves a 12.5% ​​storage compression rate.

[0120] The technical solution of this embodiment divides a geographic map into multiple map tiles to convert the original latitude and longitude coordinates of a map object into tile pixel coordinates to be stored in a tile coordinate system corresponding to the map tile to be stored at the maximum map level in a pyramid model. The time axis is divided into multiple time slices to convert the original timestamp of the map object into relative times to be stored corresponding to the time slice to be stored in a time slice set. The tile pixel coordinates and relative times with a smaller data granularity are used as location data for storage, thereby reducing the storage space occupied by massive location data.

[0121] Figure 6 This is a flowchart of another method for storing location data provided by one embodiment of the present invention. This embodiment further refines the above embodiment of "storing the location index field and the location data to be stored in the location storage model accordingly." Figure 6 As shown, the method includes:

[0122] S210 : Determine, based on a conversion function between the geographic coordinate system and the map coordinate system, a map tile to be stored in the maximum map level in the pyramid model that matches the original latitude and longitude coordinates of the map object.

[0123] S220: Convert the original longitude and latitude coordinates into pixel coordinates of the tile to be stored in a tile coordinate system corresponding to the map tile to be stored.

[0124] S230: Determine, according to the map start time and the time slice interval, a time slice to be stored in the time slice set that matches the original timestamp of the map object.

[0125] S240: Convert the original timestamp into a relative time to be stored corresponding to the time slice to be stored.

[0126] S250: Construct a location index field according to the time slice to be stored and the map tile to be stored, and construct the location data to be stored according to the pixel coordinates of the tile to be stored and the relative time to be stored.

[0127] S210-S250 in this embodiment are the same as those in the above embodiment. Figure 4 The steps S110 - S150 shown are identical or similar to each other and are not described in detail in this embodiment.

[0128] S260: Determine whether a location index field exists in the location storage model. If yes, execute S270; if not, execute S280.

[0129] S270. Store the location data to be stored in the location data packet corresponding to the location index field in the location storage model.

[0130] S280: Store the location index field in the location storage model, and store the location data to be stored in the location data packet corresponding to the location index field in the location storage model.

[0131] In this embodiment, the location data packet contains at least one stored location data corresponding to the location index field. Specifically, the location storage model stores the same location index field only once. For example, the table structure of the location data table in the location storage model can be expressed as <bin,z m ,data packet>.

[0132] Specifically, when the location index field does not exist in the location storage model, both the location index field and the location data to be stored are stored in the location storage model. When the location index field exists in the location storage model, only the location data to be stored is stored in the location storage model.

[0133] In a specific embodiment, the data structure of the location data packet can be represented as follows: i is a positive integer.

[0134] In a specific embodiment, the location data to be stored also includes an object identifier corresponding to a map object. Accordingly, the location data to be stored is stored in a location data packet corresponding to the location index field in the location storage model, including: when the object identifier in the location data to be stored exists in the object identifier set in the location data packet, the tile pixel coordinates to be stored and the relative time to be stored in the location data to be stored are stored as a location sequence in the location data packet; when the object identifier in the location data to be stored does not exist in the object identifier set in the location data packet, the object identifier is stored in the object identifier set, and the tile pixel coordinates to be stored and the relative time to be stored in the location data to be stored are stored as a location sequence in the location data packet.

[0135] The location storage model in this embodiment stores the same object identifier only once. Specifically, when the object identifier in the location data packet contains the object identifier in the location data to be stored, only the pixel coordinates of the tile to be stored and the relative time to be stored in the location data to be stored are stored in the location data packet. When the object identifier in the location data packet does not contain the object identifier in the location data to be stored, the object identifier, pixel coordinates of the tile to be stored, and the relative time to be stored in the location data to be stored are all stored in the location data packet.

[0136] In this embodiment, the data structure of the location data packet can be represented as follows: i,j are positive integers, i≤j. i} represents the object identifier set, {data j } represents the location dataset.

[0137] The advantage of this setting is that it reduces the redundant storage of object identifiers in the location data table in the location storage model, and further reduces the amount of storage space occupied by massive location data.

[0138] Based on the above embodiment, specifically, the method further includes: in response to detecting a storage operation of the position data to be stored, increasing the amount of position data of the position index field corresponding to the position data to be stored in the position storage model by one.

[0139] In this embodiment, the location data volume represents the volume of location data stored in the location data packet corresponding to the location index field.

[0140] In a specific embodiment, the location data is stored in a location data table. Accordingly, the table structure of the location data table can be expressed as <bin,z m ,data packet,count>.

[0141] In another specific embodiment, the location index field and the location data table are stored in the statistical data table in the location storage model. For example, the table structure of the statistical data table can be expressed as <bin,z m ,count>.

[0142] The advantage of this setting is that it facilitates quick query of the location data volume corresponding to the location data package during subsequent map visualization, thereby helping to improve the display efficiency of subsequent map visualization.

[0143] The technical solution of this embodiment solves the problem of redundant storage of location index fields in the location storage model by determining whether there is a location index field in the location storage model, so that the same location index field is only stored once in the location storage model, and further reduces the amount of storage space occupied by massive location data.

[0144] Figure 7 This is a flowchart of a map visualization method provided by one embodiment of the present invention. This embodiment is applicable to the case where a map defined by a pyramid model is visualized. The method can be executed by a map visualization device, which can be implemented in the form of hardware and / or software and can be configured in a map terminal. Figure 7 As shown, the method includes:

[0145] S310 : In response to detecting a map visualization request, determine an index map tile set according to a query map level corresponding to the map visualization request and query map tiles under the query map level.

[0146] In this embodiment, a pyramid model defines at least one tile map corresponding to each map level. The tile map corresponding to the maximum map level is composed of a preset number of preset map tiles, where the preset number is a positive integer power of 4. The pyramid model is used to flexibly display an electronic map of any scale, that is, any map level, on a fixed-size electronic screen. The electronic screen can be referred to as a window.

[0147] The map visualization request can be that the client dynamically calculates which map tiles in which map level of the pyramid model to display in the window according to the user's zoom and pan operations, obtains the query map level and query map tiles, and then initiates a concurrent request to the map terminal with the query map level and query map tiles as request parameters. The map terminal is used to manage map tiles and respond to the map visualization request.

[0148] Specifically, the query map level is the map level in the pyramid model, and the query map tile is the map tile in the map coordinate system corresponding to the query map level. For example, the query map level and the query map tile can be expressed as<zoomLevel,z> .

[0149] In this embodiment, the index map tiles in the index map tile set are preset map tiles at the maximum map level in the pyramid model.

[0150] For example, the index map tile set {z m } can be expressed as {z m |z×4 step ≤z m <(z+1)×4 step }, where step = maxlevel - zoomlevel, and maxlevel represents the maximum map level.

[0151] S320: Obtain a query location dataset from a map storage model according to the index time slice set and the index map tile set corresponding to the map visualization request.

[0152] In this embodiment, the map storage model is constructed using the location data storage method provided in any of the above embodiments.

[0153] Exemplarily, the index time slice set {bin} can be expressed as {bin|bin∈[minBin,maxBin]}, where minBin represents the minimum time slice corresponding to the map visualization request, and maxBin represents the maximum time slice corresponding to the map visualization request.

[0154] Specifically, a location index set is constructed according to the index time slice set and the index map tile set, and a query location data set corresponding to the location index set in the map storage model is queried.

[0155] Specifically, the query location data set includes at least one query location data, and the query location data includes the query tile pixel coordinates and the query relative time. In a specific embodiment, for example, the query location data set In another embodiment, the location dataset is queried

[0156] S330: Convert each query location data in the query location data set into map location data to obtain a map location data set.

[0157] In this embodiment, the map position data includes target tile pixel coordinates and a target timestamp. The target tile pixel coordinates represent the position coordinates in the tile coordinate system corresponding to the query map tile.

[0158] In a specific embodiment, each query location data in the query location data set is converted into map location data to obtain the map location data set, including: for each query location data in the query location data set, using a coordinate conversion function between the maximum map level and the query map level to convert the query tile pixel coordinates in the query location data into target tile pixel coordinates in the tile coordinate system corresponding to the query map tile; according to the map start time and the time slice interval, converting the query relative time in the query location data into a target timestamp; and adding the map location data consisting of the target tile pixel coordinates and the target timestamp to the map location data set.

[0159] Specifically, use Figure 3 The binary crossover algorithm shown in the figure will query the z in the position index field corresponding to the position data. m Convert tile coordinates to row and column numbers <col m ,row m >, convert the tile coordinate z of the query map tile expressed in the form of z value to the tile coordinate expressed in the form of row and column number<col,row> .

[0160] For example, the coordinate conversion function between the maximum map level maxlevel and the query map level zoomlevel can be expressed as:

[0161]

[0162] For example, the target timestamp time satisfies the following formula:

[0163] time = bin × period + offset

[0164] Among them, bin represents the bin in the location index field corresponding to the query location data, and period represents the time slice interval.

[0165] In a specific embodiment, for example, the map location data set L′={l′|l′= <oid,tile x ,tile y ,time>}.

[0166] S340: Visually display the map location dataset in the query map tile.

[0167] Natural or artificial objects on the Earth's surface are called features, such as rivers, houses, parks, etc. Displaying features on an electronic map is called map visualization of features.

[0168] If a map is obtained by taking a photo, features are represented by objects in the image. In this case, the map tiles are called raster tiles and are images with a resolution of extent × extent (e.g., .png). If a map is obtained through surveying or mapping, features are represented by geometric shapes such as points, lines, and surfaces. In this case, the map tiles are called vector tiles and are files encoding the feature geometry (e.g., .pbf). The geometric shapes in vector tiles can be converted into raster tiles through symbolization, and the geometric shapes of objects in raster tiles can be extracted through image recognition to generate vector tiles.

[0169] For raster tiles, the client displays the image directly, and the map style remains unchanged. For vector tiles, the client decodes the file to obtain geometric shapes, then symbolizes the geometric shapes according to a flexibly configurable style and renders them in the viewport using computer graphics technology.

[0170] The location data in the embodiment of the present invention records the spatial location of the moving object at different times. In the embodiment of the present invention, the location data displayed on the map is collectively referred to as map features.

[0171] The technical solution of this embodiment obtains the query location data set from the map storage model according to the index time slice set and index map tile set corresponding to the map visualization request, converts each query location data in the query location data set into map location data, obtains the map location data set, and visualizes the map location data set in the query map tile, thereby solving the problem of huge query data volume of location data, improving the query efficiency of location data, and further improving the response efficiency of map visualization.

[0172] Figure 8 This is a flowchart of another map visualization method provided by one embodiment of the present invention. This embodiment further refines the map visualization method in the above embodiment. Figure 8 As shown, the method includes:

[0173] S410 : In response to detecting a map visualization request, determining an index map tile set according to a query map level corresponding to the map visualization request and query map tiles under the query map level.

[0174] S410 in this embodiment is the same as that in the above embodiment. Figure 7 The steps in S310 shown are the same or similar and will not be described in detail in this embodiment.

[0175] S420 : Counting the amount of visualized location data from the location storage model according to the index time slice set and the index map tile set corresponding to the map visualization request.

[0176] In this embodiment, the amount of visualized location data represents the amount of query location data corresponding to the map visualization request, and can also be used to represent the amount of query location data corresponding to the query map tile and the index time slice set, and can also be used to represent the amount of query location data in the query location data set.

[0177] In a specific embodiment, the amount of visualized location data is counted from the location storage model according to the index time slice set and the index map tile set corresponding to the map visualization request, including: obtaining the location data amount corresponding to at least one query location data packet from the location data table in the location storage model according to the index time slice set and the index map tile set corresponding to the map visualization request, and taking the sum of at least one location data amount as the amount of visualized location data.

[0178] In a specific embodiment, the amount of visualized location data is counted from a location storage model based on the index time slice set and the index map tile set corresponding to the map visualization request, including: constructing a location index set based on the index time slice set and the index map tile set corresponding to the map visualization request; obtaining at least one location data amount corresponding to the location index set from a statistical data table in the location storage model, and taking the sum of the at least one location data amount as the amount of visualized location data.

[0179] For example, at least one position data quantity can be expressed as { <bin,z m ,count>|bin∈[minBin,maxBin],z×4 step ≤z m <(z+1)×4 step }.

[0180] S430: Determine whether the amount of visualized position data is less than a data amount threshold. If yes, execute S440; if not, execute S460.

[0181] Exemplarily, the data volume threshold may be 10,000. The parameter value of the data volume threshold is not limited here and can be customized according to actual needs.

[0182] S440 : Obtain a query location dataset from a map storage model according to the index time slice set and the index map tile set corresponding to the map visualization request.

[0183] S450: Convert each query location data in the query location data set into map location data to obtain a map location data set, and visualize the map location data set in a query map tile.

[0184] S440-S450 in this embodiment are the same as those in the above embodiment. Figure 7 The steps S320 - S340 shown are identical or similar to each other and are not described in detail in this embodiment.

[0185] S460: Determine a tile pixel block set according to the query map level and the query map tile, and visualize the tile pixel block set in the query map tile.

[0186] In this embodiment, the tile pixel block set includes a reference position data amount corresponding to at least one tile pixel block, and the tile pixel block corresponds to a reference map tile corresponding to the query map tile in a reference map level that matches the query map level, and the reference map level is greater than or equal to the query map level.

[0187] In a specific embodiment, a tile pixel block set is determined based on a query map level and a query map tile, including: obtaining a reference map level that matches the query map level, and obtaining at least one reference map tile in the reference map level that corresponds to the query map tile; for each reference map tile, counting the amount of reference location data from a location storage model based on an index time slice set and reference map tiles; obtaining a level step corresponding to the query map level and the reference map level, and dividing the query map tile into at least one tile pixel block based on the level step and a tile size corresponding to a preset map tile; and constructing a tile pixel block set based on at least one tile pixel block and at least one reference location data amount.

[0188] In a specific embodiment, obtaining a reference map level that matches a query map level includes: determining a separation map level corresponding to a pyramid model based on a maximum map level and a tile size corresponding to a preset map tile; when the query map level is less than or equal to the separation map level, determining a reference map level based on a preset level step and the query map level; and when the query map level is greater than the separation map level, using the maximum map level as a reference map level that matches the query map level.

[0189] For example, the query map level zoomLevel and the reference map level zoomLevel′ have the following matching relationship:

[0190] zoomLevel′=min(maxLevel,zoomLevel+log2extent)

[0191] Among them, maxLevel-log2extent represents the separation map level, and log2extent represents the preset level step.

[0192] Figure 9 A schematic diagram of matching between a query map level and a reference map level provided by an embodiment of the present invention. Specifically, Figure 9 The maximum map level is 10, extent = 2 6 For example, the corresponding separation map level is 4 map levels. For map levels 0 to 4 corresponding to the blue arrows, since they are less than or equal to map level 4, the sum of the query map level and the preset level step is the reference map level that matches the query map level. For map levels 5 to 10 corresponding to the red arrows, since they are greater than map level 4, the maximum map level is the reference map level that matches the query map level.

[0193] In this embodiment, a reference map tile at the reference map level zoomLevel′ is<zoomLevel′,z′> The corresponding reference location data count is defined as the query map tile<zoomLevel,z> A tile pixel block. Among them, z×4 step ≤z′<(z+1)×4 step .

[0194] exist<zoomLevel,z> In the tile coordinate system, for example, the tile pixel block can be represented as

[0195] in, Indicates the minimum tile pixel coordinates and maximum tile pixel coordinates of the tile pixel block along the x-axis in the tile coordinate system corresponding to the query map tile. Indicates the minimum tile pixel coordinates and maximum tile pixel coordinates of the tile pixel block along the y-axis in the tile coordinate system corresponding to the query map tile.

[0196] Specifically, for each reference map tile, use Figure 3 The binary crossover algorithm shown converts the tile coordinate z′ represented by the z value of the reference map tile into the tile coordinate represented by the row and column number.<col′,row′> , convert the tile coordinate z of the query map tile expressed in the form of z value to the tile coordinate expressed in the form of row and column number<col,row> .

[0197] For example, Satisfies the following formula:

[0198]

[0199] For example, the side length k of the tile pixel block satisfies the formula: k = extent ÷ 2 step , accordingly,

[0200] Specifically, the larger the pixel block side length k, the coarser the granularity of the tile pixel block. The pixel block side length k is related to the query map level zoomLevel. When zoomLevel≤maxLevel-log2extent, the level step between the query map level zoomLevel and the reference map level zoomLevel′ is a fixed value, and the pixel block side length k=1 is also a fixed value, and the tile pixel block granularity is the finest; when zoomLevel>maxLevel-log2extent, step=maxLevel-zoomLevel, k=extent÷2 step , the pixel block side length k approaches extent as the query map level zoomLevel increases, and the granularity of the tile pixel block gradually becomes coarser.

[0201] The relationship between the granularity of tile pixel blocks and the query map level zoomLevel can well express the spatial distribution characteristics of location data, because the smaller the query map level zoomLevel, the larger the spatial range corresponding to the query map tile, the greater the spatial distribution difference, and is represented by fine-grained tile pixel blocks; conversely, the larger the query map level zoomLevel, the smaller the spatial range corresponding to the query map tile, the smaller the spatial distribution difference, and is represented by coarse-grained tile pixel blocks.

[0202] Specifically, the reference position data volume represents the data volume of the reference position data corresponding to the reference map tile and the index time slice set.

[0203] Figure 10 The flowchart of a specific example of a map visualization method provided by an embodiment of the present invention. Specifically, according to the index time slice set and index map tile set corresponding to the map visualization request, the visualization location data volume is cached from the statistical data table in the location storage model, and it is determined whether the visualization location data volume is greater than or equal to the data volume threshold. If so, the tile pixel block set is visualized in the query map tile. If not, the map location data set is visualized in the query map tile. Figure 10 As shown, the reference position data amounts corresponding to the tile pixel blocks in the tile pixel block set are distinguished and displayed in different colors on the client.

[0204] Based on the above embodiments, specifically, the method also includes: obtaining the time series position data volume corresponding to at least one index time slice in the index time slice set from the position storage model; generating a data volume change curve based on the index time slice set and at least one time series position data volume, and visually displaying the data volume change curve.

[0205] Specifically, the time series position data volume represents the data volume of the query position data corresponding to the query map tile and the index time slice. The independent variable of the data volume change curve is at least one index time slice in the index time slice set, and the dependent variable is the time series position data volume.

[0206] The advantage of this setting is that it can improve the temporal change characteristics of the location data in the visual map, thereby improving the readability of the visual map.

[0207] Figure 11 A visualization diagram of a query map tile and data volume change curve provided by an embodiment of the present invention. Specifically, Figure 11 The upper figures in Figures (a) to (d) are visualization diagrams of query map tiles, and the lower figures are visualization diagrams of data volume change curves. Figure 11 Figure (a) shows a traditional visualization of query map tiles and data volume changes. Because query map tiles correspond to smaller query map levels and larger spatial ranges, the amount of visualized location data is enormous. Figure (a) exhibits a confusing visualization effect, with overlapping and overlapping map location data.

[0208] Figure 11 Figures (b) and (c) show visualization diagrams of query map tiles and data volume change curves generated based on tile pixel block sets. Although the amount of visualized location data is huge, in the visualization maps shown in Figures (b) and (c), the visualization colors of different tile pixel blocks can clearly reflect the differences in the amount of location data in different spatial and temporal areas.

[0209] exist Figure 11 In Figure (d), as the query map level increases, the spatial range corresponding to the query map tile becomes smaller, and the amount of visualized location data becomes smaller accordingly. The visualization of the query map tile based on the map location dataset ensures the map visualization effect under low location data volume.

[0210] The technical solution of this embodiment counts the amount of visualized location data from the location storage model according to the index time slice set and index map tile set corresponding to the map visualization request, and selects two map visualization modes based on the amount of visualized location data, one is the tile pixel block visualization mode, and the other is the location data visualization mode, thereby realizing an adaptive switching map visualization technology. The tile pixel block visualization mode not only improves the map visualization effect in the scenario of massive location data, but also reduces the computing cost brought to the map terminal by the map visualization request, thereby improving the display efficiency of map visualization.

[0211] The following is an embodiment of a device for storing position data provided in an embodiment of the present invention. This device and the method for storing position data in the above-mentioned embodiment belong to the same inventive concept. For details not fully described in the embodiment of the device for storing position data, please refer to the content about the method for storing position data in the above-mentioned embodiment.

[0212] Figure 12 This is a schematic diagram of a storage device for location data provided by one embodiment of the present invention. Figure 12 As shown, the device includes: a map tile determination module 510 to be stored, an original latitude and longitude coordinate conversion module 520, a time slice determination module 530 to be stored, an original timestamp conversion module 540, a position data construction module 550 to be stored, and a position data storage module 560 to be stored.

[0213] The to-be-stored map tile determination module 510 is configured to determine, based on a conversion function between a geographic coordinate system and a map coordinate system, a to-be-stored map tile in a maximum map level in a pyramid model that matches the original latitude and longitude coordinates of a map object.

[0214] The original longitude and latitude coordinate conversion module 520 is used to convert the original longitude and latitude coordinates into the pixel coordinates of the tile to be stored in the tile coordinate system corresponding to the map tile to be stored;

[0215] The time slice to be stored determining module 530 is used to determine the time slice to be stored that matches the original timestamp of the map object in the time slice set according to the map start time and the time slice interval;

[0216] An original timestamp conversion module 540 is configured to convert the original timestamp into a relative time to be stored corresponding to the time slice to be stored;

[0217] The module 550 for constructing the location data to be stored is used to construct a location index field according to the time slice to be stored and the map tile to be stored, and to construct the location data to be stored according to the pixel coordinates of the tile to be stored and the relative time to be stored;

[0218] The to-be-stored location data storage module 560 is used to store the location index field and the to-be-stored location data in the location storage model in correspondence;

[0219] The time slice set includes at least one preset time slice obtained by dividing the time axis starting from the map start time according to the time slice interval.

[0220] The technical solution of this embodiment divides a geographic map into multiple map tiles to convert the original latitude and longitude coordinates of a map object into tile pixel coordinates to be stored in a tile coordinate system corresponding to the map tile to be stored at the maximum map level in a pyramid model. The time axis is divided into multiple time slices to convert the original timestamp of the map object into relative times to be stored corresponding to the time slice to be stored in a time slice set. The tile pixel coordinates and relative times with a smaller data granularity are used as location data for storage, thereby reducing the storage space occupied by massive location data.

[0221] In a specific embodiment, the map tile to be stored determination module 510 includes:

[0222] The original longitude and latitude coordinate conversion unit is used to convert the original longitude and latitude coordinates of the map object into tile row and column coordinates by using the conversion function between the geographic coordinate system and the map coordinate system;

[0223] A map tile to be stored determining unit, configured to determine, based on tile row and column coordinates, a map tile to be stored in a maximum map level in the pyramid model that matches the original latitude and longitude coordinates of the map object;

[0224] The pyramid model defines tile maps corresponding to at least one map level, and the tile map corresponding to the maximum map level is composed of a preset number of preset map tiles, where the preset number is a positive integer power of 4.

[0225] In a specific embodiment, the original latitude and longitude coordinate conversion unit is specifically used to:

[0226] The conversion function between the geographic coordinate system and the plane projection coordinate system is used to convert the original latitude and longitude coordinates into plane projection coordinates;

[0227] The conversion function between the plane projection coordinate system and the map coordinate system is used to convert the plane projection coordinates into map pixel coordinates;

[0228] Determine the tile row and column coordinates based on the map pixel coordinates and the tile size corresponding to the preset map tile.

[0229] In a specific embodiment, the original latitude and longitude coordinate conversion module 520 is specifically used to:

[0230] Determine the tile origin coordinates of the tile coordinate system corresponding to the map tile to be stored based on the tile row and column coordinates and the tile size corresponding to the preset map tile;

[0231] The coordinate difference between the map pixel coordinates and the tile origin coordinates is used as the tile pixel coordinates to be stored.

[0232] In a specific embodiment, the time slice to be stored determination module 530 is specifically configured to:

[0233] The time difference between the original timestamp of the map object and the time corresponding to the start time of the map is used as the time length;

[0234] According to the time length and the time slice interval, the time slice to be stored corresponding to the original timestamp of the map object in the time slice set is determined.

[0235] In a specific embodiment, the original timestamp conversion module 540 is specifically configured to:

[0236] The product of the time slice to be stored and the time slice interval is used as a reference timestamp;

[0237] The difference between the original timestamp and the reference timestamp is used as the relative time to be stored relative to the time slice to be stored.

[0238] In a specific embodiment, the to-be-stored location data storage module 560 includes:

[0239] A to-be-stored position data storage unit is configured to store the position index field in the position storage model if the position index field does not exist in the position storage model, and store the to-be-stored position data in the position data packet corresponding to the position index field in the position storage model;

[0240] In the case where there is a location index field in the location storage model, the location data to be stored is stored in the location data packet corresponding to the location index field in the location storage model;

[0241] The location data packet includes at least one stored location data corresponding to the location index field.

[0242] In a specific embodiment, the location data to be stored further includes an object identifier corresponding to the map object. Accordingly, the unit for storing the location data to be stored is specifically used to:

[0243] When the object identifier in the position data to be stored exists in the object identifier set in the position data packet, storing the tile pixel coordinates to be stored and the relative time to be stored in the position data to be stored as a position sequence into the position data set in the position data packet;

[0244] If the object identifier in the position data to be stored does not exist in the object identifier set in the position data packet, the object identifier is stored in the object identifier set, and the tile pixel coordinates to be stored and the relative time to be stored in the position data to be stored are stored as a position sequence in the position data set in the position data packet.

[0245] In a specific embodiment, the device further comprises:

[0246] a position data quantity updating module, configured to, in response to detecting a storage operation of the position data to be stored, increase the position data quantity of the position index field corresponding to the position data to be stored in the position storage model by one;

[0247] The location data volume represents the volume of location data stored in the location data packet corresponding to the location index field.

[0248] The device for storing location data provided by the embodiment of the present invention can execute the method for storing location data provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0249] The following is an embodiment of a map visualization device provided by an embodiment of the present invention. The device and the map visualization method of the above embodiment belong to the same inventive concept. For details not fully described in the embodiment of the map visualization device, please refer to the content about the map visualization method in the above embodiment.

[0250] Figure 13 This is a schematic diagram of the structure of a map visualization device provided by one embodiment of the present invention. Figure 13 As shown, the apparatus includes: an index map tile set determination module 610 , a query location data set acquisition module 620 , a query location data set conversion module 630 and a first tile map display module 640 .

[0251] The index map tile set determining module 610 is configured to, in response to detecting a map visualization request, determine an index map tile set based on a query map level corresponding to the map visualization request and query map tiles at the query map level; wherein the index map tiles in the index map tile set are preset map tiles at the maximum map level in the pyramid model;

[0252] The query location dataset acquisition module 620 is configured to acquire the query location dataset from the map storage model according to the index time slice set and the index map tile set corresponding to the map visualization request;

[0253] The query location data set conversion module 630 is used to convert each query location data in the query location data set into map location data to obtain a map location data set;

[0254] A first tile map display module 640 is used to visually display the map location dataset in the query map tile;

[0255] Among them, the map storage model is constructed using the location data storage method provided by any embodiment of the present invention. The map location data includes the target tile pixel coordinates and the target timestamp. The target tile pixel coordinates represent the location coordinates in the tile coordinate system corresponding to the query map tile.

[0256] The technical solution of this embodiment obtains the query location data set from the map storage model according to the index time slice set and index map tile set corresponding to the map visualization request, converts each query location data in the query location data set into map location data, obtains the map location data set, and visualizes the map location data set in the query map tile, thereby solving the problem of huge query data volume of location data, improving the query efficiency of location data, and further improving the response efficiency of map visualization.

[0257] In a specific embodiment, the query location dataset conversion module 630 is specifically configured to:

[0258] For each query location data in the query location data set, a coordinate conversion function between the maximum map level and the query map level is used to convert the query tile pixel coordinates in the query location data into the target tile pixel coordinates in the tile coordinate system corresponding to the query map tile;

[0259] Convert the query relative time in the query location data into a target timestamp based on the map start time and the time slice interval;

[0260] Add the map location data consisting of the target tile pixel coordinates and the target timestamp to the map location dataset;

[0261] The pyramid model defines tile maps corresponding to at least one map level, and the tile map corresponding to the maximum map level is composed of a preset number of preset map tiles, where the preset number is a positive integer power of 4.

[0262] In a specific embodiment, the device further comprises:

[0263] The second tile map display module is used to count the amount of visualized location data from the location storage model according to the index time slice set and the index map tile set corresponding to the map visualization request;

[0264] When the amount of visualized location data is less than the data amount threshold, the query location data set acquisition module 620 is called;

[0265] When the amount of visualized location data is greater than or equal to the data amount threshold, a tile pixel block set is determined according to the query map level and the query map tile, and the tile pixel block set is visualized in the query map tile;

[0266] Among them, the visualization location data volume represents the data volume of the query location data corresponding to the map visualization request, the tile pixel block set contains the reference location data volume corresponding to at least one tile pixel block respectively, the tile pixel block corresponds to the reference map tile corresponding to the query map tile in the reference map level that matches the query map level, and the reference map level is greater than or equal to the query map level.

[0267] In a specific embodiment, the second tile map display module includes:

[0268] a reference map level acquisition unit, configured to acquire a reference map level that matches the query map level, and acquire at least one reference map tile in the reference map level that corresponds to the query map tile;

[0269] A reference location data amount statistics unit, configured to count the reference location data amount from the location storage model according to the index time slice set and the reference map tile for each reference map tile;

[0270] a tile pixel block division unit, configured to obtain a level step corresponding to the query map level and the reference map level, and to divide the query map tile into at least one tile pixel block according to the level step and a tile size corresponding to a preset map tile;

[0271] The tile pixel block set construction unit is configured to construct a tile pixel block set according to at least one tile pixel block and at least one reference position data amount.

[0272] In a specific embodiment, the reference map level acquisition unit is specifically configured to:

[0273] Determine the partition map level corresponding to the pyramid model based on the maximum map level and the tile size corresponding to the preset map tiles;

[0274] When the query map level is less than or equal to the separation map level, the reference map level is determined based on the preset level step and the query map level;

[0275] In the case that the query map level is greater than the separation map level, the maximum map level is used as the reference map level to match the query map level.

[0276] In a specific embodiment, the device further comprises:

[0277] A data volume change curve visualization module is used to count the time series position data volume corresponding to at least one index time slice in the index time slice set from the position storage model;

[0278] A data volume change curve is generated according to the index time slice set and at least one time series position data volume, and the data volume change curve is visualized.

[0279] The map visualization device provided in the embodiment of the present invention can execute the map visualization method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0280] Figure 14 A schematic diagram of the structure of a map terminal provided for one embodiment of the present invention. The map terminal 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The map terminal can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0281] like Figure 14 As shown, the map terminal 10 includes at least one processor 11 and memory, such as a read-only memory (ROM) 12 and a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor 11. The processor 11 can perform various appropriate actions and processes based on the computer programs stored in the ROM 12 or loaded from the storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the map terminal 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0282] Multiple components in the map terminal 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard and mouse; an output unit 17, such as various types of displays and speakers; a storage unit 18, such as a magnetic disk and optical disk; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the map terminal 10 to exchange information or data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0283] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the location data storage method and / or map visualization method provided in the above embodiments.

[0284] In some embodiments, the location data storage method and / or map visualization method provided in the above embodiments may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the map terminal 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps in the location data storage method and / or map visualization method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the location data storage method and / or map visualization method in any other appropriate manner (e.g., by means of firmware).

[0285] Various embodiments of the systems and techniques described herein can be implemented in the following systems or combinations thereof: digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0286] Computer programs for implementing the location data storage method and / or map visualization method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0287] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable storage medium. Examples of machine-readable storage media can include an electrical connection based on at least one line, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0288] To provide interaction with a user, the systems and techniques described herein can be implemented on a terminal device having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball), through which the user can provide input to the terminal device. Other types of devices can also provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0289] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0290] A computing system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. The client-server relationship arises through computer programs running on the respective computers and establishing a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within a cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and virtual private server (VPS) services.

[0291] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0292] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.< / z>

Claims

1. A method for storing position data, characterized in that: include: According to the conversion function between the geographic coordinate system and the map coordinate system, determining the map tile to be stored in the maximum map level in the pyramid model that matches the original latitude and longitude coordinates of the map object; Converting the original longitude and latitude coordinates into pixel coordinates of the tile to be stored in the tile coordinate system corresponding to the map tile to be stored; According to the map start time and the time slice interval, determine the time slice to be stored in the time slice set that matches the original timestamp of the map object; Converting the original timestamp into a relative time to be stored corresponding to the time slice to be stored; Constructing a location index field according to the time slice to be stored and the map tile to be stored, and constructing the location data to be stored according to the tile pixel coordinates to be stored and the relative time to be stored; Storing the location index field and the location data to be stored in a location storage model in correspondence; The time slice set includes at least one preset time slice obtained by dividing the time axis starting from the map start time according to the time slice interval.

2. The method according to claim 1, characterized in that The step of determining the map tile to be stored in the maximum map level in the pyramid model that matches the original latitude and longitude coordinates of the map object according to the conversion function between the geographic coordinate system and the map coordinate system includes: The conversion function between the geographic coordinate system and the map coordinate system is used to convert the original latitude and longitude coordinates of the map object into tile row and column coordinates; Determine, according to the tile row and column coordinates, a map tile to be stored in the maximum map level in the pyramid model that matches the original latitude and longitude coordinates of the map object; The pyramid model defines at least one tile map corresponding to each map level, and the tile map corresponding to the maximum map level is composed of a preset number of preset map tiles, where the preset number is a positive integer power of 4.

3. The method according to claim 2, characterized in that The method uses a conversion function between the geographic coordinate system and the map coordinate system to convert the original latitude and longitude coordinates of the map object into tile row and column coordinates, including: Using a conversion function between a geographic coordinate system and a plane projection coordinate system, the original latitude and longitude coordinates are converted into plane projection coordinates; Using a conversion function between the plane projection coordinate system and the map coordinate system, the plane projection coordinates are converted into map pixel coordinates; The tile row and column coordinates are determined according to the map pixel coordinates and the tile size corresponding to the preset map tile.

4. The method according to claim 3, characterized in that The converting the original longitude and latitude coordinates into pixel coordinates of the tile to be stored in the tile coordinate system corresponding to the map tile to be stored includes: Determining the tile origin coordinates of the tile coordinate system corresponding to the map tile to be stored according to the tile row and column coordinates and the tile size corresponding to the preset map tile; The coordinate difference between the map pixel coordinates and the tile origin coordinates is used as the tile pixel coordinates to be stored.

5. The method according to claim 1, characterized in that The step of determining the time slice to be stored in the time slice set corresponding to the original timestamp of the map object according to the map start time and the time slice interval includes: Taking the time difference between the original timestamp of the map object and the start time of the map as the time length; According to the time length and the time slice interval, a time slice to be stored corresponding to the original timestamp of the map object in the time slice set is determined.

6. The method according to claim 1, characterized in that The converting the original timestamp into a relative time to be stored corresponding to the time slice to be stored includes: The product result of the time slice to be stored and the time slice interval is used as a reference timestamp; The difference between the original timestamp and the reference timestamp is used as the relative time to be stored relative to the time slice to be stored.

7. The method according to any one of claims 1 to 6, characterized in that: The storing the location index field and the location data to be stored in a location storage model correspondingly includes: In the case where the location index field does not exist in the location storage model, storing the location index field in the location storage model, and storing the location data to be stored in the location data packet corresponding to the location index field in the location storage model; In the case where the location index field exists in the location storage model, storing the location data to be stored in a location data packet corresponding to the location index field in the location storage model; The location data packet includes at least one stored location data corresponding to the location index field.

8. The method according to claim 7, characterized in that The location data to be stored also includes an object identifier corresponding to the map object. Accordingly, storing the location data to be stored in a location data packet corresponding to the location index field in the location storage model includes: When the object identifier in the position data to be stored exists in the object identifier set in the position data packet, storing the tile pixel coordinates to be stored and the relative time to be stored in the position data to be stored as a position sequence in the position data set in the position data packet; When the object identifier in the position data to be stored does not exist in the object identifier set in the position data packet, the object identifier is stored in the object identifier set, and the tile pixel coordinates to be stored and the relative time to be stored in the position data to be stored are stored as a position sequence in the position data set in the position data packet.

9. The method according to claim 7, characterized in that: The method further comprises: In response to detecting a storage operation of the to-be-stored position data, increasing by one the amount of position data of the position index field corresponding to the to-be-stored position data in the position storage model; The location data volume represents the volume of location data stored in the location data packet corresponding to the location index field.

10. A map visualization method, characterized in that: include: In response to detecting a map visualization request, determining an index map tile set according to a query map level corresponding to the map visualization request and query map tiles at the query map level; wherein the index map tiles in the index map tile set are preset map tiles at the maximum map level in the pyramid model; Acquire a query location data set from a map storage model according to the index time slice set corresponding to the map visualization request and the index map tile set; Convert each query location data in the query location data set into map location data to obtain a map location data set; Visually displaying the map location data set in the query map tile; Wherein, the map storage model is constructed using the location data storage method as described in any one of claims 1-9, and the map location data includes target tile pixel coordinates and target timestamp, and the target tile pixel coordinates represent the location coordinates in the tile coordinate system corresponding to the query map tile.

11. The method according to claim 10, characterized in that The step of converting each query location data in the query location data set into map location data to obtain the map location data set comprises: For each query location data in the query location data set, using a coordinate conversion function between the maximum map level and the query map level, converting the query tile pixel coordinates in the query location data into target tile pixel coordinates in a tile coordinate system corresponding to the query map tile; According to the map start time and the time slice interval, the query relative time in the query location data is converted into a target timestamp; Adding the map location data consisting of the target tile pixel coordinates and the target timestamp to a map location data set; The pyramid model defines at least one tile map corresponding to each map level, and the tile map corresponding to the maximum map level is composed of a preset number of preset map tiles, where the preset number is a positive integer power of 4.

12. The method according to claim 11, characterized in that The method further comprises: Counting the amount of visualized location data from a location storage model according to the index time slice set corresponding to the map visualization request and the index map tile set; When the amount of visualization location data is less than the data amount threshold, executing the step of acquiring the query location data set from the map storage model according to the index time slice set and the index map tile set corresponding to the map visualization request; When the amount of the visualization position data is greater than or equal to a data amount threshold, determining a tile pixel block set according to the query map level and the query map tile, and visually displaying the tile pixel block set in the query map tile; Among them, the amount of visualization location data represents the amount of query location data corresponding to the map visualization request, the tile pixel block set contains the amount of reference location data corresponding to at least one tile pixel block, the tile pixel block corresponds to a reference map tile corresponding to the query map tile in a reference map level matching the query map level, and the reference map level is greater than or equal to the query map level.

13. The method according to claim 12, characterized in that The step of determining a tile pixel block set according to the query map level and the query map tile comprises: Obtaining a reference map level that matches the query map level, and obtaining at least one reference map tile in the reference map level that corresponds to the query map tile; For each reference map tile, counting the amount of reference location data from a location storage model according to the index time slice set and the reference map tile; Obtaining a level step corresponding to the query map level and the reference map level, and dividing the query map tile into at least one tile pixel block according to the level step and a tile size corresponding to the preset map tile; A tile pixel block set is constructed according to the at least one tile pixel block and at least one reference position data amount.

14. The method according to claim 13, characterized in that The obtaining of a reference map level matching the query map level comprises: Determining a separation map level corresponding to the pyramid model according to the maximum map level and a tile size corresponding to the preset map tile; In the case where the query map level is less than or equal to the separation map level, determining the reference map level according to a preset level step and the query map level; In the case that the query map level is greater than the separation map level, the maximum map level is used as a reference map level that matches the query map level.

15. The method according to claim 12, characterized in that The method further comprises: Counting the amount of time series position data corresponding to at least one index time slice in the index time slice set from the position storage model; A data volume change curve is generated according to the index time slice set and at least one time series position data volume, and the data volume change curve is visualized.

16. A storage device for position data, characterized in that: include: A module for determining map tiles to be stored, for determining the map tiles to be stored that match the original latitude and longitude coordinates of the map object in the maximum map level in the pyramid model according to a conversion function between the geographic coordinate system and the map coordinate system; An original longitude and latitude coordinate conversion module, used for converting the original longitude and latitude coordinates into pixel coordinates of tiles to be stored in a tile coordinate system corresponding to the map tiles to be stored; A module for determining a time slice to be stored, used to determine a time slice to be stored in a time slice set that matches an original timestamp of the map object according to a map start time and a time slice interval; An original timestamp conversion module, used for converting the original timestamp into a relative time to be stored corresponding to the time slice to be stored; A module for constructing location data to be stored, used to construct a location index field according to the time slice to be stored and the map tile to be stored, and to construct the location data to be stored according to the pixel coordinates of the tile to be stored and the relative time to be stored; A to-be-stored location data storage module, used to store the location index field and the to-be-stored location data in a location storage model in correspondence; The time slice set includes at least one preset time slice obtained by dividing the time axis starting from the map start time according to the time slice interval.

17. A map visualization device, characterized in that: include: An index map tile set determination module is used to determine an index map tile set in response to detecting a map visualization request, according to a query map level corresponding to the map visualization request and query map tiles under the query map level; wherein the index map tiles in the index map tile set are preset map tiles under the maximum map level in the pyramid model; A query location data set acquisition module, used to acquire the query location data set from the map storage model according to the index time slice set corresponding to the map visualization request and the index map tile set; A query location data set conversion module, used to convert each query location data in the query location data set into map location data to obtain a map location data set; A first tile map display module, used for visually displaying the map location data set in the query map tile; Wherein, the map storage model is constructed using the location data storage method as described in any one of claims 1-9, and the map location data includes target tile pixel coordinates and target timestamp, and the target tile pixel coordinates represent the location coordinates in the tile coordinate system corresponding to the query map tile.

18. A map terminal, characterized in that: The map terminal comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the location data storage method described in any one of claims 1-9 and / or the map visualization method described in any one of claims 10-15.

19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for storing location data according to any one of claims 1 to 9 and / or the method for visualizing a map according to any one of claims 10 to 15 when executed.

20. A computer program product, comprising a computer program, which, when executed by a processor, implements the method for storing position data according to any one of claims 1 to 9 and / or the method for visualizing a map according to any one of claims 10 to 15.

Citation Information

Patent Citations

  • Geographic data spatial indexing method based on tile structure

    CN116166618A

  • Cross-cloud multi-dimensional remote sensing data cube online space-time axis display method and device

    CN116860907A

  • Method and apparatus for providing tiles of dynamic content

    US20110207446A1

  • Method and system for estimating the presence of people on a territory exploiting mobile communication network data

    US20230319508A1

  • Electronic game

    WO2002058806A1