A position data storage method, a map visualization method, an apparatus and a device

By converting location data into tile pixel coordinates and relative time storage methods, the problem of excessive storage space occupied by location data in traditional storage models is solved, achieving more efficient storage and display.

CN119806418BActive Publication Date: 2025-12-16JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In traditional storage models, location data occupies too much storage space, especially longitude, latitude, and timestamps, which require 24 bytes to store, resulting in wasted storage space.

Method used

The geographic map is divided into multiple map tiles. Through the transformation function between the geographic coordinate system and the map coordinate system, the original latitude and longitude coordinates are converted into tile pixel coordinates under the tile coordinate system of the highest map level in the pyramid model. The time axis is divided into time slices and converted into relative time. Tile pixel coordinates and relative time with smaller data granularity are used for storage.

Benefits of technology

It reduces the storage space occupied by massive location data and improves storage efficiency. In particular, by using tile pixel coordinates and relative time, it achieves a storage space compression of 25%-12.5%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806418B_ABST
    Figure CN119806418B_ABST
Patent Text Reader

Abstract

The application discloses a position data storage method, a map visualization method, a device and equipment. The method comprises the following steps: determining a to-be-stored map tile matched with original longitude and latitude 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 longitude and latitude coordinates into to-be-stored tile pixel coordinates in a tile coordinate system corresponding to the to-be-stored map tile; determining a to-be-stored time slice matched with an original time stamp of the map object in a time slice set according to a map starting time and a time slice interval; converting the original time stamp into a to-be-stored relative time corresponding to the to-be-stored time slice; and storing a position index field constructed according to the to-be-stored time slice and the to-be-stored map tile and to-be-stored position data constructed according to the to-be-stored tile pixel coordinates and the to-be-stored relative time into a position storage model, thereby reducing the storage space occupancy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet, and particularly relates to a position data storage method, a map visualization method, a device and equipment. BACKGROUND

[0002] With the popularity of mobile Internet devices and the development of satellite positioning technology, position data is continuously generated over time, such as trajectory data of a taxi, report data uploaded by a client, and the like.

[0003] In a traditional storage model, position data location is composed of a map object (oid) generating a position, a spatial coordinate (position), and a time stamp (time), and can be expressed as:

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

[0005] Wherein, 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 application, it is found that at least the following technical problems exist in the prior art:

[0007] Nowadays, the amount of position data is increasing, and <lon, lat, time> in the position data location in the traditional storage model needs to be stored by using 24 bytes, which occupies too much storage space. SUMMARY

[0008] Embodiments of the present application provide a position data storage method, a map visualization method, a device and equipment to solve the problem of too much storage space occupied by massive position data.

[0009] According to an embodiment of the present application, a position data storage method is provided, which comprises:

[0010] According to 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 longitude and latitude coordinates of the map object is determined;

[0011] The original longitude and latitude coordinates are converted into to-be-stored tile pixel coordinates in a tile coordinate system corresponding to the to-be-stored map tile;

[0012] According to a map start time and a time slice interval, a to-be-stored time slice in a time slice set that matches the original time stamp of the map object is determined;

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

[0014] construct a position index field according to the to-be-stored time slice and the to-be-stored map tile, and construct to-be-stored position data according to the to-be-stored tile pixel coordinate and the to-be-stored relative time;

[0015] store the position index field and the to-be-stored position data into a position storage model correspondingly;

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

[0017] According to another embodiment of the present application, a map visualization method is provided, which comprises:

[0018] 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 a query map tile at the query map level; wherein an index map tile in the index map tile set is a preset map tile at a maximum map level in a pyramid model;

[0019] According to an index time slice set corresponding to the map visualization request and the index map tile set, obtaining a query position data set from a map storage model;

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

[0021] Visualizing and displaying the map position data set in the query map tile;

[0022] The map storage model is constructed by using a position data storage method provided by any of the embodiments of the present application, the map position data comprises target tile pixel coordinates and a target timestamp, and the target tile pixel coordinates represent a position coordinate in a tile coordinate system corresponding to the query map tile.

[0023] According to another embodiment of the present application, a position data storage device is provided, which comprises:

[0024] A to-be-stored map tile determination module is configured to determine, according to 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 original latitude and longitude coordinates of a map object;

[0025] An original latitude and longitude coordinate conversion module is configured to convert the original latitude and longitude coordinate into a to-be-stored tile pixel coordinate in a tile coordinate system corresponding to the to-be-stored map tile.

[0026] A to-be-stored time slice determination module is configured to determine, according to a map starting time and a time slice interval, a to-be-stored time slice in a time slice set that matches an original time stamp of the map object.

[0027] An original time stamp conversion module is configured to convert the original time stamp into a to-be-stored relative time corresponding to the to-be-stored time slice.

[0028] A to-be-stored location data construction module is configured to construct a location index field according to the to-be-stored time slice and the to-be-stored map tile, and to construct to-be-stored location data according to the to-be-stored tile pixel coordinate and the to-be-stored relative time.

[0029] A to-be-stored location data storage module is configured to store the location index field and the to-be-stored location data into a location storage model.

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

[0031] According to another embodiment of the present application, a map visualization device is provided, which comprises:

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

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

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

[0035] A first tile map display module is configured to visually display the map location data set in the query map tile.

[0036] The map storage model is constructed by using the storage method of position data according to any embodiment of the present application, and the map position data includes target tile pixel coordinates and a target timestamp, and the target tile pixel coordinates represent the position coordinates in the tile coordinate system corresponding to the query map tile.

[0037] According to another embodiment of the present application, a map terminal is provided, comprising:

[0038] at least one processor; and

[0039] a memory in communication with the at least one processor; wherein

[0040] 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 to enable the at least one processor to execute the storage method of position data according to any embodiment of the present application and / or the map visualization method according to any embodiment of the present application.

[0041] According to another embodiment of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to implement the storage method of position data according to any embodiment of the present application and / or the map visualization method according to any embodiment of the present application when executed by the processor.

[0042] According to another embodiment of the present application, a computer program product is provided, which comprises a computer program for enabling a processor to implement the storage method of position data according to any embodiment of the present application and / or the map visualization method according to any embodiment of the present application when executed by the processor.

