searching trajectories by locations – an efficiency study

29
Searching Trajectories by Locations – An Efficiency Study Zaiben Chen 1 , Heng Tao Shen 1 , Xiaofang Zhou 1 , Yu Zheng 2 , Xing Xie 2 1 The University of Queensland 2 Microsoft Research, Asia

Upload: laird

Post on 19-Feb-2016

30 views

Category:

Documents


2 download

DESCRIPTION

Zaiben Chen 1 , Heng Tao Shen 1 , Xiaofang Zhou 1 , Yu Zheng 2 , Xing Xie 2 1 The University of Queensland 2 Microsoft Research, Asia. Searching Trajectories by Locations – An Efficiency Study. Outline. Research problem & application scenarios Basic ideas - PowerPoint PPT Presentation

TRANSCRIPT

  • Searching Trajectories by Locations An Efficiency StudyZaiben Chen1, Heng Tao Shen1, Xiaofang Zhou1, Yu Zheng2, Xing Xie2

    1 The University of Queensland2 Microsoft Research, Asia

  • OutlineResearch problem & application scenariosBasic ideasK Best-Connected Trajectory (k-BCT) queryThe Incremental k-NN Algorithm (IKNN) Performance studyBest-firstDepth-firstOptimization & extensionExperimentsConclusion

  • Research Problem: Searching Trajectory DatabasesGPS trajectories collected by GeoLife Project, MSRAHow to retrieve the trajectories we want?

  • Searching Trajectory DatabasesSearch by a location

    Search by a sample trajectory

    Frentzos et al. Geoinfomatica07; Dfoser et al. VLDB00. (R-tree variants)Chen et al, SIGMOD05; Vlachos et al, ICDE02; Yi et al, ICDE98, etc. (Similarity)

  • Searching Trajectory DatabasesThe problem we study: Searching by multiple locations

    To find trajectories that are close to all the locationsTechnically, it is an extension of the single-location based query. But more complicated.Practically, it produces a more general way to search trajectories. Two extreme cases (one location, many locations)

  • Application motivationsThe Microsoft GeoLife Projecthttp://research.microsoft.com/en-us/projects/geolife/ GeoLife is a location-based service built on Microsoft Virtual Earth.

    Our work benefits the following two functions(1) Travel recommendation E.g. To help a visitor planning a trip to multiple attractions by considering others traveling trajectories.(2) Sharing life experiences & friend recommendation E.g. To find out which users share the similar daily route through Queens Plaza, Central Stat., Mains St.

  • Application motivationsGeo-Coding:From Pictures to CoordinatesThe recommended route

  • Application motivationsGeo-Coding:From Pictures to CoordinatesThe recommended routeThe first step: to define the closeness (i.e. distance) between a trajectory and locations

  • Similarity FunctionThe similarity function reflects how close a trajectory is to the given locations, and we call the most similar trajectory the best-connected trajectory.Step 1. find out the closest trajectory point on R to each location qi

    Step 2. sum up the contribution of each matched pair. (unordered query)

    Distq(qi, R) is the shortest distance from qi to R Q={q1, q2, qm}, R={p1, p2, pn}

  • Problem Definitionk-Best Connected Trajectory (k-BCT) queryGiven a set of trajectories T = {R1, R2, , Rn}, a set of query locations Q = {q1, q2, ,qm}, and the similarity function Sim(Q, R), the k-BCT query is to find the k trajectories among T that have the highest similarity.

    Assumption: The number of query locations is small. (m is a small constant)

    Intuition: The k-BCT result is the JOIN of m single-location based queries.

  • Basic ideas Incremental k-NN Algorithm (IKNN)

    Step 1. Index all the trajectory points by one single R-treeGet the shortest distance from a query location to the trajectories

    Step 2. Search for the -nearest neighbor (-NN) of each query location (q1 to qm), by using any traditional k-nearest neighbor algorithm over R-tree. For any trajectory that scanned by a -NN, its shortest distance to the query point is known. Candidate set C = {all scanned trajectories}

  • IKNN algorithmStep 3. Construct lower bounds of similarity.For a trajectory R1 in C, assume it got 3 points p1, p2 and p3 scanned by the -NN search of q1, q2.

    R1p1p2Sim(Q, R1) = e-|q1, p1| + e-|q2, p2| + e-|q3, p5|p3q1q2q3p5 e-|q1, p1| + e-|q2, p2|

  • The Incremental k-NN algorithmStep 4. Construct upper bound of similarity.For any trajectory that is not covered by the -NN search, e.g. R5 its distance to qi must be larger than the radius of qi

    R1Sim(Q, R5) = e-|q1, R5| + e-|q2, R5| + e-|q3, R5| e-radius1+ e-radius2 + e-radius3q1q2q3R5radius1radius2radius3

  • The Incremental k-NN algorithmStep 5. Check the STOP condition (pruning condition) For a k-BCT query, if we can get k candidate trajectories whose lower bounds are not less than the upper bound of similarity for all un-scanned trajectories, then the k best-connected trajectories must be included in the candidate set.

    if the condition is satisfiedgo to the refinement stepelseincrease by some repeat the search process

    With the search region of the -NN search enlarges, eventually k best-connected trajectories will be found.

  • ProblemThe problem: we may need to increase and compute the lower/upper bounds for many rounds before we eventually find the k-BCT results.The -NN search will run for many rounds for every query location.(let be a constant k initially, and be k as well)round 1: 1 k nearest neighborsround 2: 1 2k nearest neighbors round i: 1 i*k nearest neighbors

    Trajectory points are visited multiple times. Normally, >> k, so the complexity is ^2.

  • ProblemThe problem: we may need to increase and compute the lower/upper bounds for many rounds before we eventually find the k-BCT results.The -NN search will run for many rounds for every query location.(let be a constant k initially, and be k as well)round 1: 1 k nearest neighborsround 2: 1 2k nearest neighbors round i: 1 i*k nearest neighbors

    Normally, >> k, so the complexity is lambda square.Can we reduce the overlapped search regions?

  • Efficiency study of the IKNNAdaption of the -NN algorithmThe best-first nearest neighbor search [Hjaltason et al., TODS99] A priority queue is maintained to store all the R-tree entries that have yet to be visited, using the MINDIST as a key. So it visits MBRs/Objects in the order of the MINDIST.

    The depth-first nearest neighbor search [Roussopoulos et al., SIGMOD95]It recursively traverses the R-tree level by level in a depth-first manner, while maintaining a global list of k nearest candidates found so far.

    Estimate the performance of the IKNN adopting different -NN algorithms

  • Adaption of the -NN algorithmThe best-first NN searchRetrieve the , +, +2, NN for each query location incrementally until the k best-connected trajectories are included in the candidate set.BenefitThe -NN is returned in an incremental way I/O optimal, no overlap occurs, Vsum = ShortcomingMemory consumption is NOT guaranteed. A priority queue is maintained to store all the R-tree entries that have yet to be visited. The queue may be as large as the whole dataset in an extreme case.

  • The best-first strategyPerformance (R-tree leaf access)Estimate the circle region (with radius r) that contains points [Belussi et al. VLDB95]

    Estimate the leaf access of a range query with radius r [Korn et al. TKDE2001]

    m independent -NN queries

    q objectsradius

  • Adaption of the lambda-NN algorithmThe depth-first NN searchEvery time we search for the + NN, we have to re-visit the search region of the -NN query.Benefit: Guaranteed memory usage, O(c LogcN)Drawback: Too many overlapsA simple improvement: Double at each round, to reduce the number of rounds and amortize cost.

    Pruning: All MBRs whose MAXDIST is even smaller than the current search range of -NN can be skipped in the search of + NN.

  • The depth-first strategyPerformance (R-tree leaf access)The search region is not necessary a circle! So we can not use the previous method directly.Estimate the size of the first visited MBR (at any level) that contains not less than pointsEstimate the radius (MAXDIST) of the region that contains the MBR

    MBR1qiMAXDISTR-tree nodes outside the circle with radius MAXDIST wont be visited.

  • The depth-first strategy (cont.)PerformanceEstimate the leaf access of a range query with radius MAXDIST [Korn et al. TKDE2001]

    Finally,

  • SummaryThe best-first strategy, although has no guarantee in memory usage, it normally runs faster and the priority queue can still be accommodated in the main memory of a modern computer easily.

    The modified depth-first strategy reaches nearly the same performance as that of the best-first strategy, while it still preserves a low memory consumption

    IKNN algorithmMemory usageObject visitsLeaf accessThe best-first strategy no guaranteem O()The depth-first strategyO(logN * c)m O()

  • Optimization & Extension

    Considering the importance of the query locations and assigning different weights in exploring objects.

    Extension to query locations with an order specified

  • Experiments12, 653 trajectories (1,147,116 points) collected by the Geolife projectNumber of query locations: 2 to 10Tests are conducted on PC with 2.1GHz CPU and 1GB memory

  • Experiments Node Access

  • Experiments Query Time

  • Experiments Memory Usage

  • Thank you

    *