Presentation is loading. Please wait.

Presentation is loading. Please wait.

Efficient Evaluation of k-NN Queries Using Spatial Mashups

Similar presentations


Presentation on theme: "Efficient Evaluation of k-NN Queries Using Spatial Mashups"— Presentation transcript:

1 Efficient Evaluation of k-NN Queries Using Spatial Mashups
Detian Zhang1, 2, Chi-Yin Chow1, Qing Li1 Xinming Zhang2, and Yinlong Xu2 1City University of Hong Kong 2University of Science and Technology of China

2 SSTD 2011 11/28/2018 Introduction (1/3) The k-nearest-neighbor (k-NN) query is one of the most important location-based services E.g., store finder – find the 10 nearest restaurants Most existing k-NN queries measure distance between a query and an object by “Euclidean” distance or “network” distance In reality, the shortest path may not be the one with the shortest travel time

3 Where is my nearest clinic?
SSTD 2011 11/28/2018 Introduction (2/3) Distance: 500 meters Travel time: 10 mins Where is my nearest clinic? Distance: 1000 meters Travel time: 3 mins Travel time is more meaningful for LBS!!!

4 Real-world travel time for a weekday on a segment of I-405 in LA, USA
SSTD 2011 11/28/2018 Introduction (3/3) Since the travel time is highly dynamic, we cannot accurately predict it based on the network distance Real-world travel time for a weekday on a segment of I-405 in LA, USA Source: U. Demiryurek, F. Banaei-Kashani and C. Shahabi, “Efficient K-Nearest Neighbor Search in Time-Dependent Spatial Networks”, DEXA 2010.

5 Web Mapping Services (1/2)
SSTD 2011 11/28/2018 Web Mapping Services (1/2) Solutions for traffic monitoring Collect GPS data from vehicles Deploy road-side sensors …… They are good but too expensive!!! Why not ask Web mapping services (e.g., Google Maps, Yahoo! Maps, and Microsoft Bing Maps) for help? Provide direction and travel time between two locations Server-side spatial mashups [Wikipedia: A client-side mashup is a Web page or application that uses and combines data, presentation or functionality from multiple sources to create new services.]

6 Web Mapping Services (2/2)
SSTD 2011 11/28/2018 Web Mapping Services (2/2) Google Directions API provides more turn-by-turn direction information

7 Limitations of Spatial Mashups (1/2)
SSTD 2011 11/28/2018 Limitations of Spatial Mashups (1/2) Expensive external requests E.g., retrieving travel time from the Microsoft MapPoint Web service by a database takes 502ms while the time needed to read a cold and hot 8KB buffer page from disk is 27ms and ms, respectively [Source: J. J. Levandoski, M. F. Mokbel, and M. E. Khalefa. “Preference Query Evaluation Over Expensive Attributes”, ACM CIKM 2010.] Limit on the number of requests E.g., Google Maps allows only 2,500 requests per day for evaluation users and 100,000 requests per day for premier users

8 Limitations of Spatial Mashups (2/2)
SSTD 2011 11/28/2018 Limitations of Spatial Mashups (2/2) Only support primitive operations E.g., the direction and travel time information between two point locations Restrictions on retrieved direction information E.g., The direction information must not be pre-fetched, cached, or stored, except only limited amount of content can be temporarily stored for the purpose of improving system performance [Source: Google Maps APIs Terms of Service]

9 Problem Definition Given a set of spatial objects and a query with
SSTD 2011 11/28/2018 Problem Definition Given a set of spatial objects and a query with A user’s location () A user-specified maximum number of returned objects (k) A user-specified maximum travel time (tmax) Find At most k nearest objects of interest to  in terms of travel time through accessing a Web Mapping Service The travel time from  to each returned object ≤ tmax Objectives Minimize the number of external requests Maximize the accuracy of query answers

10 Web Mapping Service Provider
11/28/2018 SSTD 2011 System Model (1/2) External Data (e.g., direction information) Queries (High Cost) Database Server Web Mapping Service Provider Mobile User (Low Cost) Local Data (e.g., restaurant data)

11 System Model (2/2) (a) A road map (b) A graph model I1 I2 I10 I9 I6 I5
SSTD 2011 11/28/2018 System Model (2/2) (a) A road map (b) A graph model I1 I2 I10 I9 I6 I5 I7 I8 I4 I3 I11 I12 I13 I15 I14 Road segment Intersection

12 SSTD 2011 11/28/2018 A Basic Algorithm Find a set of candidate objects R by executing a range query from the user U to the maximum possible travel distance dmax dmax = U’s specified maximum travel time (tmax) X the maximum allowed travel speed Issue one external request for each object in R to compute a query answer I1 I2 I3 I4 R4 R6 R5 I7 R7 I8 R8 I5 I6 R3 U R9 R2 I9 R1 I10 I11 R10 I12 I13 I14 I15 User Object Intersection