[0043] The technical solution of the embodiments of the present application divides a geographical map into a plurality of map tiles, converts original latitude and longitude coordinates of a map object into tile pixel coordinates in a tile coordinate system corresponding to a to-be-stored map tile in the largest map level in a pyramid model, divides a time axis into a plurality of time slices, converts original timestamps of the map object into to-be-stored relative times corresponding to a to-be-stored time slice in the time slice set, and stores the position data by using smaller data granularity of tile pixel coordinates and relative times, thereby reducing the storage space occupied by the massive position data.

[0044] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0045] In order to make the technical solutions in the embodiments of the present application clearer, the accompanying drawings needed in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description only need to be some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort.

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

[0047] Figure 2 A schematic diagram of a tile coordinate provided by an embodiment of the present application;

[0048] Figure 3 A conversion schematic diagram of a row number and a column number of a map tile and a z value provided by an embodiment of the present application;

[0049] Figure 4 A flowchart of a storage method of position data provided by an embodiment of the present application;

[0050] Figure 5 A conversion schematic diagram of a map pixel coordinate and a tile pixel coordinate provided by an embodiment of the present application;

[0051] Figure 6 A flowchart of another storage method of position data provided by an embodiment of the present application;

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

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

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

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

[0056] Figure 11 A visualization schematic diagram of a query map tile and a data volume change curve provided by an embodiment of the present application;

[0057] Figure 12 A structure schematic diagram of a storage device of position data provided by an embodiment of the present application;

[0058] Figure 13This is a schematic diagram of the structure of a map visualization device provided in one embodiment of the present invention;

[0059] Figure 14 This is a schematic diagram of the structure of a map terminal provided in one embodiment of the present invention. Detailed Implementation

[0060] To enable those skilled in the art to better understand the present invention, at least some of the terms used in the embodiments of the present invention are explained. Unless otherwise defined, all scientific and technical terms used in the embodiments of the present invention have the same meaning as commonly understood by those skilled in the art.

[0061] Electronic Map

[0062] In this embodiment of the invention, an electronic map within a geographical area is defined as a spatial range composed of square pixels. The side length of the electronic map is n square pixels. With the top left corner of the electronic map as the origin, the horizontal axis to the right as the x-axis, and the vertical axis downwards as the y-axis, the electronic map is constructed as a map coordinate system. The square pixels in the map coordinate system can be represented as (map... x map y Named as map pixel coordinates, where 0 ≤ map x map y ≤n.

[0063] The geographical region can be a global region, a specific country region, or a specific local area, etc. All maps mentioned below refer to electronic maps of global regions.

[0064] Pyramid Model

[0065] Map scaling is represented by the zoom level. Organizing maps of different zoom levels from smallest to largest forms a map. Figure 1 The pyramid model shown. The pyramid model divides the map into 4... zoomLevel A map uses a grid of squares, each square being called a map tile. At each map level, every map tile has the same side length, represented as `extent` square pixels. The size of the tile map for each map level is determined by the map level `zoomLevel`. At `zoomLevel`, the side length of the tile map is `n = extent × 2`. zoomLevel .

[0066] The formal definition of the pyramid model is Pyramid = <maxLevel, extent>, where maxLevel represents the maximum map level, and the larger the extent, the higher the resolution of the tile map.

[0067] Tile Coordinate

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

[0069] As shown in Figure 2 , the column number col and the row number row on the tile map can be used to describe the tile coordinate, and the tile coordinate in the form of row and column is tile = <zoomLevel, col, row>. If all the map tiles in the tile map are connected by Z-filling curves and numbered from 0, the tile coordinate can also be represented in the form of z value, and the tile coordinate in the form of z value can be represented as tile = <zoomLevel, z>, where 0 ≤ z < 4 zoomLevel .

[0070] where <col, row> in the tile coordinate in the form of row and column and z in the tile coordinate in the form of z value. <z>The binary crossover algorithm is satisfied. As shown in Figure 3 <col,row> is 100110101111, i.e., z=2479.

[0071] The tile maps of different map levels correspond to the same geographical area, so there is a corresponding relationship between the tile coordinates <zoomLevel,z> corresponding to the map level zoomLevel and the tile coordinates <zoomLevel',z'> corresponding to the map level zoomLevel' as follows:

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

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

[0074] As shown in Figure 2 The tile coordinates <1,1> under the first map level correspond to the tile coordinate set {<2,4>, <2,5>, <2,6>, <2,7>} under the second map level.

[0075] In the following embodiments of the present application, the map tiles are represented by tile coordinates in the form of z values.

[0076] Time slice set

[0077] The position data is time-sensitive, and in this paper, the time slice interval period is used as the minimum time granularity. The time axis is divided into at least one time slice from the starting time of the map, and a time slice set B={bin|bin∈N} is obtained. The unit of the time slice interval period is second, and the parameter value can be 1 minute, 1 hour, 1 day, 1 week, or 1 month, etc. The map tile composed of the position data in a time slice bin is defined as a space-time tile binTile=<bin,zoomLevel,z>.

[0078] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.

[0079] It is to be understood that the terminology "target", "to be stored", "reference" and the like in the specification and claims of the application and the above-described drawings are used to distinguish similar objects, and are not necessarily used to describe a particular chronological or sequential order. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0080] Figure 4 A flowchart of a position data storage method provided by an embodiment of the application, which can be applied to the case of storing position data, can be executed by a position data storage device, which can be realized in the form of hardware and / or software, and can be configured in a terminal device. As shown in Figure 4 the method comprises:

[0081] S110, determining, according to 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 the pyramid model that matches the original longitude and latitude coordinates of the map object.

[0082] In this embodiment, at least one tile map corresponding to each map level is defined in the pyramid model, 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. As shown in Figure 1 the maximum map level is a map level greater than 0.

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

[0084] In another specific embodiment, according to the conversion function between the geographic coordinate system and the map coordinate system, the to-be-stored map tile in the maximum map level in the pyramid model that matches the original longitude and latitude coordinates of the map object comprises: converting 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; and representing the tile row and column coordinates as the to-be-stored map tile in the maximum map level in the pyramid model that matches the original longitude and latitude coordinates of the map object.

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

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

[0087] In this embodiment, the tile coordinates of the to-be-stored map tile are represented in the form of z values. The following embodiments are exemplarily described by taking the map tiles represented in the form of z values.

