37
Mobility Data Management & Exploration Ch. 04. Mobility Data Management Nikos Pelekis & Yannis Theodoridis InfoLab | University of Piraeus | Greece infolab.cs.unipi.gr v.2014.05

Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

Mobility Data Management &

Exploration

Ch. 04. Mobility Data Management

Nikos Pelekis & Yannis Theodoridis

InfoLab | University of Piraeus | Greece infolab.cs.unipi.gr

v.2014.05

Page 2: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

2

Chapter outline

4.1. Location- and Mobile-Aware Querying

4.2. Indexing Techniques for Mobility Data

4.3. Query Processing Techniques

4.4. Benchmarks

4.5. Summary

Page 3: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

4.1. Location- and mobile-

aware querying

3

Page 4: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

4

Taxonomy of mobility queries

¡ Dimensions: ¡  Time addressed: past vs. present vs. future

¡  Duration of query: snapshot vs. continuous

¡  Type of query: range, NN, distance, topological, directional, …

¡  Type of reference object(s): stationary vs. moving

¡  Type of data objects: stationary vs. moving

¡ Mobility queries: several combinations of the above dimensions

Page 5: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

5

Querying the Past

¡ Main issues: Large number of historical trajectories; Persistent read-only data

¡  Examples (recall the vessels dataset): ¡  “Search for vessels that were located within 1 n.m. distance from

shore yesterday night”

¡  <Past, Snapshot, Distance, Stationary, Moving>

¡  “Find the average speed and heading of vessels that were sailing south of island of Crete from 07:00 to 10:00 yesterday”

¡  <Past, Snapshot, Directional, Stationary, Moving>

¡  “Search for vessels that were found close to each other, in a distance less than 1 n.m, yesterday, while in motion”

¡  <Past, Snapshot, Distance, Moving, Moving>

Page 6: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

6

Querying the Present

¡  Time is always NOW

¡ Main issue: Continuously changing data ¡  Real-time query support is required

¡  Index structures should be update-tolerant

¡  Examples: ¡  “How many vessels are located in port of Piraeus now?”

¡  <Present, Snapshot, Range, Stationary, Moving>

¡  What is the current vessel-to-vessel distance for all vessels sailing in the Euboea-Andros short passage?”

¡  <Present, Snapshot, Distance, Moving, Moving>

Page 7: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

7

Querying the Future

¡ Main issue: Predict the movement through a velocity vector ¡  Prediction could be valid for a limited time horizon only

¡  Examples: ¡  “For the next 10 min of its trip, monitor the 3-nearest reefs that

vessel XYZ is expected to approach during its movement”

¡  <Future, Continuous, NN, Moving, Stationary>

¡  “Search for the biodiversity areas, vessel XYZ is expected to cross during the next hour of its trip”

¡  <Future, Snapshot, Range, Moving, Stationary>

Page 8: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

8

Temporal sequence queries

¡ Motion pattern queries (temporal sequences of simpler queries) ¡  “Search for ships that were located within 1 Km distance from shore

yesterday night, arrived at a port between 06:00 and 08:00 today, and stayed in the port for at least 1 hour”;

Page 9: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

9

A taxonomy of related queries

¡  The nature of mobility data provides us with the ability to query them with a variety of operators. For instance:

¡  Location- vs. trajectory- oriented queries

Query type Examples

Location-oriented continuous nearest neighbor, se-quenced route (trip planning), etc. queries

Trajectory-oriented

Coordinate-based

range, NN, etc. queries

Trajectory-based

topological (enter, leave, cross, bypass, etc.) navigational (in front of, etc.), motion pattern, trajectory similarity, etc. queries

Traffic analysis path, traffic, etc. queries

Page 10: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

10

Location-aware queries

¡ Continuous Nearest-Neighbor (CNN) queries ¡  “find the nearest gas stations during my route from a starting to

an ending point”

¡  Sequenced Route (SR) queries ¡  “find the best route from a starting to an ending point,

visiting an ATM, then a gas station, and then a restaurant”

¡  Example (Ai denote ATMs, Gi denote gas stations, Ri denote restaurants)

Page 11: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

11

Trajectory-oriented queries

¡ Coordinate-based queries ¡  Timeslice queries

¡  “find the locations of trajectories at a given timestamp”

¡  Spatiotemporal range queries

¡  “find the portions of trajectories inside a given spatial region during a given time interval”

¡  (point / trajectory) Nearest-neighbor queries

¡  “find the trajec- tories that lie nearest to a given point / trajectory during a given time interval”

¡  etc.

Page 12: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

12

Trajectory-oriented queries (cont.)

¡  Trajectory-based queries ¡  Trajectory similarity queries ¡  “find the trajectories that are similar to a given trajectory”

¡  Topological queries ¡  “find the trajectories that entered (crossed, left, bypassed, etc.)

a given region during a given time interval”

¡  Navigational queries ¡  “find the trajec-

tories that were located west of (south of, etc.) a given region during a given time interval”

¡  etc.

Page 13: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

13

Traffic-oriented queries

¡ Network-oriented, motivated by traffic analysis ¡  Path queries, such as “find the trajectories that

have moved along an entire path”

¡  Traffic queries, such as “find places on the road network where traffic jams appear”

¡  etc.

S1

S4

S2

S3

S5

S6

S7

S8

S9

Page 14: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

14

Querying under uncertainty

¡  Problem: GPS introduces inherent error in measurements ¡  Result: uncertainty in query results

¡  False hits, missed hits, etc.

¡ MUST vs. MAY set of result points wrt. query window Q

Page 15: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

15

Querying under uncertainty (cont.)

¡  Key question regarding trajectory datasets: where could the object have been located at time t in [ti, ti+1]? ¡  The union of all lenses: Potential Area of Activity (PAA)

¡  Uncertainty in e.g. topological queries ¡  From ‘inside’ to

‘definitely-inside’ or ‘possibly-inside’

¡  etc.

Page 16: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

4.2. Indexing techniques for

mobility data

16

Page 17: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

17

R-trees for spatial data

¡  For d-dimensional point or region data

¡  Is it portable to mobility data? ¡  In other words, is space + time simply a 3D space?

Page 18: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

18

What for mobility data ??

¡  Trajectory shape is not simple at all …

¡  Key question: how do we approximate trajectories? ¡  Using their MBRs, as we do for (static) spatial objects?

¡  If yes, then we could build indexes upon the approximations

¡ Challenges: ¡  Both space and time are equally important!

¡  Time is not yet another dimension (consider e.g. its monotonicity)

¡  Density in ‘spatiotemporal’ space may significantly vary (from place to place, from time to time)

t

x

y

Page 19: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

19

Indexing trajectories using R-trees

¡  Typically approximate trajectories using MBRs; then index these MBRs ¡  we can use R-trees etc. J

¡  trajectories are lines, thus MBRs add extensive empty space L

¡ Critical: how many MBRs per trajectory? ¡  One (too much empty space)

vs. the number of its segments (too many MBRs…)

¡  Where is the golden ratio?

Page 20: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

20

Mobility indexing techniques

¡  Several proposals since the 3D R-tree (1996)

¡  Indexing the past (= trajectories) ¡  free space movement : TB-tree (2000), MV3R-tree (2001),

TrajStore (2011) ¡  network-constrained movement: FNR-tree (2003), MON-tree

(2005), PARINET(2011)

¡  Indexing the present (and anticipated future) ¡  Data partitioning (R-tree variations): TPR-tree (2000), TPR*-tree

(2003), RPPF-tree (2006) ¡  Space partitioning (B+-tree variations): Bx-tree (2004), ST2B-tree

(2008)

¡ We focus on historical tracks of moving objects (trajectories) è concentrate on the 1st group

Page 21: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

21

TB-tree (Trajectory-Bundle tree)

¡ Maintains the ‘trajectory’ concept (è effective for trajectory-oriented queries) ¡  each node consists of segments of a single trajectory

¡  nodes corresponding to the same trajectory are linked together in a chain

t3

t1

t7

t11

t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

Page 22: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

22

TB-tree (cont.)

¡  TB-tree insertion procedure

Algorithm TB-tree-Insert Input: TB-tree node N, entry e Output: (none) 1.  N’ = TB-tree-FindNode (N, e) 2.  IF N’ was found 3.  IF N’ has space 4.  insert e into N’ 5.  ELSE // N’ is full of entries 6.  create new leaf node New 7.  insert e into New 8.  ELSE // N’ was not found 9.  create new leaf node New 10.  insert e into New

Algorithm TB-tree-FindNode Input: TB-tree node N, entry e Output: TB-tree node N’ 1.  IF N is a non-leaf node 2.  FOR each entry e’ in N 3.  IF e’.MBB overlaps e.MBB 4.  call TB-tree-FindNode (e’.ptr, e) 5.  ELSE // N is a leaf node 6.  FOR each entry e’ in N 7.  IF e’.MBB is connected to e.MBB 8.  N’ = N 9.  return N’

Page 23: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

23

FNR-tree (Fixed Network-constrained R-tree)

¡ A forest of 1D (temporal) R-trees on top of a single 2D (spatial) R-tree ¡  The 2D R-tree organizes the segments of the road network

¡  Each 1D R-tree organizes the time intervals the objects were moving on the respective network edge

2D R-tree (spatial)

…… ……

Children 1D R-trees (temporal)

… …

Page 24: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

24

FNR-tree (cont.)

¡  FNR-tree structure in detail:

Parts of the network

The corresponding indexes

Page 25: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

25

PARINET

¡ Grid partitioning approach

¡ Maintains B+-tree indexes on time intervals (one index per sub-network covered by the respective cell of the grid)

¡  The index is built in 3 phases: ¡  Trajectories are partitioned according to road identifiers

¡  Partitions are sorted on time intervals

¡  Each partition is indexed using a B+-tree on those time intervals

Page 26: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

4.3. Query processing

techniques

26

Page 27: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

27

Processing SR queries

¡  Recall Sequenced Route (SR) query definition: ¡  Find the optimal route from a departure to a destination point …

¡  … given the extra constraint to pass a sequence of facilities (candidate points)

¡  Example: “Find the best route office-to-home constrained to pass from a bank ATM, then a gas station, then a shopping mall”

¡  Relevant to the TSP problem ¡  High complexity!

s

e

f2

f4

f3

f1

f5

Page 28: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

28

Constrained routing

¡ Variation of the SR query where the number of facility classes is limited to 1

¡  Heuristic solution: variation of shortest- path (SP) algorithm

¡  In the example (right), how to get from s to e via fi? ¡  any idea for pruning? s

e

f2

f4

f3

f1

f5

Page 29: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

29

Constrained routing (cont.)

¡ CR algorithm (based on “Incremental Euclidean Restriction”)

Algorithm ConstrainedRouting Input: road network G, starting point s, ending point e, R-tree root R Output: selected facility f, selected path Pf 1.  Pf = ShortestPath (G, s, e) 2.  f = R-tree-based-NN-search (R, P, 1) 3.  Pf = ShortestPath (G, s, f) &

ShortestPath (G, f, e) 4.  Fcandidates = R-tree-based-

Range-search (R, MBR(P)) 5.  FOR each entry f’ in Fcandidates 6.  Pf’ = ShortestPath (G, s, f’) &

ShortestPath (G, f’, e) 7.  IF length(Pf’) < length(Pf) 8.  f = f’; Pf = Pf’ 9.  return (f, Pf)

s

e

f2

f4

f3

f1

f5

Page 30: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

30

Processing trajectory-oriented queries

¡  Typical queries: ¡  Range queries ¡  k-NN queries, in two variations: the reference object being stationary (=

point or rectangle) or moving (= trajectory) ¡  Similarity queries (could be considered as extension of NN) ¡  (Distance) Join queries

¡ Query processing relies on the underlying index ¡  R-tree-based algorithms ¡  TB-tree-based algorithms (see example in the following slide) ¡  etc.

Page 31: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

31

TB-tree-based query processing

¡ Algorithm for Combined (i.e., coordinate- and trajectory-based) search

Algorithm DetermineTrajectory Input: TB-tree node N, TB-tree entry e, query constraint C IF e’ satisfies C Add e’ to S FOR each entry e’ following e in the forward linked list starting from node N IF e’ satisfies C Add e’ to S FOR each entry e’ preceding e in the backward linked list starting from node N IF e’ satisfies C Add e’ to S

Algorithm TB-tree-based-CombinedSearch Input: TB-tree node N, query window Q, query constraint C Output: answer set S IF N is a non-leaf node FOR each entry e in N IF e.MBB overlaps Q CALL TB-tree-based-CombinedSearch (e.ptr, Q, C) ELSE // N is a leaf node FOR each entry e in N IF e.MBR overlaps Q AND e.T_id not in T_id Add e.T_id to T_id CALL DetermineTrajectory (N, e, C)

t3

t1

t7

t11

t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

Page 32: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

4.4. Benchmarks

32

Page 33: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

33

The need for Benchmarks

¡  To define a set of representative operations (queries and updates) that should be addressed efficiently ¡  by related access methods and systems

¡  Benchmark parameters ¡  index & query workload: ¡  index size, maintenance cost for bulk loading, inserting,

deleting, and updating entries ¡  query cost (usually, I/O)

¡  dataset configuration: dataset type (real vs. synthetic), size, and distribution ¡  data distribution includes both

the initialization and the evolution of moving objects

Page 34: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

34

Mobility-related Benchmarks

¡ Dynamark (2003) focuses on LBS database servers ¡  Evaluates update and search costs

¡  BerlinMOD (2009) simulates trajectories of vehicles on Berlin road network. Its main features: ¡  Models several types of trips, e.g. home – office – home ¡  Supports range, NN and other (from simple to sophisticated)

queries, e.g. ¡  What are the pairs of vehicles that have ever been as close as

10m or less to each other? ¡  When and where did the vehicles from a given set S meet

other vehicles (distance < 3m)? etc. ¡  Processing is based on SECONDO* MOD system

* See more details in Chap. 5

Page 35: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

4.5. Summary

35

Page 36: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

36

Summarizing …

¡  Research in mobility data management has resulted in a thesaurus of algorithms, methods and techniques ¡  from indexing methods and query processing algorithms … ¡  … to handling uncertainty information that is inherent in mobility

data

¡  In this chapter, we presented: ¡  a taxonomy of location- and

mobile- aware queries ¡  popular indexing techniques ¡  popular query processing

methods ¡  related benchmarks

Page 37: Mobility Data Management & Explorationinfolab.cs.unipi.gr/wp-content/uploads/2014/02/ch04.pdf · Traffic analysis path, traffic, etc. queries . 10 Location-aware queries ! Continuous

End of chapter