13 SSTD 2011 11/28/2018 Can We Do Better? We observe that many spatial objects are generally located in clusters in reality. E.g., many restaurants are located in a shopping area, around a university, and around a commercial center. Object grouping Group nearby spatial objects to a representative point location P Issue an external request from a user to P Share the retrieved direction information among the objects in the group by estimating the travel time from P to them

14 Object Grouping Q1: How to select representative point locations?
SSTD 2011 11/28/2018 Object Grouping Q1: How to select representative point locations? S: All Intersections. Only one possible path from the intersection of a group to each object in the group => make the estimation easier and more accurate A road segment should have the same conditions, e.g., speed limit and direction => considering a road segment as a basic unit makes the estimation more accurate and nature Q2: How to group objects to representative locations? S: (1) minimize the distance from objects to their representative location and (2) minimize the number of shared intersections

15 An Efficient Algorithm
11/28/2018 SSTD 2011 An Efficient Algorithm Step 1: Range Search Find a set of candidate objects R Step 2: Object Grouping Group each object in R to its nearest intersection Step 3: External Requests Issue one external request for each shared intersection in increasing order of its network distance to U For each shared intersection, its direction information is shared by the objects in its group Step 4: Object Pruning Maintain the largest travel time Amax in a current answer If an object R in R has the smallest possible travel time not less than Amax, R is pruned. dist(I6,I5)=30 time(I6,I5)=20 I1 I2 I3 I4 R4 dist(U,I6)=5 time(U,I6)=10 R6 R5 dist(I5,R2)=20 time(I5,R2)=10 I7 R7 I8 R8 I5 I6 R3 U R9 R2 I9 R1 I10 I11 R10 I12 dist(I5,I9)=30 time(I5,I9)=15 I13 I14 I15 User Object Intersection

16 Minimize the No. of Shared Intersections
SSTD 2011 11/28/2018 Minimize the No. of Shared Intersections Problem: Find a minimal set of intersections that cover all road segments having candidate objects The same as vertex cover problem Use a greedy approach to find an approximate solution

17 The Greedy Approach Selection of shared intersections I1 I2 I3 I4 d=1
SSTD 2011 11/28/2018 The Greedy Approach Selection of shared intersections I1 I2 I3 I4 d=1 d=0 R4 I2 Degree (d): the number of edges connected to the vertex R5 I7 I8 R8 d=1 d=0 d=1 I5 I6 d=0 d=1 U I5 I6 R9 I7 R2 d=2 d=0 d=1 d=2 d=0 d=1 I9 R1 I10 I11 R10 I12 I9 I10 I11 I12 The minimal intersection set V={I11, I9 , I6} The minimal intersection set V={I11, I9} The minimal intersection set V={I11} I13 I14 I15 User Object Intersection

18 Extensions Support one-way roads User grouping
SSTD 2011 11/28/2018 Extensions Support one-way roads Only need to slightly modify the objects grouping methods User grouping Effective for continuous queries or a system with a high workload First, execute user grouping step (new) – group users to their nearest intersection based on their movement direction Then, execute our algorithm with modifications in the range search and object pruning steps

19 SSTD 2011 11/28/2018 Experiment Settings Implement our algorithms using Google Direction APIs Road map: An area of 88 km2 in Hennepin County, MN, USA 6,109 road segments and 3,593 intersections Two object grouping methods NI – minimize the distance from objects to representative locations MI – minimize the number of shared intersections Parameter settings 100 users and 500 objects Maximum allowed travel speed is 110 km per hour User-specified maximum travel time (tmax) is 120 seconds

20 Experiment Results (1/2)
SSTD 2011 11/28/2018 Experiment Results (1/2) Accuracy of the travel time estimation

21 Experiment Results (2/2)
SSTD 2011 11/28/2018 Experiment Results (2/2) Accuracy of k-NN query answers

22 Simulation Settings Implement our algorithms using Google Maps APIs
SSTD 2011 11/28/2018 Simulation Settings Implement our algorithms using Google Maps APIs Road map: An area of 88 km2 in Hennepin County, MN, USA 6,109 road segments and 3,593 intersections Two objects grouping methods NI – minimize the distance from objects to representative points MI – minimize the number of shared intersections Parameter settings 10,000 users and 10,000 objects Maximum allowed travel speed is 110 km per hour User specified maximum travel time (tmax) is 120 seconds User specified number of returned objects (k) is 20

23 Simulation Results Effect of the number of objects from 4K to 20K
SSTD 2011 11/28/2018 Simulation Results Effect of the number of objects from 4K to 20K No. of External Requests Query Response Time (s)

24 11/28/2018 SSTD 2011 Conclusion Efficient Evaluation of k-NN Queries Using Spatial Mashups Spatial Databases k-Nearest- Neighbor Queries Web Mapping Services ?

25 Simulation Results Effect of the number of users from 4K to 20K
SSTD 2011 11/28/2018 Simulation Results Effect of the number of users from 4K to 20K

26 SSTD 2011 11/28/2018 Simulation Results Effect of the user required maximum travel time (tmax)


Download ppt "Efficient Evaluation of k-NN Queries Using Spatial Mashups"

Similar presentations


Ads by Google