CN116108120A - Grid indexing method for track data, track data searching method and track data searching device - Google Patents

Grid indexing method for track data, track data searching method and track data searching device Download PDF

Info

Publication number
CN116108120A
CN116108120A CN202211549455.XA CN202211549455A CN116108120A CN 116108120 A CN116108120 A CN 116108120A CN 202211549455 A CN202211549455 A CN 202211549455A CN 116108120 A CN116108120 A CN 116108120A
Authority
CN
China
Prior art keywords
grid
track
information
target
identifications
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211549455.XA
Other languages
Chinese (zh)
Inventor
郝渊科
徐泉清
王胜
杨志丰
杨传辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan University WHU
Beijing Oceanbase Technology Co Ltd
Original Assignee
Wuhan University WHU
Beijing Oceanbase Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan University WHU, Beijing Oceanbase Technology Co Ltd filed Critical Wuhan University WHU
Priority to CN202211549455.XA priority Critical patent/CN116108120A/en
Publication of CN116108120A publication Critical patent/CN116108120A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Radar Systems Or Details Thereof (AREA)

Abstract

The embodiment of the specification provides a grid indexing method for track data, a track data searching method and a track data searching device. In the grid index method for track data, target track point information is acquired, wherein the target track point information comprises identification, latitude information and longitude information of a target track point; mapping latitude information and longitude information according to the range of the area to be indexed and the resolution of the initial grid to obtain mapping position information of the target track point, wherein the mapping position information comprises mapped latitude information and mapped longitude information; mapping is carried out according to the mapping position information by utilizing the space filling curve, and grid identifications corresponding to the target track points are obtained; and obtaining a first inverted list of grid identifications corresponding to the target track points according to the identifications of the target track points, wherein the first inverted list is used for representing the relation between the grid identifications and the identifications of the track points contained in the grid indicated by the grid identifications.

Description

