Efficient spatial nearest neighbor query method for highway networks

A query method and nearest-neighbor technology, applied in special data processing applications, instruments, electrical digital data processing, etc., can solve problems such as large query time and increased overhead

Active Publication Date: 2014-02-05
HENAN UNIVERSITY
4 Cites 9 Cited by

AI-Extracted Technical Summary

Problems solved by technology

The time complexity of using this type of index to search the neighborhood of the query point in the road network is O(log N), where N is the total number of sub-segments, which will take a lot of query time; and, to find the query point in the road network After the neighborhood of , the...
View more

Method used

[0095] The offline index building stage serves the real-time spatial query processing stage, and is used to improve the response speed of the spatial nearest neighbor query in the real-time spatial processing stage. The offline index building stage is responsible for index building. In the present invention, three hash tables are created in the offline index building stage: hashmap_1, hashmap_2, and hashmap_3. Among them, hashmap_1 is used to store the identifier of the data object, that is, the correspondence between the oid of the data...
View more

Abstract

The invention discloses an efficient spatial nearest neighbor query method for highway networks. The method includes the steps of A, storing all data objects and correspondences of coordinates thereof in a Hash table 1; B, calculating spatial nearest neighbors of apexes of a highway, and storing the highway apexes, the nearest neighbors and nearest distances into a Hash table 2; C, dividing a two-dimensional space into a plurality of grid units by a virtual grid, and numbering the grid units; D, calculating and storing correspondences between the grid units and the data objects or highway apexes, and storing the correspondences into a Hash table 3; E, calculating the grid units where query points locate and determining numbers of the grid units; F, searching for the data objects that the grid units correspond to, and calculating the nearest data objects and returning the nearest data objects to users. The method has the advantages that time complexity in spatial nearest neighbor query for highway networks can be reduced, query efficiency is improved greatly, and neighbor query time is shortened.

Application Domain

Geographical information databasesSpecial data processing applications

Technology Topic

Near neighborTime complexity +4

Image

  • Efficient spatial nearest neighbor query method for highway networks
  • Efficient spatial nearest neighbor query method for highway networks
  • Efficient spatial nearest neighbor query method for highway networks

Examples

  • Experimental program(1)

Example Embodiment