[0088] On the basis of the above-described embodiments, specifically, the original longitude-latitude coordinates of the map object are converted into tile row-column coordinates by using the conversion function between the geographic coordinate system and the map coordinate system, including: converting the original longitude-latitude coordinates into plane projection coordinates by using the conversion function between the geographic coordinate system and the plane projection coordinate system; converting the plane projection coordinates into map pixel coordinates by using the conversion function between the plane projection coordinate system and the map coordinate system; and determining the tile row-column coordinates according to the map pixel coordinates and the tile size corresponding to the preset map tile.

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

[0090] The plane projection coordinates (project x ,project y ) are continuous values of the floating-point type, and the unit is meter. The map pixel coordinates are discrete values of the integer type, and the unit is pixel. The plane projection coordinates (project x ,project y ) are converted into the map pixel coordinates It's a discretization process, which results in a loss of accuracy. The higher the maximum map level, the smaller the accuracy loss. For example, when extent = 512, the planar distance corresponding to one pixel in the map coordinate system of map level 18 is approximately 0.597 meters, meaning the accuracy loss is less than 0.597 meters.

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

[0092]

[0093] in, This indicates rounding down to the nearest integer.

[0094] Adopting such Figure 3 The binary crossover algorithm shown converts the tile row and column coordinates (col) m ,row m The map tiles to be stored can be converted into z-values. m express.

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

[0096] In one specific embodiment, converting the original latitude and longitude coordinates into the tile pixel coordinates of the map tile to be stored in the tile coordinate system includes: 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 tile pixel coordinates to be stored.

[0097] Figure 5 This is a schematic diagram illustrating the conversion between map pixel coordinates and tile pixel coordinates according to an embodiment of the present invention. Specifically, Figure 5 This shows the map coordinate system corresponding to a Level 1 map with extent = 8. The hollow red dot has map pixel coordinates <12,13> in the Level 1 map coordinate system.<col=1,row=1> In the map tiles, the tile pixel coordinates corresponding to the tile coordinate system of the map tile are <4,5>.

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

[0099]

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

[0101] S130, according to the map starting time and the time slice interval, determining the to-be-stored time slice in the time slice set matching the original timestamp of the map object.

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

[0103] In a specific embodiment, according to the map starting time and the time slice interval, the to-be-stored time slice in the time slice set corresponding to the original timestamp of the map object is determined, including: taking the time difference value between the original timestamp of the map object and the map starting time as the time length; according to the time length and the time slice interval, determining the to-be-stored time slice in the time slice set corresponding to the original timestamp of the map object.

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

[0105]

[0106] Wherein, time represents the original timestamp, and epochTime represents the map starting time.

[0107] S140, converting the original timestamp into a to-be-stored relative time corresponding to the to-be-stored time slice.

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

[0109] For example, the to-be-stored relative time offset satisfies the following formula:

[0110] offset = time-bin x period

[0111] Wherein, bin x period represents the reference timestamp.

[0112] S150, according to the to-be-stored time slice and the to-be-stored map tile, constructing a position index field, and according to the to-be-stored tile pixel coordinate and the to-be-stored relative time, constructing to-be-stored position data.

[0113] In one embodiment, the location index field can be represented as <bin, z m The location data to be stored can be represented as

[0114] In another embodiment, the location data to be stored further contains an object identifier corresponding to a map object. The location data to be stored can be represented as

[0115] S160, store the location index field and the location data to be stored into the location storage model.

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

[0117] In a conventional storage model, the location data location = <oid, lon, lat, time>. The longitude lon, the latitude lat and the time stamp time each need 8 bytes for storage, that is, one location data location needs 24 bytes of storage space.

[0118] In the embodiment of the application, the tile pixel coordinate in the location data has a value range of [0, extent], wherein the extent generally does not exceed the range of a short integer, that is, less than 32767, and thus the tile pixel coordinate occupies 4 bytes of storage space, compared with the longitude lon and the latitude lat which occupy 16 bytes for representing the same spatial information, the compression rate of the storage space reaches 25%.

[0119] In the embodiment of the application, the relative time offset in the location data has a unit of second, and assuming that the time slice interval is 1 hour, the value range of the relative time offset is 0-3600 seconds, which occupies only 2 bytes of storage space. Compared with the time stamp which occupies 8 bytes, the compression rate of the storage space reaches 25%; assuming that the time slice interval is 1 minute, the value range of the relative time offset is 0-60 seconds, which occupies only 1 byte of storage space. Compared with the time stamp which occupies 8 bytes, the compression rate of the storage space reaches 12.5%.

[0120] The technical scheme of the embodiment divides the geographic map into a plurality of map tiles, converts the original latitude and longitude coordinates of the map object into the to-be-stored tile pixel coordinates in the tile coordinate system corresponding to the to-be-stored map tile in the maximum map level in the pyramid model, divides the time axis into a plurality of time slices, converts the original time stamp of the map object into the to-be-stored relative time corresponding to the to-be-stored time slice in the time slice set, and stores the position data by using the tile pixel coordinates and the relative time with smaller data granularity, thereby reducing the storage space occupied by the massive position data.

[0121] Figure 6 The flowchart of another position data storage method provided by an embodiment of the application further refines the "storing the position index field and the to-be-stored position data into the position storage model" in the above embodiment. As shown in the flowchart of the method, Figure 6 the method comprises the following steps.

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

[0123] S220, converting the original latitude and longitude coordinates into to-be-stored tile pixel coordinates in the tile coordinate system corresponding to the to-be-stored map tile.

[0124] S230, determining, according to a map starting time and a time slice interval, a to-be-stored time slice in the time slice set that matches the original time stamp of the map object.

[0125] S240, converting the original time stamp into to-be-stored relative time corresponding to the to-be-stored time slice.

[0126] S250, constructing a position index field according to the to-be-stored time slice and the to-be-stored map tile, and constructing to-be-stored position data according to the to-be-stored tile pixel coordinates and the to-be-stored relative time.

[0127] S210-S250 in the embodiment correspond to S110-S150 in the above embodiment, and details are not described herein. Figure 4

[0128] S260, determining whether the position index field exists in the position storage model, if yes, performing S270, and if no, performing S280.

[0129] S270, storing the to-be-stored position data into a position data packet in the position storage model corresponding to the position index field.

[0130] ​S280, store the position index field into the position storage model, and store the to-be-stored position data into a position data packet corresponding to the position index field in the position storage model.

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

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

[0133] In one embodiment, for example, the data structure of the position data packet data packet can be represented as i is a positive integer.