Grid indexing method for track data, track data searching method and track data searching device
Technical Field
Embodiments of the present disclosure relate generally to the field of computer technology, and in particular, to a grid indexing method for track data, a track data searching method and apparatus.
Background
With the development of GIS (Geographic Information Systems, geographic information system) technology and the application of various positioning technologies such as global positioning system (Global Positioning System, GPS), radio frequency identification technology (Radio Frequency Identification, RFID), and communication network technology, a large amount of position data including time stamp (timestamp) is being widely collected. With the popularity of mobile devices and the use of Location-Based services (LBS), the moving track data generated by tracking moving objects such as pedestrians and vehicles has a great application value, for example: traffic prediction, path planning, travel mode mining, and the like.
For track data management, the prior art usually adopts a mode of expanding on a tree-shaped spatial index structure (such as R-tree), for example, 3DR-tree, TB-tree, MV3R-tree and the like. However, since the tree index structure needs to maintain many intermediate nodes to construct a query path from the root node to the leaf node with the data record, the intermediate nodes tend to overlap each other in space-time scope, so that the storage space is wasted to some extent. In addition, such tree-structured indexes typically perform track queries by means of Depth-First Search (DFS) or breadth-First Search (BFS), too many traversal of irrelevant intermediate nodes also restricts query performance. How to design an index structure and a query algorithm which can effectively reduce space occupation and improve query performance becomes a problem for track data management.
Disclosure of Invention
In view of the foregoing, the embodiments of the present specification provide a grid indexing method for track data, a track data searching method and apparatus. By using the method and the device, the track data without the time dimension or the track data with the time dimension can be efficiently indexed through the two-dimensional grid index or the three-dimensional grid index. Because the established grid index is obtained based on the space filling curve, the grid index can be accessed through the linear table, thereby avoiding space occupation and time expenditure of creation of intermediate nodes in the tree index structure and being beneficial to improving query performance. The grid index described above may be applied to GIS systems, such as those based on large databases.
According to an aspect of embodiments of the present specification, there is provided a grid indexing method for track data, comprising: acquiring target track point information, wherein the target track point information comprises identification, latitude information and longitude information of a target track point; mapping the latitude information and the longitude information according to the range of the area to be indexed and the resolution of the initial grid to obtain the mapping position information of the target track point, wherein the mapping position information comprises mapped latitude information and mapped longitude information; mapping is carried out according to the mapping position information by utilizing a space filling curve, and grid identifications corresponding to the target track points are obtained; and obtaining a first inverted list of grid identifications corresponding to the target track points according to the identifications of the target track points, wherein the first inverted list is used for representing the relation between the grid identifications and identifications of track points contained in grids indicated by the grid identifications.
According to another aspect of the embodiments of the present specification, there is provided a trajectory data searching method based on a grid index, including: acquiring information of track points to be searched, wherein the information of the track points to be searched comprises identification of the track points to be searched; and determining grid identifications corresponding to the track points to be searched by using an inverted list of the grid identifications, wherein the inverted list of the grid identifications is obtained by the grid indexing method for track data.
According to still another aspect of the embodiments of the present specification, there is provided a grid indexing apparatus for trajectory data, including: a track point information acquisition unit configured to acquire target track point information, wherein the target track point information includes an identification of a target track point, latitude information, and longitude information; the position mapping unit is configured to map the latitude information and the longitude information according to the range of the area to be indexed and the initial grid resolution to obtain the mapping position information of the target track point, wherein the mapping position information comprises mapped latitude information and mapped longitude information; the curve coding unit is configured to map by using a space filling curve according to the mapping position information to obtain a grid identifier corresponding to the target track point; and the first index establishing unit is configured to obtain a first inverted list of grid identifications corresponding to the target track points according to the identifications of the target track points, wherein the first inverted list is used for representing the relation between the grid identifications and identifications of track points contained in grids indicated by the grid identifications.
According to still another aspect of the embodiments of the present specification, there is provided a trajectory data search device based on a grid index, including: the information acquisition unit of the track points to be searched is configured to acquire information of the track points to be searched, wherein the information of the track points to be searched comprises identification of the track points to be searched; a search unit configured to determine a grid identification corresponding to the track point to be searched using an inverted list of grid identifications, wherein the inverted list of grid identifications is obtained by the grid indexing method for track data according to any one of claims 1 to 6.
According to another aspect of embodiments of the present specification, there is provided a grid indexing apparatus for trajectory data, including: at least one processor, and a memory coupled with the at least one processor, and a computer program stored on the memory, the at least one processor executing the computer program to implement the grid indexing method for trajectory data as described above.
According to another aspect of the embodiments of the present specification, there is provided a trajectory data search device based on a grid index, including: at least one processor, and a memory coupled with the at least one processor, and a computer program stored on the memory, the at least one processor executing the computer program to implement the grid index based trajectory data search method as described above.
According to another aspect of embodiments of the present specification, there is provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the grid index method for track data and/or the track data search method based on grid index as described above.
According to another aspect of embodiments of the present specification, there is provided a computer program product comprising a computer program that is executed by a processor to implement the grid index method for track data and/or the grid index-based track data search method as described above.
Drawings
A further understanding of the nature and advantages of the present description may be realized by reference to the following drawings. In the drawings, similar components or features may have the same reference numerals.
Fig. 1 illustrates an exemplary architecture of a grid index method and apparatus for track data, a track data search method and apparatus based on grid index according to an embodiment of the present specification.
Fig. 2 shows a flowchart of one example of a grid indexing method for trajectory data according to an embodiment of the present specification.
Fig. 3 shows a flowchart of yet another example of a grid indexing method for trajectory data according to an embodiment of the present specification.
Fig. 4 shows a flowchart of one example of a process of generating a second inverted list of grid identifications for a grid indexing method of trajectory data according to an embodiment of the present specification.
Fig. 5 shows a flowchart of still another example of a grid indexing method for trajectory data according to an embodiment of the present specification.
Fig. 6 shows a flowchart of another example of a grid indexing method for trajectory data according to an embodiment of the present specification.
Fig. 7 shows a schematic diagram of one example of stereoscopic mesh identification for a mesh indexing method of trajectory data according to an embodiment of the present specification.
Fig. 8 shows a schematic diagram of one example of a grid index of the grid index method for trajectory data according to an embodiment of the present specification.
Fig. 9 shows a flowchart of one example of a trajectory data search method based on a grid index according to an embodiment of the present specification.
Fig. 10 shows a block diagram of one example of a grid indexing apparatus for trajectory data according to an embodiment of the present specification.
Fig. 11 shows a block diagram of still another example of a grid indexing apparatus for trajectory data according to an embodiment of the present specification.
Fig. 12 shows a block diagram of still another example of a grid indexing apparatus for trajectory data according to an embodiment of the present specification.
Fig. 13 shows a block diagram of another example of a grid indexing apparatus for trajectory data according to an embodiment of the present specification.
Fig. 14 shows a block diagram of one example of a trajectory data search device based on a grid index according to an embodiment of the present specification.
Fig. 15 shows a block diagram of one example of a grid indexing apparatus for trajectory data according to an embodiment of the present specification.
Fig. 16 shows a block diagram of one example of a trajectory data search device based on a grid index according to an embodiment of the present specification.
Detailed Description
The subject matter described herein will be discussed below with reference to example embodiments. It should be appreciated that these embodiments are discussed only to enable a person skilled in the art to better understand and thereby practice the subject matter described herein, and are not limiting of the scope, applicability, or examples set forth in the claims. Changes may be made in the function and arrangement of elements discussed without departing from the scope of the embodiments herein. Various examples may omit, replace, or add various procedures or components as desired. In addition, features described with respect to some examples may be combined in other examples as well.
As used herein, the term "comprising" and variations thereof mean open-ended terms, meaning "including, but not limited to. The term "based on" means "based at least in part on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment. The term "another embodiment" means "at least one other embodiment". The terms "first," "second," and the like, may refer to different or the same object. Other definitions, whether explicit or implicit, may be included below. Unless the context clearly indicates otherwise, the definition of a term is consistent throughout this specification.
In this specification, the term "grid index" may refer to a geographic space g= (lat) that logically will range min ,lon min ,lat max ,lon max ) Divided into rectangular grids of equal size, with each grid indexing the track points located therein. Wherein lat min ,lat max Can be used to represent latitude boundaries, lon, of the above-mentioned geospatial space min ,lon max May be used to represent the longitude boundaries of the geographic space described above.
In this specification, the term "space filling curve" may include a Z curve, a hilbert curve, etc., with the purpose of reducing the spatial dimension on the basis of a spatial grid. For example, for a two-dimensional or three-dimensional space, it is divided into equal-sized grids or cubes, and the grids or cubes in the space are ordered in the order of extension of the curve, thereby mapping the representation space of the grids or cubes to one dimension.
A grid index method and apparatus for track data, a track data search method and apparatus based on a grid index according to embodiments of the present specification will be described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates an exemplary architecture 100 of a grid index method and apparatus for track data, a track data search method and apparatus based on grid index, according to an embodiment of the present description.
In fig. 1, a network 110 may be employed to interconnect between a terminal device 120 and a server 130.
Network 110 may be any type of network capable of interconnecting network entities. The network 110 may be a single network or a combination of networks. In terms of coverage, network 110 may be a Local Area Network (LAN), wide Area Network (WAN), or the like. In terms of a carrier medium, the network 110 may be a wired network, a wireless network, or the like. In terms of data switching technology, the network 110 may be a circuit switched network, a packet switched network, or the like.
Terminal device 120 may be any type of electronic computing device capable of connecting to network 110, accessing servers or websites on network 110, processing data or signals, and the like. For example, the terminal device 120 may be a desktop computer, a notebook computer, a tablet computer, a smart phone, or the like. Although only one terminal device is shown in fig. 1, it should be understood that there may be a different number of terminal devices connected to the network 110.
In one embodiment, the terminal device 120 may be used by a user. Terminal device 120 may include an application client (e.g., client 121) that may provide various services to a user. In some cases, client 121 may interact with server 130. For example, the client 121 may transmit a message input by a user to the server 130 and receive a response associated with the message from the server 130. Herein, a "message" may refer to any input information, such as trajectory point information from user input, and the like.
Server 130 may be connected to database 140 via network 110. Database 140 may be used to support server 130 in building a grid index for track data or in conducting a track data search based on the grid index.
It should be appreciated that all network entities shown in fig. 1 are exemplary and that any other network entity may be involved in architecture 100, depending on the particular application requirements.
Fig. 2 shows a flowchart of a grid indexing method 200 for trajectory data according to an embodiment of the present description.
As shown in fig. 2, at 210, target trace point information is acquired.
In the present embodiment, target track point information may be acquired. In one example, real-time locations transmitted by a positioning device may be sampled to obtain a plurality of trace point information. The target track point information may be selected from the obtained track point information in various ways. The target track point information may include identification, latitude information and longitude information of the target track point. In one example, for the target track point p, its target track point information may be (pid, lat, lon). pid, lat, lon may be used to indicate the identity, latitude, and longitude, respectively, of the target trace point p.
In some optional implementations of this embodiment, the target track point information may further include an identifier of a track to which the target track point belongs. In one example, a track may be an ordered sequence of track points to describe the change in position of an object over a range of times. For example, the trajectory may be represented by t=<p 1 ,p 2 ,…,p n >To represent. P is p 1 ,p 2 ,…,p n May be used to represent different trajectory points, respectively. Thus, for the target locus point p 1 The target track point information thereof may be (p 1 Lat, lon, tid). tid can be used to represent the target trajectory point p 1 And (5) identifying the track.
In some optional implementations of this embodiment, the target track points may include target history track points. The target track point information may further include acquisition time information of the target track point information. In one example, for targetsLocus point p 1 The target track point information thereof may be (p 1 Lat, lon, time, tid). time can be used to represent p 1 And the corresponding acquisition time of the target track point information. In one example, the acquisition time information may be a timestamp (e.g., 1668049697). In one example, the acquisition time may be the Beijing time at the time of acquisition (e.g., 2022-11-1011:08:17).
At 220, the latitude information and the longitude information are mapped according to the range of the area to be indexed and the resolution of the initial grid, and mapping position information of the target track point is obtained.
In this embodiment, the range of the region to be indexed may refer to the range of the geospatial space to be meshed. For example, if the grid index of the track data is established for the N city, the range of the area to be indexed may be the administrative division of the N city, or may be the minimum circumscribed rectangle of the administrative division of the N city. The above-described initial grid resolution may be used to indicate the mapping ratio. In one example, for N city, when the initial grid resolution is set to 6, the size of the divided single grid is approximately 750 x 750m 2 The method comprises the steps of carrying out a first treatment on the surface of the When the initial grid resolution is set to 7, the individual grids divided are approximately 375 x 375m in size 2 . Latitude information and longitude information in the target track point information may be mapped in various ways to map track points indicated by the target track point information into the divided grid. The mapped location information may include mapped latitude information and mapped longitude information.
In one example, for the trajectory point p= (lat, lon), the mapped latitude information i and the mapped longitude information j may be obtained by the following formula. Where μ can be used to represent the initial grid resolution. lat, lon, lat min ,lon min ,lat max ,lon max Reference is made to the preceding relevant description.
Figure BDA0003980448210000071
Figure BDA0003980448210000072
At 230, mapping is performed according to the mapping position information by using the space filling curve, so as to obtain the grid identification corresponding to the target track point.
In this embodiment, various space filling curves (for example, a Z curve, a hilbert curve, etc.) may be used to map according to the mapping location information, so as to obtain the grid identifier corresponding to the target track point. In one example, the mapped latitude information (e.g., i) and the mapped longitude information (e.g., j) included in the mapped position information may be converted into binary values, respectively, and the bits may be interleaved (e.g., even bits store bits of the binary representation of the mapped latitude information and odd bits store bits of the binary representation of the mapped longitude information) to generate, as a grid identifier (e.g., grid identifier g) corresponding to the target track point, a code in which the grid where the target track point is located is arranged in the Z order (curve) 1 )。
At 240, a first inverted list of grid identifications corresponding to the target track points is obtained based on the identifications of the target track points.
In this embodiment, a first inverted list of grid identifiers corresponding to the target track points may be obtained according to the relationship between the identifiers of the target track points and the obtained corresponding grid identifiers. The first inverted list is used for representing the relation between the grid identification and the identification of the track points contained in the grid indicated by the grid identification. So that the grid identification can be used to index the track points located in the grid.
Referring now to fig. 3, fig. 3 illustrates a flowchart of yet another example of a grid indexing method 300 for trajectory data according to an embodiment of the present disclosure.
As shown in fig. 3, at 310, target trajectory point information is acquired.
In this embodiment, the target track point information may include an identifier of the target track point, latitude information, longitude information, and an identifier of a track to which the target track point belongs. Reference may be made to the corresponding description in the alternative implementation of step 210 in the previously described fig. 2 embodiment.
At 320, the latitude information and the longitude information are mapped according to the range of the area to be indexed and the resolution of the initial grid, and mapping position information of the target track point is obtained.
At 330, mapping is performed according to the mapping position information by using the space filling curve, so as to obtain the grid identification corresponding to the target track point.
At 340, a first inverted list of grid identifications corresponding to the target track points is obtained based on the identifications of the target track points.
It should be noted that, the steps 320 to 340 may refer to the corresponding descriptions of the steps 220 to 240 in the embodiment of fig. 2, and are not repeated here.
At 350, a second inverted list of grid identifications corresponding to the target track points is obtained according to the identifications of the tracks to which the target track points belong.
In this embodiment, a second inverted list of grid identifiers corresponding to the target track points may be obtained according to the relationship between the identifiers of the tracks to which the target track points belong and the obtained corresponding grid identifiers. The second inverted list is used for representing the relation between the grid identification and the identification of the track to which the track points contained in the grid indicated by the grid identification belong. The grid identification can thus be used to index the trajectory to which the trajectory point located in the grid belongs.
Optionally, with further reference to fig. 4, fig. 4 shows a flowchart of one example of a process 400 of generating a second inverted list of grid identifications for a grid indexing method of track data according to an embodiment of the present disclosure.
As shown in fig. 4, the target track points include real-time track points. In one example, the target track point may be the track point whose acquired acquisition time is currently closest to.
At 410, it is determined whether the current second inverted list of grid identifications corresponding to the target track points includes an identification of a track to which the target track points belong.
In this embodiment, the second inverted list of grid identifications may be updated according to a change in the relationship between the grid identifications and the identifications of the trajectories to which the trajectory points belong, Without the need to recreate a second inverted list of new grid identifications each time. Whether the current second inverted list of the grid identifications corresponding to the real-time track points contains the identification of the track to which the real-time track points belong or not can be judged. In one example, if grid identification g 1 The current second inverted list contains { track t } 1 Trace t 2 Real-time trace point p 5 Belongs to the track t 3 . Then the grid identification g can be determined 1 The identification of the track to which the target track point belongs is not contained in the current second inverted list. In one example, if grid identification g 1 The current second inverted list contains { track t } 1 Trace t 3 Real-time trace point p 5 Belongs to the track t 3 . Then the grid identification g can be determined 1 The current second inverted list of the target track points contains the identification of the track to which the target track points belong.
After determining no at 410, at 420, the identifier of the track to which the target track point belongs is inserted into the current second inverted list of grid identifiers corresponding to the target track point.
In one example, if grid identification g 1 The current second inverted list contains { track t } 1 Trace t 2 Real-time trajectory point p 5 Identification t of the associated track 3 Inserting grid mark g corresponding to target track point 1 And thus updated grid identification g 1 The current second inverted list contains { track t } 1 Trace t 2 Trace t 3 }。
At 430, the identification of the track to which the target track point belongs is deleted from the current second inverted list of grid identifications of other grids in the vicinity of the grid indicated by the grid identification corresponding to the target track point.
In one example, the range of "grid vicinity" may be determined according to the sampling rate of the real-time track points, so that not only omission due to too far track points belonging to the same track drift may be avoided, but also the calculation amount may be reduced by judging only the local current second inverted list. If the sampling rate is high, the range of the 'grid vicinity' can be correspondingly smaller, for exampleSuch as determining only adjacent grids as "grid vicinity". If the sampling rate is low, the range of "near grid" may be correspondingly larger, e.g., no more than 5 grids apart is determined to be "near grid". In one example, if grid identification g 2 The current second inverted list contains { track t } 1 Trace t 3 Then at the point p of the real-time track 5 Identification t of the associated track 3 Inserting grid mark g corresponding to target track point 1 After the current second inverted list, g may be identified from the grid 2 Delete track t in the current second inverted list 3 ", thereby updated grid identification g 2 The current second inverted list contains { track t } 1 }。
Based on the method, each track in the real-time index of the real-time track point can be ensured to be recorded in the current second inverted list of one grid mark at any moment as far as possible, and recording conflict is avoided.
Optionally, after the determination at 410 is yes, it may not be necessary to update the second inverted list of the grid identifiers corresponding to the target track points.
Referring now to fig. 5, fig. 5 illustrates a flowchart of yet another example of a grid indexing method 500 for trajectory data according to an embodiment of the present disclosure.
As shown in fig. 5, at 510, target history trace point information is obtained.
In this embodiment, the target history track point information includes identification of the target history track point, latitude information, longitude information, and acquisition time information of position information of the target history track point. In one example, identification, location information, and acquisition time information for a plurality of historical track points may be obtained. The location information may include latitude information and longitude information, among others. The target historical track point information may be selected from the plurality of obtained historical track point information in various ways.
At 520, the latitude information and the longitude information are mapped according to the range of the area to be indexed and the resolution of the initial grid, and the mapping position information of the target historical track point is obtained.
At 530, a time segment code corresponding to the target historical track point is obtained according to the acquisition time information and the pre-divided time segments.
In this embodiment, the acquisition time information corresponding to the target historical track point may be encoded according to a time section divided in advance, so as to obtain a time section code. In one example, the acquisition time information corresponding to the target historical track points may be 2022-11-10-11:08:17, the pre-divided time segments may be one day (24 hours), and the time segment codes may be used to represent offset days of the date indicated by the acquisition time information relative to 1970-01-01. The time segment code corresponding to the target history trace point may be 19306. Alternatively, the date indicated by the acquisition time information may be directly encoded as a time segment, which may be 2022-11-10, for example. It will be appreciated that the pre-divided time segment may also be one week, one hour, etc., and accordingly, the time segment code may be used to represent the number of offset weeks or offset hours of the date indicated by the acquisition time information relative to 1970-01-01.
At 540, the additional time information is mapped according to the pre-divided time segments and the initial grid resolution, resulting in mapped time information.
In this embodiment, the additional time information may be used to indicate other portions of the acquisition time information than the time zone. In one example, continuing with the above example, the pre-divided time segment may be one day and the corresponding time segment code may be 19306, then the additional time information may be 11:08:17 (Beijing time, corresponding to Greenwich time 3:08:17). The additional time information may then be converted into a number of seconds corresponding to the time stamp, i.e. 3 x 3600+8 x 60+17= 11297 seconds. And then the additional time information is mapped according to the corresponding seconds s and the initial grid resolution mu through the following formula, so as to obtain the mapping time information k.
Figure BDA0003980448210000101
In another example, the acquisition time information may be a timestamp (e.g., 1668049697), the pre-divided time segment may be one day, the corresponding time segment code D may be 19306, and the time mapping information k may be obtained from the timestamp and the initial grid resolution μ by the following formula.
Figure BDA0003980448210000102
It will be appreciated that the pre-divided time segment may also be one week, one hour, etc., and accordingly, the time segment code may be used to represent the number of offset weeks or offset hours of the date indicated by the acquisition time information relative to 1970-01-01. Therefore, the additional time information can be used for indicating other parts except the offset week number or the offset hour number in the acquisition time information, and the additional time information can be converted into the second number corresponding to the timestamp in a similar manner, so that the mapping time information is obtained, and the details are not repeated here.
At 550, the space filling curve is mapped according to the mapping position information and the mapping time information, and the ordering curve code is obtained.
In this embodiment, for a three-dimensional space formed by mapping position information including mapped latitude information and mapped longitude information and mapping time information, a three-dimensional grid (e.g., cube) divided in space may be ordered by using an extending order of space filling curves (e.g., Z ordering curves) to obtain an ordering curve code, so that a representation space of the cube grid (e.g., cube) may be mapped to one dimension.
At 560, a stereoscopic grid identifier corresponding to the target historical track point is obtained according to the time segment code and the ordering curve code.
In this embodiment, the obtained time segment codes and the ordering curve codes may be combined in various manners to obtain the stereoscopic grid identifier c corresponding to the target history track point, for example, the obtained time segment codes and the ordering curve codes may be combined, and the middle may be separated by a separator (for example, a space, a comma, @, etc.). For another example, the resulting time segment codes and the ordering curve codes may be further encoded to further build an index, as not limited herein.
At 570, a first inverted list of grid identifications corresponding to the target historical track points is obtained based on the identifications of the target historical track points.
It should be noted that, the steps 510, 520 and 570 may refer to the related descriptions of the steps 210, 220 and 240 in the embodiment of fig. 2, which are not repeated herein.
Based on this, a spatio-temporal cube index can be established in combination with acquisition time information of the target trajectory points. In the spatio-temporal cube index, two-dimensional coordinates may be used to represent a position in the geospatial space, and the change in the position of a plane in the geospatial space over time is represented by a one-dimensional time axis. It can be seen that the spatio-temporal cube index can be implemented to index the trace points in both the spatial and temporal dimensions.
Referring now to fig. 6, fig. 6 illustrates a flowchart of another example of a grid indexing method 600 for trajectory data according to an embodiment of the present disclosure.
As shown in fig. 6, at 610, target history trace point information is obtained.
At 620, the latitude information and the longitude information are mapped according to the range of the area to be indexed and the resolution of the initial grid, and mapping position information of the target historical track point is obtained.
At 630, a time segment code corresponding to the target historical track point is obtained according to the acquisition time information and the pre-divided time segments.
At 640, the additional time information is mapped according to the pre-divided time zone and the initial grid resolution, resulting in mapped time information.
At 650, mapping is performed using the space filling curve according to the mapping position information and the mapping time information, resulting in a sorting curve code.
At 660, merging the stereoscopic grids with sparse distribution of the historical track points according to the distribution of the historical track points in the range of the region to be indexed in each stereoscopic grid divided according to the resolution of the initial grid, so as to obtain the merged stereoscopic grid.
In this embodiment, the number of the history track points included in each of the stereoscopic grids divided according to the resolution of the initial grid may be determined by a preset threshold, and a plurality of (e.g., 8) neighboring stereoscopic grids including fewer history track points may be combined to obtain a combined stereoscopic grid.
At 670, a hierarchical encoding of the merged stereoscopic mesh is determined based on the number of merges of the merged stereoscopic mesh.
In the present embodiment, for example, the number of times of merging of the merged stereoscopic mesh may be determined as the hierarchical encoding of the merged stereoscopic mesh. In one example, for a merged stereoscopic mesh obtained after merging 1 time, its hierarchical coding may be 1. In one example, the hierarchical coding of an unmixed stereoscopic mesh (i.e., a stereoscopic mesh divided according to the initial mesh resolution) may be 0.
Based on the above, the non-uniformity of the real track point distribution, such as the track point number is generally smaller for the off-peak period and the non-hot spot region, so that the utilization rate of the storage space is not high due to the independent maintenance of the index item. By combining the three-dimensional grids with sparse track point distribution and endowing the space-time cubes with different sizes with corresponding level codes L, the space-time cubes with different sizes can be distinguished, the distribution of historical data can be adapted, and the utilization rate of the storage space can be effectively improved.
At 680, the ordering curve encoding corresponding to the merged stereoscopic mesh is determined based on the mesh merged resolution.
In this embodiment, the mesh post-merging resolution includes a resolution after performing a reduction process on the initial mesh resolution matching the number of times of merging of the post-merging stereoscopic mesh. In one example, the initial grid resolution may be μ. The mesh-merged resolution of the merged stereoscopic mesh obtained by performing n times of merging may be μ -n, and correspondingly, the hierarchical encoding of the merged stereoscopic mesh may be n. Wherein n is less than or equal to mu. According to the resolution of the mesh after merging, the sorting curve code corresponding to the merged stereoscopic mesh can be obtained according to the method similar to the method from step 620 to step 650. Alternatively, the original stereoscopic grids corresponding to the merged stereoscopic grid may share the sorting curve code corresponding to the merged stereoscopic grid.
At 690, according to the time zone code, the corresponding ordering curve code and the hierarchical code corresponding to the target historical track point, the grid identifier of the combined three-dimensional grid corresponding to the target historical track point is obtained and used as the three-dimensional grid identifier.
In this embodiment, the hierarchical code corresponding to the target history track point may be first determined. In one example, if the stereoscopic grids where the target history track points are located are not merged, the corresponding hierarchical coding may be 0. In one example, if the stereo grid where the target history track point is located is merged n times, the corresponding hierarchical code may be n. The resulting time segment codes, the corresponding ordering curve codes determined in step 680, and the above-described hierarchical codes may then be combined in various ways to obtain the stereoscopic grid identifications corresponding to the target historical track points. For example, the resulting time segment codes, corresponding ordering curve codes, and hierarchical codes may be combined, separated by separators (e.g., space, comma, @, etc.). For another example, the resulting time segment codes, corresponding ranking curve codes, and hierarchy codes may be further encoded to further build an index, as not limited herein.
In one example, the stereoscopic mesh identification may be (19306@15@0). The 19306, 15, 0 may be respectively a time segment code, a sorting curve code, and a hierarchy code of the stereoscopic grid where the target historical track point is located. It means that the above-mentioned stereoscopic mesh is a stereoscopic mesh divided according to the resolution of the initial mesh. In one example, the stereoscopic mesh identification may be (19306@5@1). The 19306, 5, 1 may be respectively a time segment code, a sorting curve code, and a hierarchy code of the stereoscopic grid where the target historical track point is located. It means that the above-mentioned stereoscopic mesh is a combined mesh obtained by combining the stereoscopic mesh divided according to the resolution of the initial mesh once.
With continued reference to fig. 7, fig. 7 shows a schematic diagram of one example of stereoscopic mesh identification for a mesh indexing method of trajectory data according to an embodiment of the present specification.
As shown in fig. 7, the initial grid resolution μmay be, for example, 2. The mapping latitude information i, the mapping longitude information j, and the mapping time information k corresponding to the initial grid 710 may be expressed as (0, 1). The ordering curve code Z of the initial grid 710 may be 1 and the hierarchical code L may be 0. While the initial mapping latitude information i, the mapping longitude information j, and the mapping time information k corresponding to the initial grids 721, 722 may be represented as (0, 2), (1, 0, 2), respectively. For the once-merged grid 720, the level code L is 1, the grid merged resolution μ is 1, and the updated mapping latitude information i, the mapping longitude information j, and the mapping time information k corresponding to the initial grids 721, 722 may be the mapping latitude information i, the mapping longitude information j, and the mapping time information k corresponding to the merged grid 720, that is, (0, 1). At this time, the hierarchical codes L corresponding to the initial meshes 721, 722 are 1. Thus, even in the case where the map latitude information i, the map longitude information j, and the map time information k are the same, different stereoscopic meshes can be distinguished by the hierarchical coding L
It will be appreciated that the time segment codes D of the merged grid may remain unchanged since the time segment codes D do not involve mapping according to the grid resolution. For example, the time segment codes D of both the initial mesh 710 and the merged mesh 720 may be 19163.
Returning to fig. 6, at 6100, a first inverted list of grid identifications corresponding to the target history track points is obtained according to the identifications of the target history track points.
In this embodiment, reference may be made to the description of step 570 in the previous embodiment.
In one example, the identification of the target historical track point may be inserted into a first inverted list of stereoscopic grid identifications corresponding to the target historical track point. If the identification of the target history trace point (pid=89), the first inverted list (stereo grid-trace point) L of the grid identification of the stereo grid where the target history trace point is located can be given CP Insert record in<“19306@15@0”,89>。
Optionally, in one example, the identifier of the track to which the target history track point belongs may be inserted into a second inverted list of stereoscopic grid identifiers corresponding to the target history track point. If the target history track point (pid=89) belongs to the track (tid=20), the target history track point can also be a second inverted list (stereo grid-track) L of grid identifications of the stereo grid where the target history track point is located CT Insert record in<“19306@15@0”,20>。
It should be noted that, the steps 610 to 650 may refer to the descriptions of the steps 510 to 550 in the embodiment of fig. 5, and are not repeated here.
With continued reference to fig. 8, fig. 8 shows a schematic diagram of one example of a grid index 800 for a grid index method of trajectory data according to an embodiment of the present disclosure.
As shown in FIG. 8, the grid index 800 may include a first inverted list L of grid identifications GP Which may be used to represent the relationship between grid identifications and trace point identifications. According to the relation list L between the track points and the track TP And a list L of relations between the current track point and the track to which it belongs TlP Grid index 800 may also include a second inverted list L of grid identifications GT Which may be used to represent the relationship between grid identifications and track identifications. The grid may comprise a two-dimensional grid as shown at 810.
Alternatively, the mesh may comprise a stereoscopic mesh as shown at 820. First inverted list L of three-dimensional grid marks CP Which may be used to represent the relationship between the stereoscopic mesh identity and the track point identity. According to the relation list L between the track points and the track TP Second inverted list L of three-dimensional grid identifiers CT Which may be used to represent the relationship between the stereoscopic mesh identity and the track identity.
Optionally, a positive arrangement table L of the stereoscopic grid identifications can also be established TC Which may be used to represent the relationship between the track identity and the stereoscopic grid identity.
With the grid index method for track data disclosed in fig. 1 to 8, efficient indexing of track data containing no time dimension or track data containing time dimension can be achieved by a two-dimensional grid index or a three-dimensional grid index. The established grid index is obtained based on the result of the track point information mapping and the space filling curve, so that the grid index can be accessed through the linear table, space occupation and time expenditure of intermediate nodes in the tree index structure are avoided, and the query performance is improved. The grid index described above may be applied to GIS systems, such as those based on large databases.
Referring now to fig. 9, fig. 9 illustrates a flowchart of one example of a grid index based trajectory data search method 900 according to an embodiment of the present disclosure.
As shown in fig. 9, at 910, information of a track point to be searched is acquired.
In this embodiment, the information of the track point to be searched may include an identifier of the track point to be searched.
Optionally, the information of the track point to be searched may further include corresponding acquisition time information.
At 920, a grid identification corresponding to the track point to be searched is determined using the inverted list of grid identifications.
In this embodiment, the inverted list of the grid marks may be obtained by the grid indexing method for track data as described in the foregoing fig. 1 to 8. In one example, the inverted list may include a first inverted list. In one example, the inverted list may further include a second inverted list.
By using the track data searching method based on the grid index disclosed in fig. 9, real-time track data and historical track data can be indexed through interfaces provided by the inverted list of the two-dimensional grid marks and/or the three-dimensional grid marks, so that the query efficiency of the track data can be improved.
Fig. 10 shows a block diagram of one example of a grid indexing apparatus 1000 for trajectory data according to an embodiment of the present specification. The apparatus embodiment may correspond to the method embodiments shown in fig. 2-8, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 10, the grid index device 1000 for track data may include a track point information acquisition unit 1010, a position mapping unit 1020, a curve encoding unit 1030, and a first index establishing unit 1040.
And a track point information acquisition unit 1010 configured to acquire target track point information including an identification of the target track point, latitude information, and longitude information. The operation of the track point information acquisition unit 1010 may refer to the operation of 210 described above in fig. 2.
And a position mapping unit 1020 configured to map the latitude information and the longitude information according to the range of the area to be indexed and the initial grid resolution, so as to obtain the mapped position information of the target track point, wherein the mapped position information comprises mapped latitude information and mapped longitude information. The operation of the location mapping unit 1020 may refer to the operation of 220 described above with respect to fig. 2.
And the curve coding unit 1030 is configured to map by using a space filling curve according to the mapping position information to obtain a grid identifier corresponding to the target track point. The operation of the curve encoding unit 1030 may refer to the operation of 230 described above with reference to fig. 2.
The first index establishing unit 1040 is configured to obtain, according to the identifier of the target track point, a first inverted list of grid identifiers corresponding to the target track point. The first inverted list is used for representing the relation between the grid identification and the identification of the track points contained in the grid indicated by the grid identification. The operation of the first index establishing unit 1040 may refer to the operation of 240 described above in fig. 2.
With further reference to fig. 11, fig. 11 shows a block diagram of yet another example of a grid indexing apparatus 1100 for trajectory data according to an embodiment of the present disclosure.
As shown in fig. 11, the grid index device 1100 for track data may include a track point information acquisition unit 1110, a position mapping unit 1120, a curve encoding unit 1130, a first index establishing unit 1140, and a second index establishing unit 1150.
In this embodiment, the target track point information may further include an identifier of a track to which the target track point belongs.
The operations of the above-described track point information acquisition unit 1110, position mapping unit 1120, curve encoding unit 1130, and first index establishing unit 1140 may refer to the operations of steps 310 to 340 described above with reference to fig. 3.
The second index creating unit 1150 is configured to obtain a second inverted list of grid identifiers corresponding to the target track points according to the identifiers of the tracks to which the target track points belong. The second inverted list is used for representing the relation between the grid identification and the identification of the track point contained in the grid indicated by the grid identification. The operation of the second index establishing unit 1150 may refer to the operation of 350 described above in fig. 3.
In one example, the target track points include real-time track points. The second index creating unit 1150 is configured to: and responding to the current second inverted list of the grid identifications corresponding to the target track points, wherein the current second inverted list does not contain the identifications of the tracks of the target track points, inserting the identifications of the tracks of the target track points into the current second inverted list of the grid identifications corresponding to the target track points, and deleting the identifications of the tracks of the target track points from the current second inverted list of the grid identifications of other grids nearby the grid indicated by the grid identifications corresponding to the target track points. The above description may be referred to the corresponding description in the embodiment of fig. 4 above.
Referring now to fig. 12, fig. 12 illustrates a block diagram of yet another example of a grid indexing apparatus 1200 for trajectory data according to an embodiment of the present disclosure.
As shown in fig. 12, the grid index device 1200 for track data may include a track point information acquisition unit 1210, a position mapping unit 1220, a time encoding unit 1230, an additional time mapping unit 1240, a curve encoding unit 1250, and a first index establishing unit 1260.
And the time coding unit 1230 is configured to obtain a time section code corresponding to the target historical track point according to the acquired time information and the time section divided in advance. The operation of the time encoding unit 1230 may refer to the operation of 530 described above in fig. 5.
An additional time mapping unit 1240, configured to map additional time information according to the pre-divided time segments and the initial grid resolution, so as to obtain mapping time information, where the additional time information is used to indicate other parts of the acquisition time information except for the time segments. The operation of the additional time mapping unit 1240 may refer to the operation of 540 described above in fig. 5.
The curve encoding unit 1250 includes: the curve encoding module 1251 is configured to map with a space filling curve according to the mapping position information and the mapping time information, so as to obtain an ordering curve encoding. The grid identification determining module 1252 is configured to obtain a stereoscopic grid identification corresponding to the target historical track point according to the time section code and the ordering curve code. The operation of the curve encoding module 1251, the grid identification determination module 1252 may refer to the operation of 550, 560 described above with respect to fig. 5.
The operations of the track point information acquisition unit 1210, the position mapping unit 1220, and the first index establishing unit 1260 may refer to the operations of 510, 520, 570 described above in fig. 5.
In one example, the grid index apparatus 1200 for track data may further include a second index creating unit 1270. The specific operation of the second index creating unit 1270 may be described with reference to the second index creating unit 1150 in the embodiment of fig. 11 above.
With continued reference to fig. 13, fig. 13 shows a block diagram of another example of a grid indexing apparatus 1300 for trajectory data according to an embodiment of the present disclosure.
As shown in fig. 13, the mesh indexing device 1300 for track data may include a track point information acquisition unit 1310, a position mapping unit 1320, a time encoding unit 1330, an additional time mapping unit 1340, a curve encoding unit 1350, a mesh merging unit 1360, a hierarchy encoding unit 1370, a merging curve encoding unit 1380, and a first index creating unit 1390.
And a grid merging unit 1360 configured to merge the stereoscopic grids with sparse distribution of the history track points according to the distribution of the history track points in the range of the region to be indexed in each stereoscopic grid divided according to the resolution of the initial grid, so as to obtain a merged stereoscopic grid. The operation of the mesh merging unit 1360 may refer to the operation of 660 described above with respect to fig. 6.
The hierarchical coding unit 1370 is configured to determine a hierarchical coding of the merged stereoscopic mesh according to the merging times of the merged stereoscopic mesh. The operation of the hierarchical encoding unit 1370 may refer to the operation of 670 described above with respect to fig. 6.
A merging curve encoding unit 1380 configured to determine, according to the resolution of the merged meshes, a sorting curve encoding corresponding to the merged stereoscopic meshes. The grid resolution after combination comprises a resolution after reduction processing which is matched with the combination times of the three-dimensional grid after combination for the initial grid resolution. The operation of the merging-curve encoding unit 1380 may refer to the operation 680 described above with respect to fig. 6.
The curve encoding unit 1350 includes: a curve encoding module 1351 and a grid identification determination module 1352. The grid identification determination module 1352 is further configured to: and obtaining the grid identification of the combined three-dimensional grid corresponding to the target historical track point as a three-dimensional grid identification according to the time section code, the corresponding ordering curve code and the corresponding hierarchical code of the target historical track point. The operation of the grid identification determination module 1352 may refer to the operation of 690 described above with respect to fig. 6.
The operations of the track point information acquisition unit 1310, the position mapping unit 1320, the time encoding unit 1330, the additional time mapping unit 1340, the curve encoding module 1351, and the first index creation unit 1390 may refer to the operations of 610, 620, 630, 640, 650, 6100 described above in fig. 6.
In one example, the first index establishing unit 1390 is further configured to: and inserting the mark of the target history track point into a first inverted list of the stereoscopic grid mark corresponding to the target history track point. The operation of the first index creating unit 1390 may refer to the operation in the corresponding example described in 6100 described above in fig. 6.
In one example, the grid index apparatus 1300 for track data may further include a second index creating unit 13100. The specific operation of the second index creating unit 13100 may be described with reference to the second index creating unit 1150 in the embodiment of fig. 11 above.
In one example, the second index establishing unit 13100 is further configured to: and inserting the mark of the track to which the target historical track point belongs into a second inverted list of the stereoscopic grid mark corresponding to the target historical track point. The operation of the second index creating unit 13100 may refer to the operation in the corresponding example described in 6100 described above in fig. 6.
Fig. 14 shows a block diagram of one example of a grid index based trajectory data search device 1400 according to an embodiment of the present disclosure. The embodiment of the apparatus may correspond to the embodiment of the method shown in fig. 9, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 14, the grid index apparatus 1400 for trajectory data may include a trajectory point information acquisition unit 1410 to be searched and a search unit 1420.
The to-be-searched track point information obtaining unit 1410 is configured to obtain information of the to-be-searched track point. The information of the track points to be searched comprises identification of the track points to be searched. The operation of the to-be-searched trajectory point information acquisition unit 1410 may refer to the operation of 910 described above in fig. 9.
And a search unit 1420 configured to determine a grid identifier corresponding to the trajectory point to be searched using the inverted list of grid identifiers. Wherein, the inverted list of the grid identifications is obtained by the grid indexing method for track data as described in the embodiments of fig. 1-8. The operation of the search unit 1420 may refer to the operation of 920 described above with respect to fig. 9.
Embodiments of a grid index method and apparatus for track data, and a track data search method and apparatus based on a grid index according to embodiments of the present specification are described above with reference to fig. 1 to 14.
The grid indexing device for track data and the track data searching device based on the grid index according to the embodiments of the present disclosure may be implemented in hardware, or may be implemented in software or a combination of hardware and software. Taking software implementation as an example, the device in a logic sense is formed by reading corresponding computer program instructions in a memory into a memory by a processor of a device where the device is located. In the present embodiment, the grid index device for track data and the track data search device based on the grid index may be implemented using an electronic device, for example.
Fig. 15 shows a schematic diagram of a grid indexing apparatus 1500 for trajectory data according to an embodiment of the present description.
As shown in fig. 15, the grid index device 1500 for trace data may include at least one processor 1510, memory (e.g., non-volatile memory) 1520, memory 1530, and communication interface 1540, and the at least one processor 1510, memory 1520, memory 1530, and communication interface 1540 are connected together via a bus 1550. The at least one processor 1510 executes at least one computer-readable instruction (i.e., the elements described above as being implemented in software) stored or encoded in memory.
In one embodiment, computer-executable instructions are stored in memory that, when executed, cause the at least one processor 1510 to: acquiring target track point information, wherein the target track point information comprises identification, latitude information and longitude information of a target track point; mapping the latitude information and the longitude information according to the range of the area to be indexed and the resolution of the initial grid to obtain the mapping position information of the target track point, wherein the mapping position information comprises mapped latitude information and mapped longitude information; mapping is carried out according to the mapping position information by utilizing a space filling curve, and grid identifications corresponding to the target track points are obtained; and obtaining a first inverted list of grid identifications corresponding to the target track points according to the identifications of the target track points, wherein the first inverted list is used for representing the relation between the grid identifications and identifications of track points contained in grids indicated by the grid identifications.
It should be appreciated that the computer-executable instructions stored in the memory, when executed, cause the at least one processor 1510 to perform the various operations and functions described above in connection with fig. 1-8 in various embodiments of the present specification.
Fig. 16 shows a schematic diagram of a trajectory data search device 1600 based on grid index according to an embodiment of the present specification.
As shown in fig. 16, the grid index based trajectory data search device 1600 may include at least one processor 1610, a memory (e.g., a non-volatile memory) 1620, a memory 1630, and a communication interface 1640, and the at least one processor 1610, the memory 1620, the memory 1630, and the communication interface 1640 are connected together via a bus 1650. At least one processor 1610 executes at least one computer-readable instruction stored or encoded in memory (i.e., the elements described above that are implemented in software).
In one embodiment, computer-executable instructions are stored in memory that, when executed, cause the at least one processor 1610 to: acquiring information of track points to be searched, wherein the information of the track points to be searched comprises identification of the track points to be searched; and determining grid identifications corresponding to the track points to be searched by using an inverted list of the grid identifications, wherein the inverted list of the grid identifications is obtained by the grid indexing method for track data.
It should be appreciated that the computer-executable instructions stored in the memory, when executed, cause the at least one processor 1610 to perform the various operations and functions described above in connection with fig. 9 in various embodiments of the present description.
According to one embodiment, a program product, such as a computer readable medium, is provided. The computer-readable medium may have instructions (i.e., the elements described above implemented in software) that, when executed by a computer, cause the computer to perform the various operations and functions described above in connection with fig. 1-9 in various embodiments of the present specification.
In particular, a system or apparatus provided with a readable storage medium having stored thereon software program code implementing the functions of any of the above embodiments may be provided, and a computer or processor of the system or apparatus may be caused to read out and execute instructions stored in the readable storage medium.
In this case, the program code itself read from the readable medium may implement the functions of any of the above-described embodiments, and thus the machine-readable code and the readable storage medium storing the machine-readable code form part of the present invention.
Computer program code required for operation of portions of the present description may be written in any one or more programming languages, including an object oriented programming language such as Java, scala, smalltalk, eiffel, JADE, emerald, C ++, c#, VB, NET, python and the like, a conventional programming language such as C language, visual Basic 2003, perl, COBOL2002, PHP and ABAP, a dynamic programming language such as Python, ruby and Groovy, or other programming languages and the like. The program code may execute on the user's computer or as a stand-alone software package, or it may execute partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any form of network, such as a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet), or the connection may be made to the cloud computing environment, or for use as a service, such as software as a service (SaaS).
Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (e.g., CD-ROMs, CD-R, CD-RWs, DVD-ROMs, DVD-RAMs, DVD-RWs), magnetic tapes, nonvolatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer or cloud by a communications network.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Not all steps or units in the above-mentioned flowcharts and system configuration diagrams are necessary, and some steps or units may be omitted according to actual needs. The order of execution of the steps is not fixed and may be determined as desired. The apparatus structures described in the above embodiments may be physical structures or logical structures, that is, some units may be implemented by the same physical entity, or some units may be implemented by multiple physical entities, or may be implemented jointly by some components in multiple independent devices.
The term "exemplary" used throughout this specification means "serving as an example, instance, or illustration," and does not mean "preferred" or "advantageous over other embodiments. The detailed description includes specific details for the purpose of providing an understanding of the described technology. However, the techniques may be practiced without these specific details. In some instances, well-known structures and devices are shown in block diagram form in order to avoid obscuring the concepts of the described embodiments.
The alternative implementation manner of the embodiment of the present disclosure has been described in detail above with reference to the accompanying drawings, but the embodiment of the present disclosure is not limited to the specific details of the foregoing implementation manner, and various simple modifications may be made to the technical solution of the embodiment of the present disclosure within the scope of the technical concept of the embodiment of the present disclosure, and all the simple modifications belong to the protection scope of the embodiment of the present disclosure.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (16)

