1 of 22

The Maximum Trajectory Coverage Query in Spatial Databases

Mohammed Eunus Ali, Shadman Saqib Eusuf, Kaysar Abdullah�Bangladesh University of Engineering and Technology (BUET), Bangladesh��Farhana M. Choudhury�RMIT University & University of Melbourne, Australia�J. Shane CulpepperRMIT University, Australia �Timos Sellis� Swinburne University of Technology, Australia

2 of 22

  • Availability of Huge Amount of Trajectory Data
    • Bikely users can share their cycling routes from GPS devices 1
    • A user can add points on the route where the course is changed (i.e. waypoints) in GPS-wayPoints2
    • In Microsoft GeoLife users can share travel routes GPS trajectories 3
    • Using Uber, 15 million trips/day are completed on average 4

2

Motivation

1 http://www.bikely.com 2 http://gpswaypoints.net

3 https://research.microsoft.com/en-us/projects/geolife/ 4 https://techjury.net/stats-about/uber/

How can we utilize this massive amount of trajectory data??

3 of 22

  • Improving Public Transport
  • Designing Ad-hoc Transport
  • Tour Planning
  • Ridesharing

... and many more applications

3

Motivation

Which routes should the vehicles take?

Tour/Transport Operator

We introduce 2 new queries in spatial database, namely kBFT and kBCovFT to support all these applications!!

4 of 22

  • Given
    • A set of user trajectories, U
    • A set of facility trajectories, F
    • A positive integer, k
    • A service evaluation function
  • A kBFT query returns top-k�facilities from F which have�individually higher service�values than the other facilities

4

k-Best Facility Trajectory Search (kBFT)

  • Total 3 facilities: 65, 46, 25/34 & 12 user trajectories: u1 u12
  • Facility 46 serves 4 users. Facility 25/34 and 65 serves 3 and 2 users respectively
  • For k=1, kBFT will return Facility 46

5 of 22

  • Variant of kBFT
  • kBCovFT query returns best k�facilities from a set of facilities,�F which combinedly have higher�service value than that of other�such subsets of k facilities
    • Multiple facilities may be�needed to serve a user

5

k-Best Coverage Facility Trajectory Search (kBCovFT)

  • For k=2, kBCovFT will return {Facility 46 , Facility 65}
  • Facility {46, 65} serves 8 users (u5 u12), other pairs can serve 7 and 5 users
  • u10, u11 cannot be served by a single facility, but {46, 65} can jointly serve them

6 of 22

  • Route/Trip Planning (TP) 1
    • Recommending route based on mobility pattern
  • Trajectory Search by Point Location 2
    • Finding k nearest trajectories from a set of query points
  • Facility Location Selection Problem (FLP) 3
  • Reverse kNN Trajectory Queries (RkNN) 4
    • Selecting one of k nearest facility trajectories wrt given user trajectories

6

Related Work

1 Chen et al. 2013, 2011, Wang et al. 2017 2 Han et al. 2014, Tang et al. 2011

3 Chen et al. 2013, Du et al. 2005, Wong et al. 2009, Xiao et al. 2011, Zhou et al. 2011

4 Wang et al. 2017, Rahat et al. 2018

7 of 22

  • A New Class of Trajectory Queries
    • kBFT
    • kBCovFT
  • A Novel Two Level Index Structure
    • Trajectory Quadtree (TQ-tree)
    • Z-ordering
  • Efficient Divide and Conquer Approach
    • Two Phase Pruning
    • Incorporation with a Best-First Search Technique

7

Major Contributions

8 of 22

  • Storing Trajectories with Similar Orientation Together
    • We need to find co-located trajectories quickly
    • We want to organize trajectories of different lengths suitably
  • Evaluating Service Value
    • A user can be partially served by a facility
    • A user can be served by multiple facilities, so served segments of trajectories need to be traced
    • A user may change facilities several times (i.e. several hops) to achieve a higher service value in kBCovFT query

8

Challenges

9 of 22

  • Trajectory Indexing
    • Trajectories with spatial locality are grouped and stored together
    • Trajectories stored together are indexed using z-curve
  • Algorithm
    • Facility trajectories are recursively divided to prune TQ-tree nodes
    • Only trajectories at relevant nodes are retrieved based on z-ordering
    • A priority queue of states of facilities is maintained and updated to answer kBFT
    • kBFT solution method is used in the greedy approach of kBCovFT