[0042] like figure 1 As shown, the highway network efficient spatial nearest neighbor query method of the present invention comprises the following steps, wherein A, B, C, and D steps are used in the offline index building stage; E, F steps are used in the real-time spatial query processing stage:
[0043] A: The user provides input data including road network information and data object information on the road network, creates a hash table hashmap_1 based on the input data, and stores the correspondence between all data objects and their coordinate values ​​in the hash table hashmap_1; the hash table The primary key of hashmap_1 is the unique identifier oid of the data object, and the value is the coordinate value of the data object.
[0044] B: Calculate the spatial nearest neighbors of each vertex of each road, create a hash table hashmap_2, and store the road vertex, the nearest neighbor and the nearest distance of the vertex on the spatial network in the hash table hashmap_2; the hash table hashmap_2 The primary key is the unique identifier vid of the road vertex, and its value is the nearest neighbor oid of the vertex on the space network and the shortest distance s between vid and the oid.
[0045] C: Use the virtual grid to divide the two-dimensional space into several square grid units of equal size, determine the side length of the grid unit, and number the virtual grid; when performing step C, follow the specific steps below:
[0046] C1: Use the virtual grid to divide the two-dimensional space into several square grid units of equal size, through the formula (1) Determine the side length of the grid unit, where l is the side length of the grid unit, let d 1 is the length of the shortest road among all roads, let d 2 is the minimum value of the distance between all adjacent two data objects on the road with data objects, d is d 1 and d 2 The minimum value in , ξ=10 -9;
[0047] C2: Let R be the minimum bounding rectangle formed by all the data objects in the data set, and the vertex of the lower left corner of R (x 0 ,y 0 ) as the starting point, establish a virtual grid, and start from the coordinates (x 0 ,y 0 ) starts from the grid unit where the coordinate point (x, y) is located, and numbers the grid unit incrementally from left to right and from bottom to top; the formula for calculating the number of the grid unit where the coordinate point (x, y) is located is:
[0048] id = m * ( ceil ( y - y 0 l ) - 1 ) + ceil ( x - x 0 l ) - 1 ; - - - ( 2 )
[0049] Among them, id is the number of the grid unit where the coordinate point (x, y) is located, m is the number of grid units contained in each row of the grid, and ceil is the upper integer function.
[0050] D: Calculate the sub-section contained in each grid unit and store the corresponding relationship between the grid unit and the data object or road vertex controlling the sub-section, and store the result in the hash table hashmap_3; when executing step D , follow the specific steps below:
[0051] D1: For any road, divide it into several sub-sections; for any road, start from one of its vertices, first insert the vertex into the point set ps; then take out the data objects on the road and insert them In the point set ps; for the line segment composed of two adjacent data objects in the point set ps, divide it into two sub-line segments and insert them into the sub-line segment set rs respectively; finally insert another vertex of the road into the point set ps middle.
[0052] D2: For any sub-segment, use the following method to calculate the grid unit intersecting with the sub-segment: Let the two ends of the sub-segment be v 1 and v 2 , computing side v 1 → 2 Intersection with vertical and horizontal gridlines; according to v 1 to v 2 Arrange the above intersection points and v in order according to the size relationship of the abscissa value 1 and v 2 A set of points composed of two vertices; for all points in the sorted set, calculate the midpoints of all adjacent two points in the set in turn, and use the formula (2) in step C2 to calculate the midpoint for each midpoint The number of the grid unit where the midpoint is located, the set of grid units where the midpoint is located is the edge v 1 → 2 Intersecting grid cells.
[0053] D3: Calculate all the sub-sections contained in each grid unit and the data object collections that control these sub-sections, and store the corresponding relationship between the grid unit number, the data object collection and the slope of the sub-section where the data object is located in the hash In the table hashmap_3, the key of hashmap_3 is the number of the grid unit, and the value corresponding to the key is a set, and each element in the set is the oid of each data object controlling the grid unit and the child of the data object. The slope of the road segment. If the point controlling the grid unit is a road vertex, store the vid of the vertex and the slope of the sub-road section as an element in the set corresponding to the grid unit in hashmap_3.
[0054] E: Use the formula (2) in step C2 to calculate the grid unit where the query point is located, and determine the number of the grid unit corresponding to the query point position;
[0055] F: Find the data object corresponding to the grid unit according to the grid unit number calculated in step E, and calculate the data object closest to the query point and return it to the user. When performing step F, follow the specific steps below:
[0056] F1: According to the grid unit number calculated in step E, look up the slope of each sub-section corresponding to the grid unit and the oid of the data object controlling the sub-section or the vid of the road vertex in the hash table hashmap_3;
[0057] F2: Calculate the slope of the straight line connecting the query point and the first object on each sub-section; if the calculated slope is equal to the slope of a sub-section corresponding to the grid unit, the query point is located here on the corresponding sub-segment; if the calculated slope is equal to the slope of several sub-segments corresponding to the grid unit, then calculate the coordinate position relationship between the query point and the two ends of each sub-segment to determine the query point where the subsection is located;
[0058] F3: Determine whether there is a data object on the road where the query point is located, if yes, go to step F4; if not, go to step F5;
[0059] F4: If the two endpoints of the sub-section where the query point is located are two data objects respectively, calculate the distance between the two data objects and the query point, and return the data object closest to the query point as the query result to For the user, if the distance between the two data objects and the query point is the same, the two data objects will be returned to the user as query results at the same time;
[0060] If the two endpoints of the sub-road segment where the query point is located are a data object and a road vertex, the distance r between the query point and the data object is calculated first 1 and the distance r from the query point to the road vertex 2 , and then query the nearest neighbor and the nearest distance s of the road vertex on the space network from the hash table hashmap_2 2 , and finally compare r 1 with r2 +s 2 the size of r 1 is smaller, the data object corresponding to the end point of the sub-section where the query point is located will be returned to the user as the query result; if r 2 +s 2 is smaller, then query the data object corresponding to the nearest neighbor of the road vertex on the space network from the hash table hashmap_2 and return it to the user as the query result; if r 1 with r 2 +s 2 are the same size, then at the same time, the data object corresponding to the endpoint of the sub-section where the query point is located and the data object corresponding to the nearest neighbor of the road vertex on the spatial network are queried from the hash table hashmap_2 and returned to the user as query results at the same time;
[0061] F5: If the two endpoints of the road where the query point is located are two road vertices, first calculate the distance r from the query point to the first road vertex 3 and the distance r from the query point to the second road vertex 4 , and then query the nearest neighbor and the nearest distance s of the first road vertex on the space network from the hash table hashmap_2 3 , the nearest neighbor of the second road vertex on the space network and the nearest distance s 4 , calculate r 3 +s 3 with r 4 +s 4 the size of r 3 +s 3 is smaller, the data object corresponding to the nearest neighbor of the first road vertex on the space network queried from the hash table hashmap_2 will be returned to the user as the query result; if r 4 +s 4 is smaller, the data object corresponding to the nearest neighbor of the second road vertex on the space network queried from the hash table hashmap_2 will be returned to the user as the query result; if r 3 +s 3 with r 4 +s 4 are the same size, then at the same time, the data object corresponding to the nearest neighbor of the first road vertex queried from the hash table hashmap_2 on the space network, and the second road vertex queried from the hash table hashmap_2 in the space The data object corresponding to the nearest neighbor on the network is returned to the user as the query result at the same time.
[0062] The efficient spatial nearest neighbor query method of the road network described in the present invention is explained below in conjunction with specific embodiments:
[0063] A: The user provides input data including road network information and data object information on the road network, creates a hash table hashmap_1 based on the input data, and stores the correspondence between all data objects and their coordinate values ​​in the hash table hashmap_1; the hash table The primary key of hashmap_1 is the unique identifier oid of the data object, and the value is the coordinate value of the data object. In this way, given the oid of the data object, the coordinate position of the data object can be obtained by looking up the corresponding value in the hash table hashmap_1.
[0064] B: Calculate the spatial nearest neighbors of each vertex of each road, create a hash table hashmap_2, and store the road vertex, the nearest neighbor and the nearest distance of the vertex on the spatial network in the hash table hashmap_2; the hash table hashmap_2 The primary key is the unique identifier vid of the road vertex, and its value is the nearest neighbor oid of the vertex on the space network and the shortest distance s between vid and the oid.
[0065] like figure 2 As shown, a, b, c, d, e, f, g are the vertices of the road network, o 1 to o 7 is the data object on the road network, grid 0, 1, 2... is the number of the virtual grid unit described below, Q 1 , Q 2 is the query point, P 1 ,
[0066] P 2 , P 3 is the midpoint between two adjacent data objects on the road, where P 1 is the data object o on the road ab 1 and data object o 2 midpoint of P 2 is the data object o 2 and data object o 3 midpoint of P 3 is the data object o on the road bc 4 and data object o 5 midpoint of .
[0067] Since each road has two vertices, and several roads can share one vertex, in figure 2 In , there are 11 roads, and the number of vertices is 7. For each vertex, the closest data object to this vertex on the spatial network is computed using Dijkstra's algorithm. like figure 2 In , the nearest data object of vertex b on the spatial network is o 7. Create a hash table hashmap_2, the primary key is the unique identifier vid of the road vertex, and the value is the oid of the nearest data object of the vertex on the space network and the shortest distance s between vid and oid. The corresponding value of vid in the hash table hashmap_2 is a two-tuple, which is the oid of the nearest data object of vid and the shortest distance between oid and vid.
[0068] C: Use the virtual grid to divide the two-dimensional space into several square grid units of equal size, determine the side length of the grid unit, and number the virtual grid; when performing step C, follow the specific steps below:
[0069] C1: Use the virtual grid to divide the two-dimensional space into several square grid units of equal size, through the formula (1) Determine the side length of the grid unit, where l is the side length of the grid unit, let d 1 is the length of the shortest road among all roads, let d 2 is the minimum value of the distance between all adjacent two data objects on the road with data objects, d is d 1 and d 2 The minimum value in , ξ=10 -9;
[0070] C2: Let R be the minimum bounding rectangle formed by all the data objects in the data set, and the vertex of the lower left corner of R (x 0 ,y 0 ) as the starting point, establish a virtual grid, and start from the coordinates (x 0 ,y 0 ) starts from the grid unit where the coordinate point (x, y) is located, and numbers the grid unit incrementally from left to right and from bottom to top; the formula for calculating the number of the grid unit where the coordinate point (x, y) is located is:
[0071] id = m * ( ceil ( y - y 0 l ) - 1 ) + ceil ( x - x 0 l ) - 1 ; - - - ( 2 )
[0072] Among them, id is the number of the grid unit where the coordinate point (x, y) is located, m is the number of grid units contained in each row of the grid, and ceil is the upper integer function.
[0073] like figure 2 In , a virtual grid is used to divide the two-dimensional space where the road network is located. The virtual grid has 12 rows in total, and each row contains 16 grid cells, that is, m=16. Among them, 0, 1, 2, and 3 are the numbers of the first 4 grid cells in row 1 respectively. And 16, 17, 18 are the numbers of the first three grid cells in row 2. 119 and 120 are the numbers of the 8th and 9th grid cells in row 12.
[0074] D: Calculate the sub-section contained in each grid unit and store the corresponding relationship between the grid unit and the data object or road vertex controlling the sub-section, and store the result in the hash table hashmap_3; when executing step D , follow the specific steps below:
[0075] D1: For any road, divide it into several sub-sections; for any road, start from one of its vertices, first insert the vertex into the point set ps; then take out the data objects on the road and insert them In the point set ps; for the line segment composed of two adjacent data objects in the point set ps, divide it into two sub-line segments and insert them into the sub-line segment set rs respectively; finally insert another vertex of the road into the point set ps middle.
[0076] like figure 2 Among them, a, b, c, d, e, f, g are the vertices of the road network, o 1 , o 2 ,...,o 7 is a data object on the road network. For a line segment composed of two adjacent data objects in the point set ps, divide it into two sub-line segments and insert them into the sub-line segment set rs respectively, such as P 1 , P 2 is the midpoint between two adjacent data objects on the road ab. Among them, P 1 is the data object o 1 and data object o 2 midpoint of P 2 is the data object o 2 and data object o 3 midpoint of . And when one of the two endpoints of the sub-section is a road vertex, the sub-section is not divided, such as figure 2 On the middle road ab, a→o 1 , o 3 →b The two sub-segments are not split into two sub-segments.
[0077] D2: For any sub-segment, use the following method to calculate the grid unit intersecting with the sub-segment: Let the two ends of the sub-segment be v 1 and v 2 , computing side v 1 → 2 Intersection with vertical and horizontal gridlines; according to v 1 to v 2 Arrange the above intersection points and v in order according to the size relationship of the abscissa value 1 and v 2 A set of points composed of two vertices; for all points in the sorted set, calculate the midpoints of all adjacent two points in the set in turn, and use the formula (2) in step C2 to calculate the midpoint for each midpoint The number of the grid unit where the midpoint is located, the set of grid units where the midpoint is located is the edge v 1 → 2 Intersecting grid cells.
[0078] D3: Calculate all the sub-sections contained in each grid unit and the data object collections that control these sub-sections, and store the corresponding relationship between the grid unit number, the data object collection and the slope of the sub-section where the data object is located in the hash In the table hashmap_3, the key of hashmap_3 is the number of the grid unit, and the value corresponding to the key is a set, and each element in the set is the oid of each data object controlling the grid unit and the child of the data object. The slope of the road section; if the point controlling the grid unit is a road vertex, then store the vid of the vertex and the slope of the sub-section as an element in the corresponding set of the grid unit in hashmap_3.
[0079] E: Use the formula (2) in step C2 to calculate the grid unit where the query point is located, and determine the number of the grid unit corresponding to the query point position; figure 2 , using the formula id = m * ( ceil ( y - y 0 l ) - 1 ) + ceil ( x - x 0 l ) - 1 ; Calculate the query point Q 1 The grid cell number is 135.
[0080]F: Find the data object corresponding to the grid unit according to the grid unit number calculated in step E, and calculate the data object closest to the query point and return it to the user. When performing step F, follow the specific steps below:
[0081] F1: According to the grid unit number calculated in step E, look up the slope slope of each sub-section corresponding to the grid unit and the oid of the data object controlling the sub-section or the vid of the road vertex in the hash table hashmap_3;
[0082] F2: Calculate the slope of the straight line connecting the query point and the first data object on each sub-section; if the calculated slope is equal to the slope of a sub-section corresponding to the grid unit, the query point is located at On the corresponding sub-segment; if the calculated slope is equal to the slope of several sub-segments corresponding to the grid unit, then calculate the coordinate position relationship between the query point and the two ends of each sub-segment to determine the query The subsection where the point is located;
[0083] For example in image 3 Among them, Q is the query point, O 1 and O 2 It is the data object controlling the grid where the query point is located, and a is the common vertex of the two roads. Calculate the straight line Q→O separately 1 with Q→O 2 The slope of , it can be known that Q→O 1 The slope of and only with the road a→O 1 have the same slope, therefore, the query point Q is on the road a→O 1 superior.
[0084] exist Figure 4 Among them, Q is the query point, O 1 and O 2 It is the data object controlling the grid where the query point is located, and a is the common vertex of the two roads. Calculate the straight line Q→O separately 1 with Q→O 2 The slope of , it can be known that Q→O 1 with Q→O 2 The slope of the same, and with the road a→O 1 and a → O 2 The slopes are the same. In this case, by calculating the coordinate position relationship between the query point and the two ends of each sub-line segment, it can be determined that the query point Q is on the road a→O 2 on, but not on the road a→O 1 superior.
[0085] F3: Determine whether there is a data object on the road where the query point is located, if yes, go to step F4; if not, go to step F5;
[0086] F4: If the two endpoints of the sub-section where the query point is located are two data objects respectively, calculate the distance between the two data objects and the query point, and return the data object closest to the query point as the query result to For the user, if the distance between the two data objects and the query point is the same, the two data objects will be returned to the user as query results at the same time;
[0087] like figure 2 Query point Q in 2 position, Q 2 on subroute O 4 →O 5 between, and O 4 with O 5 Respectively two data objects, not intersection vertices. Then only need to start from O 4 with O 5 Find the distance from the query point Q 2 The most recent data object can be returned to the user as the query result. exist figure 2 In, the data object O 4 for O 4 with O 5 Center distance query point Q 2 The most recent data object, then in figure 2 In the case shown, O 4 is the queried spatial nearest neighbor.
[0088] If the two endpoints of the sub-road segment where the query point is located are a data object and a road vertex, then first calculate the distance r1 from the query point to the data object and the distance r from the query point to the road vertex 2 , and then query the nearest neighbor and the nearest distance s of the road vertex on the space network from the hash table hashmap_2 2 , and finally compare r 1 with r 2 +s 2 the size of r 1 is smaller, the data object corresponding to the end point of the sub-section where the query point is located will be returned to the user as the query result; if r 2 +s 2 is smaller, then query the data object corresponding to the nearest neighbor of the road vertex on the space network from the hash table hashmap_2 and return it to the user as the query result; if r 1 with r 2 +s 2 are the same size, then at the same time, the data object corresponding to the endpoint of the sub-section where the query point is located and the data object corresponding to the nearest neighbor of the road vertex on the spatial network are queried from the hash table hashmap_2 and returned to the user as query results at the same time;
[0089] like figure 2 The query point Q shown 1 The location of the query point Q 1 The grid unit number is 135, and the query point Q 1 The sub-line segment where it is located is o 3 → b, the corresponding two endpoints are the data object o 3 and road vertex b. For this situation, first calculate the query point Q 1 to the data object o 3 the distance r 1 and the distance r from the query point to the road vertex b 2 , and then query the nearest neighbor o of the road vertex b on the space network from the hash table hashmap_2 7 and road vertex b to its nearest neighbor o 7 The closest distance s 2 , and finally compare r 1 with r 2 +s 2 the size of r 1 is smaller, the query point Q 1 The data object corresponding to the endpoint of the sub-section o 3 Return to the user as the query result; if r 2 +s 2 is smaller, the data object o corresponding to the nearest neighbor of the road vertex b on the space network will be queried from the hash table hashmap_2 7 Returned to the user as query results. from figure 2 It can be seen that r 1 < r 2 +s 2 , so the query point Q will be 1 The data object corresponding to the endpoint of the sub-section o 3 Returned to the user as the queried nearest neighbor.
[0090] Another example Figure 5 The query point Q shown 1 The location of the query point Q 1 The sub-line segment where it is located is o 2 →d, the corresponding two endpoints are the data object o 2 and road vertex d. For this situation, first calculate the query point Q 1 to the data object o 2 the distance r 1 and the distance r from the query point to the road vertex d 2 , and then query the nearest neighbor o of the road vertex d on the space network from the hash table hashmap_2 1 and road vertex d to its nearest neighbor o 1 The closest distance s 2 , and finally compare r 1 with r 2 +s 2 the size of r 1 is smaller, the query point Q 1 The data object corresponding to the endpoint of the sub-section o 2 Return to the user as the query result; if r 2 +s 2 is smaller, the data object o corresponding to the nearest neighbor of the road vertex d on the space network will be queried from the hash table hashmap_2 1 Returned to the user as query results. from Figure 5 It can be seen that r 1 r 2 +s 2 , therefore, the data object o corresponding to the nearest neighbor of the road vertex d on the space network will be queried from the hash table hashmap_2 1 Returned to the user as query results.
[0091] F5: If the two endpoints of the road where the query point is located are two road vertices, first calculate the distance r from the query point to the first road vertex 3 and the distance r from the query point to the second road vertex 4 , and then query the nearest neighbor and the nearest distance s of the first road vertex on the space network from the hash table hashmap_2 3 , the nearest neighbor of the second road vertex on the space network and the nearest distance s 4 , calculate r 3 +s 3 with r 4 +s 4 the size of r 3 +s 3 is smaller, the data object corresponding to the nearest neighbor of the first road vertex on the space network queried from the hash table hashmap_2 will be returned to the user as the query result; if r 4 +s 4 is smaller, the data object corresponding to the nearest neighbor of the second road vertex on the space network queried from the hash table hashmap_2 will be returned to the user as the query result; if r 3 +s 3 with r 4 +s 4 are the same size, then at the same time, the data object corresponding to the nearest neighbor of the first road vertex queried from the hash table hashmap_2 on the space network, and the second road vertex queried from the hash table hashmap_2 in the space The data object corresponding to the nearest neighbor on the network is returned to the user as the query result at the same time.
[0092] like Image 6 The query point Q shown 1 The location of the query point Q 1 The sub-line segment is d→e, and the corresponding two endpoints are road vertex d and road vertex e. For this situation, first calculate the query point Q 1 The distance r to the road vertex d 3 and the distance r from the query point to the road vertex e 4 , and then query the nearest neighbor o of the road vertex d on the space network from the hash table hashmap_2 1 and road vertex d to its nearest neighbor o 1 The closest distance s 3 , the nearest neighbor o of the road vertex e on the space network 2 and road vertex e to its nearest neighbor o 2 The closest distance s 4 , and finally compare r 3 +s 3 with r 4 +s 4 the size of r 3 +s 3is smaller, then the data object o corresponding to the nearest neighbor of the first road vertex d on the space network queried from the hash table hashmap_2 1 Return to the user as the query result; if r 4 +s 4 is smaller, the data object o corresponding to the nearest neighbor of the road vertex e on the space network will be queried from the hash table hashmap_2 2 Returned to the user as query results. from Image 6 It can be seen that r 3 +s 3 r 4 +s 4 , therefore, the data object o corresponding to the nearest neighbor of the road vertex e on the space network will be queried from the hash table hashmap_2 2 Returned to the user as query results.
[0093] Another example Figure 7 The query point Q shown 1 The location of the query point Q 1 The sub-line segment is d→e, and the corresponding two endpoints are road vertex d and road vertex e. For this situation, first calculate the query point Q 1 The distance r to the road vertex d 3 and the distance r from the query point to the road vertex e 4 , and then query the nearest neighbor o of the road vertex d on the space network from the hash table hashmap_2 1 and road vertex d to its nearest neighbor o 1 The closest distance s 3 , the nearest neighbor o of the road vertex e on the space network 2 and road vertex e to its nearest neighbor o 2 The closest distance s 4 , and finally compare r 3 +s 3 with r 4 +s 4 the size of r 3 +s 3 is smaller, then the data object o corresponding to the nearest neighbor of the first road vertex d on the space network queried from the hash table hashmap_2 1 Return to the user as the query result; if r 4 +s 4 is smaller, the data object o corresponding to the nearest neighbor of the road vertex e on the space network will be queried from the hash table hashmap_2 2 Returned to the user as query results. from Image 6 It can be seen that r 3 +s 3 r 4 +s 4 , therefore, the data object o corresponding to the nearest neighbor of the road vertex e on the space network will be queried from the hash table hashmap_2 2 Returned to the user as query results.
[0094] The invention starts from the spatial query application of the service based on the geographical location information, and divides the spatial query processing into two stages of off-line index establishment and real-time spatial query processing.
[0095] The offline index building stage serves the real-time spatial query processing stage, and is used to improve the response speed of the spatial nearest neighbor query in the real-time spatial processing stage. The offline index building stage is responsible for index building. In the present invention, three hash tables are created in the offline index building stage: hashmap_1, hashmap_2, and hashmap_3. Among them, hashmap_1 is used to store the identifier of the data object, that is, the correspondence between the oid of the data object and the coordinates of the data object; hashmap_2 is used to store the identifier of the road vertex, that is, the vid of the road vertex and the vertex on the spatial network The oid of the nearest data object and the value of the shortest distance between the vid of the road vertex and the oid of the nearest data object on the spatial network; hashmap_3 is used to store the distance between the grid unit and the data object controlling the sub-section in the grid unit The corresponding relationship, the slope of the sub-section.
[0096] In the real-time spatial query processing stage, each spatial nearest neighbor is queried. First, the corresponding grid unit of the query point in the two-dimensional space is calculated, and then the three hash tables established in the offline index building phase are used to find and control the grid unit. The data object of the sub-road section contained in , determine the spatial nearest neighbor on the road where the query point is located and the road network where the query point is located, and return it to the user as the spatial nearest neighbor of the query point.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products