1. A grid indexing method for track data, comprising:
acquiring target track point information, wherein the target track point information comprises identification, latitude information and longitude information of a target track point;
mapping the latitude information and the longitude information according to the range of the area to be indexed and the resolution of the initial grid to obtain the mapping position information of the target track point, wherein the mapping position information comprises mapped latitude information and mapped longitude information;
mapping is carried out according to the mapping position information by utilizing a space filling curve, and grid identifications corresponding to the target track points are obtained; and
and obtaining a first inverted list of grid identifications corresponding to the target track points according to the identifications of the target track points, wherein the first inverted list is used for representing the relation between the grid identifications and the identifications of the track points contained in the grid indicated by the grid identifications.
2. The grid indexing method of claim 1, wherein the target track point information further comprises an identification of a track to which the target track point belongs,
the method further comprises the steps of:
and obtaining a second inverted list of grid identifications corresponding to the target track points according to the identifications of the tracks of the target track points, wherein the second inverted list is used for representing the relationship between the grid identifications and the identifications of the tracks of the track points contained in the grid indicated by the grid identifications.
3. The grid indexing method of claim 2, wherein the target track points comprise real-time track points,
the obtaining the second inverted list of the grid identifications corresponding to the target track points according to the identifications of the tracks to which the target track points belong comprises the following steps:
responding to the identification of the track to which the target track point belongs in the current second inverted list of the grid identifications corresponding to the target track point,
inserting the mark of the belonging track of the target track point into a current second inverted list of grid marks corresponding to the target track point, and
and deleting the identification of the track to which the target track point belongs from the current second inverted list of the grid identifications of other grids nearby the grid indicated by the grid identifications corresponding to the target track point.
4. The grid indexing method of claim 2, wherein the target track points comprise target history track points, the target track point information further comprises acquisition time information of position information of the target history track points, the grid identification comprises a stereoscopic grid identification,
before the mapping is performed according to the mapping position information by using the space filling curve to obtain the grid mark corresponding to the target track point, the method further comprises the following steps:
Obtaining a time section code corresponding to the target historical track point according to the acquired time information and the time section divided in advance;
mapping additional time information according to the pre-divided time zone and the initial grid resolution to obtain mapping time information, wherein the additional time information is used for indicating other parts except the time zone in the acquisition time information,
the mapping by using the space filling curve according to the mapping position information, and the obtaining of the grid mark corresponding to the target track point comprises the following steps:
mapping by using a space filling curve according to the mapping position information and the mapping time information to obtain a sequencing curve code;
and obtaining the stereoscopic grid identification corresponding to the target historical track point according to the time section code and the ordering curve code.
5. The grid indexing method of claim 4, wherein prior to said deriving a stereoscopic grid identification from said time segment encoding and said ordering curve encoding, said method further comprises:
combining the stereoscopic grids with sparse historical track point distribution according to the distribution of the historical track points in the range of the region to be indexed in each stereoscopic grid divided according to the resolution of the initial grid, so as to obtain a combined stereoscopic grid;
Determining the hierarchical coding of the merged stereoscopic grid according to the merging times of the merged stereoscopic grid;
determining the ordering curve codes corresponding to the merged stereoscopic grids according to the grid merged resolution, wherein the grid merged resolution comprises the resolution after the reduction processing which is matched with the merging times of the merged stereoscopic grids on the initial grid resolution,
the step of obtaining the stereoscopic grid identification corresponding to the target historical track point according to the time section code and the ordering curve code comprises the following steps:
and obtaining the grid identification of the combined three-dimensional grid corresponding to the target historical track point as a three-dimensional grid identification according to the time section code, the corresponding ordering curve code and the corresponding hierarchical code of the target historical track point.
6. The grid indexing method as claimed in claim 4 or 5, wherein the obtaining the first inverted list of the grid identifications according to the identifications of the target track points comprises:
inserting the identification of the target history track point into a first inverted list of the stereoscopic grid identification,
the obtaining the second inverted list of the grid marks according to the marks of the tracks to which the target track points belong comprises the following steps:
And inserting the mark of the track to which the target history track point belongs into a second inverted list of the three-dimensional grid mark.
7. A track data searching method based on grid index comprises the following steps:
acquiring information of track points to be searched, wherein the information of the track points to be searched comprises identification of the track points to be searched;
determining grid identifications corresponding to the track points to be searched by using an inverted list of grid identifications, wherein the inverted list of grid identifications is obtained by the grid indexing method for track data according to any one of claims 1 to 6.
8. A grid indexing apparatus for track data, comprising:
a track point information acquisition unit configured to acquire target track point information, wherein the target track point information includes an identification of a target track point, latitude information, and longitude information;
the position mapping unit is configured to map the latitude information and the longitude information according to the range of the area to be indexed and the initial grid resolution to obtain the mapping position information of the target track point, wherein the mapping position information comprises mapped latitude information and mapped longitude information;
The curve coding unit is configured to map by using a space filling curve according to the mapping position information to obtain a grid identifier corresponding to the target track point; and
the first index establishing unit is configured to obtain a first inverted list of grid identifications corresponding to the target track points according to the identifications of the target track points, wherein the first inverted list is used for representing the relation between the grid identifications and identifications of track points contained in grids indicated by the grid identifications.
9. The grid indexing apparatus of claim 8, wherein the target track point information further comprises an identification of a track to which the target track point belongs,
the apparatus further comprises:
the second index establishing unit is configured to obtain a second inverted list of grid identifications corresponding to the target track points according to identifications of tracks to which the target track points belong, wherein the second inverted list is used for representing the relationship between the grid identifications and identifications of tracks to which the track points contained in the grid indicated by the grid identifications belong.
10. The grid indexing apparatus of claim 9, wherein the target track points comprise real-time track points,
The second index creating unit is configured to:
responding to the identification of the track to which the target track point belongs in the current second inverted list of the grid identifications corresponding to the target track point,
inserting the mark of the belonging track of the target track point into a current second inverted list of grid marks corresponding to the target track point, and
and deleting the identification of the track to which the target track point belongs from the current second inverted list of the grid identifications of other grids nearby the grid indicated by the grid identifications corresponding to the target track point.
11. The grid indexing apparatus of claim 9, wherein the target track points comprise target history track points, the target track point information further comprises acquisition time information of location information of the target history track points, the grid identification comprises a stereoscopic grid identification,
the apparatus further comprises:
the time coding unit is configured to obtain a time section code corresponding to the target historical track point according to the acquired time information and the time section divided in advance;
an additional time mapping unit configured to map additional time information according to the pre-divided time segments and the initial grid resolution to obtain mapping time information, wherein the additional time information is used for indicating other parts except the time segments in the acquisition time information,
The curve encoding unit includes:
the curve coding module is configured to map by using a space filling curve according to the mapping position information and the mapping time information to obtain a sequencing curve code;
and the grid identification determining module is configured to obtain a stereoscopic grid identification corresponding to the target historical track point according to the time zone code and the ordering curve code.
12. The grid indexing apparatus of claim 11, wherein the apparatus further comprises:
the grid merging unit is configured to merge the stereoscopic grids with sparse distribution of the historical track points according to the distribution of the historical track points in the range of the region to be indexed in each stereoscopic grid divided according to the resolution of the initial grid, so as to obtain merged stereoscopic grids;
a hierarchy encoding unit configured to determine a hierarchy encoding of the merged stereoscopic mesh according to a merging number of the merged stereoscopic mesh;
a merging curve encoding unit configured to determine a sorting curve encoding corresponding to the merged stereoscopic grid according to a grid merged resolution, wherein the grid merged resolution includes a reduced resolution that matches an initial grid resolution with a merging number of times of the merged stereoscopic grid;
The grid identification determination module is further configured to:
and obtaining the grid identification of the combined three-dimensional grid corresponding to the target historical track point as a three-dimensional grid identification according to the time section code, the corresponding ordering curve code and the corresponding hierarchical code of the target historical track point.
13. The grid indexing apparatus of claim 11 or 12, wherein the first index establishing unit is further configured to:
inserting the identification of the target history track point into a first inverted list of the stereoscopic grid identification,
the second index establishing unit is further configured to:
and inserting the mark of the track to which the target history track point belongs into a second inverted list of the three-dimensional grid mark.
14. A trajectory data search device based on a grid index, comprising:
the information acquisition unit of the track points to be searched is configured to acquire information of the track points to be searched, wherein the information of the track points to be searched comprises identification of the track points to be searched;
a search unit configured to determine a grid identification corresponding to the track point to be searched using an inverted list of grid identifications, wherein the inverted list of grid identifications is obtained by the grid indexing method for track data according to any one of claims 1 to 6.
15. A computer readable storage medium storing a computer program which when executed causes a processor to perform the grid index method for track data as claimed in any one of claims 1 to 6 or the grid index-based track data search method as claimed in claim 7.
16. A computer program product comprising a computer program which, when executed, causes a processor to perform the grid index method for track data as claimed in any one of claims 1 to 6 or the grid index based track data search method as claimed in claim 7.
CN202211549455.XA 2022-12-05 2022-12-05 Grid indexing method for track data, track data searching method and track data searching device Pending CN116108120A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211549455.XA CN116108120A (en) 2022-12-05 2022-12-05 Grid indexing method for track data, track data searching method and track data searching device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211549455.XA CN116108120A (en) 2022-12-05 2022-12-05 Grid indexing method for track data, track data searching method and track data searching device