9

Key Ideas

10 of 22

  • User Trajectories

10

Trajectory Quadtree (TQ-tree)

11 of 22

  • Quadtree Structure to Partition Space

11

Trajectory Quadtree (TQ-tree)

12 of 22

  • Quadtree Structure to Partition Space (2nd Level)

12

Trajectory Quadtree (TQ-tree)

13 of 22

  • TQ Tree Node Structure

13

Trajectory Quadtree (TQ-tree)

Upper bound of service value e.g. total number of trajectories under this TQ-tree node

Inter-node trajectories

14 of 22

  • Z-ordered Inter-node Trajectory List

    • Single node with all trajectories under it
    • Z-ordering of the start points of the inter node trajectories
    • Z-ordering of the end points of the inter node trajectories
    • Inter-node trajectories in z-ordered buckets:

14

Trajectory Quadtree (TQ-tree)

15 of 22

  • Idea
    • Apply a best-first technique with divide and conquer approach
    • Explore facilities based on service value upper bounds
    • Maintain a max priority queue of facility exploration entities
  • Key Observation: Many facilities need not to be fully explored
  • Steps
    • A max priority queue is initialized with unexplored states of facilities
    • State at top is relaxed & reinserted until k facilities are fully explored

# Service value for inter-node trajectories is calculated in divide and conquer method

# Exploration state is updated with child Q-nodes and relevant portions of the facility

15

Processing kBFT

16 of 22

  • Input: Facility graph, f & TQ-tree node Q ; Output: Service value
  • Steps

    • Recursive calls with children of Q and corresponding portions of f
    • Evaluation of service value of f for the inter-node trajectories of Q

# Pruning based on z-id and distance(euclidean/road network) threshold checking

    • Termination if f is empty or leaf is reached

16

Divide and Conquer: Service Evaluation

17 of 22

  • Two-Phase Greedy Method
    • Initial filtering heuristic based on kBFT solution

# Choosing a moderately larger pool of trajectories using kBFT solution e.g. if k=4, 16 or 8 individually best facilities may be chosen

    • Greedy facility selection

# Calculating service value of the facilities and picking the best among remaining ones

# Repeating the process until k facilities are chosen

  • Quality of Solution
    • Proof of non-submodularity of the service value function
    • Calculation of approximation ratio

17

Processing kBCovFT

18 of 22

  • Datasets
    • User trajectory dataset: Point to point - NY Taxi-trips (1,032,637), multipoint - NY Foursquare (212,751), Beijing Geolife (30,266)
    • Bus route dataset: NY, Beijing bus routes
  • Parameters

* red color indicates default value

  • Performance Comparison
    • BL (Baseline): Trajectory retrieved with range query, no TQ-tree indexing
    • TQ(B): Only TQ-tree indexing; TQ(Z): Z-ordering with TQ-tree

18

Experimental Setup

Parameter

Ranges

Parameter

Ranges

No. of Trajs

203308, 357139, 697796, 1032637

No. of Stops

16, 32, 64, 128, 256, 512

No. of Facilities

8, 16, 32, 64, 128, 256, 512

Value of k

4, 8, 16, 32

19 of 22

19

Effect of No. of Trajectories

  • TQ(Z) is on average 2 orders of magnitude faster than TQ(B)
  • TQ(B) is 1 order of magnitude faster than the baseline
  • TQ(Z) takes 2 orders of magnitude less I/O than the TQ(B)

20 of 22

20

Effect of No. of Facilities

  • TQ(Z) is 3 orders of magnitude faster than the baseline
  • TQ(Z) takes 2 orders of magnitude less I/O than the TQ(B)

21 of 22

  • Introduced a Pair of New Trajectory Queries
  • Proposed an Efficient Two Level Index Structure
  • Presented a Divide and Conquer Based Solution for the 1st Query
  • Devised a Two-step Greedy Approximation Algorithm for the 2nd Query
  • Conducted Experiments Extensively to Validate the Claims
  • Discussed Generalization and Extensions of Proposed Approaches to Multipoint Trajectories and Temporal Domain

21

Summary

22 of 22

Thank You ☺