[0134] In one embodiment, the to-be-stored position data further contains an object identifier corresponding to a map object, and accordingly, storing the to-be-stored position data into the position data packet corresponding to the position index field in the position storage model includes: in a case where the object identifier in the to-be-stored position data exists in an object identifier set in the position data packet, storing the to-be-stored tile pixel coordinates and the to-be-stored relative time in the to-be-stored position data as a position sequence into a position data set in the position data packet; in a case where the object identifier in the to-be-stored position data does not exist in the object identifier set in the position data packet, storing the object identifier into the object identifier set and storing the to-be-stored tile pixel coordinates and the to-be-stored relative time in the to-be-stored position data as a position sequence into the position data set in the position data packet.

[0135] The position storage model in the embodiment stores the same object identifier only once. Specifically, when the object identifier in the to-be-stored position data exists in the object identifier set in the position data packet, only the to-be-stored tile pixel coordinates and the to-be-stored relative time in the to-be-stored position data are stored into the position data packet; when the object identifier in the to-be-stored position data does not exist in the object identifier set in the position data packet, both the object identifier, the to-be-stored tile pixel coordinates and the to-be-stored relative time in the to-be-stored position data are stored into the position data packet.

[0136] In the embodiment, for example, the data structure of the position data packet data packet can be represented as i and j are positive integers, and i≤j. Wherein, {oid i represents an object identification set, {data j represents a position data set.

[0137] The advantage of such an arrangement is that the redundant storage of object identification in the position data table of the position storage model is reduced, and the storage space occupied by the massive position data is further reduced.

[0138] On the basis of the above embodiment, specifically, the method further comprises: in response to detecting a storage operation of the to-be-stored position data, adding one to the position data amount of the position index field corresponding to the to-be-stored position data in the position storage model.

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

[0140] In one specific embodiment, the position data amount is stored in the position data table. Correspondingly, the table structure of the position data table can be represented as <bin, z m , data packet, count>.

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

[0142] The advantage of such an arrangement is that it is convenient to quickly query the position data amount corresponding to the position data packet 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 the position index field in the position storage model by judging whether the position index field exists in the position storage model, so that the same position index field is stored only once in the position storage model, and the storage space occupied by the massive position data is further reduced.

[0144] Figure 7 A flowchart of a map visualization method provided by one embodiment of the present application, the present embodiment can be applicable to the case of visualizing and displaying the map defined by the pyramid model. The method can be executed by a map visualization device, which can be realized in the form of hardware and / or software, and can be configured in a map terminal. As shown in Figure 7 , the method comprises:

[0145] S310, 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 a query map tile under the query map level.

[0146] In the embodiment, at least one tile map corresponding to each map level is defined in the pyramid model, 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. The pyramid model is used to flexibly display an electronic map of an arbitrary zoom level on an electronic screen of a fixed size, that is, an electronic screen can be referred to as a view 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 be displayed in the view window according to the zoom and pan operations of the user, obtains a query map level and a query map tile, and then initiates a concurrent request to the map terminal with the query map level and the query map tile as request parameters. The map terminal is used to manage the map tiles and respond to the map visualization request.

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

[0149] In the embodiment, the index map tile in the index map tile set is a preset map tile at the maximum map level in the pyramid model.

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

[0151] S320, obtaining a query position 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.

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

[0153] Exemplarily, the index time slice set {bin} can be represented as {bin | bin ∈ [minBin, maxBin]}, wherein 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, according to the index time slice set and the index map tile set, a position index set is constructed, and a query position data set corresponding to the position index set in the map storage model is queried.

[0155] Specifically, the query position data set contains at least one query position data, and the query position data contains query tile pixel coordinates and query relative time. In another specific embodiment, the query position data set contains at least one query position data, and the query position data contains query tile pixel coordinates and query relative time.

[0156] S330, each query position data in the query position data set is converted into a map position data, and a map position data set is obtained.

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

[0158] In one specific embodiment, converting each query position data in the query position data set into a map position data to obtain a map position data set includes: for each query position data in the query position 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 position data into target tile pixel coordinates in the tile coordinate system corresponding to the query map tile; converting the query relative time in the query position data into a target timestamp according to the map starting time and the time slice interval; and adding the map position data composed of the target tile pixel coordinates and the target timestamp to the map position data set.

[0159] Specifically, the binary cross algorithm as shown in Figure 3 is used to convert the z m value in the position index field of the query position data into tile coordinates <col m ,row m > in the form of row and column numbers, and convert the tile coordinates z of the query map tile in the form of z value into tile coordinates <col,row> in the form of row and column numbers.

[0160] Specifically, the binary cross algorithm as shown in Figure 3 is used to convert the z m value in the position index field of the query position data into tile coordinates <col m ,row m > in the form of row and column numbers, and convert the tile coordinates z of the query map tile in the form of z value into tile coordinates <col,row> in the form of row and column numbers.

[0161]

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

[0163] time = bin × period + offset

[0164] wherein bin denotes a bin in the position index field corresponding to the query position data, and period denotes a time slice interval.

[0165] In one embodiment, the map position data set L' = {l'|l' = <oid, tile x ,tile y ,time>}.

[0166] S340, visualizing the map position data set in the query map tile.

[0167] Objects naturally formed or artificially constructed on the earth surface are referred to as cultures, such as rivers, houses, parks, etc. Displaying cultures on an electronic map is referred to as map visualization of cultures.

[0168] If the map is obtained by taking a picture, the cultures are represented by objects in the picture, and in this case, the map tile is referred to as a raster tile, which is a picture (such as.png) with a resolution of extent x extent. If the map is obtained by surveying or other means, the cultures are represented by geometric figures such as points, lines, and surfaces, and in this case, the map tile is referred to as a vector tile, which is an encoded file of the geometric figures of the cultures (such as.pbf). The geometric figures in the vector tile can be converted into a raster tile through symbolization, and the objects in the raster tile can also be extracted through image recognition to generate a vector tile.

[0169] For a raster tile, the client directly displays the picture, and the map style is immutable. For a vector tile, the client decodes the file to obtain geometric figures, then symbolizes the geometric figures according to a flexibly configured style, and renders them in the window using computer graphics technology.

[0170] The position data in the embodiments of the present application records the spatial positions of a moving object at different times, and the position data displayed on the map in the embodiments of the present application is collectively referred to as a map feature.

[0171] The technical solution of the present embodiment, by obtaining a query position data set from a map storage model according to an index time slice set and an index map tile set corresponding to a map visualization request, converting each query position data in the query position data set into a map position data, obtaining a map position data set, and visualizing the map position data set in a query map tile, solves the problem of huge query data volume of position data, improves the query efficiency of position data, and further improves the response efficiency of map visualization.

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

[0173] S410. In response to the detection of a map visualization request, determine the set of indexed map tiles based on the query map level corresponding to the map visualization request and the query map tiles under the query map level.

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

[0175] S420. Based on the index time slice set and index map tile set corresponding to the map visualization request, calculate the amount of visualized location data from the location storage model.

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

[0177] In one specific embodiment, the amount of visualized location data is calculated from the location storage model based on the index time slice set and index map tile set corresponding to the map visualization request. This includes: obtaining the amount of location data corresponding to at least one query location data packet from the location data table in the location storage model based on the index time slice set and index map tile set corresponding to the map visualization request, and using the sum of at least one amount of location data as the amount of visualized location data.

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

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

[0180] S430, determine whether the visualization position data volume is less than the data volume threshold value, if yes, execute S440, if no, execute S460.

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

[0182] S440, according to the index time slice set and the index map tile set corresponding to the map visualization request, obtain the query position data set from the map storage model.

[0183] S450, convert each query position data in the query position data set into map position data to obtain a map position data set, and visualize and display the map position data set in the query map tile.

[0184] S440-S450 in the embodiment correspond to S320-S340 shown in the above embodiment, and are the same or similar, which will not be described here. Figure 7

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

[0186] In the embodiment, each tile pixel block in the tile pixel block set corresponds to a reference position data volume, the tile pixel block corresponds to a reference 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.

[0187] In one specific embodiment, according to the query map level and the query map tile, determining the tile pixel block set comprises: obtaining a reference map level matching the query map level, and obtaining at least one reference map tile in the reference map level corresponding to the query map tile; for each reference map tile, according to the index time slice set and the reference map tile, counting the reference position data volume from the position storage model; obtaining a level step corresponding to the query map level and the reference map level, and according to the level step and the tile size corresponding to the preset map tile, dividing the query map tile to obtain at least one tile pixel block; according to the at least one tile pixel block and the at least one reference position data volume, constructing the tile pixel block set.

[0188] ​In one embodiment, the reference map level matching the query map level is obtained by: determining a partition map level corresponding to the pyramid model according to the maximum map level and a tile size corresponding to a preset map tile; determining the reference map level according to a preset level step and the query map level in a case that the query map level is less than or equal to the partition map level; and taking the maximum map level as the reference map level matching the query map level in a case that the query map level is greater than the partition 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] Wherein, maxLevel - log2extent represents the partition map level, and log2extent represents the preset level step.

[0192] Figure 9 A matching diagram between a query map level and a reference map level provided by one embodiment of the present application is shown in FIG. 1. Specifically, Figure 9 For example, the maximum map level is a 10-level map level, and extent = 2 6 For example, the partition map level is a 4-level map level. For the 0-level map level to the 4-level map level corresponding to the blue arrow, since it is less than or equal to the 4-level map level, the sum of the query map level and the preset level step is the reference map level matching the query map level. For the 5-level map level to the 10-level map level corresponding to the red arrow, since it is greater than the 4-level map level, the maximum map level is the reference map level matching the query map level.

[0193] In this embodiment, the reference position data amount count of a reference map tile <zoomLevel', z'> in the reference map level zoomLevel' is defined as a tile pixel block of a query map tile <zoomLevel, z>. Wherein, z x 4 step ≤ z' < (z + 1) x 4 step .

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

[0195] Wherein, minX and maxX represent the minimum tile pixel coordinate and the maximum tile pixel coordinate of the tile pixel block in the tile coordinate system corresponding to the query map tile along the x-axis direction, represents the minimum tile pixel coordinate and the maximum tile pixel coordinate of the tile pixel block along the y-axis direction in the tile coordinate system corresponding to the query map tile.

[0196] Specifically, for each reference map tile, the tile coordinate z' represented in the form of z value is converted into the tile coordinate <col', row'> represented in the form of row and column number by using the binary cross algorithm as shown in formula (2), and the tile coordinate z of the query map tile represented in the form of z value is converted into the tile coordinate <col, row> represented in the form of row and column number. Figure 3

[0197] Exemplarily, satisfies the following formula:

[0198]

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

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

[0201] The relationship between the granularity of the tile pixel block and the query map level zoomLevel can well express the spatial distribution characteristics of the position data, because the smaller the query map level zoomLevel is, the larger the spatial range corresponding to the query map tile is, and the greater the spatial distribution difference is, which is expressed by the tile pixel block with fine granularity; on the contrary, the larger the query map level zoomLevel is, the smaller the spatial range corresponding to the query map tile is, and the smaller the spatial distribution difference is, which is expressed by the tile pixel block with coarse granularity.

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

[0203] Figure 10 A flow chart of a specific example of a map visualization method provided by an embodiment of the present application is shown. Specifically, according to the index time slice set and the index map tile set corresponding to the map visualization request, the visualization position data volume is cached from the statistical data table in the position storage model, it is judged whether the visualization position data volume is greater than or equal to the data volume threshold, if yes, the tile pixel block set is visualized and displayed in the query map tile, if not, the map position data set is visualized and displayed in the query map tile. As shown in Figure 10 , the reference position data volume corresponding to the tile pixel block in the tile pixel block set is distinguished and displayed by different colors on the client side.

[0204] On the basis of the above-mentioned embodiment, specifically, the method further comprises: obtaining the time sequence 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 according to the index time slice set and the at least one time sequence position data volume, and visualizing and displaying the data volume change curve.

[0205] Specifically, the time sequence position data volume represents the data volume of the query position data corresponding to the query map tile and the index time slice, and 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 sequence position data volume.

[0206] The advantage of such setting is that the time sequence change characteristics of the position data in the visualized map can be improved, thereby improving the readability of the visualized map.

[0207] Figure 11 A visualization schematic diagram of a query map tile and a data volume change curve provided by an embodiment of the present application is shown. Specifically, Figure 11 The upper part of (a) to (d) in the above figure represents the visualization schematic diagram of the query map tile, and the lower part represents the visualization schematic diagram of the data volume change curve. Figure 11 The (a) in the above figure shows the visualization schematic diagram of the traditional query map tile and the data volume change curve. Since the query map level corresponding to the query map tile is small, the spatial range corresponding to the query map tile is large, and accordingly, the visualization position data volume is huge. In the (a) figure, there are chaotic visualization effects such as map position data stacking and overlaying.

[0208] Figure 11 The (b) and (c) in the above figure show the visualization schematic diagram of the query map tile and the data volume change curve generated based on the tile pixel block set. Although the visualization position data volume is huge, in the visualized map shown in the (b) and (c) figures, the visualization colors of different tile pixel blocks can clearly reflect the differences of the position data volume in different spatial regions and time regions.

[0209] In Figure 11 In the (d) figure in the, as the query map level increases, the spatial range corresponding to the query map tile becomes smaller, the amount of visualized location data is correspondingly less, the visualization display of the query map tile based on the map location data set ensures the map visualization effect under the condition of low location data amount.

[0210] The technical scheme of the embodiment, according to the index time slice set and the index map tile set corresponding to the map visualization request, the visualization location data amount is counted from the location storage model, according to the visualization location data amount, two kinds of map visualization modes are selected, one is the visualization mode of tile pixel block, and the other is the visualization mode of location data, realizing an adaptive switching map visualization technology, the visualization mode of tile pixel block improves the map visualization effect under the condition of massive location data, and reduces the calculation cost of the map visualization request to the map terminal, and further improves the display efficiency of the map visualization.

[0211] The following is an embodiment of the position data storage device provided by the embodiment of the application. The device belongs to the same inventive concept as the above-mentioned embodiment of the position data storage method. Details not described in the embodiment of the position data storage device can be referred to the content of the above-mentioned embodiment of the position data storage method.

[0212] Figure 12 A structural schematic diagram of a position data storage device provided by an embodiment of the application. As shown in Figure 12 The device comprises a to-be-stored map tile determination module 510, an original latitude and longitude coordinate conversion module 520, a to-be-stored time slice determination module 530, an original timestamp conversion module 540, a to-be-stored location data construction module 550, and a to-be-stored location data storage module 560.

[0213] The to-be-stored map tile determination module 510 is configured to determine, according to 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 original latitude and longitude coordinates of a map object.

[0214] The original latitude and longitude coordinate conversion module 520 is configured to convert the original latitude and longitude coordinates into to-be-stored tile pixel coordinates in a tile coordinate system corresponding to the to-be-stored map tile.

[0215] The to-be-stored time slice determination module 530 is configured to determine, according to a map starting time and a time slice interval, a to-be-stored time slice in a time slice set that matches an original timestamp of the map object.

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

[0217] The to-be-stored location data construction module 550 is configured to construct a location index field according to the to-be-stored time slice and the to-be-stored map tile, and construct to-be-stored location data according to the to-be-stored tile pixel coordinate and the to-be-stored relative time.

[0218] The to-be-stored location data storage module 560 is configured to store the location index field and the to-be-stored location data into the location storage model correspondingly.

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

[0220] The technical scheme of the embodiment divides the geographic map into a plurality of map tiles, converts the original longitude and latitude coordinates of the map object into to-be-stored tile pixel coordinates in a to-be-stored map tile corresponding to the largest map level in the pyramid model, divides the time axis into a plurality of time slices, converts the original timestamp of the map object into a to-be-stored relative time corresponding to a to-be-stored time slice in the time slice set, and stores the location data by using the tile pixel coordinates and the relative time with smaller data granularity, thereby reducing the storage space occupied by the massive location data.

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

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

[0223] The to-be-stored map tile determination unit is configured to determine, according to the tile row and column coordinates, a to-be-stored map tile in the largest map level in the pyramid model that matches the original longitude and latitude coordinates of the map object.

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

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

[0226] convert the original longitude and latitude coordinates into plane projection coordinates by using a conversion function between the geographic coordinate system and the plane projection coordinate system.

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

[0228] According to the map pixel coordinates and the tile size corresponding to the preset map tile, the tile row and column coordinates are determined.

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

[0230] According to the tile row and column coordinates and the tile size corresponding to the preset map tile, the tile origin coordinates of the tile coordinate system corresponding to the to-be-stored map tile are determined.

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

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

[0233] The time difference value between the original timestamp of the map object and the map start time is taken as the time length.

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

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

[0236] The product result corresponding to the to-be-stored time slice and the time slice interval is taken as the reference timestamp.

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

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

[0239] The to-be-stored location data storage unit is configured to, in a case where the location index field does not exist in the location storage model, store the location index field into the location storage model and store the to-be-stored location data into the location data packet corresponding to the location index field in the location storage model.

[0240] In a case where the location index field exists in the location storage model, the to-be-stored location data is stored into the location data packet corresponding to the location index field in the location storage model.

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

[0242] In one specific embodiment, the to-be-stored position data further comprises an object identifier corresponding to a map object, and the unit for storing the to-be-stored position data is specifically configured to:

[0243] In a case where the object identifier in the to-be-stored position data exists in the object identifier set in the position data packet, the to-be-stored tile pixel coordinate and the to-be-stored relative time in the to-be-stored position data are stored as a position sequence in the position data set in the position data packet.

[0244] In a case where the object identifier in the to-be-stored position data 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 to-be-stored tile pixel coordinate and the to-be-stored relative time in the to-be-stored position data are stored as a position sequence in the position data set in the position data packet.

[0245] In one specific embodiment, the apparatus further comprises:

[0246] The position data amount updating module is configured to, in response to detecting a storage operation of the to-be-stored position data, increase the position data amount of the position index field corresponding to the to-be-stored position data in the position storage model by one.

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

[0248] The position data storage apparatus provided by the embodiments of the present application can perform the position data storage method provided by any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of performing the method.

[0249] The following is an embodiment of a map visualization apparatus provided by the embodiments of the present application. The apparatus and the map visualization method of the above embodiments belong to the same inventive concept. Details not described in the embodiment of the map visualization apparatus can be referred to the content about the map visualization method in the above embodiments.

[0250] Figure 13 FIG. 1 is a structural schematic diagram of a map visualization apparatus provided by an embodiment of the present application. As shown in the figure, the apparatus comprises an index map tile set determination module 610, a query position data set acquisition module 620, a query position data set conversion module 630, and a first tile map display module 640. Figure 13

[0251] The index map tile set determination module 610 is configured to, 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 a query map tile at the query map level; wherein the index map tile in the index map tile set is a preset map tile at the largest map level in the pyramid model.​

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

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

[0254] The first tile map display module 640 is configured to visually display the map location data set in the query map tile.

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

[0256] The technical solution of the embodiment is configured to acquire, according to an index time slice set and an index map tile set corresponding to the map visualization request, a query location data set from the map storage model, convert each query location data in the query location data set into map location data to obtain a map location data set, and visually display the map location data set in the query map tile, thereby solving the problem of a huge amount of query data of location data, improving the query efficiency of location data, and further improving the response efficiency of map visualization.

[0257] In one specific embodiment, the query location data set 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 target tile pixel coordinates in a tile coordinate system corresponding to the query map tile.

[0259] According to a map start time and a time slice interval, the query relative time in the query location data is converted into a target timestamp.

[0260] The map location data composed of the target tile pixel coordinates and the target timestamp is added to the map location data set.

[0261] In the pyramid model, at least one tile map corresponding to each map level is defined, 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.

[0262] In one specific embodiment, the device further includes:

[0263] a second tile map display module, configured to, according to the index time slice set and the index map tile set corresponding to the map visualization request, count a visualization position data amount from the position storage model;

[0264] in a case where the visualization position data amount is less than the data amount threshold, invoking the query position dataset obtaining module 620;

[0265] in a case where the visualization position data amount is greater than or equal to the data amount threshold, determining a tile pixel block set according to the query map level and the query map tile, and performing visualization display of the tile pixel block set in the query map tile;

[0266] wherein the visualization position data amount represents a data amount of the query position data corresponding to the map visualization request, the tile pixel block set comprises reference position data amounts corresponding to at least one tile pixel block respectively, 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.

[0267] In one specific embodiment, the second tile map display module comprises:

[0268] a reference map level obtaining unit, configured to obtain a reference map level matching the query map level, and obtain at least one reference map tile corresponding to the query map tile in the reference map level;

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

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

[0271] a tile pixel block set constructing unit, configured to construct the tile pixel block set according to the at least one tile pixel block and the at least one reference position data amount.

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

[0273] determine a partition map level corresponding to the pyramid model according to the maximum map level and a tile size corresponding to the preset map tile;

[0274] in a case where the query map level is less than or equal to the partition map level, determine the reference map level according to a preset level step and the query map level;

[0275] In a case where the query map level is greater than the split map level, the maximum map level is taken as the reference map level matching the query map level.

[0276] In one embodiment, the apparatus further comprises:

[0277] a data volume change curve visualization module configured to count, from the position storage model, a time-series position data volume corresponding to each index time slice in the index time slice set;

[0278] generate a data volume change curve according to the index time slice set and the at least one time-series position data volume, and visualize the data volume change curve.

[0279] The map visualization apparatus provided by the embodiments of the present application can perform the map visualization method provided by any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of performing the method.

[0280] Figure 14 A structure diagram of a map terminal according to an embodiment of the present application. The map terminal 10 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, servers, servers, servers, 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 implementations of the present application described and / or claimed herein.

[0281] As shown in Figure 14 The map terminal 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is in communication with the at least one processor 11, wherein the memory stores a computer program executable by the at least one processor 11, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the map terminal 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

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

[0283] The processor 11 can be various general and / or special-purpose processing components having processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various special-purpose Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processing (DSP), and any appropriate processor, controller, microcontroller, and the like. The processor 11 performs various methods and processes described above, such as the storage method of location data and / or the map visualization method provided by the above-described embodiments.

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

[0285] The various implementations of the systems and techniques described above can be realized in a digital electronic circuit system, an integrated circuit system, a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Parts (ASSP), a System on Chip (SOC), a Complex Programmable Logic Device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0286] Computer programs implementing the storage method of location data and / or the map visualization method of the present application 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, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program running on the processor implements the functions / operations specified in the flow diagrams and / or block diagrams. The computer program can execute entirely on a machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.

[0287] In the context of this application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, 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 wire, a portable computer diskette, 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 for interaction with a user, the systems and techniques described here can be implemented on a terminal device having a display device (e.g., a Cathode-Ray Tube (CRT) or 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) by which the user can provide input to the terminal device. Other kinds of devices can be used to provide for interaction with a user as well; for example, 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, speech, or tactile input.

[0289] The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, 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] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and virtual private server (VPS) services.

[0291] It should be understood that the various forms of flow shown above can be reordered, added to, or have steps deleted. For example, the steps described in the present application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which are not limited herein.

[0292] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.< / z>

Claims

1. A method for storing location data, characterized in that, include: Based on the transformation function between the geographic coordinate system and the map coordinate system, determine the map tiles to be stored that match the original latitude and longitude coordinates of the map object in the highest map level of the pyramid model. The original latitude and longitude coordinates are converted into the pixel coordinates of the tile to be stored in the tile coordinate system corresponding to the map tile to be stored; Based on the map start time and time slice interval, determine the time slices to be stored that match the original timestamp of the map object in the time slice set; Convert the original timestamp into a relative time to be stored that corresponds to the time slice to be stored; Based on the time slice to be stored and the map tile to be stored, a location index field is constructed, and based on the pixel coordinates of the tile to be stored and the relative time to be stored, the location data to be stored is constructed. The location index field and the location data to be stored are stored in the location storage model accordingly; 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 process of determining the map tiles to be stored that match the original latitude and longitude coordinates of the map object in the highest map level of the pyramid model, based on the transformation function between the geographic coordinate system and the map coordinate system, includes: The original latitude and longitude coordinates of the map object are converted into tile row and column coordinates using a conversion function between the geographic coordinate system and the map coordinate system; Based on the tile row and column coordinates, determine the map tiles to be stored that match the original latitude and longitude coordinates of the map object in the highest map level of the pyramid model. The pyramid model defines at least one tile map corresponding to each map level. The tile map corresponding to the highest 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 process of using a conversion function between geographic coordinate systems and map coordinate systems to convert the original latitude and longitude coordinates of a map object into tile row and column coordinates includes: The original latitude and longitude coordinates are converted into planar projected coordinates using a transformation function between the geographic coordinate system and the planar projected coordinate system. The planar projection coordinates are converted into map pixel coordinates using a transformation function between the planar projection coordinate system and the map coordinate system. The row and column coordinates of the tile are determined based on 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 step of converting the original latitude and longitude coordinates into the pixel coordinates of the tile to be stored in the tile coordinate system corresponding to the map tile to be stored includes: Based on the tile row and column coordinates and the tile size corresponding to the preset map tile, determine the tile origin coordinates of the tile coordinate system corresponding to the map tile to be stored; 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 slices to be stored in the time slice set corresponding to the original timestamp of the map object based on the map start time and time slice interval includes: The time length is defined as the time difference between the original timestamp of the map object and the start time of the map. Based on the time length and the time slice interval, determine the time slices to be stored in the time slice set that correspond to the original timestamp of the map object.

6. The method according to claim 1, characterized in that, The step of converting the original timestamp into a relative time to be stored corresponding to the time slice to be stored includes: The product of the time slice to be stored and the time slice interval is used as the 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-6, characterized in that, The step of storing the location index field and the location data to be stored in the location storage model includes: If the location index field does not exist in the location storage model, the location index field is stored in the location storage model, and the location data to be stored is stored in the location data packet corresponding to the location index field in the location storage model; If the location index field exists 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; The location data packet contains 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 the object identifier corresponding to the map object. Accordingly, storing the location data to be stored in the location data package corresponding to the location index field in the location storage model includes: If 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 into the location dataset in the location data packet. If 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 packet are stored as a location sequence in the location data packet.

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

10. A map visualization method, characterized in that, include: In response to the detection of a map visualization request, an index map tile set is determined based on the query map level corresponding to the map visualization request and the 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 highest map level in the pyramid model; Based on the index time slice set and the index map tile set corresponding to the map visualization request, obtain the query location dataset from the map storage model; Each query location data in the query location dataset is converted into map location data to obtain a map location dataset; The map location dataset is visualized in the queried map tiles; The map storage model is constructed using the location data storage method described in any one of claims 1-9. The map location data includes target tile pixel coordinates and target timestamps. The target tile pixel coordinates represent the location coordinates in the tile coordinate system corresponding to the queried map tile.

11. The method according to claim 10, characterized in that, The step of converting each query location data in the query location dataset into map location data to obtain a map location dataset includes: For each query location data in the query location dataset, the coordinate transformation 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; Based on the map start time and time slice interval, the query relative time in the query location data is converted into a target timestamp; Add the map location data, consisting of the target tile pixel coordinates and the target timestamp, to the map location dataset; The pyramid model defines at least one tile map corresponding to each map level. The tile map corresponding to the highest 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 includes: Based on the index time slice set and the index map tile set corresponding to the map visualization request, the amount of visualized location data is counted from the location storage model; If the amount of data at the visualized location is less than the data amount threshold, the step of obtaining the query location dataset from the map storage model based on the index time slice set and the index map tile set corresponding to the map visualization request is executed. If the amount of data at the visualized location is greater than or equal to the data amount threshold, the 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; Wherein, the visualized location data volume represents the data volume of the query location data corresponding to the map visualization request, the tile pixel block set contains at least one reference location data volume corresponding to each tile pixel block, 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.

13. The method according to claim 12, characterized in that, The step of determining the tile pixel block set based on the queried map level and the queried map tiles includes: Obtain a reference map level that matches the queried map level, and obtain at least one reference map tile from the reference map level that corresponds to the queried map tile; For each reference map tile, the amount of reference location data is calculated from the location storage model based on the index time slice set and the reference map tile; Obtain the level step size corresponding to the query map level and the reference map level, and divide the query map tile into at least one tile pixel block according to the level step size and the tile size corresponding to the preset map tile; A set of tile pixel blocks is constructed based on the at least one tile pixel block and the amount of at least one reference position data.

14. The method according to claim 13, characterized in that, The step of obtaining a reference map level that matches the queried map level includes: The segmented map level corresponding to the pyramid model is determined based on the maximum map level and the tile size corresponding to the preset map tile. If the queried map level is less than or equal to the partition map level, a reference map level is determined based on a preset level step size and the queried map level. If the queried map level is greater than the dividing map level, the maximum map level is used as the reference map level that matches the queried map level.

15. The method according to claim 12, characterized in that, The method further includes: The amount of time-series location data corresponding to at least one index time slice in the index time slice set is counted from the location storage model. Based on the index time slice set and the data volume of at least one time-series location, a data volume change curve is generated, and the data volume change curve is visualized.

16. A storage device for location data, characterized in that, include: The module for determining map tiles to be stored is used to determine the map tiles to be stored that match the original latitude and longitude coordinates of the map object in the highest map level of the pyramid model, based on the transformation function between the geographic coordinate system and the map coordinate system. The original latitude and longitude coordinate conversion module is used to convert the original latitude and longitude coordinates into the pixel coordinates of the tile to be stored in the tile coordinate system corresponding to the map tile to be stored; The module for determining time slices to be stored is used to determine the time slices to be stored that match the original timestamp of the map object in the time slice set, based on the map start time and time slice interval. The original timestamp conversion module is used to convert the original timestamp into a relative time to be stored corresponding to the time slice to be stored; The location data construction module is used to construct a location index field based on the time slice to be stored and the map tile to be stored, and to construct the location data to be stored based on the pixel coordinates of the tile to be stored and the relative time to be stored. The location data storage module is used to store the location index field and the location data to be stored in the location storage model. 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: The index map tile set determination module is used to determine the index map tile set in response to the detection of a map visualization request, based on the query map level corresponding to the map visualization request and the 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 highest map level in the pyramid model; The query location dataset acquisition module is used to acquire the query location dataset from the map storage model based on the index time slice set and the index map tile set corresponding to the map visualization request. The query location dataset conversion module is used to convert each query location data in the query location dataset into map location data to obtain a map location dataset. The first tile map display module is used to visualize the map location dataset in the queried map tiles; The map storage model is constructed using the location data storage method described in any one of claims 1-9. The map location data includes target tile pixel coordinates and target timestamps. The target tile pixel coordinates represent the location coordinates in the tile coordinate system corresponding to the queried map tile.

18. A map terminal, characterized in that, The map terminal includes: 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, which enables the at least one processor to perform the location data storage method of any one of claims 1-9 and / or the map visualization method of any one of claims 10-15.

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

20. A computer program product comprising a computer program that, when executed by a processor, implements a method for storing location data according to any one of claims 1-9 and / or a method for visualizing maps according to any one of claims 10-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