Publications (1)

Publication Number Publication Date
CN116108120A true CN116108120A (en) 2023-05-12

Family

ID=86262134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211549455.XA Pending CN116108120A (en) 2022-12-05 2022-12-05 Grid indexing method for track data, track data searching method and track data searching device

Country Status (1)

Country Link
CN (1) CN116108120A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118113705A (en) * 2024-04-29 2024-05-31 杭州海康威视数字技术股份有限公司 Index information generation method, device and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118113705A (en) * 2024-04-29 2024-05-31 杭州海康威视数字技术股份有限公司 Index information generation method, device and equipment

Similar Documents

Publication Publication Date Title
CN106649656B (en) Database-oriented space-time trajectory big data storage method
CN109165215B (en) Method and device for constructing space-time index in cloud environment and electronic equipment
US9733094B2 (en) Hybrid road network and grid based spatial-temporal indexing under missing road links
US9189280B2 (en) Tracking large numbers of moving objects in an event processing system
US9503863B2 (en) Systems and methods to identify home addresses of mobile devices
US9223801B2 (en) Information management method and information management apparatus
PH12014501098B1 (en) Method and server for searching for nearby user in social networking services
US11429581B2 (en) Spatial-temporal query for cognitive IoT contexts
CN108205562B (en) Positioning data storage and retrieval method and device for geographic information system
US11860846B2 (en) Methods, systems and apparatus to improve spatial-temporal data management
CN110298687B (en) Regional attraction assessment method and device
CN111258978A (en) Data storage method
CN109145225B (en) Data processing method and device
US8849792B2 (en) Information management method and information management apparatus
US20160019248A1 (en) Methods for processing within-distance queries
CN116860905A (en) Space unit coding generation method of city information model
CN116108120A (en) Grid indexing method for track data, track data searching method and track data searching device
Zhou et al. An efficient access model of Massive spatiotemporal Vehicle trajectory data in Smart City
CN113688193A (en) Track data storage and indexing method and device, electronic equipment and readable medium
CN107590260B (en) Point cloud data real-time retrieval method and system
Chiang et al. Inferring distant-time location in low-sampling-rate trajectories
US9436715B2 (en) Data management apparatus and data management method
Jiang et al. MOIST: A scalable and parallel moving object indexer with school tracking
Bashir et al. An intelligent linear time trajectory data compression framework for smart planning of sustainable metropolitan cities
Xiong et al. Distributed or Centralized: An Experimental Study on Spatial Database Systems for Processing Big Trajectory Data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination